From: audreyt@audreyt.org Date: Sun, 24 Sep 2006 06:32:08 +0000 (+0000) Subject: In tcSplittyConApp_maybe, add the PredTy case X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=173dd12cecd50484e46a57bd6117d197ef68f929 In tcSplittyConApp_maybe, add the PredTy case such that this can compile again: newtype Moose = MkMoose () deriving (Eq, Ord) --- diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index f266f4b..888452b 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -712,6 +712,8 @@ tcSplitTyConApp_maybe :: Type -> Maybe (TyCon, [Type]) tcSplitTyConApp_maybe ty | Just ty' <- tcView ty = tcSplitTyConApp_maybe ty' tcSplitTyConApp_maybe (TyConApp tc tys) = Just (tc, tys) tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res]) +tcSplitTyConApp_maybe (AppTy arg res) = Just (funTyCon, [arg,res]) +tcSplitTyConApp_maybe (PredTy (ClassP _ [ty'])) = tcSplitTyConApp_maybe ty' -- Newtypes are opaque, so they may be split -- However, predicates are not treated -- as tycon applications by the type checker