package yocaml

  1. Overview
  2. Docs
Core engine of the YOCaml Static Site Generator

Install

dune-project
 Dependency

Authors

Maintainers

Sources

yocaml-2.7.0.tbz
sha256=89a74bd5cb37e580e45e4ed3d43b07b2cca5af9ab7f98966c48fe9730dc4af2e
sha512=ae77555570320c28c47d748e75056ccc44bb43cddf6fef70e8b556254fd809d67b915b313bd1833c28581db1fdeefbe34e81d5548744d6ecabe466ee1ef6284c

doc/yocaml/Yocaml/Batch/index.html

Module Yocaml.BatchSource

Allows you to run batches of actions (on lists, directories, etc.)

Sourceval iter : 'a list -> ('a -> Action.t) -> Action.t

iter list action cache Executes the given action on all element of the given list. The cache is passed from call to call. see: Action.batch_list

Sourceval fold : state:'a -> 'b list -> ('b -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) -> Cache.t -> (Cache.t * 'a) Eff.t

fold ~state list action cache Executes the given action on all element of the given list. The cache is passed from call to call and instead of iter, you can maintain your own additional state. see: Action.fold_list

Sourceval iter_children : ?only:[ `Both | `Directories | `Files ] -> ?where:(Path.t -> bool) -> Path.t -> (Path.t -> Action.t) -> Action.t

iter_children ?only ?where path action cache Executes the given action on all child files of the given path. The cache is passed from call to call. see: Action.batch

Sourceval fold_children : ?only:[ `Both | `Directories | `Files ] -> ?where:(Path.t -> bool) -> state:'a -> Path.t -> (Path.t -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) -> Cache.t -> (Cache.t * 'a) Eff.t

fold_children ?only ?where ~state path action cache Executes the given action on all child files of the given path. The cache is passed from call to call and instead of iter_children, you can maintain your own additional state. see: Action.fold

Sourceval iter_files : ?where:(Path.t -> bool) -> Path.t -> (Path.t -> Action.t) -> Action.t

iter_files is iter_children ~only:`Files.

Sourceval fold_files : ?where:(Path.t -> bool) -> state:'a -> Path.t -> (Path.t -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) -> Cache.t -> (Cache.t * 'a) Eff.t

fold_files is fold_children ~only:`Files.

Sourceval iter_directories : ?where:(Path.t -> bool) -> Path.t -> (Path.t -> Action.t) -> Action.t

iter_directories is iter_children ~only:`Directories.

Sourceval fold_directories : ?where:(Path.t -> bool) -> state:'a -> Path.t -> (Path.t -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) -> Cache.t -> (Cache.t * 'a) Eff.t

fold_directories is fold_children ~only:`Directories.