mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
(system repl command) cleanups
* module/system/repl/command.scm (profile, trace, inspect) (pretty-print): Use repl-prepare-eval-thunk instead of the lower-level compile and make-program.
This commit is contained in:
parent
65bce23759
commit
d8e2ba23fc
1 changed files with 4 additions and 4 deletions
|
@ -438,7 +438,7 @@ Time execution."
|
||||||
Profile execution."
|
Profile execution."
|
||||||
;; FIXME opts
|
;; FIXME opts
|
||||||
(apply statprof
|
(apply statprof
|
||||||
(make-program (repl-compile repl (repl-parse repl form)))
|
(repl-prepare-eval-thunk repl (repl-parse repl form))
|
||||||
opts))
|
opts))
|
||||||
|
|
||||||
(define-meta-command (trace repl (form) . opts)
|
(define-meta-command (trace repl (form) . opts)
|
||||||
|
@ -447,7 +447,7 @@ Trace execution."
|
||||||
;; FIXME: doc options, or somehow deal with them better
|
;; FIXME: doc options, or somehow deal with them better
|
||||||
(apply vm-trace
|
(apply vm-trace
|
||||||
(the-vm)
|
(the-vm)
|
||||||
(make-program (repl-compile repl (repl-parse repl form)))
|
(repl-prepare-eval-thunk repl (repl-parse repl form))
|
||||||
opts))
|
opts))
|
||||||
|
|
||||||
|
|
||||||
|
@ -630,14 +630,14 @@ Enable a trap."
|
||||||
(define-stack-command (inspect repl (form))
|
(define-stack-command (inspect repl (form))
|
||||||
"inspect EXP
|
"inspect EXP
|
||||||
Inspect the result(s) of evaluating EXP."
|
Inspect the result(s) of evaluating EXP."
|
||||||
(call-with-values (make-program (repl-compile repl (repl-parse repl form)))
|
(call-with-values (repl-prepare-eval-thunk repl (repl-parse repl form))
|
||||||
(lambda args
|
(lambda args
|
||||||
(for-each %inspect args))))
|
(for-each %inspect args))))
|
||||||
|
|
||||||
(define-meta-command (pretty-print repl (form))
|
(define-meta-command (pretty-print repl (form))
|
||||||
"pretty-print EXP
|
"pretty-print EXP
|
||||||
Pretty-print the result(s) of evaluating EXP."
|
Pretty-print the result(s) of evaluating EXP."
|
||||||
(call-with-values (make-program (repl-compile repl (repl-parse repl form)))
|
(call-with-values (repl-prepare-eval-thunk repl (repl-parse repl form))
|
||||||
(lambda args
|
(lambda args
|
||||||
(for-each
|
(for-each
|
||||||
(lambda (x)
|
(lambda (x)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue