mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
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.
This commit is contained in:
parent
a6cd355510
commit
8fc43b12c7
4 changed files with 75 additions and 93 deletions
|
@ -63,7 +63,7 @@
|
|||
|
||||
fluid-ref fluid-set!
|
||||
|
||||
@prompt prompt @abort abort
|
||||
@prompt call-with-prompt @abort abort-to-prompt
|
||||
|
||||
struct? struct-vtable make-struct struct-ref struct-set!
|
||||
|
||||
|
@ -454,7 +454,7 @@
|
|||
(else #f)))
|
||||
|
||||
(hashq-set! *primitive-expand-table*
|
||||
'prompt
|
||||
'call-with-prompt
|
||||
(case-lambda
|
||||
((src tag thunk handler)
|
||||
;; Sigh. Until the inliner does its job, manually inline
|
||||
|
@ -482,7 +482,7 @@
|
|||
(make-abort src tag '() tail-args))
|
||||
(else #f)))
|
||||
(hashq-set! *primitive-expand-table*
|
||||
'abort
|
||||
'abort-to-prompt
|
||||
(case-lambda
|
||||
((src tag . args)
|
||||
(make-abort src tag args (make-const #f '())))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue