diff options
| author | Hugo Herbelin | 2020-05-30 20:49:33 +0200 |
|---|---|---|
| committer | Hugo Herbelin | 2020-08-18 23:27:26 +0200 |
| commit | 1b8ce11a8cca8deca4409fa9e9e2c8d56e9180f2 (patch) | |
| tree | 1a61ebe73fe9edd6dc161414c6026257fcdffdba /plugins/extraction/common.mli | |
| parent | aa926429727f1f6b5ef07c8912f2618d53f6d155 (diff) | |
Extraction: At declaration point of a global, use its declaring name.
If we need to print the name of an inlined constant (as in "let name =",
"val name :" or "type name ="), we need its name without inlining nor
qualification.
In particular, we introduce a function pp_global_name to make it
clearer that printing a name at declaration point of a global is only
about printing the basename (formerly, Common.pp_global was correctly
printing the basename without qualification thanks to the
"top_visible_mp ()" test, but OCaml.pp_global was wrongly inlining).
Diffstat (limited to 'plugins/extraction/common.mli')
| -rw-r--r-- | plugins/extraction/common.mli | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/extraction/common.mli b/plugins/extraction/common.mli index 0bd9efd255..a482cfc03d 100644 --- a/plugins/extraction/common.mli +++ b/plugins/extraction/common.mli @@ -55,6 +55,7 @@ val opened_libraries : unit -> ModPath.t list type kind = Term | Type | Cons | Mod val pp_global : kind -> GlobRef.t -> string +val pp_global_name : kind -> GlobRef.t -> string val pp_module : ModPath.t -> string val top_visible_mp : unit -> ModPath.t |
