Now that Homebrew (as of this writing) downloads version 4.03 of OCaml, that ultimately breaks installation of Emily using this tap. Eventually, you'll encounter an error involving sedlex, namely that the version needed for Emily is incompatible with OCaml 4.03.0, and only works with a 4.02.x version. So... you need to manually download, compile, and install a bunch of things.
The first thing you need to do is get a hold of OCaml 4.02.3 here because you can't get earlier versions of things via Homebrew. Once downloaded, move into that directory and run the following:
./configure
make world.opt
make install
Just to make sure everything worked, run which ocaml
and ocaml -version
.
Next, grab OPAM here. You can't use Homebrew because it will try to download the latest version of OCaml and you'll be back at square one again. Then run these:
./configure
make lib-ext
make
make install
Likewise, and if you're paranoid like me, run which opam
and opam --version
to see that everything is ok.
Run the following so that you can properly download, compile, and install OCaml packages via OPAM and with the correct version of OCaml:
opam init
eval (opam config env)
opam switch 4.02.3
Get the latest version (0.3b as of this writing) here. Then run the following:
opam install ocamlfind ctypes ctypes-foreign sedlex containers fileutils ppx_getenv ppx_const uutf
make
make install
If all went well, you should be able to run emily -i
and start evaluating things!