[gambit-list] Any way in the Scheme code to get filename, define name and line number at compile time for debug?

Adam adam.mlmb at gmail.com
Fri Jun 24 04:55:16 EDT 2016


Marc, is there any way I can get the sourcecode filename, name of global
define, and line number, that a particular line was compiled at?

E.g. (so here, ##file, ##in-define and ##line would be output by the macro
so the compiler would actually compile those at line 3, 6 and 8.)

(define-macro (loc) `(print "This was printed at " ##file " in define "
##in-define " line " ##line "\n"))

(loc)

(define (something)

  (loc))

(loc)


?

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


More information about the Gambit-list mailing list