Hello community, here is the log from the commit of package ghc-path-io for openSUSE:Leap:15.2 checked in at 2020-02-19 18:40:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/ghc-path-io (Old) and /work/SRC/openSUSE:Leap:15.2/.ghc-path-io.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-path-io" Wed Feb 19 18:40:30 2020 rev:14 rq:771407 version:1.6.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/ghc-path-io/ghc-path-io.changes 2020-01-15 15:02:26.797810773 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.ghc-path-io.new.26092/ghc-path-io.changes 2020-02-19 18:40:31.498139771 +0100 @@ -1,0 +2,40 @@ +Wed Jan 1 11:09:16 UTC 2020 - [email protected] + +- Revise cabal build file to specify more accurate dependencies. + +------------------------------------------------------------------- +Fri Nov 8 16:14:25 UTC 2019 - Peter Simons <[email protected]> + +- Drop obsolete group attributes. + +------------------------------------------------------------------- +Sun Oct 13 02:01:55 UTC 2019 - [email protected] + +- Update path-io to version 1.6.0. + ## Path IO 1.6.0 + + * Changed how `copyDirRecur` and `copyDirRecur'` functions work. Previously, + the functions created empty directories in the destination directory when + the source directory contained directory symlinks. The symlinked + directories were not recursively traversed. It also copied symlinked files + creating normal regular files in the target directory as the result. This + is fixed so that the function now behaves much like the `cp` utility, not + traversing symlinked directories, but recreating symlinks in the target + directory according to their targets in the source directory. + + * Fixed a bug in `createDirLink` which would always fail complaining that + its destination location does not exist. + + * Dropped support for GHC 8.2. + +------------------------------------------------------------------- +Thu Sep 19 07:47:10 UTC 2019 - [email protected] + +- Update path-io to version 1.5.0. + ## Path IO 1.5.0 + + * Dropped support for GHC 8.0 and older. + * Added new functions: `getXdgDirList`, `createFileLink`, `createDirLink`, + `removeDirLink`, `getSymlinkTarget`. + +------------------------------------------------------------------- Old: ---- path-io-1.4.2.tar.gz New: ---- path-io-1.6.0.tar.gz path-io.cabal ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-path-io.spec ++++++ --- /var/tmp/diff_new_pack.OSNpCz/_old 2020-02-19 18:40:32.130140547 +0100 +++ /var/tmp/diff_new_pack.OSNpCz/_new 2020-02-19 18:40:32.134140552 +0100 @@ -1,7 +1,7 @@ # # spec file for package ghc-path-io # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,13 +19,13 @@ %global pkg_name path-io %bcond_with tests Name: ghc-%{pkg_name} -Version: 1.4.2 +Version: 1.6.0 Release: 0 Summary: Interface to ‘directory’ package for users of ‘path’ License: BSD-3-Clause -Group: Development/Libraries/Haskell URL: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz +Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel @@ -47,7 +47,6 @@ %package devel Summary: Haskell %{pkg_name} library development files -Group: Development/Libraries/Haskell Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} @@ -58,6 +57,7 @@ %prep %setup -q -n %{pkg_name}-%{version} +cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build ++++++ path-io-1.4.2.tar.gz -> path-io-1.6.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/CHANGELOG.md new/path-io-1.6.0/CHANGELOG.md --- old/path-io-1.4.2/CHANGELOG.md 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,25 @@ +## Path IO 1.6.0 + +* Changed how `copyDirRecur` and `copyDirRecur'` functions work. Previously, + the functions created empty directories in the destination directory when + the source directory contained directory symlinks. The symlinked + directories were not recursively traversed. It also copied symlinked files + creating normal regular files in the target directory as the result. This + is fixed so that the function now behaves much like the `cp` utility, not + traversing symlinked directories, but recreating symlinks in the target + directory according to their targets in the source directory. + +* Fixed a bug in `createDirLink` which would always fail complaining that + its destination location does not exist. + +* Dropped support for GHC 8.2. + +## Path IO 1.5.0 + +* Dropped support for GHC 8.0 and older. +* Added new functions: `getXdgDirList`, `createFileLink`, `createDirLink`, + `removeDirLink`, `getSymlinkTarget`. + ## Path IO 1.4.2 * Fixed various bugs in `listDirRecurRel`, `walkDirRel`, and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/LICENSE.md new/path-io-1.6.0/LICENSE.md --- old/path-io-1.4.2/LICENSE.md 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/LICENSE.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,4 @@ -Copyright © 2016–2018 Mark Karpov +Copyright © 2016–present Mark Karpov All rights reserved. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/Path/IO.hs new/path-io-1.6.0/Path/IO.hs --- old/path-io-1.4.2/Path/IO.hs 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/Path/IO.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ -- | -- Module : Path.IO --- Copyright : © 2016–2019 Mark Karpov +-- Copyright : © 2016–present Mark Karpov -- License : BSD 3 clause -- -- Maintainer : Mark Karpov <[email protected]> @@ -12,7 +12,6 @@ -- scanning and copying of directories, working with temporary -- files\/directories, etc. -{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TupleSections #-} @@ -47,10 +46,10 @@ , getAppUserDataDir , getUserDocsDir , getTempDir -#if MIN_VERSION_directory(1,2,3) - , XdgDirectory (..) + , D.XdgDirectory (..) , getXdgDir -#endif + , D.XdgDirectoryList (..) + , getXdgDirList -- * Path transformation , AnyPath (..) , resolveFile @@ -66,6 +65,10 @@ , findFiles , findFilesWith -- * Symbolic links + , createFileLink + , createDirLink + , removeDirLink + , getSymlinkTarget , isSymlink -- * Temporary files and directories , withTempFile @@ -96,11 +99,9 @@ , setPermissions , copyPermissions -- * Timestamps -#if MIN_VERSION_directory(1,2,3) , getAccessTime , setAccessTime , setModificationTime -#endif , getModificationTime ) where @@ -112,6 +113,7 @@ import Control.Monad.Trans.Maybe (MaybeT (..), runMaybeT) import Control.Monad.Trans.Writer.Lazy (WriterT, execWriterT, tell) import Data.Either (lefts, rights) +import Data.Kind (Type) import Data.List ((\\)) import Data.Time (UTCTime) import Path @@ -124,10 +126,6 @@ import qualified System.IO.Temp as T import qualified System.PosixCompat.Files as P -#if MIN_VERSION_directory(1,2,3) -import System.Directory (XdgDirectory) -#endif - ---------------------------------------------------------------------------- -- Actions on directories @@ -386,6 +384,15 @@ -- ones. -- -- __Note__: before version /1.3.0/, this function followed symlinks. +-- +-- __Note__: before version /1.6.0/, the function created empty directories +-- in the destination directory when the source directory contained +-- directory symlinks. The symlinked directories were not recursively +-- traversed. It also copied symlinked files creating normal regular files +-- in the target directory as the result. This was fixed in the version +-- /1.6.0/ so that the function now behaves much like the @cp@ utility, not +-- traversing symlinked directories, but recreating symlinks in the target +-- directory according to their targets in the source directory. copyDirRecur :: (MonadIO m, MonadCatch m) => Path b0 Dir -- ^ Source @@ -400,6 +407,15 @@ -- @since 1.1.0 -- -- __Note__: before version /1.3.0/, this function followed symlinks. +-- +-- __Note__: before version /1.6.0/, the function created empty directories +-- in the destination directory when the source directory contained +-- directory symlinks. The symlinked directories were not recursively +-- traversed. It also copied symlinked files creating normal regular files +-- in the target directory as the result. This was fixed in the version +-- /1.6.0/ so that the function now behaves much like the @cp@ utility, not +-- traversing symlinked directories, but recreating symlinks in the target +-- directory according to their targets in the source directory. copyDirRecur' :: (MonadIO m, MonadCatch m) => Path b0 Dir -- ^ Source @@ -409,16 +425,14 @@ -- | Generic version of 'copyDirRecur'. The first argument controls whether -- to preserve directory permissions or not. /Does not/ follow symbolic --- links. --- --- __Note__: before version /1.3.0/, this function followed symlinks. +-- links. Internal function. copyDirRecurGen :: MonadIO m => Bool -- ^ Should we preserve directory permissions? -> Path b0 Dir -- ^ Source -> Path b1 Dir -- ^ Destination -> m () -copyDirRecurGen p src dest = liftIO $ do +copyDirRecurGen preserveDirPermissions src dest = liftIO $ do bsrc <- makeAbsolute src bdest <- makeAbsolute dest (dirs, files) <- listDirRecur bsrc @@ -429,14 +443,28 @@ -> IO (Path Abs t) swapParent old new path = (new </>) <$> stripProperPrefix old path - tdirs <- mapM (swapParent bsrc bdest) dirs - tfiles <- mapM (swapParent bsrc bdest) files ensureDir bdest - mapM_ ensureDir tdirs - zipWithM_ copyFile files tfiles - when p $ do + forM_ dirs $ \srcDir -> do + destDir <- swapParent bsrc bdest srcDir + dirIsSymlink <- isSymlink srcDir + if dirIsSymlink + then do + target <- getSymlinkTarget srcDir + D.createDirectoryLink target $ + F.dropTrailingPathSeparator (toFilePath destDir) + else ensureDir destDir + when preserveDirPermissions $ + ignoringIOErrors (copyPermissions srcDir destDir) + forM_ files $ \srcFile -> do + destFile <- swapParent bsrc bdest srcFile + fileIsSymlink <- isSymlink srcFile + if fileIsSymlink + then do + target <- getSymlinkTarget srcFile + D.createFileLink target (toFilePath destFile) + else copyFile srcFile destFile + when preserveDirPermissions $ ignoringIOErrors (copyPermissions bsrc bdest) - zipWithM_ (\s d -> ignoringIOErrors $ copyPermissions s d) dirs tdirs ---------------------------------------------------------------------------- -- Walking directory trees @@ -836,15 +864,14 @@ getTempDir :: MonadIO m => m (Path Abs Dir) getTempDir = liftIO D.getTemporaryDirectory >>= resolveDir' -#if MIN_VERSION_directory(1,2,3) -- | Obtain the paths to special directories for storing user-specific -- application data, configuration, and cache files, conforming to the -- <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html XDG Base Directory Specification>. -- Compared with 'getAppUserDataDir', this function provides a more -- fine-grained hierarchy as well as greater flexibility for the user. -- --- It also works on Windows, although in that case 'XdgData' and 'XdgConfig' --- will map to the same directory. +-- It also works on Windows, although in that case 'D.XdgData' and +-- 'D.XdgConfig' will map to the same directory. -- -- Note: The directory may not actually exist, in which case you would need -- to create it with file mode @700@ (i.e. only accessible by the owner). @@ -855,14 +882,30 @@ -- @since 1.2.1 getXdgDir :: MonadIO m - => XdgDirectory -- ^ Which special directory + => D.XdgDirectory -- ^ Which special directory -> Maybe (Path Rel Dir) -- ^ A relative path that is appended to the path; if 'Nothing', the -- base path is returned -> m (Path Abs Dir) getXdgDir xdgDir suffix = liftIO $ (D.getXdgDirectory xdgDir $ maybe "" toFilePath suffix) >>= parseAbsDir -#endif + +-- | Similar to 'getXdgDir' but retrieves the entire list of XDG +-- directories. +-- +-- On Windows, 'D.XdgDataDirs' and 'D.XdgConfigDirs' usually map to the same +-- list of directories unless overridden. +-- +-- Refer to the docs of 'D.XdgDirectoryList' for more details. +-- +-- @since 1.5.0 + +getXdgDirList + :: MonadIO m + => D.XdgDirectoryList -- ^ Which special directory list + -> m [Path Abs Dir] +getXdgDirList xdgDirList = + liftIO (D.getXdgDirectoryList xdgDirList >>= mapM parseAbsDir) ---------------------------------------------------------------------------- -- Path transformation @@ -874,11 +917,11 @@ -- | Type of absolute version of the given @path@. - type AbsPath path :: * + type AbsPath path :: Type -- | Type of relative version of the given @path@. - type RelPath path :: * + type RelPath path :: Type -- | Make a path absolute and remove as many indirections from it as -- possible. Indirections include the two special directories @.@ and @@ -1158,16 +1201,129 @@ ---------------------------------------------------------------------------- -- Symbolic links +-- | Create a /file/ symbolic link. The target path can be either absolute +-- or relative and need not refer to an existing file. The order of +-- arguments follows the POSIX convention. +-- +-- To remove an existing file symbolic link, use 'removeFile'. +-- +-- Although the distinction between /file/ symbolic links and /directory/ +-- symbolic links does not exist on POSIX systems, on Windows this is an +-- intrinsic property of every symbolic link and cannot be changed without +-- recreating the link. A file symbolic link that actually points to a +-- directory will fail to dereference and vice versa. Moreover, creating +-- symbolic links on Windows may require privileges unavailable to users +-- outside the Administrators group. Portable programs that use symbolic +-- links should take both into consideration. +-- +-- On Windows, the function is implemented using @CreateSymbolicLink@. Since +-- 1.3.3.0, the @SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE@ flag is +-- included if supported by the operating system. On POSIX, the function +-- uses @symlink@ and is therefore atomic. +-- +-- Windows-specific errors: This operation may fail with +-- 'System.IO.Error.permissionErrorType' if the user lacks the privileges to +-- create symbolic links. It may also fail with +-- 'System.IO.Error.illegalOperationErrorType' if the file system does not +-- support symbolic links. +-- +-- @since 1.5.0 + +createFileLink + :: MonadIO m + => Path b0 File -- ^ Path to the target file + -> Path b1 File -- ^ Path to the link to be created + -> m () +createFileLink = liftD2 D.createFileLink + +-- | Create a /directory/ symbolic link. The target path can be either +-- absolute or relative and need not refer to an existing directory. The +-- order of arguments follows the POSIX convention. +-- +-- To remove an existing directory symbolic link, use 'removeDirLink'. +-- +-- Although the distinction between /file/ symbolic links and /directory/ +-- symbolic links does not exist on POSIX systems, on Windows this is an +-- intrinsic property of every symbolic link and cannot be changed without +-- recreating the link. A file symbolic link that actually points to a +-- directory will fail to dereference and vice versa. Moreover, creating +-- symbolic links on Windows may require privileges unavailable to users +-- outside the Administrators group. Portable programs that use symbolic +-- links should take both into consideration. +-- +-- On Windows, the function is implemented using @CreateSymbolicLink@ with +-- @SYMBOLIC_LINK_FLAG_DIRECTORY@. Since 1.3.3.0, the +-- @SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE@ flag is also included if +-- supported by the operating system. On POSIX, this is an alias for +-- 'createFileLink' and is therefore atomic. +-- +-- Windows-specific errors: This operation may fail with +-- 'System.IO.Error.permissionErrorType' if the user lacks the privileges to +-- create symbolic links. It may also fail with +-- 'System.IO.Error.illegalOperationErrorType' if the file system does not +-- support symbolic links. +-- +-- @since 1.5.0 + +createDirLink + :: MonadIO m + => Path b0 Dir -- ^ Path to the target directory + -> Path b1 Dir -- ^ Path to the link to be created + -> m () +createDirLink target' dest' = do + let target = toFilePath target' + dest = F.dropTrailingPathSeparator (toFilePath dest') + liftIO $ D.createDirectoryLink target dest + +-- | Remove an existing /directory/ symbolic link. +-- +-- On Windows, this is an alias for 'removeDir'. On POSIX systems, this is +-- an alias for 'removeFile'. +-- +-- See also: 'removeFile', which can remove an existing /file/ symbolic link. +-- +-- @since 1.5.0 + +removeDirLink + :: MonadIO m + => Path b Dir -- ^ Path to the link to be removed + -> m () +removeDirLink = liftD D.removeDirectoryLink + +-- | Retrieve the target path of either a file or directory symbolic link. +-- The returned path may not exist, and may not even be a valid path. +-- +-- On Windows systems, this calls @DeviceIoControl@ with +-- @FSCTL_GET_REPARSE_POINT@. In addition to symbolic links, the function +-- also works on junction points. On POSIX systems, this calls @readlink@. +-- +-- Windows-specific errors: This operation may fail with +-- 'System.IO.Error.illegalOperationErrorType' if the file system does not +-- support symbolic links. +-- +-- @since 1.5.0 + +getSymlinkTarget + :: MonadIO m + => Path b t -- ^ Symlink path + -> m FilePath +getSymlinkTarget = liftD (D.getSymbolicLinkTarget . F.dropTrailingPathSeparator) + +-- | Check whether the path refers to a symbolic link. An exception is thrown +-- if the path does not exist or is inaccessible. +-- +-- On Windows, this checks for @FILE_ATTRIBUTE_REPARSE_POINT@. In addition to +-- symbolic links, the function also returns true on junction points. On +-- POSIX systems, this checks for @S_IFLNK@. +-- +-- @since 1.5.0 + -- | Check if the given path is a symbolic link. -- -- @since 1.3.0 isSymlink :: MonadIO m => Path b t -> m Bool -isSymlink p = liftIO (P.isSymbolicLink <$> P.getSymbolicLinkStatus path) - where - -- NOTE: To be able to correctly check whether it is a symlink or not we - -- have to drop the trailing separator from the dir path. - path = F.dropTrailingPathSeparator (toFilePath p) +isSymlink = liftD (D.pathIsSymbolicLink . F.dropTrailingPathSeparator) ---------------------------------------------------------------------------- -- Temporary files and directories @@ -1381,8 +1537,6 @@ ---------------------------------------------------------------------------- -- Timestamps -#if MIN_VERSION_directory(1,2,3) - -- | Obtain the time at which the file or directory was last accessed. -- -- The operation may fail with: @@ -1457,7 +1611,6 @@ setModificationTime :: MonadIO m => Path b t -> UTCTime -> m () setModificationTime = liftD2' D.setModificationTime -#endif -- | Obtain the time at which the file or directory was last modified. -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/README.md new/path-io-1.6.0/README.md --- old/path-io-1.4.2/README.md 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -7,16 +7,23 @@ [](https://travis-ci.org/mrkkrp/path-io) [](https://ci.appveyor.com/project/mrkkrp/path-io/branch/master) -This package provides an interface to -the [`directory`](https://hackage.haskell.org/package/directory) package for +This package provides an interface to the +[`directory`](https://hackage.haskell.org/package/directory) package for users of Chris Done's [`path`](https://hackage.haskell.org/package/path). It also implements some missing stuff like recursive scanning and copying of directories, working with temporary files/directories, etc. Consult Haddocks for usage, which should be trivial. +## Contribution + +Issues, bugs, and questions may be reported in [the GitHub issue tracker for +this project](https://github.com/mrkkrp/path-io/issues). + +Pull requests are also welcome. + ## License -Copyright © 2016–2019 Mark Karpov +Copyright © 2016–present Mark Karpov Distributed under BSD 3 clause license. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/path-io.cabal new/path-io-1.6.0/path-io.cabal --- old/path-io-1.4.2/path-io.cabal 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/path-io.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,7 +1,7 @@ name: path-io -version: 1.4.2 +version: 1.6.0 cabal-version: 1.18 -tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.4, GHC==8.6.3 +tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1 license: BSD3 license-file: LICENSE.md author: Mark Karpov <[email protected]> @@ -21,15 +21,15 @@ default: False library - build-depends: base >= 4.8 && < 5.0 + build-depends: base >= 4.11 && < 5.0 , containers - , directory >= 1.2.2 && < 1.4 + , directory >= 1.3.2.0 && < 1.4 , dlist >= 0.8 && < 0.9 , exceptions >= 0.8 && < 0.11 , filepath >= 1.2 && < 1.5 , path >= 0.6 && < 0.7 , temporary >= 1.1 && < 1.4 - , time >= 1.4 && < 1.9 + , time >= 1.4 && < 1.10 , transformers >= 0.3 && < 0.6 , unix-compat exposed-modules: Path.IO @@ -37,12 +37,11 @@ ghc-options: -Wall -Werror else ghc-options: -O2 -Wall - if flag(dev) && impl(ghc >= 8.0) + if flag(dev) ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances - -Wnoncanonical-monadfail-instances default-language: Haskell2010 test-suite tests @@ -53,10 +52,11 @@ ghc-options: -Wall -Werror else ghc-options: -O2 -Wall - build-depends: base >= 4.8 && < 5.0 - , directory >= 1.2.2 && < 1.4 + build-depends: base >= 4.11 && < 5.0 + , directory >= 1.3.2.0 && < 1.4 , exceptions >= 0.8 && < 0.11 , hspec >= 2.0 && < 3.0 + , filepath >= 1.2 && < 1.5 , path >= 0.6 && < 0.7 , path-io , transformers >= 0.3 && < 0.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/path-io-1.4.2/tests/Main.hs new/path-io-1.6.0/tests/Main.hs --- old/path-io-1.4.2/tests/Main.hs 2019-02-13 23:28:38.000000000 +0100 +++ new/path-io-1.6.0/tests/Main.hs 2001-09-09 03:46:40.000000000 +0200 @@ -14,10 +14,6 @@ import System.PosixCompat.Files import Test.Hspec -#if !MIN_VERSION_base(4,8,0) -import Control.Applicative ((<$>)) -#endif - main :: IO () main = hspec . around withSandbox $ do #ifndef mingw32_HOST_OS @@ -45,12 +41,10 @@ -- environmental variables HOME and TMPDIR do not exist there. describe "getHomeDir" getHomeDirSpec describe "getTempDir" getTempDirSpec -#if MIN_VERSION_directory(1,2,3) describe "getXdgDir Data" getXdgDataDirSpec describe "getXdgDir Config" getXdgConfigDirSpec describe "getXdgDir Cache" getXdgCacheDirSpec #endif -#endif listDirSpec :: SpecWith (Path Abs Dir) listDirSpec = it "lists directory" $ \dir -> @@ -198,7 +192,6 @@ unsetEnv evar where evar = "TMPDIR" -#if MIN_VERSION_directory(1,2,3) getXdgDataDirSpec :: SpecWith (Path Abs Dir) getXdgDataDirSpec = it "XDG data dir is influenced by environment variable XDG_DATA_HOME" $ \dir -> @@ -231,7 +224,6 @@ unsetEnv evar where evar = "XDG_CACHE_HOME" name = $(mkRelDir "test") -#endif ---------------------------------------------------------------------------- -- Helpers ++++++ path-io.cabal ++++++ name: path-io version: 1.6.0 x-revision: 1 cabal-version: 1.18 tested-with: GHC==8.4.4, GHC==8.6.5, GHC==8.8.1 license: BSD3 license-file: LICENSE.md author: Mark Karpov <[email protected]> maintainer: Mark Karpov <[email protected]> homepage: https://github.com/mrkkrp/path-io bug-reports: https://github.com/mrkkrp/path-io/issues category: System, Filesystem synopsis: Interface to ‘directory’ package for users of ‘path’ build-type: Simple description: Interface to ‘directory’ package for users of ‘path’. extra-doc-files: CHANGELOG.md , README.md flag dev description: Turn on development settings. manual: True default: False library build-depends: base >= 4.11 && < 5.0 , containers , directory >= 1.3.2.0 && < 1.4 , dlist >= 0.8 && < 0.9 , exceptions >= 0.8 && < 0.11 , filepath >= 1.2 && < 1.5 , path >= 0.6 && < 0.8 , temporary >= 1.1 && < 1.4 , time >= 1.4 && < 1.10 , transformers >= 0.3 && < 0.6 , unix-compat exposed-modules: Path.IO if flag(dev) ghc-options: -Wall -Werror else ghc-options: -O2 -Wall if flag(dev) ghc-options: -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wnoncanonical-monad-instances default-language: Haskell2010 test-suite tests main-is: Main.hs hs-source-dirs: tests type: exitcode-stdio-1.0 if flag(dev) ghc-options: -Wall -Werror else ghc-options: -O2 -Wall build-depends: base >= 4.11 && < 5.0 , directory >= 1.3.2.0 && < 1.4 , exceptions >= 0.8 && < 0.11 , hspec >= 2.0 && < 3.0 , filepath >= 1.2 && < 1.5 , path >= 0.6 && < 0.8 , path-io , transformers >= 0.3 && < 0.6 , unix-compat default-language: Haskell2010 source-repository head type: git location: https://github.com/mrkkrp/path-io.git
