[Top][All Lists]

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

Re: R6RS exception printing at the REPL

From: Andreas Rottmann
Subject: Re: R6RS exception printing at the REPL
Date: Sat, 20 Nov 2010 19:18:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Andy Wingo <address@hidden> writes:

> On Sun 24 Oct 2010 23:46, Andreas Rottmann <address@hidden> writes:
>> Attached is a patch that improves the way R6RS exceptions are printed at
>> the REPL
> Cool! I have also found the need to define pretty-printers for various
> throw keys. I wonder, could you rework this patch to add a more generic
> exception-printing mechanism?
Sure, that would make sense, and I can then also squash all the
occurances where exceptions are printed that I've missed in the last

> I'm going to display my ignorance in public and try to write down some
> types. := is a type definition, and : declares the type of something.
>   exception-printer := port args -> nothing
>   set-exception-printer! : exception-printer -> nothing
Did you mean the following?

set-exception-printer! : key exception-printer -> nothing

>   exception-printer : key -> exception-printer
>   print-exception : key args port -> nothing
> The default behavior could be hard-coded into print-exception. The first
> two procedures (set-exception-printer!, exception-printer, and
> print-exception) could go into boot-9, and the third into (system repl
> error-handling), or a new module under ice-9.
Sorry, I don't understand this -- there are three procedures, which you
all say should go into boot-9.scm?  Or did you mean that
`print-exception' should go into `(system repl error-handling)'?

> What do you think?
Besides the above questions, I wonder where I should install the
exception printer for R6RS exceptions (since the code will depend on
quite a bit of R6RS, so we maybe want to have it loaded on demand, like
in the last patch.

Regards, Rotty
Andreas Rottmann -- <>

reply via email to

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