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

Ouroboros.Consensus.Util.DepPair

Synopsis

Dependent pairs

type DepPair = GenDepPair I Source #

Dependent pair

A dependent pair is a pair of values where the type of the value depends on the first value.

data GenDepPair g f where Source #

Generalization of DepPair

This adds an additional functor g around the second value in the pair.

Constructors

GenDepPair :: !(f a) -> !(g a) -> GenDepPair g f

Bundled Patterns

pattern DepPair :: f a -> a -> DepPair f

depPairFirst :: ( forall a. f a -> f' a) -> GenDepPair g f -> GenDepPair g f' Source #

Compare indices

class SameDepIndex f where Source #

Minimal complete definition

Nothing

Instances

Instances details
SameDepIndex QueryAnytime Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

SameDepIndex ( BlockQuery ( DualBlock m a)) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

All SingleEraBlock xs => SameDepIndex ( BlockQuery ( HardForkBlock xs)) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

SameDepIndex ( BlockQuery blk) => SameDepIndex ( Query blk) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Query

SameDepIndex ( QueryHardFork xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

All SingleEraBlock xs => SameDepIndex ( QueryIfCurrent xs) Source #
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Ledger.Query

SameDepIndex ( NestedCtxt_ blk f) => SameDepIndex ( NestedCtxt f blk) Source #
Instance details

Defined in Ouroboros.Consensus.Block.NestedContent

SameDepIndex ( NestedCtxt_ m f) => SameDepIndex ( NestedCtxt_ ( DualBlock m a) f) Source #
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

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

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Trivial dependency

Convenience re-exports

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

data (a :: k) :~: (b :: k) where infix 4 Source #

Propositional equality. If a :~: b is inhabited by some terminating value, then the type a is the same as the type b . To use this equality in practice, pattern-match on the a :~: b to get out the Refl constructor; in the body of the pattern-match, the compiler knows that a ~ b .

Since: base-4.7.0.0

Constructors

Refl :: forall k (a :: k). a :~: a

Instances

Instances details
TestEquality ( (:~:) a :: k -> Type )

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Methods

testEquality :: forall (a0 :: k0) (b :: k0). (a :~: a0) -> (a :~: b) -> Maybe (a0 :~: b) Source #

NFData2 ( (:~:) :: Type -> Type -> Type )

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> (a :~: b) -> () Source #

NFData1 ( (:~:) a)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> (a :~: a0) -> () Source #

a ~ b => Bounded (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

a ~ b => Enum (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Eq (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Ord (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

a ~ b => Read (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

Show (a :~: b)

Since: base-4.7.0.0

Instance details

Defined in Data.Type.Equality

NFData (a :~: b)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: (a :~: b) -> () Source #