From 567afaffc610e8645e05f14a685fba770a4d7f65 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 30 Nov 2023 07:33:36 -0800 Subject: Moved outside of defun --- terrafirma.lisp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/terrafirma.lisp b/terrafirma.lisp index 62d063c..78d74c9 100644 --- a/terrafirma.lisp +++ b/terrafirma.lisp @@ -52,8 +52,7 @@ (cond ((and name (symbolp name)) name) ((symbolp type) (intern (format nil "VALIDATED-~a" type))) (t (error "Validator Name: Either TYPE must be a symbol or a NAME must be provided."))))) - `(defun ,validator-name (,var) - (macrolet ((validate (check msg &rest args) + `(macrolet ((validate (check msg &rest args) (let ((suberr (gensym))) `(prog1 t (let (,suberr) @@ -63,8 +62,7 @@ :instance terrafirma::*instance* :reason (format nil ,msg ,@args) :suberror ,suberr)))))) - + (defun ,validator-name (,var) (let ((terrafirma::*type* ',type) (terrafirma::*instance* ,var)) ,@body))))) - -- cgit v1.2.3