[Haskell-cafe] Literate Haskell source files. How do I turn them into something I can read?

Kirsten Chevalier catamorphism at gmail.com
Sat Dec 30 10:35:07 EST 2006

On 12/29/06, Michael T. Richter <ttmrichter at gmail.com> wrote:
>  I'm trying to wrap my mind around the darcs source code as a preliminary to looking into GHC's guts.  All of darcs is written as .lhs files which have bizarre mark-up in them which distracts me from the actual Haskell source I'm trying to figure out and get used to.  Apparently the GHC compiler can take .lhs files, strip them with "unlit" (a utility which I finally found buried deep in the GHC installation -- off-path) and then compile them normally.  The problem I have is that unlit leaves behind instead these huge gaping (and highly distracting) stretches of whitespace while it takes out the markup.

Speaking of bizarre markup, I gently suggest using plaintext rather
than HTML, and wrapping your lines, when you post to this list.

In any case, I'm surprised that you find the Literate Haskell aspect
of it to be the *most* bizarre thing about darcs's sources, but
anyway, I really do suggest turning the code into PDFs as Cale
suggested rather than trying to strip out the literate markup.
Sometimes, documentation really does help one understand code, and the
entire point of literate programming is to make code more readable. A
little effort spent learning now could save you a whole lot of effort


Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"Dare to be naive."--R. Buckminster Fuller

More information about the Haskell-Cafe mailing list