Skip to main content

Module tail_rec

Module tail_rec 

Source
Expand description

tailRec (WellFormed.lean): every reference to a process being lowered is in tail position, as check_tail_rec.

Functions§

check_tail_rec
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.