[Haddock] Regenerating Haddock docs on Hackage

Mark Lentczner markl at glyphic.com
Mon Sep 6 12:33:24 EDT 2010

On Sep 6, 2010, at 9:04 AM, Ross Paterson wrote:

> The use-contents option makes the Contents link point back to the package
> page, but it also turns off creation of index.html, which is used by the
> frames view.

hmmm.... That's really unfortunate!

Normally the "Contents" is generated in two ways: index.html as a full page version, and index-frames.html for use in the upper lift pane in frames view.

If one is using --use-contents to redirect to a master contents list (like when one does for locally installed docs), then I suppose you want *both* to be redirected to the "aggregate" versions that will be generated when you run with --gen-contents later on. At present, this has never worked, because frames.html is static and can't detect if it should be pulling the local index-frames.html or some other.

On the other hand, in this case Hackage is using --use-contents to substitute the index.html with another. It wants the index-frames.html to be generated and linked as normal. However, if those were generated, then the frames version would show the "right" thing in the upper left panel, but the wrong thing in the main panel if one navigated to "Contents" and from there to anywhere else.

Hmmm.... I'm going to give this some design thought, and try to come up with some fix for how this is all generated. It is possible that one idea is to just have an option to turn off Frames for Hackage.

Ross -- 
As a stop gap, I could give you a patched haddock-util.js that doesn't add the frames button, and you can just copy that over the already generated ones.

	- Mark

More information about the Haddock mailing list