When is error messages getting improved?

I cannot bear ppl claiming haskell is overly technical and outlandish due to how abstruse the error messages are.

E.g. the monad problem:

  1. Turorials saying “be familiar with Maybe, List and IO, do not try to understand it”
  2. Beginners faithfully following the advice, tries some IO stuff
  3. Eventually, cryptic error message comes up
  4. Trying to understand and fix it, they read through it in hopes of understanding… then despair
  5. Thinks that they need to learn monads and category theory to understand it at all
  6. Frustrated at the category theory, like adjunctions stuffs
  7. Stops learning at that point, starts spouting how haskell is esoteric. Argues how it only fits in the ivory tower.

Please… the pain is intense

1 Like

In my opinion courses like CIS194 take the correct approach; that is, delaying IO a bit (in comparison to other programming languages) to introduce it in a more coherent fashion.

1 Like

I mean, the delay certainly does not help with users struggling to understand the error message. In the end… they would be like, what is skolem and rigid?
Delaying IO also gives a feel that haskell cannot be used for making practical programs unless you go extra masochistic.

That “rigid” word has been removed from error messages. Its changed in 9.0.1 or 9.2.1, I don’t remember exactly. Edit: this doesn’t seem to be true at all, I think I mixed up something.

2 Likes

Wow, now this is a huge progress! Are there other improvements coming to the error messages? For one, I’ve always found “occurs check” message quite cryptic. + also predicting which ppl wants when type mismatch error happens would help.
Better suggestions for fix would also help, tho idk where it should go.

The place for complaining about error messages and possibly suggesting improvements is here: GitHub - haskell/error-messages.

2 Likes

Actually, I think it has not been removed from all messages. I just tried the example here and that still contains that strange (rigid, skolem) part even with GHC 9.2.1. Perhaps that would be a good issue to open at github.com/haskell/error-messages (Edit: I’ve opened one here).

1 Like

Thank you! I’ll try to find the issues of error messages and report it there!

This experience is also in part due to interactions with Haskellers themselves, not just Haskell as a language or GHC/cabal/etc as tools.

Indeed, the interaction also needs to be improved. who are the culprit?