[GHC] #10604: Make Generic1 kind polymorphic
GHC
ghc-devs at haskell.org
Mon Jul 6 09:07:58 UTC 2015
#10604: Make Generic1 kind polymorphic
-------------------------------------+-------------------------------------
Reporter: DerekElkins | Owner: ekmett
Type: feature request | Status: new
Priority: low | Milestone:
Component: Core Libraries | Version: 7.10.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Old description:
> It looks to me that the Generic1 class (and the Rep1 associated type) can
> immediately be generalized to forall k. k -> *. If k was instantiated to
> anything other than *, you wouldn't be able to make an instance for Par1,
> but then I don't think it would ever come up so that would be exactly the
> right behavior. This allows, in particular, DataKinds to be used as a
> parameter to instances of Generic1.
>
> I don't know if this would affect deriving, but I wouldn't really expect
> it to.
New description:
It looks to me that the `Generic1` class (and the `Rep1` associated type)
can immediately be generalized to `forall k. k -> *`. If `k` was
instantiated to anything other than `*`, you wouldn't be able to make an
instance for `Par1`, but then I don't think it would ever come up so that
would be exactly the right behavior. This allows, in particular,
`DataKinds` to be used as a parameter to instances of `Generic1`.
I don't know if this would affect deriving, but I wouldn't really expect
it to.
--
Comment (by simonpj):
Happily, Andres Loh has agreed to take a lead in `Generics` and
`DeriveAnyClass`, but only later this summer. Thanks Andres!
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10604#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list