More general Generic and Data instances for Data.Proxy.Proxy?

Carl Howells chowells79 at gmail.com
Sat Jul 18 00:39:14 UTC 2015


Yes, but why does Proxy's Data instance depend on its type variable's
Data instance?  That seems unnecessary.

On Fri, Jul 17, 2015 at 5:37 PM, Ryan Scott <ryan.gl.scott at gmail.com> wrote:
> Actually, Data.Data already has PolyKinds enabled, but the (Data t => Data
> (Proxy t)) instance requires that the type parameter be of kind *, since the
> Data typeclass has kind * -> Constraint.
>
> On the other hand, switching on PolyKinds in GHC.Generics should provide a
> polykinded Generic (Proxy t) instance (the corresponding instance in the
> tagged library is already polykinded, in fact). If we enable PolyKinds in
> GHC.Generics, we could also make Rep, Generic1, Rep1, V1, U1, Rec1, K1, M1,
> (:+:), (:*:), and (:.:) polykinded.
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>


More information about the Libraries mailing list