build fails in non-unicode locale [happy: compiler/stage1/build/Parser.y: hGetContents: invalid argument (invalid byte sequence)]
To reproduce, check out a fresh copy of GHC and export LC_ALL=C before going through the steps to build it.
Commit 96adf0e9 introduced non-ASCII (UTF-8) text into compiler/parser/Parser.y.pp in a string literal. happy tries to read this file in the encoding corresponding to the system locale. Probably happy ought to declare that all its input files are UTF-8, like GHC does, but it currently doesn't, so it seems best to just ensure that Parser.y.pp is pure ASCII.
Patch attached.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.7 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler (Parser) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |