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
Number Notation typechecking shouldn't enable elaboration #15843
Comments
One option to fix this is wait for #15845 , then add an option to disable coercions to and finally use it in number notations. Another option is to rewrite the code of number notation to not work with constr_expr, but rather constr, and hence short-circuit the elaborator (which does not seem to be needed, really). |
Why not globref? Not sure why constr would work better tbh. |
Note that there are examples in the test-suite with holes, so not sure how constr would work here: coq/test-suite/output/NumberNotations.v Line 775 in d225e17
|
That's only on the type argument, not the functions though. |
The code does type check the two functions against |
The issue is that
Number Notation
acceptNat.of_num_int
as a complete function (of type_ -> nat
) instead of a partial one (of type_ -> option nat
) because its typechecking enable to elaborate the parsing functionNat.of_num_int
tofun u => nat_of_option (Nat.of_num_int u)
which is a complete parsing function, but still uses the unelaboratedNat.of_num_int
as parsing function.I think that
Number Notation
typechecking should just forbid elaboration (otherwise it elaborates new parsing/printing functions that are completely hidden to the user).The text was updated successfully, but these errors were encountered: