From 2b69098b106834d239aa9b22b8b2d3815f4a7d13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 17 Sep 2024 17:38:22 +0200 Subject: [PATCH] Fix hlint warnings --- lib/Echidna/ABI.hs | 2 +- lib/Echidna/Pretty.hs | 2 +- lib/Echidna/UI/Report.hs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Echidna/ABI.hs b/lib/Echidna/ABI.hs index 78a8112b3..f5f01cd2a 100644 --- a/lib/Echidna/ABI.hs +++ b/lib/Echidna/ABI.hs @@ -79,7 +79,7 @@ ppAbiValue labels = \case AbiTuple v -> "(" <> commaSeparated v <> ")" AbiFunction v -> show v where - commaSeparated v = intercalate ", " (ppAbiValue <$> pure labels <*> toList v) + commaSeparated v = intercalate ", " $ ppAbiValue labels <$> toList v ppAddr :: Map Addr Text -> Addr -> String ppAddr labels addr = "0x" <> showHex addr "" <> label diff --git a/lib/Echidna/Pretty.hs b/lib/Echidna/Pretty.hs index 49abae18b..c9415e5a0 100644 --- a/lib/Echidna/Pretty.hs +++ b/lib/Echidna/Pretty.hs @@ -16,7 +16,7 @@ import Echidna.Types.Tx (TxCall(..)) ppSolCall :: Map Addr Text -> SolCall -> String ppSolCall labels (t, vs) = (if t == "" then unpack "*fallback*" else unpack t) - ++ "(" ++ intercalate "," (ppAbiValue <$> pure labels <*> vs) ++ ")" + ++ "(" ++ intercalate "," (ppAbiValue labels <$> vs) ++ ")" -- | Pretty-print some 'TxCall' ppTxCall :: Map Addr Text -> TxCall -> String diff --git a/lib/Echidna/UI/Report.hs b/lib/Echidna/UI/Report.hs index 90bcda666..83e678f9d 100644 --- a/lib/Echidna/UI/Report.hs +++ b/lib/Echidna/UI/Report.hs @@ -78,7 +78,7 @@ ppTx vm printName tx = do <> (if tx.value == 0 then "" else " Value: " <> show tx.value) <> ppDelay tx.delay where - prettyName names t addr = case (names t addr) of + prettyName names t addr = case names t addr of "" -> "" s -> s <> label addr label addr = case Map.lookup addr vm.labels of