Hello,
I’m developing an OCaml script and I’m having trouble importing an external module (in this case, it’s the Unix module, but I have encountered this problem with any module). The problem is as follows: when I open the OCaml console (ocaml
from the terminal), the library is successfully imported with the command open Unix;;
. However, when I try to import Unix through my script (let’s call it node.ml
) with the command #use "node.ml";;
, I get stuck. I have tried several things, including: confirming that Unix is installed; exporting the Unix path in ~/.bashrc
(on OS X); and trying to use the utop
toplevel manager instead of the standard one, but none of these solutions have worked. Has anyone else encountered this issue before? I have attached a reproduction of the problem in the command prompt below.
Thanks.