MissingH 0.18.2 → 0.18.6
raw patch · 3 files changed
+12/−6 lines, 3 filesdep +filepathdep −FilePathdep ~basedep ~haskell98
Dependencies added: filepath
Dependencies removed: FilePath
Dependency ranges changed: base, haskell98
Files
- MissingH.cabal +3/−3
- src/System/Path/Glob.hs +8/−3
- src/System/Path/WildMatch.hs +1/−0
MissingH.cabal view
@@ -1,10 +1,10 @@ -- arch-tag: MissingH main description file Name: MissingH-Version: 0.18.2+Version: 0.18.6 License: GPL Maintainer: John Goerzen <jgoerzen@complete.org> Author: John Goerzen-Copyright: Copyright (c) 2004-2006 John Goerzen+Copyright: Copyright (c) 2004-2007 John Goerzen license-file: COPYRIGHT extra-source-files: COPYING homepage: http://software.complete.org/missingh@@ -51,7 +51,7 @@ Extensions: ExistentialQuantification, OverlappingInstances, UndecidableInstances, CPP Build-Depends: network, parsec, base,- haskell98, mtl, HUnit, regex-compat, QuickCheck, FilePath,+ haskell98, mtl, HUnit, regex-compat, QuickCheck, filepath, hslogger -- Cabal will automatically add unix here on non-Windows platforms GHC-Options: -O2
src/System/Path/Glob.hs view
@@ -35,9 +35,10 @@ import Data.List.Utils import System.IO import System.IO.HVFS-import System.FilePath.Version_0_11+import System.FilePath import Control.Exception import System.Path.WildMatch+import Data.List hasWild = hasAny "*?[" @@ -79,8 +80,12 @@ else do r <- mapM expandNormalBase dirlist return $ concat r - where basename = takeBaseName fn- dirname = takeDirectory fn+ where (dirnameslash, basename) = splitFileName fn+ dirname = case dirnameslash of+ "/" -> "/"+ x -> if isSuffixOf "/" x+ then take (length x - 1) x+ else x expandWildBase :: FilePath -> IO [FilePath] expandWildBase dname = do dirglobs <- runGlob fs dname basename
src/System/Path/WildMatch.hs view
@@ -95,6 +95,7 @@ convwild ('?':xs) = "." ++ convwild xs convwild ('[':'!':xs) = "[^" ++ convpat xs convwild ('[':xs) = '[' : convpat xs+convwild ('.':xs) = "\\." ++ convwild xs convwild (x:xs) = escapeRe [x] ++ convwild xs convpat :: String -> String