diff options
author | 2009-06-13 14:29:36 -0400 | |
---|---|---|
committer | 2009-06-13 14:29:36 -0400 | |
commit | afe50be2ed547e0b8d83200bbec77b6037334678 (patch) | |
tree | 1f400f83f20ef1f54d68e1e7b674a08f29abb4d4 /src/specialize.sml | |
parent | f6cfaea8a7eb777dae12337178c3b9a268459995 (diff) |
<dyn> inside <table>; fix Specialize bug with datatype decls generating other mutually-recursive datatype decls
Diffstat (limited to 'src/specialize.sml')
-rw-r--r-- | src/specialize.sml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/specialize.sml b/src/specialize.sml index b740ec8c..43c634c7 100644 --- a/src/specialize.sml +++ b/src/specialize.sml @@ -246,15 +246,12 @@ fun specialize file = let (*val () = Print.preface ("decl:", CorePrint.p_decl CoreEnv.empty all)*) val (d, st) = specDecl st d - - val ds = - case #decls st of - [] => [] - | dts => [(DDatatype dts, #2 d)] in case #1 d of DDatatype dts => - (rev (d :: ds), + ((case #decls st of + [] => [d] + | dts' => [(DDatatype (dts' @ dts), #2 d)]), {count = #count st, datatypes = foldl (fn ((x, n, xs, xnts), dts) => IM.insert (dts, n, @@ -270,7 +267,9 @@ fun specialize file = (#constructors st) dts, decls = []}) | _ => - (rev (d :: ds), + (case #decls st of + [] => [d] + | dts => [(DDatatype dts, #2 d), d], {count = #count st, datatypes = #datatypes st, constructors = #constructors st, @@ -286,5 +285,4 @@ fun specialize file = ds end - end |