Alain MELLAN <firstname.lastname@example.org> wrote:
| I want to write a function called abort, that jumps from anywhere to
| the top-level REPL.
| What I did naively was:
| It basically does what it is meant to, but there are some nasty "side
| effects". For example in SCM ...
| ==> (go)
| ; test abort
| ERROR: read: Wrong type in arg1 (see errobj)
Well, without showing us the definition of "go", we can't help very much.
Your original call/cc code works fine in MzScheme, which does not have
a predefined meaning for the symbol "abort". And I have used call/cc
in SCM before for exactly this sort of error catching. So maybe if you
change the name of your function to "my-abort" or something...
Rob Warnock, 7L-551 email@example.com http://reality.sgi.com/rpw3/
Silicon Graphics, Inc. Phone: 650-933-1673 [New area code!]
2011 N. Shoreline Blvd. FAX: 650-933-4392
Mountain View, CA 94043 PP-ASEL-IA