From 3022c9b97f2afe2fb70296370d8d4664821567ae Mon Sep 17 00:00:00 2001 From: Daniel Firth Date: Tue, 31 Dec 2024 14:49:15 +0000 Subject: [PATCH] Reformat weeder.toml and add comments --- weeder.toml | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/weeder.toml b/weeder.toml index 1080fa1c84b..90ee4f6de9f 100644 --- a/weeder.toml +++ b/weeder.toml @@ -1,4 +1,5 @@ -roots = [ "^Main.main$" +roots = [ + "^Main.main$" , "^Spec.main$" , "^main$" , "validatorHash$" @@ -11,23 +12,29 @@ roots = [ "^Main.main$" , "showFromAction$" , "redeemer$" ] -root-instances = [ { class = '\.Eq$' } - , { class = '\.Show$' } - , { class = '\.Read$' } - , { class = '\.Enum$' } - , { class = '\.Bounded$' } - , { class = '\.Generic$' } - , { class = '\.Ord$' } - , { class = '\.Num$' } - , { class = '\.Real$' } - , { class = '\.Integral$' } - , { module = "Hydra.Contract.Commit", instance = "UnsafeFromData Commit" } - , { module = "Hydra.Contract.Commit", instance = "FromData RedeemerType" } - , { module = "Hydra.Contract.Commit", instance = "UnsafeFromData RedeemerType" } - , { module = "Hydra.Contract.Deposit", instance = "FromData DepositRedeemer" } - , { module = "Hydra.Contract.MintAction", instance = "FromData MintAction" } - , { module = "Hydra.Network.Ouroboros.Type", instance = "Protocol" } - , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "HasVariables" } - , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadFail AppM" } - , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadThrow AppM" } - ] +root-instances = [ + # Stock instances are treated as roots. + { class = '\.Eq$' } + , { class = '\.Show$' } + , { class = '\.Read$' } + , { class = '\.Enum$' } + , { class = '\.Bounded$' } + , { class = '\.Generic$' } + , { class = '\.Ord$' } + , { class = '\.Num$' } + , { class = '\.Real$' } + , { class = '\.Integral$' } + # unstableMakeIsData creates all Data instances at once, some are unused and + # so are treated as roots. + , { module = "Hydra.Contract.Commit", instance = "UnsafeFromData Commit" } + , { module = "Hydra.Contract.Commit", instance = "FromData RedeemerType" } + , { module = "Hydra.Contract.Commit", instance = "UnsafeFromData RedeemerType" } + , { module = "Hydra.Contract.Deposit", instance = "FromData DepositRedeemer" } + , { module = "Hydra.Contract.MintAction", instance = "FromData MintAction" } + # This one is odd. + , { module = "Hydra.Network.Ouroboros.Type", instance = "Protocol" } + # These are used for debugging. + , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "HasVariables" } + , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadFail AppM" } + , { module = "Hydra.Chain.Direct.TxTraceSpec", instance = "MonadThrow AppM" } + ]