Skip to content

Commit ec6cc7e

Browse files
committed
hlint: apply some lint suggestions
1 parent 1296ede commit ec6cc7e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/Echidna/ABI.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ getRandomInt :: MonadRandom m => Int -> m Integer
191191
getRandomInt n =
192192
getRandomR =<< Random.weighted
193193
[ ((-1023, 1023), 1)
194-
, ((-1 * 2 ^ (n - 1), 2 ^ (n - 1) - 1), 9)
194+
, (((-1) * 2 ^ (n - 1), 2 ^ (n - 1) - 1), 9)
195195
]
196196

197197
-- | Synthesize a random 'AbiValue' given its 'AbiType'. Doesn't use a dictionary.

lib/Echidna/SourceAnalysis/Slither.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ instance FromJSON SlitherInfo where
115115
:: Map ContractName (Map FunctionName [[Maybe AbiValue]])
116116
<- o .: "constants_used" >>= (traverse . traverse . traverse . traverse) parseConstant
117117
-- flatten [[AbiValue]], the array probably shouldn't be nested, fix it in Slither
118-
let constantValues = (fmap . fmap) (catMaybes . concat) constantValues'
118+
let constantValues = (fmap . fmap) (concatMap catMaybes) constantValues'
119119
functionsRelations <- o .: "functions_relations"
120120
generationGraph <-
121121
(traverse . traverse) (withObject "relations" (.: "impacts")) functionsRelations

src/Main.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ bool = maybeReader (f . map toLower) where
156156
f _ = Nothing
157157

158158
options :: Parser Options
159-
options = Options
160-
<$> (NE.fromList <$> some (argument str (metavar "FILES"
161-
<> help "Solidity files to analyze")))
159+
options = Options . NE.fromList
160+
<$> some (argument str (metavar "FILES"
161+
<> help "Solidity files to analyze"))
162162
<*> optional (option auto $ long "workers"
163163
<> metavar "N"
164164
<> help "Number of workers to run")

0 commit comments

Comments
 (0)