Skip to content

Commit

Permalink
Removed redundant parentheses from field types
Browse files Browse the repository at this point in the history
Soupstraw committed Jan 28, 2025
1 parent 683250b commit 014420f
Showing 18 changed files with 32 additions and 26 deletions.
1 change: 1 addition & 0 deletions eras/allegra/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.7.0.0

* Made the fields of predicate failures and environments lazy
* Add `Era era` constraint to `NoThunks` instance for `TimeLock`
* Remove `Era era` constraint from:
* `getRequireSignatureTimelock`
1 change: 1 addition & 0 deletions eras/alonzo/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.13.0.0

* Made the fields of predicate failures and environments lazy
* Add `MemPack` instance for `Addr28Extra`, `DataHash32`, `AlonzoTxOut` and `PlutusScript AlonzoEra`
* Deprecate `hashAlonzoTxAuxData`
* Stop re-exporting deprecated `AuxiliaryDataHash` from `Cardano.Ledger.Alonzo.TxAuxData`
1 change: 1 addition & 0 deletions eras/babbage/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.11.0.0

* Made the fields of predicate failures and environments lazy
* Add `MemPack` instance for `BabbageTxOut` and `PlutusScript BabbageEra`
* Deprecate `Babbage` type synonym
* Remove crypto parametrization from `BabbageEra`
1 change: 1 addition & 0 deletions eras/conway/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.19.0.0

* Made the fields of predicate failures and environments lazy
* Add `MemPack` instance for `PlutusScript ConwayEra`
* Deprecate `Conway` type synonym
* Remove crypto parametrization from `ConwayEra`
Original file line number Diff line number Diff line change
@@ -561,14 +561,14 @@ ratifySignalL = lens unRatifySignal (\x y -> x {unRatifySignal = y})
instance EraPParams era => NFData (RatifySignal era)

data RatifyEnv era = RatifyEnv
{ reStakeDistr :: (Map (Credential 'Staking) (CompactForm Coin))
{ reStakeDistr :: Map (Credential 'Staking) (CompactForm Coin)
, reStakePoolDistr :: PoolDistr
, reDRepDistr :: (Map DRep (CompactForm Coin))
, reDRepState :: (Map (Credential 'DRepRole) DRepState)
, reDRepDistr :: Map DRep (CompactForm Coin)
, reDRepState :: Map (Credential 'DRepRole) DRepState
, reCurrentEpoch :: EpochNo
, reCommitteeState :: (CommitteeState era)
, reDelegatees :: (Map (Credential 'Staking) DRep)
, rePoolParams :: (Map (KeyHash 'StakePool) PoolParams)
, reCommitteeState :: CommitteeState era
, reDelegatees :: Map (Credential 'Staking) DRep
, rePoolParams :: Map (KeyHash 'StakePool) PoolParams
}
deriving (Generic)

2 changes: 1 addition & 1 deletion eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Cert.hs
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ import GHC.Generics (Generic)
import NoThunks.Class (NoThunks)

data CertEnv era = CertEnv
{ cePParams :: (PParams era)
{ cePParams :: PParams era
, ceCurrentEpoch :: EpochNo
-- ^ Lazy on purpose, because not all certificates need to know the current EpochNo
, ceCurrentCommittee :: StrictMaybe (Committee era)
4 changes: 2 additions & 2 deletions eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Certs.hs
Original file line number Diff line number Diff line change
@@ -86,8 +86,8 @@ import Lens.Micro
import NoThunks.Class (NoThunks (..))

data CertsEnv era = CertsEnv
{ certsTx :: (Tx era)
, certsPParams :: (PParams era)
{ certsTx :: Tx era
, certsPParams :: PParams era
, certsCurrentEpoch :: EpochNo
-- ^ Lazy on purpose, because not all certificates need to know the current EpochNo
, certsCurrentCommittee :: StrictMaybe (Committee era)
6 changes: 3 additions & 3 deletions eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Gov.hs
Original file line number Diff line number Diff line change
@@ -139,9 +139,9 @@ import Validation (failureUnless)
data GovEnv era = GovEnv
{ geTxId :: TxId
, geEpoch :: EpochNo
, gePParams :: (PParams era)
, gePPolicy :: (StrictMaybe ScriptHash)
, geCertState :: (CertState era)
, gePParams :: PParams era
, gePPolicy :: StrictMaybe ScriptHash
, geCertState :: CertState era
}
deriving (Generic)

Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ import Lens.Micro ((&), (.~), (^.))
import NoThunks.Class (NoThunks (..))

data ConwayGovCertEnv era = ConwayGovCertEnv
{ cgcePParams :: (PParams era)
{ cgcePParams :: PParams era
, cgceCurrentEpoch :: EpochNo
-- ^ Lazy on purpose, because not all certificates need to know the current EpochNo
, cgceCurrentCommittee :: StrictMaybe (Committee era)
1 change: 1 addition & 0 deletions eras/shelley/impl/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.16.0.0

* Made the fields of predicate failures and environments lazy
* Changed the type of `sgSecurityParam` to `NonZero Word64`
* Following functions now expect a `NonZero Word64` security parameter:
* `startStep`
Original file line number Diff line number Diff line change
@@ -86,7 +86,7 @@ data DelegEnv era = DelegEnv
-- ^ Lazy on purpose, because not all certificates need to know the current EpochNo
, ptr_ :: Ptr
, acnt_ :: AccountState
, ppDE :: (PParams era) -- The protocol parameters are only used for the HardFork mechanism
, ppDE :: PParams era -- The protocol parameters are only used for the HardFork mechanism
}
deriving (Generic)

4 changes: 2 additions & 2 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Delegs.hs
Original file line number Diff line number Diff line change
@@ -103,8 +103,8 @@ data DelegsEnv era = DelegsEnv
, delegsEpochNo :: EpochNo
-- ^ Lazy on purpose, because not all certificates need to know the current EpochNo
, delegsIx :: TxIx
, delegspp :: (PParams era)
, delegsTx :: (Tx era)
, delegspp :: PParams era
, delegsTx :: Tx era
, delegsAccount :: AccountState
}

4 changes: 2 additions & 2 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Ledger.hs
Original file line number Diff line number Diff line change
@@ -91,9 +91,9 @@ import NoThunks.Class (NoThunks (..))

data LedgerEnv era = LedgerEnv
{ ledgerSlotNo :: SlotNo
, ledgerEpochNo :: (Maybe EpochNo)
, ledgerEpochNo :: Maybe EpochNo
, ledgerIx :: TxIx
, ledgerPp :: (PParams era)
, ledgerPp :: PParams era
, ledgerAccount :: AccountState
, ledgerMempool :: Bool
}
4 changes: 2 additions & 2 deletions eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Newpp.hs
Original file line number Diff line number Diff line change
@@ -45,8 +45,8 @@ data ShelleyNewppState era
= NewppState (PParams era) (ShelleyGovState era)

data NewppEnv era = NewppEnv
{ neCertState :: (CertState era)
, neUTxOState :: (UTxOState era)
{ neCertState :: CertState era
, neUTxOState :: UTxOState era
}

instance
Original file line number Diff line number Diff line change
@@ -58,9 +58,9 @@ applyTxMempoolEnv pp =

data ApplyTxEnv era = ApplyTxEnv
{ ateGlobals :: Globals
, ateMempoolEnv :: (MempoolEnv era)
, ateState :: (LedgerState era)
, ateTx :: (Tx era)
, ateMempoolEnv :: MempoolEnv era
, ateState :: LedgerState era
, ateTx :: Tx era
}
deriving (Generic)

Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ data GenSize = GenSize
deriving (Show)

data GenEnv era = GenEnv
{ gePParams :: (PParams era)
{ gePParams :: PParams era
, geSize :: GenSize
}

1 change: 1 addition & 0 deletions libs/cardano-protocol-tpraos/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@

## 1.4.0.0

* Made the fields of predicate failures and environments lazy
* Move `Crypto` and `StandardCrypto` definitions from `cardano-ledger-core` into new
`Cardano.Protocol.Crypto` module.
* Remove crypto parametrization from types:
Original file line number Diff line number Diff line change
@@ -61,8 +61,8 @@ import NoThunks.Class (NoThunks (..))
import Quiet

data OCertEnv = OCertEnv
{ ocertEnvStPools :: (Set (KeyHash 'StakePool))
, ocertEnvGenDelegs :: (Set (KeyHash 'GenesisDelegate))
{ ocertEnvStPools :: Set (KeyHash 'StakePool)
, ocertEnvGenDelegs :: Set (KeyHash 'GenesisDelegate)
}
deriving (Show, Eq)

0 comments on commit 014420f

Please sign in to comment.