From: Christopher Allan Webber Date: Fri, 22 Apr 2016 14:24:44 +0000 (-0500) Subject: actors: Added docstrings to some message write procedures X-Git-Tag: v0.2.0~63 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=55bf40bbd2d7cd5f0f14f0e2de28f71dfe1a127e;p=8sync.git actors: Added docstrings to some message write procedures * 8sync/systems/actors.scm (write-message, serialize-message-pretty) (pprint-message): Add docstrings. --- diff --git a/8sync/systems/actors.scm b/8sync/systems/actors.scm index 40c5c57..2d42897 100644 --- a/8sync/systems/actors.scm +++ b/8sync/systems/actors.scm @@ -561,9 +561,15 @@ an integer." (message-deferred-reply message))) (define (write-message message port) + "Write out a message to a port for easy reading later. + +Note that if a sub-value can't be easily written to something +Guile's `read' procedure knows how to read, this doesn't do anything +to improve that. You'll need a better serializer for that.." (write (serialize-message message) port)) (define (serialize-message-pretty message) + "Serialize a message in a way that's easy for humans to read." `(*message* (id ,(message-id message)) (to ,(message-to message)) @@ -575,4 +581,5 @@ an integer." (deferred-reply ,(message-deferred-reply message)))) (define (pprint-message message) + "Pretty print a message." (pretty-print (serialize-message-pretty message)))