El 27 may 2020, a las 18:19, Joseph C. Sible <josephcsible@gmail.com> escribió:
On Wed, May 27, 2020 at 5:27 PM Henning Thielemann <lemming@henning-thielemann.de> 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)