[Haskell-beginners] Literate Haskell - capturing output

Martin Drautzburg Martin.Drautzburg at web.de
Thu Jan 17 20:00:43 CET 2013


Hello all,

I am using literate haskell quite a lot (otherwise I don't understand my own 
code). This works fine for the code as such. But when I give an example usage, 
I run code snippets in ghci and copy&paste into the main document/program, 
which turns them into "text" (and not code).

When I make changes to the program these examples tend to no longer reflect 
the actual program.

Is there a way to automatically run examples and include them in the .lhs 
file, preferably with the haskell prompt and everything?

-- 
Martin



More information about the Beginners mailing list