#481: Recompilation check fails for TH
------------------------------------------+---------------------------------
  Reporter:  simonpj                      |          Owner:  simonpj         
      Type:  bug                          |         Status:  new             
  Priority:  low                          |      Milestone:  _|_             
 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 JonasDuregard):

 Replying to [comment:8 simonmar]:
 > I think we should just disable the recompilation check for modules that
 use TH or annotations.

 I agree. The problem now is that the recompilation checker gives a false
 negative, a few false positives is not a big issue in comparison.

 Here is an alternative solution, if I have understood the mechanisms
 involved correctly:

  * We flag modules as one of three three change levels: unchanged,
 implementation-changed and interface-changed. This should be simple.

  * We mark imports as compile time and/or run time depending on if
 imported functions are used in compile time code. I guess this might be a
 bit more tricky.

  * We recompile if any import is interface-changed or if a compile time
 import is implementation-changed.

 As a bonus, marking imports is a step towards an optimization which I'm
 not sure is currently implemented: if an import is marked TH only, then we
 can drop it after evaluating compile time code (this only works if the
 generated code does not use functions from the imported module).

 I have intended to get hacking on GHC for some time, so maybe looking into
 this alternative is a good start.

 Jonas

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/481#comment:9>
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