GHC.Generics and instances of Functor, Applicative, etc?

I'm using GHC.Generics and have noticed that the data types defined there don't have instances of the standard classes (at least not defined in that module), such as Functor, Applicative, Foldable and Traversable. It'd be very useful to be able to rely on such instances, so that one can define instances of custom types via instances of the generic types. (Hopefully, the compiler can remove most or all conversion overhead) Is there any reason not to add these generic instances? -- Conal

https://ghc.haskell.org/trac/ghc/ticket/9043 is the current ticket for
tracking this and has more details.
On Tue, Jan 12, 2016 at 8:28 PM, Conal Elliott
I'm using GHC.Generics and have noticed that the data types defined there don't have instances of the standard classes (at least not defined in that module), such as Functor, Applicative, Foldable and Traversable. It'd be very useful to be able to rely on such instances, so that one can define instances of custom types via instances of the generic types. (Hopefully, the compiler can remove most or all conversion overhead) Is there any reason not to add these generic instances?
-- Conal
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

Lovely. Thanks!
On Tue, Jan 12, 2016 at 7:23 PM, Edward Kmett
https://ghc.haskell.org/trac/ghc/ticket/9043 is the current ticket for tracking this and has more details.
On Tue, Jan 12, 2016 at 8:28 PM, Conal Elliott
wrote: I'm using GHC.Generics and have noticed that the data types defined there don't have instances of the standard classes (at least not defined in that module), such as Functor, Applicative, Foldable and Traversable. It'd be very useful to be able to rely on such instances, so that one can define instances of custom types via instances of the generic types. (Hopefully, the compiler can remove most or all conversion overhead) Is there any reason not to add these generic instances?
-- Conal
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
participants (2)
-
Conal Elliott
-
Edward Kmett