[Haskell-cafe] Proposal: Add Eq1 and Ord1 instances in GHC.Generics, and synchronize with Data.Functor.* types

Zemyla zemyla at gmail.com
Sun Feb 25 16:42:48 UTC 2018

I definitely agree with adding Eq1 and Ord1 instances. We probably
should have Show1 and Read1 as well, since we have normal Show and
Read instances, but it should say they can't be used for deriving like
Eq1 and Ord1 can.

On Sun, Feb 25, 2018 at 9:10 AM, Li-yao Xia <lysxia at gmail.com> wrote:
> Eq1 and Ord1 are two more useful classes to implement in GHC.Generics, and
> would be useful to derive Eq1 and Ord1 generically. Note that we can
> currently use transformers-compat to derive these.
> Moreover, most of the GHC.Generics types are equivalent to types in the
> Data.Functor.* modules. Would it be a good idea for them to have the same
> instances? Concretely, the current differences are:
> - GHC.Generics is missing Eq1, Ord1, Show1, Read1 instances
> - Data.Functor.* is missing Semigroup and Monoid instances (that my previous
> proposal would add to GHC.Generics)
> Li-yao
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

More information about the Haskell-Cafe mailing list