CurryInfo: contract-prover-4.0.0 / ContractProver.addPreConditionCheck

definition: Info
 
addPreConditionCheck :: TypeExpr -> CombType -> QName -> TypeExpr -> [TAExpr]
                     -> TAExpr
addPreConditionCheck ty ct qf@(mn,fn) tys args =
  AComb ty FuncCall
    ((mn, maybe "checkPreCondNoShow" (const "checkPreCond") showdicttt),
     showDictTypeOf tt ~> ty ~> boolType ~> stringType ~> tt ~> ty)
    -- add Show dictionary argument of type tt, if possible:
    (maybe [] (:[]) showdicttt ++
    [ AComb ty ct (toNoCheckQName qf,tys) args
    , AComb boolType ct (toPreCondQName qf, pctype) args
    , string2TAFCY fn
    , tupleExpr args
    ])
 where
  argtypes   = map annExpr args
  tt         = tupleType argtypes
  pctype     = foldr FuncType boolType argtypes
  showdicttt = showDictOf tt
demand: Info
 argument 3
deterministic: Info
 deterministic operation
documentation: Info
 
------------------------------------------------------------------------
Adds a precondition check to a original call of the form
`AComb ty ct (qf,tys) args`.
failfree: Info
 <FAILING>
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,{(,)},_,_) |-> {AComb}}
name: Info
 addPreConditionCheck
precedence: Info
 no precedence defined
result-values: Info
 {AComb}
signature: Info
 FlatCurry.Types.TypeExpr -> FlatCurry.Types.CombType -> (String, String)
-> FlatCurry.Types.TypeExpr
-> [FlatCurry.Annotated.Types.AExpr FlatCurry.Types.TypeExpr]
-> FlatCurry.Annotated.Types.AExpr FlatCurry.Types.TypeExpr
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term