package yocaml

  1. Overview
  2. Docs

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

Types

type t

The representation of a set of dependencies, containing Path.t. Under the bonnet, dependencies are defined by a Set.

Monoid

A dependency set is a monoid with the union of two sets as the internal composition operator and the empty set as the neutral element.

val concat : t -> t -> t

concat a b constructs the union of two sets of dependencies. concat a b = concat b a.

val empty : t

empty returns the neutral element of the monoid. It the empty set and concat neutral a = concat a neutral = a.

val reduce : t list -> t

reduce sets merge many sets in one.

Building

val singleton : Path.t -> t

singleton is a set with only one dependency.

val from_list : Path.t list -> t

from_list list build a set from a given list of path.

Compute deps

Retrieves information about sets of dependencies.

val get_mtimes : t -> int list Eff.t

get_mtimes deps Returns a list of modification dates for a set of dependencies.

Serialization/Deserialization

Supports serialization and deserialization of dependency sets.

val to_sexp : t -> Sexp.t

to_sexp deps Converts a set of dependencies, deps, into a Sexp.

val from_sexp : Sexp.t -> (t, Sexp.invalid) Stdlib.result

from_sexp sexp try to converts a Sexp into a set of dependencies.

Utils

val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer for t.

val equal : t -> t -> bool

Equality between t.

val is_empty : t -> bool

is_empty deps returns true if the dependencies set is empty, false if not.

OCaml

Innovation. Community. Security.