In my project I have a file that uses Core.Std stuff, so I have run
opam install core
and added
open Core.Std
in my file.
When I run
ocamlbuild myprogram.native
it says:
Error: Unbound module Core
pointing to line with the open statement above.
So, I try this:
ocamlbuild -use-ocamlfind -pkgs core.std myprogram.native
and get the following message:
ocamlfind: Package `core.std' not found
So I thought that maybe I needed to run opam install core.std as well, but apparently there is no such thing according to opam. I also tried "open Core.Std;;" in the ocaml repl, but that did not work either. Any ideas?
You can either use
corebuild
which is usually shipped with this library or, you can try this:P.S. use
ocamlfind list
command to view the list of available packages.P.P.S. In addition to
corebuild
they usually shipcoretop
, a script that allows you to run core-enabled top-level. It usesutop
underneath the hood, so make sure that you have installed it withopam install utop
(if you're usingopam
), before your experiments.