Skip to content

Commit

Permalink
Adapt to coq/coq#19310 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
proux01 authored Jul 14, 2024
1 parent 126561c commit c1caa08
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/coqutil/Tactics/reference_to_string.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ Ltac2 reference_of_constr c :=
Ltac2 constr_string_basename_of_reference r :=
constr_string_of_string (Ident.to_string (List.last (Env.path r))).
Ltac2 constr_string_qualname_of_reference r :=
constr_string_of_string (String.join "." (List.map Ident.to_string (Env.path r))).
match Ident.of_string "Stdlib" with
| None => constr_string_of_string ""
| Some ident_Stdlib =>
constr_string_of_string (String.join "." (List.map (fun x => if Ident.equal x ident_Stdlib then "Coq" else Ident.to_string x) (Env.path r)))
end.
(* replace above hack by definition below when requiring Coq >= 8.21 *)
(* constr_string_of_string (String.join "." (List.map Ident.to_string (Env.path r))). *)
Ltac2 constr_string_basename_of_constr_reference c :=
constr_string_basename_of_reference (reference_of_constr c).
Ltac2 constr_string_qualname_of_constr_reference c :=
Expand Down

0 comments on commit c1caa08

Please sign in to comment.