|
definition: |
reduceAsInTerm :: Term -> Term
reduceAsInTerm (TConst l) = TConst l
reduceAsInTerm (TSVar v) = TSVar v
reduceAsInTerm (Let bs t) = Let (map (\ (v,tm) -> (v, reduceAsInTerm tm)) bs)
(reduceAsInTerm t)
reduceAsInTerm (Forall vs t) = Forall vs (reduceAsInTerm t)
reduceAsInTerm (Exists vs t) = Exists vs (reduceAsInTerm t)
reduceAsInTerm (TComb f ts) = TComb (simpAs f) (map reduceAsInTerm ts)
where
simpAs qid = case qid of As n (SComb s _) | s == "Func" -> Id n
_ -> qid
|
|
demand: |
argument 1 |
|
deterministic: |
deterministic operation |
|
documentation: |
----------------------------------------------------------------------- Remove As-identifiers if they are functions (for better readability): |
|
failfree: |
_ |
|
indeterministic: |
referentially transparent operation |
|
infix: |
no fixity defined |
|
iotype: |
{({TConst}) |-> {TConst} || ({TSVar}) |-> {TSVar} || ({Let}) |-> {Let} || ({Forall}) |-> {Forall} || ({Exists}) |-> {Exists} || ({TComb}) |-> {TComb}}
|
|
name: |
reduceAsInTerm |
|
precedence: |
no precedence defined |
|
result-values: |
{Exists,Forall,Let,TComb,TConst,TSVar}
|
|
signature: |
Term -> Term |
|
solution-complete: |
operation might suspend on free variables |
|
terminating: |
possibly non-terminating |
|
totally-defined: |
reducible on all ground data terms |