|
definition: |
hasCommentOption :: String -> String -> IO Bool
hasCommentOption filename option = do
existsfile <- doesFileExist filename
if existsfile
then do cwords <- readWordsInFirstCommentLine filename
return (option `elem` cwords)
else return False
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
---------------------------------------------------------------------------
Checks whether a file exists and the file starts with a comment of the form
"{- ...-}" and contains the second argument as a word in the comment:
|
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_) |-> _}
|
|
name: |
hasCommentOption |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
String -> 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 |