[plt-scheme] Error...

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Dec 14 11:51:04 EST 2005

The only way to do is this:

(call/cc (lambda (stop)
  (define ...)
  ... the entire program ...
  ))

because R5RS doesn't specify the interaction between load/repl and 
other pleasantries.

-- Matthias

P.S. Of course, you could add (call/cc 5) to the doppelt-gemoppelt.


On Dec 14, 2005, at 11:13 AM, Chongkai Zhu wrote:

> I just wonder why not to define error based on call/cc.
>
> Call/cc is part of R5RS, and it enables you to escape the current 
> context, isn't it?
>
>> On Dec 14, 2005, at 8:16 AM, Matthias Felleisen wrote:
>>
>>>  (define (error str) (display str) (newline) (/ 1 0) (car '()) (5
>>> (lambda (x) (x x))))
>>
>> See also: SRFI-23 at
>>
>>    http://srfi.schemers.org/srfi-23/srfi-23.html
>>
>> It's basically the semi-standardized version of this, but there's
>> lots of discussion and so on that could be useful.
>>
>> -jacob
>> _________________________________________________
>>  For list-related administrative tasks:
>>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>>
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.