[GHC] #12135: Failure to recompile when #include file is created earlier on include path
GHC
ghc-devs at haskell.org
Mon May 30 06:05:31 UTC 2016
#12135: Failure to recompile when #include file is created earlier on include path
-------------------------------------+-------------------------------------
Reporter: NeilMitchell | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Originally discovered when trying to improve Hadrian, for context see:
https://github.com/snowleopard/hadrian/issues/247#issuecomment-222317602
If you create a file {{{Test.hs}}}
{{{#!hs
#include "a/Test.hs"
main = print message
}}}
And a file {{{a/Test.h}}}
{{{#!hs
message = 1
}}}
Then run and compile with {{{ghc --make -XCPP -Ib;a Main.hs}}} it compiles
and runs properly, printing 1. Changing {{{a/Test.h}}} to {{{message =
2}}} then running {{{ghc}}} rebuilds and prints 2. Creating a fresh
{{{b/Test.h}}} with {{{message = 3}}} does not cause {{{ghc}}} to
recompile, and thus incorrectly still prints 2. Touching {{{Main.hs}}}
causes recompilation, and then the correct header file is picked up,
resulting in 3 being printed.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12135>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list