Poor error message for unbound variable in pattern synonym
When I say
pattern OneElt = [x]
Right-hand side of bidirectional pattern synonym cannot be used as an expression [x]
I have two complaints with this error message:
- It's very unclear what's actually wrong with the pattern --
[x]looks like a perfectly fine expression, until I realize that
- The herald of the error is more than 80 characters (if you count the indentation) and wraps on my 80-character terminal. GHC tends to avoid this elsewhere, and so the wrapping is suboptimal.
I would easily say that issue (1) is more important than issue (2).
Perhaps this would be better:
Variable `x' is unbound in the bidirectional pattern synonym `OneElt': [x]