diff --git a/.github/workflows/applications.yml b/.github/workflows/applications.yml index cb1c1b504c..a7c37ed712 100644 --- a/.github/workflows/applications.yml +++ b/.github/workflows/applications.yml @@ -141,15 +141,15 @@ jobs: MATRIX="$(jq -c '.' <= 4.12 && < 5 + , base >= 4.22 && < 5 , chainweb-storage >= 0.1 , loglevel >= 0.1 , tasty >= 1.0 @@ -871,7 +870,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 @@ -901,7 +900,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 diff --git a/cwtools/ea/Ea/Genesis.hs b/cwtools/ea/Ea/Genesis.hs index f2079a0fd1..88ae2b447c 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 26cee5bbad..26cd2fb1bc 100644 --- a/src/Chainweb/BlockHash.hs +++ b/src/Chainweb/BlockHash.hs @@ -58,7 +58,7 @@ module Chainweb.BlockHash -- * Blockheight Ranked BlockHash , type RankedBlockHash -, pattern RankedBlockHash +, data RankedBlockHash , _rankedBlockHashHash , _rankedBlockHashHeight , encodeRankedBlockHash diff --git a/src/Chainweb/BlockPayloadHash.hs b/src/Chainweb/BlockPayloadHash.hs index 8402652ad7..3b0447d848 100644 --- a/src/Chainweb/BlockPayloadHash.hs +++ b/src/Chainweb/BlockPayloadHash.hs @@ -27,7 +27,7 @@ module Chainweb.BlockPayloadHash -- * Ranked Block Payload Hash , type RankedBlockPayloadHash -, pattern RankedBlockPayloadHash +, data RankedBlockPayloadHash , _rankedBlockPayloadHashHash , _rankedBlockPayloadHashHeight , encodeRankedBlockPayloadHash @@ -123,4 +123,3 @@ encodeRankedBlockPayloadHash = encodeRanked encodeBlockPayloadHash decodeRankedBlockPayloadHash :: Get RankedBlockPayloadHash decodeRankedBlockPayloadHash = decodeRanked decodeBlockPayloadHash - diff --git a/src/Chainweb/ChainId.hs b/src/Chainweb/ChainId.hs index 689baa5cb4..67a89999e5 100644 --- a/src/Chainweb/ChainId.hs +++ b/src/Chainweb/ChainId.hs @@ -33,7 +33,7 @@ module Chainweb.ChainId ( ChainIdException(..) , ChainId -, pattern ChainId +, data ChainId , HasChainId(..) , checkChainId @@ -53,7 +53,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 eb65099d12..460df3bbcd 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 @@ -480,4 +480,3 @@ d5k3ChainGraph = toChainGraph D5K3 d5k4ChainGraph :: ChainGraph d5k4ChainGraph = toChainGraph D5K4 {-# NOINLINE d5k4ChainGraph #-} - diff --git a/src/Chainweb/MerkleUniverse.hs b/src/Chainweb/MerkleUniverse.hs index 1287041915..b765adec1a 100644 --- a/src/Chainweb/MerkleUniverse.hs +++ b/src/Chainweb/MerkleUniverse.hs @@ -44,7 +44,7 @@ module Chainweb.MerkleUniverse , fromSomeTagVal , fromTagVal , Sing (..) -, pattern STagVal +, data STagVal , sTagVal ) where @@ -641,4 +641,3 @@ fromSomeTagVal x = case msum (f <$> tagList) of r@(SomeSing (STagVal (SNat @s))) -> do guard (natVal_ @s == int x) Just r - diff --git a/src/Chainweb/MinerReward.hs b/src/Chainweb/MinerReward.hs index c07678099e..ca3f72c5f5 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 #-} @@ -39,7 +40,7 @@ module Chainweb.MinerReward -- * KDA , Kda -, pattern Kda +, data Kda , _kda , stuToKda , kdaToStu diff --git a/src/Chainweb/Pact4/Templates.hs b/src/Chainweb/Pact4/Templates.hs index 4859f2867c..8512e1e724 100644 --- a/src/Chainweb/Pact4/Templates.hs +++ b/src/Chainweb/Pact4/Templates.hs @@ -1,3 +1,4 @@ +{-# language ExplicitNamespaces #-} {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} @@ -22,7 +23,7 @@ module Chainweb.Pact4.Templates , mkRedeemGasTerm , mkCoinbaseTerm , mkCoinbaseCmd -, pattern MinerKeys +, data MinerKeys ) where diff --git a/src/Chainweb/RestAPI/NetworkID.hs b/src/Chainweb/RestAPI/NetworkID.hs index 641e4a02df..8cf114ed12 100644 --- a/src/Chainweb/RestAPI/NetworkID.hs +++ b/src/Chainweb/RestAPI/NetworkID.hs @@ -39,7 +39,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 5a1098d6a1..0f7721ec6b 100644 --- a/src/Chainweb/Time.hs +++ b/src/Chainweb/Time.hs @@ -100,7 +100,7 @@ import Data.Hashable (Hashable) import Data.Int import qualified Data.Memory.Endian as BA import Data.Ratio -import Data.Time +import Data.Time hiding (Seconds) import Data.Time.Clock.POSIX import Data.Time.Clock.System import Data.Word @@ -348,4 +348,3 @@ microsToTimeSpan (Micros us) = scaleTimeSpan us microsecond timeSpanToMicros :: Integral a => TimeSpan a -> Micros timeSpanToMicros (TimeSpan us) = Micros $! int us {-# INLINE timeSpanToMicros #-} - diff --git a/src/Chainweb/Utils.hs b/src/Chainweb/Utils.hs index bb47b949b7..34b96aff86 100644 --- a/src/Chainweb/Utils.hs +++ b/src/Chainweb/Utils.hs @@ -261,7 +261,7 @@ module Chainweb.Utils , PureHandler(..) , handleException , type Renderer -, pattern Renderer +, data Renderer , renderException , renderExceptionJson , displayExceptionText diff --git a/src/Chainweb/Version.hs b/src/Chainweb/Version.hs index af4e932fb3..7a3245b207 100644 --- a/src/Chainweb/Version.hs +++ b/src/Chainweb/Version.hs @@ -103,7 +103,7 @@ module Chainweb.Version -- ** Singletons , SChainwebVersion - , pattern FromSingChainwebVersion + , data FromSingChainwebVersion -- * Payload Provider Type , PayloadProviderType(..) @@ -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 223f02fbf8..93eeeb446e 100644 --- a/src/Chainweb/Version/Development.hs +++ b/src/Chainweb/Version/Development.hs @@ -1,5 +1,6 @@ {-# language LambdaCase #-} {-# language NumericUnderscores #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# language OverloadedStrings #-} {-# language PatternSynonyms #-} {-# language QuasiQuotes #-} @@ -7,7 +8,7 @@ module Chainweb.Version.Development ( devnet -, pattern Development +, data Development ) where import qualified Data.Set as Set diff --git a/src/Chainweb/Version/EvmDevelopment.hs b/src/Chainweb/Version/EvmDevelopment.hs index 0245094e21..0e43950a2e 100644 --- a/src/Chainweb/Version/EvmDevelopment.hs +++ b/src/Chainweb/Version/EvmDevelopment.hs @@ -1,4 +1,5 @@ {-# language LambdaCase #-} +{-# language ExplicitNamespaces #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} {-# language PatternSynonyms #-} @@ -7,7 +8,7 @@ module Chainweb.Version.EvmDevelopment ( evmDevnet -, pattern EvmDevelopment +, data EvmDevelopment ) where import qualified Data.Set as Set @@ -59,7 +60,7 @@ evmDevnet = withVersion evmDevnet $ ChainwebVersion , _versionForkNumber = 1 , _versionForkVoteCastingLength = 20 , _versionSpvProofRootValidWindow = Bottom (minBound, Nothing) - , _versionInitialGasModel = onAllChains $ Bottom (minBound, post32GasModel) + , _versionInitialGasModel = onAllChains $ Bottom (minBound, post32GasModel) , _versionGraphs = Bottom (minBound, d4k4ChainGraph) , _versionBlockDelay = BlockDelay 30_000_000 , _versionWindow = WindowWidth 120 diff --git a/src/Chainweb/Version/EvmDevelopmentSingleton.hs b/src/Chainweb/Version/EvmDevelopmentSingleton.hs index a359f9df49..5234292195 100644 --- a/src/Chainweb/Version/EvmDevelopmentSingleton.hs +++ b/src/Chainweb/Version/EvmDevelopmentSingleton.hs @@ -1,3 +1,4 @@ +{-# language ExplicitNamespaces #-} {-# language LambdaCase #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} @@ -7,9 +8,9 @@ module Chainweb.Version.EvmDevelopmentSingleton ( evmDevnetSingleton -, pattern EvmDevelopmentSingleton +, data EvmDevelopmentSingleton , evmDevnetPair -, pattern EvmDevelopmentPair +, data EvmDevelopmentPair ) where import qualified Data.Set as Set diff --git a/src/Chainweb/Version/EvmTestnet.hs b/src/Chainweb/Version/EvmTestnet.hs index 6389a670c4..29cd262233 100644 --- a/src/Chainweb/Version/EvmTestnet.hs +++ b/src/Chainweb/Version/EvmTestnet.hs @@ -1,3 +1,4 @@ +{-# language ExplicitNamespaces #-} {-# language LambdaCase #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} @@ -7,7 +8,7 @@ module Chainweb.Version.EvmTestnet ( evmTestnet -, pattern EvmTestnet +, data EvmTestnet ) where import qualified Data.Set as Set @@ -60,7 +61,7 @@ evmTestnet = withVersion evmTestnet $ ChainwebVersion , _versionForkNumber = 1 , _versionForkVoteCastingLength = 20 , _versionSpvProofRootValidWindow = Bottom (minBound, Nothing) - , _versionInitialGasModel = onAllChains $ Bottom (minBound, post32GasModel) + , _versionInitialGasModel = onAllChains $ Bottom (minBound, post32GasModel) , _versionGraphs = Bottom (minBound, d4k4ChainGraph) , _versionBlockDelay = BlockDelay 30_000_000 , _versionWindow = WindowWidth 120 diff --git a/src/Chainweb/Version/Mainnet.hs b/src/Chainweb/Version/Mainnet.hs index 55b3c3159d..aad64ded2c 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 f13661f15f..5a82132715 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 4abb5dc83e..5c18563712 100644 --- a/src/Chainweb/Version/Testnet04.hs +++ b/src/Chainweb/Version/Testnet04.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE ExplicitNamespaces #-} {-# language LambdaCase #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} @@ -8,7 +9,7 @@ -- Note: Testnet04 is deprecated -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/Chainweb/Version/Testnet06.hs b/src/Chainweb/Version/Testnet06.hs index 81b962f211..307517192d 100644 --- a/src/Chainweb/Version/Testnet06.hs +++ b/src/Chainweb/Version/Testnet06.hs @@ -1,3 +1,4 @@ +{-# language ExplicitNamespaces #-} {-# language LambdaCase #-} {-# language NumericUnderscores #-} {-# language OverloadedStrings #-} @@ -5,7 +6,7 @@ {-# language QuasiQuotes #-} {-# language ViewPatterns #-} -module Chainweb.Version.Testnet06(testnet06, pattern Testnet06) where +module Chainweb.Version.Testnet06(testnet06, data Testnet06) where import qualified Data.HashMap.Strict as HM import Control.Lens 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 eda4b03009..2807ff9686 100644 --- a/test/lib/Chainweb/Test/Utils.hs +++ b/test/lib/Chainweb/Test/Utils.hs @@ -72,9 +72,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/unit/Chainweb/Test/Pact/TransactionExecTest.hs b/test/unit/Chainweb/Test/Pact/TransactionExecTest.hs index 09682fd775..af5b789d88 100644 --- a/test/unit/Chainweb/Test/Pact/TransactionExecTest.hs +++ b/test/unit/Chainweb/Test/Pact/TransactionExecTest.hs @@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-} +{-# LANGUAGE ExplicitNamespaces #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} @@ -68,7 +69,7 @@ import Pact.Core.Persistence hiding (pactDb) import Pact.Core.SPV (noSPVSupport) import Pact.Core.Verifiers 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)