[gambit-list] Compiling "post-reader" forms?

Marc Feeley feeley at iro.umontreal.ca
Fri May 31 12:40:03 EDT 2013

On May 31, 2013, at 9:28 AM, Nathan Sorenson <takeoutweight at hotmail.com> wrote:

> When translating Clojure code to Scheme, I'm finding it quite easy to preserve source code information for the Gambit interpreter, so that when I get exceptions I am notified of the offending Clojure source lines. Is there an obvious way I could do this for compiled code as well?

There isn't a form for this, but that would be useful and I have thought about adding it.  Something like a "source-at" special form.

For example,

   (source-at "foo.scm" 10 2 ;; file line column
              ((source-at "foo.scm" 10 8 cons)
               (source-at "foo.scm" 10 8 x)
               (source-at "foo.scm" 10 10 y)))

would be equivalent to

   (cons x y)

but with explicit source location information.

Actually this source-at form can be easily defined as a macro give me a few minutes.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20130531/938233ae/attachment.htm>

More information about the Gambit-list mailing list