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

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.

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
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@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
participants (2)
-
Carl Howells
-
Ryan Scott