summaryrefslogtreecommitdiff
path: root/src/reduce.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
commit3d77d43fda3acfa1d5f1e12c836718d79fdf84db (patch)
treec5073d9b7f368aa38bb4d146c0a6b21900ef1f79 /src/reduce.sml
parentd889f05df404ac119cf864854e6fdfb4b5636472 (diff)
Mutual datatypes through Effectize
Diffstat (limited to 'src/reduce.sml')
-rw-r--r--src/reduce.sml15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/reduce.sml b/src/reduce.sml
index 665c10b4..9460d3fe 100644
--- a/src/reduce.sml
+++ b/src/reduce.sml
@@ -442,13 +442,14 @@ fun reduce file =
((DCon (x, n, k, c), loc),
(IM.insert (namedC, n, c), namedE))
end
- | DDatatype (x, n, ps, cs) =>
- let
- val env = map (fn _ => UnknownC) ps
- in
- ((DDatatype (x, n, ps, map (fn (x, n, co) => (x, n, Option.map (con namedC env) co)) cs), loc),
- st)
- end
+ | DDatatype dts =>
+ ((DDatatype (map (fn (x, n, ps, cs) =>
+ let
+ val env = map (fn _ => UnknownC) ps
+ in
+ (x, n, ps, map (fn (x, n, co) => (x, n, Option.map (con namedC env) co)) cs)
+ end) dts), loc),
+ st)
| DVal (x, n, t, e, s) =>
let
val t = con namedC [] t