Radek Szymczyszyn
Radek Szymczyszyn
Let's try another refinement example: ```erlang -spec j([atom()]) -> ok. j([]) -> ok; j([C1, C2 | _]) -> ok; j([Cs]) -> ok. ``` The refinement would go as follows: ```erlang...
Hmm, indeed, it might make sense to disable it for lists 🤔 Exhaustiveness checking makes the most sense for variant types anyway.
Hi, @berbiche! I think the `cons` error you describe is solved by the next commit from #359, that is https://github.com/josefs/Gradualizer/pull/359/commits/bebce51d3c4aab812686e0f78f81d7f13bca4030. At commit f044c35f2701a76a6eb26d8154c0c6e76980eb49 in #359 no tests fail. Now, there...
Thanks @zuiderkwast, that's really helpful! For the record, there was a bidirectional typing talk at this year's SIGPLAN Erlang Workshop - https://www.youtube.com/watch?v=MAerjPQUKQQ - but I cannot find the implementation, it...
I finally started reading _Bidirectional Typing_ by Jana Dunfield and Neel Krishnaswami and here's how the paper introduces the problem: > When we implement a typing judgment, say Γ ⊢...
Confirmed, still a bug as of now: ``` $ ./bin/gradualizer --version Gradualizer v0.1.3-145-gab75f28 $ cat > ex.erl -module(ex). -export([example/1]). -spec example({a, atom()} | {i, integer()}) -> atom(). example({i, I}) when...
Confirmed, this is still the case: ``` 18:01:06 erszcz @ x6 : ~/work/erszcz/gradualizer ((ab75f28...) %) $ ./bin/gradualizer --version Gradualizer v0.1.3-145-gab75f28 18:02:31 erszcz @ x6 : ~/work/erszcz/gradualizer ((ab75f28...) %) $ cat...
Yep, that's one option. Alternatively, it might be that somehow the `state()` type with the file annotation is compared with the same type without the annotation and is not equal...
`type_check_cons_in` and `type_check_cons_union` seem to implement some typing rules which were never finished - the code is there, but it's neither exported nor called. We can remove those, bet let's...
> The noproc error is probably specific to the rebar3 plugin. My guess is that it doesn't start gradualizer as an OTP application, or something like that which was changed...