[Larceny-users] Where is pretty-print hiding in ERR5RS?

William D Clinger will at ccs.neu.edu
Thu Dec 27 10:22:05 EST 2007


Ryan Newton wrote:
> It looks like pretty-print didn't make it into the R6RS standard
> libs.  Normal larceny (r5rs) has pretty-print bound at top-level, but
> I haven't been able to figure out what library I need to import to get
> pretty-print in ERR5RS mode.

Any procedure that is present in Larceny's R5RS mode
(and not loaded dynamically using require or load) can
be imported using the following paradigm:

(import (primitives pretty-print
                    open-output-string
                    get-output-string))

A library's import declaration can use the primitives
clause also.

Despite R6RS prohibitions against syntactic extensions,
the primitives clause works in non-Spanky R6RS modes as
well as in ERR5RS mode; that's an advantage of being
R6RS-compatible but not R6RS-conforming.

Will



More information about the Larceny-users mailing list