summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-07-10 12:47:38 +0000
committerIan Lynagh <igloo@earth.li>2007-07-10 12:47:38 +0000
commit11e80952ae15cf95b89c01466ee1970fb7161d7f (patch)
tree92a760ae2c7a664d45cb4916a9d56522fc5b6efb
parent615dbe7edd0a51bcb61565081dfa09a9bf37058d (diff)
downloadhaskell-11e80952ae15cf95b89c01466ee1970fb7161d7f.tar.gz
Fix tcInstHeadTyNotSynonym
It was returning False for type variables amongst other things, so "instance C a" was telling us to use -XTypeSynonymInstances.
-rw-r--r--compiler/typecheck/TcType.lhs7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs
index 7595a75de2..eaf2faa321 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