aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pouar <pouar@pouar.net>2020-07-15 14:31:03 -0500
committerGravatar Pouar <pouar@pouar.net>2020-07-15 14:31:03 -0500
commit88de02f1addeabd0c2c35545c7483efdaa97f8f4 (patch)
tree93bba83087bc2fc9a68ea060e5a73e6c77e7744f
parentmake sure the package prefix is printed in print-object (diff)
print the element type name when printing the class too
-rw-r--r--core/classes.lisp7
1 files changed, 7 insertions, 0 deletions
diff --git a/core/classes.lisp b/core/classes.lisp
index 071e267..ff33820 100644
--- a/core/classes.lisp
+++ b/core/classes.lisp
@@ -32,6 +32,13 @@
(print-unreadable-object (o s :type t :identity t)
(write class :stream s)))
(call-next-method))))
+(defmethod print-object ((o element-type-class) s)
+ (let ((class (slot-value o 'name)))
+ (if class
+ (let ((*package* (find-package :keyword)))
+ (print-unreadable-object (o s :type t :identity nil)
+ (f:fmt s (:s class) " " (:s (class-name o)))))
+ (call-next-method))))
(defgeneric coerce-element-type (element)
(:method ((element-type (eql nil)))
nil)