diff options
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 4 |
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 |