Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- type Range m ∷ Type
- singleton ∷ Domain m → Range m → m
- dom ∷ Ord (Domain m) ⇒ m → Set (Domain m)
- range ∷ Ord (Range m) ⇒ 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 (Range m) ⇒ m → Set (Range m) → m
- (⋫), (|/>) ∷ Ord (Range m) ⇒ m → Set (Range m) → m
- (∪) ∷ (Ord (Domain m), Ord (Range m)) ⇒ m → m → m
- (⨃) ∷ (Ord (Domain m), Ord (Range m), Foldable f) ⇒ m → f (Domain m, Range m) → m
- (<=◁) ∷ Ord (Domain m) ⇒ Domain m → m → m
- (▷<=) ∷ Ord (Range m) ⇒ m → Range m → m
- (▷>=) ∷ Ord (Range 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
class HasHash a where Source #
Hash part of the ledger payload
Representation of the owner of key pair.
Instances
Signing Key.
Instances
Verification Key.
Instances
newtype VKeyGenesis Source #
A genesis key is a specialisation of a generic VKey.
Instances
∷ 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
Generic KeyPair Source # | |
Show KeyPair Source # | |
HasTypeReps KeyPair Source # | |
Eq KeyPair Source # | |
Ord KeyPair Source # | |
Defined in Byron.Spec.Ledger.Core | |
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.0.1.0-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
Data a ⇒ Data (Sig a) Source # | |
Defined in Byron.Spec.Ledger.Core gfoldl ∷ (∀ d b. Data d ⇒ c (d → b) → d → c b) → (∀ g. g → c g) → Sig a → c (Sig a) Source # gunfold ∷ (∀ b r. Data b ⇒ c (b → r) → c r) → (∀ r. r → c r) → Constr → c (Sig a) Source # toConstr ∷ Sig a → Constr Source # dataTypeOf ∷ Sig a → DataType Source # dataCast1 ∷ Typeable t ⇒ (∀ d. Data d ⇒ c (t d)) → Maybe (c (Sig a)) Source # dataCast2 ∷ Typeable t ⇒ (∀ d e. (Data d, Data e) ⇒ c (t d e)) → Maybe (c (Sig a)) Source # gmapT ∷ (∀ b. Data b ⇒ b → b) → Sig a → Sig a Source # gmapQl ∷ (r → r' → r) → r → (∀ d. Data d ⇒ d → r') → Sig a → r Source # gmapQr ∷ ∀ r r'. (r' → r → r) → r → (∀ d. Data d ⇒ d → r') → Sig a → r Source # gmapQ ∷ (∀ d. Data d ⇒ d → u) → Sig a → [u] Source # gmapQi ∷ Int → (∀ d. Data d ⇒ d → u) → Sig a → u Source # gmapM ∷ Monad m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) Source # gmapMp ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) Source # gmapMo ∷ MonadPlus m ⇒ (∀ d. Data d ⇒ d → m d) → Sig a → m (Sig a) Source # | |
Generic (Sig a) Source # | |
Show a ⇒ Show (Sig a) Source # | |
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 |
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.0.1.0-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
Instances
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.
Instances
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 #
Instances
The address of a transaction output, used to identify the owner.
Instances
A unit of value held by a UTxO.
Instances
lovelaceCap ∷ Lovelace Source #
Constant amount of Lovelace in the system.
class Relation m where Source #
singleton ∷ Domain m → Range m → m Source #
dom ∷ Ord (Domain m) ⇒ m → Set (Domain m) Source #
Domain
range ∷ Ord (Range m) ⇒ 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
(▷) ∷ Ord (Range m) ⇒ m → Set (Range m) → m Source #
Range restriction
Unicode: 25b7
(|>) ∷ Ord (Range m) ⇒ m → Set (Range m) → m Source #
Range restriction
Unicode: 25b7
(⋫) ∷ Ord (Range m) ⇒ m → Set (Range m) → m Source #
Range exclusion
Unicode: 22eb
(|/>) ∷ Ord (Range m) ⇒ m → Set (Range m) → m Source #
Range exclusion
Unicode: 22eb
(∪) ∷ (Ord (Domain m), Ord (Range m)) ⇒ m → m → m Source #
Union
(⨃) ∷ (Ord (Domain m), Ord (Range m), Foldable f) ⇒ m → f (Domain m, Range m) → m Source #
Union Override Right
(<=◁) ∷ Ord (Domain m) ⇒ Domain m → m → m infixl 5 Source #
Restrict domain to values less or equal than the given value.
Unicode: 25c1
(▷<=) ∷ Ord (Range m) ⇒ m → Range m → m infixl 5 Source #
Restrict range to values less or equal than the given value
Unicode: 25b7
(▷>=) ∷ Ord (Range m) ⇒ 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 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 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 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 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 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}