summaryrefslogtreecommitdiff
path: root/src/reduce.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-30 16:58:54 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-30 16:58:54 -0400
commit0e88aba4fcbcf9587c289a555315ec30a112a2f0 (patch)
tree2b080558e197d010a6a3f570fb9aa138534d991a /src/reduce.sml
parentc6f6a629256d7292ae7c18428656eda4130391bd (diff)
Especialize
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml32
1 files changed, 2 insertions, 30 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index 927c8ff1..8dc4527f 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -37,36 +37,8 @@ structure U = CoreUtil
val liftConInCon = E.liftConInCon
val subConInCon = E.subConInCon
val liftConInExp = E.liftConInExp
-
-val liftExpInExp =
- U.Exp.mapB {kind = fn k => k,
- con = fn _ => fn c => c,
- exp = fn bound => fn e =>
- case e of
- ERel xn =>
- if xn < bound then
- e
- else
- ERel (xn + 1)
- | _ => e,
- bind = fn (bound, U.Exp.RelE _) => bound + 1
- | (bound, _) => bound}
-
-val subExpInExp =
- U.Exp.mapB {kind = fn k => k,
- con = fn _ => fn c => c,
- exp = fn (xn, rep) => fn e =>
- case e of
- ERel xn' =>
- (case Int.compare (xn', xn) of
- EQUAL => #1 rep
- | GREATER=> ERel (xn' - 1)
- | LESS => e)
- | _ => e,
- bind = fn ((xn, rep), U.Exp.RelE _) => (xn+1, liftExpInExp 0 rep)
- | ((xn, rep), U.Exp.RelC _) => (xn, liftConInExp 0 rep)
- | (ctx, _) => ctx}
-
+val liftExpInExp = E.liftExpInExp
+val subExpInExp = E.subExpInExp
val liftConInExp = E.liftConInExp
val subConInExp = E.subConInExp