[Haskell-cafe] Improving ghc error messages
Toby Goodwin
toby at paccrat.org
Thu Sep 18 07:13:37 UTC 2014
Interesting article: https://izbicki.me/blog/error-messages-in-ghc-vs-g++.html
I do hope some of these changes make it into a future ghc. I'd
particularly like to highlight this one:
No instance for (Show ([a0] -> Int)) arising from a use of `show'
Possible fix: add an instance declaration for (Show ([a0] -> Int))
The second line looks like it was added by someone who'd read an article
about making error messages helpful: "suggest a possible way to fix the
error". Like creating a Show instance for a function type!?!
I must have seen that "possible fix" 1000 times, and 999 of them it was
nothing like the right fix. Now I know just to ignore it. Simply removing
the second line would be an improvement: it doesn't add anything to the
first line.
Toby.
More information about the Haskell-Cafe
mailing list