
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ć
On 13/11/14 05:35 PM, Brandon Allbery wrote:
On Thu, Nov 13, 2014 at 5:20 PM, Mario Blažević
mailto:mblazevic@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@haskell.org http://www.haskell.org/mailman/listinfo/libraries