[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: R6RS exception printing at the REPL
From: |
Andy Wingo |
Subject: |
Re: R6RS exception printing at the REPL |
Date: |
Sat, 20 Nov 2010 16:23:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
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?
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
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.
What do you think?
Regards,
Andy
--
http://wingolog.org/
- Re: R6RS exception printing at the REPL,
Andy Wingo <=