[Haskell-cafe] Richer (than ascii) notation for haskell source?

Neil Mitchell ndmitchell at gmail.com
Wed May 14 10:45:57 EDT 2008


Hi

> It would be nice to be able to use a richer set of symbols in your source
> code for operators and functions (e.g. integral, sum, dot and cross-product,
> …),  as well as variables (the standard upper and lower-case greek for
> example, along with things like super- and sub-scripting, bold/italic and
> what-not).  You could imagine ending up with source code that reads just
> like a mathematical paper.

You probably still want to write in ASCII, as keyboards have buttons
for each of the letters in the alphabet, so its much easier. However,
you can format your code nicely using lhs2tex - I use it for all my
papers. I have things like:

%subst alpha = "{\alpha}"

Which means I can write: id :: alpha -> alpha

The code is valid Haskell, and looks super-pretty in papers.

Lhs2tex: http://people.cs.uu.nl/andres/lhs2tex/

Thanks

Neil


More information about the Haskell-Cafe mailing list