blob: b85e0916abb960dbf56c8ce652d6ddd8d3720f36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
{-# LANGUAGE NoImplicitPrelude #-}
-- | Things common to all file locking implementations.
module GHC.IO.Handle.Lock.Common
( FileLockingNotSupported(..)
, LockMode(..)
) where
import GHC.Exception
import GHC.Show
-- | Exception thrown by 'hLock' on non-Windows platforms that don't support
-- 'flock'.
data FileLockingNotSupported = FileLockingNotSupported
deriving Show -- ^ @since 4.10.0.0
-- ^ @since 4.10.0.0
instance Exception FileLockingNotSupported
-- | Indicates a mode in which a file should be locked.
data LockMode = SharedLock | ExclusiveLock
|