-
Notifications
You must be signed in to change notification settings - Fork 147
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
Issue 599 #606
Issue 599 #606
Conversation
@@ -1177,7 +1189,7 @@ impl<'a, 'e> Unifier<State<'a>, ArcType> for UnifierState<'a, Subsume<'e>> { | |||
} | |||
|
|||
(_, &Type::Forall(_, _, Some(_))) => { | |||
let r = r.instantiate_generics(&mut FnvMap::default()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was the actual unsound line. Unfortunately fixing this (and the direct fallout) exposed a unfication ambiguity where I have two sound programs but only one or the other will successfully typecheck depending on some minor tweaks to the typechecker... Researching options for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the unify_with_inferred_forall_in_record test https://github.com/gluon-lang/gluon/pull/606/files#diff-697e0a05f79902051453dccb6fd941c2R1050
Adds error types and kinds which always succeeds unification by always returning that they are the other parameter. Since these can only be created from an error that occurred earlier this does not cause unsoundness and ensures that errors that actually are more local (since they disregard erroneous info from other failed unifications).
Fixed in previous higher ranked fixes. Closes gluon-lang#604
This makes it consistent with the implicit arguments inserted during function application. Fixes gluon-lang#601
Fixes #599