Converts a lambda expression into a document.
Converts a lambda expression into a document.
At every point in the conversion, we keep track of:
The lambda expression to convert.
Whether we already know the type of this expression.
Names bound by enclosing binders.
Already used free identifiers, together with the variable or constant they represent.
The priority of the enclosing operator.
Pretty-printed document and the free identifiers.