CurryInfo: residuation-analysis-3.0.0 / AnalyzeResiduation.writeResInfoFile

definition: Info
 
writeResInfoFile :: Options -> [(QName,ResiduationInfo)] -> IO ()
writeResInfoFile opts resinfo = do
  let rifile = optOutput opts
  createDirectoryIfMissing True (takeDirectory rifile)
  writeFile rifile (show (map fri2term resinfo) ++ "\n")
  printWhenStatus opts $ "Residuation info written into '" ++ rifile ++ "'"
 where
  fri2term (qn,ri) = (showQName qn,  ri2term ri)
   where
    ri2term MayResiduate       = [0]
    ri2term NoResInfo          = [0]
    ri2term (NoResiduateIf xs) = xs
demand: Info
 no demanded arguments
deterministic: Info
 deterministic operation
documentation: Info
 
Writes a file containing residuation information in Curry term format.
The term is a list of pairs consisting of the qualified function name
together with the list of argument positions which must be ground values
to ensure that the function call does not residuate and yields a
ground value. If the function might always residuate, the argument
position list is [0].
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_) |-> _}
name: Info
 writeResInfoFile
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 ToolOptions.Options
-> [((String, String), Analysis.Residuation.ResiduationInfo)] -> Prelude.IO ()
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term