From: Daniel Barlow Date: Thu, 9 Oct 2003 13:50:34 +0000 (+0000) Subject: 0.8.4.13 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=346d8a639e9a4ff57d193270341874c0b9d06c58;p=sbcl.git 0.8.4.13 Added sb-introspect contrib to SBCL. Mostly for experimentation at this stage: do not use this stuff in client code unless you are willing to revisit it later, and please do say if it does things differently than you wanted. --- diff --git a/contrib/sb-introspect/Makefile b/contrib/sb-introspect/Makefile new file mode 100644 index 0000000..9ebf1a4 --- /dev/null +++ b/contrib/sb-introspect/Makefile @@ -0,0 +1,5 @@ +MODULE=sb-introspect +include ../vanilla-module.mk + +test:: + true diff --git a/contrib/sb-introspect/sb-introspect.lisp b/contrib/sb-introspect/sb-introspect.lisp new file mode 100644 index 0000000..8e9c9a9 --- /dev/null +++ b/contrib/sb-introspect/sb-introspect.lisp @@ -0,0 +1,24 @@ +(defpackage :sb-introspect + (:use "CL") + (:export "FUNCTION-ARGLIST" "VALID-FUNCTION-NAME-P")) + +(in-package :sb-introspect) + +;; This is here as a discussion point, not yet a supported interface. If +;; you would like to use the functions here, or you would like other +;; functions to be here, join the debate on sbcl-devel + +(defun valid-function-name-p (name) + "True if NAME denotes a function name that can be passed to MACRO-FUNCTION or FDEFINITION " + (and (sb-int:valid-function-name-p name) t)) + +(defun function-arglist (function) + "Given a function designator FUNCTION, return a description of its lambda list. Works for macros, simple functions and generic functions" + (cond ((valid-function-name-p function) + (function-arglist + (or (macro-function function) (fdefinition function)))) + ((typep function 'generic-function) + (sb-pcl::generic-function-pretty-arglist function)) + (t + (sb-impl::%simple-fun-arglist function)))) + diff --git a/version.lisp-expr b/version.lisp-expr index cfce20d..9f02057 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"0.8.4.12" +"0.8.4.13"