cabal/haddock features

Claus Reinke claus.reinke at
Tue Dec 5 19:37:32 EST 2006

>> * is there a simple way to "expose" all modules in a source tree?
>>   Perhaps: exposed-modules: Foo.Bar.*; Baz.*
>>   I have to generate "exposed-modules" by some find/sed hackery,
>>   But I want to use Cabal exactly to avoid such extra tools.
> At the moment you have to list them all explicitly. I don't think we're
> against relaxing that but we'd need proper dependency analysis to figure
> out what is needed. At the moment Cabal does no dependency analysis, it
> leaves that up to the compiler.

but it would be nice for the compilers to interface with cabal on this kind
of task, eg, when you successfully load a project into an interactive session,
or use the compiler's dependency chasing to build a project, it should
also be possible to generate the cabal file? and when you have a cabal
file, there should be no need for anything else to launch the project in
ghci, ghc, hugs,.. (or is that too ambitious a hope?-)

Simon M suggested that the responsibility should be shifted to cabal

and your comment on preprocessing indicates why

> Eventually we'll need to do that properly. For example it's essential to
> deal with non-trivial pre-processors like c2hs, so if/when we get that
> we could look at relaxing the requirement to list all exposed and hidden
> modules.

preferably all haskell implementations should use/maintain the same code
for these tasks, so this suggests that, as a first step, cabal just needs to
swallow up more of hmake, and then hmake interactive to launch ghci ?-)

>> * haddock(-0.8) does not understand ghc-6.6's new syntax,

quite apart from the language syntax, what about the comment syntax?

I was surprised to see haddock apparently ignoring much of my comment
layout, and a quick glance at the code indicated that it indeed throws
away or doesn't even collect useful layout info. the first thing I noticed
was that I can't find a way to have multiple paragraphs in a list item,
apparently because haddock merges them early..

{- |
    - this is a long list item

>    a code example

      i'm in a good mood, so I write more comments

      also note the following

>    variant example

    - this is the next item

are there any plans to make haddock more sensitive to existing comment
layout, preserving it in the html form, or am I just not using it the right way?


More information about the Libraries mailing list