packages feed

systemd-api 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+64/−44 lines, 3 filesdep −byte-orderdep −byteslicedep −primitivedep ~posix-apinew-uploader

Dependencies removed: byte-order, byteslice, primitive, text-short

Dependency ranges changed: posix-api

Files

+ CHANGELOG.md view
@@ -0,0 +1,6 @@+# Revision history for systemd-api++## 0.1.0.1 -- 2024-02-13++* Update package metadata.+* Remove unused dependencies.
src/Linux/Systemd.hs view
@@ -3,10 +3,10 @@   , isSocket   ) where -import Foreign.C.Types (CInt(..))-import System.Posix.Types (Fd(..))-import Foreign.C.Error (Errno,getErrno)-import Posix.Socket (Type(..),Family(..))+import Foreign.C.Error (Errno, getErrno)+import Foreign.C.Types (CInt (..))+import Posix.Socket (Family (..), Type (..))+import System.Posix.Types (Fd (..))  foreign import ccall unsafe "systemd/sd-daemon.h sd_listen_fds"   c_listenFds :: CInt -> IO CInt@@ -14,23 +14,30 @@ foreign import ccall unsafe "systemd/sd-daemon.h sd_is_socket"   c_isSocket :: Fd -> Family -> Type -> CInt -> IO CInt --- | Check for file descriptors passed by the system manager. Returns--- the number of received file descriptors. If no file descriptors--- have been received, zero is returned.+{- | Check for file descriptors passed by the system manager. Returns+the number of received file descriptors. If no file descriptors+have been received, zero is returned.+-} listenFds ::-     CInt -- ^ unset environment (non-zero unsets @LISTEN_FDS@, @LISTEN_PID@, and @LISTEN_FDNAMES@)-  -> IO (Either Errno CInt)+  -- | unset environment (non-zero unsets @LISTEN_FDS@, @LISTEN_PID@, and @LISTEN_FDNAMES@)+  CInt ->+  IO (Either Errno CInt) listenFds a = c_listenFds a >>= errorsFromInt -isSocket :: -     Fd -- ^ File descriptor-  -> Family -- ^ Socket family-  -> Type -- ^ Socket type-  -> CInt -- ^ Positive: require listen mode. Zero: require non-listening mode.-  -> IO (Either Errno CInt)+isSocket ::+  -- | File descriptor+  Fd ->+  -- | Socket family+  Family ->+  -- | Socket type+  Type ->+  -- | Positive: require listen mode. Zero: require non-listening mode.+  CInt ->+  IO (Either Errno CInt) isSocket a b c d = c_isSocket a b c d >>= errorsFromInt  errorsFromInt :: CInt -> IO (Either Errno CInt)-errorsFromInt r = if r >= 0-  then pure (Right r)-  else fmap Left getErrno+errorsFromInt r =+  if r >= 0+    then pure (Right r)+    else fmap Left getErrno
systemd-api.cabal view
@@ -1,29 +1,36 @@-cabal-version: 2.2-name: systemd-api-version: 0.1.0.0-synopsis: systemd bindings-description: Bindings to various systemd functions-homepage: https://github.com/byteverse/systemd-api-license: BSD-3-Clause-license-file: LICENSE-author: Andrew Martin-maintainer: andrew.thaddeus@gmail.com-copyright: 2023 Andrew Martin-category: System-build-type: Simple+cabal-version:   2.2+name:            systemd-api+version:         0.1.0.1+synopsis:        systemd bindings+description:     Bindings to various systemd functions+homepage:        https://github.com/byteverse/systemd-api+bug-reports:     https://github.com/byteverse/systemd-api/issues+license:         BSD-3-Clause+license-file:    LICENSE+author:          Andrew Martin+maintainer:      amartin@layer3com.com+copyright:       2023 Andrew Martin+category:        System+build-type:      Simple+extra-doc-files: CHANGELOG.md+tested-with:     GHC ==9.4.8 || ==9.6.3 || ==9.8.1 +common build-settings+  default-language: Haskell2010+  ghc-options:      -Wall -Wunused-packages+ library-  exposed-modules:-    Linux.Systemd+  import:             build-settings+  exposed-modules:    Linux.Systemd   build-depends:-    , base >=4.17.1 && <5-    , byte-order >= 0.1.2 && <0.2-    , byteslice >= 0.2.10 && <0.3-    , primitive >= 0.7 && <0.10-    , text-short >=0.1.5-    , posix-api >=0.5-  hs-source-dirs: src-  default-language: Haskell2010-  ghc-options: -Wall -O2-  extra-libraries: systemd-  build-tool-depends: hsc2hs:hsc2hs >= 0.68.5+    , base       >=4.16.3 && <5+    , posix-api  >=0.5    && <1++  hs-source-dirs:     src+  ghc-options:        -O2+  extra-libraries:    systemd+  build-tool-depends: hsc2hs:hsc2hs >=0.68.5++source-repository head+  type:     git+  location: git://github.com/byteverse/systemd-api.git