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

feat: implement arithmetic on numeric generics #4958

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

michaeljklein
Copy link
Contributor

Description

Problem*

Resolves #4784

Summary*

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [For Experimental Features] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

…ith operation, move constant/named-generic into sub-struct, add unit and test_programs tests
github-merge-queue bot pushed a commit that referenced this pull request May 9, 2024
# Description

## Problem\*

Resolves #4953

## Summary\*

Adds an elaborator - a concept borrowed from dependently typed languages
- which performs name resolution and type checking simultaneously. The
new elaborator is currently disabled (inaccessible from user code) since
it is not hooked up to the `dc_crate` module.

This PR is extremely large (sorry!) but is 99% a pseudo copy-paste of
existing code from the name resolver and type checker, only slightly
adapted to be able to work in tandem. Unfortunately, this also means
that we'll need to duplicate any changes made to the name resolver &
type checker in the elaborator as well until we can remove the old name
resolution and type checking passes. For example,
#4958 will need to be integrated
into the elaborator as well.

## Additional Context

After this PR the plan is to
1. Connect the elaborator to `dc_crate`, enabling it with a command-line
option.
2. Insert logic for the comptime scanning pass in the elaborator as
well.
3. Test the elaborator against all existing tests.
4. Once it passes, we can use the elaborator by default and delete the
name resolution, type checking, and comptime scanning passes.

## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [ ] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
@michaeljklein michaeljklein mentioned this pull request May 21, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

Arithmetic on numeric generics
1 participant