summaryrefslogtreecommitdiff
path: root/src/reduce.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 09:36:47 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-11 09:36:47 -0400
commit7bc788c67ed9331773355ceeae4ace7923a6e914 (patch)
tree94beda93e06e4418c5d001aa317365a1d878efdb /src/reduce.sml
parent9e804908dd69043c8a9942cdf6042b8dc0d76175 (diff)
Unpoly non-recursive function
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml29
1 files changed, 2 insertions, 27 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index e8d51da7..89b9b30e 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -65,33 +65,8 @@ val subExpInExp =
bind = fn ((xn, rep), U.Exp.RelE _) => (xn+1, liftExpInExp 0 rep)
| (ctx, _) => ctx}
-val liftConInExp =
- U.Exp.mapB {kind = fn k => k,
- con = fn bound => fn c =>
- case c of
- CRel xn =>
- if xn < bound then
- c
- else
- CRel (xn + 1)
- | _ => c,
- exp = fn _ => fn e => e,
- bind = fn (bound, U.Exp.RelC _) => bound + 1
- | (bound, _) => bound}
-
-val subConInExp =
- U.Exp.mapB {kind = fn k => k,
- con = fn (xn, rep) => fn c =>
- case c of
- CRel xn' =>
- (case Int.compare (xn', xn) of
- EQUAL => #1 rep
- | GREATER => CRel (xn' - 1)
- | LESS => c)
- | _ => c,
- exp = fn _ => fn e => e,
- bind = fn ((xn, rep), U.Exp.RelC _) => (xn+1, liftConInCon 0 rep)
- | (ctx, _) => ctx}
+val liftConInExp = E.liftConInExp
+val subConInExp = E.subConInExp
fun bindC (env, b) =
case b of