|
|
|
|
|
by hesselink
5661 days ago
|
|
Actually, you don't need to in most real programs. You usually use the elements of a list with some function that makes it clear what type they have. 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.