[GHC] #12980: Unlifted class method rejected

GHC ghc-devs at haskell.org
Fri Dec 16 07:28:29 UTC 2016


#12980: Unlifted class method rejected
-------------------------------------+-------------------------------------
        Reporter:  goldfire          |                Owner:  goldfire
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
                                     |  LevityPolymorphism
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 oerjan):

 * cc: oerjan (added)


Comment:

 Replying to [comment:1 simonpj]:
 > Certainly should be ok for multi-method classes.  I'm not quite sure
 about the single-method case, because of the interaction with newtypes --
 but I think there's a case for using data types in the single-method case
 too.

 Alternatively, since fields cannot be levity-polymorphic (at least without
 extra indirection), you could restrict the newtype optimization to methods
 of kind `Type`.

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


More information about the ghc-tickets mailing list