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

Roman Cheplyaka roma at ro-che.info
Wed Nov 12 11:48:53 UTC 2014


On 11/11/14 08:11, Henning Thielemann wrote:
> 
> 
> On Tue, 11 Nov 2014, Herbert Valerio Riedel wrote:
> 
>> Hello CLC et al.,
>>
>> I hereby suggest to add a type for encoding term-level naturals
>>
>>  data Natural = <opaque/hidden>
>>       deriving (...the usual standard classes...)
>>
>> to `base:Data.Word` module
> 
> This type is useful, no doubt. But so far Data.Word (and Data.Int) are
> modules for fixed size machine oriented integer types. Would be nice to
> have Natural located where Integer is. Unfortunately, so far Integer is
> only exported by Prelude and GHC.Integer.

Yeah, having Natural in Data.Word feels unnatural to me.

Roman



More information about the Libraries mailing list