aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/expl_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 16:28:55 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-31 16:28:55 -0400
commit16d3d1c3a6d1e78faab91076c20b76fdcb90edb9 (patch)
treeef54b557b346fa95b4322478bf5fbec431944f18 /src/expl_util.sml
parentd668886a45158cf3a292fdef3fa81498efd77652 (diff)
Case through explify
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