From c77513e838731cd2807d94745d3d0020f8c85468 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Tue, 29 Nov 2016 10:18:38 +1300 Subject: [PATCH] Improve actor-state pretty-printing --- racket/syndicate/actor.rkt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/racket/syndicate/actor.rkt b/racket/syndicate/actor.rkt index ce41f36..568ba9f 100644 --- a/racket/syndicate/actor.rkt +++ b/racket/syndicate/actor.rkt @@ -1257,11 +1257,13 @@ (fprintf p " - Fields:\n") (for ([(d v) (in-hash field-table)]) (define subject-ids (hash-ref (dataflow-graph-edges-forward dfg) d set)) + (define v* + (indented-port-output 6 (lambda (p) (syndicate-pretty-print v p)) #:first-line? #f)) (if (set-empty? subject-ids) - (fprintf p " - ~a: ~v\n" (format-field-descriptor d) v) - (fprintf p " - ~a: ~v ~a\n" + (fprintf p " - ~a: ~a\n" (format-field-descriptor d) v*) + (fprintf p " - ~a: ~a ~a\n" (format-field-descriptor d) - v (for/list [(subject-id subject-ids)] (match-define (list fid eid) subject-id) - (format "~a:~a" fid eid))))))) + (format "~a:~a" fid eid)) + v*)))))