CurryInfo: currydoc-4.0.0 / CurryDoc.Read.readModuleComment

definition: Info
 
readModuleComment :: String -> IO String
readModuleComment filename = openFile filename ReadMode >>= readHeader []
 where
  readHeader cs h = do
    eof <- hIsEOF h
    if eof then hClose h >> return ""
           else do l <- hGetLine h
                   case classifyLine l of
                     ModDef    -> hClose h >> return (unlines (reverse cs))
                     FuncDef _ -> hClose h >> return "" -- no module header
                     DataDef _ -> hClose h >> return "" -- no module header
                     OtherLine -> readHeader cs h
                     Comment c -> readHeader (c:cs) h
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
-----------------------------------------------------------------------
Reads the module comment of a Curry source file.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_) |-> _}
name: Info
 readModuleComment
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 String -> Prelude.IO String
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term