PROPOSAL: Add 'Natural' type to base:Data.Word

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Tue Nov 18 21:26:09 UTC 2014


Hi,

On 18 November 2014 16:38, Andres Löh <andres.loeh at gmail.com> wrote:
> FWIW, I'm in favour of:
>
> * not putting this into Data.Word, but rather into Data.Nat or Data.Natural
> * having default subtraction to be saturated rather than partial
> * adding a Nat type for bounded naturals as well (even if it's just a
> synonym for Word)

+1 on all points. 'Data.Nat.Nat' will clash with 'data Nat = Z | S
Nat' (which is quite popular), but I think that it's better to call
that 'Peano' or something similar. Perhaps we could add 'Peano' to
Data.Nat while we're at it?


More information about the Libraries mailing list