Skip to content

Commit

Permalink
Remove orphan ToJSON instances that were moved to ledger
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmayhew committed Apr 10, 2024
1 parent a5775ec commit c272a12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
4 changes: 2 additions & 2 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ library
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
, cardano-ledger-alonzo
, cardano-ledger-allegra
, cardano-ledger-alonzo >=1.7.1
, cardano-ledger-allegra >=1.4.1
, cardano-ledger-api
, cardano-ledger-babbage
, cardano-ledger-byron
Expand Down
36 changes: 0 additions & 36 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -571,16 +571,6 @@ instance
, "addrs" .= addrs
]


instance ToJSON Allegra.ValidityInterval where
toJSON vi =
Aeson.object $
[ "invalidBefore" .= x | x <- mbfield (Allegra.invalidBefore vi) ]
++ [ "invalidHereafter" .= x | x <- mbfield (Allegra.invalidHereafter vi) ]
where
mbfield SNothing = []
mbfield (SJust x) = [x]

instance
( ToObject (Ledger.EraRuleFailure "PPUP" ledgerera)
, ToJSON (Ledger.TxOut ledgerera)
Expand Down Expand Up @@ -1150,32 +1140,6 @@ instance
toObject verb (Alonzo.UpdateFailure pFailure) =
toObject verb pFailure

deriving newtype instance ToJSON Alonzo.IsValid

instance ToJSON Alonzo.TagMismatchDescription where
toJSON tmd = case tmd of
Alonzo.PassedUnexpectedly ->
object
[ "kind" .= String "TagMismatchDescription"
, "error" .= String "PassedUnexpectedly"
]
Alonzo.FailedUnexpectedly forReasons ->
object
[ "kind" .= String "TagMismatchDescription"
, "error" .= String "FailedUnexpectedly"
, "reconstruction" .= forReasons
]

instance ToJSON Alonzo.FailureDescription where
toJSON f = case f of
Alonzo.PlutusFailure t _bs ->
object
[ "kind" .= String "FailureDescription"
, "error" .= String "PlutusFailure"
, "description" .= t
-- , "reconstructionDetail" .= bs
]

instance
( Ledger.Era ledgerera
, Show (PredicateFailure (Ledger.EraRule "LEDGERS" ledgerera))
Expand Down

0 comments on commit c272a12

Please sign in to comment.