From: Christopher Allan Webber Date: Sun, 29 Nov 2015 18:14:51 +0000 (-0600) Subject: Add %8sync-run sugar and friends X-Git-Tag: v0.1.0~34 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=ed0ef531945b62463f3dcd529930b73b06fc7ba4;p=8sync.git Add %8sync-run sugar and friends * 8sync/agenda.scm (%8sync-run, %8sync-run-at): New variables (%8sync-run-delay, %8sync-port): New variables --- 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