GHCi Colouriser
Posted on September 22, 2015
by Noon van der Silk
Behold, a colourful GHCi (install it for yourself):
This is done by using a simple little sed
wrapper around the ordinary ghci --interactive
,
see here for the script.
Note in particular the quirk that we must capture any SIGINT
that gets sent through and discard it, when we are invoking sed
, otherwise sed
itself will quit and our GHCi session will break.
You can use it cabal repl
(being mindful of this bug) by using cabal repl --with-ghc=ghci-color
. I’ve bound an alias repl
to this.
(Note: original credit for this goes to rhysd)