let is_regular_datacon_scheme tenv kvars kt =
let rt = result_type (as_fun tenv) kt in
let rigid_args = rigid_args rt in
(* Check that all the tycon arguments are distinct rigid variables. *)
List.for_all (fun v -> List.memq v kvars) rigid_args
&& List.length rigid_args == List.length kvars