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

git at git.haskell.org git at git.haskell.org
Wed Aug 3 14:05:30 UTC 2016


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

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

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

commit 85ac1ca1a95030885c5331e306ae1e8dfc2664a8
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 to warning
    
    as prroposed in #12435, as it easily gets in the way of development when
    reporting false positives.


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

85ac1ca1a95030885c5331e306ae1e8dfc2664a8
 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