[GHC] #16276: Feature request: Polymorphic kinds in Data.Functor.Classes
GHC
ghc-devs at haskell.org
Fri Feb 1 22:24:27 UTC 2019
#16276: Feature request: Polymorphic kinds in Data.Functor.Classes
-------------------------------------+-------------------------------------
Reporter: siddharthist | Owner: (none)
Type: feature | Status: new
request |
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.3
Keywords: polykinds | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
The classes in Data.Functor.Classes have a somewhat restrictive kind
signature:
{{{
*Data.Functor.Classes> :k Eq1
Eq1 :: (* -> *) -> Constraint
}}}
As a result, we redefine [1] many of them in the
[https://hackage.haskell.org/package/parameterized-utils-1.0.1/docs/Data-
Parameterized-Classes.html parameterized-utils] library. It would be quite
easy to make more polymorphic (have kind "(k -> *) -> Constraint"). If
everyone thinks this is a good idea, I'm happy to submit a pull request.
[1]: To be precise, there are actually a few axes along which the classes
in parameterized-utils vary from those in base. Some, like OrdF, require
more type-level evidence. Others, like EqF, don't require their type
parameter to have the corresponding instance. There are a lot of points in
the design space here.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16276>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list