aboutsummaryrefslogtreecommitdiffhomepage
path: root/System/Posix/IO.hsc
diff options
context:
space:
mode:
authorGravatar Ian Lynagh <igloo@earth.li>2009-01-04 17:32:21 +0000
committerGravatar Ian Lynagh <igloo@earth.li>2009-01-04 17:32:21 +0000
commit47f4a8aaee12243c2df68e19236234dbea14c3ff (patch)
tree1e4655d94020ea66e8f8d1d41b347f5ef14e8744 /System/Posix/IO.hsc
parent370303a70815fcf76258d9f6938ba0e2b67fb2d3 (diff)
Avoid using IOError internals
Diffstat (limited to 'System/Posix/IO.hsc')
-rw-r--r--System/Posix/IO.hsc2
1 files changed, 1 insertions, 1 deletions
diff --git a/System/Posix/IO.hsc b/System/Posix/IO.hsc
index 0bee39c..fd8b643 100644
--- a/System/Posix/IO.hsc
+++ b/System/Posix/IO.hsc
@@ -366,7 +366,7 @@ fdRead (Fd fd) nbytes = do
allocaBytes (fromIntegral nbytes) $ \ bytes -> do
rc <- throwErrnoIfMinus1Retry "fdRead" (c_read fd bytes nbytes)
case fromIntegral rc of
- 0 -> ioError (IOError Nothing EOF "fdRead" "EOF" Nothing)
+ 0 -> ioError (ioeSetErrorString (mkIOError EOF "fdRead" Nothing Nothing) "EOF")
n -> do
s <- peekCStringLen (bytes, fromIntegral n)
return (s, n)