Skip to content

nightly-2024-05-10: chore(experimental): Add compiler option to enable the Elaborator (#5…

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 02:17
· 79 commits to master since this release
c8b70ac
…003)

# Description

## Problem\*

Working towards #4594 

## Summary\*

Adds a hidden compiler option `--use-elaborator` to enable the
experimental elaborator code to be run on a codebase.

This also connects the elaborator with `dc_crate` (and thus the cli flag
above) by filling in the stub for elaborating functions. Filling in the
stub required quite a bit of code but it was as usual just copied from
name resolution and type checking.

## Additional Context

Originally I wanted to connect the elaborator to more of the frontend
(e.g. resolve globals, types, traits, etc) but this already ballooned to
a large line count. To review I'd recommend reviewing the non-elaborator
portions first then just skimming through the elaborator portions since
they are copied from `Resolver::resolve_function`,
`Resolver::extract_meta`, `Resolver::intern_function`, and
`type_check_func`.

## 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.