RE: Haddock: how to disable the JavaScript menus?

On 27 September 2004 21:15, Peter Simons wrote:
Simon Marlow writes:
This change has now been made.
Uh ... any hints what has changed? A new command line flag?
we need a way to retain the collapsed/expanded state between page transitions (JavaScript hackers apply here!).
I am not certain whether these collapsed menus are a good idea. Admitted, they make the page shorter at first glance. But at the same time, they make it impossible to search in the text!
When I want to see the documentation for, say Data.List, I hit CTRL-HOME in Mozilla, then type "/data.lis", and finally press RETURN to follow the link -- and I have reached the page. The hands never left the keyboard. With collapsed menus, that doesn't work anymore.
Anyway, if there was an option to enable/disable that functionality in Haddock, all would be well. :-)
The tree is expanded by default now (Sven Panne made the change a few days ago). I take your point about searching in Mozilla - I'm a big fan of Firefox's incrememtal search too. The problem I was originally trying to solve is when you have a huge number of instances for a datatype (look at the docs for Prelude, for example), which makes it hard to navigate the page. I'm not sure if we can solve this *and* have searching do the right thing. Cheers, Simon

While I am at it: There is another (rather simple) feature I'd like to see in Haddock. I often link to Haddock-generated documentation on my web pages, but there is no way for me to link _back_ from the Haddock output. Would it be possible to add command line switch to specify an "up" link and the appropriate text for it, which would appear next to the "Contents" and "Index" links? Something like "--top http://cryp.to/,Homepage" or so? Peter

On the theme of improving Haddock, do you think it could be fixed to generate valid HTML? Here are some examples of the errors I get when running Haddock output through "validate" (the Web Design Group's HTML and XML validator). *** Errors validating Text.XML.HaXml.Combinators.html: *** Line 135, character 2: end tag for element "TD" which is not open; try removing the end tag or check for improper nesting of elements Line 136, character 7: end tag for element "TR" which is not open; try removing the end tag or check for improper nesting of elements *** Errors validating Text.XML.HaXml.Lex.html: *** Line 75, character 2: end tag for element "TD" which is not open; try removing the end tag or check for improper nesting of elements Line 76, character 7: end tag for element "TR" which is not open; try removing the end tag or check for improper nesting of elements *** Errors validating doc-index-tB.html: *** Line 40, character 4: missing a required sub-element of "TABLE" *** Errors validating doc-index-tJ.html: *** Line 40, character 4: missing a required sub-element of "TABLE" *** Errors validating doc-index-tK.html: *** Line 40, character 4: missing a required sub-element of "TABLE" The "missing sub-element of TABLE" indicates an empty table, but the closing of tags that are not open is slightly more worrying. This is with haddock-0.6 and validate-1.0.3. Regards, Malcolm

On Tue, Sep 28, 2004 at 04:05:59PM +0100, Malcolm Wallace wrote:
On the theme of improving Haddock, do you think it could be fixed to generate valid HTML?
Maybe it would be a good idea to use Peter Thiemann's WASH/HTML library? Dependence on external library is one obvious (small?) problem that comes to mind. Best regards, Tom -- .signature: Too many levels of symbolic links

Simon Marlow writes:
The tree is expanded by default now (Sven Panne made the change a few days ago).
I have rebuilt everything from CVS HEAD moments ago and the generated reference documentation still comes with the menus collapsed. Am I doing something wrong? Peter
participants (4)
-
Malcolm Wallace
-
Peter Simons
-
Simon Marlow
-
Tomasz Zielonka