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