filelock 0.1.1.7 → 0.1.1.8
raw patch · 3 files changed
+22/−11 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +9/−0
- System/FileLock.hs +2/−5
- filelock.cabal +11/−6
CHANGELOG.md view
@@ -1,5 +1,14 @@ Changelog for filelock package +0.1.1.8+-------++_2025-08-27, Andreas Abel_++* Remove obsolete `deriving Typeable`.++Tested with GHC 8.0 - 9.14.1-alpha1.+ 0.1.1.7 -------
System/FileLock.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE CPP #-} -- | This module provides a portable interface to file locks as a mechanism for@@ -38,7 +37,6 @@ import qualified Control.Exception as E import Control.Monad import Data.IORef-import Data.Typeable import Prelude #ifdef USE_FLOCK@@ -53,7 +51,6 @@ data FileLock = Lock {-# UNPACk #-} !I.Lock {-# UNPACk #-} !(IORef Bool) -- alive?- deriving (Typeable) instance Eq FileLock where Lock _ x == Lock _ y = x == y@@ -65,7 +62,7 @@ data SharedExclusive = Shared -- ^ Other process can hold a shared lock at the same time. | Exclusive -- ^ No other process can hold a lock, shared or exclusive.- deriving (Show, Eq, Typeable)+ deriving (Show, Eq) -- | Take a lock. This function blocks until the lock is available. lockFile :: FilePath -> SharedExclusive -> IO FileLock@@ -86,6 +83,6 @@ withFileLock :: FilePath -> SharedExclusive -> (FileLock -> IO a) -> IO a withFileLock path mode = E.bracket (lockFile path mode) unlockFile --- | Perform sme action with a lock held. Non-blocking.+-- | Perform some action with a lock held. Non-blocking. withTryFileLock :: FilePath -> SharedExclusive -> (FileLock -> IO a) -> IO (Maybe a) withTryFileLock path mode f = E.bracket (tryLockFile path mode) (traverse unlockFile) (traverse f)
filelock.cabal view
@@ -1,6 +1,6 @@-cabal-version: >=1.10+cabal-version: 1.18 name: filelock-version: 0.1.1.7+version: 0.1.1.8 synopsis: Portable interface to file locking (flock / LockFileEx) description: This package provides an interface to Windows and Unix file locking functionalities.@@ -12,13 +12,18 @@ category: System build-type: Simple -extra-source-files:+extra-doc-files: CHANGELOG.md+extra-source-files: tests/lock.log.expected tested-with:- GHC == 9.6.2- GHC == 9.4.5+ GHC == 9.14.1+ GHC == 9.12.2+ GHC == 9.10.2+ GHC == 9.8.4+ GHC == 9.6.7+ GHC == 9.4.8 GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7@@ -58,7 +63,7 @@ type: exitcode-stdio-1.0 hs-source-dirs: tests main-is: interrupt.hs- build-depends: filelock, process >= 1.2.1.0, base+ build-depends: filelock, base ghc-options: -threaded default-language: Haskell2010 if os(windows)