summaryrefslogtreecommitdiff
path: root/toplevel/topdirs.ml
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2021-06-07 20:46:04 +0100
committerDavid Allsopp <david.allsopp@metastack.com>2021-06-07 20:46:04 +0100
commitf3d9587c30b079b234c374ecc989e5899858daf3 (patch)
treea28b64b64060cada40bed48bc77e72a86690d7f9 /toplevel/topdirs.ml
parent3d52bcad845b5a5c33bf8126bafb13b36c1e6ce9 (diff)
downloadocaml-f3d9587c30b079b234c374ecc989e5899858daf3.tar.gz
Fix #directory in the toplevel
The #directory directive now uses Load_path.prepend_dir which adds the directory given to the _start_ of the load path (i.e. overriding everything already loaded). This is slightly more intuitive for the toplevel, consistent with the previous (undefined) behaviour, and also consistent with treatment of the directory for the DLL search path.
Diffstat (limited to 'toplevel/topdirs.ml')
-rw-r--r--toplevel/topdirs.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml
index 72f87164f7..9368ebf262 100644
--- a/toplevel/topdirs.ml
+++ b/toplevel/topdirs.ml
@@ -77,7 +77,7 @@ let dir_directory s =
let d = expand_directory Config.standard_library s in
Dll.add_path [d];
let dir = Load_path.Dir.create d in
- Load_path.append_dir dir;
+ Load_path.prepend_dir dir;
toplevel_env :=
Stdlib.String.Set.fold
(fun name env ->