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

Andreas Abel abela at chalmers.se
Wed Nov 19 00:51:27 UTC 2014


+1 for putting it into a separate module like Data.Nat.

On 18.11.14 11:38 PM, Andres Löh wrote:
> Hi.
>
>> I hereby suggest to add a type for encoding term-level naturals
>>
>>    data Natural = <opaque/hidden>
>>         deriving (...the usual standard classes...)
>
> +1 in general
>
> 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)
>
> Cheers,
>    Andres
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Department of Computer Science and Engineering
Chalmers and Gothenburg University, Sweden

andreas.abel at gu.se
http://www2.tcs.ifi.lmu.de/~abel/


More information about the Libraries mailing list