Note: please use triple-backticks to surround code samples to format them correctly. Eg
utop # open Base;;
- The .ocamlinit file is in my C:\Users\User_Name directory
I am fairly sure this is not correct. It should be something like %USERPROFILE%\AppData
. But I’m unable to find any documentation on this. I recommend experimenting a bit to see what works.
Error (warning 33 [unused-open]): unused open Base.
This is correct. You opened the module but didn’t use it in the file so far, hence the warning. The warning goes away once you start using the stuff defined in Base
.
utop # open Base;;
Error: Unbound module Base
This is also correct. You didn’t ‘require’ the library before trying to open its module. Try:
$ utop -require base
utop # open Base;;;
EDIT: related issue? utop/init.ml does not respect XDG on Windows · Issue #451 · ocaml-community/utop · GitHub