[core libraries] Re: PROPOSAL: Add 'Natural' type to base:Data.Word

Edward Kmett ekmett at gmail.com
Tue Nov 11 13:56:59 UTC 2014


+1 from me. I'd happy hack up 'nats/semigroups' to use a standard version
if it was available.

On Tue, Nov 11, 2014 at 8:51 AM, Herbert Valerio Riedel <hvr at gnu.org> wrote:

> On 2014-11-11 at 14:32:47 +0100, Richard Eisenberg wrote:
> > What would the semantics of subtraction be for this? I'm assuming
> > there would be a `Num` instance for `Natural`.
>
> It wouldn't be total, and 'throw (Underflow :: ArithException)' if the
> result would fall outside the non-negative domain.
>
> This is similiar to how e.g.
>
>  http://hackage.haskell.org/package/nats-0.2/docs/Numeric-Natural.html
>
> handles out-of-domain subtraction results.
>
> --
> You received this message because you are subscribed to the Google Groups
> "haskell-core-libraries" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to haskell-core-libraries+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141111/c5c738ef/attachment.html>


More information about the Libraries mailing list