diff options
| author | Maxime Dénès | 2020-08-23 19:19:05 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2020-08-23 19:19:05 +0200 |
| commit | 98734a2d5ad419b99777dfd546ef482b5986cfda (patch) | |
| tree | 52cf561255038e011a19df13425350b8ecacc7ce /plugins/extraction/common.ml | |
| parent | 692b2de5009ba49bca72b19091ea6294b813777b (diff) | |
| parent | 1b8ce11a8cca8deca4409fa9e9e2c8d56e9180f2 (diff) | |
Merge PR #12851: Extraction: At declaration point of a global, use its declaring name
Reviewed-by: maximedenes
Diffstat (limited to 'plugins/extraction/common.ml')
| -rw-r--r-- | plugins/extraction/common.ml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index 4a41f4c890..d215a7673d 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -604,6 +604,13 @@ let pp_global k r = | Haskell -> if modular () then pp_haskell_gen k mp rls else s | Ocaml -> pp_ocaml_gen k mp rls (Some l) +(* Main name printing function for declaring a reference *) + +let pp_global_name k r = + let ls = ref_renaming (k,r) in + assert (List.length ls > 1); + List.hd ls + (* The next function is used only in Ocaml extraction...*) let pp_module mp = |
