aboutsummaryrefslogtreecommitdiff
path: root/terrafirma.lisp
diff options
context:
space:
mode:
Diffstat (limited to 'terrafirma.lisp')
-rw-r--r--terrafirma.lisp6
1 files 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)))))
-