From ed0ef531945b62463f3dcd529930b73b06fc7ba4 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 29 Nov 2015 12:14:51 -0600 Subject: [PATCH 1/1] Add %8sync-run sugar and friends * 8sync/agenda.scm (%8sync-run, %8sync-run-at): New variables (%8sync-run-delay, %8sync-port): New variables --- 8sync/agenda.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/8sync/agenda.scm b/8sync/agenda.scm index 3c4270f..aded0d5 100644 --- a/8sync/agenda.scm +++ b/8sync/agenda.scm @@ -66,7 +66,8 @@ run-it wrap wrap-apply run run-at run-delay - %port-request %run %run-at %run-delay + %run %run-at %run-delay %port-request + %8sync-run %8sync-run-at %8sync-run-delay %8sync-port catch-8sync catch-%8sync @@ -552,6 +553,24 @@ return the wrong thing via (%8sync) and trip themselves up." (list (make-port-request port-request-args ...) (make-run-request kont))))) +;; Sugar +(define-syntax-rule (%8sync-run rest ...) + "Sugar for (%8sync (%run ...))" + (%8sync (%run rest ...))) + +(define-syntax-rule (%8sync-run-at rest ...) + "Sugar for (%8sync (%run-at ...))" + (%8sync (%run-at rest ...))) + +(define-syntax-rule (%8sync-run-delay rest ...) + "Sugar for (%8sync (%run-delay ...))" + (%8sync (%run-delay rest ...))) + +(define-syntax-rule (%8sync-port rest ...) + "Sugar for (%8sync (%port-request ...))" + (%8sync (%port-request rest ...))) + + ;; TODO: Write (%run-immediately) ;; TODO -- 2.31.1