X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=inline;f=ghc%2Fcompiler%2Ftypes%2FType.lhs;fp=ghc%2Fcompiler%2Ftypes%2FType.lhs;h=a9d8e28283693a901bff517b95fc17eac6aa5c8b;hb=e72b2ad40adbd9afa8c68af8429150b6b5e485a1;hp=5a4fbb0a0893c41a17f11971e7c92d98c66b1efa;hpb=e5b39b0cac9aecde8a58f2c65425e8bc6db385ac;p=ghc-hetmet.git diff --git a/ghc/compiler/types/Type.lhs b/ghc/compiler/types/Type.lhs index 5a4fbb0..a9d8e28 100644 --- a/ghc/compiler/types/Type.lhs +++ b/ghc/compiler/types/Type.lhs @@ -423,13 +423,10 @@ It's useful in the back end. \begin{code} repType :: Type -> Type -- Only applied to types of kind *; hence tycons are saturated -repType (ForAllTy _ ty) = repType ty -repType (NoteTy _ ty) = repType ty -repType (PredTy p) = repType (predTypeRep p) -repType (TyConApp tc tys) - | isNewTyCon tc = ASSERT( tys `lengthIs` tyConArity tc ) - repType (new_type_rep tc tys) -repType ty = ty +repType (ForAllTy _ ty) = repType ty +repType (NoteTy _ ty) = repType ty +repType ty | Just ty' <- coreView ty = repType ty' + | otherwise = ty -- ToDo: this could be moved to the code generator, using splitTyConApp instead -- of inspecting the type directly.