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

module Cardano.Ledger.Dijkstra.Forecast () where

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

instance EraForecast DijkstraEra where
  type Forecast t DijkstraEra = BabbageForecast t DijkstraEra
  mkForecast :: forall (t :: Timeline).
NewEpochState DijkstraEra -> Forecast t DijkstraEra
mkForecast = NewEpochState DijkstraEra -> BabbageForecast t DijkstraEra
NewEpochState DijkstraEra -> Forecast t DijkstraEra
forall era (t :: Timeline).
EraGov era =>
NewEpochState era -> BabbageForecast t era
mkBabbageForecast
  poolDistrForecastL :: forall (t :: Timeline). Lens' (Forecast t DijkstraEra) PoolDistr
poolDistrForecastL = (PoolDistr -> f PoolDistr)
-> BabbageForecast t DijkstraEra
-> f (BabbageForecast t DijkstraEra)
(PoolDistr -> f PoolDistr)
-> Forecast t DijkstraEra -> f (Forecast t DijkstraEra)
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 DijkstraEra) Word16
maxBlockHeaderSizeForecastL = (Word16 -> f Word16)
-> BabbageForecast t DijkstraEra
-> f (BabbageForecast t DijkstraEra)
(Word16 -> f Word16)
-> Forecast t DijkstraEra -> f (Forecast t DijkstraEra)
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 DijkstraEra) Word32
maxBlockBodySizeForecastL = (Word32 -> f Word32)
-> BabbageForecast t DijkstraEra
-> f (BabbageForecast t DijkstraEra)
(Word32 -> f Word32)
-> Forecast t DijkstraEra -> f (Forecast t DijkstraEra)
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 DijkstraEra) ProtVer
protocolVersionForecastL = (ProtVer -> f ProtVer)
-> BabbageForecast t DijkstraEra
-> f (BabbageForecast t DijkstraEra)
(ProtVer -> f ProtVer)
-> Forecast t DijkstraEra -> f (Forecast t DijkstraEra)
forall (t :: Timeline) era (f :: * -> *).
Functor f =>
(ProtVer -> f ProtVer)
-> BabbageForecast t era -> f (BabbageForecast t era)
bfProtocolVersionL