Unsettling dialyzer errors
Sun Feb 28 23:00:05 CET 2021
On Sun, Feb 28, 2021 at 9:12 PM Nicolas Martyanoff <khaelin@REDACTED>
> Josef Svenningsson <josef.svenningsson@REDACTED> writes:
> > On 2/28/21 11:39 AM, Josef Svenningsson wrote:
> > No, Gradualizer is not saying that foo/1 should take arguments of type
> > t1(). It's saying that the program calls f1/1 with a variable of type
> > t1()|t2() but the declared type of f1/1 only accepts arguments of t1().
> > Hence the error.
> > Gradualizer looks at the declared types of functions and will report an
> > error if there is an incompatibility, but it doesn't "expect" the types
> > be anything.
> This is the behaviour I expect from a type checker. Too many times, I
> end up with errors about types that Dialyzer itself inferred,
> having to find out how they relate to the type specifications I
> I'll try to run Gradualizer on my main codebase, it should be quite
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions