aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/nametab.ml
diff options
context:
space:
mode:
authorGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-03-22 01:14:50 +0100
committerGravatar Emilio Jesus Gallego Arias <e+git@x80.org>2017-11-29 14:59:29 +0100
commitc408e819ce39b27f0842c84b1b24c585ac5b6086 (patch)
treea3dac227a23d098e70c7d74bd719f93f3cc6724c /library/nametab.ml
parent437f20f0a1c2717cd7baae52e2ab20750dd9d4fb (diff)
[lib] [api] Introduce record for `object_prefix`
This is a minor cleanup adding a record in a try to structure the state living in `Lib`.
Diffstat (limited to 'library/nametab.ml')
-rw-r--r--library/nametab.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/library/nametab.ml b/library/nametab.ml
index 0ec4a37cd..222c4cedc 100644
--- a/library/nametab.ml
+++ b/library/nametab.ml
@@ -359,8 +359,8 @@ let push_modtype vis sp kn =
let push_dir vis dir dir_ref =
the_dirtab := DirTab.push vis dir dir_ref !the_dirtab;
match dir_ref with
- DirModule (_,(mp,_)) -> the_modrevtab := MPmap.add mp dir !the_modrevtab
- | _ -> ()
+ | DirModule { obj_mp; _ } -> the_modrevtab := MPmap.add obj_mp dir !the_modrevtab
+ | _ -> ()
(* Locate functions *******************************************************)
@@ -386,17 +386,17 @@ let locate_dir qid = DirTab.locate qid !the_dirtab
let locate_module qid =
match locate_dir qid with
- | DirModule (_,(mp,_)) -> mp
+ | DirModule { obj_mp ; _} -> obj_mp
| _ -> raise Not_found
let full_name_module qid =
match locate_dir qid with
- | DirModule (dir,_) -> dir
+ | DirModule { obj_dir ; _} -> obj_dir
| _ -> raise Not_found
let locate_section qid =
match locate_dir qid with
- | DirOpenSection (dir, _)
+ | DirOpenSection { obj_dir; _ } -> obj_dir
| DirClosedSection dir -> dir
| _ -> raise Not_found