Though there are diverse tools for Haskell development many are not widely advertised; here I collect those I use.
GHC is the Haskell compiler that I use. It has various profiling options.
:ctags in GHCi to generate tagfiles for Vim.
You can get a stack trace on your Haskell programs by passing
an rts option, viz.
./my-binary +RTS -xc
my-binary must be a compiled for profiling (see below)
cabal-install is the build tool I use.
Generate a profiling build with
cabal build -p --enable-profiling
and generate a static executable with
You can verify that none of your dependency bounds are out-of-date with
cabal can be used as a script interpreter (see here), and it supports project dependencies on a source control repository (example).
To build with coverage:
cabal build --enable-coverage
cabal test --enable-coverage
This will generate a coverage report, pointing out which functions and conditions are not vetted by your test suite.
This converts a heap profile (
.hp) to a graph written as an SVG file. The
graphs are legible, unlike those written by
pointfree is a command-line tool that can give hints on how to write various things in pointfree style.
doctest occasionally. It ensures documentation examples are correct
hlint is a linter for Haskell. It supports custom hints via a configuration file.
Hoogle is a search engine that can work on type signatures. The web frontend is here.
There is a command-line version available from Hackage
stylish-haskell is a code formatter for Haskell.
I have apply-refact installed because hlint uses it to automatically refactor.
ThreadScope is a tool to debug performance of parallel programs.
More on the Haskell wiki.
Haddock is the documentation generator for Haskell. It is distributed with GHC. Run it with
This is a tool to safely generate Haskell bindings to C code. It can read
C header files and generate
foreign import … declarations.
See Edward Yang's blog posts and the wiki for more detail.
Happy is a parser generator for Haskell; it integrates with Alex. In my experience it is far better than using a parser combinator library for parsing programming languages; it is also more performant.
Pay special attention to parametric productions, which provide some of the ease of parser combinators.
Alex is a lexer generator for Haskell. It generates faster lexers than parser combinator libraries.
Syntax highlighting extensions for vim that makes
.chs files look sensible.
Syntax highlighting and detection of
∀ (for instance) when not editing that particular line.
Integrates with hlint.
Hoogle integration for Vim.
Syntax highlighting for hspec.
A Vim plugin for pointfree.