sval: create cast_rl() which casts a range list to a different type