[commit: ghc] wip/12368: Degrade "case scrutinee not known to diverge for sure" Lint error (09c2d6e)

git at git.haskell.org git at git.haskell.org
Tue Jul 26 09:46:03 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/12368
Link       : http://ghc.haskell.org/trac/ghc/changeset/09c2d6e2bae5bf81e9ea567969c32a52a367c949/ghc

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

commit 09c2d6e2bae5bf81e9ea567969c32a52a367c949
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Jul 26 11:44:53 2016 +0200

    Degrade "case scrutinee not known to diverge for sure" Lint error
    
    as proposed in #12435. For now, this is just on my branch to be able to
    continue compilation on the auto-builders.


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

09c2d6e2bae5bf81e9ea567969c32a52a367c949
 compiler/coreSyn/CoreLint.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index dead929..d13d186 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -715,7 +715,7 @@ lintCoreExpr e@(Case scrut var alt_ty alts) =
      ; when (null alts) $
      do { checkL (not (exprIsHNF scrut))
           (text "No alternatives for a case scrutinee in head-normal form:" <+> ppr scrut)
-        ; checkL scrut_diverges
+        ; checkWarnL scrut_diverges
           (text "No alternatives for a case scrutinee not known to diverge for sure:" <+> ppr scrut)
         }
 



More information about the ghc-commits mailing list