Open yashrk opened 4 years ago
Running into this as well. Interestingly rtop does seem to generate ~/.reasoninit
:
/* Added by rtop */
let () =
try (Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")) {
| Not_found => ()
};
But it still tries to load the ~/.ocamlinit
and fails because of the same syntax errors you posted.
EDIT: looks like maybe the reasoninit file was left from an older install, I can't find any refs to it in the current rtop, but its there in the history.
The ~/.ocamlinit
value appears to be hard-coded in uTop's source code. We should probably create an issue there.
A workaround is to call rtop -init ~/.rtopinit
in a wrapper shell script.
Thanks @domq!
For the lazy among us:
alias rtop="rtop -init ~/.rtopinit"
After installing
utop
withopam
I have the following~/.ocamlinit
:With this
~/.ocamlinit
myrtop
unsurprisingly fails withBut if I replace default
~/.ocamlinit
withas suggested at https://reasonml.chat/t/rtop-and-ocamlinit-syntax-errors-and-confusion/1813, this (also unsurprisingly) breaks
utop
:Can
rtop
use something like~/.reasonmlinit
or (preferrably) use~/.ocamlinit
converted on-the-fly withrefmt
?