How to exploit ./hadrian/ghci to find errors quickly?

Sebastian Graf sgraf1337 at gmail.com
Fri Jan 28 18:02:04 UTC 2022


This is the typical use case for a language server.
I have haskell-language-server installed and use it extensively on GHC 
for stuff like jump to definition and immediate compilation feedback.
There's also "jump to next error" if you want that.

Installation was pretty trivial for me, just flipping this switch in my 
local ghc.nix clone: 
https://github.com/alpmestan/ghc.nix/blob/88acad6229300d8917ad226a64de80aa491ffa07/default.nix#L19
You will probably have to install an LSP plugin for emacs first.

The hour or so I invested on initial setup has probably saved me several 
days already.

Sebastian

------ Originalnachricht ------
Von: "Norman Ramsey" <nr at cs.tufts.edu>
An: ghc-devs at haskell.org
Gesendet: 28.01.2022 17:52:00
Betreff: How to exploit ./hadrian/ghci to find errors quickly?

>  > My recommendation: ./hadrian/ghci.
>
>Richard, this suggestion has been so useful that I would like to
>follow it up.
>
>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?
>
>
>Norman
>_______________________________________________
>ghc-devs mailing list
>ghc-devs at haskell.org
>http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs



More information about the ghc-devs mailing list