-
Notifications
You must be signed in to change notification settings - Fork 236
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
Restricting equality to be less polymorphic than it is #510
Comments
Seems like basic type classes. JK reported a problem where polymorphic equality of bigints doesn't work; can we do something like:
So that the programmer can not only specify which types are comparable, but also specify a comparison function. |
We would also need a ghost version of op =, that allows logical reasoning about equality of types excluded by HasEq (such as arrows). |
If there was a #needs-metatheory tag this would be a great candidate. Type theory and a very fuzzy notion of equality don't really mix. |
@aseemr You might be talking about |
@msprotz : For the record, as per our discussion, |
The design of this feature is here: https://github.com/FStarLang/FStar/wiki/Deriving-hasEq-predicate-for-inductive-types,-and-types-of-equalities-in-F*. Comments and suggestions are most welcome. I can pass the F* universe regressions (in has_eq_impl branch). Issue project-everest/mitls-fstar#70 tracks the port of mitls to this change. |
I'm late to the party but what is the current status of this? |
@ad-l, as of few days back, F* universe regressions passed with this feature. Making it work for mitls needs some more work. I am hoping to get back to it later this week or early next week. |
This has been merged to the master branch. |
We should implement something like this:
The text was updated successfully, but these errors were encountered: