ndmitchell / hlint

Haskell source code suggestions
Other
1.48k stars 195 forks source link

evaluate sum on binary list #1600

Closed jvoigtlaender closed 2 months ago

jvoigtlaender commented 5 months 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 5 months 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

ndmitchell commented 2 months ago

Thanks!