[GHC] #4900: DEPENDS pragma
GHC
cvs-ghc at haskell.org
Tue Sep 6 17:24:41 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 cdsmith):
Replying to [comment:10 simonmar]:
> Note that the `DEPENDS` pragma idea in this ticket is better than an
`addDependentFile` function in TH, for two reasons:
Agreed, there are definitely advantages that way, which is a lot of why I
originally proposed it that way.
I recall that in the context of optimizing the fclabels package a few
weeks ago, it came up that TH could actually emit INLINE pragmas. Is
there a design where it would be possible for TH to emit DEPENDS pragmas?
Then we'd have two scenarios:
1. You could add an explicit DEPENDS pragma, and this would make `ghc -M`
and other external tools work.
2. You could have your TH emit a DEPENDS pragma, which means it would be
opaque to static tools like `ghc -M` and `cabal`, but GHC would still use
it when deciding whether to rebuild.
In some ways, this seems messy; but the only effect of resolving TH would
be to *add* dependencies, so the statically derived list would at least be
an approximation to the complete list.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4900#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list