CurryInfo: exact-print-2.0.0 / Curry.Comment.readCommentsFile

definition: Info
 
readCommentsFile :: String -> IO [(Span, Comment)]
readCommentsFile filename = do
  filecontents <- readCommentsFileRaw filename
  if noComments filecontents
    then return []
    else return (readUnqualifiedTerm ["Curry.Span", "Curry.Position", "Curry.Comment"]
                                     filecontents)
 where 
  -- Checks if the `.cycom` file contains no comments (empty list). 
  -- This is true if the file contains nothing but whitespaces, 
  -- newlines, and brackets (string-representation of expression :: `[(Span, Comment)]`).
  --
  -- This check is necessary, unfortunately, because the parser fails for empty lists other 
  -- than "[]".
  noComments = all (`elem` "[ ]\n")
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
| Reads the comments from a specified file
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_) |-> _}
name: Info
 readCommentsFile
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 String -> Prelude.IO [(Curry.Span.Span, Comment)]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term