summaryrefslogtreecommitdiff
path: root/src/unnest.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-02-22 16:10:25 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-02-22 16:10:25 -0500
commit85cf99a95c910841f197ca911bb13d044456de7f (patch)
tree7f9fc4189681a0186e8ecbfcc84a0eec50d03be9 /src/unnest.sml
parentc60437564b5265a6f0735bd402abead87782d36a (diff)
Start of kind polymorphism, up to the point where demo/hello elaborates with updated Basis/Top
Diffstat (limited to 'src/unnest.sml')
-rw-r--r--src/unnest.sml18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/unnest.sml b/src/unnest.sml
index 8e363301..1d0c2388 100644
--- a/src/unnest.sml
+++ b/src/unnest.sml
@@ -37,7 +37,7 @@ structure U = ElabUtil
structure IS = IntBinarySet
fun liftExpInExp by =
- U.Exp.mapB {kind = fn k => k,
+ U.Exp.mapB {kind = fn _ => fn k => k,
con = fn _ => fn c => c,
exp = fn bound => fn e =>
case e of
@@ -51,7 +51,7 @@ fun liftExpInExp by =
| (bound, _) => bound}
val subExpInExp =
- U.Exp.mapB {kind = fn k => k,
+ U.Exp.mapB {kind = fn _ => fn k => k,
con = fn _ => fn c => c,
exp = fn (xn, rep) => fn e =>
case e of
@@ -65,7 +65,7 @@ val subExpInExp =
| ((xn, rep), U.Exp.RelC _) => (xn, E.liftConInExp 0 rep)
| (ctx, _) => ctx}
-val fvsCon = U.Con.foldB {kind = fn (_, st) => st,
+val fvsCon = U.Con.foldB {kind = fn (_, _, st) => st,
con = fn (cb, c, cvs) =>
case c of
CRel n =>
@@ -76,11 +76,11 @@ val fvsCon = U.Con.foldB {kind = fn (_, st) => st,
| _ => cvs,
bind = fn (cb, b) =>
case b of
- U.Con.Rel _ => cb + 1
+ U.Con.RelC _ => cb + 1
| _ => cb}
0 IS.empty
-fun fvsExp nr = U.Exp.foldB {kind = fn (_, st) => st,
+fun fvsExp nr = U.Exp.foldB {kind = fn (_, _, st) => st,
con = fn ((cb, eb), c, st as (cvs, evs)) =>
case c of
CRel n =>
@@ -124,7 +124,7 @@ fun positionOf (x : int) ls =
end
fun squishCon cfv =
- U.Con.mapB {kind = fn k => k,
+ U.Con.mapB {kind = fn _ => fn k => k,
con = fn cb => fn c =>
case c of
CRel n =>
@@ -135,12 +135,12 @@ fun squishCon cfv =
| _ => c,
bind = fn (cb, b) =>
case b of
- U.Con.Rel _ => cb + 1
+ U.Con.RelC _ => cb + 1
| _ => cb}
0
fun squishExp (nr, cfv, efv) =
- U.Exp.mapB {kind = fn k => k,
+ U.Exp.mapB {kind = fn _ => fn k => k,
con = fn (cb, eb) => fn c =>
case c of
CRel n =>
@@ -169,7 +169,7 @@ type state = {
decls : (string * int * con * exp) list
}
-fun kind (k, st) = (k, st)
+fun kind (_, k, st) = (k, st)
fun exp ((ks, ts), e as old, st : state) =
case e of