Work in progress!
(OPAM package coming soon.)
opam pin add BetterErrors https://github.com/chenglou/BetterErrors.git
This'll expose a
huh command, for you to use like so:
ocamlc myApp.ml |& huh
|& is a bash shortcut for
2>&1 | (not available in vanilla sh), which, in turn, means "pipe the stuff from stderr into stdout, then pipe it back into stdin of the next command".
huh takes in this info and searches for errors to pretty-print back.
git clone this repo,
cd into it, then run:
git clone https://github.com/chenglou/BetterErrors.git ./BetterErrors cd ./BetterErrors make opam pin add BetterErrors ./
betterErrorsShell.byte is the locally generated script that's the same as the production