aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp
diff options
context:
space:
mode:
authorGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2016-08-18 18:47:55 +0200
committerGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2016-08-18 18:47:55 +0200
commit262ad3c3ce24463094110aa011471213ac0b61c7 (patch)
tree937fc304508e241871ef6050db53f9fec8850e99 /interp
parent86935e33e8f5d4fcc4b5603086d594431a002d0b (diff)
Fix incorrect glob data for module symbols (bug #2336).
The logic was backward: if the path of a symbol was a prefix of the current path, then the current path (without sections) was used. But what we want is that, if the current path (without sections) is a prefix of the path of a symbol, then the former should be used. This fixes about 1,600 broken links in the documentation of the standard library.
Diffstat (limited to 'interp')
-rw-r--r--interp/dumpglob.ml5
1 files changed, 3 insertions, 2 deletions
diff --git a/interp/dumpglob.ml b/interp/dumpglob.ml
index 85212b7ab..d70d30d9e 100644
--- a/interp/dumpglob.ml
+++ b/interp/dumpglob.ml
@@ -127,9 +127,10 @@ let type_of_global_ref gr =
| Globnames.ConstructRef _ -> "constr"
let remove_sections dir =
- if Libnames.is_dirpath_prefix_of dir (Lib.cwd ()) then
+ let cwd = Lib.cwd_except_section () in
+ if Libnames.is_dirpath_prefix_of cwd dir then
(* Not yet (fully) discharged *)
- Libnames.pop_dirpath_n (Lib.sections_depth ()) (Lib.cwd ())
+ cwd
else
(* Theorem/Lemma outside its outer section of definition *)
dir