haskell / haddock

Haskell Documentation Tool
www.haskell.org/haddock/
BSD 2-Clause "Simplified" License
361 stars 241 forks source link

Backpack and multiple public library interop #1363

Open ekmett opened 3 years ago

ekmett commented 3 years ago

Haddock gets horribly confused by the use of backpack today.

A quick list of rough edges I've cut myself on recently.

When working with cabal 3+ and multiple public libraries all of this yields a situation where the haddocks are nigh unreadable.

Mikolaj commented 3 years ago

I've just tested haddock branch 9.0.1 and 9.2.0 and I can confirm it stills overwrites the tar file containing Hackage haddocks for each private library defined in the cabal file. The results is that only the documentation from the last defined library (whether private or not, I suppose) is visible.

Perhaps it's not so hard to fix, because the documentation for each library is generated fine. It should just all be linked from a single page (in the most straightforward manner, for a start) and all tarred into a single archive. That's assuming we want to show documentation of private libraries (perhaps with a flag, similar as with executables?). Otherwise, consider only the public ones.

Related issue: #1196

Mikolaj commented 3 years ago

FYI: the just merged #1277 seems to be a step towards (and a possible stop-gap solution for) haddocks for multiple internal libraries (not sure about backpack).