Name holes in detyping - #925
Conversation
|
@gares I am not too sure what to do about the 3rd point in your guidelines since there no |
|
thanks! It seems that the detyping code is also used for the API corresponding to Also, I had a memory that the first occurrence in some traversal has to be flagged (I guess the bool argument). |
|
|
||
| let x = aux (names_of_env env, env) t in | ||
| x | ||
| let x = aux (names_of_env env, env) Evar.Set.empty t in |
There was a problem hiding this comment.
Note that detype takes a sigma. The set of evar names may be non-empty (it is in sigma) and you should start from that, or better avoid collisions. Maybe it is a set of names and not a set of evar number you have to carry.
If you know the context & type of the evar it may be possible to declare it upfront. If you want to let them be inferred I don't think it's possible. |
|
Because the pretyper wants a glob, and the abbreviation API also wants a glob. A full discussion is off topic here, I just point out that the elaborator (pretyper) should work on econstr but because of the mess in deep match elaboration it is not easy to split that part into a glob -> econstr step. I think it is possible though, and would make Typing completely redundant (would amount to pretyping with coercions off). |
|
If you have a constr why do you want to call the pretyper on it? |
For example to insert coercions. |
|
So it's an invalid constr? |
src/rocq_elpi_utils.ml/detypenow turns identical evars into identical holes.Fixes #919