source file modify race leads to inconsistent error message
I got this odd error message from ghc:
Command/AddUrl.hs:120:32: error:
lexical error in string/character literal at character '-'
|
120 | BatchNull -> '\0'
| ^
Part of the error message says that '-' is the problem character, but the quoted line of code does not contain that.
What happened is I started the build, noticed I had typoed '\-' and quickly corrected it in my editor and saved. It seems ghc must have read the source file twice, so I raced it and so experienced this inconsistency.
I wonder if it could display the wrong line entirely if a larger change was made to the file?
Thanks for your time with such a minor thing as this bug.
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |