[GHC] #4900: DEPENDS pragma
GHC
cvs-ghc at haskell.org
Tue Sep 6 12:06:43 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 simonmar):
Note that the `DEPENDS` pragma idea in this ticket is better than an
`addDependentFile` function in TH, for two reasons:
- `ghc -M` could emit these dependencies, because we only need to read
the pragma, not compile the module
- Cabal and other external tools will never be able to track these
dependencies. There are plans to do this in Cabal in the future, and
`addDependentFile` would just not work there.
`DEPENDS` is not nearly as nice as `addDependentFile`, but if we want to
be able to do dependency analysis without compiling code, I think we have
to stick with `DEPENDS`. We could still have a `checkDependentFile` that
would emit a warning if you had forgotten the `DEPENDS` pragma.
Another design question is whether the filename is relative or absolute -
do we resolve it to an absolute name at compile time?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4900#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list