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

[TC] Allow instantiation of type classes defined by extension #515

Open
fdupress opened this issue Jan 12, 2024 · 0 comments
Open

[TC] Allow instantiation of type classes defined by extension #515

fdupress opened this issue Jan 12, 2024 · 0 comments
Assignees

Comments

@fdupress
Copy link
Member

Consider

type class monoid = {
  op idm : monoid
  op (+) : monoid -> monoid -> monoid

  ...
}.

type class group <: monoid = {
  op [-] : group -> group

  ...
}.

It is currently only possible to instantiate [-] when defining an instance of group, even if an instance of monoid exists. (Ideally, we would want to be able to define the instance of group directly. But defining it by explicit extension of an instance of monoid would be fine as well.)

@strub strub self-assigned this Apr 5, 2024
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

2 participants