FIX #1715: egregious bug in ifaceDeclSubBndrs
authorsimonpj@microsoft.com <unknown>
Tue, 20 Nov 2007 11:17:23 +0000 (11:17 +0000)
committersimonpj@microsoft.com <unknown>
Tue, 20 Nov 2007 11:17:23 +0000 (11:17 +0000)
ifaceDeclSubBndrs didn't have an IfaceSyn case; but with type
families an IfaceSyn can introduce subordinate binders.  Result:
chaos.

The fix is easy though.  Merge to 6.8 branch.

compiler/iface/IfaceSyn.lhs

index 44ce235..cee586f 100644 (file)
@@ -412,7 +412,11 @@ ifaceDeclSubBndrs (IfaceClass {ifCtxt = sc_ctxt, ifName = cls_occ,
     dcww_occ = mkDataConWorkerOcc dc_occ
     is_newtype = n_sigs + n_ctxt == 1                  -- Sigh 
 
-ifaceDeclSubBndrs _other = []
+ifaceDeclSubBndrs (IfaceSyn {ifName = tc_occ,
+                            ifFamInst = famInst})
+  = famInstCo famInst tc_occ
+
+ifaceDeclSubBndrs _ = []
 
 -- coercion for data/newtype family instances
 famInstCo Nothing  baseOcc = []