This is the cl-debug-print Reference Manual, version 0.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 04:49:56 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-debug-print
A reader-macro for debug print
Satoshi Imai
MIT
* cl-debug-print
A reader macro package for debug printing.
** Install
When install by Roswell,
#+begin_src
ros install masatoi/cl-debug-print
#+end_src
** Usage
#+BEGIN_SRC lisp
(ql:quickload :cl-debug-print)
(debug-print:use-debug-print)
;;; Debug print
(defun fact (n)
(if (= #>n 0)
1
(* n #>(fact (1- n)))))
(fact 10)
;; N => 10
;; N => 9
;; N => 8
;; N => 7
;; N => 6
;; N => 5
;; N => 4
;; N => 3
;; N => 2
;; N => 1
;; N => 0
;; (FACT (1- N)) => 1
;; (FACT (1- N)) => 1
;; (FACT (1- N)) => 2
;; (FACT (1- N)) => 6
;; (FACT (1- N)) => 24
;; (FACT (1- N)) => 120
;; (FACT (1- N)) => 720
;; (FACT (1- N)) => 5040
;; (FACT (1- N)) => 40320
;; (FACT (1- N)) => 362880
;;; Debug push
(defun fact2 (n)
(if (= n 0)
1
(* n #!(fact2 (1- n)))))
(fact2 10)
;; => 3628800
;;; Debug push results are stored to *dbg*
cl-debug-print:*dbg*
;; => (362880 40320 5040 720 120 24 6 2 1 1)
;;; Clearing debug push list
(cl-debug-print:clear-dbg)
cl-debug-print:*dbg*
;; => nil
#+END_SRC
*** Configure variables
#+begin_src lisp
;;; Setting destination stream (default value is *standard-output*)
(setf cl-debug-print:*destination* *error-output*)
;;; Setting for using DESCRIBE instead of mere value (default value is nil)
(setf cl-debug-print:*use-describe* t)
#>’sin
;; ’SIN => COMMON-LISP:SIN
;; [symbol]
;;
;; SIN names a compiled function:
;; Lambda-list: (NUMBER)
;; Declared type: (FUNCTION (NUMBER)
;; (VALUES
;; (OR (SINGLE-FLOAT -1.0 1.0)
;; (DOUBLE-FLOAT -1.0d0 1.0d0)
;; (COMPLEX SINGLE-FLOAT) (COMPLEX DOUBLE-FLOAT))
;; &OPTIONAL))
;; Derived type: (FUNCTION (T)
;; (VALUES
;; (OR (SINGLE-FLOAT -1.0 1.0)
;; (DOUBLE-FLOAT -1.0d0 1.0d0)
;; (COMPLEX DOUBLE-FLOAT) (COMPLEX SINGLE-FLOAT))
;; &OPTIONAL))
;; Documentation:
;; Return the sine of NUMBER.
;; Known attributes: foldable, flushable, unsafely-flushable, movable, recursive
;; Source file: SYS:SRC;CODE;IRRAT.LISP
#+end_src
0.2.0
cl-syntax
(system).
src
(module).
Modules are listed depth-first from the system components tree.
cl-debug-print/src
cl-debug-print
(system).
cl-debug-print.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-debug-print/cl-debug-print.asd
cl-debug-print
(system).
cl-debug-print/src/cl-debug-print.lisp
src
(module).
*dbg*
(special variable).
*destination*
(special variable).
*use-describe*
(special variable).
clear-dbg
(function).
debug-print
(function).
debug-print-reader
(function).
debug-print-syntax
(special variable).
debug-push
(function).
debug-push-reader
(function).
use-debug-print
(function).
Packages are listed by definition order.
cl-debug-print
debug-print
cl-syntax
.
common-lisp
.
editor-hints.named-readtables
.
*dbg*
(special variable).
*destination*
(special variable).
*use-describe*
(special variable).
clear-dbg
(function).
debug-print
(function).
debug-print-reader
(function).
debug-print-syntax
(special variable).
debug-push
(function).
debug-push-reader
(function).
use-debug-print
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
*DBG* is a list, and using DEBUG-PUSH(#!) will be pushed to this list. To clear this variable, use the CLEAR-DBG function.
*DESTINATION* allows to configure destination stream for debug prints.
When *USE-DESCRIBE* is true, describe is used for debug prints.
Jump to: | C D F U |
---|
Jump to: | C D F U |
---|
Jump to: | *
D S |
---|
Jump to: | *
D S |
---|
Jump to: | C F M P S |
---|
Jump to: | C F M P S |
---|