ndmitchell / hlint

Haskell source code suggestions
Other
1.45k stars 194 forks source link

evaluate sum on binary list #1600

Open jvoigtlaender opened 1 month ago

jvoigtlaender commented 1 month ago

Seen in student code.

(Of course, similar evaluation rules like sum [x] -> x could also be added. But this is the one I have really seen.)

jvoigtlaender commented 1 month ago

The new hint is also in the spirit of existing ones like these: https://github.com/ndmitchell/hlint/blob/752baba987f61d3d3778751f2709293521841e0c/data/hlint.yaml#L132-L133