Raw I/O library proposal, second (more pragmatic) draft

Ashley Yakeley ashley@semantic.org
Wed, 06 Aug 2003 21:12:01 -0700


In article <16177.33859.531992.475470@tux-17.corp.peace.com>,
 Tom Pledger <Tom.Pledger@peace.com> wrote:

> Ashley Yakeley writes:
>  :
>  | >     streamGet      :: s -> IO Word8
>  | 
>  | What does this return after the last byte has been read?  What does
>  | this return for an empty file?
> 
> How about throwing an IOError instead of returning anything?

An EOS error? This would be the only function that throws it, wouldn't 
it?

Might it not be better for streamGet to return (Maybe Word8)? "Nothing" 
would mean EOS, and "Just b" would be the next byte.

-- 
Ashley Yakeley, Seattle WA