From 2b3bec54a0307652646f5ad9deff619b82cb5a91 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sat, 8 Oct 2011 14:16:13 -0400 Subject: Fix wildification for signatures with synonyms --- src/elaborate.sml | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/elaborate.sml b/src/elaborate.sml index b096813a..4d6d4658 100644 --- a/src/elaborate.sml +++ b/src/elaborate.sml @@ -1772,7 +1772,7 @@ fun findHead e e' = 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 @@ and wildifyStr env (str, sgn) = 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 @@ and wildifyStr env (str, sgn) = 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 @@ and wildifyStr env (str, sgn) = | 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' -- cgit v1.2.3