|
definition: |
cons2SMT :: Bool -> Bool -> QName -> TypeExpr -> QIdent
cons2SMT withas withpoly qf rtype =
if withas && not (isBaseType rtype)
then As (transOpName qf)
((if withpoly then polytype2psort else polytype2sort) rtype)
else Id (transOpName qf)
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
Translates a qualifed name with given result type into an SMT identifier. If the first argument is true and the result type is not a base type, the type is attached via `(as ...)` to resolve overloading problems in SMT. If the second argument is true, parametric sorts are used (i.e., we translate a polymorphic function), otherwise type variables are translated into the sort `TVar`. |
|
failfree: |
(_, _, _, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,_,_,_) |-> {As,Id}}
|
|
name: |
cons2SMT |
|
precedence: |
no precedence defined |
|
result-values: |
{As,Id}
|
|
signature: |
Prelude.Bool -> Prelude.Bool -> (String, String) -> FlatCurry.Types.TypeExpr -> ESMT.QIdent |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |