X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fmain%2FHscTypes.lhs;h=29e440e45be776adfbda5901e714e66e2aea4ae4;hb=bb106f283663e9c16a4c72ec9ca57109ae57a0ed;hp=26d6fab1a85dd8fef035e991b0f18ea44d421b2e;hpb=2a6d497b719b39d7d7d73051f3baa783db343abb;p=ghc-hetmet.git diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index 26d6fab..29e440e 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -82,7 +82,7 @@ import CoreSyn ( CoreBind ) import Id ( Id ) import Type ( TyThing(..) ) -import Class ( Class, classSelIds, classTyCon ) +import Class ( Class, classSelIds, classTyCon, classATs ) import TyCon ( TyCon, tyConSelIds, tyConDataCons, isNewTyCon, newTyConCo ) import DataCon ( dataConImplicitIds ) import PrelNames ( gHC_PRIM ) @@ -633,15 +633,17 @@ implicitTyThings (ATyCon tc) = implicitNewCoTyCon tc ++ -- For classes, add the class TyCon too (and its extras) -- and the class selector Ids implicitTyThings (AClass cl) = map AnId (classSelIds cl) ++ - extras_plus (ATyCon (classTyCon cl)) + extras_plus (ATyCon (classTyCon cl)) ++ + map ATyCon (classATs cl) -- For data cons add the worker and wrapper (if any) implicitTyThings (ADataCon dc) = map AnId (dataConImplicitIds dc) -- For newtypes, add the implicit coercion tycon -implicitNewCoTyCon tc | isNewTyCon tc = [ATyCon (newTyConCo tc)] - | otherwise = [] +implicitNewCoTyCon tc + | isNewTyCon tc, Just co_con <- newTyConCo tc = [ATyCon co_con] + | otherwise = [] extras_plus thing = thing : implicitTyThings thing