Skip to content

Commit

Permalink
Remove unused BuildableInAnyEra type. (#4291)
Browse files Browse the repository at this point in the history
## Issue

None. Noticed while reviewing code.

## Description

This PR removes the unused `BuildableInAnyEra` type.
  • Loading branch information
jonathanknowles authored Dec 4, 2023
2 parents 6f08c79 + 86f373a commit 1f8ed30
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions lib/balance-tx/lib/internal/Internal/Cardano/Write/Tx/Balance.hs
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ import Data.Monoid.Monus
import Data.Semigroup.Cancellative
( Reductive ((</>))
)
import Data.Type.Equality
( (:~:) (..)
, testEquality
)
import Fmt
( Buildable
, Builder
Expand Down Expand Up @@ -325,25 +321,6 @@ import qualified Data.Map as Map
import qualified Data.Sequence.Strict as StrictSeq
import qualified Data.Set as Set

-- | Helper wrapper type for the sake of logging.
data BuildableInAnyEra tx = forall era.
( Eq (tx era)
, Show (tx era)
, Buildable (tx era)
) => BuildableInAnyEra (CardanoApi.CardanoEra era) (tx era)

instance Show (BuildableInAnyEra a) where
show (BuildableInAnyEra _ a) = show a

instance Eq (BuildableInAnyEra a) where
BuildableInAnyEra era1 thing1 == BuildableInAnyEra era2 thing2 =
case testEquality era1 era2 of
Just Refl -> thing1 == thing2
Nothing -> False

instance Buildable (BuildableInAnyEra a) where
build (BuildableInAnyEra _ x) = build x

-- | Indicates a failure to select a sufficient amount of collateral.
--
data ErrBalanceTxInsufficientCollateralError era =
Expand Down

0 comments on commit 1f8ed30

Please sign in to comment.