{-# LANGUAGE DataKinds #-}
{-# LANGUAGE Safe #-}
module Lukko.NoOp (
FileLockingNotSupported(..),
fileLockingSupported,
FileLockingSupported,
FileLockingMethod (..),
fileLockingMethod,
LockMode(..),
FD,
fdOpen,
fdClose,
fdLock,
fdTryLock,
fdUnlock,
hLock,
hTryLock,
hUnlock,
) where
import Control.Exception (throwIO)
import System.IO (Handle)
import Lukko.Internal.FD
import Lukko.Internal.Types
fileLockingSupported :: Bool
fileLockingSupported = False
type FileLockingSupported = 'False
fileLockingMethod :: FileLockingMethod
fileLockingMethod = MethodNoOp
hLock :: Handle -> LockMode -> IO ()
hLock _ _ = throwIO FileLockingNotSupported
hTryLock :: Handle -> LockMode -> IO Bool
hTryLock _ _ = throwIO FileLockingNotSupported
hUnlock :: Handle -> IO ()
hUnlock _ = throwIO FileLockingNotSupported
fdLock :: FD -> LockMode -> IO ()
fdLock _ _ = throwIO FileLockingNotSupported
fdTryLock :: FD -> LockMode -> IO Bool
fdTryLock _ _ = throwIO FileLockingNotSupported
fdUnlock :: FD -> IO ()
fdUnlock _ = throwIO FileLockingNotSupported