|
definition: |
findParserInfoFile :: [String] -> IO (Either String String)
findParserInfoFile dirpath = do
let dir = joinPath dirpath
--putStrLn $ "Searching info file in: " ++ dir
dirfiles <- getDirectoryContents dir
case filter ("_SQLCode.info" `isSuffixOf`) dirfiles of
[] -> let uppath = init dirpath
in if null uppath
then return (Left "No .info file provided or found!")
else findParserInfoFile uppath
[m] -> return (Right $ dir </> m)
ms -> return (Left $ "Multiple .info files found in directory '" ++ dir ++
"':\n" ++ unwords ms)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
failfree: |
<FAILING> |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> _}
|
|
name: |
findParserInfoFile |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
[String] -> Prelude.IO (Prelude.Either String String) |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |