[Haskell-cafe] haddock as a markdown preprocessor

David Menendez dave at zednenem.com
Thu Feb 21 14:28:32 EST 2008

On Thu, Feb 21, 2008 at 12:54 PM, Yitzchak Gale <gale at sefer.org> wrote:
> 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.

Markdown is not really a presentation format. It's an authoring format
which "allows you to write using an easy-to-read, easy-to-write plain
text format, then convert it to structurally valid XHTML (or HTML)."
(from <http://daringfireball.net/projects/markdown/>)

Pandoc apparently generalizes this, allowing you to use the Markdown
syntax to produce other forms of output. I'm not sure what it does
with embedded XHTML, which Markdown allows (and which is necessary if
you want to do things like tables).

Markdown is more powerful than Haddock, and (for me, at least) easier
to read. I'd love to see it used for Haskell code documentation, but I
don't see it happening.

Dave Menendez <dave at zednenem.com>

More information about the Haskell-Cafe mailing list