Check whether name is a legal new name.
(chk-fresh-namep name type ctx wrld state) → (mv erp val state)
Returns an
For more information about legality of new names
see fresh-namep-msg,
which returns an
Function:
(defun chk-fresh-namep (name type ctx wrld state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (symbolp name) (plist-worldp wrld)))) (declare (xargs :guard (member-eq type '(function macro const stobj constrained-function nil)))) (let ((__function__ 'chk-fresh-namep)) (declare (ignorable __function__)) (er-let* ((msg (fresh-namep-msg name type wrld state))) (cond (msg (er soft ctx "~@0" msg)) (t (value nil))))))