[Haskell-cafe] Converting typeset mathematics into Haskell ?

Mark Wassell mwassell at bigpond.net.au
Fri Aug 21 19:49:54 EDT 2009

Does anyone know of any papers or projects, either for Haskell or any 
other language, that relate to what I am going to attempt to describe in 
the following:

Go to any paper or book that includes some amount of calculation type 
mathematics. An example is the formula in the Description section of 

Think about how you would convert this into Haskell. You might then find 
yourself wondering why you have to convert it into Haskell at all. Given 
that most mathematics online is typeset using something like latex or 
mathml, why can't we parse this typesetting and convert it into Haskell 
code? In all likelyhood the conversion might be ambiguous so some rules 
might be needed to guide the conversion.

Furthermore, if there are editors that allow you to edit these sorts of 
equations in a wysiwyg style, why not leverage these to edit the 
Haskell+Math code also in a wysiwyg style.

I think this goes to the larger question of why are most programming 
languages (or to be more exact the way we write programs in those 
languages) is still based around a linear sequence of tokens rather than 
something that is more 2D (there is still some linearity as even in math 
formula there is still a top down and left to right flow).


More information about the Haskell-Cafe mailing list