You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Eq might make sense, though I don't really see the point (there is no specific relation between Eq and Num that you want to express, beyond the blanket fact that functions must respect the Eq instance, which is not specific to Num).
The problem with Ord is more thorny. If, on the one hand, we may want to express some kind of ordered semiring property that way (there are standard notions), they are not respected by our numbers. On integer type, because arithmetic module 2^n doesn't have an order compatible with addition (a ⩽ b ⟺ a+c ⩽ b+c, if, e.g.a+c wraps around but not b+c, it will simply not hold). On floating point types because the Ord instance is a bit artificial on floating point numbers (also, generally, it's hard to give well-behaved laws to something which has infinities and NaNs).
I doubt that we can make this meaningfully, so probably, we shouldn't add this extra constraint.
I'm closing this because I think Num.Linear is too complicated and needs to be simplified, at which point, this issue would be resolved anyway. I will probably make an issue about Num at some point.
Figure the following out:
The text was updated successfully, but these errors were encountered: