[GHC] #4900: DEPENDS pragma

GHC ghc-devs at haskell.org
Tue Nov 12 21:18:56 UTC 2013


#4900: DEPENDS pragma
-------------------------------------+------------------------------------
        Reporter:  cdsmith           |            Owner:  parcs
            Type:  feature request   |           Status:  patch
        Priority:  normal            |        Milestone:  7.8.1
       Component:  Compiler          |          Version:
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:  TH_Depends        |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by parcs):

 I hit a couple of obstacles regarding the implementation:

 1. There is no way to distinguish between usage files added via TH and
 other usage files (e.g. #included files).  This is necessary to avoid re-
 summarization when only the former kind of usage file has changed.
 2. The usage files of a boot module get lost after compiling the
 corresponding source module.  This means that modifying a usage file
 included by a boot module will not trigger recompilation in GHCi.

 The first obstacle could be solved by adding a new field to the
 `UsageFile` constructor containing the kind of  usage file (LINE pragma,
 #include, TH, etc..) and checking only the relevant kinds of usage files
 during re-summarisation.

 I don't know what could be done about 2nd obstacle, though. It looks like
 we can't depend on reading the HPT during the downsweep since the the boot
 interface gets overwritten by the source interface after the source module
 gets compiled.

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


More information about the ghc-tickets mailing list