aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core_util.sml
diff options
context:
space:
mode:
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)),