aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/library.ml
diff options
context:
space:
mode:
Diffstat (limited to 'library/library.ml')
-rw-r--r--library/library.ml7
1 files changed, 5 insertions, 2 deletions
diff --git a/library/library.ml b/library/library.ml
index e4169d66e..95b817d0a 100644
--- a/library/library.ml
+++ b/library/library.ml
@@ -587,8 +587,11 @@ let import_module export modl =
| [] -> ()
| modl -> add_anonymous_leaf (in_import_library (List.rev modl, export)) in
let rec aux acc = function
- | m :: l ->
- (match safe_locate_module m with
+ | (loc,dir as m) :: l ->
+ let m,acc =
+ try Nametab.locate_module dir, acc
+ with Not_found-> flush acc; safe_locate_module m, [] in
+ (match m with
| MPfile dir -> aux (dir::acc) l
| mp -> flush acc; Declaremods.import_module export mp; aux [] l)
| [] -> flush acc