packages feed

linux-inotify 0.3.0.1 → 0.3.0.2

raw patch · 2 files changed

+15/−6 lines, 2 filesdep +semigroupsnew-uploader

Dependencies added: semigroups

Files

linux-inotify.cabal view
@@ -1,5 +1,5 @@ name:                linux-inotify-version:             0.3.0.1+version:             0.3.0.2 synopsis:            Thinner binding to the Linux Kernel's inotify interface description:     This is a binding for GHC 7 to the Linux Kernel's inotify interface,@@ -40,16 +40,20 @@ copyright:           (c) 2013-2015 Leon P Smith category:            System build-type:          Simple-cabal-version:       >=1.8+cabal-version:       1.18 Extra-Doc-Files:     CHANGES.md  library+  default-language:    Haskell2010   hs-source-dirs:      src   exposed-modules:     System.Linux.Inotify   build-depends:       base >= 4.7 && < 5,                        bytestring >= 0.10.4,                        hashable >= 1.1.2,                        unix++  if !impl(ghc >= 8.0)+     build-depends: semigroups == 0.18.*    ghc-options: -Wall 
src/System/Linux/Inotify.hsc view
@@ -79,11 +79,11 @@  import qualified Data.ByteString as B import qualified Data.ByteString.Char8 as B8-import Control.Applicative import Data.Monoid import Data.Typeable import Data.Function ( on ) import Data.Word+import qualified Data.Semigroup as Sem import Control.Exception ( IOException, throwIO, mask_, onException ) import GHC.Conc ( closeFdWith, threadWaitReadSTM, atomically ) import GHC.IO.Exception hiding ( IOException )@@ -157,10 +157,15 @@  newtype Mask a = Mask Word32 deriving (Eq, Show, Typeable) +instance Sem.Semigroup (Mask a) where+    Mask a <> Mask b = Mask (a .|. b)+ -- | Computes the union of two 'Mask's. instance Monoid (Mask a) where    mempty = Mask 0-   mappend (Mask a) (Mask b) = Mask (a .|. b)+#if !(MIN_VERSION_base(4,11,0))+   mappend = (<>)+#endif  -- | An empty type used to denote 'Mask' values that can be received --   from the kernel in an inotify event message.@@ -325,8 +330,8 @@      --   to the watched directory.      --      --   The proper Haskell interpretation of this seems to be to use-     --   'GHC.IO.getFileSystemEncoding' and then unpack it to a 'String'-     --   or decode it using the text package.+     --   'GHC.IO.Encoding.getFileSystemEncoding' and then unpack it to a +     --   'String' or decode it using the text package.    } deriving (Eq, Show, Typeable)  -- | Creates an inotify socket descriptor that watches can be