Eq1, Ord1, Show1: move from eq1, compare1, showsPrec1 to liftEq, liftCompare, liftShowsPrec

Henning Thielemann lemming at henning-thielemann.de
Mon Jan 11 19:20:46 UTC 2016


me again ...


On Mon, 11 Jan 2016, Ryan Scott wrote:

> You're talking about this transformers issue [1], correct?

yes

> Not only that, but there are a couple of datatypes in transformers that 
> already resolve their Eq instances in an identical way to how Apply 
> would (for instance, IdentityT, which is isomorphic to Apply [2]).

One of my applications is to use functor things in a Set, which requires 
Ord constraint. With IdentityT I can write:

class Ord1 f => Elem f where
    method :: ...

transform :: (Elem f, Ord a) => Set (IdentityT f a) -> Set (IdentityT f a)

Without IdentityT I would have constraint (Ord (f a)).


More information about the Libraries mailing list