ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Block.Abstract

Synopsis

Protocol

type family BlockProtocol blk ∷ Type Source #

Map block to consensus protocol

Instances

Instances details
type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type BlockProtocol (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type BlockProtocol (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Configuration

data family BlockConfig blk ∷ Type Source #

Static configuration required to work with this type of blocks

Instances

Instances details
Isomorphic BlockConfig Source # 
Instance details

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

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

noThunks ∷ Context → BlockConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (DualBlock m a)) → String #

CanHardFork xs ⇒ NoThunks (BlockConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (BlockConfig (HardForkBlock xs)) → String #

newtype BlockConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data BlockConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family CodecConfig blk ∷ Type Source #

Static configuration required for serialisation and deserialisation of types pertaining to this type of block.

Data family instead of type family to get better type inference.

Instances

Instances details
Isomorphic CodecConfig Source # 
Instance details

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

Generic (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (CodecConfig (DualBlock m a)) ∷ TypeType Source #

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

noThunks ∷ Context → CodecConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (DualBlock m a)) → String #

CanHardFork xs ⇒ NoThunks (CodecConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → CodecConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (CodecConfig (HardForkBlock xs)) → String #

type Rep (CodecConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (CodecConfig (DualBlock m a)) = D1 ('MetaData "CodecConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DualCodecConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualCodecConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig m)) :*: S1 ('MetaSel ('Just "dualCodecConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (CodecConfig a))))
newtype CodecConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data CodecConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

data family StorageConfig blk ∷ Type Source #

Config needed for the NodeInitStorage class. Defined here to avoid circular dependencies.

Instances

Instances details
Isomorphic StorageConfig Source # 
Instance details

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

Generic (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Associated Types

type Rep (StorageConfig (DualBlock m a)) ∷ TypeType Source #

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

noThunks ∷ Context → StorageConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (DualBlock m a) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (DualBlock m a)) → String #

CanHardFork xs ⇒ NoThunks (StorageConfig (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

Methods

noThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → StorageConfig (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (StorageConfig (HardForkBlock xs)) → String #

type Rep (StorageConfig (DualBlock m a)) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type Rep (StorageConfig (DualBlock m a)) = D1 ('MetaData "StorageConfig" "Ouroboros.Consensus.Ledger.Dual" "ouroboros-consensus-0.1.0.0-inplace" 'False) (C1 ('MetaCons "DualStorageConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "dualStorageConfigMain") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig m)) :*: S1 ('MetaSel ('Just "dualStorageConfigAux") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StorageConfig a))))
newtype StorageConfig (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

data StorageConfig (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Previous hash

class (HasHeader blk, GetHeader blk) ⇒ GetPrevHash blk where Source #

Methods

headerPrevHashHeader blk → ChainHash blk Source #

Get the hash of the predecessor of this block

Instances

Instances details
CanHardFork xs ⇒ GetPrevHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Bridge m a ⇒ GetPrevHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

blockPrevHashGetPrevHash blk ⇒ blk → ChainHash blk Source #

Working with headers

class HasHeader (Header blk) ⇒ GetHeader blk where Source #

Methods

getHeader ∷ blk → Header blk Source #

blockMatchesHeaderHeader blk → blk → Bool Source #

Check whether the header is the header of the block.

For example, by checking whether the hash of the body stored in the header matches that of the block.

headerIsEBBHeader blk → Maybe EpochNo Source #

When the given header is the header of an Epoch Boundary Block, returns its epoch number.

data family Header blk ∷ Type Source #

Instances

Instances details
Isomorphic Header Source # 
Instance details

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

Methods

projectNoHardForks blk ⇒ Header (HardForkBlock '[blk]) → Header blk Source #

injectNoHardForks blk ⇒ Header blk → Header (HardForkBlock '[blk]) Source #

Inject Header Source # 
Instance details

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

Methods

inject ∷ ∀ x (xs ∷ [Type]). CanHardFork xs ⇒ Exactly xs BoundIndex xs x → Header x → Header (HardForkBlock xs) Source #

Typeable xs ⇒ ShowProxy (Header (HardForkBlock xs) ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs ⇒ HasNestedContent Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

SerialiseHFC xs ⇒ ReconstructNestedCtxt Header (HardForkBlock xs) Source # 
Instance details

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

(Typeable m, Typeable a) ⇒ ShowProxy (DualHeader m a ∷ Type) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showProxyProxy (DualHeader m a) → String Source #

HasNestedContent Header m ⇒ HasNestedContent Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

ReconstructNestedCtxt Header m ⇒ ReconstructNestedCtxt Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

All (Compose Eq Header) xs ⇒ Eq (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs ⇒ Show (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

CanHardFork xs ⇒ HasHeader (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

HasHeader blk ⇒ StandardHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

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

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

noThunks ∷ Context → Header (DualBlock m a) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header (DualBlock m a) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Header (DualBlock m a)) → String #

CanHardFork xs ⇒ NoThunks (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

Methods

noThunks ∷ Context → Header (HardForkBlock xs) → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Header (HardForkBlock xs) → IO (Maybe ThunkInfo) #

showTypeOfProxy (Header (HardForkBlock xs)) → String #

All CondenseConstraints xs ⇒ Condense (Header (HardForkBlock xs)) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Condense

SerialiseHFC xs ⇒ DecodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

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

Methods

decodeDiskDepCodecConfig (HardForkBlock xs) → NestedCtxt Header (HardForkBlock xs) a → ∀ s. Decoder s (ByteString → a) Source #

SerialiseHFC xs ⇒ DecodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

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

SerialiseHFC xs ⇒ EncodeDiskDep (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

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

Methods

encodeDiskDepCodecConfig (HardForkBlock xs) → NestedCtxt Header (HardForkBlock xs) a → a → Encoding Source #

SerialiseHFC xs ⇒ EncodeDiskDepIx (NestedCtxt Header) (HardForkBlock xs) Source # 
Instance details

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

SerialiseHFC xs ⇒ SerialiseNodeToNode (HardForkBlock xs) (Header (HardForkBlock xs)) Source # 
Instance details

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

EncodeDiskDep (NestedCtxt Header) m ⇒ EncodeDiskDep (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

encodeDiskDepCodecConfig (DualBlock m a) → NestedCtxt Header (DualBlock m a) a0 → a0 → Encoding Source #

EncodeDiskDepIx (NestedCtxt Header) m ⇒ EncodeDiskDepIx (NestedCtxt Header) (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Show (Header m) ⇒ Show (DualHeader m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

Methods

showsPrecIntDualHeader m a → ShowS Source #

showDualHeader m a → String Source #

showList ∷ [DualHeader m a] → ShowS Source #

Bridge m a ⇒ HasHeader (DualHeader m a) 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

All SingleEraBlock xs ⇒ Show (NestedCtxt_ (HardForkBlock xs) Header a) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type HeaderHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
newtype Header (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

type BlockProtocol (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

newtype Header (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

blockToIsEBBGetHeader blk ⇒ blk → IsEBB Source #

getBlockHeaderFieldsGetHeader blk ⇒ blk → HeaderFields blk Source #

Get the HeaderFields of a block, without requiring 'HasHeader blk'

This is primarily useful as a a simple definition of HasHeader for block types:

instance HasHeader SomeBlock where
  getHeaderFields = getBlockHeaderFields

provided that there is a HasHeader instance for the header.

Unfortunately we cannot give a HasHeader instance once and for all; if we mapped from a header to a block instead we could do

instance HasHeader hdr => HasHeader (Block hdr) where
 ..

but we can't do that when we do things this way around.

headerHashHasHeader (Header blk) ⇒ Header blk → HeaderHash blk Source #

headerPointHasHeader (Header blk) ⇒ Header blk → Point blk Source #

Raw hash

class ConvertRawHash blk where Source #

Convert a hash from/to raw bytes

Variants of toRawHash and fromRawHash for ShortByteString are included. Override the default implementations to avoid an extra step in case the HeaderHash is a ShortByteString under the hood.

Minimal complete definition

hashSize, (toRawHash | toShortRawHash), (fromRawHash | fromShortRawHash)

Methods

toRawHash ∷ proxy blk → HeaderHash blk → ByteString Source #

Get the raw bytes from a hash

fromRawHash ∷ proxy blk → ByteStringHeaderHash blk Source #

Construct the hash from a raw hash

PRECONDITION: the bytestring's size must match hashSize

toShortRawHash ∷ proxy blk → HeaderHash blk → ShortByteString Source #

Variant of toRawHash for ShortByteString

fromShortRawHash ∷ proxy blk → ShortByteStringHeaderHash blk Source #

hashSize ∷ proxy blk → Word32 Source #

The size of the hash in number of bytes

decodeRawHashConvertRawHash blk ⇒ proxy blk → ∀ s. Decoder s (HeaderHash blk) Source #

encodeRawHashConvertRawHash blk ⇒ proxy blk → HeaderHash blk → Encoding Source #

Utilities for working with WithOrigin

succWithOrigin ∷ (Bounded t, Enum t) ⇒ WithOrigin t → t Source #

Return the successor of a WithOrigin value. Useful in combination with SlotNo and BlockNo.

Re-export basic definitions from ouroboros-network

data ChainHash b Source #

Constructors

GenesisHash 
BlockHash !(HeaderHash b) 

Instances

Instances details
Isomorphic ChainHash Source # 
Instance details

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

Methods

projectNoHardForks blk ⇒ ChainHash (HardForkBlock '[blk]) → ChainHash blk Source #

injectNoHardForks blk ⇒ ChainHash blk → ChainHash (HardForkBlock '[blk]) Source #

StandardHash block ⇒ Eq (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==)ChainHash block → ChainHash block → Bool Source #

(/=)ChainHash block → ChainHash block → Bool Source #

StandardHash block ⇒ Ord (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

compareChainHash block → ChainHash block → Ordering Source #

(<)ChainHash block → ChainHash block → Bool Source #

(<=)ChainHash block → ChainHash block → Bool Source #

(>)ChainHash block → ChainHash block → Bool Source #

(>=)ChainHash block → ChainHash block → Bool Source #

maxChainHash block → ChainHash block → ChainHash block Source #

minChainHash block → ChainHash block → ChainHash block Source #

StandardHash block ⇒ Show (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrecIntChainHash block → ShowS Source #

showChainHash block → String Source #

showList ∷ [ChainHash block] → ShowS Source #

Generic (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (ChainHash b) ∷ TypeType Source #

Methods

fromChainHash b → Rep (ChainHash b) x Source #

toRep (ChainHash b) x → ChainHash b Source #

Serialise (HeaderHash b) ⇒ Serialise (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

Methods

encodeChainHash b → Encoding #

decode ∷ Decoder s (ChainHash b) #

encodeList ∷ [ChainHash b] → Encoding #

decodeList ∷ Decoder s [ChainHash b] #

(StandardHash block, Typeable block) ⇒ NoThunks (ChainHash block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

noThunks ∷ Context → ChainHash block → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → ChainHash block → IO (Maybe ThunkInfo) #

showTypeOfProxy (ChainHash block) → String #

Condense (HeaderHash b) ⇒ Condense (ChainHash b) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condenseChainHash b → String Source #

type Rep (ChainHash b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (ChainHash b) = D1 ('MetaData "ChainHash" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-inplace" 'False) (C1 ('MetaCons "GenesisHash" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "BlockHash" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (HeaderHash b))))

class (StandardHash b, Typeable b) ⇒ HasHeader b where Source #

Abstract over the shape of blocks (or indeed just block headers)

data HeaderFields b Source #

Header fields we expect to be present in a block

These fields are lazy because they are extracted from a block or block header; this type is not intended for storage.

Constructors

HeaderFields 

Fields

Instances

Instances details
StandardHash b ⇒ Eq (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b ⇒ Ord (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b ⇒ Show (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Generic (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (HeaderFields b) ∷ TypeType Source #

(StandardHash b, Typeable b) ⇒ HasHeader (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash b ⇒ StandardHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Serialise (HeaderHash b) ⇒ Serialise (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

Methods

encodeHeaderFields b → Encoding #

decode ∷ Decoder s (HeaderFields b) #

encodeList ∷ [HeaderFields b] → Encoding #

decodeList ∷ Decoder s [HeaderFields b] #

type Rep (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (HeaderFields b) = D1 ('MetaData "HeaderFields" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-inplace" 'False) (C1 ('MetaCons "HeaderFields" 'PrefixI 'True) (S1 ('MetaSel ('Just "headerFieldSlot") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SlotNo) :*: (S1 ('MetaSel ('Just "headerFieldBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 BlockNo) :*: S1 ('MetaSel ('Just "headerFieldHash") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (HeaderHash b)))))
type HeaderHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type family HeaderHash b Source #

Header hash

Instances

Instances details
type HeaderHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block) 
Instance details

Defined in Ouroboros.Network.Block

type HeaderHash (Serialised block) = HeaderHash block
type HeaderHash (Ticked l) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

type HeaderHash (Header blk) = HeaderHash blk
type HeaderHash (LedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Basics

type HeaderHash (SerialisedHeader blk) Source #

Only needed for the ChainSyncServer

Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

type HeaderHash (ExtLedgerState blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Extended

type HeaderHash (LedgerDB l) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.LedgerDB.InMemory

type HeaderHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Basics

type HeaderHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

type HeaderHash (WithPoint blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

type HeaderHash (WithPoint blk b) = HeaderHash blk

data Point block where Source #

A point on the chain is identified by its Slot and HeaderHash.

The Slot tells us where to look and the HeaderHash either simply serves as a check, or in some contexts it disambiguates blocks from different forks that were in the same slot.

It's a newtype rather than a type synonym, because using a type synonym would lead to ambiguity, since HeaderHash is a non-injective type family.

Bundled Patterns

pattern GenesisPointPoint block 
pattern BlockPointSlotNoHeaderHash block → Point block 

Instances

Instances details
StandardHash block ⇒ Eq (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

(==)Point block → Point block → Bool Source #

(/=)Point block → Point block → Bool Source #

StandardHash block ⇒ Ord (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

comparePoint block → Point block → Ordering Source #

(<)Point block → Point block → Bool Source #

(<=)Point block → Point block → Bool Source #

(>)Point block → Point block → Bool Source #

(>=)Point block → Point block → Bool Source #

maxPoint block → Point block → Point block Source #

minPoint block → Point block → Point block Source #

StandardHash block ⇒ Show (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showsPrecIntPoint block → ShowS Source #

showPoint block → String Source #

showList ∷ [Point block] → ShowS Source #

Generic (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Associated Types

type Rep (Point block) ∷ TypeType Source #

Methods

fromPoint block → Rep (Point block) x Source #

toRep (Point block) x → Point block Source #

Serialise (HeaderHash block) ⇒ Serialise (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

encodePoint block → Encoding #

decode ∷ Decoder s (Point block) #

encodeList ∷ [Point block] → Encoding #

decodeList ∷ Decoder s [Point block] #

StandardHash block ⇒ NoThunks (Point block) 
Instance details

Defined in Ouroboros.Network.Block

Methods

noThunks ∷ Context → Point block → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → Point block → IO (Maybe ThunkInfo) #

showTypeOfProxy (Point block) → String #

Condense (HeaderHash block) ⇒ Condense (Point block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

Methods

condensePoint block → String Source #

ShowProxy block ⇒ ShowProxy (Point block ∷ Type) 
Instance details

Defined in Ouroboros.Network.Block

Methods

showProxyProxy (Point block) → String Source #

type Rep (Point block) 
Instance details

Defined in Ouroboros.Network.Block

type Rep (Point block) = D1 ('MetaData "Point" "Ouroboros.Network.Block" "ouroboros-network-0.1.0.0-inplace" 'True) (C1 ('MetaCons "Point" 'PrefixI 'True) (S1 ('MetaSel ('Just "getPoint") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (WithOrigin (Block SlotNo (HeaderHash block))))))

class (Eq (HeaderHash b), Ord (HeaderHash b), Show (HeaderHash b), Typeable (HeaderHash b), NoThunks (HeaderHash b)) ⇒ StandardHash b Source #

StandardHash summarises the constraints we want header hashes to have

Without this class we would need to write

deriving instance Eq (HeaderHash block) => Eq (ChainHash block)`

That requires UndecidableInstances; not a problem by itself, but it also means that we can then not use deriving Eq anywhere else for datatypes that reference Hash, which is very frustrating; see

https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#inferred-context-for-deriving-clauses

Introducing the StandardHash class avoids this problem.

Having these constraints directly as part of the HasHeader class is possible but libraries that use the networking layer may wish to be able to talk about StandardHash independently of HasHeader since the latter may impose yet further constraints.

Instances

Instances details
StandardHash b ⇒ StandardHash (HeaderFields b) 
Instance details

Defined in Ouroboros.Network.Block

StandardHash block ⇒ StandardHash (Serialised block) 
Instance details

Defined in Ouroboros.Network.Block

HasHeader blk ⇒ StandardHash (Header blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.Abstract

StandardHash blk ⇒ StandardHash (SerialisedHeader blk) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.Serialisation

CanHardFork xs ⇒ StandardHash (HardForkBlock xs) Source # 
Instance details

Defined in Ouroboros.Consensus.HardFork.Combinator.Block

StandardHash m ⇒ StandardHash (DualBlock m a) Source # 
Instance details

Defined in Ouroboros.Consensus.Ledger.Dual

StandardHash blk ⇒ StandardHash (WithPoint blk b) Source # 
Instance details

Defined in Ouroboros.Consensus.Storage.ChainDB.API

blockNoHasHeader b ⇒ b → BlockNo Source #

blockPointHasHeader block ⇒ block → Point block Source #

pointHashPoint block → ChainHash block Source #

Re-export basic definitions from cardano-base

newtype BlockNo #

Constructors

BlockNo 

Fields

Instances

Instances details
Bounded BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Enum BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Eq BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

(==)BlockNoBlockNoBool Source #

(/=)BlockNoBlockNoBool Source #

Num BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Ord BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Show BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Generic BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Associated Types

type Rep BlockNoTypeType Source #

Methods

fromBlockNoRep BlockNo x Source #

toRep BlockNo x → BlockNo Source #

NFData BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

rnfBlockNo → () Source #

Serialise BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

encodeBlockNo → Encoding #

decode ∷ Decoder s BlockNo #

encodeList ∷ [BlockNo] → Encoding #

decodeList ∷ Decoder s [BlockNo] #

NoThunks BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

noThunks ∷ Context → BlockNoIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → BlockNoIO (Maybe ThunkInfo) #

showTypeOfProxy BlockNoString #

FromCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

fromCBOR ∷ Decoder s BlockNo

labelProxy BlockNoText

ToCBOR BlockNo 
Instance details

Defined in Cardano.Slotting.Block

Methods

toCBORBlockNo → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy BlockNo → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [BlockNo] → Size

Condense BlockNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condenseBlockNoString Source #

type Rep BlockNo 
Instance details

Defined in Cardano.Slotting.Block

type Rep BlockNo = D1 ('MetaData "BlockNo" "Cardano.Slotting.Block" "cardano-slotting-0.1.0.0-9daa3d4ae9892d2678b6d9ccd570dbf0b85c86d6e63e20e13aa1768a43e79820" 'True) (C1 ('MetaCons "BlockNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype EpochNo #

Constructors

EpochNo 

Fields

Instances

Instances details
Enum EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool Source #

(/=)EpochNoEpochNoBool Source #

Num EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Show EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNoTypeType Source #

Methods

fromEpochNoRep EpochNo x Source #

toRep EpochNo x → EpochNo Source #

NFData EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochNo → () Source #

Serialise EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

encodeEpochNo → Encoding #

decode ∷ Decoder s EpochNo #

encodeList ∷ [EpochNo] → Encoding #

decodeList ∷ Decoder s [EpochNo] #

NoThunks EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → EpochNoIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → EpochNoIO (Maybe ThunkInfo) #

showTypeOfProxy EpochNoString #

FromCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fromCBOR ∷ Decoder s EpochNo

labelProxy EpochNoText

ToCBOR EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochNo → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochNo → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochNo] → Size

FromJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser EpochNo

parseJSONList ∷ Value → Parser [EpochNo]

ToJSON EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONEpochNo → Value

toEncodingEpochNo → Encoding

toJSONList ∷ [EpochNo] → Value

toEncodingList ∷ [EpochNo] → Encoding

Condense EpochNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condenseEpochNoString Source #

type Rep EpochNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo = D1 ('MetaData "EpochNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-9daa3d4ae9892d2678b6d9ccd570dbf0b85c86d6e63e20e13aa1768a43e79820" 'True) (C1 ('MetaCons "EpochNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype EpochSize #

Constructors

EpochSize 

Fields

Instances

Instances details
Enum EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Eq EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Integral EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Num EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Real EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Show EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSizeTypeType Source #

NFData EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochSize → () Source #

NoThunks EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → EpochSizeIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → EpochSizeIO (Maybe ThunkInfo) #

showTypeOfProxy EpochSizeString #

FromCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fromCBOR ∷ Decoder s EpochSize

labelProxy EpochSizeText

ToCBOR EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochSize → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochSize → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [EpochSize] → Size

FromJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser EpochSize

parseJSONList ∷ Value → Parser [EpochSize]

ToJSON EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONEpochSize → Value

toEncodingEpochSize → Encoding

toJSONList ∷ [EpochSize] → Value

toEncodingList ∷ [EpochSize] → Encoding

type Rep EpochSize 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize = D1 ('MetaData "EpochSize" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-9daa3d4ae9892d2678b6d9ccd570dbf0b85c86d6e63e20e13aa1768a43e79820" 'True) (C1 ('MetaCons "EpochSize" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochSize") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

newtype SlotNo #

Constructors

SlotNo 

Fields

Instances

Instances details
Bounded SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Eq SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool Source #

(/=)SlotNoSlotNoBool Source #

Num SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Ord SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNoTypeType Source #

Methods

fromSlotNoRep SlotNo x Source #

toRep SlotNo x → SlotNo Source #

NFData SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfSlotNo → () Source #

Serialise SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

encodeSlotNo → Encoding #

decode ∷ Decoder s SlotNo #

encodeList ∷ [SlotNo] → Encoding #

decodeList ∷ Decoder s [SlotNo] #

NoThunks SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → SlotNoIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SlotNoIO (Maybe ThunkInfo) #

showTypeOfProxy SlotNoString #

FromCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fromCBOR ∷ Decoder s SlotNo

labelProxy SlotNoText

ToCBOR SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBORSlotNo → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotNo → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SlotNo] → Size

FromJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

parseJSON ∷ Value → Parser SlotNo

parseJSONList ∷ Value → Parser [SlotNo]

ToJSON SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toJSONSlotNo → Value

toEncodingSlotNo → Encoding

toJSONList ∷ [SlotNo] → Value

toEncodingList ∷ [SlotNo] → Encoding

Condense SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condenseSlotNoString Source #

(Condense block, HasHeader block, Condense (HeaderHash block)) ⇒ Condense (AnchoredFragment block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

Methods

condenseAnchoredFragment block → String Source #

ShowProxy SlotNo Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

SerialiseHFC xs ⇒ SerialiseNodeToClient (HardForkBlock xs) SlotNo Source # 
Instance details

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

HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block 
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Methods

asAnchor ∷ block → Anchor block Source #

getAnchorMeasureProxy block → Anchor block → WithOrigin SlotNo Source #

Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) Source #

Used by HeaderStateHistory but defined here, where it is not an orphan.

Instance details

Defined in Ouroboros.Consensus.HeaderValidation

type Rep SlotNo 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo = D1 ('MetaData "SlotNo" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-9daa3d4ae9892d2678b6d9ccd570dbf0b85c86d6e63e20e13aa1768a43e79820" 'True) (C1 ('MetaCons "SlotNo" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSlotNo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64)))

data WithOrigin t #

Constructors

Origin 

Bundled Patterns

pattern NotOrigin ∷ t → WithOrigin t

Custom pattern for WithOrigin

This avoids clashing with our (extensive) use of At for testing.

Instances

Instances details
Functor WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fmap ∷ (a → b) → WithOrigin a → WithOrigin b Source #

(<$) ∷ a → WithOrigin b → WithOrigin a Source #

Foldable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

foldMonoid m ⇒ WithOrigin m → m Source #

foldMapMonoid m ⇒ (a → m) → WithOrigin a → m Source #

foldMap'Monoid m ⇒ (a → m) → WithOrigin a → m Source #

foldr ∷ (a → b → b) → b → WithOrigin a → b Source #

foldr' ∷ (a → b → b) → b → WithOrigin a → b Source #

foldl ∷ (b → a → b) → b → WithOrigin a → b Source #

foldl' ∷ (b → a → b) → b → WithOrigin a → b Source #

foldr1 ∷ (a → a → a) → WithOrigin a → a Source #

foldl1 ∷ (a → a → a) → WithOrigin a → a Source #

toListWithOrigin a → [a] Source #

nullWithOrigin a → Bool Source #

lengthWithOrigin a → Int Source #

elemEq a ⇒ a → WithOrigin a → Bool Source #

maximumOrd a ⇒ WithOrigin a → a Source #

minimumOrd a ⇒ WithOrigin a → a Source #

sumNum a ⇒ WithOrigin a → a Source #

productNum a ⇒ WithOrigin a → a Source #

Traversable WithOrigin 
Instance details

Defined in Cardano.Slotting.Slot

Methods

traverseApplicative f ⇒ (a → f b) → WithOrigin a → f (WithOrigin b) Source #

sequenceAApplicative f ⇒ WithOrigin (f a) → f (WithOrigin a) Source #

mapMMonad m ⇒ (a → m b) → WithOrigin a → m (WithOrigin b) Source #

sequenceMonad m ⇒ WithOrigin (m a) → m (WithOrigin a) Source #

Bounded t ⇒ Bounded (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Eq t ⇒ Eq (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)WithOrigin t → WithOrigin t → Bool Source #

(/=)WithOrigin t → WithOrigin t → Bool Source #

Ord t ⇒ Ord (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Show t ⇒ Show (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Generic (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep (WithOrigin t) ∷ TypeType Source #

Methods

fromWithOrigin t → Rep (WithOrigin t) x Source #

toRep (WithOrigin t) x → WithOrigin t Source #

NFData a ⇒ NFData (WithOrigin a) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfWithOrigin a → () Source #

Serialise t ⇒ Serialise (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

encodeWithOrigin t → Encoding #

decode ∷ Decoder s (WithOrigin t) #

encodeList ∷ [WithOrigin t] → Encoding #

decodeList ∷ Decoder s [WithOrigin t] #

NoThunks t ⇒ NoThunks (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

noThunks ∷ Context → WithOrigin t → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → WithOrigin t → IO (Maybe ThunkInfo) #

showTypeOfProxy (WithOrigin t) → String #

(Serialise t, Typeable t) ⇒ FromCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

fromCBOR ∷ Decoder s (WithOrigin t)

labelProxy (WithOrigin t) → Text

(Serialise t, Typeable t) ⇒ ToCBOR (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBORWithOrigin t → Encoding

encodedSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy (WithOrigin t) → Size

encodedListSizeExpr ∷ (∀ t0. ToCBOR t0 ⇒ Proxy t0 → Size) → Proxy [WithOrigin t] → Size

(Condense block, HasHeader block, Condense (HeaderHash block)) ⇒ Condense (AnchoredFragment block) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Orphans

Methods

condenseAnchoredFragment block → String Source #

Condense a ⇒ Condense (WithOrigin a) Source # 
Instance details

Defined in Ouroboros.Consensus.Util.Condense

Methods

condenseWithOrigin a → String Source #

HasHeader block ⇒ Anchorable (WithOrigin SlotNo) (Anchor block) block 
Instance details

Defined in Ouroboros.Network.AnchoredFragment

Methods

asAnchor ∷ block → Anchor block Source #

getAnchorMeasureProxy block → Anchor block → WithOrigin SlotNo Source #

Anchorable (WithOrigin SlotNo) (HeaderState blk) (HeaderState blk) Source #

Used by HeaderStateHistory but defined here, where it is not an orphan.

Instance details

Defined in Ouroboros.Consensus.HeaderValidation

type Rep (WithOrigin t) 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) = D1 ('MetaData "WithOrigin" "Cardano.Slotting.Slot" "cardano-slotting-0.1.0.0-9daa3d4ae9892d2678b6d9ccd570dbf0b85c86d6e63e20e13aa1768a43e79820" 'False) (C1 ('MetaCons "Origin" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "At" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 t)))

fromWithOrigin ∷ t → WithOrigin t → t #

withOrigin ∷ b → (t → b) → WithOrigin t → b #