<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 28, 2021 at 9:12 PM Nicolas Martyanoff <<a href="mailto:khaelin@gmail.com">khaelin@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Josef Svenningsson <<a href="mailto:josef.svenningsson@gmail.com" target="_blank">josef.svenningsson@gmail.com</a>> writes:<br>
<br>
> On 2/28/21 11:39 AM, Josef Svenningsson wrote:<br>
> No, Gradualizer is not saying that foo/1 should take arguments of type<br>
> t1(). It's saying that the program calls f1/1 with a variable of type<br>
> t1()|t2() but the declared type of f1/1 only accepts arguments of t1().<br>
> Hence the error.<br>
> Gradualizer looks at the declared types of functions and will report an<br>
> error if there is an incompatibility, but it doesn't "expect" the types to<br>
> be anything.<br>
This is the behaviour I expect from a type checker. Too many times, I<br>
end up with errors about types that Dialyzer itself inferred,<br>
having to find out how they relate to the type specifications I<br>
provided.<br>
<br>
I'll try to run Gradualizer on my main codebase, it should be quite<br>
interesting.<br><br></blockquote><div>I'm glad to hear you're giving it a try. Given that you've used Dialyzer in the past and it treats specs somewhat differently compared to Gradualizer, be prepared to have to alter the specs somewhat. But I hope that it should be relatively straightforward. Gradualizer is designed to be a fairly conventional type system so if you have experience with those before then I think you should feel at home. Let us know if anything trips you up.</div><div><br></div><div>Cheers,</div><div><br></div><div>Josef</div></div></div>