[racket] Metaprogramming with scheme

From: Valeriya Pudova (valery at digitalchile.net)
Date: Tue Jun 22 02:52:21 EDT 2010

On 22.06.2010 10:40, Valeriya Pudova wrote:
>
>>> The continuation marks included in the exception are effectively a
>>> stack trace, and you can convert them into locations. See the docs.
>>>
>>>    
>> :) Reading about continuation marks.
>
> Great feature those continuation marks. But does not looks helpful 
> this case.
> To be able to get mark i should set it before. Is it not?

Wow!

(define (foo a b)
   (for-each (lambda (e) (display e)(newline)) 
(continuation-mark-set->context (current-continuation-marks))))

(define (bar a b)
   (foo a b))

(bar 1 2)

=>
(foo . #(struct:srcloc c:\documents and settings\v\desktop\test.ss 2 0 2 
127))
(call-with-exception-handler . #(struct:srcloc 
C:\Racket\collects\racket\private\more-scheme.rkt 274 2 9287 256))
(loop . #(struct:srcloc C:\Racket\collects\drracket\private\rep.rkt 1134 
19 47088 797))
(call-with-break-parameterization . #(struct:srcloc 
C:\Racket\collects\racket\private\more-scheme.rkt 158 2 5099 519))
(#f . #(struct:srcloc C:\Racket\collects\drracket\private\rep.rkt 1115 9 
46083 2670))
(loop . #(struct:srcloc C:\Racket\collects\drracket\private\rep.rkt 1375 
17 58510 808))

Interesting. There are no the function bar in the backtrace. Why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20100622/b98df3a7/attachment.html>

Posted on the users mailing list.