diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index 3497be786f..2ec795d633 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -141,14 +141,14 @@ jobs: MATRIX="$(jq -c '.' <= 2.2 , async >= 2.2 , attoparsec >= 0.13 - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , base16-bytestring >= 0.1 , base64-bytestring-kadena == 0.1 , binary >= 0.8 @@ -533,7 +532,7 @@ library chainweb-test-utils , QuickCheck >= 2.14 , aeson >= 2.2 , async >= 2.2 - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , base16-bytestring >= 0.1 , bytestring >= 0.10.12 , case-insensitive >= 1.2 @@ -691,7 +690,7 @@ test-suite chainweb-tests , QuickCheck >= 2.14 , aeson >= 2.2 , async >= 2.2 - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , base16-bytestring >= 0.1 , base64-bytestring-kadena == 0.1 , byteslice >= 0.2.12 @@ -781,7 +780,7 @@ test-suite compaction-tests , chainweb:chainweb-test-utils -- external - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , chainweb-storage >= 0.1 , loglevel >= 0.1 , tasty >= 1.0 @@ -808,7 +807,7 @@ test-suite multi-node-network-tests , chainweb:chainweb-test-utils -- external - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , chainweb-storage >= 0.1 , loglevel >= 0.1 , tasty >= 1.0 @@ -838,7 +837,7 @@ test-suite remote-tests -- external , async >= 2.2 - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , bytestring >= 0.10.12 , http-client >= 0.5 , http-types >= 0.12 @@ -885,7 +884,7 @@ benchmark bench , QuickCheck >= 2.14 , aeson >= 2.2 , async >= 2.2 - , base >= 4.12 && < 5 + , base >= 4.22 && < 5 , bytestring >= 0.10.12 , chainweb-storage >= 0.1 , containers >= 0.5 diff --git a/cwtools/ea/Ea.hs b/cwtools/ea/Ea.hs index a00b2fe738..09e3c86db4 100644 --- a/cwtools/ea/Ea.hs +++ b/cwtools/ea/Ea.hs @@ -43,8 +43,8 @@ import Chainweb.Storage.Table.RocksDB import Chainweb.Time import Chainweb.Utils import Chainweb.Version -import Chainweb.Version.Development (pattern Development) -import Chainweb.Version.RecapDevelopment (pattern RecapDevelopment) +import Chainweb.Version.Development (data Development) +import Chainweb.Version.RecapDevelopment (data RecapDevelopment) import Chainweb.Version.Registry (registerVersion) import Control.Concurrent.Async import Control.Exception diff --git a/cwtools/ea/Ea/Genesis.hs b/cwtools/ea/Ea/Genesis.hs index 54aa32b47d..bd9e2c0bbf 100644 --- a/cwtools/ea/Ea/Genesis.hs +++ b/cwtools/ea/Ea/Genesis.hs @@ -1,5 +1,6 @@ {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE LambdaCase #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE TemplateHaskell #-} @@ -8,7 +9,7 @@ module Ea.Genesis ( -- * Genesis tx data Genesis(..) , ChainIdRange -, pattern ChainIdRange +, data ChainIdRange , mkChainIdRange , onlyChainId , chainIdRangeTag diff --git a/src/Chainweb/BlockHash.hs b/src/Chainweb/BlockHash.hs index 7c1f6f340b..89644f65d4 100644 --- a/src/Chainweb/BlockHash.hs +++ b/src/Chainweb/BlockHash.hs @@ -55,7 +55,7 @@ module Chainweb.BlockHash -- * Blockheight Ranked BlockHash , type RankedBlockHash -, pattern RankedBlockHash +, data RankedBlockHash , _rankedBlockHashHash , _rankedBlockHashHeight , encodeRankedBlockHash @@ -279,4 +279,3 @@ encodeRankedBlockHash = encodeRanked encodeBlockHash decodeRankedBlockHash :: Get RankedBlockHash decodeRankedBlockHash = decodeRanked decodeBlockHash - diff --git a/src/Chainweb/BlockPayloadHash.hs b/src/Chainweb/BlockPayloadHash.hs index 02d3a4dee0..49ed5bf680 100644 --- a/src/Chainweb/BlockPayloadHash.hs +++ b/src/Chainweb/BlockPayloadHash.hs @@ -25,7 +25,7 @@ module Chainweb.BlockPayloadHash -- * Ranked Block Payload Hash , type RankedBlockPayloadHash -, pattern RankedBlockPayloadHash +, data RankedBlockPayloadHash , _rankedBlockPayloadHashHash , _rankedBlockPayloadHashHeight , encodeRankedBlockPayloadHash @@ -134,4 +134,3 @@ encodeRankedBlockPayloadHash = encodeRanked encodeBlockPayloadHash decodeRankedBlockPayloadHash :: Get RankedBlockPayloadHash decodeRankedBlockPayloadHash = decodeRanked decodeBlockPayloadHash - diff --git a/src/Chainweb/ChainId.hs b/src/Chainweb/ChainId.hs index c95f165ba0..5e715f74e0 100644 --- a/src/Chainweb/ChainId.hs +++ b/src/Chainweb/ChainId.hs @@ -52,7 +52,7 @@ module Chainweb.ChainId -- * Singletons , Sing(SChainId) , type SChainId -, pattern FromSingChainId +, data FromSingChainId -- * Testing , unsafeChainId diff --git a/src/Chainweb/Graph.hs b/src/Chainweb/Graph.hs index 9f7a148e47..fd5a7b9856 100644 --- a/src/Chainweb/Graph.hs +++ b/src/Chainweb/Graph.hs @@ -48,7 +48,7 @@ module Chainweb.Graph -- * Undirected Edges , AdjPair -, pattern Adj +, data Adj , _getAdjPair , adjs , adjsOfVertex @@ -476,4 +476,3 @@ d5k3ChainGraph = toChainGraph D5K3 d5k4ChainGraph :: ChainGraph d5k4ChainGraph = toChainGraph D5K4 {-# NOINLINE d5k4ChainGraph #-} - diff --git a/src/Chainweb/MinerReward.hs b/src/Chainweb/MinerReward.hs index 1cc41a2df1..a513993ad5 100644 --- a/src/Chainweb/MinerReward.hs +++ b/src/Chainweb/MinerReward.hs @@ -1,6 +1,7 @@ {-# LANGUAGE BangPatterns #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE MultiWayIf #-} @@ -31,7 +32,7 @@ module Chainweb.MinerReward -- * KDA , Kda -, pattern Kda +, data Kda , _kda , stuToKda , kdaToStu @@ -277,4 +278,3 @@ expectedMinerRewardsHash = read "8e4fb006c5045b3baab638d16d62c952e4981a4ba473ec6 expectedRawMinerRewardsHash :: Digest SHA512 expectedRawMinerRewardsHash = read "903d10b06666c0d619c8a28c74c3bb0af47209002f005b12bbda7b7df1131b2072ce758c1a8148facb1506022215ea201629f38863feb285c7e66f5965498fe0" - diff --git a/src/Chainweb/Pact/Types.hs b/src/Chainweb/Pact/Types.hs index c7c4d4e589..b20d11e850 100644 --- a/src/Chainweb/Pact/Types.hs +++ b/src/Chainweb/Pact/Types.hs @@ -88,13 +88,13 @@ module Chainweb.Pact.Types , _LocalResultWithWarns , _LocalResultLegacy , _LocalTimeout - , pattern Pact4LocalResultLegacy + , data Pact4LocalResultLegacy , _Pact4LocalResultLegacy - , pattern Pact5LocalResultLegacy + , data Pact5LocalResultLegacy , _Pact5LocalResultLegacy - , pattern Pact4LocalResultWithWarns + , data Pact4LocalResultWithWarns , _Pact4LocalResultWithWarns - , pattern Pact5LocalResultWithWarns + , data Pact5LocalResultWithWarns , _Pact5LocalResultWithWarns , LocalReq(..) , ReadOnlyReplayReq(..) @@ -609,7 +609,7 @@ instance Exception TxTimeout data Pact4TxFailureLog = Pact4TxFailureLog !Pact4.RequestKey !Pact4.PactError !Text deriving stock (Generic) - deriving anyclass (NFData, Typeable) + deriving anyclass (NFData) instance LogMessage Pact4TxFailureLog where logText (Pact4TxFailureLog rk err msg) = msg <> ": " <> sshow rk <> ": " <> sshow err @@ -618,7 +618,7 @@ instance Show Pact4TxFailureLog where data Pact5TxFailureLog = Pact5TxFailureLog !Pact5.RequestKey !Text deriving stock (Generic) - deriving anyclass (NFData, Typeable) + deriving anyclass (NFData) instance LogMessage Pact5TxFailureLog where logText (Pact5TxFailureLog rk msg) = "Failed tx " <> sshow rk <> ": " <> msg diff --git a/src/Chainweb/RestAPI/NetworkID.hs b/src/Chainweb/RestAPI/NetworkID.hs index 9d8c46710e..fb5c751c2e 100644 --- a/src/Chainweb/RestAPI/NetworkID.hs +++ b/src/Chainweb/RestAPI/NetworkID.hs @@ -38,7 +38,7 @@ module Chainweb.RestAPI.NetworkID -- * Singletons , Sing(SChainNetwork, SMempoolNetwork, SCutNetwork) , type SNetwork -, pattern FromSingNetworkId +, data FromSingNetworkId ) where import Configuration.Utils diff --git a/src/Chainweb/Time.hs b/src/Chainweb/Time.hs index 50f12a21e8..9acc842379 100644 --- a/src/Chainweb/Time.hs +++ b/src/Chainweb/Time.hs @@ -106,7 +106,7 @@ import Data.Int import qualified Data.Memory.Endian as BA import Data.Ratio import qualified Data.Text as T -import Data.Time +import Data.Time hiding (Seconds) import Data.Time.Clock.POSIX import Data.Time.Clock.System import Data.Word diff --git a/src/Chainweb/Version.hs b/src/Chainweb/Version.hs index 0319d7610d..2104265acb 100644 --- a/src/Chainweb/Version.hs +++ b/src/Chainweb/Version.hs @@ -93,9 +93,9 @@ module Chainweb.Version , PactVersionT(..) , ForBothPactVersions(..) , ForSomePactVersion(..) - , pattern ForPact4 + , data ForPact4 , _ForPact4 - , pattern ForPact5 + , data ForPact5 , _ForPact5 , forAnyPactVersion @@ -110,7 +110,7 @@ module Chainweb.Version -- * Singletons , Sing(SChainwebVersion) , SChainwebVersion - , pattern FromSingChainwebVersion + , data FromSingChainwebVersion -- * HasChainwebVersion , HasChainwebVersion(..) @@ -138,7 +138,7 @@ module Chainweb.Version -- ** Undirected Edges , AdjPair , _getAdjPair - , pattern Adj + , data Adj , adjs , adjsOfVertex , checkAdjacentChainIds diff --git a/src/Chainweb/Version/Development.hs b/src/Chainweb/Version/Development.hs index 3d2d2efaaa..7d703eaa29 100644 --- a/src/Chainweb/Version/Development.hs +++ b/src/Chainweb/Version/Development.hs @@ -1,11 +1,12 @@ {-# language LambdaCase #-} {-# language NumericUnderscores #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# language OverloadedStrings #-} {-# language PatternSynonyms #-} {-# language QuasiQuotes #-} {-# language ViewPatterns #-} -module Chainweb.Version.Development(devnet, pattern Development) where +module Chainweb.Version.Development(devnet, data Development) where import qualified Data.Set as Set diff --git a/src/Chainweb/Version/Mainnet.hs b/src/Chainweb/Version/Mainnet.hs index d7a460da7e..cb2859919b 100644 --- a/src/Chainweb/Version/Mainnet.hs +++ b/src/Chainweb/Version/Mainnet.hs @@ -1,11 +1,12 @@ {-# language LambdaCase #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# language PatternSynonyms #-} {-# language QuasiQuotes #-} {-# language ViewPatterns #-} -module Chainweb.Version.Mainnet(mainnet, pattern Mainnet01) where +module Chainweb.Version.Mainnet(mainnet, data Mainnet01) where import Control.Lens import qualified Data.HashMap.Strict as HM diff --git a/src/Chainweb/Version/RecapDevelopment.hs b/src/Chainweb/Version/RecapDevelopment.hs index a21a423cbb..719e76fb51 100644 --- a/src/Chainweb/Version/RecapDevelopment.hs +++ b/src/Chainweb/Version/RecapDevelopment.hs @@ -1,11 +1,12 @@ {-# language LambdaCase #-} {-# language NumericUnderscores #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# language OverloadedStrings #-} {-# language PatternSynonyms #-} {-# language QuasiQuotes #-} {-# language ViewPatterns #-} -module Chainweb.Version.RecapDevelopment(recapDevnet, pattern RecapDevelopment) where +module Chainweb.Version.RecapDevelopment(recapDevnet, data RecapDevelopment) where import qualified Data.HashMap.Strict as HM import qualified Data.Set as Set diff --git a/src/Chainweb/Version/Testnet04.hs b/src/Chainweb/Version/Testnet04.hs index ef5ffe7b59..3b4268f108 100644 --- a/src/Chainweb/Version/Testnet04.hs +++ b/src/Chainweb/Version/Testnet04.hs @@ -4,8 +4,9 @@ {-# language PatternSynonyms #-} {-# language QuasiQuotes #-} {-# language ViewPatterns #-} +{-# LANGUAGE ExplicitNamespaces #-} -module Chainweb.Version.Testnet04(testnet04, pattern Testnet04) where +module Chainweb.Version.Testnet04(testnet04, data Testnet04) where import Control.Lens import qualified Data.HashMap.Strict as HM diff --git a/src/Data/Singletons.hs b/src/Data/Singletons.hs index 249b03d3c5..30f9eafe88 100644 --- a/src/Data/Singletons.hs +++ b/src/Data/Singletons.hs @@ -34,12 +34,12 @@ module Data.Singletons ( -- * Data family of singletons Sing(..) , SingI(..) -, pattern Sing +, data Sing -- * Sing Kind , SingKind(..) , SomeSing(..) -, pattern FromSing +, data FromSing -- * Sing Instance , SingInstance(..) @@ -97,7 +97,7 @@ data family Sing :: k -> Type -- class SingI (a :: k) where sing :: Sing a --- | A pattern for converting between a singlton and the corresponding +-- | A pattern for converting between a singleton and the corresponding -- 'SingInstance'. -- pattern Sing :: forall k (a :: k) . () => SingI a => Sing a diff --git a/test/lib/Chainweb/Test/Utils.hs b/test/lib/Chainweb/Test/Utils.hs index 2f519dba7c..47b4d58bbc 100644 --- a/test/lib/Chainweb/Test/Utils.hs +++ b/test/lib/Chainweb/Test/Utils.hs @@ -79,9 +79,9 @@ module Chainweb.Test.Utils -- * Tasty TestTree Server and ClientEnv , testHost , TestClientEnv(..) -, pattern BlockHeaderDbsTestClientEnv -, pattern PeerDbsTestClientEnv -, pattern PayloadTestClientEnv +, data BlockHeaderDbsTestClientEnv +, data PeerDbsTestClientEnv +, data PayloadTestClientEnv , withTestAppServer , withTestAppServerR , withChainwebTestServer diff --git a/test/lib/Chainweb/Test/Utils/APIValidation.hs b/test/lib/Chainweb/Test/Utils/APIValidation.hs index 10e8d53c94..a9163e814e 100644 --- a/test/lib/Chainweb/Test/Utils/APIValidation.hs +++ b/test/lib/Chainweb/Test/Utils/APIValidation.hs @@ -24,7 +24,6 @@ import qualified Data.HashSet as HashSet import Data.IORef import qualified Data.Map as Map import qualified Data.Text.Encoding as T -import Data.Typeable import qualified Data.Yaml as Yaml import GHC.Stack @@ -53,7 +52,7 @@ data ValidationException = ValidationException , vResp :: (ResponseHeaders, Status, BL.ByteString) , vErr :: WV.TopLevelError } - deriving (Show, Typeable) + deriving (Show) instance Exception ValidationException diff --git a/test/unit/Chainweb/Test/Pact5/TransactionExecTest.hs b/test/unit/Chainweb/Test/Pact5/TransactionExecTest.hs index 51b9d351aa..e9df7cc873 100644 --- a/test/unit/Chainweb/Test/Pact5/TransactionExecTest.hs +++ b/test/unit/Chainweb/Test/Pact5/TransactionExecTest.hs @@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} @@ -66,7 +67,7 @@ import Pact.Core.Signer import Pact.Core.Verifiers import Pact.Types.KeySet qualified as Pact4 import Pact.JSON.Encode qualified as J -import PropertyMatchers ((?), pattern (:=>)) +import PropertyMatchers ((?), data (:=>)) import PropertyMatchers qualified as P import Test.Tasty import Test.Tasty.HUnit (assertEqual, testCase)