Skip to content
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

Stricter --MLish: no subtyping via has_type guards #3155

Merged
merged 9 commits into from
Dec 11, 2023

Conversation

mtzguido
Copy link
Member

No description provided.

@mtzguido
Copy link
Member Author

This PR makes the --MLish --lax mode more strict by disabling smt_ok for check_subtyping queries in Rel. This find a couple more stray type errors and fixes the problem in #3151 which is now not accepted. Two things to note:

1- We will now reject stuff like coerce #a #b (x:a) : b = x. Note this means we cannot check prims in --MLish --lax mode because of heterogeneous equality and Pervasives due to coerce_eq. Our build avoids this, but manually running --MLish --lax will likely fail there are .checked.lax files for the library already.
2- We will now run into #65, where a nat & bool is not a int & bool. There are a few places in the compiler where this was happening, mostly because List.length returns a nat. Adding an : int annotation solves it.

Fixes #3151

@mtzguido mtzguido merged commit c5e1ce6 into FStarLang:master Dec 11, 2023
2 checks passed
@mtzguido mtzguido deleted the 3151 branch December 11, 2023 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant