Glob 0.7 → 0.7.1
raw patch · 4 files changed
+19/−10 lines, 4 filesdep ~basedep ~containersdep ~directoryPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, containers, directory, dlist, filepath, transformers
API changes (from Hackage documentation)
Files
- CHANGELOG.txt +4/−0
- Glob.cabal +7/−7
- System/FilePath/Glob/Directory.hs +2/−2
- System/FilePath/Glob/Utils.hs +6/−1
CHANGELOG.txt view
@@ -1,3 +1,7 @@+0.7.1, 2012-07-03:+ Update dependencies to allow transformers-0.3, and generally tighten+ them according to the policy.+ 0.7, 2012-01-03: Changed function types: System.FilePath.Glob.glob :: String -> IO [FilePath]
Glob.cabal view
@@ -1,7 +1,7 @@ Cabal-Version: >= 1.6 Name: Glob-Version: 0.7+Version: 0.7.1 Homepage: http://iki.fi/matti.niemenmaa/glob/ Synopsis: Globbing library Category: System@@ -24,12 +24,12 @@ tests/Tests/*.hs Library- Build-Depends: base >= 3 && < 5- , containers == 0.*- , directory == 1.*- , dlist == 0.*- , filepath == 1.*- , transformers == 0.2.*+ Build-Depends: base >= 4 && < 5+ , containers < 0.6+ , directory < 1.2+ , dlist >= 0.4 && < 0.6+ , filepath >= 1.1 && < 1.4+ , transformers >= 0.2 && < 0.4 if os(windows) Build-Depends: Win32 == 2.*
System/FilePath/Glob/Directory.hs view
@@ -27,8 +27,8 @@ , nubOrd , pathParts , partitionDL+ , catchIO )- -- The Patterns in TypedPattern don't contain PathSeparator or AnyDirectory -- -- We store the number of PathSeparators that Dir and AnyDir were followed by@@ -137,7 +137,7 @@ globDir' :: MatchOptions -> [TypedPattern] -> FilePath -> IO (DList FilePath, DList FilePath) globDir' opts pats@(_:_) dir = do- entries <- getDirectoryContents dir `catch` const (return [])+ entries <- getDirectoryContents dir `catchIO` const (return []) results <- forM entries $ \e -> matchTypedAndGo opts pats e (dir </> e)
System/FilePath/Glob/Utils.hs view
@@ -10,9 +10,11 @@ , nubOrd , partitionDL , getRecursiveContents+ , catchIO ) where import Control.Monad (foldM)+import qualified Control.Exception as E import Data.List ((\\)) import qualified Data.DList as DL import Data.DList (DList)@@ -125,7 +127,7 @@ getRecursiveContents :: FilePath -> IO (DList FilePath) getRecursiveContents dir =- flip Prelude.catch (\_ -> return $ DL.singleton dir) $ do+ flip catchIO (\_ -> return $ DL.singleton dir) $ do raw <- getDirectoryContents dir @@ -160,3 +162,6 @@ if Set.member x set then go set xs else x : go (Set.insert x set) xs++catchIO :: IO a -> (E.IOException -> IO a) -> IO a+catchIO = E.catch