purescript / purescript-prelude

The PureScript Prelude

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Number is not a fully law abiding instance of Ord

JamieBallingall opened this issue · comments

Number is not a fully law abiding instance of the class Ord because NaN inhabits Number but NaN <= NaN evaluates to false (i.e., is not reflexive).

This issue is similar to Number not being a fully law abiding instance of Eq, which is handled with a comment in the class definition. I propose a similar approach here.