package fehu

  1. Overview
  2. Docs

Module Fehu.ValueSource

Universal value type.

Values represent heterogeneous data flowing through spaces and info dictionaries. Each variant wraps one kind of scalar, array, or composite datum.

Types

Sourcetype t =
  1. | Null
    (*

    No value.

    *)
  2. | Bool of bool
    (*

    A boolean.

    *)
  3. | Int of int
    (*

    An integer.

    *)
  4. | Float of float
    (*

    A float.

    *)
  5. | String of string
    (*

    A string.

    *)
  6. | Int_array of int array
    (*

    An integer array.

    *)
  7. | Float_array of float array
    (*

    A float array.

    *)
  8. | Bool_array of bool array
    (*

    A boolean array.

    *)
  9. | List of t list
    (*

    A heterogeneous list.

    *)
  10. | Dict of (string * t) list
    (*

    A string-keyed association list.

    *)

The type for universal values.

Predicates

Sourceval equal : t -> t -> bool

equal a b is true iff a and b are structurally equal.

Formatting

Sourceval pp : Format.formatter -> t -> unit

pp formats a value for debugging.

Sourceval to_string : t -> string

to_string v is v formatted as a string via pp.