summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 13:24:54 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 13:24:54 -0400
commitac6a32c651d76d10650fffb99f77f05c583ff0cf (patch)
treee9764619179aa37aef1cdfa46612020e176c1a1d /src/core_util.sml
parenta23f12953a60c8f8d663266a9644a08a905b7b36 (diff)
Simple listShop working
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index 76f1b2c0..49182c09 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -785,7 +785,9 @@ fun foldMap {kind, con, exp, decl} s d =
val maxName = foldl (fn ((d, _) : decl, count) =>
case d of
DCon (_, n, _, _) => Int.max (n, count)
- | DDatatype (_, n, _, _) => Int.max (n, count)
+ | DDatatype (_, n, _, ns) =>
+ foldl (fn ((_, n', _), m) => Int.max (n', m))
+ (Int.max (n, count)) ns
| DVal (_, n, _, _, _) => Int.max (n, count)
| DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis
| DExport _ => count