dirstream 1.0.3 → 1.1.0
raw patch · 2 files changed
+5/−4 lines, 2 filesdep ~basedep ~pipes-safePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, pipes-safe
API changes (from Hackage documentation)
- Data.DirStream: childOf :: MonadSafe m => FilePath -> ListT m FilePath
+ Data.DirStream: childOf :: (MonadSafe m, MonadFail m) => FilePath -> ListT m FilePath
- Data.DirStream: descendentOf :: MonadSafe m => FilePath -> ListT m FilePath
+ Data.DirStream: descendentOf :: (MonadSafe m, MonadFail m) => FilePath -> ListT m FilePath
Files
- dirstream.cabal +2/−2
- src/Data/DirStream.hs +3/−2
dirstream.cabal view
@@ -1,5 +1,5 @@ Name: dirstream-Version: 1.0.3+Version: 1.1.0 Cabal-Version: >=1.8.0.2 Build-Type: Simple License: BSD3@@ -33,7 +33,7 @@ system-filepath >= 0.3.1 && < 0.5, system-fileio >= 0.2.1 && < 0.4, pipes >= 4.0 && < 4.4,- pipes-safe >= 2.0.0 && < 2.3+ pipes-safe >= 2.0.0 && < 2.4 if os(windows) Build-Depends: Win32 >= 2.2.0.1 && < 2.4 else
src/Data/DirStream.hs view
@@ -20,6 +20,7 @@ import Control.Applicative ((<|>)) import Control.Monad (when)+import Control.Monad.Fail (MonadFail) #ifdef mingw32_HOST_OS import Data.Bits ((.&.)) #endif@@ -57,7 +58,7 @@ Returns zero children if the directory is not readable or (on Windows) if the directory is actually a reparse point. -}-childOf :: MonadSafe m => F.FilePath -> ListT m F.FilePath+childOf :: (MonadSafe m, MonadFail m) => F.FilePath -> ListT m F.FilePath childOf path = Select $ do let path' = F.encodeString path canRead <- liftIO $ fmap readable $ getPermissions path'@@ -94,7 +95,7 @@ {-# INLINABLE childOf #-} -- | Select all recursive descendents of the given directory-descendentOf :: MonadSafe m => F.FilePath -> ListT m F.FilePath+descendentOf :: (MonadSafe m, MonadFail m) => F.FilePath -> ListT m F.FilePath descendentOf path = do child <- childOf path isDir <- liftIO $ isDirectory child