#481: Recompilation check fails for TH
------------------------------------------+---------------------------------
  Reporter:  simonpj                      |          Owner:  simonmar        
      Type:  bug                          |         Status:  new             
  Priority:  normal                       |      Milestone:  7.2.1           
 Component:  Template Haskell             |        Version:  6.4.1           
Resolution:  None                         |       Keywords:                  
  Testcase:  TH_recompile                 |      Blockedby:                  
Difficulty:  Unknown                      |             Os:  Unknown/Multiple
  Blocking:                               |   Architecture:  Unknown/Multiple
   Failure:  Incorrect result at runtime  |  
------------------------------------------+---------------------------------

Comment(by marlowsd@…):

 commit 48bc81ad466edfc80237015dbe5d78ba70eb5095
 {{{
 Author: Simon Marlow <[email protected]>
 Date:   Wed Jul 20 09:37:54 2011 +0100

     Fix #481: use a safe recompilation check when Template Haskell is
     being used.

     We now track whether a module used any TH splices in the ModIface (and
     at compile time in the TcGblEnv and ModGuts).  If a module used TH
     splices last time it was compiled, then we ignore the results of the
     normal recompilation check and recompile anyway, *unless* the module
     is "stable" - that is, none of its dependencies (direct or indirect)
     have changed.  The stability test is pretty important - otherwise ghc
     --make would always recompile TH modules even if nothing at all had
     changed, but it does require some extra plumbing to get this
     information from GhcMake into HscMain.

     test in driver/recomp009

  compiler/deSugar/Desugar.lhs      |   10 +++-
  compiler/iface/BinIface.hs        |   14 ++++--
  compiler/iface/LoadIface.lhs      |    1 +
  compiler/iface/MkIface.lhs        |   66 +++++++++++++++------------
  compiler/main/DriverPipeline.hs   |   24 ++++++----
  compiler/main/GHC.hs              |    5 ++
  compiler/main/GhcMake.hs          |   23 +++++----
  compiler/main/HscMain.lhs         |   92
 +++++++++++++++++++++++++------------
  compiler/main/HscTypes.lhs        |   33 ++++++++++++-
  compiler/typecheck/TcRnDriver.lhs |    5 +-
  compiler/typecheck/TcRnMonad.lhs  |    9 +++-
  compiler/typecheck/TcRnTypes.lhs  |    5 ++
  compiler/typecheck/TcSplice.lhs   |    2 +
  13 files changed, 196 insertions(+), 93 deletions(-)
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/481#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to