[commit: ghc] master: isTauTy should be True for LitTy (see Trac #7459) (61f770f)

Simon Peyton Jones <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/61f770f6df66e75c8920c17840670bea971062bf

>---------------------------------------------------------------

commit 61f770f6df66e75c8920c17840670bea971062bf
Author: Simon Peyton Jones <[email protected]>
Date:   Sat Dec 1 18:29:21 2012 +0000

    isTauTy should be True for LitTy (see Trac #7459)

>---------------------------------------------------------------

 compiler/typecheck/TcType.lhs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs
index 73565e0..623d301 100644
--- a/compiler/typecheck/TcType.lhs
+++ b/compiler/typecheck/TcType.lhs
@@ -899,10 +899,11 @@ mkTcEqPred ty1 ty2
 isTauTy :: Type -> Bool
 isTauTy ty | Just ty' <- tcView ty = isTauTy ty'
 isTauTy (TyVarTy _)	  = True
+isTauTy (LitTy {})        = True
 isTauTy (TyConApp tc tys) = all isTauTy tys && isTauTyCon tc
 isTauTy (AppTy a b)	  = isTauTy a && isTauTy b
 isTauTy (FunTy a b)	  = isTauTy a && isTauTy b
-isTauTy _    		  = False
+isTauTy (ForAllTy {})     = False
 
 isTauTyCon :: TyCon -> Bool
 -- Returns False for type synonyms whose expansion is a polytype
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.