From 41f7bb23ff2a9598f8f3bff1487f39f9e91f9f05 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 16 May 2009 15:45:12 -0400 Subject: Mutual datatypes through Effectize --- src/marshalcheck.sml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/marshalcheck.sml') 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))) -- cgit v1.2.3