Add findlib predicate pkg_utop
This allows required packages to distinguish whether they are loaded in regular toplevel or in utop, and thus call Toploop functions or those in UTop.
This commit is contained in:
parent
970b308126
commit
ff18d998b5
|
@ -725,6 +725,7 @@ let () =
|
|||
(* "utop" is an internal library so it is not passed as "-package"
|
||||
to "ocamlfind ocamlmktop". *)
|
||||
Topfind.don't_load ["utop"];
|
||||
Topfind.add_predicates ["pkg_utop"];
|
||||
(* Add findlib path so Topfind is available and it won't be
|
||||
initialized twice if the user does [#use "topfind"]. *)
|
||||
Topdirs.dir_directory (Findlib.package_directory "findlib");
|
||||
|
|
Loading…
Reference in New Issue