(defpackage #:cutil (:use #:common-lisp) (:export #: #:instancep)) (in-package #:cutil) (defclass (standard-class) ()) (defmethod make-instance ((self ) &key) (error "Cannot instantiate abstract class ~A" (class-name self))) ;;; These are copied from cl-abstract-classes in Quicklisp. ;;; It turns out you do need both. ;;; Maybe someday I'll understand why :-) (defmethod closer-mop:validate-superclass ((class ) (superclass cl:standard-class)) t) (defmethod closer-mop:validate-superclass ((class cl:standard-class) (superclass )) t) (defun instancep (obj cls) (eq (class-of obj) cls)) (provide "cutil")