packages feed

posix-api 0.7.2.0 → 0.7.3.0

raw patch · 3 files changed

+30/−1 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Posix.Poll: [$sel:descriptor:PollFd] :: PollFd -> !Fd
- Posix.Poll: [$sel:request:PollFd] :: PollFd -> !Event Request
- Posix.Poll: [$sel:response:PollFd] :: PollFd -> !Event Response
- Posix.Socket: [$sel:address:SocketAddressInternet] :: SocketAddressInternet -> !Word32
- Posix.Socket: [$sel:getProtocol:Protocol] :: Protocol -> CInt
- Posix.Socket: [$sel:path:SocketAddressUnix] :: SocketAddressUnix -> ByteArray
- Posix.Socket: [$sel:port:SocketAddressInternet] :: SocketAddressInternet -> !Word16
+ Posix.File: uninterruptibleOpenAtMode :: Fd -> ManagedCString -> AccessMode -> CreationFlags -> StatusFlags -> CMode -> IO (Either Errno Fd)
+ Posix.Poll: [descriptor] :: PollFd -> !Fd
+ Posix.Poll: [request] :: PollFd -> !Event 'Request
+ Posix.Poll: [response] :: PollFd -> !Event 'Response
+ Posix.Socket: [address] :: SocketAddressInternet -> !Word32
+ Posix.Socket: [getProtocol] :: Protocol -> CInt
+ Posix.Socket: [path] :: SocketAddressUnix -> ByteArray
+ Posix.Socket: [port] :: SocketAddressInternet -> !Word16
- Linux.Epoll: [Event] :: !Events e -> !a -> Event e a
+ Linux.Epoll: [Event] :: forall (a :: Exchange) b. !Events a -> !b -> Event a b
- Linux.Epoll: [Events] :: Word32 -> Events e
+ Linux.Epoll: [Events] :: forall (a :: Exchange). Word32 -> Events a
- Linux.Epoll: containsAllEvents :: Events e -> Events e -> Bool
+ Linux.Epoll: containsAllEvents :: forall (e :: Exchange). Events e -> Events e -> Bool
- Linux.Epoll: containsAnyEvents :: Events e -> Events e -> Bool
+ Linux.Epoll: containsAnyEvents :: forall (e :: Exchange). Events e -> Events e -> Bool
- Linux.Epoll: data Event :: Exchange -> Type -> Type
+ Linux.Epoll: data Event (a :: Exchange) b
- Linux.Epoll: edgeTriggered :: Events Request
+ Linux.Epoll: edgeTriggered :: Events 'Request
- Linux.Epoll: error :: Events Response
+ Linux.Epoll: error :: Events 'Response
- Linux.Epoll: hangup :: Events Response
+ Linux.Epoll: hangup :: Events 'Response
- Linux.Epoll: input :: Events e
+ Linux.Epoll: input :: forall (e :: Exchange). Events e
- Linux.Epoll: newtype Events :: Exchange -> Type
+ Linux.Epoll: newtype Events (a :: Exchange)
- Linux.Epoll: output :: Events e
+ Linux.Epoll: output :: forall (e :: Exchange). Events e
- Linux.Epoll: peekEventEvents :: Addr -> IO (Events e)
+ Linux.Epoll: peekEventEvents :: forall (e :: Exchange). Addr -> IO (Events e)
- Linux.Epoll: priority :: Events e
+ Linux.Epoll: priority :: forall (e :: Exchange). Events e
- Linux.Epoll: readHangup :: Events e
+ Linux.Epoll: readHangup :: forall (e :: Exchange). Events e
- Linux.Socket: controlTruncate :: MessageFlags Receive
+ Linux.Socket: controlTruncate :: MessageFlags 'Receive
- Linux.Socket: dontWait :: MessageFlags m
+ Linux.Socket: dontWait :: forall (m :: Message). MessageFlags m
- Linux.Socket: truncate :: MessageFlags Receive
+ Linux.Socket: truncate :: MessageFlags 'Receive
- Posix.Poll: PollFd :: !Fd -> !Event Request -> !Event Response -> PollFd
+ Posix.Poll: PollFd :: !Fd -> !Event 'Request -> !Event 'Response -> PollFd
- Posix.Poll: error :: Event Response
+ Posix.Poll: error :: Event 'Response
- Posix.Poll: hangup :: Event Response
+ Posix.Poll: hangup :: Event 'Response
- Posix.Poll: input :: Event e
+ Posix.Poll: input :: forall (e :: Exchange). Event e
- Posix.Poll: invalid :: Event Response
+ Posix.Poll: invalid :: Event 'Response
- Posix.Poll: isSubeventOf :: Event e -> Event e -> Bool
+ Posix.Poll: isSubeventOf :: forall (e :: Exchange). Event e -> Event e -> Bool
- Posix.Poll: output :: Event e
+ Posix.Poll: output :: forall (e :: Exchange). Event e
- Posix.Socket: [MessageFlags] :: CInt -> MessageFlags m
+ Posix.Socket: [MessageFlags] :: forall (a :: Message). CInt -> MessageFlags a
- Posix.Socket: newtype MessageFlags :: Message -> Type
+ Posix.Socket: newtype MessageFlags (a :: Message)
- Posix.Socket: noSignal :: MessageFlags Send
+ Posix.Socket: noSignal :: MessageFlags 'Send
- Posix.Socket: outOfBand :: MessageFlags m
+ Posix.Socket: outOfBand :: forall (m :: Message). MessageFlags m
- Posix.Socket: peek :: MessageFlags Receive
+ Posix.Socket: peek :: MessageFlags 'Receive
- Posix.Socket: peekMessageHeaderFlags :: Addr -> IO (MessageFlags Receive)
+ Posix.Socket: peekMessageHeaderFlags :: Addr -> IO (MessageFlags 'Receive)
- Posix.Socket: pokeMessageHeaderFlags :: Addr -> MessageFlags Receive -> IO ()
+ Posix.Socket: pokeMessageHeaderFlags :: Addr -> MessageFlags 'Receive -> IO ()
- Posix.Socket: waitAll :: MessageFlags Receive
+ Posix.Socket: waitAll :: MessageFlags 'Receive
- Posix.Types: newtype () => CNfds
+ Posix.Types: newtype CNfds

Files

CHANGELOG.md view
@@ -7,6 +7,10 @@  This project adheres to the [Haskell Package Versioning Policy](https://pvp.haskell.org/). +## 0.7.3.0 -- 2025-05-28++- Add support for `openat`+ ## 0.7.2.0 -- 2024-02-28  - Add `socket` as alias for `uninterruptibleSocket`.
posix-api.cabal view
@@ -1,6 +1,6 @@ cabal-version:      3.0 name:               posix-api-version:            0.7.2.0+version:            0.7.3.0 synopsis:           posix bindings description:   This library provides a very thin wrapper around POSIX APIs. It can be
src/Posix/File.hs view
@@ -16,6 +16,7 @@   , writeBytesCompletelyErrno   , uninterruptibleOpen   , uninterruptibleOpenMode+  , uninterruptibleOpenAtMode   , uninterruptibleOpenUntypedFlags   , uninterruptibleOpenModeUntypedFlags   , writeByteArray@@ -102,6 +103,9 @@ foreign import ccall unsafe "HaskellPosix.h open"   c_unsafe_open_mode :: ByteArray# -> CInt -> CMode -> IO Fd +foreign import ccall unsafe "HaskellPosix.h openat"+  c_unsafe_openat_mode :: Fd -> ByteArray# -> CInt -> CMode -> IO Fd+ foreign import ccall unsafe "HaskellPosix.h unlink"   c_unsafe_unlink :: ByteArray# -> IO CInt @@ -167,6 +171,27 @@   IO (Either Errno Fd) uninterruptibleOpenMode (ManagedCString (ByteArray name)) (AccessMode x) (CreationFlags y) (StatusFlags z) !mode =   c_unsafe_open_mode name (x .|. y .|. z) mode >>= errorsFromFd++{- | Variant of 'uninterruptibleOpenMode' that lets the user specify a+directory file descriptor instead of using the working directory as the+base path.+-}+uninterruptibleOpenAtMode ::+  -- | Base directory+  Fd ->+  -- | NULL-terminated file name+  ManagedCString ->+  -- | Access mode, should include @O_CREAT@+  AccessMode ->+  -- | Creation flags+  CreationFlags ->+  -- | Status flags+  StatusFlags ->+  -- | Permissions assigned to newly created file+  CMode ->+  IO (Either Errno Fd)+uninterruptibleOpenAtMode !dirFd (ManagedCString (ByteArray name)) (AccessMode x) (CreationFlags y) (StatusFlags z) !mode =+  c_unsafe_openat_mode dirFd name (x .|. y .|. z) mode >>= errorsFromFd  errorsFromDescriptorFlags :: DescriptorFlags -> IO (Either Errno DescriptorFlags) errorsFromDescriptorFlags r@(DescriptorFlags x) =