diff options
author | Colin Okay <colin@cicadas.surf> | 2022-10-22 08:26:16 -0500 |
---|---|---|
committer | Colin Okay <colin@cicadas.surf> | 2022-10-22 08:26:16 -0500 |
commit | 5d1ce10ec8f041d7b25c27363620b7db63dff19b (patch) | |
tree | a46f4f6ef85bb797939188e7174b1d04bd94584e /definition-macros.lisp | |
parent | 16e1a142a28a0421bc91456ca7bf4cac6a14095f (diff) |
Add: utility modules
Diffstat (limited to 'definition-macros.lisp')
-rw-r--r-- | definition-macros.lisp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/definition-macros.lisp b/definition-macros.lisp new file mode 100644 index 0000000..6ecda6d --- /dev/null +++ b/definition-macros.lisp @@ -0,0 +1,19 @@ +;;;; definition-macros.lisp + +(in-package :vampire) + +(defmacro defclass/bknr (name supers slotdefs &rest options) + "Defines a class using defclass/std syntax. Ensures that the class + is a sublcas of STORE-OBJECT with metaclass PERSISTENT-CLASS." + (let* ((include-store-object-p + (notany (lambda (c) (closer-mop:subclassp c 'store-object)) + supers)) + (supers + (if include-store-object-p + `(store-object ,@supers) + supers))) + `(eval-when (:compile-toplevel) + (defclass/std ,name ,supers + ,slotdefs + (:metaclass persistent-class) + ,@options)))) |