On Thu, Jan 31, 2013 at 7:55 PM, Rustom Mody <rustompmody@gmail.com> wrote:


On Fri, Jan 18, 2013 at 12:30 AM, Martin Drautzburg <Martin.Drautzburg@web.de> wrote:
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?


If you are ok with emacs,
emacs -> orgmode -> babel may be worth a consider
http://orgmode.org/worg/org-contrib/babel/intro.html
http://www.jstatsoft.org/v46/i03/paper




http://www.cs.unm.edu/~eschulte/data/CISE-13-3-SciProg.pdf
maybe a better read