From: simonmar Date: Sat, 19 Nov 2005 14:59:53 +0000 (+0000) Subject: [project @ 2005-11-19 14:59:53 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~34 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e72b2ad40adbd9afa8c68af8429150b6b5e485a1;p=ghc-hetmet.git [project @ 2005-11-19 14:59:53 by simonmar] fix repType after changes to the representation of type synonyms. This caused the stage2 compiler to crash, because various info tables misrepresented the pointerhood of constructor arguments. --- 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.