[Hackage] #266: cabal haddock plus cpp preprocessing with relative #include files

Hackage trac at galois.com
Wed Apr 9 17:49:16 EDT 2008

#266: cabal haddock plus cpp preprocessing with relative #include files
  Reporter:  guest          |        Owner:       
      Type:  defect         |       Status:  new  
  Priority:  normal         |    Milestone:       
 Component:  Cabal library  |      Version:  HEAD 
  Severity:  normal         |     Keywords:       
Difficulty:  normal         |   Ghcversion:  6.8.2
  Platform:                 |  
 All these bugs are against the homeomorphic library I have written. To
 play along, you can do

 darcs get --partial http://www.cs.york.ac.uk/fp/darcs/homeomorphic

 Bug 2: cabal haddock fails

 $ cabal haddock
 Preprocessing library homeomorphic-0.1...
 Running Haddock for homeomorphic-0.1...
 Warning: The documentation for the following packages are not installed.
 No links will be generated to these packages: base-,
 QuickCheck-, mtl-, containers-

     Include/Hash.hs: No such file or directory

 This one may well be my fault, if some extra magic is required for the
 haddock with CPP, but not the building - but that seems weird, if
 there is enough info to build the file, surely there is enough info to
 haddock it

 Duncan says:

 Right, there is no such guarantee at the moment. That's because ghc
 --make can find things by import chasing where Cabal needs more stuff
 specified explicitly. One day when Cabal does the import chasing they'll
 be consistent.

 In this case though it doesn't look like on of those problems. It seems
 to be because for haddock we're copying files to dist/ and then running
 cpp on them. That means of course that relative #includes do not work.
 It's not entirely clear to me why we are copying them before running cpp
 and not just running cpp on the files from their original locations.

 Please file a ticket for this one.

Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/266>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list