Changeset 7230 for src/Main.hs
- Timestamp:
- 10/03/05 10:59:19 (3 years ago)
- Files:
-
- 1 modified
-
src/Main.hs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Main.hs
r7162 r7230 235 235 doExecuteHelper :: [FilePath] -> [String] -> IO () 236 236 doExecuteHelper helper args = do 237 mbin <- findHelper [["."], ["..", ".."]] 237 let searchPaths = [["."], ["..", ".."], [getConfig "sourcedir"]] 238 mbin <- findHelper searchPaths 238 239 case mbin of 239 240 Just binary -> do 240 241 exitWith =<< executeFile' perl5 True (binary:args) Nothing 241 _ -> fail ("Couldn't find helper program " ++ (foldl1 joinFileName helper))242 _ -> fail ("Couldn't find helper program " ++ (foldl1 joinFileName helper) ++ " (searched in " ++ show searchPaths ++ ")") 242 243 where 243 244 perl5 = getConfig "perl5path" … … 262 263 fileExists path = do 263 264 let (p,f) = splitFileName path 264 dir <- getDirectoryContents p 265 return $ f `elem` dir 265 dir <- tryIO Nothing $ fmap Just $ getDirectoryContents p 266 case dir of 267 Just dir' -> return $ f `elem` dir' 268 _ -> return False 266 269 267 270 doParseWith :: (Env -> FilePath -> IO a) -> FilePath -> String -> IO a
