|
definition: |
substTerm :: TPSubst -> Term -> Term
substTerm sub term = case term of
TConst _ -> term
TSVar _ -> term
TComb f args -> TComb (substQId sub f) (map (substTerm sub) args)
Forall svs arg -> Forall (map (substSV sub) svs) (substTerm sub arg)
Exists svs arg -> Exists (map (substSV sub) svs) (substTerm sub arg)
Let bs e -> Let (map (\ (v,s) -> (v, substTerm sub s)) bs)
(substTerm sub e)
Match e ps -> Match (substTerm sub e)
(map (\(v,s) -> (v, substTerm sub s)) ps)
|
|
demand: |
argument 2 |
|
deterministic: |
deterministic operation |
|
documentation: |
Applies a sort substitution to a term. |
|
failfree: |
(_, _) |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{(_,{TConst}) |-> {TConst} || (_,{TSVar}) |-> {TSVar} || (_,{TComb}) |-> {TComb} || (_,{Forall}) |-> {Forall} || (_,{Exists}) |-> {Exists} || (_,{Let}) |-> {Let} || (_,{Match}) |-> {Match}}
|
|
name: |
substTerm |
|
precedence: |
no precedence defined |
|
result-values: |
_ |
|
signature: |
Data.Map.Map String Sort -> Term -> Term |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
possibly non-reducible on same data term |