Module ShortPersistentSequence.Make

Parameters

Signature

include Sek__.PrivateSignatures.PSEQ with type 'a schunk = 'a S.schunk and type 'a t = 'a S.t
type 'a schunk = 'a S.schunk

Revealing the definition of this type allows the code in the module ShortPersistentSequence to work on this data structure directly, without introducing an extra layer of indirection.

type 'a t = 'a S.t =
| Zero of {
default : 'a;
}
| One of {
default : 'a;
x : 'a;
}
| Short of {
default : 'a;
a : 'a array;
}
| Level of {
weight : Sek__.PrivateSignatures.weight;
front : 'a schunk;
middle : 'a schunk t;
back : 'a schunk;
}
val create : 'a -> 'a t
val make : 'a -> Sek__.PublicTypeAbbreviations.length -> 'a -> 'a t
val init : 'a -> Sek__.PublicTypeAbbreviations.length -> (Sek__.PublicTypeAbbreviations.index -> 'a) -> 'a t
val default : 'a t -> 'a
val length : 'a t -> Sek__.PublicTypeAbbreviations.length
val is_empty : 'a t -> bool
val push : Sek__.PrivateSignatures.pov -> 'a t -> 'a -> 'a t
val pop : Sek__.PrivateSignatures.pov -> 'a t -> 'a * 'a t
val peek : Sek__.PrivateSignatures.pov -> 'a t -> 'a
val get : 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a
val set : 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a -> 'a t
val concat : 'a t -> 'a t -> 'a t
val split : 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a t * 'a t
val take : 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a t
val drop : 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a t
val sub : 'a t -> Sek__.PublicTypeAbbreviations.index -> Sek__.PublicTypeAbbreviations.length -> 'a t
val iter_segments : Sek__.PrivateSignatures.pov -> 'a t -> 'a Sek__.PublicTypeAbbreviations.segments
val to_array : 'a t -> 'a array
val of_array_segment : 'a -> 'a array -> Sek__.PublicTypeAbbreviations.index -> Sek__.PublicTypeAbbreviations.length -> 'a t
val of_array : 'a -> 'a array -> 'a t
val print : ('a -> PPrint.document) -> 'a t -> PPrint.document
val check : 'a t -> unit
val get_segment : Sek__.PrivateSignatures.pov -> 'a t -> Sek__.PublicTypeAbbreviations.index -> 'a Sek__.PublicTypeAbbreviations.segment
val of_short_array_destructive : 'a -> 'a array -> 'a t
val wrap_long : 'a S.t -> 'a t
val wrap : 'a S.t -> 'a t
val unwrap : 'a t -> 'a S.t