Re: [GHC] #14070: Allow ‘unsafe’ deriving strategy, deriving code with ‘unsafeCoerce’

GHC ghc-devs at haskell.org
Wed Aug 2 14:24:26 UTC 2017


#14070: Allow ‘unsafe’ deriving strategy, deriving code with ‘unsafeCoerce’
-------------------------------------+-------------------------------------
        Reporter:  Iceland_jack      |                Owner:  (none)
            Type:  feature request   |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:
                                     |  QuantifiedContexts, deriving
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 Iceland_jack):

 Replying to [comment:13 RyanGlScott]:
 > I'm pretty sure `QuantifiedContexts` should let us be able to use
 `GeneralizedNewtypeDeriving` in any situation where we need to `coerce`
 underneath a higher-kinded type parameter (like the `f` in `Lens (f a)
 a`).

 Okay great

 > I mean, saying that you can derive everything that is derivable is a bit
 of a tautology.

 It was a lazy question, I was wondering if there is anything GNDerivable
 in theory outside of GHC's reach even given quantified constraints (and
 your hunch).. Just as `join` is 'derivable' but is not derivable
 currently.

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


More information about the ghc-tickets mailing list