From 05e7721e436a48d0788c65b480ce8d2b666dd40a Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Tue, 31 Dec 2024 16:57:55 +0000 Subject: [PATCH] Add root for Hydra.Model.Payment.IsTx and remove unused Payment instances --- hydra-node/test/Hydra/Model/Payment.hs | 8 -------- weeder.toml | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hydra-node/test/Hydra/Model/Payment.hs b/hydra-node/test/Hydra/Model/Payment.hs index 275d06aa6d0..aaa2d715275 100644 --- a/hydra-node/test/Hydra/Model/Payment.hs +++ b/hydra-node/test/Hydra/Model/Payment.hs @@ -16,8 +16,6 @@ import Hydra.Tx.IsTx (IsTx (..)) import Test.Hydra.Tx.Fixture (testNetworkId) import Test.Hydra.Tx.Gen (genKeyPair) import Test.QuickCheck (choose) -import Test.QuickCheck.StateModel (HasVariables) -import Test.QuickCheck.StateModel.Variables (HasVariables (..)) import Prelude qualified -- NOTE: New type wrapper to add Ord and Eq instances to signing keys @@ -72,18 +70,12 @@ instance Show Payment where <> show value <> " }" -instance Arbitrary Payment where - arbitrary = error "don't use" - instance ToCBOR Payment where toCBOR = error "don't use" instance FromCBOR Payment where fromCBOR = error "don't use" -instance HasVariables Payment where - getAllVariables _ = mempty - -- | Making `Payment` an instance of `IsTx` allows us to use it with `HeadLogic'`s messages. instance IsTx Payment where type TxIdType Payment = Int diff --git a/weeder.toml b/weeder.toml index 90ee4f6de9f..379b7f034e5 100644 --- a/weeder.toml +++ b/weeder.toml @@ -33,6 +33,8 @@ root-instances = [ , { module = "Hydra.Contract.MintAction", instance = "FromData MintAction" } # This one is odd. , { module = "Hydra.Network.Ouroboros.Type", instance = "Protocol" } + # TODO: Remove this + , { module = "Hydra.Model.Payment", instance = "IsTx" } # These are used for debugging. , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "HasVariables" } , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadFail AppM" }