Skip to content

Commit 7fca4bf

Browse files
committed
(#801) Fix hlint remarks
1 parent de13068 commit 7fca4bf

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/FuzzyMain.hs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ randomFunCallExpr params = do
9898

9999
randomExpr :: FuzzParams -> IO Expr
100100
randomExpr params = do
101-
n <- (randomRIO (0, 2) :: IO Int)
101+
n <- randomRIO (0, 2) :: IO Int
102102
case n of
103103
0 -> randomTextExpr params
104104
1 -> randomVarExpr params
@@ -119,21 +119,20 @@ fuzzIteration :: FuzzParams -> IO Bool
119119
fuzzIteration params = do
120120
es <- normalizeExprs <$> randomExprs params
121121
let es' = runParser exprs $ unparseExprs es
122-
when ((Right ("", es)) /= es') $ do
122+
when (Right ("", es)) /= es' $ do
123123
print es
124124
print es'
125125
error "test"
126-
return ((Right ("", es)) == es')
126+
return (Right ("", es)) == es'
127127

128128
fuzz :: FuzzParams -> IO ()
129129
fuzz params = do
130130
report <- replicateM (fpFuzzCount params) (fuzzIteration params)
131-
printf "Failures: %d\n" $ length $ filter (not . id) report
131+
printf "Failures: %d\n" $ length $ filter not report
132132
printf "Successes: %d\n" $ length $ filter id report
133133

134134
mainWithArgs :: [String] -> IO ()
135-
mainWithArgs (fuzzParamsPath:_) = do
136-
readFuzzParams fuzzParamsPath >>= fuzz
135+
mainWithArgs (fuzzParamsPath:_) = readFuzzParams fuzzParamsPath >>= fuzz
137136
mainWithArgs _ = error "Usage: Fuzz <fuzz.json>"
138137

139138
main :: IO ()

0 commit comments

Comments
 (0)