Current CI config treats hlint warnings as errors?
I agree with most suggestions, and will apply them in my branch where I currently work, but I don't like it that
it wants to eta-reduce the last clause (it produces asymmetric code - that just looks ugly)
lastAtom f = sat $ \ (SAT a b c) ->
fmap (\a' -> SAT a' b c) (f a)
formula f = sat $ \ (SAT a b c) ->
fmap (\b' -> SAT a b' c) (f b)
stableMap f = sat $ \ (SAT a b c) ->
fmap (\c' -> SAT a b c') (f c)
it wants to "Move brackets to avoid $". But no! I use $ to avoid brackets!
Found:
(Bits $ contents a) + (Bits $ contents b)
Perhaps:
(Bits $ contents a) + Bits (contents b)
Also, for consistency: I like sum $ fmap I.size $ dimacsClauses s much better than (suggested) sum (I.size <$> dimacsClauses s)
it wants when (not ...) replaced by unless ... I think the first form is much clearer. The suggested form justs obfuscates the negation, and needs to be deciphered.
Current CI config treats hlint warnings as errors?
I agree with most suggestions, and will apply them in my branch where I currently work, but I don't like it that
it wants to eta-reduce the last clause (it produces asymmetric code - that just looks ugly)
it wants to "Move brackets to avoid $". But no! I use $ to avoid brackets!
Also, for consistency: I like
sum $ fmap I.size $ dimacsClauses s
much better than (suggested)sum (I.size <$> dimacsClauses s)
it wants
when (not ...)
replaced byunless ..
. I think the first form is much clearer. The suggested form justs obfuscates the negation, and needs to be deciphered.For reference, hlint config is at https://github.com/ekmett/ersatz/blob/master/.hlint.yaml