From: Christopher Allan Webber Date: Wed, 27 Apr 2016 02:35:10 +0000 (-0500) Subject: actors: debug: Expose more things via debug X-Git-Tag: v0.2.0~24 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=961046c784a18f8e2b7684482b0869808a5fe0e2;p=8sync.git actors: debug: Expose more things via debug * 8sync/systems/actors/debug.scm (expose): New macro for easy exposing of things not normally exported from the actors module. (hive-resolve-local-actor): Switch to use "expose". (actor-hive): Expose/export. (hive-create-actor-gimmie*): Switch to be a procedure rather than a macro. --- diff --git a/8sync/systems/actors/debug.scm b/8sync/systems/actors/debug.scm index 61baf0c..0a5615d 100644 --- a/8sync/systems/actors/debug.scm +++ b/8sync/systems/actors/debug.scm @@ -20,10 +20,27 @@ #:use-module (oop goops) #:use-module (8sync systems actors) #:export (hive-resolve-local-actor - hive-create-actor-gimmie)) + actor-hive -(define hive-resolve-local-actor - (@@ (8sync systems actors) hive-resolve-local-actor)) + hive-create-actor-gimmie + hive-create-actor-gimmie*)) + + +;;; Expose not normally exposed methods +;;; =================================== + +;; "private" kind of a misnomer +(define-syntax-rule (expose private-var) + (define private-var + (@@ (8sync systems actors) private-var))) + +(expose hive-resolve-local-actor) +(expose actor-hive) + + + +;;; Some utilities +;;; ============= (define (hive-create-actor-gimmie . args) "Create an actor on the hive, and give us that actor. @@ -31,8 +48,10 @@ Uses hive-create-actor* arguments." (let ((actor-id (apply hive-create-actor args))) (hive-resolve-local-actor hive actor-id))) -(define-syntax-rule (hive-create-actor-gimmie* args ...) +(define (hive-create-actor-gimmie* . args) "Create an actor on the hive, and give us that actor. Uses hive-create-actor* arguments." - (let ((actor-id (hive-create-actor* args ...))) + (let ((actor-id (apply hive-create-actor* args))) (hive-resolve-local-actor hive actor-id))) + +