aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-11 12:54:44 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-11 12:54:44 -0700
commit5926ae1f68d85a6805b8887ba09d81cd16fd69c2 (patch)
treeb34bf0c93937d749ae45e2ab8531fc20febfb8a5
parent3a2b47ce43f6651b65d009532b3eec1a4bb002c4 (diff)
downloadconsfigurator-5926ae1f68d85a6805b8887ba09d81cd16fd69c2.tar.gz
move MACROEXPAND-ALL to utils.lisp
Pure code motion. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--src/propspec.lisp13
-rw-r--r--src/util.lisp13
2 files changed, 13 insertions, 13 deletions
diff --git a/src/propspec.lisp b/src/propspec.lisp
index e1ca1cb..4e0dc8e 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -124,19 +124,6 @@ FUNCTION designates a pure function from propapps to propapps."
env)))
env))))
-(defun macroexpand-all (form &optional env)
- "Wrap TRIVIAL-MACROEXPAND-ALL:MACROEXPAND-ALL to convert silent failures to
-expand into errors."
- (multiple-value-bind (expanded supported env-supported)
- (trivial-macroexpand-all:macroexpand-all form env)
- (cond
- ((not supported)
- (error "Don't know how to MACROEXPAND-ALL in this Lisp."))
- ((and env (not env-supported))
- (error "Don't know how to MACROEXPAND-ALL with env in this Lisp."))
- (t
- expanded))))
-
(defun make-propspec (&key (systems nil systems-supplied-p) props)
(setq props (copy-tree props))
(labels ((preprocess (item)
diff --git a/src/util.lisp b/src/util.lisp
index ee4ea71..248f52a 100644
--- a/src/util.lisp
+++ b/src/util.lisp
@@ -41,6 +41,19 @@
(defun memstring= (string list)
(member string list :test #'string=))
+(defun macroexpand-all (form &optional env)
+ "Wrap TRIVIAL-MACROEXPAND-ALL:MACROEXPAND-ALL to convert silent failures to
+expand into errors."
+ (multiple-value-bind (expanded supported env-supported)
+ (trivial-macroexpand-all:macroexpand-all form env)
+ (cond
+ ((not supported)
+ (error "Don't know how to MACROEXPAND-ALL in this Lisp."))
+ ((and env (not env-supported))
+ (error "Don't know how to MACROEXPAND-ALL with env in this Lisp."))
+ (t
+ expanded))))
+
;;;; Version numbers