GHC doesn't warn on typos in language pragmas
In particular, I was struggling with the QuasiQuotes language extension. I had -
{-# LANGAUGE QuasiQuotes #-}
site = [shamelet|Hello World!|]
Notice the transposed A and U in LANGUAGE
The error that ghc was emitting was -
Main.hs:23:47: parse error on input ‘]’
It took me a long time and a lot of head-banging to figure out that it was a typo in the language pragma, especially because the language pragma was surrounded by other language pragmas and it was at the top of the file.
I would think that this should at least emit a warning when there is a typo in a pragma.
Trac metadata
| Trac field | Value |
|---|---|
| Version | 7.8.4 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture | Unknown/Multiple |