
7 Aug
2003
7 Aug
'03
12:12 a.m.
In article <16177.33859.531992.475470@tux-17.corp.peace.com>,
Tom Pledger
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