diff options
author | Andy Wingo <wingo@pobox.com> | 2010-03-09 22:24:25 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-03-09 22:24:25 +0100 |
commit | 8fc43b12c71789030d9058fea8b6eff5490dec27 (patch) | |
tree | 8be9a06a17cf3107875dec709993d0c8df22f5ac /module/ice-9/control.scm | |
parent | a6cd35551023d72703cf05a98e42e9dd6a75d48f (diff) | |
download | guile-8fc43b12c71789030d9058fea8b6eff5490dec27.tar.gz |
prompt, abort -> call-with-prompt, abort-to-prompt
* module/ice-9/boot-9.scm (default-prompt-tag, make-prompt-tag): New
functions.
(call-with-prompt, abort-to-prompt): Rename from `prompt' and `abort',
respectively. These names are more clear, and allow `prompt' and
`abort' to have more convenient, less general bindings.
(default-throw-handler, custom-throw-handler, catch, %start-stack):
Adapt callers.
* module/ice-9/control.scm: Adapt re-export list.
(control): Remove binding, until we're sure that it is Sitaram's
control.
(abort): New binding, aborts to the nearest prompt with the default
tag.
(%): Use call-with-prompt.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
(*interesting-primitive-names*): Adapt for prompt/abort changes.
* test-suite/tests/control.test: Take advantage of the defaults for %
and abort.
Diffstat (limited to 'module/ice-9/control.scm')
-rw-r--r-- | module/ice-9/control.scm | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/module/ice-9/control.scm b/module/ice-9/control.scm index 482a24e2b..98397a37f 100644 --- a/module/ice-9/control.scm +++ b/module/ice-9/control.scm @@ -19,20 +19,20 @@ ;;; Code: (define-module (ice-9 control) - #:re-export (prompt abort) - #:export (% control)) + #:re-export (call-with-prompt abort-to-prompt + default-prompt-tag make-prompt-tag) + #:export (% abort)) -;; the same as abort. -(define (control tag . args) - (apply abort tag args)) +(define (abort . args) + (apply abort-to-prompt (default-prompt-tag) args)) (define-syntax % (syntax-rules () ((_ expr handler) - (prompt (fluid-ref %default-prompt-tag) - (lambda () expr) - handler)) + (call-with-prompt (default-prompt-tag) + (lambda () expr) + handler)) ((_ tag expr handler) - (prompt tag - (lambda () expr) - handler)))) + (call-with-prompt tag + (lambda () expr) + handler)))) |