<div>On Tue, 9 Oct 2018 at 7:30 AM, <<a href="mailto:camarao@dcc.ufmg.br">camarao@dcc.ufmg.br</a>> wrote:<br></div><div dir="auto"><br></div><div dir="auto">Thanks Carlos. I wish I could say thank you for clarifying, but I'm afraid this is as muddled as all the comments on the two proposals.</div><div dir="auto"><br></div><div dir="auto">I don't want to go over it again. I just want to say that my suggestion earlier in the thread is fundamentally different.</div><div dir="auto"><br></div><div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Em 2018-10-08 06:21, Anthony Clayden escreveu:<br>
> On Mon, 8 Oct 2018 at 8:41 PM, Simon Peyton Jones wrote:<br>
> </blockquote><div dir="auto"><br></div><div dir="auto">Strange: Simon's message has not appeared on the forum (he did send to it). I've quoted it in full in my reply, but did break it into separate pieces.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><br>
Global instance scope is not ok either: instances should be modular.</blockquote><div dir="auto"><br></div><div dir="auto">I just plain disagree. Fundamentally.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>> <br>
> Wadler & Blott's 1988 paper last paragraph had already explained: "But<br>
> there is no principal type! "<br>
<br>
There is always a principal type, for every expression.<br>
Of course the type depends on the context where the expression occurs.</blockquote><div dir="auto"><br></div><div dir="auto">Then it's not a _principal_ type for the expression, it's just a local type.</div><div dir="auto"><div><a href="http://foldoc.org/principal">http://foldoc.org/principal</a></div><br></div><div dir="auto">We arrive at the principal type by unifying the principal types of the sub-expressions, down to the principal types of each atom. W&B are pointing out that without global scope for instances, typing cannot assign a principal type to each method. (They left that as an open problem at the end of the paper. Haskell has resolved that problem by making all instances global. Changing Haskell to modular instances would be a breakage. Fundamentally.)</div><div dir="auto"><br></div><div dir="auto">Under my suggestion, we can assign a (global) principal type to each method -- indeed you must, by giving a signature very similar to a class declaration; and that distinguishes overloaded functions from parametric polymorphic functions.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">AntC</div></div></div>