I want to use the common Base library in a
OCaml repl. I’ve installed it via
opam in the shell:
opam install base
The installation seemingly was successful. When I try to re-install it, I get the following message:
[NOTE] Package base is already installed (current version is v0.15.1).
But adding it to a
(library (name mylib) (libraries base))
and then trying to run the project results in
> dune build File "lib/dune", line 3, characters 12-16: 3 | (libraries base)) ^^^^ Error: Library "base" not found. -> required by library "mylib" in _build/default/lib -> required by executable main in bin/dune:3 -> required by _build/default/bin/main.exe -> required by alias bin/all -> required by alias default exit status 1
Can somebody help me out, please?
I’ve just discovered that I can use
Base if I run the
dune build and
dune exec ... commands on the command line. So how should I change the repl configuration such that the
Run button does the same? The commands in the
.replit file look exactly like the ones I’m using in the shell?