Re: Export Natural type from prelude

Carter Schonwald <[email protected]> Fri, 2 Jul 2021 15:16:32 -0400
Newsgroups gmane.comp.lang.haskell.libraries
Message-ID <CAHYVw0y_CBJBpBBprMTK9Awx3gmGKULnsKQZZkkkejjR3qxOkg@mail.gmail.com>
This is a good point were we adding it to base. It’s already in base and
widely useful!

That’s a good motivation to add for fixing num and friends. But that’s not
even a new problem for num instances in base. Reexport it from prelude
doesn’t change that. Just improves the ergonomics for using a really nice
type for both pedagogy and prototyping!

I also like how natural throws an error on underflow.

On Fri, Jul 2, 2021 at 12:54 PM David Feuer <[email protected]> wrote:

> I'm going to play devil's advocate and say no. I believe Num instances
> should be rings under + and *. Natural is an instance of Num but is not a
> ring.
>
> On Fri, Jul 2, 2021, 11:26 AM Carter Schonwald <[email protected]>
> wrote:
>
>> This seems long overdue and aside from some redundant import warnings
>> likely low breakage risk
>>
>>
>> Thoughts?
>> _______________________________________________
>> Libraries mailing list
>> [email protected]
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
>

_______________________________________________
Libraries mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries