patch applied (cabal): Generalise PreProcessors to take more
detailed args
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue May 1 10:58:16 EDT 2007
Sun Apr 22 03:05:58 PDT 2007 Duncan Coutts <duncan.coutts at worc.ox.ac.uk>
* Generalise PreProcessors to take more detailed args
Most pre-processors just need the full source file and target file names.
More complicated ones where the generated files have to embed links to each
other need more information. For example c2hs generates .hs file that
reference generated .h files. These links should be relative to the dist/build
dir and not to the top of the source tree, since we do not want to add -I. to
the includes search path. We only want to use -Idist/build, hence the embeded
links must be relative to that. Therefor c2hs needs to know the base output
directory as well as the name of the file relative to that.
So we add a new type PreProcessorFull that has this extra info and a function
simplePP :: :: PreProcessor -> PreProcessorFull
for the common case of most existing pre-processors that do not need this
extra info.
This patch doesn't actually change the c2hs stuff, that comes next.
M ./Distribution/PreProcess.hs -11 +47
More information about the Cvs-libraries
mailing list