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

Adapt to coq/coq#18422 (indirect accessor handled through vernactypes) #756

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion language-server/dm/documentManager.ml
Original file line number Diff line number Diff line change
Expand Up @@ -469,14 +469,27 @@ let locate st pos ~pattern =
Ok( pp_of_coqpp @@ Notation.locate_notation
(Constrextern.without_symbols (Printer.pr_glob_constr_env env sigma)) ntn sc)

[%%if coq = "8.18" || coq = "8.19"]
let print st pos ~pattern =
let loc = RawDocument.loc_of_position (Document.raw_document st.document) pos in
match get_context st pos with
| None -> Error("No context found")
| Some (sigma, env) ->
| Some (sigma, env) ->
let qid = parse_entry st loc (Pcoq.Prim.smart_global) pattern in
let udecl = None in (*TODO*)
Ok ( pp_of_coqpp @@ Prettyp.print_name env sigma qid udecl )
[%%else]
let print st pos ~pattern =
let loc = RawDocument.loc_of_position (Document.raw_document st.document) pos in
match get_context st pos with
| None -> Error("No context found")
| Some (sigma, env) ->
let qid = parse_entry st loc (Pcoq.Prim.smart_global) pattern in
let udecl = None in (*TODO*)
let access = Library.indirect_accessor[@@warning "-3"] in
SkySkimmer marked this conversation as resolved.
Show resolved Hide resolved
Ok ( pp_of_coqpp @@ Prettyp.print_name access env sigma qid udecl )
SkySkimmer marked this conversation as resolved.
Show resolved Hide resolved
[%%endif]


module Internal = struct

Expand Down
Loading