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

Ouroboros.Consensus.Util.EarlyExit

Synopsis

Documentation

withEarlyExit_Functor m ⇒ WithEarlyExit m () → m () Source #

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

Methods

liftMonad m ⇒ m a → WithEarlyExit m a Source #

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 Source #

(>>)WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m b Source #

return ∷ a → WithEarlyExit m a Source #

Functor m ⇒ Functor (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

fmap ∷ (a → b) → WithEarlyExit m a → WithEarlyExit m b Source #

(<$) ∷ a → WithEarlyExit m b → WithEarlyExit m a Source #

Monad m ⇒ Applicative (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

pure ∷ a → WithEarlyExit m a Source #

(<*>)WithEarlyExit m (a → b) → WithEarlyExit m a → WithEarlyExit m b Source #

liftA2 ∷ (a → b → c) → WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m c Source #

(*>)WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m b Source #

(<*)WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m a Source #

Monad m ⇒ Alternative (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

MonadSTM m ⇒ MonadSTM (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type STM (WithEarlyExit m) = (stm ∷ TypeType) #

type TVar (WithEarlyExit m) ∷ TypeType

type TMVar (WithEarlyExit m) ∷ TypeType

type TQueue (WithEarlyExit m) ∷ TypeType #

type TBQueue (WithEarlyExit m) ∷ TypeType #

Methods

atomicallyHasCallStackSTM (WithEarlyExit m) a → WithEarlyExit m a #

newTVar ∷ a → STM (WithEarlyExit m) (TVar (WithEarlyExit m) a)

readTVar ∷ TVar (WithEarlyExit m) a → STM (WithEarlyExit m) a

writeTVar ∷ TVar (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

retrySTM (WithEarlyExit m) a #

orElseSTM (WithEarlyExit m) a → STM (WithEarlyExit m) a → STM (WithEarlyExit m) a #

modifyTVar ∷ TVar (WithEarlyExit m) a → (a → a) → STM (WithEarlyExit m) ()

modifyTVar' ∷ TVar (WithEarlyExit m) a → (a → a) → STM (WithEarlyExit m) () #

stateTVar ∷ TVar (WithEarlyExit m) s → (s → (a, s)) → STM (WithEarlyExit m) a

swapTVar ∷ TVar (WithEarlyExit m) a → a → STM (WithEarlyExit m) a

checkBoolSTM (WithEarlyExit m) () #

newTMVar ∷ a → STM (WithEarlyExit m) (TMVar (WithEarlyExit m) a)

newEmptyTMVarSTM (WithEarlyExit m) (TMVar (WithEarlyExit m) a)

takeTMVar ∷ TMVar (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryTakeTMVar ∷ TMVar (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

putTMVar ∷ TMVar (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

tryPutTMVar ∷ TMVar (WithEarlyExit m) a → a → STM (WithEarlyExit m) Bool

readTMVar ∷ TMVar (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryReadTMVar ∷ TMVar (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

swapTMVar ∷ TMVar (WithEarlyExit m) a → a → STM (WithEarlyExit m) a

isEmptyTMVar ∷ TMVar (WithEarlyExit m) a → STM (WithEarlyExit m) Bool

newTQueueSTM (WithEarlyExit m) (TQueue (WithEarlyExit m) a) #

readTQueueTQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a #

tryReadTQueueTQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a) #

peekTQueueTQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a #

tryPeekTQueueTQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a) #

writeTQueueTQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) () #

isEmptyTQueueTQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool #

newTBQueueNaturalSTM (WithEarlyExit m) (TBQueue (WithEarlyExit m) a) #

readTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a #

tryReadTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a) #

peekTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a #

tryPeekTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a) #

flushTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) [a] #

writeTBQueueTBQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) () #

lengthTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Natural #

isEmptyTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool #

isFullTBQueueTBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool #

newTVarIO ∷ a → WithEarlyExit m (TVar (WithEarlyExit m) a)

readTVarIO ∷ TVar (WithEarlyExit m) a → WithEarlyExit m a

newTMVarIO ∷ a → WithEarlyExit m (TMVar (WithEarlyExit m) a)

newEmptyTMVarIOWithEarlyExit m (TMVar (WithEarlyExit m) a)

newTQueueIOWithEarlyExit m (TQueue (WithEarlyExit m) a) #

newTBQueueIONaturalWithEarlyExit m (TBQueue (WithEarlyExit m) a) #

MonadST m ⇒ MonadST (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

withLiftST ∷ (∀ s. (∀ a. ST s a → WithEarlyExit m a) → b) → b #

MonadCatch m ⇒ MonadThrow (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

throwIOException e ⇒ e → WithEarlyExit m a #

bracketWithEarlyExit m a → (a → WithEarlyExit m b) → (a → WithEarlyExit m c) → WithEarlyExit m c #

bracket_WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m c → WithEarlyExit m c #

finallyWithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m a #

MonadMonotonicTime m ⇒ MonadMonotonicTime (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

catchException e ⇒ WithEarlyExit m a → (e → WithEarlyExit m a) → WithEarlyExit m a #

catchJustException e ⇒ (e → Maybe b) → WithEarlyExit m a → (b → WithEarlyExit m a) → WithEarlyExit m a #

tryException e ⇒ WithEarlyExit m a → WithEarlyExit m (Either e a) #

tryJustException e ⇒ (e → Maybe b) → WithEarlyExit m a → WithEarlyExit m (Either b a) #

handleException e ⇒ (e → WithEarlyExit m a) → WithEarlyExit m a → WithEarlyExit m a #

handleJustException e ⇒ (e → Maybe b) → (b → WithEarlyExit m a) → WithEarlyExit m a → WithEarlyExit m a #

onExceptionWithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m a #

bracketOnErrorWithEarlyExit m a → (a → WithEarlyExit m b) → (a → WithEarlyExit m c) → WithEarlyExit m c #

generalBracketWithEarlyExit m a → (a → ExitCase b → WithEarlyExit m c) → (a → WithEarlyExit m b) → WithEarlyExit m (b, c) #

(MonadEvaluate m, MonadCatch m) ⇒ MonadEvaluate (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

evaluate ∷ a → WithEarlyExit m a #

MonadMask m ⇒ MonadMask (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

mask ∷ ((∀ a. WithEarlyExit m a → WithEarlyExit m a) → WithEarlyExit m b) → WithEarlyExit m b #

uninterruptibleMask ∷ ((∀ a. WithEarlyExit m a → WithEarlyExit m a) → WithEarlyExit m b) → WithEarlyExit m b #

mask_WithEarlyExit m a → WithEarlyExit m a #

uninterruptibleMask_WithEarlyExit m a → WithEarlyExit m a #

(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 ∷ TypeType) #

Methods

asyncWithEarlyExit m a → WithEarlyExit m (Async (WithEarlyExit m) a) #

asyncThreadIdAsync (WithEarlyExit m) a → ThreadId (WithEarlyExit m) #

withAsyncWithEarlyExit m a → (Async (WithEarlyExit m) a → WithEarlyExit m b) → WithEarlyExit m b #

waitSTMAsync (WithEarlyExit m) a → STM (WithEarlyExit m) a #

pollSTMAsync (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe (Either SomeException a)) #

waitCatchSTMAsync (WithEarlyExit m) a → STM (WithEarlyExit m) (Either SomeException a) #

waitAnySTM ∷ [Async (WithEarlyExit m) a] → STM (WithEarlyExit m) (Async (WithEarlyExit m) a, a) #

waitAnyCatchSTM ∷ [Async (WithEarlyExit m) a] → STM (WithEarlyExit m) (Async (WithEarlyExit m) a, Either SomeException a) #

waitEitherSTMAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → STM (WithEarlyExit m) (Either a b) #

waitEitherSTM_Async (WithEarlyExit m) a → Async (WithEarlyExit m) b → STM (WithEarlyExit m) () #

waitEitherCatchSTMAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → STM (WithEarlyExit m) (Either (Either SomeException a) (Either SomeException b)) #

waitBothSTMAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → STM (WithEarlyExit m) (a, b) #

waitAsync (WithEarlyExit m) a → WithEarlyExit m a #

pollAsync (WithEarlyExit m) a → WithEarlyExit m (Maybe (Either SomeException a)) #

waitCatchAsync (WithEarlyExit m) a → WithEarlyExit m (Either SomeException a) #

cancelAsync (WithEarlyExit m) a → WithEarlyExit m () #

cancelWithException e ⇒ Async (WithEarlyExit m) a → e → WithEarlyExit m () #

uninterruptibleCancelAsync (WithEarlyExit m) a → WithEarlyExit m () #

waitAny ∷ [Async (WithEarlyExit m) a] → WithEarlyExit m (Async (WithEarlyExit m) a, a) #

waitAnyCatch ∷ [Async (WithEarlyExit m) a] → WithEarlyExit m (Async (WithEarlyExit m) a, Either SomeException a) #

waitAnyCancel ∷ [Async (WithEarlyExit m) a] → WithEarlyExit m (Async (WithEarlyExit m) a, a) #

waitAnyCatchCancel ∷ [Async (WithEarlyExit m) a] → WithEarlyExit m (Async (WithEarlyExit m) a, Either SomeException a) #

waitEitherAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m (Either a b) #

waitEitherCatchAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m (Either (Either SomeException a) (Either SomeException b)) #

waitEitherCancelAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m (Either a b) #

waitEitherCatchCancelAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m (Either (Either SomeException a) (Either SomeException b)) #

waitEither_Async (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m () #

waitBothAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → WithEarlyExit m (a, b) #

raceWithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m (Either a b) #

race_WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m () #

concurrentlyWithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m (a, b) #

concurrently_WithEarlyExit m a → WithEarlyExit m b → WithEarlyExit m () #

asyncWithUnmask ∷ ((∀ b. WithEarlyExit m b → WithEarlyExit m b) → WithEarlyExit m a) → WithEarlyExit m (Async (WithEarlyExit m) a) #

MonadThread m ⇒ MonadThread (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Associated Types

type ThreadId (WithEarlyExit m) #

MonadFork m ⇒ MonadFork (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadDelay m ⇒ MonadDelay (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

threadDelayDiffTimeWithEarlyExit m () #

MonadEventlog m ⇒ MonadEventlog (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

(IOLike m, ∀ a. NoThunks (StrictTVar (WithEarlyExit m) a), ∀ a. NoThunks (StrictMVar (WithEarlyExit m) a), MonadCatch (STM m)) ⇒ IOLike (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

forgetSignKeyKES ∷ KESAlgorithm v ⇒ SignKeyKES v → WithEarlyExit m () Source #

(∀ a'. NoThunks (m a')) ⇒ NoThunks (WithEarlyExit m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

noThunks ∷ Context → WithEarlyExit m a → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → WithEarlyExit m a → IO (Maybe ThunkInfo) #

showTypeOfProxy (WithEarlyExit m a) → String #

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

type TMVar (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TMVar (WithEarlyExit m) = TMVar m
type Async (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 TVar (WithEarlyExit m) = TVar m
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