DEFTYPE assumes that a constant form is equal to its own value

parent 5f6b88d6
......@@ -81,7 +81,7 @@ by (documentation 'NAME 'type)."
(when (and (null lambda-list) (consp body) (null (rest body)))
(let ((form (first body)))
(when (constantp form env)
(setf function form))))
(setf function (ext:maybe-quote (ext:constant-form-value form env))))))
`(eval-when (:compile-toplevel :load-toplevel :execute)
,@(si::expand-set-documentation name 'type doc)
(do-deftype ',name '(DEFTYPE ,name ,lambda-list ,@body)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment