Changeset 8878 for src/Pugs/Embed
- Timestamp:
- 01/31/06 09:03:58 (3 years ago)
- Files:
-
- 1 modified
-
src/Pugs/Embed/Parrot.hsc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Embed/Parrot.hsc
r8848 r8878 17 17 findExecutable' :: String -> IO (Maybe FilePath) 18 18 findExecutable' cmd = do 19 rv <- findExecutable cmd20 if isJust rv then return rv else do21 cwd <- getCurrentDirectory22 rv <- findExecutableInDirectory cwd cmd23 if isJust rv then return rv else do24 19 dir <- getEnv "PARROT_PATH" 25 if isNothing dir then return Nothing else do 26 rv <- findExecutableInDirectory (fromJust dir) cmd 27 if isJust rv then return rv else do 28 return Nothing 20 if isJust dir then (do 21 rv <- findExecutableInDirectory (fromJust dir) cmd 22 if isJust rv then return rv else findExecutable'') else do 23 findExecutable'' 24 where 25 findExecutable'' = do 26 rv <- findExecutable cmd 27 if isJust rv then return rv else do 28 cwd <- getCurrentDirectory 29 rv <- findExecutableInDirectory cwd cmd 30 if isJust rv then return rv else do 31 return Nothing 29 32 30 33 findExecutableInDirectory :: FilePath -> FilePath -> IO (Maybe FilePath)
