Export Natural type from prelude

Carter Schonwald carter.schonwald at gmail.com
Fri Jul 2 19:16:32 UTC 2021


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 <david.feuer at gmail.com> 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 <carter.schonwald at gmail.com>
> wrote:
>
>> This seems long overdue and aside from some redundant import warnings
>> likely low breakage risk
>>
>>
>> Thoughts?
>> _______________________________________________
>> 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/20210702/c89e939d/attachment.html>


More information about the Libraries mailing list