[Haskell-beginners] Explicit specification of function types

Michael Mossey mpm at alumni.caltech.edu
Tue Mar 24 00:21:42 EDT 2009

I'm a beginner just learning about type inference (through getting lots 
of error messages and using :t a lot). I find it fascinating, and it 
seems a shame to disregard this power by declaring all types. However I 
realize that it's the more global or critical types that should be 
declared, and more local areas can be left to inference. Perhaps also 
the compiler's ability to infer is related to its ability to detect 
compile-time type errors. In other words, if you program a compiler to 
be sensitive enough to detect all type errors at compile time, then by 
necessity you are giving it the smarts to infer types. Is that right?


More information about the Beginners mailing list