definition:
|
mkConsDecl2Xml :: [Option] -> [CPattern] -> CConsDecl -> CRule
mkConsDecl2Xml opts patVars (CCons name _ args) =
simpleRule (newPatVars++[CPComb name (pVars arity)])
(xml opts (tagNameForCons name) []
(map call2xml (zip args [0..])))
where
arity = length args
newPatVars = renameUnused (map renVar $ concatMap tvarsOfType args) patVars
mkConsDecl2Xml _ _ (CRecord _ _ _)
= error "Data2Xml.mkConsDecl2Xml: CRecord not yet implemented!"
|
demand:
|
argument 3
|
deterministic:
|
deterministic operation
|
failfree:
|
(_, _, _)
|
indeterministic:
|
referentially transparent operation
|
infix:
|
no fixity defined
|
iotype:
|
{(_,_,{CCons}) |-> {CRule}}
|
name:
|
mkConsDecl2Xml
|
precedence:
|
no precedence defined
|
result-values:
|
{CRule}
|
signature:
|
[Option] -> [AbstractCurry.Types.CPattern] -> AbstractCurry.Types.CConsDecl
-> AbstractCurry.Types.CRule
|
solution-complete:
|
operation might suspend on free variables
|
terminating:
|
possibly non-terminating
|
totally-defined:
|
possibly non-reducible on same data term
|