Module Bindlib.Ctxt

A functor that can be used to obtain context-manipulating functions, given the specification of a renaming policy. The defined ctxt type as well as the obtained functions can then be used as a drop-in replacement for their default counterparts (found at the top level of the Bindlib module).

Parameters

module R : Renaming

Signature

type ctxt = R.ctxt
val empty_ctxt : ctxt
val free_vars : 'a box -> ctxt
val new_var_in : ctxt -> ( 'a var -> 'a ) -> string -> 'a var * ctxt
val new_mvar_in : ctxt -> ( 'a var -> 'a ) -> string array -> 'a mvar * ctxt
val unbind_in : ctxt -> ( 'a, 'b ) binder -> 'a var * 'b * ctxt
val unbind2_in : ctxt -> ( 'a, 'b ) binder -> ( 'a, 'c ) binder -> 'a var * 'b * 'c * ctxt
val unmbind_in : ctxt -> ( 'a, 'b ) mbinder -> 'a mvar * 'b * ctxt
val unmbind2_in : ctxt -> ( 'a, 'b ) mbinder -> ( 'a, 'c ) mbinder -> 'a mvar * 'b * 'c * ctxt