add CCVector.ro_vector as a convenience alias

This commit is contained in:
Simon Cruanes 2015-12-14 17:46:26 +01:00
parent ca4f789967
commit 3ac1eff2af
2 changed files with 6 additions and 0 deletions

View file

@ -44,6 +44,8 @@ type ('a,'mut) t = {
type 'a vector = ('a, rw) t type 'a vector = ('a, rw) t
type 'a ro_vector = ('a, ro) t
let freeze v = { let freeze v = {
size=v.size; size=v.size;
vec=v.vec; vec=v.vec;

View file

@ -37,6 +37,10 @@ type ('a, 'mut) t
type 'a vector = ('a, rw) t type 'a vector = ('a, rw) t
(** Type synonym: a ['a vector] is mutable. *) (** Type synonym: a ['a vector] is mutable. *)
type 'a ro_vector = ('a, ro) t
(** Alias for immutable vectors.
@since NEXT_RELEASE *)
type 'a sequence = ('a -> unit) -> unit type 'a sequence = ('a -> unit) -> unit
type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist] type 'a klist = unit -> [`Nil | `Cons of 'a * 'a klist]
type 'a gen = unit -> 'a option type 'a gen = unit -> 'a option