The cl-debug-print Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The cl-debug-print Reference Manual

This is the cl-debug-print Reference Manual, version 0.2.0, generated automatically by Declt version 3.0 "Montgomery Scott" on Mon Apr 19 14:42:15 2021 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

* 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)
(cl-syntax:use-syntax cl-debug-print:debug-print-syntax)

;;; 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


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

The main system appears first, followed by any subsystem dependency.


Previous: , Up: Systems   [Contents][Index]

2.1 cl-debug-print

Author

Satoshi Imai

License

MIT

Description

A reader-macro for debug print

Long Description

* 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)
(cl-syntax:use-syntax cl-debug-print:debug-print-syntax)

;;; 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

Version

0.2.0

Dependency

cl-syntax

Source

cl-debug-print.asd (file)

Component

src (module)


Next: , Previous: , Up: Top   [Contents][Index]

3 Modules

Modules are listed depth-first from the system components tree.


Previous: , Up: Modules   [Contents][Index]

3.1 cl-debug-print/src

Parent

cl-debug-print (system)

Location

src/

Component

cl-debug-print.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

4 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

4.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

4.1.1 cl-debug-print.asd

Location

cl-debug-print.asd

Systems

cl-debug-print (system)


Previous: , Up: Lisp files   [Contents][Index]

4.1.2 cl-debug-print/src/cl-debug-print.lisp

Parent

src (module)

Location

src/cl-debug-print.lisp

Packages

cl-debug-print

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

5.1 cl-debug-print

Source

cl-debug-print.lisp (file)

Nickname

debug-print

Use List
Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

6 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


Previous: , Up: Definitions   [Contents][Index]

6.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

6.1.1 Special variables

Special Variable: *dbg*

*DBG* is a list, and using DEBUG-PUSH(#!) will be pushed to this list. To clear this variable, use the CLEAR-DBG function.

Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Special Variable: *destination*

*DESTINATION* allows to configure destination stream for debug prints.

Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Special Variable: *use-describe*

When *USE-DESCRIBE* is true, describe is used for debug prints.

Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Special Variable: debug-print-syntax
Package

cl-debug-print

Source

cl-debug-print.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

6.1.2 Functions

Function: clear-dbg ()
Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Function: debug-print PRE-EXP EXP
Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Function: debug-print-reader STREAM CHAR1 CHAR2
Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Function: debug-push OBJ
Package

cl-debug-print

Source

cl-debug-print.lisp (file)

Function: debug-push-reader STREAM CHAR1 CHAR2
Package

cl-debug-print

Source

cl-debug-print.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   C   F   L   M  
Index Entry  Section

C
cl-debug-print.asd: The cl-debug-print․asd file
cl-debug-print/src: The cl-debug-print/src module
cl-debug-print/src/cl-debug-print.lisp: The cl-debug-print/src/cl-debug-print․lisp file

F
File, Lisp, cl-debug-print.asd: The cl-debug-print․asd file
File, Lisp, cl-debug-print/src/cl-debug-print.lisp: The cl-debug-print/src/cl-debug-print․lisp file

L
Lisp File, cl-debug-print.asd: The cl-debug-print․asd file
Lisp File, cl-debug-print/src/cl-debug-print.lisp: The cl-debug-print/src/cl-debug-print․lisp file

M
Module, cl-debug-print/src: The cl-debug-print/src module

Jump to:   C   F   L   M  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   C   D   F  
Index Entry  Section

C
clear-dbg: Exported functions

D
debug-print: Exported functions
debug-print-reader: Exported functions
debug-push: Exported functions
debug-push-reader: Exported functions

F
Function, clear-dbg: Exported functions
Function, debug-print: Exported functions
Function, debug-print-reader: Exported functions
Function, debug-push: Exported functions
Function, debug-push-reader: Exported functions

Jump to:   C   D   F  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   *  
D   S  
Index Entry  Section

*
*dbg*: Exported special variables
*destination*: Exported special variables
*use-describe*: Exported special variables

D
debug-print-syntax: Exported special variables

S
Special Variable, *dbg*: Exported special variables
Special Variable, *destination*: Exported special variables
Special Variable, *use-describe*: Exported special variables
Special Variable, debug-print-syntax: Exported special variables

Jump to:   *  
D   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   C   P   S  
Index Entry  Section

C
cl-debug-print: The cl-debug-print system
cl-debug-print: The cl-debug-print package

P
Package, cl-debug-print: The cl-debug-print package

S
System, cl-debug-print: The cl-debug-print system

Jump to:   C   P   S