{-# LANGUAGE TypeFamilies #-}
{-# OPTIONS_GHC -Wno-orphans #-}

module Cardano.Ledger.Conway.Forecast () where

import Cardano.Ledger.Babbage (
  BabbageForecast (..),
  bfMaxBlockBodySizeL,
  bfMaxBlockHeaderSizeL,
  bfPoolDistrL,
  bfProtocolVersionL,
  mkBabbageForecast,
 )
import Cardano.Ledger.Conway.Era (ConwayEra)
import Cardano.Ledger.Conway.Governance ()
import Cardano.Ledger.Conway.Rules ()
import Cardano.Ledger.Conway.State.CertState ()
import Cardano.Ledger.Shelley.API.Forecast (EraForecast (..))

instance EraForecast ConwayEra where
  type Forecast t ConwayEra = BabbageForecast t ConwayEra
  mkForecast :: forall (t :: Timeline).
NewEpochState ConwayEra -> Forecast t ConwayEra
mkForecast = NewEpochState ConwayEra -> BabbageForecast t ConwayEra
NewEpochState ConwayEra -> Forecast t ConwayEra
forall era (t :: Timeline).
EraGov era =>
NewEpochState era -> BabbageForecast t era
mkBabbageForecast
  poolDistrForecastL :: forall (t :: Timeline). Lens' (Forecast t ConwayEra) PoolDistr
poolDistrForecastL = (PoolDistr -> f PoolDistr)
-> BabbageForecast t ConwayEra -> f (BabbageForecast t ConwayEra)
(PoolDistr -> f PoolDistr)
-> Forecast t ConwayEra -> f (Forecast t ConwayEra)
forall (t :: Timeline) era (f :: * -> *).
Functor f =>
(PoolDistr -> f PoolDistr)
-> BabbageForecast t era -> f (BabbageForecast t era)
bfPoolDistrL
  maxBlockHeaderSizeForecastL :: forall (t :: Timeline). Lens' (Forecast t ConwayEra) Word16
maxBlockHeaderSizeForecastL = (Word16 -> f Word16)
-> BabbageForecast t ConwayEra -> f (BabbageForecast t ConwayEra)
(Word16 -> f Word16)
-> Forecast t ConwayEra -> f (Forecast t ConwayEra)
forall (t :: Timeline) era (f :: * -> *).
Functor f =>
(Word16 -> f Word16)
-> BabbageForecast t era -> f (BabbageForecast t era)
bfMaxBlockHeaderSizeL
  maxBlockBodySizeForecastL :: forall (t :: Timeline). Lens' (Forecast t ConwayEra) Word32
maxBlockBodySizeForecastL = (Word32 -> f Word32)
-> BabbageForecast t ConwayEra -> f (BabbageForecast t ConwayEra)
(Word32 -> f Word32)
-> Forecast t ConwayEra -> f (Forecast t ConwayEra)
forall (t :: Timeline) era (f :: * -> *).
Functor f =>
(Word32 -> f Word32)
-> BabbageForecast t era -> f (BabbageForecast t era)
bfMaxBlockBodySizeL
  protocolVersionForecastL :: forall (t :: Timeline). Lens' (Forecast t ConwayEra) ProtVer
protocolVersionForecastL = (ProtVer -> f ProtVer)
-> BabbageForecast t ConwayEra -> f (BabbageForecast t ConwayEra)
(ProtVer -> f ProtVer)
-> Forecast t ConwayEra -> f (Forecast t ConwayEra)
forall (t :: Timeline) era (f :: * -> *).
Functor f =>
(ProtVer -> f ProtVer)
-> BabbageForecast t era -> f (BabbageForecast t era)
bfProtocolVersionL