ouroboros-consensus-0.1.0.1: Consensus layer for the Ouroboros blockchain protocol
Safe Haskell None
Language Haskell2010

Ouroboros.Consensus.Util.EarlyExit

Synopsis

Documentation

Re-exports

lift :: ( MonadTrans t, Monad m) => m a -> t m a Source #

Lift a computation from the argument monad to the constructed monad.

opaque

data WithEarlyExit m a Source #

Instances

Instances details
MonadTrans WithEarlyExit Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Monad m => Monad ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Functor m => Functor ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Monad m => Applicative ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Monad m => MonadPlus ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Monad m => Alternative ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

( MonadMask m, MonadAsync m, MonadCatch ( STM m)) => MonadAsync ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type Async ( WithEarlyExit m) = (async :: Type -> Type ) Source #

Methods

async :: WithEarlyExit m a -> WithEarlyExit m ( Async ( WithEarlyExit m) a) Source #

asyncThreadId :: Async ( WithEarlyExit m) a -> ThreadId ( WithEarlyExit m) Source #

withAsync :: WithEarlyExit m a -> ( Async ( WithEarlyExit m) a -> WithEarlyExit m b) -> WithEarlyExit m b Source #

waitSTM :: Async ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

pollSTM :: Async ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe ( Either SomeException a)) Source #

waitCatchSTM :: Async ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Either SomeException a) Source #

waitAnySTM :: [ Async ( WithEarlyExit m) a] -> STM ( WithEarlyExit m) ( Async ( WithEarlyExit m) a, a) Source #

waitAnyCatchSTM :: [ Async ( WithEarlyExit m) a] -> STM ( WithEarlyExit m) ( Async ( WithEarlyExit m) a, Either SomeException a) Source #

waitEitherSTM :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> STM ( WithEarlyExit m) ( Either a b) Source #

waitEitherSTM_ :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> STM ( WithEarlyExit m) () Source #

waitEitherCatchSTM :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> STM ( WithEarlyExit m) ( Either ( Either SomeException a) ( Either SomeException b)) Source #

waitBothSTM :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> STM ( WithEarlyExit m) (a, b) Source #

wait :: Async ( WithEarlyExit m) a -> WithEarlyExit m a Source #

poll :: Async ( WithEarlyExit m) a -> WithEarlyExit m ( Maybe ( Either SomeException a)) Source #

waitCatch :: Async ( WithEarlyExit m) a -> WithEarlyExit m ( Either SomeException a) Source #

cancel :: Async ( WithEarlyExit m) a -> WithEarlyExit m () Source #

cancelWith :: Exception e => Async ( WithEarlyExit m) a -> e -> WithEarlyExit m () Source #

uninterruptibleCancel :: Async ( WithEarlyExit m) a -> WithEarlyExit m () Source #

waitAny :: [ Async ( WithEarlyExit m) a] -> WithEarlyExit m ( Async ( WithEarlyExit m) a, a) Source #

waitAnyCatch :: [ Async ( WithEarlyExit m) a] -> WithEarlyExit m ( Async ( WithEarlyExit m) a, Either SomeException a) Source #

waitAnyCancel :: [ Async ( WithEarlyExit m) a] -> WithEarlyExit m ( Async ( WithEarlyExit m) a, a) Source #

waitAnyCatchCancel :: [ Async ( WithEarlyExit m) a] -> WithEarlyExit m ( Async ( WithEarlyExit m) a, Either SomeException a) Source #

waitEither :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m ( Either a b) Source #

waitEitherCatch :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m ( Either ( Either SomeException a) ( Either SomeException b)) Source #

waitEitherCancel :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m ( Either a b) Source #

waitEitherCatchCancel :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m ( Either ( Either SomeException a) ( Either SomeException b)) Source #

waitEither_ :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m () Source #

waitBoth :: Async ( WithEarlyExit m) a -> Async ( WithEarlyExit m) b -> WithEarlyExit m (a, b) Source #

race :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m ( Either a b) Source #

race_ :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m () Source #

concurrently :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m (a, b) Source #

concurrently_ :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m () Source #

asyncWithUnmask :: (( forall b. WithEarlyExit m b -> WithEarlyExit m b) -> WithEarlyExit m a) -> WithEarlyExit m ( Async ( WithEarlyExit m) a) Source #

MonadDelay m => MonadDelay ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadMonotonicTime m => MonadMonotonicTime ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadSTM m => MonadSTM ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

atomically :: HasCallStack => STM ( WithEarlyExit m) a -> WithEarlyExit m a Source #

newTVar :: a -> STM ( WithEarlyExit m) ( TVar ( WithEarlyExit m) a) Source #

readTVar :: TVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

writeTVar :: TVar ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) () Source #

retry :: STM ( WithEarlyExit m) a Source #

orElse :: STM ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

modifyTVar :: TVar ( WithEarlyExit m) a -> (a -> a) -> STM ( WithEarlyExit m) () Source #

modifyTVar' :: TVar ( WithEarlyExit m) a -> (a -> a) -> STM ( WithEarlyExit m) () Source #

stateTVar :: TVar ( WithEarlyExit m) s -> (s -> (a, s)) -> STM ( WithEarlyExit m) a Source #

swapTVar :: TVar ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) a Source #

check :: Bool -> STM ( WithEarlyExit m) () Source #

newTMVar :: a -> STM ( WithEarlyExit m) ( TMVar ( WithEarlyExit m) a) Source #

newEmptyTMVar :: STM ( WithEarlyExit m) ( TMVar ( WithEarlyExit m) a) Source #

takeTMVar :: TMVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryTakeTMVar :: TMVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

putTMVar :: TMVar ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) () Source #

tryPutTMVar :: TMVar ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) Bool Source #

readTMVar :: TMVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryReadTMVar :: TMVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

swapTMVar :: TMVar ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) a Source #

isEmptyTMVar :: TMVar ( WithEarlyExit m) a -> STM ( WithEarlyExit m) Bool Source #

newTQueue :: STM ( WithEarlyExit m) ( TQueue ( WithEarlyExit m) a) Source #

readTQueue :: TQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryReadTQueue :: TQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

peekTQueue :: TQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryPeekTQueue :: TQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

writeTQueue :: TQueue ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) () Source #

isEmptyTQueue :: TQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) Bool Source #

newTBQueue :: Natural -> STM ( WithEarlyExit m) ( TBQueue ( WithEarlyExit m) a) Source #

readTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryReadTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

peekTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) a Source #

tryPeekTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) ( Maybe a) Source #

flushTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) [a] Source #

writeTBQueue :: TBQueue ( WithEarlyExit m) a -> a -> STM ( WithEarlyExit m) () Source #

lengthTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) Natural Source #

isEmptyTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) Bool Source #

isFullTBQueue :: TBQueue ( WithEarlyExit m) a -> STM ( WithEarlyExit m) Bool Source #

newTVarIO :: a -> WithEarlyExit m ( TVar ( WithEarlyExit m) a) Source #

readTVarIO :: TVar ( WithEarlyExit m) a -> WithEarlyExit m a Source #

newTMVarIO :: a -> WithEarlyExit m ( TMVar ( WithEarlyExit m) a) Source #

newEmptyTMVarIO :: WithEarlyExit m ( TMVar ( WithEarlyExit m) a) Source #

newTQueueIO :: WithEarlyExit m ( TQueue ( WithEarlyExit m) a) Source #

newTBQueueIO :: Natural -> WithEarlyExit m ( TBQueue ( WithEarlyExit m) a) Source #

MonadCatch m => MonadThrow ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadCatch m => MonadCatch ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadMask m => MonadMask ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

( MonadEvaluate m, MonadCatch m) => MonadEvaluate ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadST m => MonadST ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

withLiftST :: ( forall s. ( forall a. ST s a -> WithEarlyExit m a) -> b) -> b Source #

MonadThread m => MonadThread ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type ThreadId ( WithEarlyExit m) Source #

MonadFork m => MonadFork ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadEventlog m => MonadEventlog ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

( IOLike m, forall a. NoThunks ( StrictTVar ( WithEarlyExit m) a), forall a. NoThunks ( StrictMVar ( WithEarlyExit m) a), MonadCatch ( STM m)) => IOLike ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

( forall a'. NoThunks (m a')) => NoThunks ( WithEarlyExit m a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type Async ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TBQueue ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TQueue ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TMVar ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TVar ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type STM ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type ThreadId ( WithEarlyExit m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit