
13 Feb
2009
13 Feb
'09
3:08 p.m.
On Fri, 2009-02-13 at 12:15 -0700, John A. De Goes wrote:
On Feb 13, 2009, at 12:07 PM, Jonathan Cast wrote:
Exactly! But if it fails, why on earth should any other use of map in the module succeed?
Because more information is known about other usages of map. Such is the nature of type inference.
No it's not. Type inference -- in Haskell --- means --- by definition! --- looking up the principle type of each sub-term, specializing it based on its use, and then generalizing to find the principle type of the overall term. Adding information can cause type inference to fail, but --- in Haskell as it exists --- it cannot cause type inference to succeed. Which is good! jcc