Move Data.Functor.Contravariant into base

Shachaf Ben-Kiki shachaf at gmail.com
Sun Dec 11 20:05:05 UTC 2016


Putting Contravariant in base sounds like a reasonable thing to do.
It's a pretty basic class.

Deriving Contravariant seems a bit tricky. If Contravariant is in base
and part of the deriving code, what Functor/Contravariant instances do
you derive for e.g. newtype Compose f g a = Compose (f (g a))?

    Shachaf

On Sun, Dec 11, 2016 at 8:14 AM, Andrew Martin
<andrew.thaddeus at gmail.com> wrote:
> The typeclass Contravariant (from the contravariant package) is both
> useful and fundamental. I would like to see this moved into base.
> One additional motivating factor is that it would become possible
> for a DeriveContravariant extension to be written in a future GHC
> release.  I'd love to hear other people's thoughts, even if it's as
> simple as a yea or nay. Thanks.
>
> -Andrew Martin
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


More information about the Libraries mailing list