X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FLoadIface.lhs;h=3faf00c1e26ff8ad4e8e28420aa016cc78b99ef1;hb=f94350a049d2a1c2b2f1aa25c62dfe20a541c049;hp=c7dac7947ddbec3beea31685912ebbe0764de6dc;hpb=0cdea5271a2af81858aefd73b1d07ba06378b395;p=ghc-hetmet.git diff --git a/compiler/iface/LoadIface.lhs b/compiler/iface/LoadIface.lhs index c7dac79..3faf00c 100644 --- a/compiler/iface/LoadIface.lhs +++ b/compiler/iface/LoadIface.lhs @@ -338,7 +338,8 @@ ifaceDeclSubBndrs :: IfaceDecl -> [OccName] ifaceDeclSubBndrs IfaceClass { ifCtxt = sc_ctxt, ifName = cls_occ, ifSigs = sigs } - = [tc_occ, dc_occ, dcww_occ] ++ + = co_occs ++ + [tc_occ, dc_occ, dcww_occ] ++ [op | IfaceClassOp op _ _ <- sigs] ++ [mkSuperDictSelOcc n cls_occ | n <- [1..n_ctxt]] where @@ -346,6 +347,8 @@ ifaceDeclSubBndrs IfaceClass { ifCtxt = sc_ctxt, n_sigs = length sigs tc_occ = mkClassTyConOcc cls_occ dc_occ = mkClassDataConOcc cls_occ + co_occs | is_newtype = [mkNewTyCoOcc tc_occ] + | otherwise = [] dcww_occ | is_newtype = mkDataConWrapperOcc dc_occ -- Newtypes have wrapper but no worker | otherwise = mkDataConWorkerOcc dc_occ -- Otherwise worker but no wrapper is_newtype = n_sigs + n_ctxt == 1 -- Sigh