Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 1f63bbf

Browse files
committed
[CBR-275] more stylish; removed some redundant constraints; compiles everything
Signed-off-by: Alexander Diemand <[email protected]>
1 parent 2bb4f8c commit 1f63bbf

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

auxx/src/Command/Update.hs

+2-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ import Pos.Crypto (Hash, ProtocolMagic, emptyPassphrase, hash,
2727
hashHexF, unsafeHash, withSafeSigner, withSafeSigners)
2828
import Pos.Infra.Diffusion.Types (Diffusion (..))
2929
import Pos.Network.Update.Download (installerHash)
30-
import Pos.Util.Wlog (CanLog, HasLoggerName, logDebug, logError,
31-
logInfo)
30+
import Pos.Util.Wlog (CanLog, logDebug, logError, logInfo)
3231

3332
import Lang.Value (ProposeUpdateParams (..), ProposeUpdateSystem (..))
3433
import Mode (MonadAuxxMode)
@@ -105,7 +104,7 @@ updateDataElement ProposeUpdateSystem{..} = do
105104
dummyHash :: Hash Raw
106105
dummyHash = unsafeHash (0 :: Integer)
107106

108-
hashFile :: (CanLog m, HasLoggerName m, MonadIO m) => Maybe FilePath -> m (Hash Raw)
107+
hashFile :: (CanLog m, MonadIO m) => Maybe FilePath -> m (Hash Raw)
109108
hashFile Nothing = pure dummyHash
110109
hashFile (Just filename) = do
111110
fileData <- liftIO $ BSL.readFile filename

util/src/Pos/Util/Wlog.hs

+9-13
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,17 @@ module Pos.Util.Wlog
7070
, setLevel -- call sites: 1 networking/src/Network/Broadcast/OutboundQueue/Demo.hs
7171
) where
7272

73-
import System.Wlog ({-CanLog (..),-} HandlerWrap (..), HasLoggerName (..),
74-
{-LogEvent (..),-} LoggerConfig (..), LoggerName (..),
75-
LoggerNameBox (..), {-NamedPureLogger (..),-} Severity (..),
76-
{-WithLogger,-} consoleActionB, debugPlus,
77-
defaultHandleAction, {-dispatchEvents,-} errorPlus,
78-
fromScratch, hwFilePath, infoPlus, {-launchNamedPureLog,-}
79-
lcLogsDirectory, lcTermSeverityOut, lcTree, {-logDebug,-}
80-
{-logError,-} {-logInfo,-} logMCond, {-logMessage,-} {-logNotice,-}
81-
{-logWarning,-} ltFiles, ltSeverity, ltSubloggers,
73+
import System.Wlog (HandlerWrap (..), HasLoggerName (..),
74+
LoggerConfig (..), LoggerName (..), LoggerNameBox (..),
75+
Severity (..), consoleActionB, debugPlus,
76+
defaultHandleAction, errorPlus, fromScratch, hwFilePath,
77+
infoPlus, lcLogsDirectory, lcTermSeverityOut, lcTree,
78+
logMCond, ltFiles, ltSeverity, ltSubloggers,
8279
maybeLogsDirB, modifyLoggerName, noticePlus,
8380
parseLoggerConfig, productionB, removeAllHandlers,
84-
retrieveLogContent, {-runNamedPureLog,-} setLevel,
85-
setupLogging, showTidB, termSeveritiesOutB,
86-
updateGlobalLogger, usingLoggerName, warningPlus,
87-
zoomLogger)
81+
retrieveLogContent, setLevel, setupLogging, showTidB,
82+
termSeveritiesOutB, updateGlobalLogger, usingLoggerName,
83+
warningPlus, zoomLogger)
8884
import System.Wlog.Formatter (centiUtcTimeF)
8985
import System.Wlog.LogHandler (LogHandlerTag (HandlerFilelike))
9086

wallet/src/Pos/Wallet/Web/Tracking/Sync.hs

+1-2
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,6 @@ calculateEstimatedRemainingTime (WS.SyncThroughput blocks) remainingBlocks =
735735
-- | Apply the given 'CAccModifier' to a wallet.
736736
applyModifierToWallet
737737
:: ( CanLog m
738-
, HasLoggerName m
739738
, MonadIO m
740739
)
741740
=> WalletDB
@@ -773,7 +772,7 @@ applyModifierToWallet db trackingOperation wid newBlockHeaderTip CAccModifier{..
773772
newSyncState
774773

775774
rollbackModifierFromWallet
776-
:: (CanLog m, HasLoggerName m, MonadSlots ctx m)
775+
:: (CanLog m, MonadSlots ctx m)
777776
=> ProtocolConstants
778777
-> WalletDB
779778
-> TrackingOperation

0 commit comments

Comments
 (0)