
On 02 May 2005 12:40, Peter Simons wrote:
it appears that the '-s' switch in the CVS-HEAD version of Haddock stopped working the way I know it. I run
haddock -h -s . *.hs
to generate the documentation, and it does have the "Source Code" link on every page, but the link points to the "." _directory_, not to "./{module-name}.hs" file like it should.
Am I doing something wrong or is this a bug?
If you're using Haddock from CVS, then it works a little differently. Actually, I didn't think I'd committed this change, it looks like it crept in with something else... so feedback is welcome, we can always change it. I was experimenting to see whether we could get accurate source code links from the library documentation, but that didn't work out (we still can't tell the orignal source filename because the files are preprocessed before Haddock sees them). Anyway, in CVS, the argument to -s is transformed as follows: - the string %M is replaced by the module name (with '.' replaced by '/') - the string %F is replaced by the source file name so to get the behaviour of Haddock 0.6, you say 'haddock -s <url>/%F'. Cheers, Simon