[commit: ghc] ghc-8.0: Comment a suspicious zonk in TcFlatten. (1938568)

git at git.haskell.org git at git.haskell.org
Wed Mar 23 16:38:31 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/193856869cfb10cbb6b76dff66a58895da289486/ghc

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

commit 193856869cfb10cbb6b76dff66a58895da289486
Author: Richard Eisenberg <eir at cis.upenn.edu>
Date:   Fri Mar 18 22:37:37 2016 -0400

    Comment a suspicious zonk in TcFlatten.
    
    (cherry picked from commit 947709395015bd6122eedc6da5df356660e76208)


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

193856869cfb10cbb6b76dff66a58895da289486
 compiler/typecheck/TcFlatten.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compiler/typecheck/TcFlatten.hs b/compiler/typecheck/TcFlatten.hs
index c306479..e340b5a 100644
--- a/compiler/typecheck/TcFlatten.hs
+++ b/compiler/typecheck/TcFlatten.hs
@@ -1350,6 +1350,9 @@ flatten_tyvar3 tv
                  , ppr kind_co <+> dcolon <+> ppr (coercionKind kind_co) ])
        ; orig_kind <- liftTcS $ zonkTcType kind
              -- NB: orig_kind is *not* the kind returned from flatten
+             -- This zonk is necessary because we might later see the tv's kind
+             -- in canEqTyVarTyVar (where we use getCastedTyVar_maybe).
+             -- If you remove it, then e.g. dependent/should_fail/T11407 panics
        ; return (FTRCasted (setTyVarKind tv orig_kind) kind_co) }
 
 {-



More information about the ghc-commits mailing list