Questions regarding Bounded

David Feuer david.feuer at gmail.com
Sat May 9 21:55:52 UTC 2020


The question of the Enum instance is left a bit unsatisfactory. It can
either match the Num instance or the Bounded instance but not both. Ugh!

On Sat, May 9, 2020, 5:51 PM Carter Schonwald <carter.schonwald at gmail.com>
wrote:

> Agreed.  The min of a total order should be the min.  This seems to be a
> straight up bug.
>
> On Sat, May 9, 2020 at 5:34 PM David Feuer <david.feuer at gmail.com> wrote:
>
>> I'd call that a bug in the Down instance myself, and a serious one!
>>
>> On Sat, May 9, 2020, 5:30 PM Joseph C. Sible <josephcsible at gmail.com>
>> wrote:
>>
>>> On Mon, May 4, 2020 at 7:55 AM Simon Jakobi via Libraries
>>> <libraries at haskell.org> wrote:
>>> >
>>> > Are there any instances where
>>> >
>>> > minBound <= x == True
>>> >
>>> > and
>>> >
>>> > maxBound >= x == True
>>> >
>>> > don't hold for every x?
>>>
>>> Yes:
>>>
>>> minBound <= Data.Ord.Down (1 :: Int) == False
>>>
>>> IMO, this is kind of a wart in Down, as I commented at
>>> https://gitlab.haskell.org/ghc/ghc/-/merge_requests/881#note_271111
>>>
>>> Joseph C. Sible
>>> _______________________________________________
>>> Libraries mailing list
>>> Libraries at haskell.org
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200509/e7609a41/attachment.html>


More information about the Libraries mailing list