CurryInfo: icurry-3.2.0 / FlatCurry.CaseCompletion.dataDeclsOf

definition: Info
 
dataDeclsOf :: Prog -> [DataDecl]
dataDeclsOf (Prog _ _ tdecls _ _) = concatMap dataDeclsOfTypeDecl tdecls
 where
  dataDeclsOfTypeDecl (TypeSyn _  _ _ _               ) = []
  dataDeclsOfTypeDecl (TypeNew tn _ _ (NewCons cn _ _)) =
    [(tn, [(cn,1)])] -- should not be relevant since newtypes are eliminated
  dataDeclsOfTypeDecl (Type    tn _ _ cdecl           ) =
    [(tn, map (\ (Cons cn ar _ _) -> (cn,ar)) cdecl)]
demand: Info
 argument 1
deterministic: Info
 deterministic operation
documentation: Info
 
---------------------------------------------------------------------------
Get all data types (pairs of type name and list of constructor names
and arities) in a given FlatCurry program.
failfree: Info
 _
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {({Prog}) |-> _}
name: Info
 dataDeclsOf
precedence: Info
 no precedence defined
result-values: Info
 _
signature: Info
 FlatCurry.Types.Prog -> [((String, String), [((String, String), Prelude.Int)])]
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 yes
totally-defined: Info
 reducible on all ground data terms