Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Version
- getVersion ∷ Integral i ⇒ Version → i
- type MinVersion = 0
- type MaxVersion = 11
- natVersion ∷ ∀ v. (KnownNat v, MinVersion <= v, v <= MaxVersion) ⇒ Version
- natVersionProxy ∷ (KnownNat v, MinVersion <= v, v <= MaxVersion) ⇒ Proxy v → Version
- succVersion ∷ MonadFail m ⇒ Version → m Version
- mkVersion ∷ (Integral i, MonadFail m) ⇒ i → m Version
- mkVersion64 ∷ MonadFail m ⇒ Word64 → m Version
- getVersion64 ∷ Version → Word64
- allVersions ∷ [Version]
- byronProtVer ∷ Version
- shelleyProtVer ∷ Version
Versioning
Protocol version number that is used during encoding and decoding. All supported
versions are in the range from MinVersion
to MaxVersion
.
Instances
FromJSON Version Source # | |
ToJSON Version Source # | |
Bounded Version Source # | |
Enum Version Source # | |
Defined in Cardano.Ledger.Binary.Version succ ∷ Version → Version Source # pred ∷ Version → Version Source # toEnum ∷ Int → Version Source # fromEnum ∷ Version → Int Source # enumFrom ∷ Version → [Version] Source # enumFromThen ∷ Version → Version → [Version] Source # enumFromTo ∷ Version → Version → [Version] Source # enumFromThenTo ∷ Version → Version → Version → [Version] Source # | |
Show Version Source # | |
FromCBOR Version Source # | |
ToCBOR Version Source # | |
DecCBOR Version Source # | |
EncCBOR Version Source # | |
NFData Version Source # | |
Defined in Cardano.Ledger.Binary.Version | |
Eq Version Source # | |
Ord Version Source # | |
Defined in Cardano.Ledger.Binary.Version | |
NoThunks Version Source # | |
getVersion ∷ Integral i ⇒ Version → i Source #
type MinVersion = 0 Source #
Minimum supported version
type MaxVersion = 11 Source #
Maximum supported version. This is the major protocol version of the latest known protocol version that we want to support, including for development and testing.
natVersion ∷ ∀ v. (KnownNat v, MinVersion <= v, v <= MaxVersion) ⇒ Version Source #
Same as natVersionProxy
, construct a version from a type level Nat
, except it can be
supplied through TypeApplications
.
natVersionProxy ∷ (KnownNat v, MinVersion <= v, v <= MaxVersion) ⇒ Proxy v → Version Source #
mkVersion ∷ (Integral i, MonadFail m) ⇒ i → m Version Source #
Construct a Version
and fail if the supplied value is not a supported version number.
mkVersion64 ∷ MonadFail m ⇒ Word64 → m Version Source #
Construct a Version
and fail if the supplied value is not supported version number.
allVersions ∷ [Version] Source #