package tezos-base

  1. Overview
  2. Docs

This module implements bounded (or refined) versions of data types.

module type BOUNDS = sig ... end

Bounds.

module type S = sig ... end

Signature for an interval of (included values) with an encoding and projection functions towards the underlying ocaml datatype.

module Int64 (B : BOUNDS with type ocaml_type := int64) : S with type ocaml_type := int64

Allows to build interval of int64 integers. The encoding used is Data_encoding.int64 regardless of the actual bounds.

module Int32 (B : BOUNDS with type ocaml_type := int32) : S with type ocaml_type := int32

Allows to build interval of int32 integers. The encoding used is Data_encoding.int32 regardless of the actual bounds.

module Non_negative_int32 : S with type ocaml_type := int32

Allows to build interval of non negative int32 integers. The encoding used is Data_encoding.int32 regardless of the actual bounds.

module Int31 (B : BOUNDS with type ocaml_type := int) : S with type ocaml_type := int

Allows to build interval of built-in OCaml int integers. The encoding used is Data_encoding.int31 regardless of the actual bounds.

module Int16 (B : BOUNDS with type ocaml_type := int) : S with type ocaml_type := int

Allows to build interval of int integers representable on 2 bytes. The encoding used is Data_encoding.int16 regardless of the actual bounds.

module Uint16 (B : BOUNDS with type ocaml_type := int) : S with type ocaml_type := int

Allows to build interval of non-negative int integers representable on 2 bytes. The encoding used is Data_encoding.uint16 regardless of the actual bounds.

module Int8 (B : BOUNDS with type ocaml_type := int) : S with type ocaml_type := int

Allows to build interval of non-negative int integers representable on 1 bytes. The encoding used is Data_encoding.int8 regardless of the actual bounds.

module Uint8 (B : BOUNDS with type ocaml_type := int) : S with type ocaml_type := int

Allows to build interval of non-negative int integers representable on 1 bytes. The encoding used is Data_encoding.uint8 regardless of the actual bounds.

OCaml

Innovation. Community. Security.