summaryrefslogtreecommitdiff
path: root/src/jscomp.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:55:15 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-16 15:55:15 -0400
commit30b78a96ae699fa2282c07a2dbf3e6303f99e32c (patch)
tree42c21054472ff028fbeaba0f8af6534d23662ad0 /src/jscomp.sml
parent41f7bb23ff2a9598f8f3bff1487f39f9e91f9f05 (diff)
Mutual datatypes through Pathcheck
Diffstat (limited to 'src/jscomp.sml')
-rw-r--r--src/jscomp.sml15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml
index e0954ba0..20408cba 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -176,13 +176,14 @@ fun process file =
| ((DValRec vis, _), (someTs, nameds)) =>
(someTs, foldl (fn ((_, n, _, e, _), nameds) => IM.insert (nameds, n, e))
nameds vis)
- | ((DDatatype (_, _, cs), _), state as (someTs, nameds)) =>
- if ElabUtil.classifyDatatype cs = Option then
- (foldl (fn ((_, n, SOME t), someTs) => IM.insert (someTs, n, t)
- | (_, someTs) => someTs) someTs cs,
- nameds)
- else
- state
+ | ((DDatatype dts, _), state as (someTs, nameds)) =>
+ (foldl (fn ((_, _, cs), someTs) =>
+ if ElabUtil.classifyDatatype cs = Option then
+ foldl (fn ((_, n, SOME t), someTs) => IM.insert (someTs, n, t)
+ | (_, someTs) => someTs) someTs cs
+ else
+ someTs) someTs dts,
+ nameds)
| (_, state) => state)
(IM.empty, IM.empty) file