We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53d0ddf commit 9c6ad1aCopy full SHA for 9c6ad1a
1 file changed
tests/PipeNonBlockIO.hs
@@ -1,5 +1,6 @@
1
module PipeNonBlockIO where
2
3
+import Control.Monad (void)
4
import Control.Concurrent
5
import Control.Concurrent.MVar
6
import Data.Word
@@ -18,7 +19,7 @@ foreign import capi "fcntl.h value F_SETFL" fSETFL :: CInt
18
19
foreign import capi "fcntl.h value O_NONBLOCK" oNONBLOCK :: CInt
20
21
setNonBlocking :: CInt -> IO ()
-setNonBlocking fd = c_fcntl_setfl fd fSETFL oNONBLOCK >> return ()
22
+setNonBlocking fd = void (c_fcntl_setfl fd fSETFL oNONBLOCK)
23
24
blockOnRead :: CInt -> IO Word8
25
blockOnRead fd = alloca $ \p -> go p
0 commit comments