[plt-scheme] Proposal for s-expr tracing format

From: John Clements (clements at brinckerhoff.org)
Date: Sun Aug 12 22:30:43 EDT 2007

On Aug 12, 2007, at 11:20 AM, Shriram Krishnamurthi wrote:

> I think this is a great idea!
>
> I wrote the first version of trace to dumbly mimic the version in Chez
> Scheme (which in turn probably minicked the one in ..., which ...,
> which probably goes back to Lisp 1.5 or something).  But this is
> definitely superior.
>
> There's no reason it can't print the way you want it to.  Indeed, if
> you're willing to settle for not handling multiple-values and having
> superfluous newlines, here's a diff that you can apply to
> ./collects/mzlib/trace.ss to get parenthetical printing (though not
> precisely in the format you specified):
>
> 44c44
> <                (first '(""))
> ---
>>                (first '("|"))
> 63c63
> <                        (cons "  " first)
> ---
>>                        (cons " |" first)
> 94d93
> <         (pretty-display "(")
> 118,119c117
> <           (pretty-print (car results))
> <           (pretty-display ")"))
> ---
>>           (pretty-print (car results)))
>
> This even gives you existing indentation level, so you don't even need
> to copy and re-indent the output.

Presumably the result of using call/cc would be unbalanced parens?

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2223 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20070812/c7cba425/attachment.p7s>

Posted on the users mailing list.