doc/misc.tex: Document some more miscellaneous utilities.
[sod] / doc / list-exports.lisp
index 0bfe0f2..f58fb2b 100755 (executable)
@@ -1,4 +1,5 @@
 #! /bin/sh
+":"; ### -*-lisp-*-
 ":"; CL_SOURCE_REGISTRY=$(pwd)/build/src/:; export CL_SOURCE_REGISTRY
 ":"; exec cl-launch -X -l "sbcl cmucl" -s asdf -i "(sod-exports::main)" -- "$0" "$@" || exit 1
 
                  (t (best-package-name pkg)))
            (or exportp (null pkg)) (symbol-name symbol))))
 
+(deftype interesting-class ()
+  '(or standard-class
+       structure-class
+       #.(class-name (class-of (find-class 'condition)))))
+
 (defun analyse-classes (package)
   (setf package (find-package package))
   (let ((classes (mapcan (lambda (symbol)
                           (let ((class (find-class symbol nil)))
                             (and class
-                                 (typep class '(or standard-class
-                                                structure-class))
+                                 (typep class 'interesting-class)
                                  (list class))))
                         (list-exported-symbols package)))
        (subs (make-hash-table)))
                                #'order-specializers
                                :key #'method-specializers))
            (when (gethash method methods)
-             (format t "~2T~{~A~^ ~}~%"
+             (format t "~2T~{~A~^ ~}~@[ [~{~(~S~)~^ ~}]~]~%"
                      (mapcar
                       (lambda (spec)
                         (etypecase spec
                                      (if (symbolp obj)
                                          (pretty-symbol-name obj package)
                                          obj))))))
-                      (method-specializers method))))))))))
+                      (method-specializers method))
+                     (method-qualifiers method)))))))))
 
 (defun check-slot-names (package)
   (setf package (find-package package))