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

Implement context simplification for subclasses #2

Closed
wbbradley opened this issue May 12, 2019 · 1 comment
Closed

Implement context simplification for subclasses #2

wbbradley opened this issue May 12, 2019 · 1 comment

Comments

@wbbradley
Copy link
Contributor

class F x {
  fn f(x) Int
}

class G x {
  has F
  fn g(x) Int
}

fn h(y) => g(y)

Should result in scheme (∀ a . a -> Int) | [G a] not (∀ a . a -> Int) | [F a, G a] because G a implies F a.

@wbbradley
Copy link
Contributor Author

This becomes more important if I decide to add default instance selection to the language. Currently it's not an issue.

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

No branches or pull requests

1 participant