diff options
-rw-r--r-- | module/ice-9/boot-9.scm | 69 |
1 files changed, 32 insertions, 37 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm index f3cf9b0a5..48d822bfc 100644 --- a/module/ice-9/boot-9.scm +++ b/module/ice-9/boot-9.scm @@ -40,6 +40,38 @@ +;;; {Simple Debugging Tools} +;;; + +;; peek takes any number of arguments, writes them to the +;; current ouput port, and returns the last argument. +;; It is handy to wrap around an expression to look at +;; a value each time is evaluated, e.g.: +;; +;; (+ 10 (troublesome-fn)) +;; => (+ 10 (pk 'troublesome-fn-returned (troublesome-fn))) +;; + +(define (peek . stuff) + (newline) + (display ";;; ") + (write stuff) + (newline) + (car (last-pair stuff))) + +(define pk peek) + +(define (warn . stuff) + (with-output-to-port (current-error-port) + (lambda () + (newline) + (display ";;; WARNING ") + (display stuff) + (newline) + (car (last-pair stuff))))) + + + ;;; {Features} ;;; @@ -201,38 +233,6 @@ -;;; {Simple Debugging Tools} -;;; - -;; peek takes any number of arguments, writes them to the -;; current ouput port, and returns the last argument. -;; It is handy to wrap around an expression to look at -;; a value each time is evaluated, e.g.: -;; -;; (+ 10 (troublesome-fn)) -;; => (+ 10 (pk 'troublesome-fn-returned (troublesome-fn))) -;; - -(define (peek . stuff) - (newline) - (display ";;; ") - (write stuff) - (newline) - (car (last-pair stuff))) - -(define pk peek) - -(define (warn . stuff) - (with-output-to-port (current-error-port) - (lambda () - (newline) - (display ";;; WARNING ") - (display stuff) - (newline) - (car (last-pair stuff))))) - - - ;;; {Trivial Functions} ;;; @@ -2121,11 +2121,6 @@ module '(ice-9 q) '(make-q q-length))}." (loop (cddr args))))))) -;;; {Compiled module} - -(if (not (defined? 'load-compiled)) - (define load-compiled #f)) - ;;; {Autoloading modules} |