ouroboros-consensus-0.21.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellSafe-Inferred
LanguageHaskell2010

Test.Ouroboros.Consensus.ChainGenerator.Some

Contents

Description

Utilities that avoid repetition when declaring instances for types that are not amenable to deriving, and in particular, types with existential quantification.

For existentials that only quantify one type variable, this module's functionality is mostly superseded by the some Hackage package. However, this library involves many existentials that quantify multiple variables. That can be shoehorned into some with some encoding, but I believe this module's weight is preferable to the overhead of using that encoding in our existential data types' declarations.

Synopsis

Show

runShowsPrec ∷ ∀ a. NoFun "runShowsPrec" a (AbsError "runShowsPrec" a) ⇒ Int → ShowBuilder a → ShowS Source #

The context is satisfied by any type a that is manifestly apart from ->

showArgShow a ⇒ ShowBuilder (a → b) → a → ShowBuilder b infixl 1 Source #

showCtor ∷ a → String → ShowBuilder a Source #

showCtorProxy ∷ proxy a → String → ShowBuilder a Source #

Read

readPrecRead a ⇒ ReadPrec a #

Proposed replacement for readsPrec using new-style parsers (GHC only).

readArgRead a ⇒ ReadBuilder a Source #

readCtor ∷ a → String → ReadBuilder a Source #

runReadPrec ∷ ∀ a. NoFun "runReadPrec" a (AbsError "runReadPrec" a) ⇒ ReadBuilder a → ReadPrec a Source #

The context is satisfied by any type a that is manifestly apart from ->

Eq

data Forgotten a Source #

An opaque type that only allows for Eq and human inspection

Instances

Instances details
Show a ⇒ Show (Forgotten a) Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Some

Methods

showsPrecIntForgotten a → ShowS #

showForgotten a → String #

showList ∷ [Forgotten a] → ShowS #

Eq a ⇒ Eq (Forgotten a) Source # 
Instance details

Defined in Test.Ouroboros.Consensus.ChainGenerator.Some

Methods

(==)Forgotten a → Forgotten a → Bool #

(/=)Forgotten a → Forgotten a → Bool #