Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype SlotNo = SlotNo {}
- data WithOrigin t
- at ∷ t → WithOrigin t
- origin ∷ WithOrigin t
- fromWithOrigin ∷ t → WithOrigin t → t
- withOrigin ∷ b → (t → b) → WithOrigin t → b
- withOriginToMaybe ∷ WithOrigin t → Maybe t
- withOriginFromMaybe ∷ Maybe t → WithOrigin t
- newtype EpochNo = EpochNo {}
- newtype EpochSize = EpochSize {}
- newtype EpochInterval = EpochInterval {}
- binOpEpochNo ∷ (Word64 → Word64 → Word64) → EpochNo → EpochNo → EpochNo
- addEpochInterval ∷ EpochNo → EpochInterval → EpochNo
Documentation
The 0-based index for the Ourboros time slot.
Instances
FromJSON SlotNo Source # | |
ToJSON SlotNo Source # | |
Bounded SlotNo Source # | |
Enum SlotNo Source # | |
Defined in Cardano.Slotting.Slot succ ∷ SlotNo → SlotNo Source # pred ∷ SlotNo → SlotNo Source # toEnum ∷ Int → SlotNo Source # fromEnum ∷ SlotNo → Int Source # enumFrom ∷ SlotNo → [SlotNo] Source # enumFromThen ∷ SlotNo → SlotNo → [SlotNo] Source # enumFromTo ∷ SlotNo → SlotNo → [SlotNo] Source # enumFromThenTo ∷ SlotNo → SlotNo → SlotNo → [SlotNo] Source # | |
Generic SlotNo Source # | |
Num SlotNo Source # | |
Show SlotNo Source # | |
FromCBOR SlotNo Source # | |
ToCBOR SlotNo Source # | |
NFData SlotNo Source # | |
Defined in Cardano.Slotting.Slot | |
Eq SlotNo Source # | |
Ord SlotNo Source # | |
Defined in Cardano.Slotting.Slot | |
NoThunks SlotNo Source # | |
Serialise SlotNo Source # | |
type Rep SlotNo Source # | |
Defined in Cardano.Slotting.Slot |
data WithOrigin t Source #
Instances
at ∷ t → WithOrigin t Source #
origin ∷ WithOrigin t Source #
fromWithOrigin ∷ t → WithOrigin t → t Source #
withOrigin ∷ b → (t → b) → WithOrigin t → b Source #
withOriginToMaybe ∷ WithOrigin t → Maybe t Source #
withOriginFromMaybe ∷ Maybe t → WithOrigin t Source #
An epoch, i.e. the number of the epoch.
Instances
FromJSON EpochNo Source # | |
ToJSON EpochNo Source # | |
Enum EpochNo Source # | |
Defined in Cardano.Slotting.Slot succ ∷ EpochNo → EpochNo Source # pred ∷ EpochNo → EpochNo Source # toEnum ∷ Int → EpochNo Source # fromEnum ∷ EpochNo → Int Source # enumFrom ∷ EpochNo → [EpochNo] Source # enumFromThen ∷ EpochNo → EpochNo → [EpochNo] Source # enumFromTo ∷ EpochNo → EpochNo → [EpochNo] Source # enumFromThenTo ∷ EpochNo → EpochNo → EpochNo → [EpochNo] Source # | |
Generic EpochNo Source # | |
Show EpochNo Source # | |
FromCBOR EpochNo Source # | |
ToCBOR EpochNo Source # | |
NFData EpochNo Source # | |
Defined in Cardano.Slotting.Slot | |
Eq EpochNo Source # | |
Ord EpochNo Source # | |
Defined in Cardano.Slotting.Slot | |
NoThunks EpochNo Source # | |
Serialise EpochNo Source # | |
type Rep EpochNo Source # | |
Defined in Cardano.Slotting.Slot |
Instances
FromJSON EpochSize Source # | |
ToJSON EpochSize Source # | |
Enum EpochSize Source # | |
Defined in Cardano.Slotting.Slot succ ∷ EpochSize → EpochSize Source # pred ∷ EpochSize → EpochSize Source # toEnum ∷ Int → EpochSize Source # fromEnum ∷ EpochSize → Int Source # enumFrom ∷ EpochSize → [EpochSize] Source # enumFromThen ∷ EpochSize → EpochSize → [EpochSize] Source # enumFromTo ∷ EpochSize → EpochSize → [EpochSize] Source # enumFromThenTo ∷ EpochSize → EpochSize → EpochSize → [EpochSize] Source # | |
Generic EpochSize Source # | |
Show EpochSize Source # | |
FromCBOR EpochSize Source # | |
ToCBOR EpochSize Source # | |
NFData EpochSize Source # | |
Defined in Cardano.Slotting.Slot | |
Eq EpochSize Source # | |
Ord EpochSize Source # | |
Defined in Cardano.Slotting.Slot | |
NoThunks EpochSize Source # | |
type Rep EpochSize Source # | |
Defined in Cardano.Slotting.Slot |
newtype EpochInterval Source #
Instances
binOpEpochNo ∷ (Word64 → Word64 → Word64) → EpochNo → EpochNo → EpochNo Source #
Convenience function for doing binary operations on two EpochNo
s
addEpochInterval ∷ EpochNo → EpochInterval → EpochNo Source #
Add a EpochInterval (a positive change) to an EpochNo to get a new EpochNo