First you need to export the correct environment variables by doing the following:
eval `opam config env`
To be more efficient, you should put this line in your ~/.profile (or ~/.bashrc ).
Then, if you use the system compiler, you can add these lines to your ~/.ocamlinit :
let () = try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") with Not_found -> ()
We are working to improve this process until release 1.0.
source share