[R6RS] Slightly less trivial I/O question

Matthew Flatt mflatt
Thu Mar 3 11:51:35 EST 2005

At Thu, 03 Mar 2005 17:36:42 +0100, Michael Sperber wrote:
> The I/O system I'm working on allows (just like Reppy's library)
> redirecting a port to another source / destination. It'd therefore be
> more natural in that setting if there was only ever one current input
> port, and one current output port, and WITH-INPUT-FROM-FILE and
> WITH-OUTPUT-TO-FILE would simply temporarily redirect that port.

Do you have in mind things like `setInstream' and `setOutstream' of
SML's IMPERATIVE_IO, which mutate a stream to redirect it?

If so, it doesn't sound to me like the right way to implement
`with-input-from-file' and `with-output-from-file', because it doesn't
work well with threads. (So I probably misunderstand.)


More information about the R6RS mailing list