[racket] Confusing behavior with continuation-marks

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Jan 17 09:35:00 EST 2011

At Sat, 15 Jan 2011 11:54:20 -0500, Eric Dobson wrote:
> The fix seems to work, but it doesn't work for the value
> parameterization-key exported by #%paramz.
> 
> (require '#%paramz)
> 
> (define value 'value)
> (define (test key)
>   (with-continuation-mark key value
>     (call-with-continuation-prompt
>      (lambda ()
>        (continuation-mark-set-first
>         #f
>         key)))))
> 
> (test 'key)
> (test parameterization-key)
> 
> I originally came about this because I was trying to understand how
> prompts acted with parameterizations. Is this key a known special case
> due to low level hackery, or is this also a bug?

It is indeed a special case due to low-level hackery. Conceptually,
parameter lookup uses a private prompt tag that always has a prompt at
the tail of a thread's continuation, and the private prompt is
implemented by a special treatment in `continuation-mark-set-first'.



Posted on the users mailing list.