|
definition: |
nonFailCondsOfModule :: Prog -> [(QName,NonFailCond)]
nonFailCondsOfModule prog = map toNFCond nfconds
where
toNFCond fdecl = (stripNF (funcName fdecl),
(ruleTVars,
trRule (\_ exp -> exp) (const fcTrue) (funcRule fdecl)))
where
ruleTVars = zip (trRule (\args _ -> args) (const []) (funcRule fdecl))
(argTypes (funcType fdecl))
stripNF (mn,fn) = (mn, take (length fn - length nonfailSuffix) fn)
nfconds = filter ((nonfailSuffix `isSuffixOf`) . snd . funcName)
(progFuncs prog)
|
|
demand: |
no demanded arguments |
|
deterministic: |
deterministic operation |
|
documentation: |
Extracts explicit non-fail conditions specified in a module as operations with suffix `'nonfail`. |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_) |-> {:,[]}}
|
|
name: |
nonFailCondsOfModule |
|
precedence: |
no precedence defined |
|
result-values: |
{:,[]}
|
|
signature: |
FlatCurry.Types.Prog -> [((String, String), ([(Prelude.Int, FlatCurry.Types.TypeExpr)], FlatCurry.Types.Expr))] |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
reducible on all ground data terms |