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

Predicates being dropped on top-level variable #3

Closed
eliaslfox opened this issue Aug 30, 2021 · 0 comments · Fixed by #48
Closed

Predicates being dropped on top-level variable #3

eliaslfox opened this issue Aug 30, 2021 · 0 comments · Fixed by #48
Assignees
Labels
bug Something isn't working
Milestone

Comments

@eliaslfox
Copy link
Collaborator

eliaslfox commented Aug 30, 2021

The predicates for top level variables are being dropped leading to incorrect codegen:

(declare test (List Int))
(define test mempty)

Output code:

(COALTON-IMPL::DEFINE-GLOBAL-LEXICAL TEST MEMPTY)

Expected:

(COALTON-IMPL::DEFINE-GLOBAL-LEXICAL TEST (A1 |MONOID LIST| MEMPTY))

This seems to only happen in explicitly bound variables that would otherwise face the monomorphism restriction (if implicit).

@eliaslfox eliaslfox added the bug Something isn't working label Aug 30, 2021
@eliaslfox eliaslfox added this to the 0.1 Release milestone Aug 30, 2021
colescott added a commit that referenced this issue Sep 1, 2021
colescott added a commit that referenced this issue Sep 1, 2021
colescott added a commit that referenced this issue Sep 1, 2021
colescott added a commit that referenced this issue Sep 1, 2021
Jobhdez added a commit to Jobhdez/coalton that referenced this issue May 4, 2023
# This is the 1st commit message:

resolve conflict

# This is the commit message coalton-lang#2:

fix conflict

# This is the commit message coalton-lang#3:

squash commits

# This is the commit message coalton-lang#4:

address review.
macrologist added a commit to macrologist/coalton that referenced this issue Oct 10, 2023
# This is the 1st commit message:

Labels for all loop varieties

more parser tests

# This is the commit message coalton-lang#2:

doh

# This is the commit message coalton-lang#3:

Fix: bad codgen for bare loop

# This is the commit message coalton-lang#4:

Fix: bad parse of while-let node after label feature

# This is the commit message coalton-lang#5:

Add: loop documentation to intro doc

# This is the commit message coalton-lang#6:

requested malarchy

# This is the commit message coalton-lang#7:

more tests; no break/continue from lambdas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants