[GHC] #8503: New GeneralizedNewtypeDeriving check still isn't permissive enough

GHC ghc-devs at haskell.org
Tue Nov 5 15:47:06 UTC 2013


#8503: New GeneralizedNewtypeDeriving check still isn't permissive enough
-------------------------------------+------------------------------------
        Reporter:  goldfire          |            Owner:  goldfire
            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 simonpj):

 Good point.  Messing with `TyConAppCo` seems like a sledgehammer to crack
 a nut, though.

 Let's check one thing. Does the problem go away if we say that the axiom
 for U is
 {{{
 axiom ax7 a : U a ~R T a
 }}}
 that is, if we '''refrain from eta-reducing the axiom'''?

 If so, I think we can re-visit our reasons for eta-reducing the axiom (see
 `Note [Newtype eta]` in `TyCon.lhs`).  I believe the reason was 99% to do
 with coercing the dictionary in GND.  And we aren't doing that any more.
 Moreover, it seems kind of odd to have '''representational''' equality at
 any kind other than *, doesn't it?  Do we have any ''other'' source of
 representational equality at non-* kinds?

 Getting rid of the eta reduction would simplify the code a bit, too.

 Simon

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


More information about the ghc-tickets mailing list