let lookup_type_variable ?pos env k = try TVariable (as_type_variable (Env.lookup env.type_info k)) with Not_found -> raise (UnboundTypeVariable ((pos_or_undef pos), k))