let fresh_datacon_scheme pos tenv k =
let (_, kvars, kt) = lookup_datacon tenv k in
let fresh_kvars =
let mkvar ?name v = variable Flexible ?name () in
List.map mkvar kvars
in
let fresh_kvars_assoc = List.combine kvars fresh_kvars
in
(fresh_kvars, change_arterm_vars fresh_kvars_assoc kt)