guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The Web, Continuations, and All That


From: Andy Wingo
Subject: Re: The Web, Continuations, and All That
Date: Tue, 07 Feb 2012 09:48:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)

Hi Tobias,

Clarifying one point:

On Mon 06 Feb 2012 20:49, Tobias Gerdin <address@hidden> writes:

>>    scheme@(guile-user)> (call-with-prompt 'foo (lambda () 
>> (call-with-output-string (lambda args (abort-to-prompt 'foo)))) (lambda (k) 
>> k))
>>    $1 = #<partial-continuation 2b63200>
>>    scheme@(guile-user)> ($1)
>>    ERROR: In procedure #<partial-continuation 2b63200>:
>>    ERROR: Throw to key `vm-error' with args `(vm-run "Unrewindable partial 
>> continuation" (#<vm-continuation 2b73aa0>))'.
>
> So if a Scheme primitive the program calls happens to be implemented
> in C you would run into this problem?

Only if that C primitive invokes a Scheme procedure (for example, using
scm_call), and you capture the continuation from within that
recursively-called Scheme procedure.  Like `call-with-output-string'
above.

Cheers,

Andy
-- 
http://wingolog.org/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]