Skip to content

Commit

Permalink
Alternate proposed API for toplevel
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Jun 7, 2022
1 parent e8fe890 commit 407e9fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/uTop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ let () =
let get_load_path () = Load_path.get_paths ()
#if OCAML_VERSION >= (5, 0, 0)
let set_load_path path =
Load_path.init path ~auto_include:(fun _ _ -> raise Not_found)
Load_path.init path ~auto_include:Load_path.no_auto_include
#else
let set_load_path path = Load_path.init path
#endif
Expand Down
5 changes: 3 additions & 2 deletions src/lib/uTop_main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1371,9 +1371,10 @@ let emacs_mode = ref false
let preload = ref []

let prepare () =
Toploop.set_paths ();
#if OCAML_VERSION >= (5, 0, 0)
Load_path.(init ~auto_include:(fun _ _ -> raise Not_found) (get_paths ()));
Toploop.set_paths ~auto_include:Load_path.no_auto_include ();
#else
Toploop.set_paths ();
#endif
try
let ok =
Expand Down

0 comments on commit 407e9fc

Please sign in to comment.