[Haskell-cafe] Re: Haddock Markup

Jonathan Cast jonathanccast at fastmail.fm
Fri Feb 13 10:37:13 EST 2009


On Fri, 2009-02-13 at 11:08 +0100, Heinrich Apfelmus wrote:
> Jonathan Cast wrote:
> > 
> > NB: This example is *precisely* why I will never adopt MathML as an
> > authoring format.  Bowing and scraping at the alter of W3C is not worth
> > using such a terrible syntax, not ever.
> > 
> > (Indented, that's
> > 
> >   <math>
> >     <mrow>
> >       <msup>
> >         <mi>x</mi>
> >         <mn>2</mn>
> >       </msup>
> >       <mo>+</mo>
> >       <mrow>  
> >         <mn>4</mn>
> >         <mo>&InvisibleTimes;</mo>
> >         <mi>x</mi>
> >       </mrow>
> >       <mo>+</mo>  
> >       <mn>4</mn>
> >     </mrow>
> >   </math>
> > 
> > Which is still unforgivably horrible.  I *think* it's trying to say $x^2
> > + 4x + 4$, but I'm not confident even of that.
> 
> Yeah, MathML looks like a machine-only format to me, begging the
> question why they don't use a more compact format.
> 
> > I'm also unconvinced
> > it's actually easier to parse than $x^2 + 4x + 4$.)
> 
> While parsing is a solved problem in theory, a lot of people use some
> regular expression kludges or similar atrocities in practice.

Yeah, we even seem to have adopted one of their syntaxen [markdown].  

> Writing a
> proper parser is too complicated if your language doesn't have parser
> combinators. :)

Haddock, I believe, is written in a language that does.  If MathML
output is desired at some point (e.g., if browsers start doing better at
rendering it than at rendering images with TeX source-code alt-texts :)
the I think Haddock will still be capable of handling a reasonable input
language.

jcc




More information about the Haskell-Cafe mailing list