diff options
author | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-09-29 10:26:08 +0200 |
---|---|---|
committer | Guillaume Melquiond <guillaume.melquiond@inria.fr> | 2015-09-29 10:26:08 +0200 |
commit | da4d0b0e3d82621fe8338dd313b788472fc31bb2 (patch) | |
tree | 63448dd2a406493ab0a5ae98e09d1e55282053cb /library/library.ml | |
parent | 2cf609c41f7af83d9eaf43308a368fcb7307e6fa (diff) |
Remove some uses of Loadpath.get_paths.
The single remaining use is in library/states.ml. This use should be
reviewed, as it is most certainly broken.
The other uses of Loadpath.get_paths did not disappear by miracle though.
They were replaced by a new function Loadpath.locate_file which factors
all the uses of the function. This function should not be used as it is as
broken as Loadpath.get_paths, by definition.
Vernac.load_vernac now takes a complete path rather than looking up for
the file. That is the way it was used most of the time, so the lookup was
unnecessary. For instance, Vernac.compile was calling Library.start_library
which already expected a complete path.
Another consequence is that System.find_file_in_path is almost no longer
used (except for Loadpath.locate_file, obviously). The two remaining uses
are System.intern_state (used by States.intern_state, cf above) and
Mltop.dir_ml_load for dynamically loading compiled .ml files.
Diffstat (limited to 'library/library.ml')
-rw-r--r-- | library/library.ml | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/library/library.ml b/library/library.ml index 6d7b0f603..f5c7f6335 100644 --- a/library/library.ml +++ b/library/library.ml @@ -652,9 +652,7 @@ let start_library f = ldir let load_library_todo f = - let paths = Loadpath.get_paths () in - let _, longf = - System.find_file_in_path ~warn:(Flags.is_verbose()) paths (f^".v") in + let longf = Loadpath.locate_file (f^".v") in let f = longf^"io" in let ch = System.with_magic_number_check raw_intern_library f in let (s0 : seg_sum), _, _ = System.marshal_in_segment f ch in |