# HG changeset patch # User Adam Chlipala # Date 1318097773 14400 # Node ID c7d0328ba777d9461f7cddf0e5b4384b4007bb10 # Parent 81d007609b1a78edebc53c8ecdde83f6d90d98ec Fix wildification for signatures with synonyms diff -r 81d007609b1a -r c7d0328ba777 src/elaborate.sml --- a/src/elaborate.sml Thu Oct 06 10:12:20 2011 -0400 +++ b/src/elaborate.sml Sat Oct 08 14:16:13 2011 -0400 @@ -1772,7 +1772,7 @@ findHead e end -datatype needed = Needed of {Cons : (L'.kind * L'.con option) SM.map, +datatype needed = Needed of {Cons : L'.kind SM.map, Constraints : (E.env * (L'.con * L'.con) * ErrorMsg.span) list, Vals : SS.set, Mods : (E.env * needed) SM.map} @@ -3435,8 +3435,8 @@ fun buildNeeded env sgis = #1 (foldl (fn ((sgi, loc), (nd, env')) => (case sgi of - L'.SgiCon (x, _, k, c) => naddCon (nd, x, (k, SOME c)) - | L'.SgiConAbs (x, _, k) => naddCon (nd, x, (k, NONE)) + L'.SgiCon (x, _, k, _) => naddCon (nd, x, k) + | L'.SgiConAbs (x, _, k) => naddCon (nd, x, k) | L'.SgiConstraint cs => naddConstraint (nd, (env', cs, loc)) | L'.SgiVal (x, _, t) => let @@ -3513,7 +3513,7 @@ case SM.listItemsi (ncons nd) of [] => ds' | xs => - map (fn (x, (k, co)) => + map (fn (x, k) => let val k = case decompileKind k of @@ -3521,15 +3521,8 @@ | SOME k => k val cwild = (L.CWild k, #2 str) - val c = - case co of - NONE => cwild - | SOME c => - case decompileCon env c of - NONE => cwild - | SOME c' => c' in - (L.DCon (x, NONE, c), #2 str) + (L.DCon (x, NONE, cwild), #2 str) end) xs @ ds' val ds = ds @ ds'