[GHC] #11431: GHC instantiates levity-polymorphic type variables with foralls

GHC ghc-devs at haskell.org
Fri Jan 15 14:32:27 UTC 2016


#11431: GHC instantiates levity-polymorphic type variables with foralls
-------------------------------------+-------------------------------------
        Reporter:  gridaphobe        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             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:                    |
-------------------------------------+-------------------------------------

Comment (by goldfire):

 Replying to [comment:2 simonpj]:

 > There's an engineering issue too.  Richard is about to eliminate
 `RetTv`.  But `RetTv` is essential to the implementation that accepts the
 above program. Are we going to leave `RetTv` for this sole (ill-defined)
 purpose?

 Yes, I recognize that as an unfortunate consequence of this suggestion.
 But it wouldn't be `ReturnTv` -- it would go back to the old `PolyTv`,
 just a tyvar that's allowed to unify with a polytype.

 Agreed that, if this works, it's a coincidence. That does seem to suggest
 that it doesn't work. My hope that it would work is because levity
 polymorphism is vanishingly rare.

 In any case, I don't feel strongly.

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


More information about the ghc-tickets mailing list