[commit: ghc] master: Degrade "case scrutinee not known to diverge for sure" Lint error to warning (ec7fcfd)

git at git.haskell.org git at git.haskell.org
Thu Aug 25 16:25:18 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/ec7fcfdda7f4655f4cc4399d1b3f4bc2543809db/ghc

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

commit ec7fcfdda7f4655f4cc4399d1b3f4bc2543809db
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 proposed in #12435, as it easily gets in the way of development when
    it reports false positives.


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

ec7fcfdda7f4655f4cc4399d1b3f4bc2543809db
 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 9700522..74f8a61 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