Commit 7d3d2625 authored by Pascal Costanza's avatar Pascal Costanza
Browse files

Added a classp predicate (due to Willem Broekema).

darcs-hash:058a34b332307f899149a33967f81f74a4697788
parent efae1dc6
......@@ -11,6 +11,8 @@
#:defclass #:defgeneric #:ensure-generic-function
#:standard-class #:standard-generic-function)
(:import-from #:excl #:classp)
(:import-from #:mop
#:direct-slot-definition
......@@ -115,6 +117,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
......@@ -108,6 +108,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
......@@ -2,6 +2,9 @@
;; Some utility functions.
(defun classp (thing)
(typep thing 'class))
(defun required-args (lambda-list &optional (collector #'identity))
(loop for arg in lambda-list
until (member arg lambda-list-keywords)
......
......@@ -11,6 +11,8 @@
(:import-from #:clos
#:classp
#:direct-slot-definition
#:effective-slot-definition
#-ecl #:eql-specializer
......@@ -113,6 +115,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
......@@ -15,6 +15,8 @@
(:import-from #:clos
#:classp
#:direct-slot-definition
#:effective-slot-definition
#-lispworks #:eql-specializer
......@@ -118,6 +120,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
......@@ -16,6 +16,8 @@
(:import-from #:ccl
#:classp
#:direct-slot-definition
#:effective-slot-definition
#:eql-specializer
......@@ -118,6 +120,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
......@@ -7,6 +7,11 @@
#-sbcl (:shadow #:typep #:subtypep)
#-sbcl (:export #:typep #:subtypep)
(:import-from
#+cmu #:pcl
#+sbcl #:sb-pcl
#:classp)
(:import-from
#+cmu #:clos-mop
#+sbcl #:sb-mop
......@@ -113,6 +118,7 @@
#:standard-slot-definition
#:standard-writer-method
#:classp
#:ensure-finalized
#:ensure-method
#:fix-slot-initargs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment