package yocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=89a74bd5cb37e580e45e4ed3d43b07b2cca5af9ab7f98966c48fe9730dc4af2e
sha512=ae77555570320c28c47d748e75056ccc44bb43cddf6fef70e8b556254fd809d67b915b313bd1833c28581db1fdeefbe34e81d5548744d6ecabe466ee1ef6284c
doc/yocaml/Yocaml/index.html
Module YocamlSource
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 ... endSignatures 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.
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.
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).
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.
A dependency set describes all the files required to build an artifact.
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.
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).
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:
- A
Task.tis the fundamental building block for buildingPipeline Pipelinedescribes concrete, composable sets of stepsActionconsumesPipelineto build artifacts.BatchperformActionon list.
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.
A pipeline is a succession of Task that enable concrete elements to be built. Building a construction system generally consists of composing pipelines together.
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.
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.
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.
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.
Tools for building error diagnostics. These are essentially pretty-printers for exceptions propagated by the Yocaml.Eff module.