[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)' |
Date: |
Tue, 23 Nov 2010 22:13:15 +0100 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux) |
Hi Andreas,
Looks good, but...
Andreas Rottmann <address@hidden> writes:
> (call-with-port): Don't use `dynamic-wind', as it is against its
> specification in R6RS 8.2.6.
[...]
> (define (call-with-port port proc)
> "Call @var{proc}, passing it @var{port} and closing @var{port} upon exit of
> @var{proc}. Return the return values of @var{proc}."
> - (dynamic-wind
> - (lambda ()
> - #t)
> - (lambda ()
> - (proc port))
> - (lambda ()
> - (close-port port))))
> + (call-with-values
> + (lambda () (proc port))
> + (lambda vals
> + (close-port port)
> + (apply values vals))))
I don’t see what in §8.2.6 would be against ‘dynamic-wind’, and
<http://www.r6rs.org/formal-comments/comment-197.txt> seems to suggest
that it’s OK.
Thanks,
Ludo’.
- [PATCH 2/4] Add implementation of "transcoded ports", (continued)
- [PATCH 2/4] Add implementation of "transcoded ports", Andreas Rottmann, 2010/11/20
- Re: [PATCH 2/4] Add implementation of "transcoded ports", Ludovic Courtès, 2010/11/20
- Re: [PATCH 2/4] Add implementation of "transcoded ports", Andreas Rottmann, 2010/11/21
- [PATCH 1/4] Turn `(rnrs io ports)' into an R6RS library, Andreas Rottmann, 2010/11/21
- [PATCH 2/4] Reorganize the R6RS I/O condition types, Andreas Rottmann, 2010/11/21
- [PATCH 4/4] Add implementation of "transcoded ports", Andreas Rottmann, 2010/11/21
- Re: [PATCH 4/4] Add implementation of "transcoded ports", Ludovic Courtès, 2010/11/24
- Re: [PATCH 4/4] Add implementation of "transcoded ports", Andreas Rottmann, 2010/11/24
- Re: [PATCH 4/4] Add implementation of "transcoded ports", Ludovic Courtès, 2010/11/25
- [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)', Andreas Rottmann, 2010/11/21
- Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)',
Ludovic Courtès <=
- Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)', Andreas Rottmann, 2010/11/23
- Re: [PATCH 3/4] Work towards a more complete implementation of `(rnrs io ports)', Ludovic Courtès, 2010/11/24
[PATCH 1/4] Fix missing port-table locking and bytevector output port segfault, Andreas Rottmann, 2010/11/20
[PATCH 3/4] Reorganize the R6RS I/O condition types, Andreas Rottmann, 2010/11/20
[PATCH 4/4] Work towards a more complete implementation of `(rnrs io ports)', Andreas Rottmann, 2010/11/20