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