[Haskell-cafe] Re: Haddock Markup

Heinrich Apfelmus apfelmus at quantentunnel.de
Fri Feb 13 05:08:55 EST 2009

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. Writing a
proper parser is too complicated if your language doesn't have parser
combinators. :)



More information about the Haskell-Cafe mailing list