X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fiface%2FMkIface.lhs;h=d39996775e08567aa3b5642427ddeb610f94355b;hb=909d2dd885f5eebaf7c12cf15d5ac153d646566e;hp=4cb2b531c80cc88c959cb2c893b420fe2f2640ef;hpb=275dde6de685153db621b11f2f404aa78d9183e2;p=ghc-hetmet.git diff --git a/compiler/iface/MkIface.lhs b/compiler/iface/MkIface.lhs index 4cb2b53..d399967 100644 --- a/compiler/iface/MkIface.lhs +++ b/compiler/iface/MkIface.lhs @@ -191,11 +191,11 @@ import TyCon ( TyCon, AlgTyConRhs(..), SynTyConRhs(..), isTupleTyCon, tupleTyConBoxity, tyConStupidTheta, tyConHasGenerics, synTyConRhs, isGadtSyntaxTyCon, tyConArity, tyConTyVars, algTyConRhs, tyConExtName, - tyConFamily_maybe ) + tyConFamInst_maybe ) import DataCon ( dataConName, dataConFieldLabels, dataConStrictMarks, dataConTyCon, dataConIsInfix, dataConUnivTyVars, dataConExTyVars, dataConEqSpec, dataConTheta, - dataConOrigArgTys, dataConInstTys ) + dataConOrigArgTys ) import Type ( TyThing(..), splitForAllTys, funResultTy ) import TcType ( deNoteType ) import TysPrim ( alphaTyVars ) @@ -1036,7 +1036,7 @@ tyThingToIfaceDecl ext (ATyCon tycon) ifRec = boolToRecFlag (isRecursiveTyCon tycon), ifGadtSyntax = isGadtSyntaxTyCon tycon, ifGeneric = tyConHasGenerics tycon, - ifFamily = fmap (toIfaceTyCon ext) $ tyConFamily_maybe tycon } + ifFamInst = famInstToIface $ tyConFamInst_maybe tycon } | isForeignTyCon tycon = IfaceForeign { ifName = getOccName tycon, @@ -1051,7 +1051,7 @@ tyThingToIfaceDecl ext (ATyCon tycon) ifGadtSyntax = False, ifGeneric = False, ifRec = NonRecursive, - ifFamily = Nothing } + ifFamInst = Nothing } | otherwise = pprPanic "toIfaceDecl" (ppr tycon) where @@ -1083,12 +1083,14 @@ tyThingToIfaceDecl ext (ATyCon tycon) (dataConOrigArgTys data_con), ifConFields = map getOccName (dataConFieldLabels data_con), - ifConStricts = dataConStrictMarks data_con, - ifConInstTys = fmap (map (toIfaceType ext)) - (dataConInstTys data_con) } + ifConStricts = dataConStrictMarks data_con } to_eq_spec spec = [(getOccName tv, toIfaceType ext ty) | (tv,ty) <- spec] + famInstToIface Nothing = Nothing + famInstToIface (Just (famTyCon, instTys)) = + Just (toIfaceTyCon ext famTyCon, map (toIfaceType ext) instTys) + tyThingToIfaceDecl ext (ADataCon dc) = pprPanic "toIfaceDecl" (ppr dc) -- Should be trimmed out earlier