summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2015-07-05 16:11:24 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2015-07-05 16:11:24 -0400
commitffaafd5f0646224e94e0e54a25080a078a1f51c5 (patch)
tree7466fa844a686e8ebded520ec3bb1e5e332a3340 /src/core_util.sml
parent0da7569c8a5bb06dc9dc3a3252be6375a8074a95 (diff)
Add a missed case in CoreUtil.Exp fold
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index d098039a..9ca85c37 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -607,15 +607,19 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} =
| ERel _ => S.return2 eAll
| ENamed _ => S.return2 eAll
| ECon (dk, pc, cs, NONE) =>
- S.map2 (ListUtil.mapfold (mfc ctx) cs,
- fn cs' =>
- (ECon (dk, pc, cs', NONE), loc))
- | ECon (dk, n, cs, SOME e) =>
- S.bind2 (mfe ctx e,
- fn e' =>
+ S.bind2 (mfpc ctx pc,
+ fn pc' =>
S.map2 (ListUtil.mapfold (mfc ctx) cs,
- fn cs' =>
- (ECon (dk, n, cs', SOME e'), loc)))
+ fn cs' =>
+ (ECon (dk, pc', cs', NONE), loc)))
+ | ECon (dk, pc, cs, SOME e) =>
+ S.bind2 (mfpc ctx pc,
+ fn pc' =>
+ S.bind2 (mfe ctx e,
+ fn e' =>
+ S.map2 (ListUtil.mapfold (mfc ctx) cs,
+ fn cs' =>
+ (ECon (dk, pc', cs', SOME e'), loc))))
| EFfi _ => S.return2 eAll
| EFfiApp (m, x, es) =>
S.map2 (ListUtil.mapfold (mfet ctx) es,