[commit: ghc] wip/12368: Degrade "case scrutinee not known to diverge for sure" Lint error to warning (d9cb266)
git at git.haskell.org
git at git.haskell.org
Thu Aug 18 13:28:21 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/12368
Link : http://ghc.haskell.org/trac/ghc/changeset/d9cb26677b03f2a3d52182f4a5d77ae9d2197f44/ghc
>---------------------------------------------------------------
commit d9cb26677b03f2a3d52182f4a5d77ae9d2197f44
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.
>---------------------------------------------------------------
d9cb26677b03f2a3d52182f4a5d77ae9d2197f44
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