| 1 |
src/Calc.hs:11:18: Suggestion: Redundant bracket |
| 2 |
Found: |
| 3 |
(eval a) + (eval b) |
| 4 |
Perhaps: |
| 5 |
eval a + (eval b) |
| 6 |
|
| 7 |
src/Calc.hs:11:18: Suggestion: Redundant bracket |
| 8 |
Found: |
| 9 |
(eval a) + (eval b) |
| 10 |
Perhaps: |
| 11 |
(eval a) + eval b |
| 12 |
|
| 13 |
src/Calc.hs:12:18: Suggestion: Redundant bracket |
| 14 |
Found: |
| 15 |
(eval a) * (eval b) |
| 16 |
Perhaps: |
| 17 |
eval a * (eval b) |
| 18 |
|
| 19 |
src/Calc.hs:12:18: Suggestion: Redundant bracket |
| 20 |
Found: |
| 21 |
(eval a) * (eval b) |
| 22 |
Perhaps: |
| 23 |
(eval a) * eval b |
| 24 |
|
| 25 |
src/CreditCard.hs:19:19: Suggestion: Redundant bracket |
| 26 |
Found: |
| 27 |
concat . (map toDigits) |
| 28 |
Perhaps: |
| 29 |
concat . map toDigits |
| 30 |
|
| 31 |
src/CreditCard.hs:22:19: Suggestion: Redundant bracket |
| 32 |
Found: |
| 33 |
((flip mod) 10) . sumDigits . doubleEveryOther . toDigits |
| 34 |
Perhaps: |
| 35 |
(flip mod) 10 . sumDigits . doubleEveryOther . toDigits |
| 36 |
|
| 37 |
src/CreditCard.hs:22:20: Suggestion: Redundant bracket |
| 38 |
Found: |
| 39 |
(flip mod) 10 |
| 40 |
Perhaps: |
| 41 |
flip mod 10 |
| 42 |
|
| 43 |
src/Editor.hs:95:15: Suggestion: Avoid lambda |
| 44 |
Found: |
| 45 |
\ l -> onBuffer $ line l |
| 46 |
Perhaps: |
| 47 |
onBuffer . line |
| 48 |
|
| 49 |
src/Fibonacci.hs:35:44: Warning: Redundant bracket |
| 50 |
Found: |
| 51 |
(fooStream) |
| 52 |
Perhaps: |
| 53 |
fooStream |
| 54 |
|
| 55 |
src/Golf.hs:7:19: Suggestion: Redundant bracket |
| 56 |
Found: |
| 57 |
[y | (j, y) <- (zip [1 .. ] ys), j `mod` i == 0] |
| 58 |
Perhaps: |
| 59 |
[y | (j, y) <- zip [1 .. ] ys, j `mod` i == 0] |
| 60 |
|
| 61 |
src/Golf.hs:8:8: Warning: Use map |
| 62 |
Found: |
| 63 |
zipWith ith [1 .. length xs] (repeat xs) |
| 64 |
Perhaps: |
| 65 |
map (\ x -> ith x xs) [1 .. length xs] |
| 66 |
|
| 67 |
src/Golf.hs:20:57: Suggestion: Redundant $ |
| 68 |
Found: |
| 69 |
draw c $ maxi |
| 70 |
Perhaps: |
| 71 |
draw c maxi |
| 72 |
|
| 73 |
src/Hanoi.hs:8:23: Suggestion: Redundant bracket |
| 74 |
Found: |
| 75 |
(hanoi (n - 1) from tmp to) |
| 76 |
++ [(from, to)] ++ (hanoi (n - 1) tmp to from) |
| 77 |
Perhaps: |
| 78 |
hanoi (n - 1) from tmp to |
| 79 |
++ [(from, to)] ++ (hanoi (n - 1) tmp to from) |
| 80 |
|
| 81 |
src/Hanoi.hs:8:52: Suggestion: Redundant bracket |
| 82 |
Found: |
| 83 |
[(from, to)] ++ (hanoi (n - 1) tmp to from) |
| 84 |
Perhaps: |
| 85 |
[(from, to)] ++ hanoi (n - 1) tmp to from |
| 86 |
|
| 87 |
src/JoinList.hs:35:15: Suggestion: Move brackets to avoid $ |
| 88 |
Found: |
| 89 |
n > (getSize $ size jl) |
| 90 |
Perhaps: |
| 91 |
n > getSize (size jl) |
| 92 |
|
| 93 |
src/JoinList.hs:52:13: Suggestion: Move brackets to avoid $ |
| 94 |
Found: |
| 95 |
i > (getSize $ size a) |
| 96 |
Perhaps: |
| 97 |
i > getSize (size a) |
| 98 |
|
| 99 |
src/JoinList.hs:67:16: Warning: Use concat |
| 100 |
Found: |
| 101 |
foldr (++) [] |
| 102 |
Perhaps: |
| 103 |
concat |
| 104 |
|
| 105 |
src/JoinList.hs:68:5: Warning: Eta reduce |
| 106 |
Found: |
| 107 |
line n b = indexJ n b |
| 108 |
Perhaps: |
| 109 |
line = indexJ |
| 110 |
|
| 111 |
src/JoinList.hs:69:43: Suggestion: Redundant bracket |
| 112 |
Found: |
| 113 |
(Single (scoreString l, Size 1) l) +++ dropJ n b |
| 114 |
Perhaps: |
| 115 |
Single (scoreString l, Size 1) l +++ dropJ n b |
| 116 |
|
| 117 |
src/LogAnalysis.hs:12:1: Error: Parse error |
| 118 |
Found: |
| 119 |
parseMessage :: String -> LogMessage |
| 120 |
parseMessage ("E":rest) = |
| 121 |
> parseMessage :: String -> LogMessage |
| 122 |
parseMessage s = fromMaybe (Unknown s) (pure fst <*> runParser logMessage s) where |
| 123 |
logMessage = parseError <|> parseInfo <|> parseWarn |
| 124 |
|
| 125 |
src/Matrix.hs:16:34: Suggestion: Redundant bracket |
| 126 |
Found: |
| 127 |
(Matrix 1 1 1 0) ^ n |
| 128 |
Perhaps: |
| 129 |
Matrix 1 1 1 0 ^ n |
| 130 |
|
| 131 |
src/Parser.hs:36:41: Warning: Use <|> |
| 132 |
Found: |
| 133 |
maybe (g s) Just (f s) |
| 134 |
Perhaps: |
| 135 |
f s <|> g s |
| 136 |
|
| 137 |
src/Parser.hs:44:9: Suggestion: Redundant $ |
| 138 |
Found: |
| 139 |
State $ parseDigit |
| 140 |
Perhaps: |
| 141 |
State parseDigit |
| 142 |
|
| 143 |
src/Parser.hs:57:9: Suggestion: Redundant $ |
| 144 |
Found: |
| 145 |
State $ parseSpace |
| 146 |
Perhaps: |
| 147 |
State parseSpace |
| 148 |
|
| 149 |
src/Parser.hs:65:12: Suggestion: Use <$ |
| 150 |
Found: |
| 151 |
const () <$> many space |
| 152 |
Perhaps: |
| 153 |
() <$ many space |
| 154 |
|
| 155 |
src/Parser.hs:65:12: Warning: Use void |
| 156 |
Found: |
| 157 |
const () <$> many space |
| 158 |
Perhaps: |
| 159 |
Control.Monad.void (many space) |
| 160 |
|
| 161 |
src/Parser.hs:76:6: Suggestion: Use <$ |
| 162 |
Found: |
| 163 |
const Add <$> (char '+') |
| 164 |
Perhaps: |
| 165 |
(Add <$ char '+') |
| 166 |
|
| 167 |
src/Parser.hs:76:6: Suggestion: Redundant bracket |
| 168 |
Found: |
| 169 |
const Add <$> (char '+') |
| 170 |
Perhaps: |
| 171 |
const Add <$> char '+' |
| 172 |
|
| 173 |
src/Parser.hs:76:35: Suggestion: Use <$ |
| 174 |
Found: |
| 175 |
const Mul <$> (char '*') |
| 176 |
Perhaps: |
| 177 |
(Mul <$ char '*') |
| 178 |
|
| 179 |
src/Parser.hs:76:35: Suggestion: Redundant bracket |
| 180 |
Found: |
| 181 |
const Mul <$> (char '*') |
| 182 |
Perhaps: |
| 183 |
const Mul <$> char '*' |
| 184 |
|
| 185 |
src/Party.hs:33:31: Suggestion: Redundant bracket |
| 186 |
Found: |
| 187 |
"Total fun: " ++ (show f) |
| 188 |
Perhaps: |
| 189 |
"Total fun: " ++ show f |
| 190 |
|
| 191 |
src/Risk.hs:33:12: Warning: Avoid reverse |
| 192 |
Found: |
| 193 |
reverse . sort |
| 194 |
Perhaps: |
| 195 |
sortOn Data.Ord.Down |
| 196 |
Note: Stabilizes sort order |
| 197 |
|
| 198 |
src/Risk.hs:34:12: Warning: Avoid reverse |
| 199 |
Found: |
| 200 |
reverse . sort |
| 201 |
Perhaps: |
| 202 |
sortOn Data.Ord.Down |
| 203 |
Note: Stabilizes sort order |
| 204 |
|
| 205 |
src/Risk.hs:35:21: Suggestion: Redundant bracket |
| 206 |
Found: |
| 207 |
(B.bimap length length) . partition id |
| 208 |
Perhaps: |
| 209 |
B.bimap length length . partition id |
| 210 |
|
| 211 |
src/Risk.hs:40:12: Suggestion: Redundant $ |
| 212 |
Found: |
| 213 |
max 3 $ (attackers b - 1) |
| 214 |
Perhaps: |
| 215 |
max 3 (attackers b - 1) |
| 216 |
|
| 217 |
src/Risk.hs:42:11: Suggestion: Redundant bracket |
| 218 |
Found: |
| 219 |
(flip replicateM) die |
| 220 |
Perhaps: |
| 221 |
flip replicateM die |
| 222 |
|
| 223 |
src/StringBuffer.hs:1:1: Warning: Unused LANGUAGE pragma |
| 224 |
Found: |
| 225 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} |
| 226 |
Perhaps: |
| 227 |
{-# LANGUAGE FlexibleInstances #-} |
| 228 |
Note: Extension TypeSynonymInstances is implied by FlexibleInstances |
| 229 |
|
| 230 |
src/StringBuffer.hs:12:3: Warning: Eta reduce |
| 231 |
Found: |
| 232 |
replaceLine n l b |
| 233 |
= unlines . uncurry replaceLine' . splitAt n . lines $ b |
| 234 |
Perhaps: |
| 235 |
replaceLine n l |
| 236 |
= unlines . uncurry replaceLine' . splitAt n . lines |
| 237 |
|
| 238 |
src/Wholemeal.hs:6:22: Suggestion: Use section |
| 239 |
Found: |
| 240 |
((-) 2) |
| 241 |
Perhaps: |
| 242 |
(2 -) |
| 243 |
|
| 244 |
src/Wholemeal.hs:23:1: Warning: Eta reduce |
| 245 |
Found: |
| 246 |
foldTree xs = foldr insert Leaf xs |
| 247 |
Perhaps: |
| 248 |
foldTree = foldr insert Leaf |
| 249 |
|
| 250 |
src/Wholemeal.hs:40:1: Warning: Eta reduce |
| 251 |
Found: |
| 252 |
map' f xs = foldr (\ x acc -> f x : acc) [] xs |
| 253 |
Perhaps: |
| 254 |
map' f = foldr (\ x acc -> f x : acc) [] |
| 255 |
|
| 256 |
src/Wholemeal.hs:40:13: Warning: Use map |
| 257 |
Found: |
| 258 |
foldr (\ x acc -> f x : acc) [] |
| 259 |
Perhaps: |
| 260 |
map (\ x -> f x) |
| 261 |
|
| 262 |
42 hints |