[ANN] ocaml-annot for binary annotations

If, like me, you loved the convenience of ocaml-annot from a time where annotations were stored as mere text files, you might want to try ocaml-bin-annot, that does about the same thing with binary annotations.

In other words, bin-annot -type lineno colno file.cmt will print the type at the given location, which comes handy in an editor and much simpler to configure than merlin.

I haven’t tested on many cases or many compilers yet though, it’s still only a one day project so do not expect too much.

The main differences that I can see between annot and bin-annot:

  • bin-annot is tied to a specific version of the OCaml compiler because of Marshalled cmt files, whereas annot can be installed once and forgotten;
  • bin-annot is ten times larger than annot, again because it has to embed the compiler libs.
1 Like