diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-02-22 17:17:01 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-02-22 17:17:01 -0500 |
commit | 093d8971815cc1efbc56536454244d103e60e54c (patch) | |
tree | fff01431ea7434be021ffd12b86d70292496434c /src/especialize.sml | |
parent | 599ee979c91bdba340716830df58488857d49bad (diff) |
demo/hello compiles with kind polymorphism
Diffstat (limited to 'src/especialize.sml')
-rw-r--r-- | src/especialize.sml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/especialize.sml b/src/especialize.sml index 7abc0582..6486842b 100644 --- a/src/especialize.sml +++ b/src/especialize.sml @@ -43,7 +43,7 @@ structure KM = BinaryMapFn(K) structure IM = IntBinaryMap structure IS = IntBinarySet -val freeVars = U.Exp.foldB {kind = fn (_, xs) => xs, +val freeVars = U.Exp.foldB {kind = fn (_, _, xs) => xs, con = fn (_, _, xs) => xs, exp = fn (bound, e, xs) => case e of @@ -80,7 +80,7 @@ fun positionOf (v : int, ls) = end fun squish fvs = - 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 @@ -110,7 +110,6 @@ type state = { decls : (string * int * con * exp * string) list } -fun id x = x fun default (_, x, st) = (x, st) fun specialize' file = @@ -281,9 +280,9 @@ fun specialize' file = end end - and specExp env = U.Exp.foldMapB {kind = id, con = default, exp = exp, bind = bind} env + and specExp env = U.Exp.foldMapB {kind = default, con = default, exp = exp, bind = bind} env - val specDecl = U.Decl.foldMapB {kind = id, con = default, exp = exp, decl = default, bind = bind} + val specDecl = U.Decl.foldMapB {kind = default, con = default, exp = exp, decl = default, bind = bind} fun doDecl (d, (st : state, changed)) = let |