
I've found this problem to be largely solved when using the haskell language server with the emacs lsp mode — it just marks whatever call would throw a type error and gives you a (usually) reasonably short hint of what went wrong. So far I've also not seen any false alerts — but then I've only been using it for a week or so, so maybe I just haven't run into them yet. Of course, this doesn't really help if you really want to just use ghc by itself, but perhaps it would be possible to write some minimal client for the language server which just shows you the errors? Barring that, I guess you /could/ do something like $ ghc 2>&1 | grep "Couldn't match" -A 4 to get a list of type errors, but that's rarely actually useful ... stuebinm On 16.03.21 16:21, Carter Schonwald wrote:
I don’t think so! But it’s a great idea perhaps! How do other tools do it? And or is there a bread crumb you could do find next/previous match on the current output for? Or is that missing and the real issue to address?
On Tue, Mar 16, 2021 at 9:02 AM Ben Franksen
mailto:ben.franksen@online.de> wrote: Is there a way to tell ghc to print errors, especially type errors in a more concise way? Ideally one or two lines of text? I hate it when I have to scroll several pages of text just to see the next/previous error location.
Cheers Ben -- Niemand hat das Recht zu gehorchen. -- Hannah Arendt
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.
_______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.