Remove NaN tests for Ord and Eq#316
Conversation
|
I don't know if this is right exactly, these NaN operations are part of IEEE-754 which we probably use to make other assumptions about numbers too. |
|
I don't think we do other assumptions with regards to |
|
While these are more problematic due to operator inlining, looks like there are some more Ord/Eq tests? |
|
I've now removed all |
natefaubion
left a comment
There was a problem hiding this comment.
@garyb Right now the instances/inlining situation is just incoherent. These tests aren't testing IEEE conformance so much as they are testing that the compiler inlines these operators. For example, use something other than prelude comparison operators, and these won't work!
I think if we have these tests anywhere they would need to be in the compiler with the JS backend because that's the only place this might make sense to validate.
|
Yeah, that's all fine, I'd completely forgotten about the previous discussion @anttih linked even though I participated. 😄 |
|
Can someone merge this? |
These tests rely on the
pursinliner to provide correct behavior. With this change we leave theOrdandEqNaNbehavior undefined. A backend can choose how comparisons withNaNwork.Fixes #306