[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pretty-print

From: thi
Subject: Re: pretty-print
Date: Wed, 20 Sep 2000 11:06:34 -0700

   From: Keisuke Nishida <address@hidden>
   Date: 20 Sep 2000 13:31:33 -0400

   Does anyone have a Scheme version of pretty-print?  That is,
   something like

     > (pprint '(foo-foo-foo (bar-bar-bar (baz-baz-baz))))

slib has pretty-print.scm, and a format.scm that requires it.  because
guile module (ice-9 format) is an adaptation of slib's format.scm, the
`require' form is still present.  this means that you can try to use
(ice-9 format) but will probably get an error unless slib is already
loaded in the session.  looks like the (ice-9 format) i have is still
buggy -- see session log below -- it's module definition needs to be
changed to:

(define-module (ice-9 format)
  :use-module (ice-9 slib))


guile> (use-modules (ice-9 slib))
guile> (use-modules (ice-9 format))
guile> (define a '(foo-foo-foo (bar-bar-bar (baz-baz-baz))))
guile> (format #t "~Y" a)
/usr/local/share/guile/1.4.1/ice-9/format.scm:448:16: In expression (require 
(quote pretty-print)):
/usr/local/share/guile/1.4.1/ice-9/format.scm:448:16: Unbound variable: require
ABORT: (unbound-variable)
guile> (define-module (ice-9 format) :use-module (ice-9 slib))
#<directory (ice-9 format) 40219fb0>
guile> (define-module (guile-user))
#<directory (guile-user) 4020ecd8>
guile> (format #t "~Y" a)
(foo-foo-foo (bar-bar-bar (baz-baz-baz)))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]