X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=a53c9ed2fc9801b054a0bb645da5ef689c6a08ff;hp=a3828082e387d9bbdb048c678dfd0d792101d37d;hb=e8a591c1a3dbdeccec2dd2aacccd7435004b0d51;hpb=202ac08f3e2afde0620e889cc81a95b2fd0ad9e1 diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index a382808..a53c9ed 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -169,7 +169,8 @@ import Type ( -- Re-exports pprType, pprParendType, pprTyThingCategory, pprPred, pprTheta, pprThetaArrow, pprClassPred ) -import TyCon ( TyCon, isUnLiftedTyCon, isSynTyCon, synTyConDefn, tyConUnique ) +import TyCon ( TyCon, isUnLiftedTyCon, isSynTyCon, isOpenTyCon, + synTyConDefn, tyConUnique ) import DataCon ( DataCon, dataConStupidTheta, dataConResTys ) import Class ( Class ) import Var ( TyVar, Id, isCoVar, isTcTyVar, mkTcTyVar, tyVarName, tyVarKind, tcTyVarDetails ) @@ -591,8 +592,9 @@ isTauTy other = False isTauTyCon :: TyCon -> Bool -- Returns False for type synonyms whose expansion is a polytype -isTauTyCon tc | isSynTyCon tc = isTauTy (snd (synTyConDefn tc)) - | otherwise = True +isTauTyCon tc + | isSynTyCon tc && not (isOpenTyCon tc) = isTauTy (snd (synTyConDefn tc)) + | otherwise = True --------------- isBoxyTy :: TcType -> Bool