[commit: ghc] ghc-8.2: Disable bogus lint checks about levity polimorphic coerions (8189295)

git at git.haskell.org git at git.haskell.org
Fri Mar 31 23:01:07 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/81892956341b0915b8a6928bc3382fab7ce58608/ghc

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

commit 81892956341b0915b8a6928bc3382fab7ce58608
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Fri Mar 31 09:47:06 2017 -0400

    Disable bogus lint checks about levity polimorphic coerions
    
    These checks, introduced in cea7141851ce653cb20207da3591d09e73fa396d
    hugely inflated build logs, which incapitated perf.haskell.org.
    
    According to Richard, the checks are useless and wrong, and that Ben
    plans to investigate.
    (https://phabricator.haskell.org/rGHCcea7141851ce653cb20207da3591d09e73fa396d#64647)
    
    Until that happens, I remove them from the code.
    
    (cherry picked from commit 03c7dd0941fb4974be54026ef3e4bb97451c3b1f)


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

81892956341b0915b8a6928bc3382fab7ce58608
 compiler/coreSyn/CoreLint.hs | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 3029990..c1db52b 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -1644,11 +1644,7 @@ lintCoercion co@(UnivCo prov r ty1 ty2)
 
        -- see #9122 for discussion of these checks
      checkTypes t1 t2
-       = do { checkWarnL lev_poly1
-                         (report "left-hand type is levity-polymorphic")
-            ; checkWarnL lev_poly2
-                         (report "right-hand type is levity-polymorphic")
-            ; when (not (lev_poly1 || lev_poly2)) $
+       = do { when (not (lev_poly1 || lev_poly2)) $
               do { checkWarnL (reps1 `equalLength` reps2)
                               (report "between values with different # of reps")
                  ; zipWithM_ validateCoercion reps1 reps2 }}



More information about the ghc-commits mailing list