package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

containers-3.15.tbz
sha256=92143ceb4785ae5f8a07f3ab4ab9f6f32d31ead0536e9be4fdb818dd3c677e58
sha512=5fa80189d0e177af2302b48e72b70299d51fc36ac2019e1cbf389ff6a7f4705b10089405b5a719b3e4845b0d1349a47a967f865dc2e4e3f0d5a0167ef6c31431

doc/containers.pp/Containers_pp/Ext/index.html

Module Containers_pp.ExtSource

Extension node.

Custom nodes can be used to add user-defined behavior to the rendered output. For example, documents might be annotated with ANSI-terminal colors, or with HTML tags.

Sourcetype 'a t
Sourceval make : ?width:('a -> int) -> name:string -> pre:(Out.t -> inside:'a option -> 'a -> unit) -> post:(Out.t -> inside:'a option -> 'a -> unit) -> unit -> 'a t

An extension is a custom document node. It takes a value of type 'a, and a document d, and can output what it wants based on the custom value before and after d is printed.

The extension is considered to have width 0, unless width is specified.

  • parameter pre

    called before the wrapped value is printed

  • parameter post

    called after the wrapped value is printed

OCaml

Innovation. Community. Security.