packages feed

epoll 0.2.1 → 0.2.2

raw patch · 2 files changed

+5/−4 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- System.Linux.Epoll.Buffer: beConcat :: (BufElem a) => [a] -> a
+ System.Linux.Epoll.Buffer: beConcat :: BufElem a => [a] -> a
- System.Linux.Epoll.Buffer: beDrop :: (BufElem a) => Int -> a -> a
+ System.Linux.Epoll.Buffer: beDrop :: BufElem a => Int -> a -> a
- System.Linux.Epoll.Buffer: beLength :: (BufElem a) => a -> Int
+ System.Linux.Epoll.Buffer: beLength :: BufElem a => a -> Int
- System.Linux.Epoll.Buffer: beRead :: (BufElem a) => Fd -> Int -> IO (a, Int)
+ System.Linux.Epoll.Buffer: beRead :: BufElem a => Fd -> Int -> IO (a, Int)
- System.Linux.Epoll.Buffer: beWrite :: (BufElem a) => Fd -> a -> IO Int
+ System.Linux.Epoll.Buffer: beWrite :: BufElem a => Fd -> a -> IO Int
- System.Linux.Epoll.Buffer: beZero :: (BufElem a) => a
+ System.Linux.Epoll.Buffer: beZero :: BufElem a => a
- System.Linux.Epoll.Buffer: closeIBuffer :: (BufElem a) => Runtime -> IBuffer a -> IO ()
+ System.Linux.Epoll.Buffer: closeIBuffer :: BufElem a => Runtime -> IBuffer a -> IO ()
- System.Linux.Epoll.Buffer: closeOBuffer :: (BufElem a) => Runtime -> OBuffer a -> IO ()
+ System.Linux.Epoll.Buffer: closeOBuffer :: BufElem a => Runtime -> OBuffer a -> IO ()
- System.Linux.Epoll.Buffer: createIBuffer :: (BufElem a) => Runtime -> Fd -> IO (IBuffer a)
+ System.Linux.Epoll.Buffer: createIBuffer :: BufElem a => Runtime -> Fd -> IO (IBuffer a)
- System.Linux.Epoll.Buffer: createOBuffer :: (BufElem a) => Runtime -> Fd -> IO (OBuffer a)
+ System.Linux.Epoll.Buffer: createOBuffer :: BufElem a => Runtime -> Fd -> IO (OBuffer a)
- System.Linux.Epoll.Buffer: readAvail :: (BufElem a) => IBuffer a -> IO (Maybe a)
+ System.Linux.Epoll.Buffer: readAvail :: BufElem a => IBuffer a -> IO (Maybe a)
- System.Linux.Epoll.Buffer: readBuffer :: (BufElem a) => IBuffer a -> IO a
+ System.Linux.Epoll.Buffer: readBuffer :: BufElem a => IBuffer a -> IO a
- System.Linux.Epoll.Buffer: readChunk :: (BufElem a) => IBuffer a -> IO a
+ System.Linux.Epoll.Buffer: readChunk :: BufElem a => IBuffer a -> IO a
- System.Linux.Epoll.Buffer: withIBuffer :: (BufElem a) => Runtime -> Fd -> (IBuffer a -> IO ()) -> IO ()
+ System.Linux.Epoll.Buffer: withIBuffer :: BufElem a => Runtime -> Fd -> (IBuffer a -> IO b) -> IO b
- System.Linux.Epoll.Buffer: withOBuffer :: (BufElem a) => Runtime -> Fd -> (OBuffer a -> IO ()) -> IO ()
+ System.Linux.Epoll.Buffer: withOBuffer :: BufElem a => Runtime -> Fd -> (OBuffer a -> IO b) -> IO b
- System.Linux.Epoll.Buffer: writeBuffer :: (BufElem a) => OBuffer a -> a -> IO ()
+ System.Linux.Epoll.Buffer: writeBuffer :: BufElem a => OBuffer a -> a -> IO ()

Files

epoll.cabal view
@@ -1,5 +1,5 @@ name:               epoll-version:            0.2.1+version:            0.2.2 synopsis:           epoll bindings description:        Bindings to epoll, a Linux specific I/O                     event notication facility (cf. man epoll(7)).@@ -9,6 +9,7 @@ author:             Toralf Wittner maintainer:         toralf.wittner@gmail.com copyright:          Copyright (c) 2009 Toralf Wittner+homepage:           http://github.com/twittner/epoll/ stability:          experimental tested-With:        GHC == 6.10.4 cabal-version:      >= 1.6.0
src/System/Linux/Epoll/Buffer.hs view
@@ -151,14 +151,14 @@  -- | Exception safe wrapper which creates an IBuffer, passes it to the provided -- function and closes it afterwards.-withIBuffer :: BufElem a => Runtime -> Fd -> (IBuffer a -> IO ()) -> IO ()+withIBuffer :: BufElem a => Runtime -> Fd -> (IBuffer a -> IO b) -> IO b withIBuffer r fd = bracket (createIBuffer r fd) (closeIBuffer r)  -- | Exception safe wrapper which creates an OBuffer, passes it to the provided -- function and flushes and closes it afterwards.-withOBuffer :: BufElem a => Runtime -> Fd -> (OBuffer a -> IO ()) -> IO ()+withOBuffer :: BufElem a => Runtime -> Fd -> (OBuffer a -> IO b) -> IO b withOBuffer r fd f = bracket (createOBuffer r fd) (closeOBuffer r) $ \b ->-    f b >> flushBuffer b+    f b >>= \v -> flushBuffer b >> return v  -- | Blocking read. Lazily returns all available contents from 'IBuffer'. readBuffer :: BufElem a => IBuffer a -> IO a