CurryInfo: abstract-curry-4.0.0 / AbstractCurry.Pretty.ppCurryProg

definition:
ppCurryProg :: Options -> CurryProg -> Doc
ppCurryProg opts cprog@(CurryProg m ms dfltdecl clsdecls instdecls ts fs os) =
  vsepBlank
    [ langExtensions
      , (nest' opts' $ sep [ text "module" <+> ppMName m,
                           ppExports opts' clsdecls instdecls ts fs])
       </> where_
    , ppImports opts' allImports
    , vcatMap (ppCOpDecl opts') os
    , ppCDefaultDecl opts' dfltdecl
    , vsepBlankMap (ppCClassDecl opts') clsdecls
    , vsepBlankMap (ppCInstanceDecl opts') instdecls
    , vsepBlankMap (ppCTypeDecl opts') ts
    , vsepBlankMap (ppCFuncDecl opts') fs ]
 where
  opts' = opts { moduleName = m }
  allModNames = filter (not . null)
                  (union (nub (map fst (typesOfCurryProg cprog)))
                         (nub (map fst (funcsOfCurryProg cprog))))
  allImports = if qualification opts == None
                  then ms
                  else nub (ms ++ allModNames) \\ [m]
  langExtensions = vsep $ langMPTC ++ langFunDeps
  langFunDeps = if any hasFunDeps clsdecls
                   then [text "{-# LANGUAGE FunctionalDependencies #-}"]
                   else []
  langMPTC = if any isMultiParamTypeClass clsdecls
                then [text "{-# LANGUAGE MultiParamTypeClasses #-}"]
                else []
demand:
argument 2
deterministic:
deterministic operation
documentation:
--- Pretty-print a CurryProg (the representation of a program, written in Curry,
--- using AbstractCurry) according to given options.
--- This function will overwrite the module name given by options
--- with the name specified as the first component of `CurryProg`.
--- The list of imported modules is extended to all modules mentioned
--- in the program if qualified pretty printing is used.
--- This is necessary to avoid errors w.r.t. names re-exported by modules.
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,{CurryProg}) |-> _}
name:
ppCurryProg
precedence:
no precedence defined
result-values:
_
signature:
Options -> AbstractCurry.Types.CurryProg -> Text.PrettyImpl.Doc
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term