Module Base.BlitSource

Sourcemodule type Sequence = sig ... end
Sourcetype ('src, 'dst) blit = src:'src @ local -> src_pos:int -> dst:'dst @ local -> dst_pos:int -> len:int -> unit

If blit : (src, dst) blit, then blit ~src ~src_pos ~len ~dst ~dst_pos blits len values from src starting at position src_pos to dst at position dst_pos. Furthermore, blit raises if src_pos, len, and dst_pos don't specify valid slices of src and dst.

Sourcetype ('src, 'dst) blito = src:'src @ local -> ?src_pos:int -> ?src_len:int -> dst:'dst @ local -> ?dst_pos:int -> unit -> unit

blito is like blit, except that the src_pos, src_len, and dst_pos are optional (hence the "o" in "blito"). Also, we use src_len rather than len as a reminder that if src_len isn't supplied, then the default is to take the slice running from src_pos to the end of src.

Sourcetype ('src, 'dst) blit_global = src:'src -> src_pos:int -> dst:'dst -> dst_pos:int -> len:int -> unit

Like blit, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) blito_global = src:'src -> ?src_pos:int -> ?src_len:int -> dst:'dst -> ?dst_pos:int -> unit -> unit

Like blito, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) sub = 'src @ local -> pos:int -> len:int -> 'dst

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo = ?pos:int -> ?len:int -> 'src @ local -> 'dst
Sourcetype ('src, 'dst) sub_global = 'src -> pos:int -> len:int -> 'dst

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global = ?pos:int -> ?len:int -> 'src -> 'dst

Like subo, but not allowing local_ values (on compilers supporting modes).

Sourcemodule type S1_phantom2_distinct__value = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value = sig ... end
Sourcemodule type S = sig ... end
Sourcemodule type S__'value_mod_external64' = sig ... end
Sourcemodule type S__value_or_null = sig ... end
Sourcemodule type S__'value_or_null_mod_separable' = sig ... end
Sourcemodule type S1__value = sig ... end
Sourcemodule type S1 = sig ... end
Sourcemodule type S1__'value_mod_external64' = sig ... end
Sourcemodule type S1__value_or_null = sig ... end
Sourcemodule type S1__'value_or_null_mod_separable' = sig ... end
Sourcemodule type S1_zero_alloc__value = sig ... end
Sourcemodule type S1_zero_alloc = sig ... end
Sourcemodule type S1_zero_alloc__value_or_null = sig ... end
Sourcemodule type S_distinct = sig ... end
Sourcemodule type S_distinct_global = sig ... end
Sourcemodule type S_phantom_distinct = sig ... end
Sourcemodule type S_to_string = sig ... end
Sourcemodule type S_to_string_global = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value = sig ... end
Sourcemodule type Sequence1 = sig ... end
Sourcemodule type Sequence1__'value_mod_external64' = sig ... end
Sourcemodule type Sequence1__value_or_null = sig ... end
Sourcemodule type Sequence1_zero_alloc__value = sig ... end
Sourcemodule type Sequence1_zero_alloc = sig ... end
Sourcetype ('src, 'dst) sub__unique = 'src @ local -> pos:int -> len:int -> 'dst @ unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__unique = ?pos:int -> ?len:int -> 'src @ local -> 'dst @ unique
Sourcetype ('src, 'dst) sub_global__unique = 'src -> pos:int -> len:int -> 'dst @ unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__unique = ?pos:int -> ?len:int -> 'src -> 'dst @ unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct__unique = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__unique = sig ... end
Sourcemodule type S__unique = sig ... end
Sourcemodule type S__'value_mod_external64'__unique = sig ... end
Sourcemodule type S__value_or_null__unique = sig ... end
Sourcemodule type S1__value__unique = sig ... end
Sourcemodule type S1__unique = sig ... end
Sourcemodule type S1__value_or_null__unique = sig ... end
Sourcemodule type S1_zero_alloc__value__unique = sig ... end
Sourcemodule type S1_zero_alloc__unique = sig ... end
Sourcemodule type S_distinct__unique = sig ... end
Sourcemodule type S_distinct_global__unique = sig ... end
Sourcemodule type S_phantom_distinct__unique = sig ... end
Sourcemodule type S_to_string__unique = sig ... end
Sourcemodule type S_to_string_global__unique = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__unique = sig ... end
Sourcemodule type Sequence1__unique = sig ... end
Sourcemodule type Sequence1__value_or_null__unique = sig ... end
Sourcemodule type Sequence1_zero_alloc__unique = sig ... end
Sourcetype ('src, 'dst) sub__stack = 'src @ local -> pos:int -> len:int -> 'dst @ local

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__stack = ?pos:int -> ?len:int -> 'src @ local -> 'dst @ local
Sourcetype ('src, 'dst) sub_global__stack = 'src -> pos:int -> len:int -> 'dst @ local

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__stack = ?pos:int -> ?len:int -> 'src -> 'dst @ local

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct__stack = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__stack = sig ... end
Sourcemodule type S__stack = sig ... end
Sourcemodule type S__'value_mod_external64'__stack = sig ... end
Sourcemodule type S__value_or_null__stack = sig ... end
Sourcemodule type S1__value__stack = sig ... end
Sourcemodule type S1__stack = sig ... end
Sourcemodule type S1__'value_mod_external64'__stack = sig ... end
Sourcemodule type S1__value_or_null__stack = sig ... end
Sourcemodule type S1_zero_alloc__value__stack = sig ... end
Sourcemodule type S1_zero_alloc__stack = sig ... end
Sourcemodule type S_distinct__stack = sig ... end
Sourcemodule type S_distinct_global__stack = sig ... end
Sourcemodule type S_phantom_distinct__stack = sig ... end
Sourcemodule type S_to_string__stack = sig ... end
Sourcemodule type S_to_string_global__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__stack = sig ... end
Sourcemodule type Sequence1__stack = sig ... end
Sourcemodule type Sequence1__value_or_null__stack = sig ... end
Sourcemodule type Sequence1_zero_alloc__stack = sig ... end
Sourcetype ('src, 'dst) sub__unique__stack = 'src @ local -> pos:int -> len:int -> 'dst @ local unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__unique__stack = ?pos:int -> ?len:int -> 'src @ local -> 'dst @ local unique
Sourcetype ('src, 'dst) sub_global__unique__stack = 'src -> pos:int -> len:int -> 'dst @ local unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__unique__stack = ?pos:int -> ?len:int -> 'src -> 'dst @ local unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__unique__stack = sig ... end
Sourcemodule type S__unique__stack = sig ... end
Sourcemodule type S__value_or_null__unique__stack = sig ... end
Sourcemodule type S1__value__unique__stack = sig ... end
Sourcemodule type S1__unique__stack = sig ... end
Sourcemodule type S1__value_or_null__unique__stack = sig ... end
Sourcemodule type S1_zero_alloc__unique__stack = sig ... end
Sourcemodule type S_distinct__unique__stack = sig ... end
Sourcemodule type S_distinct_global__unique__stack = sig ... end
Sourcemodule type S_phantom_distinct__unique__stack = sig ... end
Sourcemodule type S_to_string__unique__stack = sig ... end
Sourcemodule type S_to_string_global__unique__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__unique__stack = sig ... end
Sourcemodule type Sequence1__unique__stack = sig ... end
Sourcemodule type Sequence__read = sig ... end
Sourcetype ('src, 'dst) blit__read = src:'src @ local read -> src_pos:int -> dst:'dst @ local -> dst_pos:int -> len:int -> unit

If blit : (src, dst) blit, then blit ~src ~src_pos ~len ~dst ~dst_pos blits len values from src starting at position src_pos to dst at position dst_pos. Furthermore, blit raises if src_pos, len, and dst_pos don't specify valid slices of src and dst.

Sourcetype ('src, 'dst) blito__read = src:'src @ local read -> ?src_pos:int -> ?src_len:int -> dst:'dst @ local -> ?dst_pos:int -> unit -> unit

blito is like blit, except that the src_pos, src_len, and dst_pos are optional (hence the "o" in "blito"). Also, we use src_len rather than len as a reminder that if src_len isn't supplied, then the default is to take the slice running from src_pos to the end of src.

Sourcetype ('src, 'dst) blit_global__read = src:'src @ read -> src_pos:int -> dst:'dst -> dst_pos:int -> len:int -> unit

Like blit, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) blito_global__read = src:'src @ read -> ?src_pos:int -> ?src_len:int -> dst:'dst -> ?dst_pos:int -> unit -> unit

Like blito, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) sub__read = 'src @ local read -> pos:int -> len:int -> 'dst

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__read = ?pos:int -> ?len:int -> 'src @ local read -> 'dst
Sourcetype ('src, 'dst) sub_global__read = 'src @ read -> pos:int -> len:int -> 'dst

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__read = ?pos:int -> ?len:int -> 'src @ read -> 'dst

Like subo, but not allowing local_ values (on compilers supporting modes).

Sourcemodule type S1_phantom2_distinct__value__read = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct__read = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__read = sig ... end
Sourcemodule type S__read = sig ... end
Sourcemodule type S__'value_mod_external64'__read = sig ... end
Sourcemodule type S__value_or_null__read = sig ... end
Sourcemodule type S1__value__read = sig ... end
Sourcemodule type S1__read = sig ... end
Sourcemodule type S1__'value_mod_external64'__read = sig ... end
Sourcemodule type S1__value_or_null__read = sig ... end
Sourcemodule type S1_zero_alloc__value__read = sig ... end
Sourcemodule type S1_zero_alloc__read = sig ... end
Sourcemodule type S_distinct__read = sig ... end
Sourcemodule type S_distinct_global__read = sig ... end
Sourcemodule type S_phantom_distinct__read = sig ... end
Sourcemodule type S_to_string__read = sig ... end
Sourcemodule type S_to_string_global__read = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__read = sig ... end
Sourcemodule type Sequence1__read = sig ... end
Sourcemodule type Sequence1__value_or_null__read = sig ... end
Sourcemodule type Sequence1_zero_alloc__value__read = sig ... end
Sourcemodule type Sequence1_zero_alloc__read = sig ... end
Sourcetype ('src, 'dst) sub__read__unique = 'src @ local read -> pos:int -> len:int -> 'dst @ unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__read__unique = ?pos:int -> ?len:int -> 'src @ local read -> 'dst @ unique
Sourcetype ('src, 'dst) sub_global__read__unique = 'src @ read -> pos:int -> len:int -> 'dst @ unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__read__unique = ?pos:int -> ?len:int -> 'src @ read -> 'dst @ unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__read__unique = sig ... end
Sourcemodule type S__read__unique = sig ... end
Sourcemodule type S__value_or_null__read__unique = sig ... end
Sourcemodule type S1__value__read__unique = sig ... end
Sourcemodule type S1__read__unique = sig ... end
Sourcemodule type S1__value_or_null__read__unique = sig ... end
Sourcemodule type S1_zero_alloc__read__unique = sig ... end
Sourcemodule type S_distinct__read__unique = sig ... end
Sourcemodule type S_distinct_global__read__unique = sig ... end
Sourcemodule type S_phantom_distinct__read__unique = sig ... end
Sourcemodule type S_to_string__read__unique = sig ... end
Sourcemodule type S_to_string_global__read__unique = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__read__unique = sig ... end
Sourcemodule type Sequence1__read__unique = sig ... end
Sourcetype ('src, 'dst) sub__read__stack = 'src @ local read -> pos:int -> len:int -> 'dst @ local

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__read__stack = ?pos:int -> ?len:int -> 'src @ local read -> 'dst @ local
Sourcetype ('src, 'dst) sub_global__read__stack = 'src @ read -> pos:int -> len:int -> 'dst @ local

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__read__stack = ?pos:int -> ?len:int -> 'src @ read -> 'dst @ local

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct__read__stack = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__read__stack = sig ... end
Sourcemodule type S__read__stack = sig ... end
Sourcemodule type S__value_or_null__read__stack = sig ... end
Sourcemodule type S1__value__read__stack = sig ... end
Sourcemodule type S1__read__stack = sig ... end
Sourcemodule type S1__value_or_null__read__stack = sig ... end
Sourcemodule type S1_zero_alloc__value__read__stack = sig ... end
Sourcemodule type S1_zero_alloc__read__stack = sig ... end
Sourcemodule type S_distinct__read__stack = sig ... end
Sourcemodule type S_distinct_global__read__stack = sig ... end
Sourcemodule type S_phantom_distinct__read__stack = sig ... end
Sourcemodule type S_to_string__read__stack = sig ... end
Sourcemodule type S_to_string_global__read__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__read__stack = sig ... end
Sourcemodule type Sequence1__read__stack = sig ... end
Sourcemodule type Sequence1_zero_alloc__read__stack = sig ... end
Sourcetype ('src, 'dst) sub__read__unique__stack = 'src @ local read -> pos:int -> len:int -> 'dst @ local unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__read__unique__stack = ?pos:int -> ?len:int -> 'src @ local read -> 'dst @ local unique
Sourcetype ('src, 'dst) sub_global__read__unique__stack = 'src @ read -> pos:int -> len:int -> 'dst @ local unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__read__unique__stack = ?pos:int -> ?len:int -> 'src @ read -> 'dst @ local unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__read__unique__stack = sig ... end
Sourcemodule type S__read__unique__stack = sig ... end
Sourcemodule type S1__value__read__unique__stack = sig ... end
Sourcemodule type S1__read__unique__stack = sig ... end
Sourcemodule type S_distinct__read__unique__stack = sig ... end
Sourcemodule type S_to_string__read__unique__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__read__unique__stack = sig ... end
Sourcemodule type Sequence__immutable = sig ... end
Sourcetype ('src, 'dst) blit__immutable = src:'src @ local immutable -> src_pos:int -> dst:'dst @ local -> dst_pos:int -> len:int -> unit

If blit : (src, dst) blit, then blit ~src ~src_pos ~len ~dst ~dst_pos blits len values from src starting at position src_pos to dst at position dst_pos. Furthermore, blit raises if src_pos, len, and dst_pos don't specify valid slices of src and dst.

Sourcetype ('src, 'dst) blito__immutable = src:'src @ local immutable -> ?src_pos:int -> ?src_len:int -> dst:'dst @ local -> ?dst_pos:int -> unit -> unit

blito is like blit, except that the src_pos, src_len, and dst_pos are optional (hence the "o" in "blito"). Also, we use src_len rather than len as a reminder that if src_len isn't supplied, then the default is to take the slice running from src_pos to the end of src.

Sourcetype ('src, 'dst) blit_global__immutable = src:'src @ immutable -> src_pos:int -> dst:'dst -> dst_pos:int -> len:int -> unit

Like blit, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) blito_global__immutable = src:'src @ immutable -> ?src_pos:int -> ?src_len:int -> dst:'dst -> ?dst_pos:int -> unit -> unit

Like blito, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) sub__immutable = 'src @ local immutable -> pos:int -> len:int -> 'dst

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__immutable = ?pos:int -> ?len:int -> 'src @ local immutable -> 'dst
Sourcetype ('src, 'dst) sub_global__immutable = 'src @ immutable -> pos:int -> len:int -> 'dst

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__immutable = ?pos:int -> ?len:int -> 'src @ immutable -> 'dst

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S1_phantom2_distinct__immutable = sig ... end

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__immutable = sig ... end
Sourcemodule type S__immutable = sig ... end
Sourcemodule type S__value_or_null__immutable = sig ... end
Sourcemodule type S1__value__immutable = sig ... end
Sourcemodule type S1__immutable = sig ... end
Sourcemodule type S1__value_or_null__immutable = sig ... end
Sourcemodule type S1_zero_alloc__value__immutable = sig ... end
Sourcemodule type S1_zero_alloc__immutable = sig ... end
Sourcemodule type S_distinct__immutable = sig ... end
Sourcemodule type S_distinct_global__immutable = sig ... end
Sourcemodule type S_phantom_distinct__immutable = sig ... end
Sourcemodule type S_to_string__immutable = sig ... end
Sourcemodule type S_to_string_global__immutable = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__value__immutable = sig ... end
Sourcemodule type Sequence1__immutable = sig ... end
Sourcemodule type Sequence1_zero_alloc__immutable = sig ... end
Sourcetype ('src, 'dst) sub__immutable__unique = 'src @ local immutable -> pos:int -> len:int -> 'dst @ unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__immutable__unique = ?pos:int -> ?len:int -> 'src @ local immutable -> 'dst @ unique
Sourcetype ('src, 'dst) sub_global__immutable__unique = 'src @ immutable -> pos:int -> len:int -> 'dst @ unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__immutable__unique = ?pos:int -> ?len:int -> 'src @ immutable -> 'dst @ unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__immutable__unique = sig ... end
Sourcemodule type S__immutable__unique = sig ... end
Sourcemodule type S1__value__immutable__unique = sig ... end
Sourcemodule type S1__immutable__unique = sig ... end
Sourcemodule type S1_zero_alloc__immutable__unique = sig ... end
Sourcemodule type S_distinct__immutable__unique = sig ... end
Sourcemodule type S_to_string__immutable__unique = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__immutable__unique = sig ... end
Sourcetype ('src, 'dst) sub__immutable__stack = 'src @ local immutable -> pos:int -> len:int -> 'dst @ local

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__immutable__stack = ?pos:int -> ?len:int -> 'src @ local immutable -> 'dst @ local
Sourcetype ('src, 'dst) sub_global__immutable__stack = 'src @ immutable -> pos:int -> len:int -> 'dst @ local

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__immutable__stack = ?pos:int -> ?len:int -> 'src @ immutable -> 'dst @ local

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__value__immutable__stack = sig ... end
Sourcemodule type S__immutable__stack = sig ... end
Sourcemodule type S1__value__immutable__stack = sig ... end
Sourcemodule type S1__immutable__stack = sig ... end
Sourcemodule type S1_zero_alloc__immutable__stack = sig ... end
Sourcemodule type S_distinct__immutable__stack = sig ... end
Sourcemodule type S_to_string__immutable__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

Sourcemodule type Sequence1__immutable__stack = sig ... end
Sourcetype ('src, 'dst) sub__immutable__unique__stack = 'src @ local immutable -> pos:int -> len:int -> 'dst @ local unique

If sub : (src, dst) sub, then sub ~src ~pos ~len returns a sequence of type dst containing len characters of src starting at pos.

subo is like sub, except pos and len are optional.

Sourcetype ('src, 'dst) subo__immutable__unique__stack = ?pos:int -> ?len:int -> 'src @ local immutable -> 'dst @ local unique
Sourcetype ('src, 'dst) sub_global__immutable__unique__stack = 'src @ immutable -> pos:int -> len:int -> 'dst @ local unique

Like sub, but not allowing local_ values (on compilers supporting modes).

Sourcetype ('src, 'dst) subo_global__immutable__unique__stack = ?pos:int -> ?len:int -> 'src @ immutable -> 'dst @ local unique

Like subo, but not allowing local_ values (on compilers supporting modes).

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Blit for distinct src and dst types that each have two parameters: 'elt that must be the same in both types, and 'phantom that can be different.

Sourcemodule type S__immutable__unique__stack = sig ... end
Sourcemodule type S1__immutable__unique__stack = sig ... end

Users of modules matching the blit signatures S, S1, S_phantom_distinct, and S1_phantom2_distinct only need to understand the code above. The code below is only for those that need to implement modules that match those signatures.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

Sourcemodule Make (Sequence : sig ... end) : sig ... end

Make is for blitting between two values of the same monomorphic type.

Sourcemodule Make_distinct (Src : sig ... end) (Dst : sig ... end) : sig ... end

Make_distinct is for blitting between values of distinct monomorphic types.

Sourcemodule Make_to_string (T : sig ... end) (To_bytes : sig ... end) : sig ... end
Sourcemodule Make1 (Sequence : sig ... end) : sig ... end

Make1 is for blitting between two values of the same polymorphic type.

Sourcemodule Make1_zero_alloc (Sequence : sig ... end) : sig ... end
Sourcemodule Make1_phantom2_distinct (Src : sig ... end) (Dst : sig ... end) : sig ... end

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.

There are various Make* functors that turn an unsafe_blit function into a blit function. The functors differ in whether the sequence type is monomorphic or polymorphic, and whether the src and dst types are distinct or are the same.

The blit functions make sure the slices are valid and then call unsafe_blit. They guarantee at a call unsafe_blit ~src ~src_pos ~dst ~dst_pos ~len that:

  len > 0
  && src_pos >= 0
  && src_pos + len <= get_src_len src
  && dst_pos >= 0
  && dst_pos + len <= get_dst_len dst

The Make* functors also automatically create unit tests.