haddock command in cabal

Isaac Jones ijones at syntaxpolice.org
Mon Jan 17 19:39:08 EST 2005


[Moved from cvs-libraries at haskell.org]

"Simon Marlow" <simonmar at microsoft.com> writes:

> On 10 January 2005 04:08, Isaac Jones wrote:
>>   added ./setup haddock cmd. works on exposed-modules
>> 
>>   It requires both haddock and hscpp; Fix to not require cpp if it's
>>   not needed.
>> 
>>   It runs the cpp over the files first and unlits .lhs files.
>> 
>>   Along the way, cleaned up the command-line parser to re-use code for
>>   commands with no arguments.
>> 
>>   Changed the type of withLib to be more general
>
> Cool!  Some items for the ToDo list.  I'll try to help out with these
> later, right now I'm focussed on GHC 6.4:

I added these to the TODO list.

>   - should process hidden modules as well as exposed ones.  The hidden
>     modules might contain entities that are re-exported by an exposed
>     module.  Hidden modules should use the #hide haddock directive.

This is a bit yucky... AFAICT, it's not currently possible to tell
haddock either via the command-line or via a config file or something
which modules should be hidden?  One option is to munge the source
code (hell, we're running cpphs on it, so we might as well, 'eh?).
Could we get some way to do this with the command-line in future
versions of haddock?

>   - configure should detect haddock.  We should have a
> --with-haddock too (similarly for all the other programs we use - I
> made this change for VS a while ago and didn't get around to pushing
> it, now it'll be conflict city.  oh well).

I added this.  If it's given a --with-haddock, then it'll always use
that.  If not, then it tries to find one.  If it can't find one in the
path, then it tries to find it again when you run ./setup haddock.

>   - if GHC is present and hscpp is not, we can use 'ghc -E -cpp'.  This
>     also unlits.
>
>   - hscpp need to define __HADDOCK__ when preprocessing for haddock.
>     This means we have to preprocess seprately for haddock.
>
>   - haddock should be passed the names of the interface files for the
>     dependent packages (gotten from haddock_interfaces field of the
>     dependent packages, query ghc-pkg).

I haven't done any of that yet.

>   - we should install the haddock interface, and fill in the
>   location in haddock_interfaces.  Similarly for the HTML, and
>   haddock_html.

I don't understand that part.  Is hadock_interfaces something in GHC's
package config file or something?


peace,

  isaac


More information about the Libraries mailing list