[Haskell-cafe] haddock as a markdown preprocessor

Yitzchak Gale gale at sefer.org
Thu Feb 21 12:54:04 EST 2008


Duncan Coutts wrote:
>> To be honest I like the fact that haddock's markup is really simple and
>>  perhaps somewhat restrictive. A great improvement though would be...
>>  a generic backend that spits out
>>  the info that haddock gathers in a machine readable format.

Alistair Bayley wrote:
>  I have probably misunderstood both of you, but I think that Conal
>  proposed that Haddock *input* syntax is largely unchanged; Haddock
>  should be able to *output* markdown, for consumption by pandoc.

Perhaps, but I don't think "markdown", or any other
presentation format, is right for that.

I'm sure that there are many presentation formats needed
by many different people. I think Duncan's point is that
haddock only really needs to produce one *generic* output.
It should faithfully preserve all of the information that
haddock knows how to produce, in a format that is
easy to parse.

That could then be transformed by other existing tools
into whatever you want, including the current HTML/CSS,
markdown, or anything else.

XML is what people usually use nowadays for that sort
of thing, but it doesn't have to be XML.

The haddock web site mentions that some work has
already been done on DocBook XML; that could work.
DITA would perhaps be a better fit. Or we could use
our own set of tags.

Regards,
Yitz


More information about the Haskell-Cafe mailing list