Emit tab warning promptly
p = let x = 4
[tab]y = 5
in 12
produces error: parse error on input ‘y’ and nothing else. The problem is caused by a tab appearing to the user to line up x with y but actually placing y in the wrong column. The user typically will scratch their head and then post a question on StackOverflow. There they'll be told to use -fwarn-tabs, but ''that option won't help'' (and it's probably already on) because GHC will exit with a parse error before it gets around to giving the warning. I suspect the solution is probably to emit the tab warning in the lexer, but one of the parsing gurus will probably know better.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 8.0.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | high |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |