package yocaml

  1. Overview
  2. Docs

Signatures enabling modules to be created, via functors or first-class modules.

Dealing with Metadata

type provider_error =
  1. | Parsing_error of {
    1. given : string;
    2. message : string;
    }
  2. | Validation_error of {
    1. entity : string;
    2. error : Data.Validation.value_error;
    }
  3. | Required_metadata of {
    1. entity : string;
    }
module type DATA_PROVIDER = sig ... end

A Data Provider is used to deserialise metadata to data of type Yocaml.Data.t in order to apply validations.

module type DATA_READABLE = sig ... end

Describes a type capable of being readable as metadata of type Yocaml.Data.t. Used to lift a module into a validator for data described by a Yocaml.Required.DATA_PROVIDER.

module type DATA_INJECTABLE = sig ... end

Describes a type capable of being injected as metadata of type Yocaml.Data.t. Used to lift a module into an injecter of arbitrary types to a template (for example).

module type DATA_TEMPLATE = sig ... end

Describes a language capable of applying a template by assigning data to it (normalized using Yocaml.Required.DATA_INJECTABLE).

module type DATA_READER = sig ... end

Describes a provider for reading Metadata from a DATA_PROVIDER.

Runtime

A runtime is a context for executing a YOCaml program (for example, Unix). It allows all the primitives described by the effects to be implemented without having to worry about implementing an effects handler.

module type RUNTIME = sig ... end

Runner

A Runner is used to run a Yocaml program in the context of a Yocaml.Required.RUNTIME.

module type RUNNER = sig ... end
OCaml

Innovation. Community. Security.