Basic constructor macro for type-sum structures.
(make-type-sum [:alternatives <alternatives>])
This is the usual way to construct type-sum structures. It simply conses together a structure with the specified fields.
This macro generates a new type-sum structure from scratch. See also change-type-sum, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-type-sum (&rest args) (std::make-aggregate 'type-sum args '((:alternatives)) 'make-type-sum nil))
Function:
(defun type-sum (alternatives) (declare (xargs :guard (alternative-listp alternatives))) (declare (xargs :guard t)) (let ((__function__ 'type-sum)) (declare (ignorable __function__)) (b* ((alternatives (mbe :logic (alternative-list-fix alternatives) :exec alternatives))) (list (cons 'alternatives alternatives)))))