Literate Programming in Haskell?

Bostjan Slivnik [email protected]
Mon, 19 Feb 2001 14:33:44 +0100


> > In the Haskell community is there a generally accepted best way to
> > approach Literate Programming?  The language has support for literate
> > comments, but it seems that many common LP tools don't respect it.
> 
> I'm also very interested in this, but ideally I would want the output to
> be in some proportional font, with symbols like =>, ->, <- replaced with
> arrows, etc. Also, it would be very nice to have the code automatically
> column aligned (using heuristics).

So am I.  Is anybody willing to cooperate on the desing of such tool?

The solution based on the package `listings' is really nice
(especially because of its simplicity).  However, if different
proportional fonts are used for different lexical categories and the
indentation is preserved (as it should be in Haskell), the package
does not produce the best results.

> I saw something that looks like this in Mark P. Jones's paper `Typing
> Haskell in Haskell', but don't know how he did it.

Perhaps he used ``Haskell Style for LaTeX2e'' (written by Manuel
Chakravarty); just a guess.  Or did it manually.

Bo"stjan Slivnik