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

Ouroboros.Consensus.Util.IOLike

Synopsis

Documentation

Re-exports

MonadThrow

class ( Typeable e, Show e) => Exception e where Source #

Any type that you wish to throw or catch as an exception must be an instance of the Exception class. The simplest case is a new exception type directly below the root:

data MyException = ThisException | ThatException
    deriving Show

instance Exception MyException

The default method definitions in the Exception class do what we need in this case. You can now throw and catch ThisException and ThatException as exceptions:

*Main> throw ThisException `catch` \e -> putStrLn ("Caught " ++ show (e :: MyException))
Caught ThisException

In more complicated examples, you may wish to define a whole hierarchy of exceptions:

---------------------------------------------------------------------
-- Make the root exception type for all the exceptions in a compiler

data SomeCompilerException = forall e . Exception e => SomeCompilerException e

instance Show SomeCompilerException where
    show (SomeCompilerException e) = show e

instance Exception SomeCompilerException

compilerExceptionToException :: Exception e => e -> SomeException
compilerExceptionToException = toException . SomeCompilerException

compilerExceptionFromException :: Exception e => SomeException -> Maybe e
compilerExceptionFromException x = do
    SomeCompilerException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make a subhierarchy for exceptions in the frontend of the compiler

data SomeFrontendException = forall e . Exception e => SomeFrontendException e

instance Show SomeFrontendException where
    show (SomeFrontendException e) = show e

instance Exception SomeFrontendException where
    toException = compilerExceptionToException
    fromException = compilerExceptionFromException

frontendExceptionToException :: Exception e => e -> SomeException
frontendExceptionToException = toException . SomeFrontendException

frontendExceptionFromException :: Exception e => SomeException -> Maybe e
frontendExceptionFromException x = do
    SomeFrontendException a <- fromException x
    cast a

---------------------------------------------------------------------
-- Make an exception type for a particular frontend compiler exception

data MismatchedParentheses = MismatchedParentheses
    deriving Show

instance Exception MismatchedParentheses where
    toException   = frontendExceptionToException
    fromException = frontendExceptionFromException

We can now catch a MismatchedParentheses exception as MismatchedParentheses , SomeFrontendException or SomeCompilerException , but not other types, e.g. IOException :

*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: MismatchedParentheses))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeFrontendException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: SomeCompilerException))
Caught MismatchedParentheses
*Main> throw MismatchedParentheses `catch` \e -> putStrLn ("Caught " ++ show (e :: IOException))
*** Exception: MismatchedParentheses

Minimal complete definition

Nothing

Methods

toException :: e -> SomeException Source #

fromException :: SomeException -> Maybe e Source #

displayException :: e -> String Source #

Render this exception value in a human-friendly manner.

Default implementation: show .

Since: base-4.8.0.0

Instances

Instances details
Exception AsyncCancelled
Instance details

Defined in Control.Concurrent.Async

Exception ExceptionInLinkedThread
Instance details

Defined in Control.Concurrent.Async

Exception Void

Since: base-4.8.0.0

Instance details

Defined in Data.Void

Exception PatternMatchFail

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecSelError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecConError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception RecUpdError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NoMethodError

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception TypeError

Since: base-4.9.0.0

Instance details

Defined in Control.Exception.Base

Exception NonTermination

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception NestedAtomically

Since: base-4.0

Instance details

Defined in Control.Exception.Base

Exception BlockedIndefinitelyOnMVar

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception BlockedIndefinitelyOnSTM

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception Deadlock

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception AllocationLimitExceeded

Since: base-4.8.0.0

Instance details

Defined in GHC.IO.Exception

Exception CompactionFailed

Since: base-4.10.0.0

Instance details

Defined in GHC.IO.Exception

Exception AssertionFailed

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception SomeAsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception AsyncException

Since: base-4.7.0.0

Instance details

Defined in GHC.IO.Exception

Exception ArrayException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception FixIOException

Since: base-4.11.0.0

Instance details

Defined in GHC.IO.Exception

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception IOException

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

Exception ErrorCall

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception

Exception ArithException

Since: base-4.0.0.0

Instance details

Defined in GHC.Exception.Type

Exception SomeException

Since: base-3.0

Instance details

Defined in GHC.Exception.Type

Exception ASCII7_Invalid
Instance details

Defined in Basement.String.Encoding.ASCII7

Exception ISO_8859_1_Invalid
Instance details

Defined in Basement.String.Encoding.ISO_8859_1

Exception UTF16_Invalid
Instance details

Defined in Basement.String.Encoding.UTF16

Exception UTF32_Invalid
Instance details

Defined in Basement.String.Encoding.UTF32

Exception DeserialiseFailure
Instance details

Defined in Codec.CBOR.Read

Exception DecoderError
Instance details

Defined in Cardano.Binary.FromCBOR

Exception SeedBytesExhausted
Instance details

Defined in Cardano.Crypto.Seed

Exception CryptoError
Instance details

Defined in Crypto.Error.Types

Exception DNSError
Instance details

Defined in Network.DNS.Types

Exception ExceptionInLinkedThread
Instance details

Defined in Control.Monad.Class.MonadAsync

Exception DataMeasureClassOverflowException
Instance details

Defined in Data.Measure.Class

Exception MuxError
Instance details

Defined in Network.Mux.Trace

Exception MuxRuntimeError
Instance details

Defined in Network.Mux.Types

Exception TxSubmissionProtocolError
Instance details

Defined in Ouroboros.Network.TxSubmission.Outbound

Exception TxSubmissionProtocolError
Instance details

Defined in Ouroboros.Network.TxSubmission.Inbound

Exception KeepAliveProtocolFailure
Instance details

Defined in Ouroboros.Network.Protocol.KeepAlive.Type

Exception BlockFetchProtocolFailure
Instance details

Defined in Ouroboros.Network.BlockFetch.Client

Exception ProtocolLimitFailure
Instance details

Defined in Ouroboros.Network.Driver.Limits

Exception DecoderFailure
Instance details

Defined in Ouroboros.Network.Driver.Simple

Exception SubscriberError
Instance details

Defined in Ouroboros.Network.Subscription.Worker

Exception CodecFailure
Instance details

Defined in Network.TypedProtocol.Codec

Exception FsError Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.API.Types

Exception BlockedIndefinitely
Instance details

Defined in Control.Monad.Class.MonadSTM

Exception BimapException
Instance details

Defined in Data.Bimap

Exception DbMarkerError Source #
Instance details

Defined in Ouroboros.Consensus.Node.DbMarker

Exception DbLocked Source #
Instance details

Defined in Ouroboros.Consensus.Node.DbLock

Exception ChunkAssertionFailure Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Internal

Exception OutsideForecastRange Source #
Instance details

Defined in Ouroboros.Consensus.Forecast

Exception ResourceRegistryThreadException Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

Exception TempRegistryException Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

Exception RegistryClosedException Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

Exception PastHorizonException Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Qry

Exception SystemClockMovedBackException Source #
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Util

Exception VersionError Source #
Instance details

Defined in Ouroboros.Consensus.Util.Versioned

Exception HardForkEncoderException Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Serialisation.Common

Exception ChainSyncClientException Source #
Instance details

Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Client

Exception BlockFetchServerException Source #
Instance details

Defined in Ouroboros.Consensus.MiniProtocol.BlockFetch.Server

( Typeable ntnAddr, Show ntnAddr) => Exception ( Failure ntnAddr)
Instance details

Defined in Ouroboros.Network.Diffusion.Common

( Typeable vNumber, Show vNumber) => Exception ( RefuseReason vNumber)
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

( Typeable vNumber, Show vNumber) => Exception ( HandshakeProtocolError vNumber)
Instance details

Defined in Ouroboros.Network.Protocol.Handshake.Type

( StandardHash blk, Typeable blk) => Exception ( VolatileDBError blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.API

( StandardHash blk, Typeable blk) => Exception ( ImmutableDBError blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.API

( Typeable blk, StandardHash blk) => Exception ( ChainDbError blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

( Typeable blk, StandardHash blk) => Exception ( ChainDbFailure blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

class MonadThrow m => MonadCatch (m :: Type -> Type ) where Source #

Catching exceptions.

Covers standard utilities to respond to exceptions.

Minimal complete definition

catch

Methods

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

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

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

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

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

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

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

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

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

Instances

Instances details
MonadCatch IO
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadCatch STM
Instance details

Defined in Control.Monad.Class.MonadThrow

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

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadCatch m => MonadCatch ( ReaderT r m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadCatch m => MonadCatch ( ExceptT e m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadCatch m => MonadCatch ( WithTempRegistry st m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

( MonadSTM m, MonadThrow ( STM m), MonadCatch ( STM m)) => MonadCatch ( WrappedSTM t r m)
Instance details

Defined in Control.Monad.Class.MonadSTM

class MonadCatch m => MonadMask (m :: Type -> Type ) where Source #

Support for safely working in the presence of asynchronous exceptions.

This is typically not needed directly as the utilities in MonadThrow and MonadCatch cover most use cases.

Minimal complete definition

mask , uninterruptibleMask

Methods

mask :: (( forall a. m a -> m a) -> m b) -> m b Source #

uninterruptibleMask :: (( forall a. m a -> m a) -> m b) -> m b Source #

mask_ :: m a -> m a Source #

uninterruptibleMask_ :: m a -> m a Source #

Instances

Instances details
MonadMask IO
Instance details

Defined in Control.Monad.Class.MonadThrow

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

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadMask m => MonadMask ( ReaderT r m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadMask m => MonadMask ( ExceptT e m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadMask m => MonadMask ( WithTempRegistry st m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

class Monad m => MonadThrow (m :: Type -> Type ) where Source #

Throwing exceptions, and resource handling in the presence of exceptions.

Does not include the ability to respond to exceptions.

Minimal complete definition

throwIO

Methods

throwIO :: Exception e => e -> m a Source #

bracket :: m a -> (a -> m b) -> (a -> m c) -> m c Source #

bracket_ :: m a -> m b -> m c -> m c Source #

finally :: m a -> m b -> m a Source #

Instances

Instances details
MonadThrow IO
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadThrow STM
Instance details

Defined in Control.Monad.Class.MonadThrow

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

Defined in Ouroboros.Consensus.Util.EarlyExit

MonadThrow m => MonadThrow ( ReaderT r m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadCatch m => MonadThrow ( ExceptT e m)
Instance details

Defined in Control.Monad.Class.MonadThrow

MonadThrow m => MonadThrow ( WithTempRegistry st m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

( MonadSTM m, MonadThrow ( STM m), MonadCatch ( STM m)) => MonadThrow ( WrappedSTM t r m)
Instance details

Defined in Control.Monad.Class.MonadSTM

data SomeException Source #

The SomeException type is the root of the exception type hierarchy. When an exception of type e is thrown, behind the scenes it is encapsulated in a SomeException .

MonadSTM

MonadFork, TODO: Should we hide this in favour of MonadAsync?

class MonadThread m => MonadFork (m :: Type -> Type ) where Source #

Minimal complete definition

forkIO , forkIOWithUnmask , throwTo , yield

labelThisThread :: MonadThread m => String -> m () Source #

Apply the label to the current thread

MonadAsync

data ExceptionInLinkedThread Source #

Exception from child thread re-raised in parent thread

We record the thread ID of the child thread as a String . This avoids an m parameter in the type, which is important: ExceptionInLinkedThread must be an instance of Exception , requiring it to be Typeable ; if m appeared in the type, we would require m to be Typeable , which does not work with with the simulator, as it would require a Typeable constraint on the s parameter of IOSim .

class ( MonadSTM m, MonadThread m) => MonadAsync (m :: Type -> Type ) where Source #

Associated Types

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

An asynchronous action

Methods

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

asyncThreadId :: Async m a -> ThreadId m Source #

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

waitSTM :: Async m a -> STM m a Source #

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

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

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

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

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

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

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

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

wait :: Async m a -> m a Source #

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

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

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

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

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

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

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

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

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

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

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

Note, IO-based implementations should override the default implementation. See the async package implementation and comments. http://hackage.haskell.org/package/async-2.2.1/docs/src/Control.Concurrent.Async.html#waitEitherCatch

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

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

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

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

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

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

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

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

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

Instances

Instances details
MonadAsync IO
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

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

Methods

async :: IO a -> IO ( Async IO a) Source #

asyncThreadId :: Async IO a -> ThreadId IO Source #

withAsync :: IO a -> ( Async IO a -> IO b) -> IO b Source #

waitSTM :: Async IO a -> STM IO a Source #

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

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

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

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

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

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

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

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

wait :: Async IO a -> IO a Source #

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

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

cancel :: Async IO a -> IO () Source #

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

uninterruptibleCancel :: Async IO a -> IO () Source #

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

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

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

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

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

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

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

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

waitEither_ :: Async IO a -> Async IO b -> IO () Source #

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

race :: IO a -> IO b -> IO ( Either a b) Source #

race_ :: IO a -> IO b -> IO () Source #

concurrently :: IO a -> IO b -> IO (a, b) Source #

concurrently_ :: IO a -> IO b -> IO () Source #

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

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

( MonadAsync m, MonadCatch ( STM m)) => MonadAsync ( ReaderT r m)
Instance details

Defined in Control.Monad.Class.MonadAsync

Associated Types

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

Methods

async :: ReaderT r m a -> ReaderT r m ( Async ( ReaderT r m) a) Source #

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

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

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

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

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

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

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

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

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

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

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

wait :: Async ( ReaderT r m) a -> ReaderT r m a Source #

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

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

cancel :: Async ( ReaderT r m) a -> ReaderT r m () Source #

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

uninterruptibleCancel :: Async ( ReaderT r m) a -> ReaderT r m () Source #

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

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

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

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

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

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

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

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

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

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

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

race_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () Source #

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

concurrently_ :: ReaderT r m a -> ReaderT r m b -> ReaderT r m () Source #

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

linkTo :: ( MonadAsync m, MonadFork m, MonadMask m) => ThreadId m -> Async m a -> m () Source #

Generalizion of link that links an async to an arbitrary thread.

MonadST

class Monad m => MonadST (m :: Type -> Type ) where Source #

This class is for abstracting over stToIO which allows running ST actions in IO . In this case it is to allow running ST actions within another monad m .

The type of stToIO is:

stToIO : ST RealWorld a -> IO a

Abstracting over this is tricky because we need to not care about both the IO , and also the RealWorld .

A solution is to write an action that is given the liftST as an argument and where that action itself is polymorphic in the s parameter. This allows us to instantiate it with RealWorld in the IO case, and the local s in a case where we are embedding into another ST action.

Methods

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

Instances

Instances details
MonadST IO
Instance details

Defined in Control.Monad.Class.MonadST

Methods

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

MonadST ( ST s)
Instance details

Defined in Control.Monad.Class.MonadST

Methods

withLiftST :: ( forall s0. ( forall a. ST s0 a -> ST s a) -> b) -> b 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 #

MonadST m => MonadST ( ReaderT r m)
Instance details

Defined in Control.Monad.Class.MonadST

Methods

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

MonadTime

data DiffTime Source #

This is a length of time, as measured by a clock. Conversion functions will treat it as seconds. It has a precision of 10^-12 s.

Instances

Instances details
Enum DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Eq DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Fractional DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Data DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Methods

gfoldl :: ( forall d b. Data d => c (d -> b) -> d -> c b) -> ( forall g. g -> c g) -> DiffTime -> c DiffTime Source #

gunfold :: ( forall b r. Data b => c (b -> r) -> c r) -> ( forall r. r -> c r) -> Constr -> c DiffTime Source #

toConstr :: DiffTime -> Constr Source #

dataTypeOf :: DiffTime -> DataType Source #

dataCast1 :: Typeable t => ( forall d. Data d => c (t d)) -> Maybe (c DiffTime ) Source #

dataCast2 :: Typeable t => ( forall d e. ( Data d, Data e) => c (t d e)) -> Maybe (c DiffTime ) Source #

gmapT :: ( forall b. Data b => b -> b) -> DiffTime -> DiffTime Source #

gmapQl :: (r -> r' -> r) -> r -> ( forall d. Data d => d -> r') -> DiffTime -> r Source #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> ( forall d. Data d => d -> r') -> DiffTime -> r Source #

gmapQ :: ( forall d. Data d => d -> u) -> DiffTime -> [u] Source #

gmapQi :: Int -> ( forall d. Data d => d -> u) -> DiffTime -> u Source #

gmapM :: Monad m => ( forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

gmapMp :: MonadPlus m => ( forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

gmapMo :: MonadPlus m => ( forall d. Data d => d -> m d) -> DiffTime -> m DiffTime Source #

Num DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Ord DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Real DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

RealFrac DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

Show DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

NFData DiffTime
Instance details

Defined in Data.Time.Clock.Internal.DiffTime

NoThunks DiffTime
Instance details

Defined in NoThunks.Class

class Monad m => MonadMonotonicTime (m :: Type -> Type ) where Source #

Methods

getMonotonicTime :: m Time Source #

Time in a monotonic clock, with high precision. The epoch for this clock is arbitrary and does not correspond to any wall clock or calendar.

newtype Time Source #

A point in time in a monotonic clock.

The epoch for this clock is arbitrary and does not correspond to any wall clock or calendar, and is not guaranteed to be the same epoch across program runs. It is represented as the DiffTime from this arbitrary epoch.

Constructors

Time DiffTime

Instances

Instances details
Eq Time
Instance details

Defined in Control.Monad.Class.MonadTime

Ord Time
Instance details

Defined in Control.Monad.Class.MonadTime

Show Time
Instance details

Defined in Control.Monad.Class.MonadTime

Generic Time
Instance details

Defined in Control.Monad.Class.MonadTime

Associated Types

type Rep Time :: Type -> Type Source #

NoThunks Time Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

Condense Time Source #
Instance details

Defined in Ouroboros.Consensus.Util.Condense

SAct ( SuspendDecision Time ) ( Maybe ( PeerState m))

Action of SuspendDecision on Maybe PeerState . We use this action together with alter function.

Note: SuspendDecision does not act on PeerState , only the sub-semigroup generated by SuspendConsumer and SuspendPeer does.

Instance details

Defined in Ouroboros.Network.Subscription.PeerState

type Rep Time
Instance details

Defined in Control.Monad.Class.MonadTime

type Rep Time = D1 (' MetaData "Time" "Control.Monad.Class.MonadTime" "io-classes-0.2.0.0-Io7mkgM70BO80kViq0zOYI" ' True ) ( C1 (' MetaCons "Time" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 DiffTime )))

addTime :: DiffTime -> Time -> Time infixr 9 Source #

Add a duration to a point in time, giving another time.

diffTime :: Time -> Time -> DiffTime Source #

The time duration between two points in time (positive or negative).

MonadDelay

class Monad m => MonadDelay (m :: Type -> Type ) where Source #

Minimal complete definition

Nothing

MonadEventlog

class Monad m => MonadEventlog (m :: Type -> Type ) where Source #

Methods

traceEventIO :: String -> m () Source #

Emits a message to the eventlog, if eventlog profiling is available and enabled at runtime.

traceMarkerIO :: String -> m () Source #

Emits a marker to the eventlog, if eventlog profiling is available and enabled at runtime.

The String is the name of the marker. The name is just used in the profiling tools to help you keep clear which marker is which.

MonadEvaluate

NoThunks

class NoThunks a where Source #

Check a value for unexpected thunks

Minimal complete definition

Nothing

Methods

noThunks :: Context -> a -> IO ( Maybe ThunkInfo ) Source #

Check if the argument does not contain any unexpected thunks

For most datatypes, we should have that

noThunks ctxt x == Nothing

if and only if

checkContainsThunks x

For some datatypes however, some thunks are expected. For example, the internal fingertree Sequence might contain thunks (this is important for the asymptotic complexity of this data structure). However, we should still check that the values in the sequence don't contain any unexpected thunks.

This means that we need to traverse the sequence, which might force some of the thunks in the tree. In general, it is acceptable for noThunks to force such "expected thunks", as long as it always reports the unexpected thunks.

The default implementation of noThunks checks that the argument is in WHNF, and if so, adds the type into the context (using showTypeOf ), and calls wNoThunks . See ThunkInfo for a detailed discussion of the type context.

See also discussion of caveats listed for checkContainsThunks .

wNoThunks :: Context -> a -> IO ( Maybe ThunkInfo ) Source #

Check that the argument is in normal form, assuming it is in WHNF.

The context will already have been extended with the type we're looking at, so all that's left is to look at the thunks inside the type. The default implementation uses GHC Generics to do this.

showTypeOf :: Proxy a -> String Source #

Show type a (to add to the context)

We try hard to avoid Typeable constraints in this module: there are types with no Typeable instance but with a NoThunks instance (most important example are types such as ST s which rely on parametric polymorphism). By default we should therefore only show the "outer layer"; for example, if we have a type

Seq (ST s ())

then showTypeOf should just give Seq , leaving it up to the instance for ST to decide how to implement showTypeOf ; this keeps things compositional. The default implementation does precisely this using the metadata that GHC Generics provides.

For convenience, however, some of the deriving via newtype wrappers we provide do depend on Typeable ; see below.

Instances

Instances details
NoThunks Bool
Instance details

Defined in NoThunks.Class

NoThunks Char
Instance details

Defined in NoThunks.Class

NoThunks Double
Instance details

Defined in NoThunks.Class

NoThunks Float
Instance details

Defined in NoThunks.Class

NoThunks Int
Instance details

Defined in NoThunks.Class

NoThunks Int8
Instance details

Defined in NoThunks.Class

NoThunks Int16
Instance details

Defined in NoThunks.Class

NoThunks Int32
Instance details

Defined in NoThunks.Class

NoThunks Int64
Instance details

Defined in NoThunks.Class

NoThunks Integer
Instance details

Defined in NoThunks.Class

NoThunks Natural
Instance details

Defined in NoThunks.Class

NoThunks Word
Instance details

Defined in NoThunks.Class

NoThunks Word8
Instance details

Defined in NoThunks.Class

NoThunks Word16
Instance details

Defined in NoThunks.Class

NoThunks Word32
Instance details

Defined in NoThunks.Class

NoThunks Word64
Instance details

Defined in NoThunks.Class

NoThunks CallStack

Since CallStacks can't retain application data, we don't want to check them for thunks at all

Instance details

Defined in NoThunks.Class

NoThunks ()
Instance details

Defined in NoThunks.Class

NoThunks ByteString

Instance for string bytestrings

Strict bytestrings shouldn't contain any thunks, but could, due to https://gitlab.haskell.org/ghc/ghc/issues/17290 . However, such thunks can't retain any data that they shouldn't, and so it's safe to ignore such thunks.

Instance details

Defined in NoThunks.Class

NoThunks ByteString

Instance for lazy bytestrings

Defined manually so that it piggy-backs on the one for strict bytestrings.

Instance details

Defined in NoThunks.Class

NoThunks UTCTime
Instance details

Defined in NoThunks.Class

NoThunks Text
Instance details

Defined in NoThunks.Class

NoThunks Text
Instance details

Defined in NoThunks.Class

NoThunks Void
Instance details

Defined in NoThunks.Class

NoThunks ShortByteString

Instance for short bytestrings

We have

data ShortByteString = SBS ByteArray#

Values of this type consist of a tag followed by an _unboxed_ byte array, which can't contain thunks. Therefore we only check WHNF.

Instance details

Defined in NoThunks.Class

NoThunks Seed
Instance details

Defined in Cardano.Crypto.Seed

NoThunks SystemStart
Instance details

Defined in Cardano.Slotting.Time

NoThunks RelativeTime
Instance details

Defined in Cardano.Slotting.Time

NoThunks SlotLength
Instance details

Defined in Cardano.Slotting.Time

NoThunks SlotNo
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochNo
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochSize
Instance details

Defined in Cardano.Slotting.Slot

NoThunks BlockNo
Instance details

Defined in Cardano.Slotting.Block

NoThunks DiffTime
Instance details

Defined in NoThunks.Class

NoThunks NominalDiffTime
Instance details

Defined in NoThunks.Class

NoThunks Time Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

NoThunks MaxSlotNo
Instance details

Defined in Ouroboros.Network.Block

NoThunks NetworkMagic
Instance details

Defined in Ouroboros.Network.Magic

NoThunks ZonedTime
Instance details

Defined in NoThunks.Class

NoThunks TimeLocale
Instance details

Defined in NoThunks.Class

NoThunks LocalTime
Instance details

Defined in NoThunks.Class

NoThunks TimeOfDay
Instance details

Defined in NoThunks.Class

NoThunks TimeZone
Instance details

Defined in NoThunks.Class

NoThunks UniversalTime
Instance details

Defined in NoThunks.Class

NoThunks Day
Instance details

Defined in NoThunks.Class

NoThunks SecurityParam Source #
Instance details

Defined in Ouroboros.Consensus.Config.SecurityParam

NoThunks TriggerHardFork Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Simple

NoThunks DiskPolicy Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.DiskPolicy

NoThunks PrettyCallStack Source #
Instance details

Defined in Ouroboros.Consensus.Util.CallStack

NoThunks FsPath Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.API.Types

NoThunks CRC Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.CRC

NoThunks PBftMockVerKeyHash Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT.Crypto

NoThunks CoreNodeId Source #
Instance details

Defined in Ouroboros.Consensus.NodeId

NoThunks NodeId Source #
Instance details

Defined in Ouroboros.Consensus.NodeId

NoThunks IsEBB Source #
Instance details

Defined in Ouroboros.Consensus.Block.EBB

NoThunks PrefixLen Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Common

NoThunks BlockOffset Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Types

NoThunks BlockSize Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Types

NoThunks LeaderSchedule Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.LeaderSchedule

NoThunks MempoolCapacityBytes Source #
Instance details

Defined in Ouroboros.Consensus.Mempool.API

NoThunks TicketNo Source #
Instance details

Defined in Ouroboros.Consensus.Mempool.TxSeq

NoThunks SafeZone Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.EraParams

NoThunks EraParams Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.EraParams

NoThunks RelativeSlot Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Internal

NoThunks ChunkNo Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Internal

NoThunks ChunkSize Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Internal

NoThunks ChunkInfo Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Internal

NoThunks NumCoreNodes Source #
Instance details

Defined in Ouroboros.Consensus.Node.ProtocolInfo

NoThunks BftValidationErr Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

NoThunks BftParams Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

NoThunks BlockOrEBB Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types

NoThunks ChunkSlot Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Chunks.Layout

NoThunks PrimaryIndex Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Primary

NoThunks BlockSize Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Secondary

NoThunks HeaderSize Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Secondary

NoThunks HeaderOffset Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Secondary

NoThunks BlockOffset Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Secondary

NoThunks EraEnd Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Summary

NoThunks EraSummary Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Summary

NoThunks Bound Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Summary

NoThunks TransitionInfo Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types

NoThunks Past Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.State.Types

NoThunks Fingerprint Source #
Instance details

Defined in Ouroboros.Consensus.Util.STM

NoThunks CurrentSlot Source #
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.API

NoThunks FollowerKey Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

NoThunks IteratorKey Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

NoThunks ScheduledGc Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Background

NoThunks PBftParams Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

NoThunks PBftSignatureThreshold Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

NoThunks PBftSelectView Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

NoThunks a => NoThunks [a]
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( Maybe a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( Ratio a)
Instance details

Defined in NoThunks.Class

NoThunks ( IO a)

We do not check IO actions for captured thunks by default

See instance for (a -> b) for detailed discussion.

Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( TVar a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( IORef a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( MVar a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( NonEmpty a)
Instance details

Defined in NoThunks.Class

NoThunks ( PinnedSizedBytes n)
Instance details

Defined in Cardano.Crypto.PinnedSizedBytes

NoThunks ( SigDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

NoThunks ( SigDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

NoThunks ( SigDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

NoThunks ( SigDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

NoThunks ( SigDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

NoThunks ( SigDSIGN NeverDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.NeverUsed

NoThunks ( SignKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

NoThunks ( SignKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

NoThunks ( SignKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

NoThunks ( SignKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

NoThunks ( SignKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

NoThunks ( SignKeyDSIGN NeverDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.NeverUsed

NoThunks ( VerKeyDSIGN Ed25519DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed25519

NoThunks ( VerKeyDSIGN SchnorrSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.SchnorrSecp256k1

NoThunks ( VerKeyDSIGN MockDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Mock

NoThunks ( VerKeyDSIGN EcdsaSecp256k1DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.EcdsaSecp256k1

NoThunks ( VerKeyDSIGN Ed448DSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.Ed448

NoThunks ( VerKeyDSIGN NeverDSIGN )
Instance details

Defined in Cardano.Crypto.DSIGN.NeverUsed

KESAlgorithm d => NoThunks ( SigKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => NoThunks ( SigKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

DSIGNAlgorithm d => NoThunks ( SigKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

KESAlgorithm d => NoThunks ( SigKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => NoThunks ( SigKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

NoThunks ( SigKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

NoThunks ( SigKES NeverKES )
Instance details

Defined in Cardano.Crypto.KES.NeverUsed

KESAlgorithm d => NoThunks ( SignKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => NoThunks ( SignKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

DSIGNAlgorithm d => NoThunks ( SignKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

KESAlgorithm d => NoThunks ( SignKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => NoThunks ( SignKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

NoThunks ( SignKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

NoThunks ( SignKeyKES NeverKES )
Instance details

Defined in Cardano.Crypto.KES.NeverUsed

OptimizedKESAlgorithm d => NoThunks ( VerKeyKES ( CompactSumKES h d))
Instance details

Defined in Cardano.Crypto.KES.CompactSum

DSIGNAlgorithm d => NoThunks ( VerKeyKES ( CompactSingleKES d))
Instance details

Defined in Cardano.Crypto.KES.CompactSingle

DSIGNAlgorithm d => NoThunks ( VerKeyKES ( SimpleKES d t))
Instance details

Defined in Cardano.Crypto.KES.Simple

KESAlgorithm d => NoThunks ( VerKeyKES ( SumKES h d))
Instance details

Defined in Cardano.Crypto.KES.Sum

DSIGNAlgorithm d => NoThunks ( VerKeyKES ( SingleKES d))
Instance details

Defined in Cardano.Crypto.KES.Single

NoThunks ( VerKeyKES ( MockKES t))
Instance details

Defined in Cardano.Crypto.KES.Mock

NoThunks ( VerKeyKES NeverKES )
Instance details

Defined in Cardano.Crypto.KES.NeverUsed

NoThunks ( PackedBytes n)
Instance details

Defined in Cardano.Crypto.PackedBytes

NoThunks a => NoThunks ( Set a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( Seq a)

Instance for Seq checks elements only

The internal fingertree in Seq might have thunks, which is essential for its asymptotic complexity.

Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( IntMap a)
Instance details

Defined in NoThunks.Class

NoThunks ( EpochInfo m)
Instance details

Defined in Cardano.Slotting.EpochInfo.API

NoThunks t => NoThunks ( WithOrigin t)
Instance details

Defined in Cardano.Slotting.Slot

Typeable a => NoThunks ( OnlyCheckWhnf a)
Instance details

Defined in NoThunks.Class

NoThunks ( AllowThunk a)
Instance details

Defined in NoThunks.Class

Typeable a => NoThunks ( InspectHeap a)
Instance details

Defined in NoThunks.Class

StandardHash block => NoThunks ( Anchor block)
Instance details

Defined in Ouroboros.Network.AnchoredFragment

( StandardHash block, Typeable block) => NoThunks ( ChainHash block)
Instance details

Defined in Ouroboros.Network.Block

StandardHash block => NoThunks ( Point block)
Instance details

Defined in Ouroboros.Network.Block

StandardHash b => NoThunks ( Tip b)
Instance details

Defined in Ouroboros.Network.Block

Typeable addr => NoThunks ( ConnectionId addr)
Instance details

Defined in Ouroboros.Network.ConnectionId

NoThunks a => NoThunks ( StrictSeq a)

Instance for StrictSeq checks elements only

The internal fingertree in Seq might have thunks, which is essential for its asymptotic complexity.

Instance details

Defined in Data.Sequence.Strict

NoThunks a => NoThunks ( StrictMaybe a)
Instance details

Defined in Data.Maybe.Strict

NoThunks ( Vector a)

Unboxed vectors can't contain thunks

Implementation note: defined manually rather than using OnlyCheckWhnf due to ghc limitation in deriving via, making it impossible to use with it with data families.

Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( Vector a)
Instance details

Defined in NoThunks.Class

NoThunks ( SystemTime m) Source #
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

NoThunks ( LedgerEraInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Info

NoThunks ( SingleEraInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Info

NoThunks ( Ticked ( LedgerState ( DualBlock m a))) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( Ticked ( LedgerState ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

NoThunks ( Handle h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.API.Types

NoThunks ( SomeHasFS m) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.API

NoThunks ( Header ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( Header ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

( NoThunks ( StorageConfig m), NoThunks ( StorageConfig a)) => NoThunks ( StorageConfig ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( StorageConfig ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

( NoThunks ( CodecConfig m), NoThunks ( CodecConfig a)) => NoThunks ( CodecConfig ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( CodecConfig ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks ( BlockConfig ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( BlockConfig ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

ConsensusProtocol p => NoThunks ( ConsensusConfig ( ModChainSel p s)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.ModChainSel

BftCrypto c => NoThunks ( ConsensusConfig ( Bft c)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

CanHardFork xs => NoThunks ( ConsensusConfig ( HardForkProtocol xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks ( ConsensusConfig ( PBft c)) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

NoThunks ( LedgerState ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( LedgerState ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

NoThunks ( Validated ( GenTx ( DualBlock m a))) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( Validated ( GenTx ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

( ConsensusProtocol ( BlockProtocol blk), NoThunks ( LedgerConfig blk), NoThunks ( BlockConfig blk), NoThunks ( CodecConfig blk), NoThunks ( StorageConfig blk)) => NoThunks ( TopLevelConfig blk) Source #
Instance details

Defined in Ouroboros.Consensus.Config

( StandardHash blk, Typeable blk) => NoThunks ( RealPoint blk) Source #
Instance details

Defined in Ouroboros.Consensus.Block.RealPoint

NoThunks ( TxId ( GenTx ( DualBlock m a))) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( TxId ( GenTx ( HardForkBlock xs))) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

NoThunks ( GenTx ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

CanHardFork xs => NoThunks ( GenTx ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Mempool

( StandardHash blk, Typeable blk) => NoThunks ( StreamTo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Common

( StandardHash blk, Typeable blk) => NoThunks ( StreamFrom blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Common

( StandardHash blk, Typeable blk) => NoThunks ( BlockInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.API

( StandardHash blk, Typeable blk) => NoThunks ( InternalBlockInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Types

NoThunks tx => NoThunks ( TxSeq tx) Source #
Instance details

Defined in Ouroboros.Consensus.Mempool.TxSeq

NoThunks tx => NoThunks ( TxTicket tx) Source #
Instance details

Defined in Ouroboros.Consensus.Mempool.TxSeq

StandardHash blk => NoThunks ( TipInfoIsEBB blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

( BlockSupportsProtocol blk, ValidateEnvelope blk, Typeable blk) => NoThunks ( HeaderError blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

( ValidateEnvelope blk, Typeable blk) => NoThunks ( HeaderEnvelopeError blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

( BlockSupportsProtocol blk, HasAnnTip blk) => NoThunks ( HeaderState blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

HasAnnTip blk => NoThunks ( AnnTip blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderValidation

( NoThunks ( Validated ( GenTx blk)), NoThunks ( GenTxId blk), NoThunks ( Ticked ( LedgerState blk)), StandardHash blk, Typeable blk) => NoThunks ( InternalState blk) Source #
Instance details

Defined in Ouroboros.Consensus.Mempool.Impl.Types

NoThunks ( ValidationErr ( BlockProtocol blk)) => NoThunks ( WrapValidationErr blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( SelectView ( BlockProtocol blk)) => NoThunks ( WrapSelectView blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( ChainDepState ( BlockProtocol blk)) => NoThunks ( WrapChainDepState blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( Validated ( GenTx blk)) => NoThunks ( WrapValidatedGenTx blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( TipInfo blk) => NoThunks ( WrapTipInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( LedgerError blk) => NoThunks ( WrapLedgerErr blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( GenTxId blk) => NoThunks ( WrapGenTxId blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

NoThunks ( OtherHeaderEnvelopeError blk) => NoThunks ( WrapEnvelopeErr blk) Source #
Instance details

Defined in Ouroboros.Consensus.TypeFamilyWrappers

StandardHash blk => NoThunks ( FileInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.FileInfo

StandardHash blk => NoThunks ( Index blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.Index

( ConsensusProtocol ( BlockProtocol blk), NoThunks ( BlockConfig blk), NoThunks ( CodecConfig blk), NoThunks ( LedgerConfig blk), NoThunks ( StorageConfig blk)) => NoThunks ( ExtLedgerCfg blk) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

LedgerSupportsProtocol blk => NoThunks ( ExtValidationError blk) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

LedgerSupportsProtocol blk => NoThunks ( ExtLedgerState blk) Source #

We override showTypeOf to show the type of the block

This makes debugging a bit easier, as the block gets used to resolve all kinds of type families.

Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

( BlockSupportsProtocol blk, HasAnnTip blk) => NoThunks ( HeaderStateHistory blk) Source #
Instance details

Defined in Ouroboros.Consensus.HeaderStateHistory

IOLike m => NoThunks ( ResourceKey m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

IOLike m => NoThunks ( ResourceRegistry m) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

StandardHash blk => NoThunks ( Tip blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.API

NoThunks a => NoThunks ( WithBlockSize a) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Types

StandardHash blk => NoThunks ( Entry blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index.Secondary

NoThunks ( Shape xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Summary

NoThunks ( Summary xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.History.Summary

NoThunks ( PartialConsensusConfig ( BlockProtocol blk)) => NoThunks ( WrapPartialConsensusConfig blk) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.PartialConfig

NoThunks ( PartialLedgerConfig blk) => NoThunks ( WrapPartialLedgerConfig blk) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.PartialConfig

NoThunks ( EraTranslation xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Translation

NoThunks a => NoThunks ( WithFingerprint a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.STM

NoThunks ( BlockchainTime m) Source #
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.API

NoThunks ( SelectView ( BlockProtocol blk)) => NoThunks ( TentativeState blk) Source #
Instance details

Defined in Ouroboros.Consensus.Util.TentativeState

NoThunks ( InvalidBlockPunishment m) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API.Types.InvalidBlockPunishment

NoThunks ( LedgerCfg l) => NoThunks ( LedgerDbCfg l) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

NoThunks l => NoThunks ( LedgerDB l) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

LedgerSupportsProtocol blk => NoThunks ( InvalidBlockReason blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

CanHardFork xs => NoThunks ( MismatchEraInfo xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraValidationErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraValidatedGenTx xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraTipInfo xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraSelectView xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraHeader xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraGenTxId xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraGenTx xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( OneEraEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( PerEraStorageConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( PerEraLedgerConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( PerEraConsensusConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( PerEraCodecConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( PerEraBlockConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

CanHardFork xs => NoThunks ( HardForkLedgerConfig xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

CanHardFork xs => NoThunks ( HardForkValidationErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol

CanHardFork xs => NoThunks ( HardForkEnvelopeErr xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

CanHardFork xs => NoThunks ( HardForkLedgerError xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger

LedgerSupportsProtocol blk => NoThunks ( InvalidBlockInfo blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

StandardHash blk => NoThunks ( FollowerRollState blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

NoThunks a => NoThunks ( Our a) Source #
Instance details

Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Client

NoThunks a => NoThunks ( Their a) Source #
Instance details

Defined in Ouroboros.Consensus.MiniProtocol.ChainSync.Client

PBftCrypto c => NoThunks ( PBftSigner c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT.State

PBftCrypto c => NoThunks ( PBftState c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT.State

PBftCrypto c => NoThunks ( PBftCannotForge c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => NoThunks ( PBftValidationErr c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => NoThunks ( PBftIsLeader c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => NoThunks ( PBftCanBeLeader c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

PBftCrypto c => NoThunks ( PBftLedgerView c) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

NoThunks (a -> b)

We do NOT check function closures for captured thunks by default

Since we have no type information about the values captured in a thunk, the only check we could possibly do is checkContainsThunks : we can't recursively call noThunks on those captured values, which is problematic if any of those captured values requires a custom instance (for example, data types that depend on laziness, such as Seq ).

By default we therefore only check if the function is in WHNF, and don't check the captured values at all. If you want a stronger check, you can use InspectHeap (a -> b) instead.

Instance details

Defined in NoThunks.Class

( NoThunks a, NoThunks b) => NoThunks ( Either a b)
Instance details

Defined in NoThunks.Class

( NoThunks a, NoThunks b) => NoThunks (a, b)
Instance details

Defined in NoThunks.Class

( NoThunks k, NoThunks v) => NoThunks ( Map k v)
Instance details

Defined in NoThunks.Class

( NoThunks k, NoThunks v) => NoThunks ( Bimap k v) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

NoThunks ( Decoder s a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

( NoThunks b, NoThunks a) => NoThunks ( Annotated b a)
Instance details

Defined in Cardano.Binary.Annotated

DSIGNAlgorithm v => NoThunks ( SignedDSIGN v a)
Instance details

Defined in Cardano.Crypto.DSIGN.Class

KESAlgorithm v => NoThunks ( SignedKES v a)
Instance details

Defined in Cardano.Crypto.KES.Class

NoThunks ( Hash h a)
Instance details

Defined in Cardano.Crypto.Hash.Class

NoThunks ( Tracer m ev) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

KnownSymbol name => NoThunks ( OnlyCheckWhnfNamed name a)
Instance details

Defined in NoThunks.Class

(HasFields s a, Generic a, Typeable a, GWNoThunks s ( Rep a)) => NoThunks ( AllowThunksIn s a)
Instance details

Defined in NoThunks.Class

KnownSymbol name => NoThunks ( InspectHeapNamed name a)
Instance details

Defined in NoThunks.Class

NoThunks a => NoThunks ( StrictTVar IO a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

( NoThunks slot, NoThunks hash) => NoThunks ( Block slot hash)
Instance details

Defined in Ouroboros.Network.Point

( NoThunks p, NoThunks v, Ord p) => NoThunks ( IntPSQ p v) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

NoThunks a => NoThunks ( StrictFingerTree v a)
Instance details

Defined in Data.FingerTree.Strict

( NoThunks txid, NoThunks tx) => NoThunks (ServerState txid tx)
Instance details

Defined in Ouroboros.Network.TxSubmission.Inbound

( Typeable f, Typeable blk) => NoThunks ( SomeSecond ( NestedCtxt f) blk) Source #

We can write a manual instance using the following quantified constraint:

forall a. NoThunks (f blk a)

However, this constraint would have to be propagated all the way up, which is rather verbose and annoying (standalone deriving has to be used), hence we use InspectHeap for convenience.

Instance details

Defined in Ouroboros.Consensus.Block.NestedContent

NoThunks ( HasFS m h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.FS.API

NoThunks a => NoThunks ( StrictMVar IO a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.MonadSTM.StrictMVar

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

Defined in Ouroboros.Consensus.Util.EarlyExit

NoThunks ( VolatileDB m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.API

( BftCrypto c, Typeable toSign) => NoThunks ( BftFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.BFT

NoThunks ( Thread m a) Source #
Instance details

Defined in Ouroboros.Consensus.Util.ResourceRegistry

( StandardHash blk, Typeable blk) => NoThunks ( OpenState blk h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.State

( StandardHash blk, Typeable blk) => NoThunks ( InternalState blk h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.VolatileDB.Impl.State

NoThunks ( ImmutableDB m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.API

NoThunks (f blk) => NoThunks ( Current f blk) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.State.Instances

( All SingleEraBlock xs, forall blk. SingleEraBlock blk => NoThunks (f blk)) => NoThunks ( HardForkState f xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.State.Instances

NoThunks ( CheckInFuture m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Fragment.InFuture

NoThunks ( DualLedgerConfig m a) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks ( DualLedgerError m a) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

NoThunks ( OneEraHash xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.AcrossEras

( IOLike m, LedgerSupportsProtocol blk) => NoThunks ( LgrDB m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.LgrDB

NoThunks ( BlocksToAdd m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

NoThunks ( FollowerHandle m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( IOLike m, LedgerSupportsProtocol blk) => NoThunks ( ChainDbEnv m blk) Source #

We include blk in showTypeOf because it helps resolving type families (but avoid including m because we cannot impose Typeable m as a constraint and still have it work with the simulator)

Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( IOLike m, LedgerSupportsProtocol blk) => NoThunks ( ChainDbState m blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( PBftCrypto c, Typeable toSign) => NoThunks ( PBftFields c toSign) Source #
Instance details

Defined in Ouroboros.Consensus.Protocol.PBFT

( NoThunks a, NoThunks b, NoThunks c) => NoThunks (a, b, c)
Instance details

Defined in NoThunks.Class

( NoThunks a, NoThunks b) => NoThunks ( AnchoredSeq v a b)
Instance details

Defined in Ouroboros.Network.AnchoredSeq

NoThunks a => NoThunks ( K a b) Source #
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

All ( Compose NoThunks f) xs => NoThunks ( NS f xs) Source #
Instance details

Defined in Data.SOP.Strict

All ( Compose NoThunks f) xs => NoThunks ( NP f xs) Source #
Instance details

Defined in Data.SOP.Strict

NoThunks b => NoThunks (MeasuredWith v a b)
Instance details

Defined in Ouroboros.Network.AnchoredSeq

NoThunks ( Iterator m blk b) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.API

NoThunks ( Index m blk h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.Index

StandardHash blk => NoThunks ( OpenState m blk h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.State

StandardHash blk => NoThunks ( InternalState m blk h) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ImmutableDB.Impl.State

NoThunks (f a) => NoThunks ( WithBlockNo f a) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Protocol.ChainSel

( All SingleEraBlock xs, forall x. SingleEraBlock x => NoThunks (f x), KnownSymbol name) => NoThunks ( LiftNamedNP name f xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.DerivingVia

( All SingleEraBlock xs, forall x. SingleEraBlock x => NoThunks (f x), KnownSymbol name) => NoThunks ( LiftNamedNS name f xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.DerivingVia

StandardHash blk => NoThunks ( FollowerState m blk b) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.Impl.Types

( NoThunks a, NoThunks b, NoThunks c, NoThunks d) => NoThunks (a, b, c, d)
Instance details

Defined in NoThunks.Class

( All ( Compose NoThunks g) xs, All ( Compose NoThunks f) xs) => NoThunks ( Telescope g f xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.Telescope

( All ( Compose NoThunks f) xs, All ( Compose NoThunks g) xs) => NoThunks ( Mismatch f g xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.Match

( All SingleEraBlock xs, forall x. SingleEraBlock x => NoThunks (f x), forall x. SingleEraBlock x => NoThunks (g x), KnownSymbol name) => NoThunks ( LiftNamedMismatch name f g xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.DerivingVia

( All SingleEraBlock xs, forall x. SingleEraBlock x => NoThunks (f x), forall x. SingleEraBlock x => NoThunks (g x), KnownSymbol name) => NoThunks ( LiftNamedTelescope name f g xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Util.DerivingVia

( NoThunks a, NoThunks b, NoThunks c, NoThunks d, NoThunks e) => NoThunks (a, b, c, d, e)
Instance details

Defined in NoThunks.Class

NoThunks ( Ticked (f a)) => NoThunks (( Ticked :.: f) a) Source #
Instance details

Defined in Ouroboros.Consensus.Ticked

( NoThunks a, NoThunks b, NoThunks c, NoThunks d, NoThunks e, NoThunks f) => NoThunks (a, b, c, d, e, f)
Instance details

Defined in NoThunks.Class

( NoThunks a, NoThunks b, NoThunks c, NoThunks d, NoThunks e, NoThunks f, NoThunks g) => NoThunks (a, b, c, d, e, f, g)
Instance details

Defined in NoThunks.Class