-
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
Erase functions to fun #3661
base: master
Are you sure you want to change the base?
Erase functions to fun #3661
Conversation
Check-world found two interesting regressions:
|
I guess I am the Inria folk who like to treat warning as errors (sorry!), I can disable some more warnings if needed. I am doing this mainly because I was annoyed by the many warnings that shouldn't be warnings (e.g. #2705), but also because I think it's best practice (e.g. to ensure we don't have the proof splitting warning sprinkled throughout the project) |
Sorry, that wasn't meant negatively at all! The F* library has lots of warnings too, and I agree it would be nicer to avoid them in the first place. |
No worries, didn't take that negatively! |
This only works if extraction can see through the type definitions, in general this requires `--cmi`. Fixes #3366
2ca268c
to
292723c
Compare
Currently all erasable terms are erased to unit. This changes the
non_informative
function to return anoption term
instead ofbool
. This optional term specifies what the type should be erased to. For example,non_informative `(unit -> prop)
returnsSome `(fun _ -> ())
.There are no user-facing changes, you still write
[@@erasable] val foo ...
as before. This PR also makes themust_erase_for_extraction
attribute a (deprecated) alias oferasable
.Fixes #3366. (only when
--cmi
is enabled, but we're planning to make that the default anyhow)