|
definition: |
readParserInfo :: Int -> String -> IO (Either String ParserInfo)
readParserInfo verb filename = do
when (verb > 0) $ putStrLn $
"Reading SQL model info file '" ++ filename ++ "'..."
handle <- openFile filename ReadMode
contents <- hGetContents handle
case reads contents of
[] -> return (Left "ParserInfo file not found or corrupted.")
((a,_):_) -> return (Right a)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Reader for parser information file. @param verb - verbosity level @param filename - path/name of the .info file @return either an error message or the parser information |
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_) |-> _}
|
|
name: |
readParserInfo |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Prelude.Int -> String -> Prelude.IO (Prelude.Either String CPP.ICode.Parser.SQL.ParserInfoType.ParserInfo) |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |