Remove (8sync agenda) as an import from actors.scm and add wrap-apply.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 31 Jul 2017 17:04:15 +0000 (12:04 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Thu, 3 Aug 2017 20:50:18 +0000 (15:50 -0500)
* 8sync/actors.scm: Remove (8sync agenda) as an import.
(wrap-apply): Added, ported from agenda.scm, and which is necessary
for actors.scm to function without it.

8sync/actors.scm

index fe8b832a23773cff38c9eb659e9bc1a5af2194d9..48070c43f10deaeebea1db5c18c23d470c969a2a 100644 (file)
@@ -29,7 +29,6 @@
   #:use-module (fibers channels)
   #:use-module (fibers conditions)
   #:use-module (fibers operations)
   #:use-module (fibers channels)
   #:use-module (fibers conditions)
   #:use-module (fibers operations)
-  #:use-module (8sync agenda)
   #:use-module (8sync inbox)
   #:use-module (8sync rmeta-slot)
   #:export (;; utilities... ought to go in their own module
   #:use-module (8sync inbox)
   #:use-module (8sync rmeta-slot)
   #:export (;; utilities... ought to go in their own module
            #:message message))
   (apply method actor message (message-body message)))
 
            #:message message))
   (apply method actor message (message-body message)))
 
+(define-syntax-rule (wrap-apply body)
+  "Wrap possibly multi-value function in a procedure, applies all arguments"
+  (lambda args
+    (apply body args)))
+
 (define-syntax-rule (build-actions (symbol method) ...)
   "Construct an alist of (symbol . method), where the method is wrapped
 with wrap-apply to facilitate live hacking and allow the method definition
 (define-syntax-rule (build-actions (symbol method) ...)
   "Construct an alist of (symbol . method), where the method is wrapped
 with wrap-apply to facilitate live hacking and allow the method definition