fathom icon indicating copy to clipboard operation
fathom copied to clipboard

Cleanup `surface::elaboration`

Open Kmeakin opened this issue 2 years ago • 0 comments

  • 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 avatar Feb 06 '23 01:02 Kmeakin