pub fn synth(term: &Node, env: &mut Env) -> SynthResultExpand description
Synthesise the type of term under env.
On success, SynthResult.typ carries the inferred type as a Node AST.
On failure, typ is None and diagnostics carries one or more
E020..E024 diagnostics describing the obstruction.