packages feed

glob-posix 0.1.0.1 → 0.2.0.0

raw patch · 3 files changed

+11/−19 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- System.Directory.Glob: (<>) :: Monoid m => m -> m -> m
+ System.Directory.Glob: (<>) :: Semigroup a => a -> a -> a

Files

glob-posix.cabal view
@@ -1,14 +1,14 @@ name:                glob-posix-version:             0.1.0.1+version:             0.2.0.0 synopsis:            Haskell bindings for POSIX glob library. description:         Wrapper for the glob(3) function. The key functions are glob and globMany.                      GNU extensions are supported but contained in a different module to encourage portability. homepage:            https://github.com/rdnetto/glob-posix#readme license:             Apache license-file:        LICENSE-author:              Reuben D'Netto+author:              R D'Netto maintainer:          rdnetto@gmail.com-copyright:           2016 Reuben D'Netto+copyright:           2016 R D'Netto category:            System build-type:          Simple cabal-version:       >=1.10@@ -21,7 +21,7 @@   other-modules:       System.Directory.Glob.Internal   build-depends:       base >= 4.7 && < 5   default-language:    Haskell2010-  ghc-options:         -O2 -Wall+  ghc-options:         -O2 -Wall -Wextra  test-suite glob-posix-test   type:                exitcode-stdio-1.0@@ -36,7 +36,7 @@                        tasty-hunit,                        unix   default-language:    Haskell2010-  ghc-options:         -O2 -Wall+  ghc-options:         -O2 -Wall -Wextra  benchmark glob-posix-bench   type:                exitcode-stdio-1.0@@ -48,7 +48,7 @@                        Glob,                        glob-posix   default-language:    Haskell2010-  ghc-options:         -O2 -Wall+  ghc-options:         -O2 -Wall -Wextra   source-repository head
src/System/Directory/Glob/Internal.hsc view
@@ -20,11 +20,15 @@ data GlobFlag = GlobFlag !CInt  -- | Default value - equivalent to 0 for the C function.+globDefaults :: GlobFlag globDefaults = GlobFlag 0 ++instance Semigroup GlobFlag where+    (GlobFlag a) <> (GlobFlag b) = GlobFlag (a .|. b)+ instance Monoid GlobFlag where     mempty = globDefaults-    mappend (GlobFlag a) (GlobFlag b) = GlobFlag (a .|. b)   -- | Used for mutation of an existing structure - for internal use only.
test/Spec.hs view
@@ -10,7 +10,6 @@  import System.Directory.Glob import System.Directory.Glob.GNU-import System.Directory.Glob.GNU.Compat   main :: IO ()@@ -95,17 +94,6 @@         (createFile f')         (removeFile f')         (cb f')---- Creates a temporary directory that we can't read from.--- Used for testing error handling.-withUnreadableDir :: (FilePath -> IO a) -> IO a-withUnreadableDir cb = do-    fp <- (</> "foo") <$> getTemporaryDirectory--    bracket_-        (createDirectory fp >> setPermissions fp emptyPermissions)-        (setPermissions fp emptyPermissions {writable = True} >> removeDirectory fp)-        (cb fp)  -- Gets the username of the current user -- We can't use getLoginName here because it requires a controlling tty