xdg-basedir 0.2 → 0.2.1
raw patch · 2 files changed
+5/−12 lines, 2 filesdep −regex-compatPVP ok
version bump matches the API change (PVP)
Dependencies removed: regex-compat
API changes (from Hackage documentation)
Files
System/Environment/XDG/BaseDir.hs view
@@ -18,18 +18,14 @@ ) where import Data.Maybe ( fromMaybe )-import System.FilePath ( (</>) )+import System.FilePath ( (</>), splitSearchPath ) import System.Environment ( getEnvironment, getEnv ) import System.IO.Error ( try )-import Text.Regex ( splitRegex, mkRegex, Regex ) import System.Directory ( getHomeDirectory ) import Control.Monad ( liftM2 ) #if defined(mingw32_HOST_OS) || defined(__MINGW32__) -splitDirs :: String -> [String]-splitDirs = splitRegex $ mkRegex ";"- getDefault "XDG_DATA_HOME" = getEnv "AppData" getDefault "XDG_CONFIG_HOME" = userRelative $ "Local Settings" getDefault "XDG_CACHE_HOME" = userRelative $ "Local Settings" </> "Cache"@@ -39,9 +35,6 @@ #else -splitDirs :: String -> [String]-splitDirs = splitRegex $ mkRegex ":"- getDefault "XDG_DATA_HOME" = userRelative $ ".local" </> "share" getDefault "XDG_CONFIG_HOME" = userRelative $ ".config" getDefault "XDG_CACHE_HOME" = userRelative $ ".cache"@@ -98,7 +91,7 @@ singleDir key app = envLookup key >>= return . (</> app) multiDirs :: String -> String -> IO [FilePath]-multiDirs key app = envLookup key >>= return . map (</> app) . splitDirs+multiDirs key app = envLookup key >>= return . map (</> app) . splitSearchPath envLookup :: String -> IO String envLookup key = do env <- getEnvironment
xdg-basedir.cabal view
@@ -1,5 +1,5 @@ name: xdg-basedir-version: 0.2+version: 0.2.1 category: System synopsis: A basic implementation of the XDG Base Directory specification. @@ -13,7 +13,7 @@ stability: alpha author: Will Donnelly maintainer: Will Donnelly <will.donnelly@gmail.com>-copyright: (c) 2009 Will Donnelly+copyright: (c) 2011 Will Donnelly license: BSD3 license-file: LICENSE @@ -22,7 +22,7 @@ library exposed-modules: System.Environment.XDG.BaseDir- build-depends: base >= 4 && < 5, regex-compat, directory, filepath+ build-depends: base >= 4 && < 5, directory, filepath source-repository head type: git