-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make comparison operators polymorphic; Add != operator #62
Conversation
Another thought: I think this makes the most sense for |
@gfngfn Thoughts on this one? I would find it very handy to have at least polymorphic |
I’m sorry for not having been available for a while including end/new-year holidays… I will welcome this modification! I at first preferred that equality functions be defined only for values of the types on which the equality can be computable. For instance, since the equality between function abstractions is not computable in general or even does not make sense from some point of view, I did not like On second thought, however, I have come to think that it is not necessary to adhere to the idea above. For example, it is cumbersome to define equality functions on tuples for each product type. Some functionality like Haskell’s |
@gfngfn No worries! Should I revert a part of my change and make |
Oops, I forgot to mention the inequality operators in addition to
Not at all. I would certainly like to use your change! |
By the way, is it more appropriate to compile Sesterl’s |
The difference seems to be only when comparing float vs int (and values that contain them). I didn't think it matters here because I made the operators |
PR updated to do that. |
closes #60
I think this should do it? In Erlang the operators should work on any type. In fact it could be even
'a, 'b -> bool
but I don't think this is leveraged often and with'a 'a
user will see at compile time that they are trying something unusual.I can add a test file if you want