From: Ian Lynagh Date: Tue, 10 Jul 2007 12:47:38 +0000 (+0000) Subject: Fix tcInstHeadTyNotSynonym X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=11e80952ae15cf95b89c01466ee1970fb7161d7f Fix tcInstHeadTyNotSynonym It was returning False for type variables amongst other things, so "instance C a" was telling us to use -XTypeSynonymInstances. --- diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index 7595a75..eaf2faa 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -797,10 +797,9 @@ tcInstHeadTyNotSynonym :: Type -> Bool -- are transparent, so we need a special function here tcInstHeadTyNotSynonym ty = case ty of - NoteTy _ ty -> tcInstHeadTyNotSynonym ty - TyConApp tc tys -> not (isSynTyCon tc) - FunTy arg res -> True - other -> False + NoteTy _ ty -> tcInstHeadTyNotSynonym ty + TyConApp tc tys -> not (isSynTyCon tc) + _ -> True tcInstHeadTyAppAllTyVars :: Type -> Bool -- Used in Haskell-98 mode, for the argument types of an instance head