aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/expl_util.sml
diff options
context:
space:
mode:
Diffstat (limited to 'src/expl_util.sml')
-rw-r--r--src/expl_util.sml11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/expl_util.sml b/src/expl_util.sml
index e1a5d30f..685605c3 100644
--- a/src/expl_util.sml
+++ b/src/expl_util.sml
@@ -286,6 +286,17 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} =
S.map2 (mfe ctx e,
fn e' =>
(EWrite e', loc))
+
+ | ECase (e, pes, t) =>
+ S.bind2 (mfe ctx e,
+ fn e' =>
+ S.bind2 (ListUtil.mapfold (fn (p, e) =>
+ S.map2 (mfe ctx e,
+ fn e' => (p, e'))) pes,
+ fn pes' =>
+ S.map2 (mfc ctx t,
+ fn t' =>
+ (ECase (e', pes', t'), loc))))
in
mfe
end