[GHC] #8631: Need ImpredicativeTypes for GeneralizedNewtypeDeriving?

GHC ghc-devs at haskell.org
Sat Feb 8 18:10:40 UTC 2014


#8631: Need ImpredicativeTypes for GeneralizedNewtypeDeriving?
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:
            Type:  bug               |           Status:  new
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.7
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by goldfire):

 I have an implementation plan:

 * Augment `InstBindings` with a new field `ib_extensions`, which will be a
 list of `ExtensionFlag`.
 * In `tcInstanceMethods`, apply these flags using `setXOptM`.
 * In the `is_newtype` branch of `genInst`, set `ib_extensions` to
 `[Opt_ImpredicativeTypes]`.
 * Elsewhere, set `ib_extensions` to `[]`.

 Seems quite straightforward once I've examined all the plumbing.

 Expect a patch in the next few hours.

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


More information about the ghc-tickets mailing list