cardano-slotting-0.2.0.0: Key slotting types for cardano libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Slotting.Slot

Synopsis

Documentation

newtype SlotNo Source #

The 0-based index for the Ourboros time slot.

Constructors

SlotNo 

Fields

Instances

Instances details
FromJSON SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Bounded SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Enum SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep SlotNoTypeType Source #

Methods

fromSlotNoRep SlotNo x Source #

toRep SlotNo x → SlotNo Source #

Num SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Show SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBORSlotNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotNoSize Source #

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

NFData SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfSlotNo → () Source #

Eq SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)SlotNoSlotNoBool Source #

(/=)SlotNoSlotNoBool Source #

Ord SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Serialise SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep SlotNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

data WithOrigin t Source #

Constructors

Origin 
At !t 

Instances

Instances details
Foldable WithOrigin Source # 
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 Source # 
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 #

Functor WithOrigin Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

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

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

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

Defined in Cardano.Slotting.Slot

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

Defined in Cardano.Slotting.Slot

Bounded t ⇒ Bounded (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic (WithOrigin t) Source # 
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 #

Show t ⇒ Show (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

Defined in Cardano.Slotting.Slot

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

Defined in Cardano.Slotting.Slot

Methods

toCBORWithOrigin t → Encoding Source #

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

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

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

Defined in Cardano.Slotting.Slot

Methods

rnfWithOrigin a → () Source #

Eq t ⇒ Eq (WithOrigin t) Source # 
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) Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks t ⇒ NoThunks (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

Serialise t ⇒ Serialise (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep (WithOrigin t) Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

at ∷ t → WithOrigin t Source #

fromWithOrigin ∷ t → WithOrigin t → t Source #

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

newtype EpochNo Source #

An epoch, i.e. the number of the epoch.

Constructors

EpochNo 

Fields

Instances

Instances details
FromJSON EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Enum EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochNoTypeType Source #

Methods

fromEpochNoRep EpochNo x Source #

toRep EpochNo x → EpochNo Source #

Show EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochNoEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochNoSize Source #

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

NFData EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochNo → () Source #

Eq EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

(==)EpochNoEpochNoBool Source #

(/=)EpochNoEpochNoBool Source #

Ord EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

Serialise EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochNo Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

newtype EpochSize Source #

Constructors

EpochSize 

Fields

Instances

Instances details
FromJSON EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Enum EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochSizeTypeType Source #

Show EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

toCBOREpochSizeEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy EpochSizeSize Source #

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

NFData EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochSize → () Source #

Eq EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochSize Source # 
Instance details

Defined in Cardano.Slotting.Slot

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

newtype EpochInterval Source #

Constructors

EpochInterval 

Instances

Instances details
FromJSON EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToJSON EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

Generic EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

Associated Types

type Rep EpochIntervalTypeType Source #

Show EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

FromCBOR EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

ToCBOR EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

NFData EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

Methods

rnfEpochInterval → () Source #

Eq EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

Ord EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

NoThunks EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochInterval Source # 
Instance details

Defined in Cardano.Slotting.Slot

type Rep EpochInterval = D1 ('MetaData "EpochInterval" "Cardano.Slotting.Slot" "cardano-slotting-0.2.0.0-inplace" 'True) (C1 ('MetaCons "EpochInterval" 'PrefixI 'True) (S1 ('MetaSel ('Just "unEpochInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word32)))

binOpEpochNo ∷ (Word64Word64Word64) → EpochNoEpochNoEpochNo Source #

Convenience function for doing binary operations on two EpochNos

addEpochIntervalEpochNoEpochIntervalEpochNo Source #

Add a EpochInterval (a positive change) to an EpochNo to get a new EpochNo