Skip to main content

check_tail_rec

Function check_tail_rec 

Source
pub fn check_tail_rec(tast: &Tast) -> Result<(), Diagnostics>
Expand description

Every reference to a process being lowered is in tail position (WellFormed.lean’s tailRec), so it is a back-edge to that process’s head and the graph is finite. Walked from each bound entry point: a first reference to a helper opens it (Lean’s μ), and inside a non-last operand of ; every open process is out of reach — its continuation would need a return stack.

§Errors

One diagnostic per such reference, at the reference.