On Wed, Apr 9, 2008 at 8:53 AM, Martin Sulzmann &lt;<a href="mailto:martin.sulzmann@gmail.com">martin.sulzmann@gmail.com</a>&gt; wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Lennart, you said<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
(It&#39;s also pretty easy to fix the problem.)<br>
</blockquote>
<br></div>
What do you mean? Easy to fix the type checker, or easy to fix the program by inserting annotations<br>
to guide the type checker?<br>
<br>
Martin<br>
</blockquote><div>&nbsp;</div></div>I&#39;m referring to the situation where the type inferred by the type checker is illegal for me to put into the program.<br>In our example we can fix this in two ways, by making foo&#39; illegal even when it has no signature, or making foo&#39; legal even when it has a signature.<br>
<br>To make it illegal:&nbsp; If foo&#39; has no type signature, infer a type for foo&#39;, insert this type as a signature and type check again.&nbsp; If this fails, foo&#39; is illegal.<br><br>To make it legal: If foo&#39; with a type signature doesn&#39;t type check, try to infer a type without a signature.&nbsp; If this succeeds then check that the type that was inferred is alpha-convertible to the original signature.&nbsp; If it is, accept foo&#39;; the signature doesn&#39;t add any information.<br>
<br>Either of these two option would be much preferable to the current (broken) situation where the inferred signature is illegal.<br><br>&nbsp; -- Lennart<br><br>