#4900: DEPENDS pragma
---------------------------------+------------------------------------------
Reporter: cdsmith | Owner:
Type: feature request | Status: new
Priority: normal | Component: Build System
Version: | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Since a seemingly-growing amount of Haskell code is using Template Haskell
to read and include data from external sources, it would be nice if GHC
recognized a pragma for specifying additional build dependencies for a
source file. Such a pragma could be required to appear before the module
headers, and look like:
{-# DEPENDS "file.dat" #-}
ghc --make would add it to other dependencies when deciding what modules
to rebuild. The file would NOT be one that's generated by some other
build step, but rather play the role of an additional source file, so it
would have no effect on the order of compiling modules. My gut says to
just make it an error if the file does not exist.
One example of a place this is called for is Michael Snoyman's Yesod and
external hamlet files (e.g., hamletFile in the hamlet package). These are
plastered all over the place with warnings that if you use them, GHC will
no longer automatically rebuild everything it needs to.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4900>
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