X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcType.lhs;h=d6dbf1c47de34cbeed78524e906c8085cb8205b1;hb=371d661d6fcdae01b6b4f04b916a842e9fe7fc76;hp=e0e76493ee06f39674de69c00a7c2e9b3603d9e8;hpb=22eefb510ad56379cc96b8d14a440579cd55fc81;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index e0e7649..d6dbf1c 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -1268,8 +1268,9 @@ checkRepTyCon :: (TyCon -> Bool) -> Type -> Bool -- newtype T = MkT (Ptr T) -- and wanted it to work... checkRepTyCon check_tc ty - | Just (tc,_) <- splitTyConApp_maybe (repType ty) = check_tc tc - | otherwise = False + | Just (ty', _) <- splitNewTypeRepCo_maybe ty = checkRepTyCon check_tc ty' + | Just (tc,_) <- splitTyConApp_maybe ty = check_tc tc + | otherwise = False checkRepTyConKey :: [Unique] -> Type -> Bool -- Like checkRepTyCon, but just looks at the TyCon key