[Haskell-cafe] reading from the cdrom drive on Red Hat

Adam Langley agl at imperialviolet.org
Fri Feb 1 16:49:43 EST 2008


On Feb 1, 2008 1:42 PM, Bryan O'Sullivan <bos at serpentine.com> wrote:
> No, it's the Haskell runtime turning a -1 return from read into an
> exception.  You need to call hIsEOF to check whether you've hit EOF,
> then break out of the loop.

(assuming you meant 0, not -1)

My bad, I thought that the Posix.IO stuff was a closer wrapping than
that. It does, indeed, throw an exception on 0. How unfortunate.


AGL


-- 
Adam Langley                                      agl at imperialviolet.org
http://www.imperialviolet.org                       650-283-9641


More information about the Haskell-Cafe mailing list