How to exploit ./hadrian/ghci to find errors quickly?
tom-lists-haskell-cafe-2017 at jaguarpaw.co.uk
Fri Jan 28 17:00:29 UTC 2022
On Fri, Jan 28, 2022 at 11:52:00AM -0500, Norman Ramsey wrote:
> > My recommendation: ./hadrian/ghci.
> I'm about to change a type definition. This change may wreak havoc in
> many parts of GHC, and this is exactly what I want: I'm looking for
> type-error messages that will tell me what code I need to fix.
> I do this work in emacs using `M-x compile` and `next-error`. The key
> property is that `next-error` requires just a couple of keystrokes
> (C-x `) and it makes Emacs take me to the relevant source-code
> location quickly.
> But telling `M-x compile` to run `./hadrian/build` is quite slow. Is
> there a way to leverage `./hadrian/ghci` for this workflow?
Are you familiar with dante-mode for Emacs? It relies on ghci behind
the scenes to point out type errors in Emacs Haskell buffers. You
might find it convenient even if only for this single-purpose use
case. I wrote up how I use dante:
You will have to `M-x customize-group dante` to set the GHCi path to
More information about the ghc-devs