[Top][All Lists]

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

Re: pretty-print for 1+

From: Brian Killian
Subject: Re: pretty-print for 1+
Date: Sat, 14 Sep 2013 16:06:47 -0400

On Thu, Sep 12, 2013 at 6:04 PM, Ludovic Courtès <address@hidden> wrote:
Brian Killian <address@hidden> skribis:

> Using guile 2.0.9 and the ice-9 pretty-print module, when I apply:
> (pretty-print '(1+ 1))
> I get:
> (#{1+}# 1)
> I was expecting:
> (1+ 1)
> Is this an issue with pretty-print or should I adjust my expectation?

I think it’s an issue with ‘write’.  Specifically,
‘INITIAL_IDENTIFIER_MASK’ in print.c doesn’t quite match the syntax
recognized by ‘read’.


Thank you for the information. I'm using (+ arg 1) instead of (1+ arg) as a workaround.

I'm using pretty-print to format code snippets as I work through SICP, which is becoming tedious. Do you know of a script or tool that formats Scheme files using the pretty-print rules? I've switched from gedit to Emacs as an editor, but Emacs only seems to indent things properly, rather than stripping extraneous newlines and trying to fit expressions on one line if possible like pretty-print does.

reply via email to

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