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

module Main where

import Cardano.Ledger.Shelley (ShelleyEra)
import Test.Cardano.Ledger.Core.JSON (roundTripJsonEraSpec)
import Test.Cardano.Ledger.Era
import qualified Test.Cardano.Ledger.Shelley.Binary.CddlSpec as Cddl
import qualified Test.Cardano.Ledger.Shelley.BinarySpec as Binary
import qualified Test.Cardano.Ledger.Shelley.Imp as Imp
import Test.Cardano.Ledger.Shelley.JSON (roundTripJsonShelleyEraSpec)

instance EraSpec ShelleyEra where
  eraImpSpec :: Proxy ShelleyEra -> Spec
eraImpSpec Proxy ShelleyEra
era = do
    Proxy ShelleyEra -> Spec
forall era (proxy :: * -> *).
(ShelleyEraImp era, ShelleyEraAccounts era) =>
proxy era -> Spec
Imp.shelleyToBabbageSpec Proxy ShelleyEra
era
    Proxy ShelleyEra -> Spec
forall (proxy :: * -> *) era.
(ShelleyEraImp era, Event (EraRule "RUPD" era) ~ RupdEvent) =>
proxy era -> Spec
Imp.spec Proxy ShelleyEra
era

main :: IO ()
IO ()
main =
  forall era. EraSpec era => Spec -> IO ()
ledgerEraTestMain @ShelleyEra (Spec -> IO ()) -> Spec -> IO ()
forall a b. (a -> b) -> a -> b
$ do
    Spec
Binary.spec
    Spec
Cddl.spec
    forall era. (HasCallStack, EraTest era) => Spec
roundTripJsonEraSpec @ShelleyEra
    forall era. ShelleyEraTest era => Spec
roundTripJsonShelleyEraSpec @ShelleyEra