Skip to content
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

Merged
merged 7 commits into from
Aug 23, 2018
Merged

Issue 599 #606

merged 7 commits into from
Aug 23, 2018

Conversation

Marwes
Copy link
Member

@Marwes Marwes commented Aug 7, 2018

Fixes #599

@@ -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());
Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marwes added 7 commits August 22, 2018 23:19
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
@Marwes Marwes changed the title [WIP] Issue 599 Issue 599 Aug 22, 2018
@Marwes Marwes merged commit 2562070 into gluon-lang:master Aug 23, 2018
@Marwes Marwes deleted the forall_escape branch August 23, 2018 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant