aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-09 11:53:52 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-09 11:53:52 -0500
commit23d4ee74243e0d9d630c863e83403d25e926ff88 (patch)
treea7b3f4490705ab9eb503022eec6cd8271270be2e /src/core_util.sml
parentbf14288c4da80f65aa920b001cf8e3070c8b4c3e (diff)
Especialize working reasonably well; need to add new closure representation pass
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index 2352a849..4d72f57e 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -953,6 +953,13 @@ fun mapB {kind, con, exp, decl, bind} ctx ds =
S.Continue (ds, ()) => ds
| S.Return _ => raise Fail "CoreUtil.File.mapB: Impossible"
+fun map {kind, con, exp, decl} ds =
+ mapB {kind = kind,
+ con = fn () => con,
+ exp = fn () => exp,
+ decl = fn () => decl,
+ bind = fn _ => ()} () ds
+
fun fold {kind, con, exp, decl} s d =
case mapfold {kind = fn k => fn s => S.Continue (k, kind (k, s)),
con = fn c => fn s => S.Continue (c, con (c, s)),