CurryInfo: property-prover-2.0.0 / Inference.Inference.inferNF

definition:
inferNF
  :: ModuleName -> ProgInfo (TypeDecl, [Constructor]) -> TAFuncDecl -> InfInfo
inferNF modname info f@(AFunc qn@(mname, fname) arity vis ty rule) =
  (qn, canFail, calls, fdecls)
 where
  argtys                  = FCG.argTypes ty

  nftype                  = foldr FuncType boolType argtys

  ty'                     = foldr FuncType boolType
    (replicate arity boolType ++ argtys)

  qn' s = (mname, fname ++ s)

  (canFail, calls, rule') = inferNFRule info arity ty' rule

  expr'                   = isTrivialRule rule'

  callRule                = inferNFCallRule arity nftype ty'
    (qn' "_nonfailspec") rule expr'

  fdecls
    = [ AFunc (qn' "'nonfail") arity vis nftype callRule
      , AFunc (qn' "_nonfailspec") (2 * arity) vis ty' rule'
      ]
demand:
argument 3
deterministic:
deterministic operation
documentation:
--- Infer NFCs for a single function declaration
failfree:
<FAILING>
indeterministic:
referentially transparent operation
infix:
no fixity defined
iotype:
{(_,_,{AFunc}) |-> {(,,,)}}
name:
inferNF
precedence:
no precedence defined
result-values:
{(,,,)}
signature:
String
-> Analysis.ProgInfo.ProgInfo (FlatCurry.Types.TypeDecl, [((String, String), Prelude.Int)])
-> FlatCurry.Annotated.Types.AFuncDecl FlatCurry.Types.TypeExpr
-> ((String, String), Prelude.Bool, [(String, String)], [FlatCurry.Annotated.Types.AFuncDecl FlatCurry.Types.TypeExpr])
solution-complete:
operation might suspend on free variables
terminating:
possibly non-terminating
totally-defined:
possibly non-reducible on same data term