2 ms·
But the error that this article complains about is from a compiler that's 3 years old and 4 major releases out of date, and doing the exact same thing on the la
by josephcsible 5y ago
But the error that this article complains about is from a compiler that's 3 years old and 4 major releases out of date, and doing the exact same thing on the latest version will give you a better error.
- gilmi 5y agoTo further elaborate, this is the error you get on the latest GHC version (9.2.1): GHCi, version 9.2.1: https://www.haskell.org/ghc/ :? for help ghci> 1 + [2, 3] <interactive>:1:1: error: * No instance for (Num [Integer]) arising from a use of `it' * In the first argument of `print', namely `it' In a stmt of an interactive GHCi command: print it