Ticket #252 (closed defect: fixed)

Opened 9 months ago

Last modified 6 months ago

haddock document generation fails for executables when a preprocessors is needed

Reported by: guest Assigned to:
Priority: normal Milestone:
Component: Cabal library Version: HEAD
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.2 Platform: Linux

Description

I'm coming to think I'm the only one who tries to generate haddock documentation for non library packages...;)

When running "haddock --executables" with a package that has a module which is using a file extension to call a preprocessor, Haddock.getModulePaths will die with:

Setup.lhs: can't find source for module moduleName

If I add a library stanza to the cabal file, the problem is solved.

This issue affects HEAD only.

I must confess I do not understand why this happens, and I'm puzzled. But I don't know the cabal source enough, so I'll leave this to the expert ones.

Cheers, Andrea Rossato

ps: maybe even the short summary could be edited to better describe the problem. An English native speaker could be quite helpful with this...:-)

Change History

02/28/08 10:59:26 changed by guest

At least I think I got the problem: preprocessSources will put the preprocessed source in dist/build in case of a library, and in dist/build/exeName/exeName-tmp/ in case of an executable.

But Haddock.haddock will always search dist/build. Hence the call of 'die' in getModulePaths.

Cheers, ar

ps: I must confess I don't get the reason for this difference so my instinct would be to change preprocessSources (this is why I'm not attaching any patch).

06/09/08 16:48:18 changed by duncan

  • status changed from new to closed.
  • resolution set to fixed.

Fixed:

Tue Jun 10 00:36:09 BST 2008  Duncan Coutts <duncan@haskell.org>
  * Fix pre-processing for haddock and executables
  Now look in the right place to find the pre-processed source
  files belonging to executables. Fixes ticket #252.