buffer pretty output to work in columnar

This commit is contained in:
Alex Shinn 2018-01-07 14:42:52 +09:00
parent b9172a366c
commit f29a404324
2 changed files with 18 additions and 12 deletions

View file

@ -40,7 +40,7 @@
(return nothing))))
nothing))
(define (generate)
(if (and resume (list-queue-empty? queue))
(when (and resume (list-queue-empty? queue))
(call-with-current-continuation
(lambda (cc)
(set! return cc)

View file

@ -1,5 +1,5 @@
;; pretty.scm -- pretty printing format combinator
;; Copyright (c) 2006-2013 Alex Shinn. All rights reserved.
;; Copyright (c) 2006-2018 Alex Shinn. All rights reserved.
;; BSD-style license: http://synthcode.com/license.txt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -348,15 +348,21 @@
(define (pretty obj)
(fn ()
(call-with-output
(each (pp obj (extract-shared-objects obj #t))
fl)))
fl)
displayed)))
(define (pretty-shared obj)
(fn ()
(call-with-output
(each (pp obj (extract-shared-objects obj #f))
fl)))
fl)
displayed)))
(define (pretty-simply obj)
(fn ()
(call-with-output
(each (pp obj (extract-shared-objects #f #f))
fl)))
fl)
displayed)))