| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Byron.Spec.Ledger.Core
Synopsis
- newtype Hash = Hash {}
- isValid ∷ Hash → Bool
- class HasHash a where
- newtype Owner = Owner {}
- class HasOwner a where
- newtype SKey = SKey Owner
- newtype VKey = VKey Owner
- newtype VKeyGenesis = VKeyGenesis {}
- mkVKeyGenesis ∷ Natural → VKeyGenesis
- mkVkGenesisSet ∷ Word8 → Set VKeyGenesis
- data KeyPair = KeyPair {}
- keyPair ∷ Owner → KeyPair
- data Sig a = Sig a Owner
- sign ∷ SKey → a → Sig a
- verify ∷ Eq a ⇒ VKey → a → Sig a → Bool
- newtype Epoch = Epoch {}
- newtype Slot = Slot {}
- newtype SlotCount = SlotCount {}
- addSlot ∷ Slot → SlotCount → Slot
- (+.) ∷ Slot → SlotCount → Slot
- minusSlot ∷ Slot → SlotCount → Slot
- (-.) ∷ Slot → SlotCount → Slot
- (*.) ∷ Word64 → BlockCount → SlotCount
- minusSlotMaybe ∷ Slot → SlotCount → Maybe Slot
- newtype BlockCount = BlockCount {}
- newtype Addr = Addr VKey
- mkAddr ∷ Natural → Addr
- newtype Lovelace = Lovelace {}
- lovelaceCap ∷ Lovelace
- class Relation m where
- type Domain m
- type Range m
- singleton ∷ Domain m → Range m → m
- dom ∷ m → Set (Domain m)
- range ∷ m → Set (Range m)
- (◁) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m
- (<|) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m
- (⋪) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m
- (</|) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m
- (▷) ∷ m → Set (Range m) → m
- (|>) ∷ m → Set (Range m) → m
- (⋫) ∷ m → Set (Range m) → m
- (|/>) ∷ m → Set (Range m) → m
- (∪) ∷ m → m → m
- (⨃) ∷ (Ord (Domain m), Ord (Range m), Foldable f) ⇒ m → f (Domain m, Range m) → m
- (<=◁) ∷ Domain m → m → m
- (▷<=) ∷ m → Range m → m
- (▷>=) ∷ m → Range m → m
- size ∷ Integral n ⇒ m → n
- (∈) ∷ (Eq a, Foldable f) ⇒ a → f a → Bool
- (∉) ∷ (Eq a, Foldable f) ⇒ a → f a → Bool
- (∪+) ∷ (Ord a, Ord b, Num b) ⇒ Map a b → Map a b → Map a b
- (⊆) ∷ (Foldable f, Foldable g, Ord a) ⇒ f a → g a → Bool
- toSet ∷ (Foldable f, Ord a) ⇒ f a → Set a
- (∩) ∷ Ord a ⇒ Set a → Set a → Set a
Documentation
An encoded hash of part of the system.
Nothing is used to signal to the elaborators (i.e. the algorithms that
translate abstract data into data concrete) that they should produce an
invalid concrete hash.
Instances
| HasTypeReps Hash Source # | |||||
| ToCBOR Hash Source # | |||||
| EncCBOR Hash Source # | |||||
| Data Hash Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Hash → c Hash # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Hash # dataTypeOf ∷ Hash → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Hash) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Hash) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Hash → Hash # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Hash → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Hash → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Hash → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Hash → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Hash → m Hash # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Hash → m Hash # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Hash → m Hash # | |||||
| Generic Hash Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show Hash Source # | |||||
| Eq Hash Source # | |||||
| Ord Hash Source # | |||||
| Hashable Hash Source # | |||||
| NoThunks Hash Source # | |||||
| type Rep Hash Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
class HasHash a where Source #
Hash part of the ledger payload
Representation of the owner of key pair.
Instances
| HasTypeReps Owner Source # | |||||
| FromCBOR Owner Source # | |||||
| ToCBOR Owner Source # | |||||
| DecCBOR Owner Source # | |||||
| EncCBOR Owner Source # | |||||
| Data Owner Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Owner → c Owner # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Owner # dataTypeOf ∷ Owner → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Owner) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Owner) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Owner → Owner # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Owner → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Owner → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Owner → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Owner → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Owner → m Owner # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Owner → m Owner # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Owner → m Owner # | |||||
| Generic Owner Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show Owner Source # | |||||
| Eq Owner Source # | |||||
| Ord Owner Source # | |||||
| Hashable Owner Source # | |||||
| NoThunks Owner Source # | |||||
| type Rep Owner Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
Signing Key.
Instances
| HasOwner SKey Source # | |||||
| HasTypeReps SKey Source # | |||||
| ToCBOR SKey Source # | |||||
| EncCBOR SKey Source # | |||||
| Data SKey Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → SKey → c SKey # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c SKey # dataTypeOf ∷ SKey → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c SKey) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c SKey) # gmapT ∷ (∀ b. Data b ⇒ b → b) → SKey → SKey # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → SKey → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → SKey → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → SKey → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → SKey → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → SKey → m SKey # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SKey → m SKey # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SKey → m SKey # | |||||
| Generic SKey Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show SKey Source # | |||||
| Eq SKey Source # | |||||
| Ord SKey Source # | |||||
| NoThunks SKey Source # | |||||
| type Rep SKey Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
Verification Key.
Instances
newtype VKeyGenesis Source #
A genesis key is a specialisation of a generic VKey.
Constructors
| VKeyGenesis | |
Fields | |
Instances
| HasHash VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods hash ∷ VKeyGenesis → Hash Source # | |||||
| HasOwner VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods owner ∷ VKeyGenesis → Owner Source # | |||||
| HasTypeReps VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| FromCBOR VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| ToCBOR VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods toCBOR ∷ VKeyGenesis → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy VKeyGenesis → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [VKeyGenesis] → Size Source # | |||||
| DecCBOR VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| EncCBOR VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods | |||||
| Data VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → VKeyGenesis → c VKeyGenesis # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c VKeyGenesis # toConstr ∷ VKeyGenesis → Constr # dataTypeOf ∷ VKeyGenesis → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c VKeyGenesis) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c VKeyGenesis) # gmapT ∷ (∀ b. Data b ⇒ b → b) → VKeyGenesis → VKeyGenesis # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → VKeyGenesis → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → VKeyGenesis → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → VKeyGenesis → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → VKeyGenesis → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → VKeyGenesis → m VKeyGenesis # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → VKeyGenesis → m VKeyGenesis # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → VKeyGenesis → m VKeyGenesis # | |||||
| Generic VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods showsPrec ∷ Int → VKeyGenesis → ShowS # show ∷ VKeyGenesis → String # showList ∷ [VKeyGenesis] → ShowS # | |||||
| Eq VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| Ord VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods compare ∷ VKeyGenesis → VKeyGenesis → Ordering # (<) ∷ VKeyGenesis → VKeyGenesis → Bool # (<=) ∷ VKeyGenesis → VKeyGenesis → Bool # (>) ∷ VKeyGenesis → VKeyGenesis → Bool # (>=) ∷ VKeyGenesis → VKeyGenesis → Bool # max ∷ VKeyGenesis → VKeyGenesis → VKeyGenesis # min ∷ VKeyGenesis → VKeyGenesis → VKeyGenesis # | |||||
| Hashable VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| NoThunks VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| HasScheduledDelegations DIState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
Defined in Byron.Spec.Ledger.Delegation Methods scheduledDelegations ∷ Lens' DIState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
| HasScheduledDelegations DSState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
Defined in Byron.Spec.Ledger.Delegation Methods scheduledDelegations ∷ Lens' DSState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
| type Rep VKeyGenesis Source # | |||||
Defined in Byron.Spec.Ledger.Core type Rep VKeyGenesis = D1 ('MetaData "VKeyGenesis" "Byron.Spec.Ledger.Core" "byron-spec-ledger-1.1.0.1-inplace" 'True) (C1 ('MetaCons "VKeyGenesis" 'PrefixI 'True) (S1 ('MetaSel ('Just "unVKeyGenesis") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 VKey))) | |||||
Arguments
| ∷ Word8 | Number of genesis keys |
| → Set VKeyGenesis |
Make a set of genesis keys. The genesis keys are continuously numbered from 0 to the given number of genesis keys minus 1.
Key Pair.
Instances
| HasTypeReps KeyPair Source # | |||||
| Generic KeyPair Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show KeyPair Source # | |||||
| Eq KeyPair Source # | |||||
| Ord KeyPair Source # | |||||
| NoThunks KeyPair Source # | |||||
| type Rep KeyPair Source # | |||||
Defined in Byron.Spec.Ledger.Core type Rep KeyPair = D1 ('MetaData "KeyPair" "Byron.Spec.Ledger.Core" "byron-spec-ledger-1.1.0.1-inplace" 'False) (C1 ('MetaCons "KeyPair" 'PrefixI 'True) (S1 ('MetaSel ('Just "sKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SKey) :*: S1 ('MetaSel ('Just "vKey") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 VKey))) | |||||
A digital signature.
Instances
| Typeable a ⇒ HasTypeReps (Sig a) Source # | We need a custom instance here that returns only the top level type.
A generic instance would have recursed into type | ||||
| Data a ⇒ Data (Sig a) Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Sig a → c (Sig a) # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c (Sig a) # dataTypeOf ∷ Sig a → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c (Sig a)) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c (Sig a)) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Sig a → Sig a # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Sig a → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Sig a → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Sig a → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Sig a → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) # | |||||
| Generic (Sig a) Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show a ⇒ Show (Sig a) Source # | |||||
| Eq a ⇒ Eq (Sig a) Source # | |||||
| Ord a ⇒ Ord (Sig a) Source # | |||||
| Hashable a ⇒ Hashable (Sig a) Source # | |||||
| NoThunks a ⇒ NoThunks (Sig a) Source # | |||||
| type Rep (Sig a) Source # | |||||
Defined in Byron.Spec.Ledger.Core type Rep (Sig a) = D1 ('MetaData "Sig" "Byron.Spec.Ledger.Core" "byron-spec-ledger-1.1.0.1-inplace" 'False) (C1 ('MetaCons "Sig" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 a) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Owner))) | |||||
Instances
| HasTypeReps Epoch Source # | |||||
| ToCBOR Epoch Source # | |||||
| EncCBOR Epoch Source # | |||||
| Data Epoch Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Epoch → c Epoch # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Epoch # dataTypeOf ∷ Epoch → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Epoch) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Epoch) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Epoch → Epoch # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Epoch → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Epoch → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Epoch → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Epoch → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Epoch → m Epoch # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Epoch → m Epoch # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Epoch → m Epoch # | |||||
| Generic Epoch Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Num Epoch Source # | |||||
| Show Epoch Source # | |||||
| Eq Epoch Source # | |||||
| Ord Epoch Source # | |||||
| Hashable Epoch Source # | |||||
| NoThunks Epoch Source # | |||||
| type Rep Epoch Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
Instances
| HasTypeReps Slot Source # | |||||
| ToCBOR Slot Source # | |||||
| EncCBOR Slot Source # | |||||
| Data Slot Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Slot → c Slot # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Slot # dataTypeOf ∷ Slot → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Slot) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Slot) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Slot → Slot # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Slot → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Slot → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Slot → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Slot → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Slot → m Slot # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Slot → m Slot # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Slot → m Slot # | |||||
| Generic Slot Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show Slot Source # | |||||
| Eq Slot Source # | |||||
| Ord Slot Source # | |||||
| Hashable Slot Source # | |||||
| NoThunks Slot Source # | |||||
| HasScheduledDelegations DIState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
Defined in Byron.Spec.Ledger.Delegation Methods scheduledDelegations ∷ Lens' DIState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
| HasScheduledDelegations DSState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
Defined in Byron.Spec.Ledger.Delegation Methods scheduledDelegations ∷ Lens' DSState [(Slot, (VKeyGenesis, VKey))] Source # | |||||
| type Rep Slot Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
A number of slots.
We use this newtype to distinguish between a cardinal slot and a relative period of slots, and also to distinguish between number of slots and number of blocks.
Constructors
| SlotCount | |
Fields | |
Instances
| HasTypeReps SlotCount Source # | |||||
| ToCBOR SlotCount Source # | |||||
| EncCBOR SlotCount Source # | |||||
| Data SlotCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → SlotCount → c SlotCount # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c SlotCount # toConstr ∷ SlotCount → Constr # dataTypeOf ∷ SlotCount → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c SlotCount) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c SlotCount) # gmapT ∷ (∀ b. Data b ⇒ b → b) → SlotCount → SlotCount # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → SlotCount → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → SlotCount → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → SlotCount → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → SlotCount → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → SlotCount → m SlotCount # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SlotCount → m SlotCount # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → SlotCount → m SlotCount # | |||||
| Generic SlotCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Num SlotCount Source # | |||||
| Show SlotCount Source # | |||||
| Eq SlotCount Source # | |||||
| Ord SlotCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| Hashable SlotCount Source # | |||||
| NoThunks SlotCount Source # | |||||
| type Rep SlotCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
minusSlot ∷ Slot → SlotCount → Slot Source #
Subtract a slot count from a slot.
This is bounded below by 0.
(*.) ∷ Word64 → BlockCount → SlotCount infixl 7 Source #
Multiply the block count by the given constant. This function does not check for overflow.
minusSlotMaybe ∷ Slot → SlotCount → Maybe Slot Source #
Subtract a slot count from a slot.
In case the slot count is greater than the slot's index, it returns Nothing.
newtype BlockCount Source #
Constructors
| BlockCount | |
Fields | |
Instances
| HasTypeReps BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| FromCBOR BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| ToCBOR BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods toCBOR ∷ BlockCount → Encoding Source # encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy BlockCount → Size Source # encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [BlockCount] → Size Source # | |||||
| DecCBOR BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| EncCBOR BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods encCBOR ∷ BlockCount → Encoding Source # | |||||
| Generic BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Num BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods (+) ∷ BlockCount → BlockCount → BlockCount # (-) ∷ BlockCount → BlockCount → BlockCount # (*) ∷ BlockCount → BlockCount → BlockCount # negate ∷ BlockCount → BlockCount # abs ∷ BlockCount → BlockCount # signum ∷ BlockCount → BlockCount # | |||||
| Show BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods showsPrec ∷ Int → BlockCount → ShowS # show ∷ BlockCount → String # showList ∷ [BlockCount] → ShowS # | |||||
| Eq BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| Ord BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods compare ∷ BlockCount → BlockCount → Ordering # (<) ∷ BlockCount → BlockCount → Bool # (<=) ∷ BlockCount → BlockCount → Bool # (>) ∷ BlockCount → BlockCount → Bool # (>=) ∷ BlockCount → BlockCount → Bool # max ∷ BlockCount → BlockCount → BlockCount # min ∷ BlockCount → BlockCount → BlockCount # | |||||
| Hashable BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| NoThunks BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| type Rep BlockCount Source # | |||||
Defined in Byron.Spec.Ledger.Core type Rep BlockCount = D1 ('MetaData "BlockCount" "Byron.Spec.Ledger.Core" "byron-spec-ledger-1.1.0.1-inplace" 'True) (C1 ('MetaCons "BlockCount" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBlockCount") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word64))) | |||||
The address of a transaction output, used to identify the owner.
Instances
| HasHash Addr Source # | |||||
| HasOwner Addr Source # | |||||
| HasTypeReps Addr Source # | |||||
| ToCBOR Addr Source # | |||||
| EncCBOR Addr Source # | |||||
| Data Addr Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Addr → c Addr # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Addr # dataTypeOf ∷ Addr → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Addr) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Addr) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Addr → Addr # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Addr → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Addr → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Addr → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Addr → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Addr → m Addr # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Addr → m Addr # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Addr → m Addr # | |||||
| Generic Addr Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Show Addr Source # | |||||
| Eq Addr Source # | |||||
| Ord Addr Source # | |||||
| Hashable Addr Source # | |||||
| NoThunks Addr Source # | |||||
| type Rep Addr Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
A unit of value held by a UTxO.
Constructors
| Lovelace | |
Fields | |
Instances
| HasTypeReps Lovelace Source # | |||||
| ToCBOR Lovelace Source # | |||||
| EncCBOR Lovelace Source # | |||||
| Monoid Lovelace Source # | |||||
| Semigroup Lovelace Source # | |||||
| Data Lovelace Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Lovelace → c Lovelace # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c Lovelace # toConstr ∷ Lovelace → Constr # dataTypeOf ∷ Lovelace → DataType # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c Lovelace) # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c Lovelace) # gmapT ∷ (∀ b. Data b ⇒ b → b) → Lovelace → Lovelace # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Lovelace → r # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Lovelace → r # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Lovelace → [u] # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Lovelace → u # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Lovelace → m Lovelace # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Lovelace → m Lovelace # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Lovelace → m Lovelace # | |||||
| Enum Lovelace Source # | |||||
| Generic Lovelace Source # | |||||
Defined in Byron.Spec.Ledger.Core Associated Types
| |||||
| Num Lovelace Source # | |||||
| Integral Lovelace Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
| Real Lovelace Source # | |||||
Defined in Byron.Spec.Ledger.Core Methods toRational ∷ Lovelace → Rational # | |||||
| Show Lovelace Source # | |||||
| Eq Lovelace Source # | |||||
| Ord Lovelace Source # | |||||
| Hashable Lovelace Source # | |||||
| NoThunks Lovelace Source # | |||||
| type Rep Lovelace Source # | |||||
Defined in Byron.Spec.Ledger.Core | |||||
lovelaceCap ∷ Lovelace Source #
Constant amount of Lovelace in the system.
class Relation m where Source #
Minimal complete definition
singleton, dom, range, (◁), (⋪), (▷), (⋫), (∪), (⨃), (<=◁), (▷<=), (▷>=), size
Methods
singleton ∷ Domain m → Range m → m Source #
dom ∷ m → Set (Domain m) Source #
Domain
range ∷ m → Set (Range m) Source #
Range
(◁) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m Source #
Domain restriction
Unicode: 25c1
(<|) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m Source #
Domain restriction
Unicode: 25c1
(⋪) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m Source #
Domain exclusion
Unicode: 22ea
(</|) ∷ (Ord (Domain m), Foldable f) ⇒ f (Domain m) → m → m Source #
Domain exclusion
Unicode: 22ea
(▷) ∷ m → Set (Range m) → m Source #
Range restriction
Unicode: 25b7
(|>) ∷ m → Set (Range m) → m Source #
Range restriction
Unicode: 25b7
(⋫) ∷ m → Set (Range m) → m Source #
Range exclusion
Unicode: 22eb
(|/>) ∷ m → Set (Range m) → m Source #
Range exclusion
Unicode: 22eb
Union
(⨃) ∷ (Ord (Domain m), Ord (Range m), Foldable f) ⇒ m → f (Domain m, Range m) → m Source #
Union Override Right
(<=◁) ∷ Domain m → m → m infixl 5 Source #
Restrict domain to values less or equal than the given value.
Unicode: 25c1
(▷<=) ∷ m → Range m → m infixl 5 Source #
Restrict range to values less or equal than the given value
Unicode: 25b7
(▷>=) ∷ m → Range m → m infixl 5 Source #
Restrict range to values greater or equal than the given value
Unicode: 25b7
size ∷ Integral n ⇒ m → n Source #
Size of the relation
Instances
| Relation UTxO Source # | |||||||||
Defined in Byron.Spec.Ledger.UTxO Methods singleton ∷ Domain UTxO → Range UTxO → UTxO Source # dom ∷ UTxO → Set (Domain UTxO) Source # range ∷ UTxO → Set (Range UTxO) Source # (◁) ∷ (Ord (Domain UTxO), Foldable f) ⇒ f (Domain UTxO) → UTxO → UTxO Source # (<|) ∷ (Ord (Domain UTxO), Foldable f) ⇒ f (Domain UTxO) → UTxO → UTxO Source # (⋪) ∷ (Ord (Domain UTxO), Foldable f) ⇒ f (Domain UTxO) → UTxO → UTxO Source # (</|) ∷ (Ord (Domain UTxO), Foldable f) ⇒ f (Domain UTxO) → UTxO → UTxO Source # (▷) ∷ UTxO → Set (Range UTxO) → UTxO Source # (|>) ∷ UTxO → Set (Range UTxO) → UTxO Source # (⋫) ∷ UTxO → Set (Range UTxO) → UTxO Source # (|/>) ∷ UTxO → Set (Range UTxO) → UTxO Source # (∪) ∷ UTxO → UTxO → UTxO Source # (⨃) ∷ (Ord (Domain UTxO), Ord (Range UTxO), Foldable f) ⇒ UTxO → f (Domain UTxO, Range UTxO) → UTxO Source # (<=◁) ∷ Domain UTxO → UTxO → UTxO Source # (▷<=) ∷ UTxO → Range UTxO → UTxO Source # | |||||||||
| Relation (Set (a, b)) Source # | |||||||||
Defined in Byron.Spec.Ledger.Core Associated Types
Methods singleton ∷ Domain (Set (a, b)) → Range (Set (a, b)) → Set (a, b) Source # dom ∷ Set (a, b) → Set (Domain (Set (a, b))) Source # range ∷ Set (a, b) → Set (Range (Set (a, b))) Source # (◁) ∷ (Ord (Domain (Set (a, b))), Foldable f) ⇒ f (Domain (Set (a, b))) → Set (a, b) → Set (a, b) Source # (<|) ∷ (Ord (Domain (Set (a, b))), Foldable f) ⇒ f (Domain (Set (a, b))) → Set (a, b) → Set (a, b) Source # (⋪) ∷ (Ord (Domain (Set (a, b))), Foldable f) ⇒ f (Domain (Set (a, b))) → Set (a, b) → Set (a, b) Source # (</|) ∷ (Ord (Domain (Set (a, b))), Foldable f) ⇒ f (Domain (Set (a, b))) → Set (a, b) → Set (a, b) Source # (▷) ∷ Set (a, b) → Set (Range (Set (a, b))) → Set (a, b) Source # (|>) ∷ Set (a, b) → Set (Range (Set (a, b))) → Set (a, b) Source # (⋫) ∷ Set (a, b) → Set (Range (Set (a, b))) → Set (a, b) Source # (|/>) ∷ Set (a, b) → Set (Range (Set (a, b))) → Set (a, b) Source # (∪) ∷ Set (a, b) → Set (a, b) → Set (a, b) Source # (⨃) ∷ (Ord (Domain (Set (a, b))), Ord (Range (Set (a, b))), Foldable f) ⇒ Set (a, b) → f (Domain (Set (a, b)), Range (Set (a, b))) → Set (a, b) Source # (<=◁) ∷ Domain (Set (a, b)) → Set (a, b) → Set (a, b) Source # (▷<=) ∷ Set (a, b) → Range (Set (a, b)) → Set (a, b) Source # (▷>=) ∷ Set (a, b) → Range (Set (a, b)) → Set (a, b) Source # | |||||||||
| Relation [(a, b)] Source # | |||||||||
Defined in Byron.Spec.Ledger.Core Associated Types
Methods singleton ∷ Domain [(a, b)] → Range [(a, b)] → [(a, b)] Source # dom ∷ [(a, b)] → Set (Domain [(a, b)]) Source # range ∷ [(a, b)] → Set (Range [(a, b)]) Source # (◁) ∷ (Ord (Domain [(a, b)]), Foldable f) ⇒ f (Domain [(a, b)]) → [(a, b)] → [(a, b)] Source # (<|) ∷ (Ord (Domain [(a, b)]), Foldable f) ⇒ f (Domain [(a, b)]) → [(a, b)] → [(a, b)] Source # (⋪) ∷ (Ord (Domain [(a, b)]), Foldable f) ⇒ f (Domain [(a, b)]) → [(a, b)] → [(a, b)] Source # (</|) ∷ (Ord (Domain [(a, b)]), Foldable f) ⇒ f (Domain [(a, b)]) → [(a, b)] → [(a, b)] Source # (▷) ∷ [(a, b)] → Set (Range [(a, b)]) → [(a, b)] Source # (|>) ∷ [(a, b)] → Set (Range [(a, b)]) → [(a, b)] Source # (⋫) ∷ [(a, b)] → Set (Range [(a, b)]) → [(a, b)] Source # (|/>) ∷ [(a, b)] → Set (Range [(a, b)]) → [(a, b)] Source # (∪) ∷ [(a, b)] → [(a, b)] → [(a, b)] Source # (⨃) ∷ (Ord (Domain [(a, b)]), Ord (Range [(a, b)]), Foldable f) ⇒ [(a, b)] → f (Domain [(a, b)], Range [(a, b)]) → [(a, b)] Source # (<=◁) ∷ Domain [(a, b)] → [(a, b)] → [(a, b)] Source # (▷<=) ∷ [(a, b)] → Range [(a, b)] → [(a, b)] Source # | |||||||||
| (Ord k, Ord v) ⇒ Relation (Bimap k v) Source # | |||||||||
Defined in Byron.Spec.Ledger.Core Associated Types
Methods singleton ∷ Domain (Bimap k v) → Range (Bimap k v) → Bimap k v Source # dom ∷ Bimap k v → Set (Domain (Bimap k v)) Source # range ∷ Bimap k v → Set (Range (Bimap k v)) Source # (◁) ∷ (Ord (Domain (Bimap k v)), Foldable f) ⇒ f (Domain (Bimap k v)) → Bimap k v → Bimap k v Source # (<|) ∷ (Ord (Domain (Bimap k v)), Foldable f) ⇒ f (Domain (Bimap k v)) → Bimap k v → Bimap k v Source # (⋪) ∷ (Ord (Domain (Bimap k v)), Foldable f) ⇒ f (Domain (Bimap k v)) → Bimap k v → Bimap k v Source # (</|) ∷ (Ord (Domain (Bimap k v)), Foldable f) ⇒ f (Domain (Bimap k v)) → Bimap k v → Bimap k v Source # (▷) ∷ Bimap k v → Set (Range (Bimap k v)) → Bimap k v Source # (|>) ∷ Bimap k v → Set (Range (Bimap k v)) → Bimap k v Source # (⋫) ∷ Bimap k v → Set (Range (Bimap k v)) → Bimap k v Source # (|/>) ∷ Bimap k v → Set (Range (Bimap k v)) → Bimap k v Source # (∪) ∷ Bimap k v → Bimap k v → Bimap k v Source # (⨃) ∷ (Ord (Domain (Bimap k v)), Ord (Range (Bimap k v)), Foldable f) ⇒ Bimap k v → f (Domain (Bimap k v), Range (Bimap k v)) → Bimap k v Source # (<=◁) ∷ Domain (Bimap k v) → Bimap k v → Bimap k v Source # (▷<=) ∷ Bimap k v → Range (Bimap k v) → Bimap k v Source # | |||||||||
| Relation (Map k v) Source # | |||||||||
Defined in Byron.Spec.Ledger.Core Associated Types
Methods singleton ∷ Domain (Map k v) → Range (Map k v) → Map k v Source # dom ∷ Map k v → Set (Domain (Map k v)) Source # range ∷ Map k v → Set (Range (Map k v)) Source # (◁) ∷ (Ord (Domain (Map k v)), Foldable f) ⇒ f (Domain (Map k v)) → Map k v → Map k v Source # (<|) ∷ (Ord (Domain (Map k v)), Foldable f) ⇒ f (Domain (Map k v)) → Map k v → Map k v Source # (⋪) ∷ (Ord (Domain (Map k v)), Foldable f) ⇒ f (Domain (Map k v)) → Map k v → Map k v Source # (</|) ∷ (Ord (Domain (Map k v)), Foldable f) ⇒ f (Domain (Map k v)) → Map k v → Map k v Source # (▷) ∷ Map k v → Set (Range (Map k v)) → Map k v Source # (|>) ∷ Map k v → Set (Range (Map k v)) → Map k v Source # (⋫) ∷ Map k v → Set (Range (Map k v)) → Map k v Source # (|/>) ∷ Map k v → Set (Range (Map k v)) → Map k v Source # (∪) ∷ Map k v → Map k v → Map k v Source # (⨃) ∷ (Ord (Domain (Map k v)), Ord (Range (Map k v)), Foldable f) ⇒ Map k v → f (Domain (Map k v), Range (Map k v)) → Map k v Source # (<=◁) ∷ Domain (Map k v) → Map k v → Map k v Source # (▷<=) ∷ Map k v → Range (Map k v) → Map k v Source # | |||||||||
(∪+) ∷ (Ord a, Ord b, Num b) ⇒ Map a b → Map a b → Map a b Source #
Union override plus is (AB)∪(BA)∪{k|->v1+v2 | k|->v1 : A / k|->v2 : B}