From f00e32a47ffb0a1264de418f4b7dfa512bb60fbc Mon Sep 17 00:00:00 2001 From: Rupert Horlick Date: Tue, 26 Jun 2018 14:18:18 -0700 Subject: [PATCH] [CDEC-383] Appease new stylish-haskell CI check --- .../Client/Cardano/Wallet/Web/Endpoint/NewWallet.hs | 5 ++--- server/Main.hs | 13 ++++++------- src/Cardano/Wallet/API/V1/Types.hs | 4 ++-- src/Cardano/Wallet/Kernel.hs | 10 ++++------ src/Cardano/Wallet/Kernel/DB/AcidState.hs | 2 +- src/Cardano/Wallet/Kernel/Submission.hs | 2 +- src/Cardano/Wallet/Server/Plugins.hs | 7 +++---- src/Cardano/Wallet/WalletLayer.hs | 2 +- src/Cardano/Wallet/WalletLayer/Kernel.hs | 1 - src/Cardano/Wallet/WalletLayer/Legacy.hs | 8 ++++---- src/Cardano/Wallet/WalletLayer/Types.hs | 2 +- test/unit/Test/Spec/Submission.hs | 6 +++--- 12 files changed, 28 insertions(+), 34 deletions(-) diff --git a/bench/Client/Cardano/Wallet/Web/Endpoint/NewWallet.hs b/bench/Client/Cardano/Wallet/Web/Endpoint/NewWallet.hs index a4c7c3af653..be8f01e411b 100644 --- a/bench/Client/Cardano/Wallet/Web/Endpoint/NewWallet.hs +++ b/bench/Client/Cardano/Wallet/Web/Endpoint/NewWallet.hs @@ -11,14 +11,13 @@ import Universum import Data.Time.Clock (getCurrentTime) import Bench.Cardano.Wallet.Types (BenchEndpoint (..), CompleteConfig (..), Response, - ResponseReport (..)) + ResponseReport (..)) import Client.Cardano.Wallet.Web.Analyze (analyzeResponseIfNeeded, checkResponse) import Client.Cardano.Wallet.Web.Api (newWallet) import Client.Cardano.Wallet.Web.Run (runEndpointClient) import Pos.Util.Mnemonic (Mnemonic, entropyToMnemonic, genEntropy) import Pos.Wallet.Web.ClientTypes (CBackupPhrase (..), CWallet (..), - CWalletAssurance (..), CWalletInit (..), - CWalletMeta (..)) + CWalletAssurance (..), CWalletInit (..), CWalletMeta (..)) -- | Run 'NewWallet' client. As a result we will get a newly created wallet. newWalletIO :: CompleteConfig -> IO () diff --git a/server/Main.hs b/server/Main.hs index 3e93d4d4de2..f6b3d179803 100644 --- a/server/Main.hs +++ b/server/Main.hs @@ -19,17 +19,17 @@ import Pos.DB.DB (initNodeDBs) import Pos.Infra.Diffusion.Types (Diffusion) import Pos.Infra.Ntp.Configuration (NtpConfiguration, ntpClientSettings) import Pos.Launcher (NodeParams (..), NodeResources (..), bpLoggingParams, - bracketNodeResources, loggerBracket, lpDefaultName, runNode, - withConfigurations) + bracketNodeResources, loggerBracket, lpDefaultName, runNode, + withConfigurations) import Pos.Launcher.Configuration (AssetLockPath (..), ConfigurationOptions, - HasConfigurations) + HasConfigurations) import Pos.Ssc.Types (SscParams) import Pos.Txp (txpGlobalSettings) import Pos.Util (logException) import Pos.Util.CompileInfo (HasCompileInfo, retrieveCompileTimeInfo, withCompileInfo) import Pos.Util.UserSecret (usVss) import Pos.Wallet.Web (bracketWalletWS, bracketWalletWebDB, getSKById, getWalletAddresses, - runWRealMode) + runWRealMode) import Pos.Wallet.Web.Mode (WalletWebMode) import Pos.Wallet.Web.State (askWalletDB, askWalletSnapshot, flushWalletStorage) import Pos.Wallet.Web.Tracking.Decrypt (eskToWalletDecrCredentials) @@ -40,9 +40,8 @@ import qualified Cardano.Wallet.Kernel.Mode as Kernel.Mode import Cardano.Wallet.Kernel (PassiveWallet) import Cardano.Wallet.Server.CLI (ChooseWalletBackend (..), NewWalletBackendParams (..), - WalletBackendParams (..), WalletStartupOptions (..), - getWalletNodeOptions, walletDbPath, walletFlushDb, - walletRebuildDb) + WalletBackendParams (..), WalletStartupOptions (..), getWalletNodeOptions, + walletDbPath, walletFlushDb, walletRebuildDb) import qualified Cardano.Wallet.Server.Plugins as Plugins import Cardano.Wallet.WalletLayer (PassiveWalletLayer, bracketKernelPassiveWallet) diff --git a/src/Cardano/Wallet/API/V1/Types.hs b/src/Cardano/Wallet/API/V1/Types.hs index b7bf5bcb38f..2a436309348 100644 --- a/src/Cardano/Wallet/API/V1/Types.hs +++ b/src/Cardano/Wallet/API/V1/Types.hs @@ -127,8 +127,8 @@ import qualified Pos.Core as Core import Pos.Crypto (decodeHash, hashHexF) import qualified Pos.Crypto.Signing as Core import Pos.Infra.Diffusion.Subscription.Status (SubscriptionStatus (..)) -import Pos.Infra.Util.LogSafe (BuildableSafeGen (..), SecureLog (..), buildSafe, buildSafeList, - buildSafeMaybe, deriveSafeBuildable, plainOrSecureF) +import Pos.Infra.Util.LogSafe (BuildableSafeGen (..), SecureLog (..), buildSafe, + buildSafeList, buildSafeMaybe, deriveSafeBuildable, plainOrSecureF) import qualified Pos.Wallet.Web.State.Storage as OldStorage import Test.Pos.Core.Arbitrary () diff --git a/src/Cardano/Wallet/Kernel.hs b/src/Cardano/Wallet/Kernel.hs index 4be72d8df0a..0da6921213c 100644 --- a/src/Cardano/Wallet/Kernel.hs +++ b/src/Cardano/Wallet/Kernel.hs @@ -44,13 +44,12 @@ import Data.Acid.Memory (openMemoryState) import Cardano.Wallet.Kernel.Diffusion (WalletDiffusion (..)) import Cardano.Wallet.Kernel.PrefilterTx (PrefilteredBlock (..), prefilterBlock, - prefilterUtxo) + prefilterUtxo) import Cardano.Wallet.Kernel.Types (WalletESKs, WalletId (..)) import Cardano.Wallet.Kernel.DB.AcidState (ApplyBlock (..), CancelPending (..), - CreateHdWallet (..), DB, NewPending (..), - NewPendingError, Snapshot (..), dbHdWallets, - defDB) + CreateHdWallet (..), DB, NewPending (..), NewPendingError, Snapshot (..), + dbHdWallets, defDB) import Cardano.Wallet.Kernel.DB.BlockMeta (BlockMeta (..)) import Cardano.Wallet.Kernel.DB.HdWallet import qualified Cardano.Wallet.Kernel.DB.HdWallet as HD @@ -61,8 +60,7 @@ import Cardano.Wallet.Kernel.DB.Resolved (ResolvedBlock) import Cardano.Wallet.Kernel.DB.Spec (singletonPending) import qualified Cardano.Wallet.Kernel.DB.Spec.Read as Spec import Cardano.Wallet.Kernel.Submission (Cancelled, WalletSubmission, addPending, - defaultResubmitFunction, exponentialBackoff, - newWalletSubmission, tick) + defaultResubmitFunction, exponentialBackoff, newWalletSubmission, tick) import Cardano.Wallet.Kernel.Submission.Worker (tickSubmissionLayer) import Pos.Core (AddressHash, Coin, Timestamp (..), TxAux (..)) diff --git a/src/Cardano/Wallet/Kernel/DB/AcidState.hs b/src/Cardano/Wallet/Kernel/DB/AcidState.hs index 86b78c268a6..257969fcc2b 100644 --- a/src/Cardano/Wallet/Kernel/DB/AcidState.hs +++ b/src/Cardano/Wallet/Kernel/DB/AcidState.hs @@ -44,7 +44,7 @@ import Pos.Core.Chrono (OldestFirst (..)) import Pos.Txp (Utxo) import Cardano.Wallet.Kernel.PrefilterTx (AddrWithId, PrefilteredBlock (..), - PrefilteredUtxo) + PrefilteredUtxo) import Cardano.Wallet.Kernel.DB.BlockMeta import Cardano.Wallet.Kernel.DB.HdWallet diff --git a/src/Cardano/Wallet/Kernel/Submission.hs b/src/Cardano/Wallet/Kernel/Submission.hs index 75276148541..4176a70e848 100644 --- a/src/Cardano/Wallet/Kernel/Submission.hs +++ b/src/Cardano/Wallet/Kernel/Submission.hs @@ -70,7 +70,7 @@ import Test.QuickCheck import Cardano.Wallet.Kernel.DB.HdWallet (HdAccountId) import Cardano.Wallet.Kernel.DB.InDb (fromDb) import Cardano.Wallet.Kernel.DB.Spec (Pending (..), emptyPending, pendingTransactions, - removePending, unionPending) + removePending, unionPending) import qualified Pos.Core as Core -- | Wallet Submission Layer diff --git a/src/Cardano/Wallet/Server/Plugins.hs b/src/Cardano/Wallet/Server/Plugins.hs index c076fedf430..e66f5e2ade7 100644 --- a/src/Cardano/Wallet/Server/Plugins.hs +++ b/src/Cardano/Wallet/Server/Plugins.hs @@ -27,10 +27,9 @@ import qualified Cardano.Wallet.Kernel.Mode as Kernel import qualified Cardano.Wallet.LegacyServer as LegacyServer import qualified Cardano.Wallet.Server as Server import Cardano.Wallet.Server.CLI (NewWalletBackendParams (..), RunMode, - WalletBackendParams (..), isDebugMode, - walletAcidInterval, walletDbOptions) + WalletBackendParams (..), isDebugMode, walletAcidInterval, walletDbOptions) import Cardano.Wallet.WalletLayer (ActiveWalletLayer, PassiveWalletLayer, - bracketKernelActiveWallet) + bracketKernelActiveWallet) import qualified Pos.Wallet.Web.Error.Types as V0 import Control.Exception (fromException) @@ -41,7 +40,7 @@ import Network.HTTP.Types.Status (badRequest400) import Network.Wai (Application, Middleware, Response, responseLBS) import Network.Wai.Handler.Warp (defaultSettings, setOnExceptionResponse) import Network.Wai.Middleware.Cors (cors, corsMethods, corsRequestHeaders, - simpleCorsResourcePolicy, simpleMethods) + simpleCorsResourcePolicy, simpleMethods) import Ntp.Client (NtpStatus) import Pos.Infra.Diffusion.Types (Diffusion (..)) import Pos.Wallet.Web (cleanupAcidStatePeriodically) diff --git a/src/Cardano/Wallet/WalletLayer.hs b/src/Cardano/Wallet/WalletLayer.hs index 1439e382413..3a604a77ca4 100644 --- a/src/Cardano/Wallet/WalletLayer.hs +++ b/src/Cardano/Wallet/WalletLayer.hs @@ -24,7 +24,7 @@ import qualified Cardano.Wallet.WalletLayer.Kernel as Kernel import qualified Cardano.Wallet.WalletLayer.Legacy as Legacy import qualified Cardano.Wallet.WalletLayer.QuickCheck as QuickCheck import Cardano.Wallet.WalletLayer.Types (ActiveWalletLayer (..), PassiveWalletLayer (..), - applyBlocks, rollbackBlocks) + applyBlocks, rollbackBlocks) ------------------------------------------------------------ -- Kernel diff --git a/src/Cardano/Wallet/WalletLayer/Kernel.hs b/src/Cardano/Wallet/WalletLayer/Kernel.hs index 667960e1868..9cdbc2e0684 100644 --- a/src/Cardano/Wallet/WalletLayer/Kernel.hs +++ b/src/Cardano/Wallet/WalletLayer/Kernel.hs @@ -27,7 +27,6 @@ import Pos.Util.Mnemonic (Mnemonic, mnemonicToSeed) import qualified Cardano.Wallet.Kernel.Actions as Actions import qualified Data.Map.Strict as Map import Pos.Crypto.Signing -import Pos.Util.BackupPhrase -- | Initialize the passive wallet. -- The passive wallet cannot send new transactions. diff --git a/src/Cardano/Wallet/WalletLayer/Legacy.hs b/src/Cardano/Wallet/WalletLayer/Legacy.hs index 70036a49a94..fb194ea2479 100644 --- a/src/Cardano/Wallet/WalletLayer/Legacy.hs +++ b/src/Cardano/Wallet/WalletLayer/Legacy.hs @@ -19,8 +19,8 @@ import Cardano.Wallet.WalletLayer.Types (ActiveWalletLayer (..), Passi import Cardano.Wallet.API.V1.Migration (migrate) import Cardano.Wallet.API.V1.Migration.Types () import Cardano.Wallet.API.V1.Types (Account, AccountIndex, AccountUpdate, Address, - NewAccount (..), NewWallet (..), V1 (..), Wallet, - WalletId, WalletOperation (..), WalletUpdate) + NewAccount (..), NewWallet (..), V1 (..), Wallet, WalletId, + WalletOperation (..), WalletUpdate) import Cardano.Wallet.Kernel.Diffusion (WalletDiffusion (..)) import Pos.Client.KeyStorage (MonadKeys) @@ -30,13 +30,13 @@ import Pos.Crypto (PassPhrase) import Pos.Util (HasLens', maybeThrow) import Pos.Wallet.Web.Account (GenSeed (..)) import Pos.Wallet.Web.ClientTypes.Types (CBackupPhrase (..), CWallet (..), - CWalletInit (..), CWalletMeta (..)) + CWalletInit (..), CWalletMeta (..)) import qualified Pos.Wallet.Web.Error.Types as V0 import Pos.Wallet.Web.Methods.Logic (MonadWalletLogicRead) import qualified Pos.Wallet.Web.Methods.Logic as V0 import Pos.Wallet.Web.Methods.Restore (newWallet, restoreWalletFromSeed) import Pos.Wallet.Web.State.State (WalletDbReader, askWalletDB, askWalletSnapshot, - getWalletAddresses, setWalletMeta) + getWalletAddresses, setWalletMeta) import Pos.Wallet.Web.State.Storage (getWalletInfo) import Pos.Wallet.Web.Tracking.Types (SyncQueue) diff --git a/src/Cardano/Wallet/WalletLayer/Types.hs b/src/Cardano/Wallet/WalletLayer/Types.hs index a4ddd1e4728..f1a887f10fc 100644 --- a/src/Cardano/Wallet/WalletLayer/Types.hs +++ b/src/Cardano/Wallet/WalletLayer/Types.hs @@ -24,7 +24,7 @@ import Universum import Control.Lens (makeLenses) import Cardano.Wallet.API.V1.Types (Account, AccountIndex, AccountUpdate, Address, - NewAccount, NewWallet, Wallet, WalletId, WalletUpdate) + NewAccount, NewWallet, Wallet, WalletId, WalletUpdate) import Pos.Block.Types (Blund) import Pos.Core.Chrono (NE, NewestFirst (..), OldestFirst (..)) diff --git a/test/unit/Test/Spec/Submission.hs b/test/unit/Test/Spec/Submission.hs index 5cd66704887..7eefc6055c8 100644 --- a/test/unit/Test/Spec/Submission.hs +++ b/test/unit/Test/Spec/Submission.hs @@ -8,10 +8,10 @@ module Test.Spec.Submission ( import Universum hiding (elems) import Cardano.Wallet.Kernel.DB.HdWallet (HdAccountId (..), HdAccountIx (..), - HdRootId (..)) + HdRootId (..)) import Cardano.Wallet.Kernel.DB.InDb (InDb (..), fromDb) import Cardano.Wallet.Kernel.DB.Spec (Pending (..), emptyPending, pendingTransactions, - removePending) + removePending) import Cardano.Wallet.Kernel.Submission import Control.Lens (at, non, to) import qualified Data.ByteString as BS @@ -32,7 +32,7 @@ import Serokell.Util.Text (listJsonIndent) import qualified Test.Pos.Txp.Arbitrary as Core import Test.QuickCheck (Gen, Property, arbitrary, choose, conjoin, forAll, listOf, - shuffle, vectorOf, (===)) + shuffle, vectorOf, (===)) import Test.QuickCheck.Property (counterexample) import Util (disjoint) import Util.Buildable (ShowThroughBuild (..))