Hacking on GHC Has Never Been Easier!
At ZuriHac 2019 Matthew Pickering talked about tools for working on GHC. There’s an associated blog post which is also well worth reading.
I wanted to focus on a small part of his presentation, which is about loading
GHC into GHCi and
ghcid to automatically reload
GHC on changes. This has been possible for almost a year now, as described in
this blog post by Michael Sloan. It
has since been improved to be even easier to use!
Putting this together with Alp Mestanogullari’s
ghc.nix, it’s now possible to
provision a GHC development environment from scratch with just a few commands,
assuming that you have
Here they are:
$ git clone --recursive https://gitlab.haskell.org/ghc/ghc/ $ cd ghc $ git clone https://github.com/alpmestan/ghc.nix $ cabal update $ nix-shell ghc.nix/ --run './boot && ./configure && ghcid'
This will take a while the first time, but
ghcid will cache generated
./hadrian_ghci so even quitting and reloading will be
Congratulations, you are now a GHC developer!