ouroboros-consensus-0.3.1.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

type TArray (WithEarlyExit m) ∷ TypeTypeType

type TSem (WithEarlyExit m)

type TChan (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)

readTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryReadTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

peekTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryPeekTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

flushTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) [a]

writeTQueue ∷ TQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

isEmptyTQueue ∷ TQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool

unGetTQueue ∷ TQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

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

readTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryReadTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

peekTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryPeekTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

flushTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) [a]

writeTBQueue ∷ TBQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

lengthTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Natural

isEmptyTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool

isFullTBQueue ∷ TBQueue (WithEarlyExit m) a → STM (WithEarlyExit m) Bool

unGetTBQueue ∷ TBQueue (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

newTSemIntegerSTM (WithEarlyExit m) (TSem (WithEarlyExit m))

waitTSem ∷ TSem (WithEarlyExit m) → STM (WithEarlyExit m) ()

signalTSem ∷ TSem (WithEarlyExit m) → STM (WithEarlyExit m) ()

signalTSemNNatural → TSem (WithEarlyExit m) → STM (WithEarlyExit m) ()

newTChanSTM (WithEarlyExit m) (TChan (WithEarlyExit m) a)

newBroadcastTChanSTM (WithEarlyExit m) (TChan (WithEarlyExit m) a)

dupTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) (TChan (WithEarlyExit m) a)

cloneTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) (TChan (WithEarlyExit m) a)

readTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryReadTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

peekTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) a

tryPeekTChan ∷ TChan (WithEarlyExit m) a → STM (WithEarlyExit m) (Maybe a)

writeTChan ∷ TChan (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

unGetTChan ∷ TChan (WithEarlyExit m) a → a → STM (WithEarlyExit m) ()

isEmptyTChan ∷ TChan (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)

newTChanIOWithEarlyExit m (TChan (WithEarlyExit m) a)

newBroadcastTChanIOWithEarlyExit m (TChan (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) #

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

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

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

withAsyncOnIntWithEarlyExit 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) #

asyncOnWithUnmaskInt → ((∀ b. WithEarlyExit m b → WithEarlyExit m b) → WithEarlyExit m a) → WithEarlyExit m (Async (WithEarlyExit m) a) #

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

withAsyncOnWithUnmaskInt → ((∀ c. WithEarlyExit m c → WithEarlyExit m c) → WithEarlyExit m a) → (Async (WithEarlyExit m) a → WithEarlyExit m b) → WithEarlyExit m b #

compareAsyncsAsync (WithEarlyExit m) a → Async (WithEarlyExit m) b → Ordering #

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 #

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 #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

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

MonadEventlog m ⇒ MonadEventlog (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 ∷ (∀ s. (∀ a. ST s a → WithEarlyExit m a) → b) → b #

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

Defined in Ouroboros.Consensus.Util.EarlyExit

Methods

threadDelayDiffTimeWithEarlyExit m () #

(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 TArray (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TArray (WithEarlyExit m) = TArray m
type TBQueue (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TBQueue (WithEarlyExit m) = TBQueue m
type TChan (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TChan (WithEarlyExit m) = TChan m
type TQueue (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TQueue (WithEarlyExit m) = TQueue m
type TVar (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TVar (WithEarlyExit m) = TVar m
type TSem (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit

type TSem (WithEarlyExit m) = TSem m
type Async (WithEarlyExit m) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.EarlyExit