diff --git a/core/message.lisp b/core/message.lisp index 294c8ce..0eb5a3d 100644 --- a/core/message.lisp +++ b/core/message.lisp @@ -8,14 +8,6 @@ (in-package :scopes/core/message) -;;;; message-head - -(defclass message-head () - ((domain) - (action) - (class) - (item))) - ;;;; message (defclass message () @@ -24,18 +16,11 @@ (timestamp) (data :accessor data :initarg :data :initform nil))) -(defun create (head-vals &key data sender) - (let ((h (make-instance 'message-head))) - (dolist (sl '(domain action class item)) - (setf (slot-value h sl) (pop head-vals))) - (make-instance 'message :head h :data data :sender sender))) +(defun create (head &key data sender) + (make-instance 'message :head head :data data :sender sender)) (defmethod print-object ((msg message) stream) - (with-slots (domain action class item) (head msg) - (format stream - ">" - domain action class item (sender msg) (data msg)))) + (format stream ">" (head msg) (sender msg) (data msg))) (defun head-as-list (msg) - (with-slots (domain action class item) (head msg) - (list domain action class item))) + (head msg)) diff --git a/shape.lisp b/shape.lisp new file mode 100644 index 0000000..e26f946 --- /dev/null +++ b/shape.lisp @@ -0,0 +1,4 @@ +;;;; cl-scopes/shape - really abstract basic data shape definitions. + +(defpackage :scopes/shape + (:use :common-lisp))