[GHC] #11882: Use coercionKind instread of zonkTcType in TcFlatten.flatten_tyvar

GHC ghc-devs at haskell.org
Fri Apr 15 15:36:25 UTC 2016


#11882: Use coercionKind instread of zonkTcType in TcFlatten.flatten_tyvar
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:
            Type:  bug               |               Status:  closed
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 Done by this commit; stupidly failed to mention it in the commit message.
 {{{
 commit a7ee2d4c4229b27af324ebac93081f692835365d
 Author: Simon Peyton Jones <simonpj at microsoft.com>
 Date:   Fri Apr 15 16:17:54 2016 +0100

     Improve TcFlatten.flattenTyVar

     This patch tides up the structure, simplifying FlattenTvResult.

     It also replaces a use of zonkTcType (which I hated) with
     coercionKind, in that same function.  Happily, the result is
     little faster, maybe even a percentage point or two, which is
     a lot for a compiler.

     This also removes the line
        || not (map binderVisibility bndrs1 == map binderVisibility bndrs2)
     from TcCanonical.can_eq_nc', in the ForAllTy/ForAllTy case.

     Why? Becuase I can't see why binder-visiblity should matter, and
     when we use coercionKind instead of zonkTcType in flattenTyVar,
     this case pops up and rejects a program that should pass.  I did
     discuss this with Richard.
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11882#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list