diff --git a/flake.nix b/flake.nix index f1ffb59e8db..2b426b6c740 100644 --- a/flake.nix +++ b/flake.nix @@ -71,10 +71,10 @@ # Specific versions of tools we require (final: prev: { apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.14.0.0"; - cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.9"; + cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.12"; cabal-install = pkgs.haskell-nix.cabal-install.${compiler}; - cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.3.0"; - fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.14.1.0"; + cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.4.0"; + fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.16.2.0"; haskell-language-server = pkgs.haskell-nix.tool compiler "haskell-language-server" rec { src = inputs.hls; cabalProject = builtins.readFile (src + "/cabal.project"); diff --git a/hydra-cluster/hydra-cluster.cabal b/hydra-cluster/hydra-cluster.cabal index f9bd8ccaae8..7d1ba7f1ac1 100644 --- a/hydra-cluster/hydra-cluster.cabal +++ b/hydra-cluster/hydra-cluster.cabal @@ -85,7 +85,7 @@ library build-depends: , aeson , async - , base >=4.7 && <5 + , base >=4.7 && <5 , bytestring , cardano-slotting , containers @@ -98,7 +98,8 @@ library , hydra-node , hydra-prelude , hydra-test-utils - , hydra-tx:{hydra-tx, testlib} + , hydra-tx + , hydra-tx:testlib , io-classes , iohk-monitoring , lens @@ -157,7 +158,7 @@ test-suite tests build-depends: , aeson , async - , base >=4.7 && <5 + , base >=4.7 && <5 , bytestring , cardano-ledger-api , containers @@ -170,10 +171,12 @@ test-suite tests , hydra-cardano-api , hydra-cluster , hydra-explorer - , hydra-node:{hydra-node, testlib} + , hydra-node + , hydra-node:testlib , hydra-prelude , hydra-test-utils - , hydra-tx:{hydra-tx, testlib} + , hydra-tx + , hydra-tx:testlib , io-classes , lens , lens-aeson diff --git a/hydra-cluster/src/HydraNode.hs b/hydra-cluster/src/HydraNode.hs index 3c1e10ec90b..3605cd89f4e 100644 --- a/hydra-cluster/src/HydraNode.hs +++ b/hydra-cluster/src/HydraNode.hs @@ -395,9 +395,9 @@ withHydraNode' tracer chainConfig workDir hydraNodeId hydraSKey hydraVKeys allNo peers = [ Host - { Network.hostname = "127.0.0.1" - , Network.port = fromIntegral $ 5_000 + i - } + { Network.hostname = "127.0.0.1" + , Network.port = fromIntegral $ 5_000 + i + } | i <- allNodeIds , i /= hydraNodeId ] diff --git a/hydra-node/hydra-node.cabal b/hydra-node/hydra-node.cabal index 69277350d36..8c27fc91ac7 100644 --- a/hydra-node/hydra-node.cabal +++ b/hydra-node/hydra-node.cabal @@ -107,9 +107,11 @@ library , cardano-crypto-class , cardano-ledger-alonzo , cardano-ledger-api - , cardano-ledger-babbage:{cardano-ledger-babbage, testlib} + , cardano-ledger-babbage + , cardano-ledger-babbage:testlib , cardano-ledger-conway:testlib - , cardano-ledger-core:{cardano-ledger-core, testlib} + , cardano-ledger-core + , cardano-ledger-core:testlib , cardano-ledger-shelley , cardano-slotting , cardano-strict-containers @@ -125,8 +127,9 @@ library , hydra-plutus , hydra-plutus-extras , hydra-prelude - , hydra-tx:{hydra-tx, testlib} - , io-classes >=0.3.0.0 + , hydra-tx + , hydra-tx:testlib + , io-classes >=0.3.0.0 , iohk-monitoring , iproute , lens @@ -137,10 +140,10 @@ library , optparse-applicative , ouroboros-consensus , ouroboros-consensus-cardano - , ouroboros-network-api >=0.7.1 + , ouroboros-network-api >=0.7.1 , ouroboros-network-framework - , ouroboros-network-protocols >=0.8 - , plutus-ledger-api >=1.21 + , ouroboros-network-protocols >=0.8 + , plutus-ledger-api >=1.21 , prometheus , QuickCheck , quickcheck-arbitrary-adt @@ -150,8 +153,8 @@ library , text , time , transformers - , typed-protocols >=0.1.0.0 - , typed-protocols-cborg >=0.1.0.0 + , typed-protocols >=0.1.0.0 + , typed-protocols-cborg >=0.1.0.0 , unliftio , vector , wai @@ -239,7 +242,8 @@ benchmark tx-cost , hydra-plutus , hydra-plutus-extras , hydra-prelude - , hydra-tx:{hydra-tx, testlib} + , hydra-tx + , hydra-tx:testlib , optparse-applicative , plutus-ledger-api , plutus-tx @@ -257,7 +261,8 @@ benchmark micro , base , criterion , hydra-cardano-api - , hydra-node:{hydra-node, testlib} + , hydra-node + , hydra-node:testlib , hydra-prelude , hydra-tx , QuickCheck @@ -323,10 +328,12 @@ test-suite tests , cardano-crypto-class , cardano-ledger-alonzo , cardano-ledger-api - , cardano-ledger-babbage:{cardano-ledger-babbage, testlib} + , cardano-ledger-babbage + , cardano-ledger-babbage:testlib , cardano-ledger-conway , cardano-ledger-core - , cardano-ledger-shelley:{cardano-ledger-shelley, testlib} + , cardano-ledger-shelley + , cardano-ledger-shelley:testlib , cardano-slotting , cardano-strict-containers , cborg @@ -340,20 +347,23 @@ test-suite tests , hspec-wai , HUnit , hydra-cardano-api - , hydra-node:{hydra-node, testlib} + , hydra-node + , hydra-node:testlib , hydra-plutus , hydra-prelude , hydra-test-utils - , hydra-tx:{hydra-tx, testlib} + , hydra-tx + , hydra-tx:testlib , io-classes , io-sim , lens , lens-aeson , network-simple-wss - , plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} >=1.1.1.0 + , plutus-ledger-api >=1.1.1.0 + , plutus-ledger-api:plutus-ledger-api-testlib , plutus-tx , QuickCheck - , quickcheck-dynamic >=3.4 && <3.5 + , quickcheck-dynamic >=3.4 && <3.5 , quickcheck-instances , random , regex-tdfa @@ -363,7 +373,7 @@ test-suite tests , text , time , tls - , typed-protocols-examples >=0.1.0.0 + , typed-protocols-examples >=0.1.0.0 , vector , websockets diff --git a/hydra-node/src/Hydra/Ledger/Cardano.hs b/hydra-node/src/Hydra/Ledger/Cardano.hs index ad0e83ea5bf..ca62d35e753 100644 --- a/hydra-node/src/Hydra/Ledger/Cardano.hs +++ b/hydra-node/src/Hydra/Ledger/Cardano.hs @@ -130,10 +130,10 @@ mkSimpleTx (txin, TxOut owner valueIn datum refScript) (recipient, valueOut) sk outs = TxOut @CtxTx recipient valueOut TxOutDatumNone ReferenceScriptNone : [ TxOut @CtxTx - owner - (valueIn <> negateValue valueOut) - (toTxContext datum) - refScript + owner + (valueIn <> negateValue valueOut) + (toTxContext datum) + refScript | valueOut /= valueIn ] @@ -159,10 +159,10 @@ mkRangedTx (txin, TxOut owner valueIn datum refScript) (recipient, valueOut) sk , txOuts = TxOut @CtxTx recipient valueOut TxOutDatumNone ReferenceScriptNone : [ TxOut @CtxTx - owner - (valueIn <> negateValue valueOut) - (toTxContext datum) - refScript + owner + (valueIn <> negateValue valueOut) + (toTxContext datum) + refScript | valueOut /= valueIn ] , txFee = TxFeeExplicit $ Coin 0 diff --git a/hydra-tui/src/Hydra/TUI/Drawing.hs b/hydra-tui/src/Hydra/TUI/Drawing.hs index 157d597bb1f..84901d0dc97 100644 --- a/hydra-tui/src/Hydra/TUI/Drawing.hs +++ b/hydra-tui/src/Hydra/TUI/Drawing.hs @@ -303,9 +303,9 @@ drawUTxO f utxo = $ UTxO.toMap utxo in vBox [ padTop (Pad 1) $ - vBox - [ f addr - , padLeft (Pad 2) $ vBox (str . toString . UTxO.render <$> u) - ] + vBox + [ f addr + , padLeft (Pad 2) $ vBox (str . toString . UTxO.render <$> u) + ] | (addr, u) <- Map.toList byAddress ] diff --git a/hydra-tx/hydra-tx.cabal b/hydra-tx/hydra-tx.cabal index 70a5a6bc0dd..5261a3123c1 100644 --- a/hydra-tx/hydra-tx.cabal +++ b/hydra-tx/hydra-tx.cabal @@ -124,7 +124,8 @@ library testlib , cardano-crypto-class , cardano-ledger-alonzo , cardano-ledger-api - , cardano-ledger-conway:{cardano-ledger-conway, testlib} + , cardano-ledger-conway + , cardano-ledger-conway:testlib , cardano-ledger-core , cardano-ledger-mary , cardano-ledger-shelley @@ -188,9 +189,11 @@ test-suite tests , hydra-plutus-extras , hydra-prelude , hydra-test-utils - , hydra-tx:{hydra-tx, testlib} + , hydra-tx + , hydra-tx:testlib , lens - , plutus-ledger-api:{plutus-ledger-api, plutus-ledger-api-testlib} + , plutus-ledger-api + , plutus-ledger-api:plutus-ledger-api-testlib , plutus-tx , QuickCheck , quickcheck-instances diff --git a/hydra-tx/test/Hydra/Tx/Contract/Contest/ContestCurrent.hs b/hydra-tx/test/Hydra/Tx/Contract/Contest/ContestCurrent.hs index 0ee140f4720..3400d893f56 100644 --- a/hydra-tx/test/Hydra/Tx/Contract/Contest/ContestCurrent.hs +++ b/hydra-tx/test/Hydra/Tx/Contract/Contest/ContestCurrent.hs @@ -421,8 +421,7 @@ genContestMutation (tx, _utxo) = -- `must not push contestation deadline`. vectorOf (length healthyOnChainParties) - ( partyFromVerificationKeyBytes <$> genHash - ) + (partyFromVerificationKeyBytes <$> genHash) `suchThat` (/= healthyOnChainParties) pure $ ChangeOutput 0 $ modifyInlineDatum (replaceParties mutatedParties) headTxOut , SomeMutation (pure $ toErrorCode ChangedParameters) MutateHeadIdInOutput <$> do diff --git a/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs b/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs index 66a9e078dc7..6d232cdc548 100644 --- a/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs +++ b/hydra-tx/testlib/Test/Hydra/Tx/Mutation.hs @@ -223,7 +223,8 @@ propTransactionFailsPhase2 mExpectedError (tx, lookupUTxO) = -- to the 'genericCoverTable' function to construct and display a coverage -- table showing the percentage of each mutation that's been applied and -- ensure significant coverage of all possible mutations using 'checkCoverage'. -data SomeMutation = forall lbl. +data SomeMutation + = forall lbl. (Typeable lbl, Enum lbl, Bounded lbl, Show lbl) => SomeMutation { expectedErrors :: [Text] diff --git a/plutus-cbor/test/Plutus/Codec/CBOR/EncodingSpec.hs b/plutus-cbor/test/Plutus/Codec/CBOR/EncodingSpec.hs index 7257a7aa5dd..c7e5b2ff3eb 100644 --- a/plutus-cbor/test/Plutus/Codec/CBOR/EncodingSpec.hs +++ b/plutus-cbor/test/Plutus/Codec/CBOR/EncodingSpec.hs @@ -59,8 +59,7 @@ propCompareWithOracle :: x -> Property propCompareWithOracle encodeOracle encodeOurs x = - ( Plutus.toBuiltin (CBOR.toStrictByteString oracle) === ours - ) + (Plutus.toBuiltin (CBOR.toStrictByteString oracle) === ours) & counterexample ("value: " <> show x) & counterexample ("\n─── cborg: \n" <> CBOR.prettyHexEnc oracle) & counterexample ("\n─── ours: \n" <> decodeUtf8 (Base16.encode (Plutus.fromBuiltin ours)))