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

Make CONS, NIL, JUST and NOTHING constructors have uniform names #3486

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

Z-snails
Copy link
Collaborator

@Z-snails Z-snails commented Feb 9, 2025

Description

Any constructor with the CONS tag is replaced with _builtin.CONS, and similarly for NIL, JUST and NOTHING.
Importantly, the tag for a CONS or NIL constructor is always 1 or 0 respectively.

This allows the identity optimisation to apply to conversions between list shaped things (see #3482)

Should this change go in the CHANGELOG?

  • If this is a fix, user-facing change, a compiler change, or a new paper
    implementation, I have updated CHANGELOG_NEXT.md (and potentially also
    CONTRIBUTORS.md).

Z-snails and others added 4 commits February 9, 2025 10:30
ie any constructor with the `CONS` tag is replaced with `_builtin.CONS`
Importantly, the tag for a `CONS`  or `NIL` constructor is always 1 or 0 respectively.

This allows the identity optimisation to apply to conversions between list shaped things
@Z-snails Z-snails merged commit a3aaef0 into idris-lang:main Feb 11, 2025
22 checks passed
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