Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : ghc-kinds

http://hackage.haskell.org/trac/ghc/changeset/2045e731a2c240adc5502cc3bff8226185a19e9d

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

commit 2045e731a2c240adc5502cc3bff8226185a19e9d
Author: Jose Pedro Magalhaes <[email protected]>
Date:   Tue Nov 15 10:07:10 2011 +0000

    A minor fix, plus transform a failure into a warning
    
    This warning has to be addressed later, though.

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

 compiler/coreSyn/CoreLint.lhs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.lhs b/compiler/coreSyn/CoreLint.lhs
index 1df8413..c008d55 100755
--- a/compiler/coreSyn/CoreLint.lhs
+++ b/compiler/coreSyn/CoreLint.lhs
@@ -669,7 +669,7 @@ lintKind (FunTy k1 k2)
   = lintKind k1 >> lintKind k2
 
 lintKind kind@(TyConApp tc kis)
-  = do { unless (tyConArity tc == length kis || isSuperKindTyCon tc)
+  = do { unless (isSuperKindTyCon tc || tyConArity tc == length kis)
            (addErrL malformed_kind)
        ; mapM_ lintKind kis }
   where
@@ -810,8 +810,8 @@ lintType (TyVarTy tv)
   = do { checkTyCoVarInScope tv
        ; let kind = tyVarKind tv
        ; lintKind kind
-       ; if (isSuperKind kind) then failWithL msg
-         else return kind }
+       ; WARN( isSuperKind kind, msg )
+         return kind }
   where msg = hang (ptext (sLit "Expecting a type, but got a kind"))
                  2 (ptext (sLit "Offending kind:") <+> ppr tv)
 



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to