CurryInfo: contract-prover-4.0.0 / Curry2SMT.constructorTest

definition: Info
 
constructorTest :: Bool -> QName -> Term -> TypeExpr -> Term
constructorTest withpoly qn be vartype
  | qn == pre "[]"
  = tEqu be (sortedConst "nil"
               ((if withpoly then polytype2psort else polytype2sort) vartype))
  | qn `elem` map pre ["[]","True","False","LT","EQ","GT","Nothing"]
  = tEqu be (tComb (transOpName qn) [])
  | qn `elem` map pre ["Just","Left","Right"]
  = tComb ("is-" ++ snd qn) [be]
  | otherwise
  = tComb ("is-" ++ transOpName qn) [be]
demand: Info
 argument 2
deterministic: Info
 deterministic operation
documentation: Info
 
Translates a constructor name and a term into an SMT formula
implementing a test on the term for this constructor.
If the first argument is true, parametric sorts are used
(i.e., we translate a polymorphic function), otherwise
type variables are translated into the sort `TVar`.
failfree: Info
 (_, _, _, _)
indeterministic: Info
 referentially transparent operation
infix: Info
 no fixity defined
iotype: Info
 {(_,_,_,_) |-> {TComb}}
name: Info
 constructorTest
precedence: Info
 no precedence defined
result-values: Info
 {TComb}
signature: Info
 Prelude.Bool -> (String, String) -> ESMT.Term -> FlatCurry.Types.TypeExpr
-> ESMT.Term
solution-complete: Info
 operation might suspend on free variables
terminating: Info
 possibly non-terminating
totally-defined: Info
 possibly non-reducible on same data term