{-# OPTIONS_GHC -fno-warn-deprecations #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Safe #-}
#endif
module Control.Concurrent.QSem.Lifted
( QSem
, newQSem
, waitQSem
, signalQSem
) where
import Control.Concurrent.QSem ( QSem )
import qualified Control.Concurrent.QSem as QSem
import Data.Int ( Int )
import System.IO ( IO )
import Prelude ( (.) )
import Control.Monad.Base ( MonadBase, liftBase )
#include "inlinable.h"
newQSem :: MonadBase IO m => Int -> m QSem
newQSem :: forall (m :: * -> *). MonadBase IO m => Int -> m QSem
newQSem = IO QSem -> m QSem
forall α. IO α -> m α
forall (b :: * -> *) (m :: * -> *) α. MonadBase b m => b α -> m α
liftBase (IO QSem -> m QSem) -> (Int -> IO QSem) -> Int -> m QSem
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Int -> IO QSem
QSem.newQSem
{-# INLINABLE newQSem #-}
waitQSem :: MonadBase IO m => QSem -> m ()
waitQSem :: forall (m :: * -> *). MonadBase IO m => QSem -> m ()
waitQSem = IO () -> m ()
forall α. IO α -> m α
forall (b :: * -> *) (m :: * -> *) α. MonadBase b m => b α -> m α
liftBase (IO () -> m ()) -> (QSem -> IO ()) -> QSem -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. QSem -> IO ()
QSem.waitQSem
{-# INLINABLE waitQSem #-}
signalQSem :: MonadBase IO m => QSem -> m ()
signalQSem :: forall (m :: * -> *). MonadBase IO m => QSem -> m ()
signalQSem = IO () -> m ()
forall α. IO α -> m α
forall (b :: * -> *) (m :: * -> *) α. MonadBase b m => b α -> m α
liftBase (IO () -> m ()) -> (QSem -> IO ()) -> QSem -> m ()
forall b c a. (b -> c) -> (a -> b) -> a -> c
. QSem -> IO ()
QSem.signalQSem
{-# INLINABLE signalQSem #-}