Skip to content

Commit

Permalink
Rename MaybeInRecentEra to InAnyEra.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed May 31, 2023
1 parent ac6c279 commit 2b7ad9e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/wallet/src/Cardano/Wallet/Primitive/Types.hs
Expand Up @@ -176,7 +176,7 @@ import Cardano.Wallet.Primitive.Types.Tx.Tx
import Cardano.Wallet.Util
( ShowFmt (..), parseURI, uriToText )
import Cardano.Wallet.Write.Tx
( MaybeInRecentEra )
( InAnyEra )
import Control.Arrow
( left, right )
import Control.DeepSeq
Expand Down Expand Up @@ -886,7 +886,7 @@ data ProtocolParameters = ProtocolParameters
-- transaction, based on the 'ExecutionUnits' needed by the use of
-- the script.
, currentLedgerProtocolParameters
:: MaybeInRecentEra Write.ProtocolParameters
:: InAnyEra Write.ProtocolParameters
-- ^ The full, raw ledger protocol parameters for writing (constructing)
-- transactions in case the node is in a recent era.
} deriving (Eq, Generic, Show)
Expand Down
10 changes: 5 additions & 5 deletions lib/wallet/src/Cardano/Wallet/Write/Tx.hs
Expand Up @@ -36,7 +36,7 @@ module Cardano.Wallet.Write.Tx
, IsRecentEra (..)
, toRecentEra
, fromRecentEra
, MaybeInRecentEra (..)
, InAnyEra (..)
, InRecentEra (..)
, InBygoneEra (..)
, toRecentEraGADT
Expand Down Expand Up @@ -360,7 +360,7 @@ cardanoEra = cardanoEraFromRecentEra $ recentEra @era
shelleyBasedEra :: forall era. IsRecentEra era => Cardano.ShelleyBasedEra era
shelleyBasedEra = shelleyBasedEraFromRecentEra $ recentEra @era

data MaybeInRecentEra (thing :: Type -> Type)
data InAnyEra (thing :: Type -> Type)
= InBygoneEra !(InBygoneEra)
| InRecentEra !(InRecentEra thing)

Expand All @@ -377,17 +377,17 @@ data InRecentEra (thing :: Type -> Type)
| InEraConway !(thing ConwayEra)

deriving instance (Eq (a BabbageEra), (Eq (a ConwayEra)))
=> Eq (MaybeInRecentEra a)
=> Eq (InAnyEra a)
deriving instance (Show (a BabbageEra), (Show (a ConwayEra)))
=> Show (MaybeInRecentEra a)
=> Show (InAnyEra a)

deriving instance (Eq (a BabbageEra), (Eq (a ConwayEra)))
=> Eq (InRecentEra a)
deriving instance (Show (a BabbageEra), (Show (a ConwayEra)))
=> Show (InRecentEra a)

toRecentEraGADT
:: MaybeInRecentEra a
:: InAnyEra a
-> Either Cardano.AnyCardanoEra (InAnyRecentEra a)
toRecentEraGADT = \case
InBygoneEra e -> Left $ inBygoneEra e
Expand Down

0 comments on commit 2b7ad9e

Please sign in to comment.