[GHC] #15073: Unable to newtype derive `Prim` via DerivingStrategies

GHC ghc-devs at haskell.org
Fri Apr 20 18:58:53 UTC 2018


#15073: Unable to newtype derive `Prim` via DerivingStrategies
-------------------------------------+-------------------------------------
        Reporter:  fosskers          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.2
      Resolution:                    |             Keywords:  deriving
Operating System:  Unknown/Multiple  |         Architecture:  x86_64
                                     |  (amd64)
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):

 * keywords:   => deriving


Comment:

 Indeed. The fix for #14579 requires generating code for
 `GeneralizeNewtypeDeriving` that has more explicit type/kinds signatures.
 The flipside is that `Prim`, whose types mention unboxed tuples and levity
 polymorphic kinds, now requires enabling `TypeInType` and `UnboxedTuples`
 to derive, as you've observed.

 There are a handful of language extensions that GHC always enables under
 the hood when deriving things (such as `KindSignatures`), but I'm very
 much doubtful that we'd want to always enable either `TypeInType` or
 `UnboxedTuples`, since those can cause some other programs to break.

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


More information about the ghc-tickets mailing list