
Claus Reinke wrote:
Still, I would really like a "just the facts, please" mode for GHC, with less text and more type signatures (especially for the contexts of type mismatches). Error messages simply not including the information I need has become my main issue with GHC messages, and seems to be a common thread over many tickets and threads apparently discussing phrasing (eg, expected/inferred: who expects and why, and what is the inference based on?).
FWIW, the suggestion I floated has less text than the current message while preserving all the type and expression information ;) (Though it doesn't necessarily generalize to cover similar messages like: Prelude> :t (\x -> x) :: a -> b <interactive>:1:7: Couldn't match expected type `b' against inferred type `a' `b' is a rigid type variable bound by the polymorphic type `forall a b. a -> b' at <interactive>:1:0 `a' is a rigid type variable bound by the polymorphic type `forall a b. a -> b' at <interactive>:1:0 In the expression: x )
Just, please, keep in mind that there is no one-size-fits-all: improving a message for one group of users might well make it less useful for another group.
+1. There're worlds of difference between the kinds of error messages suitable for beginners, vs "regular users", vs type-level programmers. Also, while a user may have some given level of understanding, the level of messaging they'll want can vary a lot depending on the task a hand. -- Live well, ~wren