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

#11882: Use coercionKind instread of zonkTcType in TcFlatten.flatten_tyvar -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- In `TcFlatten.flatten_tyvar3` we had {{{ ; 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 -- See also Note [Flattening] }}} But in fact the kind of the coercion returned earlier gives the same information, and turns out to be a little faster. Plus, I hate calling `zonkTcType` in the constraint solver; it doesn't "fit" there. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11882 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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
participants (1)
-
GHC