Hacker News new | ask | show | jobs
by mightybyte 5162 days ago
It's essentially the same thing as doing:

    > 11111111111111111111111111111 :: Int
Numeric literals are automatically treated as Num instances, so when you subtract (length []) which is an Int, the literal is treated as an Int. In this case, it triggers an overflow condition, something that programmers understand well and have been dealing with from the earliest days.