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

Fix define-instance context bug (1340) #1342

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

YarinHeffes
Copy link
Collaborator

Fixing the following bug:

(coalton-toplevel
  (define-class (C :col :elem))
  (define-class (Eq :elem => EqC :col :elem))
  (define-instance (C (List :elem) :elem))
  (define-instance (Eq :elem => EqC (List :elem) :elem)))

This block previously would not compile, because the typechecker checked that :elem satisfies Eq :elem before checking the predicates provided in the define-instance. See #1340.

@YarinHeffes YarinHeffes changed the title Fix define-instance context bug #1340 Fix define-instance context bug [i1340](https://github.com/coalton-lang/coalton/issues/1340) Jan 3, 2025
@YarinHeffes YarinHeffes changed the title Fix define-instance context bug [i1340](https://github.com/coalton-lang/coalton/issues/1340) Fix define-instance context bug (1340) Jan 3, 2025
@Jason94
Copy link

Jason94 commented Jan 4, 2025

Fixed the issue I was having working on collections, so looks good to me 👍

@stylewarning stylewarning enabled auto-merge (squash) January 14, 2025 03:08
@stylewarning stylewarning disabled auto-merge January 14, 2025 03:08
@stylewarning stylewarning enabled auto-merge (rebase) January 14, 2025 03:08
@stylewarning stylewarning merged commit d9954e7 into coalton-lang:main Jan 14, 2025
25 checks passed
@YarinHeffes YarinHeffes deleted the i1340 branch January 17, 2025 05:41
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.

3 participants