diff options
| author | Hugo Herbelin | 2020-07-13 10:42:37 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2020-11-15 09:55:05 +0100 |
| commit | 69a3d310349eb3697b037cb4c8637cec408802ee (patch) | |
| tree | 32a35f92ee4265f4adfe30d2af406d06f9086f57 /interp/constrintern.ml | |
| parent | a118b906b3da7cb2e03a72f7a8079a7fc99c6f84 (diff) | |
Propagating scope information in indirect application to a reference.
This allows the following to interpret "0" in the expected scope:
Notation "0" := true : bool_scope.
Axiom f : bool -> bool -> nat.
Record R := { p : bool -> nat }.
Check (@f 0) 0.
Check fun r => r.(@p) 0.
Diffstat (limited to 'interp/constrintern.ml')
| -rw-r--r-- | interp/constrintern.ml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 06cf19b4f7..28bb7ee506 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -2092,9 +2092,13 @@ let internalize globalenv env pattern_mode (_, ntnvars as lvar) c = assert (Option.is_empty isproj); let c = intern_notation intern env ntnvars loc ntn ntnargs in find_appl_head_data c, args - | _ -> assert (Option.is_empty isproj); (intern_no_implicit env f,[],[]), args in - apply_impargs c env impargs args_scopes - args loc + | _ -> + assert (Option.is_empty isproj); + let f = intern_no_implicit env f in + let f, _, args_scopes = find_appl_head_data f in + (f,[],args_scopes), args + in + apply_impargs c env impargs args_scopes args loc | CRecord fs -> let st = Evar_kinds.Define (not (Program.get_proofs_transparency ())) in |
