[GHC] #15310: Derive Generic1 instances for types of kind (k -> *) -> * that include applications of the parameter
GHC
ghc-devs at haskell.org
Mon Jun 25 06:05:53 UTC 2018
#15310: Derive Generic1 instances for types of kind (k -> *) -> * that include
applications of the parameter
-------------------------------------+-------------------------------------
Reporter: cedricshock | Owner: (none)
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler (Type | Version:
checker) | Keywords: DeriveGeneric
Resolution: | Generic1
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 cedricshock):
I wrote an implementation of `Generic1` deriving using `ParAp0` and
`ParAp1`. You can preview it in this PR:
https://github.com/Cedev/ghc/pull/1
I could use some practical advice and help on what to do next
1. I don't have a test case for a kind `(k -> *) -> *` where `k` isn't
`*`. If you have any ideas, especially for a test case where `k ~
Constraint`, I'd appreciate them.
2. There are types in `base` that can now have `Generic1` instances
derived for them, starting with `ParAp0` and `ParAp1` themselves. How do I
add `Generic1` instances to base without breaking the compiler building,
since an old compiler won't be able to derive those `Generic1` instances?
3. What other typeclasses should `ParAp0` and `ParAp1` have instances
for?
4. What do I do next? Get feedback from both `ghc-devs` and `glasgow-
haskell-users`?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15310#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list