From 14629cff8171e27d601735f197d772e1e3aba9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Wed, 1 May 2024 18:43:21 -0300 Subject: [PATCH] Resolve hlint warnings --- lib/Echidna/UI.hs | 2 +- lib/Echidna/UI/Widgets.hs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Echidna/UI.hs b/lib/Echidna/UI.hs index 7cb92c2a3..784734c09 100644 --- a/lib/Echidna/UI.hs +++ b/lib/Echidna/UI.hs @@ -158,7 +158,7 @@ ui vm world dict initialCorpus = do -- Handles ctrl-c liftIO $ forM_ [sigINT, sigTERM] $ \sig -> - let handler = \_ -> do + let handler _ = do stopWorkers workers void $ tryPutMVar serverStopVar () in installHandler sig handler diff --git a/lib/Echidna/UI/Widgets.hs b/lib/Echidna/UI/Widgets.hs index 6cbef07f3..3310d2463 100644 --- a/lib/Echidna/UI/Widgets.hs +++ b/lib/Echidna/UI/Widgets.hs @@ -145,10 +145,10 @@ logPane uiState = showLogLine :: (LocalTime, CampaignEvent) -> Widget Name showLogLine (time, event@(WorkerEvent workerId _)) = - (withAttr (attrName "time") $ str $ (timePrefix time) <> "[Worker " <> show workerId <> "] ") + withAttr (attrName "time") (str $ timePrefix time <> "[Worker " <> show workerId <> "] ") <+> strBreak (ppCampaignEvent event) showLogLine (time, event) = - (withAttr (attrName "time") $ str $ (timePrefix time) <> " ") <+> strBreak (ppCampaignEvent event) + withAttr (attrName "time") (str $ timePrefix time <> " ") <+> strBreak (ppCampaignEvent event) summaryWidget :: Env -> UIState -> Widget Name summaryWidget env uiState = @@ -179,7 +179,7 @@ summaryWidget env uiState = <=> str ("New coverage: " <> timeElapsed uiState uiState.lastNewCov <> " ago") <+> fill ' ' rightSide = - padLeft (Pad 1) $ + padLeft (Pad 1) (rpcInfoWidget uiState.fetchedContracts uiState.fetchedSlots env.chainId) timeElapsed :: UIState -> LocalTime -> String @@ -304,7 +304,7 @@ tracesWidget vm = do let traces = stripAnsiEscapeCodes $ showTraceTree dappInfo vm pure $ if T.null traces then str "" - else str "Traces" <+> str ":" <=> (txtBreak traces) + else str "Traces" <+> str ":" <=> txtBreak traces failWidget :: MonadReader Env m