X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FbasicTypes%2FDataCon.lhs;h=3de990512874051f580f4c7c54f216eefd284d91;hb=8053aac536c96dabdc06e9f068852f5481474a29;hp=aa8795822d77f0f321e62c69ecfa7ca28708709e;hpb=909d2dd885f5eebaf7c12cf15d5ac153d646566e;p=ghc-hetmet.git diff --git a/compiler/basicTypes/DataCon.lhs b/compiler/basicTypes/DataCon.lhs index aa87958..3de9905 100644 --- a/compiler/basicTypes/DataCon.lhs +++ b/compiler/basicTypes/DataCon.lhs @@ -38,7 +38,8 @@ import Type ( Type, ThetaType, import Coercion ( isEqPred, mkEqPred ) import TyCon ( TyCon, FieldLabel, tyConDataCons, isProductTyCon, isTupleTyCon, isUnboxedTupleTyCon, - isNewTyCon, isRecursiveTyCon, tyConFamInst_maybe ) + isNewTyCon, isClosedNewTyCon, isRecursiveTyCon, + tyConFamInst_maybe ) import Class ( Class, classTyCon ) import Name ( Name, NamedThing(..), nameUnique, mkSysTvName, mkSystemName ) import Var ( TyVar, CoVar, Id, mkTyVar, tyVarKind, setVarUnique, @@ -727,9 +728,10 @@ splitProductType str ty deepSplitProductType_maybe ty = do { (res@(tycon, tycon_args, _, _)) <- splitProductType_maybe ty ; let {result - | isNewTyCon tycon && not (isRecursiveTyCon tycon) + | isClosedNewTyCon tycon && not (isRecursiveTyCon tycon) = deepSplitProductType_maybe (newTyConInstRhs tycon tycon_args) - | isNewTyCon tycon = Nothing -- cannot unbox through recursive newtypes + | isNewTyCon tycon = Nothing -- cannot unbox through recursive + -- newtypes nor through families | otherwise = Just res} ; result }