mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 21:40:33 +02:00
assert-repl-* and associated state variables to scm-style-repl
* module/ice-9/boot-9.scm: * module/ice-9/scm-style-repl.scm (scm-repl-silent, assert-repl-silence) (scm-repl-print-unspecified, assert-repl-print-unspecified) (scm-repl-verbose, assert-repl-verbosity) (scm-repl-prompt): Move these definitions here from boot-9.scm. * module/ice-9/deprecated.scm (assert-repl-silence): (assert-repl-print-unspecified, assert-repl-verbosity): Deprecated wrappers for the functions. I'm not sure if the variables can be helped though.
This commit is contained in:
parent
a572fc95f9
commit
40f17f1e0a
3 changed files with 45 additions and 13 deletions
|
@ -2666,20 +2666,9 @@ module '(ice-9 q) '(make-q q-length))}."
|
||||||
|
|
||||||
;; A provisional repl that acts like the SCM repl:
|
;; A provisional repl that acts like the SCM repl:
|
||||||
;;
|
;;
|
||||||
(define scm-repl-silent #f)
|
|
||||||
(define (assert-repl-silence v) (set! scm-repl-silent v))
|
|
||||||
|
|
||||||
(define *unspecified* (if #f #f))
|
(define *unspecified* (if #f #f))
|
||||||
(define (unspecified? v) (eq? v *unspecified*))
|
(define (unspecified? v) (eq? v *unspecified*))
|
||||||
|
|
||||||
(define scm-repl-print-unspecified #f)
|
|
||||||
(define (assert-repl-print-unspecified v) (set! scm-repl-print-unspecified v))
|
|
||||||
|
|
||||||
(define scm-repl-verbose #f)
|
|
||||||
(define (assert-repl-verbosity v) (set! scm-repl-verbose v))
|
|
||||||
|
|
||||||
(define scm-repl-prompt "guile> ")
|
|
||||||
|
|
||||||
(define (set-repl-prompt! v) (set! scm-repl-prompt v))
|
(define (set-repl-prompt! v) (set! scm-repl-prompt v))
|
||||||
|
|
||||||
(define (default-pre-unwind-handler key . args)
|
(define (default-pre-unwind-handler key . args)
|
||||||
|
|
|
@ -50,7 +50,10 @@
|
||||||
for-next-option
|
for-next-option
|
||||||
display-usage-report
|
display-usage-report
|
||||||
transform-usage-lambda
|
transform-usage-lambda
|
||||||
collect)
|
collect
|
||||||
|
assert-repl-silence
|
||||||
|
assert-repl-print-unspecified
|
||||||
|
assert-repl-verbosity)
|
||||||
|
|
||||||
#:replace (module-ref-submodule module-define-submodule!))
|
#:replace (module-ref-submodule module-define-submodule!))
|
||||||
|
|
||||||
|
@ -567,3 +570,21 @@ better yet, use the repl from `(system repl repl)'.")
|
||||||
((_ x x* ...)
|
((_ x x* ...)
|
||||||
#'(let ((val x))
|
#'(let ((val x))
|
||||||
(cons val (collect x* ...)))))))
|
(cons val (collect x* ...)))))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(define (assert-repl-silence v)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`assert-repl-silence' has moved to `(ice-9 scm-style-repl)'.")
|
||||||
|
((@ (ice-9 scm-style-repl) assert-repl-silence) v))
|
||||||
|
|
||||||
|
(define (assert-repl-print-unspecified v)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`assert-repl-print-unspecified' has moved to `(ice-9 scm-style-repl)'.")
|
||||||
|
((@ (ice-9 scm-style-repl) assert-repl-print-unspecified) v))
|
||||||
|
|
||||||
|
(define (assert-repl-verbosity v)
|
||||||
|
(issue-deprecation-warning
|
||||||
|
"`assert-repl-verbosity' has moved to `(ice-9 scm-style-repl)'.")
|
||||||
|
((@ (ice-9 scm-style-repl) assert-repl-verbosity) v))
|
||||||
|
|
|
@ -17,12 +17,34 @@
|
||||||
;;;;
|
;;;;
|
||||||
|
|
||||||
(define-module (ice-9 scm-style-repl)
|
(define-module (ice-9 scm-style-repl)
|
||||||
|
#:export (scm-repl-silent
|
||||||
|
scm-repl-print-unspecified
|
||||||
|
scm-repl-verbose
|
||||||
|
scm-repl-prompt)
|
||||||
|
|
||||||
;; #:replace, as with deprecated code enabled these will be in the root env
|
;; #:replace, as with deprecated code enabled these will be in the root env
|
||||||
#:replace (bad-throw
|
#:replace (assert-repl-silence
|
||||||
|
assert-repl-print-unspecified
|
||||||
|
assert-repl-verbosity
|
||||||
|
|
||||||
|
bad-throw
|
||||||
error-catching-loop
|
error-catching-loop
|
||||||
error-catching-repl
|
error-catching-repl
|
||||||
scm-style-repl))
|
scm-style-repl))
|
||||||
|
|
||||||
|
(define scm-repl-silent #f)
|
||||||
|
(define (assert-repl-silence v) (set! scm-repl-silent v))
|
||||||
|
|
||||||
|
(define scm-repl-print-unspecified #f)
|
||||||
|
(define (assert-repl-print-unspecified v) (set! scm-repl-print-unspecified v))
|
||||||
|
|
||||||
|
(define scm-repl-verbose #f)
|
||||||
|
(define (assert-repl-verbosity v) (set! scm-repl-verbose v))
|
||||||
|
|
||||||
|
(define scm-repl-prompt "guile> ")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; bad-throw is the hook that is called upon a throw to a an unhandled
|
;; bad-throw is the hook that is called upon a throw to a an unhandled
|
||||||
;; key (unless the throw has four arguments, in which case
|
;; key (unless the throw has four arguments, in which case
|
||||||
;; it's usually interpreted as an error throw.)
|
;; it's usually interpreted as an error throw.)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue