OPTIONS_GHC in included file ignored sometimes
In the attached test case, the OPTIONS_GHC pragma is ignored in the included header file. However, the problem goes away if you use --make, surprisingly. Unfortunately, in my real code, the problem does not go away when I use --make.
I'd argue that this (putting OPTIONS_GHC in a #include file) should work, because
(a) It worked with ghc 6.4.2
(b) It's useful to centralise options in one place
(c) Logically, if the first line of the #included file is the OPTIONS_GHC pragma, and the #include line is on the first line of the .hs file, the OPTIONS_GHC should appear to ghc to be in the right place.
Compile this test case with: ghc -cpp test.hs
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.6 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |