ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Util.EarlyExit

Contents

Synopsis

Documentation

data WithEarlyExit m a Source #

Instances

Instances details
MonadTrans WithEarlyExit Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

lift :: Monad m => m a -> WithEarlyExit m a #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

(>>=) :: WithEarlyExit m a -> (a -> WithEarlyExit m b) -> WithEarlyExit m b #

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

return :: a -> WithEarlyExit m a #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

fmap :: (a -> b) -> WithEarlyExit m a -> WithEarlyExit m b #

(<$) :: a -> WithEarlyExit m b -> WithEarlyExit m a #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

pure :: a -> WithEarlyExit m a #

(<*>) :: WithEarlyExit m (a -> b) -> WithEarlyExit m a -> WithEarlyExit m b #

liftA2 :: (a -> b -> c) -> WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m c #

(*>) :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m b #

(<*) :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m a #

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) :: Type -> Type Source #

Methods

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

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

withAsync :: WithEarlyExit m a -> (Async (WithEarlyExit m) a -> WithEarlyExit m b) -> WithEarlyExit m 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

MonadSTMTx stm => MonadSTMTx (WithEarlyExit stm) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type TVar_ (WithEarlyExit stm) :: Type -> Type Source #

type TMVar_ (WithEarlyExit stm) :: Type -> Type Source #

type TQueue_ (WithEarlyExit stm) :: Type -> Type Source #

type TBQueue_ (WithEarlyExit stm) :: Type -> Type Source #

Methods

newTVar :: a -> WithEarlyExit stm (TVar_ (WithEarlyExit stm) a) Source #

readTVar :: TVar_ (WithEarlyExit stm) a -> WithEarlyExit stm a Source #

writeTVar :: TVar_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm () Source #

retry :: WithEarlyExit stm a Source #

orElse :: WithEarlyExit stm a -> WithEarlyExit stm a -> WithEarlyExit stm a Source #

modifyTVar :: TVar_ (WithEarlyExit stm) a -> (a -> a) -> WithEarlyExit stm () Source #

modifyTVar' :: TVar_ (WithEarlyExit stm) a -> (a -> a) -> WithEarlyExit stm () Source #

stateTVar :: TVar_ (WithEarlyExit stm) s -> (s -> (a, s)) -> WithEarlyExit stm a Source #

check :: Bool -> WithEarlyExit stm () Source #

newTMVar :: a -> WithEarlyExit stm (TMVar_ (WithEarlyExit stm) a) Source #

newEmptyTMVar :: WithEarlyExit stm (TMVar_ (WithEarlyExit stm) a) Source #

takeTMVar :: TMVar_ (WithEarlyExit stm) a -> WithEarlyExit stm a Source #

tryTakeTMVar :: TMVar_ (WithEarlyExit stm) a -> WithEarlyExit stm (Maybe a) Source #

putTMVar :: TMVar_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm () Source #

tryPutTMVar :: TMVar_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm Bool Source #

readTMVar :: TMVar_ (WithEarlyExit stm) a -> WithEarlyExit stm a Source #

tryReadTMVar :: TMVar_ (WithEarlyExit stm) a -> WithEarlyExit stm (Maybe a) Source #

swapTMVar :: TMVar_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm a Source #

isEmptyTMVar :: TMVar_ (WithEarlyExit stm) a -> WithEarlyExit stm Bool Source #

newTQueue :: WithEarlyExit stm (TQueue_ (WithEarlyExit stm) a) Source #

readTQueue :: TQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm a Source #

tryReadTQueue :: TQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm (Maybe a) Source #

writeTQueue :: TQueue_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm () Source #

isEmptyTQueue :: TQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm Bool Source #

newTBQueue :: Natural -> WithEarlyExit stm (TBQueue_ (WithEarlyExit stm) a) Source #

readTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm a Source #

tryReadTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm (Maybe a) Source #

flushTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm [a] Source #

writeTBQueue :: TBQueue_ (WithEarlyExit stm) a -> a -> WithEarlyExit stm () Source #

lengthTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm Natural Source #

isEmptyTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm Bool Source #

isFullTBQueue :: TBQueue_ (WithEarlyExit stm) a -> WithEarlyExit stm Bool Source #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type STM (WithEarlyExit m) :: Type -> Type 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

Methods

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

catchJust :: Exception e => (e -> Maybe b) -> WithEarlyExit m a -> (b -> WithEarlyExit m a) -> WithEarlyExit m a Source #

try :: Exception e => WithEarlyExit m a -> WithEarlyExit m (Either e a) Source #

tryJust :: Exception e => (e -> Maybe b) -> WithEarlyExit m a -> WithEarlyExit m (Either b a) Source #

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

handleJust :: Exception e => (e -> Maybe b) -> (b -> WithEarlyExit m a) -> WithEarlyExit m a -> WithEarlyExit m a Source #

onException :: WithEarlyExit m a -> WithEarlyExit m b -> WithEarlyExit m a Source #

bracketOnError :: WithEarlyExit m a -> (a -> WithEarlyExit m b) -> (a -> WithEarlyExit m c) -> WithEarlyExit m c Source #

generalBracket :: WithEarlyExit m a -> (a -> ExitCase b -> WithEarlyExit m c) -> (a -> WithEarlyExit m b) -> WithEarlyExit m (b, c) Source #

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

Methods

evaluate :: a -> WithEarlyExit m a Source #

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

(MonadAsyncSTM async stm, MonadCatch stm) => MonadAsyncSTM (WithEarlyExit async) (WithEarlyExit stm) 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 stm) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TQueue_ (WithEarlyExit stm) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TQueue_ (WithEarlyExit stm) = TQueue_ stm
type TMVar_ (WithEarlyExit stm) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TMVar_ (WithEarlyExit stm) = TMVar_ stm
type TVar_ (WithEarlyExit stm) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TVar_ (WithEarlyExit stm) = TVar_ stm
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

Re-exports

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

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