easy-file 0.2.2 → 0.2.3
raw patch · 4 files changed
+82/−9 lines, 4 filesdep +easy-filedep +tastydep +tasty-hunitdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: easy-file, tasty, tasty-hunit
Dependency ranges changed: base
API changes (from Hackage documentation)
- System.EasyFile: data Permissions :: *
+ System.EasyFile: data Permissions
Files
- System/EasyFile/Directory.hs +4/−2
- System/EasyFile/Missing.hs +2/−0
- easy-file.cabal +45/−7
- test/Test.hs +31/−0
System/EasyFile/Directory.hs view
@@ -34,8 +34,10 @@ , copyPermissions ) +#if !MIN_VERSION_base(4,8,0) import Control.Applicative-import qualified Control.Exception as E +#endif+import qualified Control.Exception as E import System.Environment ----------------------------------------------------------------@@ -97,7 +99,7 @@ -} getHomeDirectory2 :: IO (Maybe FilePath)-getHomeDirectory2 = (Just . fixPath <$> getEnv "HOME") `E.catch` +getHomeDirectory2 = (Just . fixPath <$> getEnv "HOME") `E.catch` \(_ :: E.IOException) -> return Nothing {- | Returns the pathname of a directory in which application-specific
System/EasyFile/Missing.hs view
@@ -4,7 +4,9 @@ ---------------------------------------------------------------- +#if !MIN_VERSION_base(4,8,0) import Control.Applicative+#endif import Data.Time import Data.Time.Clock.POSIX import Data.Word (Word64)
easy-file.cabal view
@@ -1,5 +1,6 @@+Cabal-Version: >= 1.10 Name: easy-file-Version: 0.2.2+Version: 0.2.3 Author: Kazu Yamamoto <kazu@iij.ad.jp> Maintainer: Kazu Yamamoto <kazu@iij.ad.jp> License: BSD3@@ -8,21 +9,58 @@ Description: Cross-platform File handling for Unix\/Mac\/Windows Homepage: http://github.com/kazu-yamamoto/easy-file Category: System-Cabal-Version: >= 1.6 Build-Type: Simple +Tested-With:+ GHC == 9.6.0+ GHC == 9.4.4+ GHC == 9.2.7+ GHC == 9.0.2+ GHC == 8.10.7+ GHC == 8.8.4+ GHC == 8.6.5+ GHC == 8.4.4+ GHC == 8.2.2+ GHC == 8.0.2+ GHC == 7.10.3+ GHC == 7.8.4+ GHC == 7.6.3+ GHC == 7.4.2+ GHC == 7.0.4+ Library- GHC-Options: -Wall Exposed-Modules: System.EasyFile Other-Modules: System.EasyFile.FilePath System.EasyFile.Directory System.EasyFile.Missing- Build-Depends: base >= 4 && < 5+ Build-Depends:+ base >= 4 && < 5+ , directory+ , filepath+ , time+ if os(windows)- Build-Depends: Win32, time, directory, filepath+ Build-Depends: Win32 else- Build-Depends: unix, time, directory, filepath+ Build-Depends: unix + Default-Language: Haskell2010+ GHC-Options: -Wall+ if impl(ghc >= 8)+ GHC-Options: -Wcompat+++Test-Suite test+ Type: exitcode-stdio-1.0+ Hs-Source-Dirs: test+ Main-Is: Test.hs+ Build-Depends:+ base+ , easy-file+ , tasty+ , tasty-hunit+ Default-Language: Haskell2010+ Source-Repository head Type: git- Location: git://github.com/kazu-yamamoto/easy-file.git+ Location: https://github.com/kazu-yamamoto/easy-file.git
+ test/Test.hs view
@@ -0,0 +1,31 @@+{-# LANGUAGE CPP #-}++module Main where++import System.EasyFile+import Test.Tasty+import Test.Tasty.HUnit++main :: IO ()+main = defaultMain $+ testCase "easy-file tests" $ do++ assertEqual "Test that '/' is path separator"+ ("foo" </> "bar")+ "foo/bar"++ isRelative "foo" @?= True++ isRelative "/foo" @?= isWindows++ isRelative "c:foo" @?= True++ isRelative "c:/foo" @?= not isWindows++isWindows :: Bool+isWindows =+#if defined(mingw32_HOST_OS) || defined(__MINGW32__)+ True+#else+ False+#endif