[racket-dev] current-read-interaction

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Thu Sep 15 19:19:34 EDT 2011

On 09/15/2011 04:22 PM, Matthew Flatt wrote:
> At Thu, 15 Sep 2011 16:05:58 -0600, Jon Rafkind wrote:
>> For Honu I set up the `current-read-interaction' procedure to read a string of 
>> characters ended by a newline and to parse that with `honu-read-syntax'. [...]
>>
>> 2. I wanted to make ctrl-d quit the repl immediately so I look for an 
>> eof-object in the stream and if found I try to return #'(exit). The Honu 
>> parser gets
>> involved at that point so it doesn't quite work, but anyway is that the right 
>> strategy?
> I think the reader should return `eof', because `read-eval-print-loop'
> stops when it sees an end-of-file.
>

Ok that worked, I just replaced #'(exit) with eof, now the command line and drscheme are happy.


Posted on the dev mailing list.