fix build on windows
This commit is contained in:
parent
5f1f6d0cec
commit
61b48b69ba
2 changed files with 7 additions and 5 deletions
|
@ -22,7 +22,7 @@ import Utility.LockPool.STM (LockFile, LockMode(..))
|
|||
{- Tries to lock a file with a shared lock, which allows other processes to
|
||||
- also lock it shared. Fails if the file is exclusively locked. -}
|
||||
lockShared :: LockFile -> IO (Maybe LockHandle)
|
||||
lockShared file = tryMakeLockHandle P.lockPool file
|
||||
lockShared file = fmap fst <$> tryMakeLockHandle P.lockPool file
|
||||
(\p f -> P.tryTakeLock p f LockShared)
|
||||
(\f _ -> fmap mk <$> F.lockShared f)
|
||||
|
||||
|
@ -33,7 +33,7 @@ lockShared file = tryMakeLockHandle P.lockPool file
|
|||
- read or write by any other process. So for advisory locking of a file's
|
||||
- content, a separate LockFile should be used. -}
|
||||
lockExclusive :: LockFile -> IO (Maybe LockHandle)
|
||||
lockExclusive file = tryMakeLockHandle P.lockPool file
|
||||
lockExclusive file = fmap fst <$> tryMakeLockHandle P.lockPool file
|
||||
(\p f -> P.tryTakeLock p f LockExclusive)
|
||||
(\f _ -> fmap mk <$> F.lockExclusive f)
|
||||
|
||||
|
@ -42,7 +42,7 @@ lockExclusive file = tryMakeLockHandle P.lockPool file
|
|||
waitToLock :: IO (Maybe lockhandle) -> IO lockhandle
|
||||
waitToLock = F.waitToLock
|
||||
|
||||
mk :: F.LockHandle -> FileLockOps
|
||||
mk h = FileLockOps
|
||||
mk :: F.LockHandle -> (FileLockOps, ())
|
||||
mk h = (FileLockOps
|
||||
{ fDropLock = F.dropLock h
|
||||
}
|
||||
}, ())
|
||||
|
|
|
@ -72,3 +72,5 @@ Utility\LockPool\Windows.hs:38:18: error:
|
|||
|
||||
[[!meta author=jwodder]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> [[fixed|done]] --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue