{-# LANGUAGE CPP #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
module Control.Concurrent.SampleVar.Lifted
( SampleVar
, newEmptySampleVar
, newSampleVar
, emptySampleVar
, readSampleVar
, writeSampleVar
, isEmptySampleVar
) where
import Control.Concurrent.SampleVar ( SampleVar )
import qualified Control.Concurrent.SampleVar as SampleVar
import Data.Bool ( Bool )
import System.IO ( IO )
import Prelude ( (.) )
import Control.Monad.Base ( MonadBase, liftBase )
#include "inlinable.h"
newEmptySampleVar :: MonadBase IO m => m (SampleVar a)
newEmptySampleVar = liftBase SampleVar.newEmptySampleVar
newSampleVar :: MonadBase IO m => a -> m (SampleVar a)
newSampleVar = liftBase . SampleVar.newSampleVar
emptySampleVar :: MonadBase IO m => SampleVar a -> m ()
emptySampleVar = liftBase . SampleVar.emptySampleVar
readSampleVar :: MonadBase IO m => SampleVar a -> m a
readSampleVar = liftBase . SampleVar.readSampleVar
writeSampleVar :: MonadBase IO m => SampleVar a -> a -> m ()
writeSampleVar sv = liftBase . SampleVar.writeSampleVar sv
isEmptySampleVar :: MonadBase IO m => SampleVar a -> m Bool
isEmptySampleVar = liftBase . SampleVar.isEmptySampleVar