It sucks that talking about this comes across as trashing, but maybe we can look over these things together and build up more understanding of the different experiences people have. Thank you also, for your work on GHC, I hope you do not hear these discussions of error messages as personally offensive, we just want to help improve GHC as well!
GHC’s errors are really great if you understand enough about GHC and what it’s telling you. However, if you do not know what the message is telling you, GHC’s error messages are also a very real source of frustration. As a result, learning haskell on your own is a not fun experience, and learning haskell efficiently requires at least a couple mentors.
As you build your experience with Haskell, you learn to interpret the feedback from GHC, but it is more of a sixth sense than anything concrete. This isn’t simply an issue of “not enough experience”. I’ve even specifically asked various mentors of mine about that (“how did you know you needed X here?”, “oh, I kinda guessed, but it also sorta fits the situation”). There’s some stink here to tend to.
This is especially true as an intermediate novice, where you are more adept at getting yourself into code that is a bit over your head.
For example, I’m still not all that great with the details of monad and applicative-do, and a bunch of the errors I’ve seen recently made little sense, though I was able to intuit that I needed to prefix a few lines with pure $
(I can see why, but I don’t yet understand why). I was not “consciously understanding” what ghc was telling me, I was only able to experiment and then see that using pure
helped GHC figure out how to string together what I was doing (and I only thought to use pure
because of that sixth sense and a vague "I think my mentors have used this like this before).
If GHC’s error messages were improved in those situations, we would all have more confidence in the changes we needed to make, and there would be less guess work in appeasing the compiler.
That said, it’s an incredibly difficult problem, and that is why we don’t mean to just complain, but to discuss and iterate on solutions to see thru these improvements.