[GHC] #14728: Is (GeneralizedNewtypeDeriving + associated type classes) completely bogus?
GHC
ghc-devs at haskell.org
Sat Jan 27 20:02:00 UTC 2018
#14728: Is (GeneralizedNewtypeDeriving + associated type classes) completely bogus?
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type | Version: 8.2.2
checker) | Keywords: deriving,
Resolution: | TypeFamilies
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 goldfire):
Good about generating Core for type instances. Then this is all doable
today.
`axIdentity` is the newtype axiom that comes into being when a user
declares a newtype. It can be accessed by `coerce`, but is mostly internal
magic. Specifically, if you write
{{{
newtype N a b c = MkN (some_type)
}}}
then we get
{{{
axN :: N a b c ~R some_type
}}}
as an axiom (type `CoAxiom` in GHC).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14728#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list