I have installed a few packages using opam, such as Core and Batteries. The ocamlinit file is as follows:
(* Added by OPAM. *)
#use "topfind"
#thread
#camlp4o
#require "core.top"
#require "core.syntax"
#require "batteries"
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
When I run this with utop I can see the modules for Batteries but I cannot see any of the modules for Core. When I try to do open Core
or open Core.Std
I get an unbound module error. I also tried adding in #require "core"
and the error persisted.
I'm not sure what the error is since I followed the installation instructions from the book "Real World OCaml".
I also see two messages when I start off utop:
No such package: oUnit" - required by `pa_ounit'"
No such package: pa_pipebang" - required by `core.syntax'"
I'm not sure if these are related to the problem but when I do opam list ounit
and opam list pipebang
it shows them as installed.