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

Cleanup surface::elaboration #495

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Kmeakin
Copy link
Contributor

@Kmeakin Kmeakin commented Feb 6, 2023

  • Move duplicated logic for synth/checking let terms into synth_let_def and add LetDef struct.
  • Replace some uses of let initial_len = self.local_env.len(); ...; self.local_env.truncate(initial_len) with self.with_scope(|this| ...)
  • Use new Builder to avoid repeating self.scope.to_scope(...)
  • Use for loops to reduce repetition when defining prims
  • Move recursion logic in surface::elaboration::order into surface::Term::walk_child_terms

Hopefully this helps with some of the pain mentioned in #488

@Kmeakin Kmeakin force-pushed the elaboration-cleanup branch 3 times, most recently from 4115b05 to 27e656a Compare February 6, 2023 04:12
@Kmeakin Kmeakin marked this pull request as ready for review February 6, 2023 06:20
@Kmeakin Kmeakin force-pushed the elaboration-cleanup branch 12 times, most recently from fac455c to 49c2156 Compare February 13, 2023 03:57
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.

None yet

1 participant