type class Boolean

Ben Franksen ben.franksen at online.de
Mon Dec 21 23:21:04 UTC 2020

Am 21.12.20 um 19:54 schrieb Tom Ellis:
> I think it's worth seeing more instances. As it is I don't understand
> in what situations one would use these polymorphically and therefore
> why `liftA2 (&&)`, `fmap not`, `pure True` and friends wouldn't
> suffice.

As with all overloading it's partly a matter of convenience. For
instance you can't use 'liftA2 (&&)' as an operator. And your list of
alternatives above demonstrates that one has to remember which lifting
operator (pure, fmap, liftA2) to use, depending on arity.

More information about the Libraries mailing list