|
definition: |
fileInPath :: String -> IO Bool fileInPath file = do path <- getEnv "PATH" dirs <- return $ splitOn ":" path (fmap (any id)) $ mapM (doesFileExist . (</> file)) dirs |
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Checks whether a file exists in one of the directories on the PATH. |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
fileInPath |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> Prelude.IO Prelude.Bool |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |