[GHC] #14728: Is (GeneralizedNewtypeDeriving + associated type classes) completely bogus?
GHC
ghc-devs at haskell.org
Fri Mar 30 16:44:57 UTC 2018
#14728: Is (GeneralizedNewtypeDeriving + associated type classes) completely bogus?
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.4.1
Component: Compiler (Type | Version: 8.2.2
checker) | Keywords: deriving,
Resolution: fixed | TypeFamilies
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4402
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by RyanGlScott):
I completely take back what I said in comment:15 about this being
unblocked—that couldn't be further from the truth! In fact, after talking
with goldfire and kcsongor about this, we've come to the realization that
all of the ideas in comment:3 are completely untenable at present.
The issue is that we're trying to construct the type `(x |> g)`, where `x`
is a type and `g` is a coercion. However, in order for this to kind-check,
`g` must be nominally roled. This is never the case in GND, as we always
use newtype axioms, which are by definition representationally roled!
This pretty much makes this idea dead in the water, at least until we
figure out a way to have representational casts in kinds (which is likely
a ways away).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14728#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list