-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remaining self-gradualization errors #428
Comments
Great investigation! I think "which is too precise to be statically checked" is a really strange error. In other cases, we accept type variables as any() and add some constraint somewhere. Perhaps we should do that here too and get rid of this kind of error? |
I was thinking something similar. In general, the type var related bugs will only be fixable once we have a constraint solver, but we could store the constraints already instead of reporting a bug. With the solver in place, we'll hopefully also be able to do better with function polymorphism - I'm keen on testing some examples from Bidirectional typing for Erlang with the solver, but let's first finish with these remaining self-gradualization bugs before introducing new features/bugs ;) |
Great, yes I agree about storing the constraints now and solving them later. (I don't know if they can be solved in a sound manner though, but that's a different topic.) |
…own_problems This is one of the old self-check errors already reported in josefs#428, not a regression due to recent changes. Let's leave it as a known problem for now and focus on the recent regressions.
…own_problems This is one of the old self-check errors already reported in josefs#428, not a regression due to recent changes. Let's leave it as a known problem for now and focus on the recent regressions.
…own_problems This is one of the old self-check errors already reported in josefs#428, not a regression due to recent changes. Let's leave it as a known problem for now and focus on the recent regressions.
…own_problems This is one of the old self-check errors already reported in josefs#428, not a regression due to recent changes. Let's leave it as a known problem for now and focus on the recent regressions.
For the record, this is finally solved with changes that enabled #521. Since that PR, Gradualizer can self-check with no errors reported. It's checked in CI / GH Actions for each PR or commit to master. |
This is a list of all self-gradualization errors remaining after #427.
Not sure if this can be solved.
Caused by too limited record pattern interpretation, which doesn't consider matches on exact field values. This leads to consecutive clauses being treated as matching on the same args, which is not the case.
A series of list comprehension related errors, stemming from the fact that vars in generators are assumed to be of type
none()
. Tracked as #433.This error is caused by the fact that Gradualizer cannot infer that a literal
1
is actually an instance oferl_anno:anno()
. This is the case of all the forms generated by the parse transform and injected into the compiled prelude.No idea what's causing this one, possibly some refinement by clause which has gone wrong.
Not sure what's wrong here. If we add a type assertion like
NormalizedArgs :: [type()]
we get the same error, but with a list of type vars instead of[B]
.I have a hunch that this is caused by the
annotated_type
variant oftype()
, but haven't checked that.Error in checking function intersection types?Or a bug in the spec?Not sure.Edit: a bug in the spec, already fixed in #427.I'm not sure what's wrong, but neither
?assert_type
nor?annotate_type
helped as was the case in similar situations elsewhere. However, they do produce different error messages (type order is different).The text was updated successfully, but these errors were encountered: