Module Gist.Array_like

Array likes for gist processors.

A couple of standard array types are distinguished to allow gist processors to process them specially. If you are uninterested in the specialization use Array_like.to_module to treat them uniformly.

Array modules

module type S = S

Array interface.

type ('elt, 'array) module' = (module S with type elt = 'elt and type t = 'array)

The type for array modules.

Array likes

type bytes_encoding =
  1. | Binary
    (*

    Arbitrary byte sequence

    *)
  2. | Utf_8
    (*

    Valid UTF-8 byte sequence

    *)

The type for specifying the two standard interpretations of OCaml string and bytes values.

type ('elt, 'array) t =
  1. | Bytes : bytes_encoding -> (char, bytes) t
  2. | String : bytes_encoding -> (char, string) t
  3. | Array : 'elt gist -> ('elt, 'elt array) t
  4. | Iarray : 'elt gist -> ('elt, 'elt iarray) t
  5. | Bigarray1 : 'elt gist * ('elt, 'b) Stdlib.Bigarray.kind * 'c Stdlib.Bigarray.layout -> ('elt, ('elt, 'b, 'c) Stdlib.Bigarray.Array1.t) t
  6. | Module : 'elt gist * ('elt, 'array) module' -> ('elt, 'array) t

The type for representing array like types of type 'array with elements of type 'elt.

val elt : ('elt, 'array) t -> 'elt gist

elt a is the representation of the elements of a.

val to_module : ('elt, 'array) t -> ('elt, 'array) module'

to_module a is an array module for a.