Conal Elliott conal at
Wed Jan 10 12:18:54 EST 2007

I wonder how we could get the full expressiveness of Mediawiki (MW) markup
out the back end, when haddock parses the input according to a less
expressive markup language.  Hm.  Maybe just let it pass lots of markup
through without realizing that it's markup.  Then a MW back end would
unparse a few things (italics, hyperlinks) back into markup.  Of course, MW
markup differs from Haddock markup, so we'd probably want to turn off some
of Haddock's parsing (italics, at least).  I don't see how to do that in a
non-intrusive way.

Perhaps Haddock could be refactored and exposed as a library, to give it
some more flexibility.  Some refactoring is intended anyway, to sync up with
ghc language changes.  In the process, its core functionality could be
extracted as a library and hooked up to various front-ends as well as
back-ends and maybe other processing as well.

Cheers,  - Conal

On 1/10/07, Duncan Coutts <duncan.coutts at> wrote:
> On Tue, 2007-01-09 at 21:58 -0800, Conal Elliott wrote:
> > Suppose Haddock's documentation language ("-- | ...") were an extended
> > form of a common wiki markup language, and specifically Wikimedia's,
> > because the Haskell wiki uses it. Instead of converting to HTML,
> > Haddock could then pass through most markup unchanged and make wiki
> > links out of its current link markup (modules & entities).
> Haddock is designed to be able to produce various different output
> formats. It'd be perfectly reasonable to add a wkik markup backend.
> There's nothing that special about the html backend, it's just the most
> mature and most used.
> Duncan
-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Libraries mailing list