method
add_patt =
fun
p
->
{< env = fold_pattern_vars
S
.add p env; >}