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

Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Description

Witness isomorphism between b and HardForkBlock '[b]

Synopsis

Documentation

class Isomorphic f where Source #

Instances

Instances details
Isomorphic ChainHash Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic I Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic Header Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic StorageConfig Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic CodecConfig Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic BlockConfig Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic LedgerState Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic TopLevelConfig Source #

Projection/injection for TopLevelConfig

NOTE: We do not define one for LedgerConfig or ConsensusConfig , since we need the EraParams for their injections, which we can only derive if we have the top-level config.

Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic GenTx Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic ForgeStateUpdateInfo Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic HeaderState Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic AnnTip Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapLedgerView Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapIsLeader Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapChainDepState Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapCanBeLeader Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapValidatedGenTx Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapTipInfo Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapLedgerErr Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapHeaderHash Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapGenTxId Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapForgeStateUpdateError Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapForgeStateInfo Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapEnvelopeErr Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapCannotForge Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic WrapApplyTxErr Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic SerialisedHeader Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic ExtLedgerState Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic ProtocolClientInfo Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic ( SomeSecond ( NestedCtxt f)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Functor m => Isomorphic ( BlockForging m) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Functor m => Isomorphic ( ProtocolInfo m) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Functor m => Isomorphic ( InitChainDB m) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Isomorphic ((->) a :: Type -> Type ) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Methods

project :: NoHardForks blk => (a -> HardForkBlock '[blk]) -> a -> blk Source #

inject :: NoHardForks blk => (a -> blk) -> a -> HardForkBlock '[blk] Source #

Isomorphic ( Ticked :.: LedgerState ) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

inject' :: forall proxy f x y blk. ( Isomorphic f, NoHardForks blk, Coercible x (f blk), Coercible y (f ( HardForkBlock '[blk]))) => proxy (f blk) -> x -> y Source #

project' :: forall proxy f x y blk. ( Isomorphic f, NoHardForks blk, Coercible x (f ( HardForkBlock '[blk])), Coercible y (f blk)) => proxy (f blk) -> x -> y Source #

Dependent types

injQuery :: BlockQuery b result -> BlockQuery ( HardForkBlock '[b]) ( HardForkQueryResult '[b] result) Source #

Inject BlockQuery

Not an instance of Isomorphic because the types change.

projQuery :: BlockQuery ( HardForkBlock '[b]) result -> ( forall result'. (result :~: HardForkQueryResult '[b] result') -> BlockQuery b result' -> a) -> a Source #

Project BlockQuery

Not an instance of Isomorphic because the types change.

Convenience exports

newtype I a Source #

The identity type functor.

Like Identity , but with a shorter name.

Constructors

I a

Instances

Instances details
Monad I
Instance details

Defined in Data.SOP.BasicFunctors

Functor I
Instance details

Defined in Data.SOP.BasicFunctors

Methods

fmap :: (a -> b) -> I a -> I b Source #

(<$) :: a -> I b -> I a Source #

Applicative I
Instance details

Defined in Data.SOP.BasicFunctors

Foldable I
Instance details

Defined in Data.SOP.BasicFunctors

Traversable I
Instance details

Defined in Data.SOP.BasicFunctors

Methods

traverse :: Applicative f => (a -> f b) -> I a -> f ( I b) Source #

sequenceA :: Applicative f => I (f a) -> f ( I a) Source #

mapM :: Monad m => (a -> m b) -> I a -> m ( I b) Source #

sequence :: Monad m => I (m a) -> m ( I a) Source #

Eq1 I

Since: sop-core-0.2.4.0

Instance details

Defined in Data.SOP.BasicFunctors

Methods

liftEq :: (a -> b -> Bool ) -> I a -> I b -> Bool Source #

Ord1 I

Since: sop-core-0.2.4.0

Instance details

Defined in Data.SOP.BasicFunctors

Read1 I

Since: sop-core-0.2.4.0

Instance details

Defined in Data.SOP.BasicFunctors

Show1 I

Since: sop-core-0.2.4.0

Instance details

Defined in Data.SOP.BasicFunctors

NFData1 I

Since: sop-core-0.2.5.0

Instance details

Defined in Data.SOP.BasicFunctors

Methods

liftRnf :: (a -> ()) -> I a -> () Source #

Isomorphic I Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Unary

Inject I Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Embed.Nary

DecodeDisk blk blk => DecodeDisk blk ( I blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

Methods

decodeDisk :: CodecConfig blk -> forall s. Decoder s ( I blk) Source #

( DecodeDiskDepIx f blk, DecodeDiskDep f blk) => DecodeDisk blk ( DepPair (f blk)) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

Methods

decodeDisk :: CodecConfig blk -> forall s. Decoder s ( DepPair (f blk)) Source #

EncodeDisk blk blk => EncodeDisk blk ( I blk) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

( EncodeDiskDepIx f blk, EncodeDiskDep f blk) => EncodeDisk blk ( DepPair (f blk)) Source #
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

SerialiseNodeToClient blk blk => SerialiseNodeToClient blk ( I blk) Source #
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

SerialiseNodeToNode blk blk => SerialiseNodeToNode blk ( I blk) Source #
Instance details

Defined in Ouroboros.Consensus.Node.Serialisation

Eq a => Eq ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

Ord a => Ord ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

Read a => Read ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

Show a => Show ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

Generic ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

Associated Types

type Rep ( I a) :: Type -> Type Source #

Semigroup a => Semigroup ( I a)

Since: sop-core-0.4.0.0

Instance details

Defined in Data.SOP.BasicFunctors

Monoid a => Monoid ( I a)

Since: sop-core-0.4.0.0

Instance details

Defined in Data.SOP.BasicFunctors

NFData a => NFData ( I a)

Since: sop-core-0.2.5.0

Instance details

Defined in Data.SOP.BasicFunctors

Methods

rnf :: I a -> () Source #

Condense a => Condense ( I a) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Condense

type Rep ( I a)
Instance details

Defined in Data.SOP.BasicFunctors

type Rep ( I a) = D1 (' MetaData "I" "Data.SOP.BasicFunctors" "sop-core-0.5.0.2-AIuTztJH91BC7RnRhk6DyL" ' True ) ( C1 (' MetaCons "I" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)))

data Proxy (t :: k) Source #

Proxy is a type that holds no data, but has a phantom parameter of arbitrary type (or even kind). Its use is to provide type information, even though there is no value available of that type (or it may be too costly to create one).

Historically, Proxy :: Proxy a is a safer alternative to the undefined :: a idiom.

>>> Proxy :: Proxy (Void, Int -> Int)
Proxy

Proxy can even hold types of higher kinds,

>>> Proxy :: Proxy Either
Proxy
>>> Proxy :: Proxy Functor
Proxy
>>> Proxy :: Proxy complicatedStructure
Proxy

Constructors

Proxy

Instances

Instances details
Generic1 ( Proxy :: k -> Type )

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Proxy :: k -> Type Source #

Methods

from1 :: forall (a :: k0). Proxy a -> Rep1 Proxy a Source #

to1 :: forall (a :: k0). Rep1 Proxy a -> Proxy a Source #

SemialignWithIndex Void ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

ZipWithIndex Void ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Methods

izipWith :: ( Void -> a -> b -> c) -> Proxy a -> Proxy b -> Proxy c Source #

RepeatWithIndex Void ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Monad ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Functor ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Applicative ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Foldable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Foldable

Traversable ( Proxy :: Type -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

MonadPlus ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Alternative ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Contravariant ( Proxy :: Type -> Type )
Instance details

Defined in Data.Functor.Contravariant

Eq1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool ) -> Proxy a -> Proxy b -> Bool Source #

Ord1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Read1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Show1 ( Proxy :: Type -> Type )

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

NFData1 ( Proxy :: Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Proxy a -> () Source #

Hashable1 ( Proxy :: Type -> Type )
Instance details

Defined in Data.Hashable.Class

Semialign ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Align ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Unalign ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Zip ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Repeat ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Unzip ( Proxy :: Type -> Type )
Instance details

Defined in Data.Semialign.Internal

Bounded ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Enum ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Eq ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ord ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Read ( Proxy t)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Show ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Ix ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Generic ( Proxy t)

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

Associated Types

type Rep ( Proxy t) :: Type -> Type Source #

Semigroup ( Proxy s)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Monoid ( Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Hashable ( Proxy a)
Instance details

Defined in Data.Hashable.Class

NFData ( Proxy a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Proxy a -> () Source #

Serialise ( Proxy a)

Since: serialise-0.2.0.0

Instance details

Defined in Codec.Serialise.Class

type Rep1 ( Proxy :: k -> Type )
Instance details

Defined in GHC.Generics

type Rep1 ( Proxy :: k -> Type ) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: k -> Type ))
type Rep ( Proxy t)
Instance details

Defined in GHC.Generics

type Rep ( Proxy t) = D1 (' MetaData "Proxy" "Data.Proxy" "base" ' False ) ( C1 (' MetaCons "Proxy" ' PrefixI ' False ) ( U1 :: Type -> Type ))