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

Carter Schonwald carter.schonwald at gmail.com
Fri Nov 14 06:07:06 UTC 2014


Nan actually has a point in floating ... point.  Here it'd not have any
performance benefit and force ME and other Users to do error checking by
hand in a needless painful way. Nan  on ... nats, just ain Natural.

i want simple user friendly error messages.

On Thu, Nov 13, 2014 at 10:34 PM, Mario Blažević <blamario at acanac.net>
wrote:

> On 13/11/14 05:35 PM, Brandon Allbery wrote:
>
>> On Thu, Nov 13, 2014 at 5:20 PM, Mario Blažević <mblazevic at stilo.com
>> <mailto:mblazevic at stilo.com>> wrote:
>>
>>     Regarding the partial vs. saturated negation, I'm in favour of the
>>     former. However, there is another option nobody mentioned so far: NaN
>>
>>
>> NaN is only defined in the context of IEEE floating point; as such, it is
>> not available for this use.
>>
>
>     I'm aware of the current uses of NaN. I was just suggesting that the
> same concept could be used for operations on natural values that go out of
> band. Just like we have
>
>    isNaN :: RealFloat a => a -> Bool
>
> we could add a function
>
>    isUnnatural :: Natural -> Bool
>
> and replace exceptions by an unnatural Natural values... I'm open to an
> alternative terminology. The important question is whether this approach is
> feasible for the implementation.
>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141114/78bdf993/attachment-0001.html>


More information about the Libraries mailing list