[GHC] #4900: DEPENDS pragma
GHC
cvs-ghc at haskell.org
Wed Sep 7 15:16:58 CEST 2011
#4900: DEPENDS pragma
---------------------------------+------------------------------------------
Reporter: cdsmith | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.4.1
Component: Build System | Version:
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by simonpj):
Talking to Simon we understand the following language extensions:
* A `{-# DEPENDS "foo" #-}` pragma
* A TH function `addDependentFile`
These would support two somewhat separate features:
1. `ghc -M` would generate dependencies based on
* `import` declarations (as now)
* `{-# DEPENDS "foo" #-}` pragmas
* `#line` pragamas generated by CPP
2. The `ghc` recompilation check (which skips compilation when nothing
has changed) would take account of
* `import` declarations
* `{-# DEPENDS "foo" #-}` pragmas
* `#line` pragamas generated by CPP
* `addDependentFile` calls produced in the previous compilation
Note that (1) and (2) are not identical... `ghc -M` can't run TH to see
what `addDependentFile` calls it makes.
So this is not entirely satisfactory, but perhaps useful enough to be
worth doing. If anyone wants to volunteer -- it's not too hard.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4900#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list