Haddock 2 and GHC builds (Re: build fails while running haddock in fgl)

Claus Reinke claus.reinke at talk21.com
Mon Jul 14 17:45:36 EDT 2008


>>   (one might like to use a different presentation style for
>>   classes and families, but that is a slightly different matter)
> 
> The presentation style is why Haddock needs to know so much about
> GHC's language. There are many differences between the pretty printing
> requirements of GHC and the HTML output we want from Haddock, so the
> HTML backend can not simply re-use the GHC pretty printer. So Haddock
> goes through tons of GHC language elements in order to render them in
> its own way. I don't know whether some kind of generalized pretty
> printer would be a good idea or not.

Would it be possible to have a generic HTML-representation 
produced by the pretty-printer, with embedded class attributes
(class="type family"/class="quasiquote"/..) plus stylesheets that 
take care of the finer points of rendering each class of syntax 
in a Haddock-specific way? Then the style-sheets could be
amended to cover new syntax without having to touch Haddock's
source code, unless the new syntax really has to be processed 
in a new way.

Claus



More information about the Cvs-ghc mailing list