let variable_set kind xs =
StringSet.fold
(fun x (vs, xts) ->
let k, n = kind (TName x) in
let v = variable k ?name:n () in
v :: vs, StringMap.add x ((TVariable v), undefined_position) xts
) xs ([], StringMap.empty)