[Haskell-cafe] ANNOUNCE: Haddock version 2.8.0

John Millikin jmillikin at gmail.com
Fri Sep 3 17:24:23 EDT 2010

Followup: here's a version of the "xhtml" library which supports
selectable doctypes (HTML 4.01, XHTML 1.0, XHTML 1.1):


I couldn't find a darcs repo for "xhtml", so this repo starts from the
current version on Hackage. The main "xhtml" library has not been
updated in years; it may be easier to upload it under the name
"haddock-html", or even merge it into Haddock itself.

There are three patches to Haddock to use this library, in varying
degrees. They attached to this email (I can't upload my Haddock branch
to patch-tag, for some reason). Also hosted at <
http://ianen.org/temp/haddock-xhtml.patch >, if your client strips

The first patch simply corrects minor errors in attributes, so <a>
uses "id" instead of "name", and group header IDs don't start with a
number. The second patch uses the upgraded "xhtml" to generate HTML
4.01. This effectively just corrects the doctypes on the files Haddock
is already generating, so the patch is very small.

Both of these patches are, I believe, suitable for commitment to the
main repository/

The third patch is large, and I think it needs some reviewing before
commit. It enables Haddock to generate XHTML (*real* XHTML). The vast
majority is plumbing, so files are generated with the correct
filenames, so servers can send them with correct mimetypes.

Here's samples of the modified Haddock's output:


And here's verification that the pages are valid:


I haven't had time to extensively test the JavaScript yet, but it
appears to work correctly in XHTML mode, so I believe no significant
modification to it will be required.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: haddock-xhtml.patch
Type: application/octet-stream
Size: 134111 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100903/f21d78de/haddock-xhtml-0001.obj

More information about the Haskell-Cafe mailing list