| Copyright | (c) 2025 GYELD GMBH |
|---|---|
| License | Apache 2.0 |
| Maintainer | [email protected] |
| Stability | develop |
| Safe Haskell | None |
| Language | GHC2021 |
GeniusYield.Types.Reexpose
Description
Synopsis
- newtype Port = Port {}
- data DnsName
- data Network
- class Bounded r => BoundedRational r where
- boundRational :: Rational -> Maybe r
- unboundRational :: r -> Rational
- data UnitInterval
- data ProtVer = ProtVer {}
- data GovRelation (f :: Type -> Type) era = GovRelation {
- grPParamUpdate :: !(f (GovPurposeId 'PParamUpdatePurpose era))
- grHardFork :: !(f (GovPurposeId 'HardForkPurpose era))
- grCommittee :: !(f (GovPurposeId 'CommitteePurpose era))
- grConstitution :: !(f (GovPurposeId 'ConstitutionPurpose era))
- data PRoot a = PRoot {
- prRoot :: !(StrictMaybe a)
- prChildren :: !(Set a)
- newtype PGraph a = PGraph {}
- module Cardano.Ledger.Binary.Version
Documentation
Constructors
| Port | |
Fields | |
Instances
| FromJSON Port | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON Port | |||||
| DecCBOR Port | |||||
| EncCBOR Port | |||||
| NFData Port | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic Port | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Num Port | |||||
| Show Port | |||||
| Eq Port | |||||
| Ord Port | |||||
| NoThunks Port | |||||
| type Rep Port | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Port = D1 ('MetaData "Port" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-4816f6493dd543b78767f05e25bc94667cc1a25332fefdec96fe01e511f97bc7" 'True) (C1 ('MetaCons "Port" 'PrefixI 'True) (S1 ('MetaSel ('Just "portToWord16") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16))) | |||||
Instances
| FromJSON DnsName | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON DnsName | |||||
| DecCBOR DnsName | |||||
| EncCBOR DnsName | |||||
| NFData DnsName | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic DnsName | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show DnsName | |||||
| Eq DnsName | |||||
| Ord DnsName | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NoThunks DnsName | |||||
| type Rep DnsName | |||||
Defined in Cardano.Ledger.BaseTypes type Rep DnsName = D1 ('MetaData "DnsName" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-4816f6493dd543b78767f05e25bc94667cc1a25332fefdec96fe01e511f97bc7" 'True) (C1 ('MetaCons "DnsName" 'PrefixI 'True) (S1 ('MetaSel ('Just "dnsToText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
Instances
| FromJSON Network | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON Network | |||||
| FromCBOR Network | |||||
| ToCBOR Network | |||||
| DecCBOR Network | |||||
| EncCBOR Network | |||||
| Default Network | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NFData Network | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Bounded Network | |||||
| Enum Network | |||||
| Generic Network | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show Network | |||||
| Eq Network | |||||
| Ord Network | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NoThunks Network | |||||
| type Rep Network | |||||
Defined in Cardano.Ledger.BaseTypes type Rep Network = D1 ('MetaData "Network" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-4816f6493dd543b78767f05e25bc94667cc1a25332fefdec96fe01e511f97bc7" 'False) (C1 ('MetaCons "Testnet" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mainnet" 'PrefixI 'False) (U1 :: Type -> Type)) | |||||
class Bounded r => BoundedRational r where #
Type clases that allows conversion between Rational and some form of bounded
rational type. Bounds can be restricted by both the Bounded type class and underlyng
representation.
maybe True (\br -> minBound <= br && br <= maxBound) . boundRational
Roundtrip properties must hold:
\r -> maybe True ((r ==) . unboundRational) (boundRational r) \br -> Just br == boundRational (unboundRational br)
Methods
boundRational :: Rational -> Maybe r #
Returns Nothing when supplied value is not within bounds or when precision is
too high to be represented by the underlying type
Example
>>>:set -XTypeApplications>>>import Data.Ratio>>>boundRational @UnitInterval $ 2 % 3Just (2 % 3)>>>boundRational @UnitInterval (-0.5)Nothing>>>boundRational @UnitInterval (1.5)Nothing>>>boundRational @UnitInterval 0Just (0 % 1)>>>boundRational @PositiveUnitInterval 0Nothing
unboundRational :: r -> Rational #
Promote bounded rational type into the unbounded Rational.
Instances
| BoundedRational NonNegativeInterval | |
Defined in Cardano.Ledger.BaseTypes Methods | |
| BoundedRational PositiveInterval | |
Defined in Cardano.Ledger.BaseTypes Methods | |
| BoundedRational PositiveUnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods | |
| BoundedRational UnitInterval | |
Defined in Cardano.Ledger.BaseTypes Methods boundRational :: Rational -> Maybe UnitInterval # unboundRational :: UnitInterval -> Rational # | |
| (Bounded (BoundedRatio b a), Bounded a, Integral a) => BoundedRational (BoundedRatio b a) | |
Defined in Cardano.Ledger.BaseTypes Methods boundRational :: Rational -> Maybe (BoundedRatio b a) # unboundRational :: BoundedRatio b a -> Rational # | |
data UnitInterval #
Type to represent a value in the unit interval [0; 1]
Instances
Instances
| FromJSON ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| ToJSON ProtVer | |||||
| FromCBOR ProtVer | |||||
| ToCBOR ProtVer | |||||
| DecCBOR ProtVer | |||||
| EncCBOR ProtVer | |||||
| DecCBORGroup ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes Methods decCBORGroup :: Decoder s ProtVer # | |||||
| EncCBORGroup ProtVer | |||||
| ToPlutusData ProtVer | |||||
Defined in Cardano.Ledger.Plutus.ToPlutusData | |||||
| NFData ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| Generic ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes Associated Types
| |||||
| Show ProtVer | |||||
| Eq ProtVer | |||||
| Ord ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes | |||||
| NoThunks ProtVer | |||||
| type Rep ProtVer | |||||
Defined in Cardano.Ledger.BaseTypes type Rep ProtVer = D1 ('MetaData "ProtVer" "Cardano.Ledger.BaseTypes" "cardano-ledger-core-1.17.0.0-4816f6493dd543b78767f05e25bc94667cc1a25332fefdec96fe01e511f97bc7" 'False) (C1 ('MetaCons "ProtVer" 'PrefixI 'True) (S1 ('MetaSel ('Just "pvMajor") 'NoSourceUnpackedness 'SourceStrict 'DecidedUnpack) (Rec0 Version) :*: S1 ('MetaSel ('Just "pvMinor") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Natural))) | |||||
data GovRelation (f :: Type -> Type) era #
Abstract data type for representing relationship of governance action with the same purpose
Constructors
| GovRelation | |
Fields
| |
Instances
| (Era era, forall (p :: GovActionPurpose). ToJSON (f (GovPurposeId p era))) => ToJSON (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods toJSON :: GovRelation f era -> Value # toEncoding :: GovRelation f era -> Encoding # toJSONList :: [GovRelation f era] -> Value # toEncodingList :: [GovRelation f era] -> Encoding # omitField :: GovRelation f era -> Bool # | |||||
| (Era era, Typeable f, forall (p :: GovActionPurpose). Typeable p => DecCBOR (f (GovPurposeId p era))) => DecCBOR (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods decCBOR :: Decoder s (GovRelation f era) # dropCBOR :: Proxy (GovRelation f era) -> Decoder s () # label :: Proxy (GovRelation f era) -> Text # | |||||
| (Era era, Typeable f, forall (p :: GovActionPurpose). Typeable p => EncCBOR (f (GovPurposeId p era))) => EncCBOR (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods encCBOR :: GovRelation f era -> Encoding # encodedSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy (GovRelation f era) -> Size # encodedListSizeExpr :: (forall t. EncCBOR t => Proxy t -> Size) -> Proxy [GovRelation f era] -> Size # | |||||
| (forall (p :: GovActionPurpose). Default (f (GovPurposeId p era))) => Default (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods def :: GovRelation f era # | |||||
| (forall (p :: GovActionPurpose). NFData (f (GovPurposeId p era))) => NFData (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods rnf :: GovRelation f era -> () # | |||||
| (forall (p :: GovActionPurpose). Monoid (f (GovPurposeId p era))) => Monoid (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods mempty :: GovRelation f era # mappend :: GovRelation f era -> GovRelation f era -> GovRelation f era # mconcat :: [GovRelation f era] -> GovRelation f era # | |||||
| (forall (p :: GovActionPurpose). Semigroup (f (GovPurposeId p era))) => Semigroup (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods (<>) :: GovRelation f era -> GovRelation f era -> GovRelation f era # sconcat :: NonEmpty (GovRelation f era) -> GovRelation f era # stimes :: Integral b => b -> GovRelation f era -> GovRelation f era # | |||||
| Generic (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Associated Types
Methods from :: GovRelation f era -> Rep (GovRelation f era) x # to :: Rep (GovRelation f era) x -> GovRelation f era # | |||||
| (forall (p :: GovActionPurpose). Show (f (GovPurposeId p era))) => Show (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods showsPrec :: Int -> GovRelation f era -> ShowS # show :: GovRelation f era -> String # showList :: [GovRelation f era] -> ShowS # | |||||
| (forall (p :: GovActionPurpose). Eq (f (GovPurposeId p era))) => Eq (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods (==) :: GovRelation f era -> GovRelation f era -> Bool # (/=) :: GovRelation f era -> GovRelation f era -> Bool # | |||||
| (forall (p :: GovActionPurpose). NoThunks (f (GovPurposeId p era))) => NoThunks (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures Methods noThunks :: Context -> GovRelation f era -> IO (Maybe ThunkInfo) # wNoThunks :: Context -> GovRelation f era -> IO (Maybe ThunkInfo) # showTypeOf :: Proxy (GovRelation f era) -> String # | |||||
| type Rep (GovRelation f era) | |||||
Defined in Cardano.Ledger.Conway.Governance.Procedures type Rep (GovRelation f era) = D1 ('MetaData "GovRelation" "Cardano.Ledger.Conway.Governance.Procedures" "cardano-ledger-conway-1.19.0.0-b76bb97b04d8061031f2334df9d2de626eaa8b08fd77b042c133904e9d2a5e06" 'False) (C1 ('MetaCons "GovRelation" 'PrefixI 'True) ((S1 ('MetaSel ('Just "grPParamUpdate") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f (GovPurposeId 'PParamUpdatePurpose era))) :*: S1 ('MetaSel ('Just "grHardFork") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f (GovPurposeId 'HardForkPurpose era)))) :*: (S1 ('MetaSel ('Just "grCommittee") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f (GovPurposeId 'CommitteePurpose era))) :*: S1 ('MetaSel ('Just "grConstitution") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (f (GovPurposeId 'ConstitutionPurpose era)))))) | |||||
The root of a single Proposals tree. prRoot is always expected
to be equal to the respective PrevGovActionId at the end of every
epoch boundary
Constructors
| PRoot | |
Fields
| |
Instances
| Default (PRoot a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| NFData a => NFData (PRoot a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| Generic (PRoot a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals Associated Types
| |||||
| Show a => Show (PRoot a) | |||||
| Eq a => Eq (PRoot a) | |||||
| Ord a => Ord (PRoot a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| NoThunks a => NoThunks (PRoot a) | |||||
| type Rep (PRoot a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals type Rep (PRoot a) = D1 ('MetaData "PRoot" "Cardano.Ledger.Conway.Governance.Proposals" "cardano-ledger-conway-1.19.0.0-b76bb97b04d8061031f2334df9d2de626eaa8b08fd77b042c133904e9d2a5e06" 'False) (C1 ('MetaCons "PRoot" 'PrefixI 'True) (S1 ('MetaSel ('Just "prRoot") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (StrictMaybe a)) :*: S1 ('MetaSel ('Just "prChildren") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 (Set a)))) | |||||
A single proposal-tree. This map represents all the action-ids that form a tree.
Instances
| Default (PGraph a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| NFData a => NFData (PGraph a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| Generic (PGraph a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals Associated Types
| |||||
| Show a => Show (PGraph a) | |||||
| Eq a => Eq (PGraph a) | |||||
| Ord a => Ord (PGraph a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals | |||||
| NoThunks a => NoThunks (PGraph a) | |||||
| type Rep (PGraph a) | |||||
Defined in Cardano.Ledger.Conway.Governance.Proposals type Rep (PGraph a) = D1 ('MetaData "PGraph" "Cardano.Ledger.Conway.Governance.Proposals" "cardano-ledger-conway-1.19.0.0-b76bb97b04d8061031f2334df9d2de626eaa8b08fd77b042c133904e9d2a5e06" 'True) (C1 ('MetaCons "PGraph" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPGraph") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map a (PEdges a))))) | |||||