Proposal: add Bounded instances for Maybe and Either

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed May 9 04:30:02 UTC 2018


On 9 May 2018 at 12:15, Edward Kmett <ekmett at gmail.com> wrote:
> minBound = Left minBound <= Left a < Right b <= Right maxBound = maxBound
>
> fits with the behavior of the existing Ord instance.
>
> On the other hand, Left (), being strictly less than minBound would rather
> drastically undermine the expected interaction of Ord and Bounded.

Fair enough.  I had also missed in David's initial proposal that we
had Bounded on both a and b in (Either a b).

I'm +1 on these instances (more from a "they're the logical instances"
PoV than "this will be useful").

-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
http://IvanMiljenovic.wordpress.com


More information about the Libraries mailing list