package containers

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

containers-3.18.tbz
sha256=52eeff91ce42b52305e6aaa8a58b88ce8f0a5a984199e59ca7e2fd9ebabe61d7
sha512=dc7337e6cbc9850542c7c9228d3bcb4e4add57a55e2a2992f21fb4761b3e10a68ef1d57ca37a7f5b303fc875fe3df5ecb69dbf2930bfcd1561ce03f7ae83e24b

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