aboutsummaryrefslogtreecommitdiff
path: root/src/propspec.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-03-16 13:05:29 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-03-16 13:05:29 -0700
commit72c58e831b48e53316187435c82b8c2cb1621007 (patch)
tree07fd19a2abc93b7c08865a34b24925bbe8fdf98f /src/propspec.lisp
parentc0c1ff74d42dacc198ff19b42cc7ffbf75d1436e (diff)
downloadconsfigurator-72c58e831b48e53316187435c82b8c2cb1621007.tar.gz
add WITH-REQUIREMENTS
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/propspec.lisp')
-rw-r--r--src/propspec.lisp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/propspec.lisp b/src/propspec.lisp
index 0a93e8e..f295081 100644
--- a/src/propspec.lisp
+++ b/src/propspec.lisp
@@ -288,6 +288,12 @@ application specification expression to a property application specification."
(invoke-restart 'skip-property))))
(apply-and-print propapps)))))
+(defmacro with-requirements (propapp &body requirements)
+ "Apply PROPAPP only after applying each dependency in REQUIREMENTS.
+Each item in REQUIREMENTS implicitly depends on the one preceding it, i.e., we
+apply the elements of REQUIREMENTS in reverse order."
+ `(eseqprops ,@(reverse requirements) ,propapp))
+
(define-function-property-combinator silent-seqprops (&rest propapps)
(retprop :type (collapse-types (mapcar #'propapptype propapps))
:check (constantly nil)