[Hackage] #157: Haddock command fails when dependent documentation is not installed

Hackage trac at galois.com
Tue Sep 18 08:27:19 EDT 2007


#157: Haddock command fails when dependent documentation is not installed
------------------------------+---------------------------------------------
  Reporter:  duncan           |        Owner:       
      Type:  defect           |       Status:  new  
  Priority:  normal           |    Milestone:       
 Component:  Cabal            |      Version:  1.2.0
  Severity:  normal           |     Keywords:       
Difficulty:  easy (<4 hours)  |   Ghcversion:  6.4.2
  Platform:  Linux            |  
------------------------------+---------------------------------------------
Cabal checks with ghc-pkg for where the .haddock file of dependent
 packages should be. However even though ghc-pkg says it's there, it very
 often isn't there. In this case we still ask haddock to use it, and
 haddock justifiably complains.

 Cabal should check that the .haddock file actually exists. If it does not,
 Cabal should warn that links to this dependent package will not be
 generated because the docs for this dependent package are not installed.
 It should then not tell haddock to use that package.

 Current behavior:

 {{
 $ runghc Setup.lhs haddock
 Preprocessing library bytestring-0.9...
 Running Haddock for bytestring-0.9...
 haddock: /usr/share/doc/ghc-6.4.2/html/libraries/base/base.haddock:
 openBinaryFile: does not exist (No such file or directory)
 }}

 Desired behavior:

 {{
 $ runghc Setup.lhs haddock
 Preprocessing library bytestring-0.9...
 Running Haddock for bytestring-0.9...
 Warning: Documentation for package base is not installed. No links will be
 generated.
 Documentation created: dist/doc/html/bytestring/index.html
 }}

 Or something like that, I'm sure someone can think of a clear friendly
 warning message

 This should be an easy bug for some new Cabal hacker to have a go at. It
 should just require modifying makeReadInterface in the
 Distribution.Simple.Haddock module.

-- 
Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/157>
Hackage <http://example.com/>
My example project


More information about the cabal-devel mailing list