{-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -Wno-orphans #-} module Cardano.Ledger.Allegra.Forecast () where import Cardano.Ledger.Allegra.Era (AllegraEra) import Cardano.Ledger.Allegra.PParams () import Cardano.Ledger.Allegra.State.CertState () import Cardano.Ledger.Shelley ( ShelleyForecast (..), mkShelleyForecast, sfDecentralizationL, sfExtraEntropyL, sfGenDelegsL, sfMaxBlockBodySizeL, sfMaxBlockHeaderSizeL, sfPoolDistrL, sfProtocolVersionL, ) import Cardano.Ledger.Shelley.API.Forecast (EraForecast (..), ShelleyEraForecast (..)) instance EraForecast AllegraEra where type Forecast t AllegraEra = ShelleyForecast t AllegraEra mkForecast :: forall (t :: Timeline). NewEpochState AllegraEra -> Forecast t AllegraEra mkForecast = NewEpochState AllegraEra -> Forecast t AllegraEra NewEpochState AllegraEra -> ShelleyForecast t AllegraEra forall era (t :: Timeline). (AtMostEra "Alonzo" era, EraGov era, EraCertState era) => NewEpochState era -> ShelleyForecast t era mkShelleyForecast poolDistrForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) PoolDistr poolDistrForecastL = (PoolDistr -> f PoolDistr) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (PoolDistr -> f PoolDistr) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (PoolDistr -> f PoolDistr) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfPoolDistrL maxBlockHeaderSizeForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) Word16 maxBlockHeaderSizeForecastL = (Word16 -> f Word16) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (Word16 -> f Word16) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (Word16 -> f Word16) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfMaxBlockHeaderSizeL maxBlockBodySizeForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) Word32 maxBlockBodySizeForecastL = (Word32 -> f Word32) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (Word32 -> f Word32) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (Word32 -> f Word32) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfMaxBlockBodySizeL protocolVersionForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) ProtVer protocolVersionForecastL = (ProtVer -> f ProtVer) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (ProtVer -> f ProtVer) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (ProtVer -> f ProtVer) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfProtocolVersionL instance ShelleyEraForecast AllegraEra where genDelegsForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) GenDelegs genDelegsForecastL = (GenDelegs -> f GenDelegs) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (GenDelegs -> f GenDelegs) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (GenDelegs -> f GenDelegs) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfGenDelegsL decentralizationForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) UnitInterval decentralizationForecastL = (UnitInterval -> f UnitInterval) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (UnitInterval -> f UnitInterval) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (UnitInterval -> f UnitInterval) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfDecentralizationL extraEntropyForecastL :: forall (t :: Timeline). Lens' (Forecast t AllegraEra) Nonce extraEntropyForecastL = (Nonce -> f Nonce) -> Forecast t AllegraEra -> f (Forecast t AllegraEra) (Nonce -> f Nonce) -> ShelleyForecast t AllegraEra -> f (ShelleyForecast t AllegraEra) forall (t :: Timeline) era (f :: * -> *). Functor f => (Nonce -> f Nonce) -> ShelleyForecast t era -> f (ShelleyForecast t era) sfExtraEntropyL