X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FMkIface.lhs;h=8213cb1a8061886858de9e7825315e47eb000470;hb=e04f49034968322349e0f3f608e1b5a856fd6521;hp=e3193bd39b8f852025eaefb786945084a9c58c6f;hpb=e5f78a4a5309b598d5195aa49a0bf7a206942cea;p=ghc-hetmet.git diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index e3193bd..8213cb1 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -195,6 +195,8 @@ import TcRnMonad import HscTypes import DynFlags +import VarEnv +import Var import Name import NameEnv import NameSet @@ -337,7 +339,19 @@ mkIface hsc_env maybe_old_iface deliberatelyOmitted x = panic ("Deliberately omitted: " ++ x) ifFamInstTcName = ifaceTyConName . ifFamInstTyCon - flattenVectInfo (VectInfo ccVar) = IfaceVectInfo (nameSetToList ccVar) + flattenVectInfo (VectInfo { vectInfoCCVar = ccVar + , vectInfoCCTyCon = ccTyCon + }) = + IfaceVectInfo { + ifaceVectInfoCCVar = [ Var.varName v + | (v, _) <- varEnvElts ccVar], + ifaceVectInfoCCTyCon = [ tyConName t + | (t, t_CC) <- nameEnvElts ccTyCon + , t /= t_CC], + ifaceVectInfoCCTyConReuse = [ tyConName t + | (t, t_CC) <- nameEnvElts ccTyCon + , t == t_CC] + } ----------------------------- writeIfaceFile :: DynFlags -> ModLocation -> ModIface -> IO () @@ -1067,10 +1081,12 @@ tyThingToIfaceDecl (AClass clas) tyThingToIfaceDecl (ATyCon tycon) | isSynTyCon tycon - = IfaceSyn { ifName = getOccName tycon, - ifTyVars = toIfaceTvBndrs tyvars, + = IfaceSyn { ifName = getOccName tycon, + ifTyVars = toIfaceTvBndrs tyvars, ifOpenSyn = syn_isOpen, - ifSynRhs = toIfaceType syn_tyki } + ifSynRhs = toIfaceType syn_tyki, + ifFamInst = famInstToIface (tyConFamInst_maybe tycon) + } | isAlgTyCon tycon = IfaceData { ifName = getOccName tycon, @@ -1097,8 +1113,7 @@ tyThingToIfaceDecl (ATyCon tycon) IfNewTyCon (ifaceConDecl con) ifaceConDecls (DataTyCon { data_cons = cons }) = IfDataTyCon (map ifaceConDecl cons) - ifaceConDecls OpenTyCon { otIsNewtype = False } = IfOpenDataTyCon - ifaceConDecls OpenTyCon { otIsNewtype = True } = IfOpenNewTyCon + ifaceConDecls OpenTyCon {} = IfOpenDataTyCon ifaceConDecls AbstractTyCon = IfAbstractTyCon -- The last case happens when a TyCon has been trimmed during tidying -- Furthermore, tyThingToIfaceDecl is also used @@ -1344,6 +1359,8 @@ toIfaceVar v | Just fcall <- isFCallId_maybe v = IfaceFCall fcall (toIfaceType (idType v)) -- Foreign calls have special syntax | isExternalName name = IfaceExt name + | Just (TickBox m ix) <- isTickBoxOp_maybe v + = IfaceTick m ix | otherwise = IfaceLcl (getFS name) where name = idName v