[MLton] Bug: TextPrimIO does not distinguish between EOF and
	no data
    Ville Laurikari 
    ville at laurikari.net
       
    Thu Dec 13 04:35:52 PST 2007
    
    
  
On Wed, Dec 12, 2007 at 11:49:31PM +0200, Vesa Karvonen wrote:
> The problem seems to be that the canInput implementation in
> basis-library/io/imperative-io.fun does not distinguish between
> readArrNB returning NONE (means: eof not seen, any read will block)
> and SOME 0 (means: eof seen and at eof).
>
> Below is a patch that seems to fix the problem.  With the patch, I get
Your patch works for me too, with both bug.sml and my real program.  I
suggest you commit it.  The logic in canInput after your patch seems
correct to me.
--
http://www.iki.fi/vl/
    
    
More information about the MLton
mailing list