fathom
fathom copied to clipboard
Cleanup `surface::elaboration`
- Move duplicated logic for synth/checking let terms into
synth_let_defand addLetDefstruct. - Replace some uses of
let initial_len = self.local_env.len(); ...; self.local_env.truncate(initial_len)withself.with_scope(|this| ...) - Use new
Builderto avoid repeatingself.scope.to_scope(...) - Use
forloops to reduce repetition when defining prims - Move recursion logic in
surface::elaboration::orderintosurface::Term::walk_child_terms
Hopefully this helps with some of the pain mentioned in #488