Add Ord Laws to next Haskell Report
Henning Thielemann
lemming at henning-thielemann.de
Thu Feb 7 16:22:23 UTC 2019
On Thu, 7 Feb 2019, Merijn Verstraaten wrote:
> I think the default behaviour for Float/Double should use a trapping
> NaN. The current value NaN is as if every Double value has an implicit
> "fromJust"
I like to think of it like all operations are lifted to (Maybe Float).
> Trapping NaN would also eliminate the brokenness of Ord. If some people
> are really attached to value NaNs (why?!? What's wrong with you?) we
> could allow disabling trapping at compile or runtime so they get the old
> behaviour.
What about calling into foreign code? If I call a BLAS routine and one
element of the result vector is NaN, shall this be trapped? Or shall it be
trapped once I access the NaN element?
More information about the Libraries
mailing list