{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}

-- | Mostly for backward compatibility as many modules import
--   this one to get 'pparamsSpec'
module Test.Cardano.Ledger.Constrained.Conway.PParams where

import Cardano.Ledger.Core (PParams (..))
import Constrained.API
import Test.Cardano.Ledger.Constrained.Conway.Instances.PParams (
  EraSpecPParams (..),
  simplePParamsSpec,
 )

pparamsSpec ::
  forall era. EraSpecPParams era => Specification (PParams era)
pparamsSpec :: forall era. EraSpecPParams era => Specification (PParams era)
pparamsSpec = forall a p.
(Cases (SimpleRep a) ~ '[SimpleRep a],
 TypeSpec a ~ TypeSpec (SimpleRep a), HasSpec (SimpleRep a),
 HasSimpleRep a, All HasSpec (Args (SimpleRep a)),
 IsProd (SimpleRep a), HasSpec a, IsPred p) =>
FunTy (MapList Term (Args (SimpleRep a))) p -> Specification a
constrained' forall a b. (a -> b) -> a -> b
$ \Term (SimplePParams era)
simplepp -> forall a. HasSpec a => Term a -> Specification a -> Pred
satisfies Term (SimplePParams era)
simplepp (forall era. EraSpecPParams era => Specification (SimplePParams era)
simplePParamsSpec @era)