
27 May
2020
27 May
'20
10:41 p.m.
El 27 may 2020, a las 18:19, Joseph C. Sible
escribió: On Wed, May 27, 2020 at 5:27 PM Henning Thielemann
wrote: I am not giving up anything, because I test my code against both 7.4.2 AND newer GHC versions.
You're giving up the ability to use every new feature introduced since then, since using them would mean your code stops working under 7.4.2.
What linter can easily catch "instance Foldable ((,) a)"?
HLint can: for example, if you run hlint on a file containing "foo = maximum (4,2)", it says "Warning: Using maximum on tuple"
maxRatio l = maximum l / toEnum (length l) main = do print $ maxRatio [1..5] -- Imagine after some refactoring you're passing around a tuple instead: print $ maxRatio ([1..5], 5)