summaryrefslogtreecommitdiff
path: root/src/marshalcheck.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:45:12 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:45:12 -0400
commit41f7bb23ff2a9598f8f3bff1487f39f9e91f9f05 (patch)
treec5073d9b7f368aa38bb4d146c0a6b21900ef1f79 /src/marshalcheck.sml
parent6cb3888614811abc30c6a00a1644e256d1d1c780 (diff)
Mutual datatypes through Effectize
Diffstat (limited to 'src/marshalcheck.sml')
-rw-r--r--src/marshalcheck.sml13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/marshalcheck.sml b/src/marshalcheck.sml
index 3dbf93fc..10129aef 100644
--- a/src/marshalcheck.sml
+++ b/src/marshalcheck.sml
@@ -75,12 +75,13 @@ fun check file =
ignore (foldl (fn ((d, _), (cmap, emap)) =>
case d of
DCon (_, n, _, c) => (IM.insert (cmap, n, sins cmap c), emap)
- | DDatatype (_, n, _, xncs) =>
- (IM.insert (cmap, n, foldl (fn ((_, _, co), s) =>
- case co of
- NONE => s
- | SOME c => PS.union (s, sins cmap c))
- PS.empty xncs),
+ | DDatatype dts =>
+ (foldl (fn ((_, n, _, xncs), cmap) =>
+ IM.insert (cmap, n, foldl (fn ((_, _, co), s) =>
+ case co of
+ NONE => s
+ | SOME c => PS.union (s, sins cmap c))
+ PS.empty xncs)) cmap dts,
emap)
| DVal (_, n, t, _, tag) => (cmap, IM.insert (emap, n, (t, tag)))