package yocaml

  1. Overview
  2. Docs

Yocaml is the entry point for a YOCaml program. It describes the core/engine of the framework.

Requirements

All the interfaces needed to build behaviour.

module Required : sig ... end

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

Elements

Modules describing the elements constituting YOCaml, for example file paths, dependencies set, cache etc.

module Nel : sig ... end

A Nel, for Non Empty List, is a list that ensures it has at least one element, which is very useful for describing, for example, error lists, where if there is an error, we ensure that there is at least one error.

module Path : sig ... end

A path describes a path in the file system. It is only a description, which does not produce any ad-hoc verification. It is therefore unfortunately possible to describe inconsistent paths (however, the expression of inconsistent paths is captured by the YOCaml core executable).

module Cache : sig ... end

The cache is an artifact of the previous build that tracks information about build targets, including dynamic dependencies, and maintains a hashed version of the targets.

module Deps : sig ... end

A dependency set describes all the files required to build an artifact.

module Metadata : sig ... end
module Archetype : sig ... end

Archetypes are pre-designed, validatable and injectable models for rapid blog bootstrapping. However, as Yocaml is very generic... it's worth using it as an example rather than a concrete model.

module Cmd : sig ... end

Used to describe Unix-style commands for executing arbitrary shell commands. It is up to the Runtime to use this representation to be cross-platform (for example, to use it with Windows).

module Slug : sig ... end

An incredibly simple (and opinionated) implementation of Slug.

module Toc = Markup.Toc
module Datetime = Archetype.Datetime

Building tasks

Modules for describing construction rules. Tasks to be executed, pipelines, action etc.

The logic of modular distribution may seem strange (and a little excessive), but it respects this lattice:

module Task : sig ... end

Task is the main abstraction used to describe an action (a task that produces an effect) associated with dependencies and a DSL for composing tasks together.

module Pipeline : sig ... end

A pipeline is a succession of Task that enable concrete elements to be built. Building a construction system generally consists of composing pipelines together.

module Action : sig ... end

Actions consume Pipeline to produce artifacts. This is the entry point for a construction rule. In general, a chain of actions maitizes a cache and is used in this way:

Effects abstraction

Modules relating to the abstraction and performance of effects.

module Eff : sig ... end

An overlay on expression and effect performance.

module Runtime : sig ... end

A Runtime is an execution context (ie, Unix or Git). They describe the entry point of a YOCaml program and abstract the file system.

Functors

Modules designed to automate the construction of certain recurring tasks. For example, the automation of Pipelining functions and the production of Effects on data reading or Runtimes.

module Make : sig ... end

A set of functors designed to automate the construction of boring and repetitive modules.

Serialization

As the new version of YOCaml uses a cache based on the previous generation, it is important to be able to serialise (and deserialise) arbitrary data structures.

module Sexp : sig ... end
module Data : sig ... end

Describes an mostly compatible Ezjsonm AST that acts as a generic AST for describing metadata that can be exchanged between source documents and templates. To summarise, source metadata is ultimately projected into a value of type Yocaml.Data.t and data injected into templates is projected from values of type Yocaml.Data.t.

Tools

Tools to help build plugins or runtimes.

module Diagnostic : sig ... end

Tools for building error diagnostics. These are essentially pretty-printers for exceptions propagated by the Yocaml.Eff module.

module Reader : sig ... end

A very simple implementation of a Reader Monad.

module Markup : sig ... end

Generic utilities for dealing with arbitrary markup formats. In general, the modules here are specified for, for example, composing with Markdown.

OCaml

Innovation. Community. Security.