[plt-scheme] reader macros / literate programming

From: MJ Ray (markj at cloaked.freeserve.co.uk)
Date: Thu Feb 13 03:31:27 EST 2003

Jose A. Ortega Ruiz <baggins at telefonica.net> wrote:
> on a totally unrelated note, i've been using in the past noweb for
> literate programming (mostly in OCaml), and was thinking of using it
> with my MzScheme hacks. as you problably know, in LP, source code
> files are produced from a document that contains both the source code
> and its documentation intermingled.

Interesting.  What system are you using?  I know that Kirill Lisovsky's Mole
system can produce documentation from comments in source code (sort of like
perldoc), but I've not found a very practical system for the other way

> the actual source code is automatically generated from such a document.
> when you compile/interpret such generated files, it is very useful to have
> some sort of #LINE directive (=E0 la C) in the generated code [...]

You could probably make the generator intersperse your code with display
calls when debugging, but then, would that work during module loading? 
Probably, but I've not tried.  The other thing which will bite you is that a
lot of the errors in scheme code (well, mine, anyway) are run-time and have
to be picked up by a testing framework.

MJR   http://mjr.towers.org.uk/   IM: slef at jabber.at
      This is my home web site.   This for Jabber Messaging.

How's my writing? Let me know via any of my contact details.

Posted on the users mailing list.