by notallama · 15y ago · 0 comments
[1,2,3,4,5] :: [Int] problem solved!
In GHCi (the interpreter) this doesn't happen. It has some defaulting rules to alleviate this, but I don't quite understand them, so I can't say why they didn't kick in in this case.
One of the first things you learn as a Haskell programmer is to treat type inference with suspicion.
I appreciate that his goals were more mathematically oriented than not, but surely he would've seen something like this coming?