summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-13 10:17:06 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-13 10:17:06 -0400
commit3316f3c317e587a5fc2ecf38f061a72b48e3b94e (patch)
treefae8c92c195e5f7976352a337017d285e729f859 /src/core_util.sml
parent7281dbb2fc2a5f50c1049bad629f330e2ff3f7ca (diff)
Remove closure conversion in favor of zany fun with modules, which also replaces 'page'
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index df20ef9a..11d70de9 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -203,7 +203,7 @@ datatype binder =
RelC of string * kind
| NamedC of string * int * kind * con option
| RelE of string * con
- | NamedE of string * int * con * exp option
+ | NamedE of string * int * con * exp option * string
fun mapfoldB {kind = fk, con = fc, exp = fe, bind} =
let
@@ -375,18 +375,13 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
S.map2 (mfc ctx c,
fn c' =>
(DCon (x, n, k', c'), loc)))
- | DVal (x, n, t, e) =>
+ | DVal (x, n, t, e, s) =>
S.bind2 (mfc ctx t,
fn t' =>
S.map2 (mfe ctx e,
fn e' =>
- (DVal (x, n, t', e'), loc)))
- | DPage (c, e) =>
- S.bind2 (mfc ctx c,
- fn c' =>
- S.map2 (mfe ctx e,
- fn e' =>
- (DPage (c', e'), loc)))
+ (DVal (x, n, t', e', s), loc)))
+ | DExport _ => S.return2 dAll
in
mfd
end
@@ -426,8 +421,8 @@ fun mapfoldB (all as {bind, ...}) =
val ctx' =
case #1 d' of
DCon (x, n, k, c) => bind (ctx, NamedC (x, n, k, SOME c))
- | DVal (x, n, t, e) => bind (ctx, NamedE (x, n, t, SOME e))
- | DPage _ => ctx
+ | DVal (x, n, t, e, s) => bind (ctx, NamedE (x, n, t, SOME e, s))
+ | DExport _ => ctx
in
S.map2 (mff ctx' ds',
fn ds' =>