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

git at git.haskell.org git at git.haskell.org
Mon Aug 1 11:02:31 UTC 2016


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

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

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

commit f7161d38ddce35a4febce413a3ab02febef068fe
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.


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

f7161d38ddce35a4febce413a3ab02febef068fe
 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