package reason

  1. Overview
  2. Docs
Reason: Syntax & Toolchain for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

reason-3.9.0.tbz
sha256=bcf0081ecf3d05ce68e82876a1bc2a48497c78225b8b310f2cf24b33f3568416
sha512=388a0d8970b83423bb79978e4df3a558c27e043fc216a8d288ca7aab9babd8a3db45219ba53c9db09d791c07017f26ceba3a7d714c8ce9bf369d2e8b796d6d81

doc/reason.cmdliner/Vendored_cmdliner/Manpage/index.html

Module Vendored_cmdliner.ManpageSource

Man page specification.

Man page generation is automatically handled by Cmdliner. The block type is used to define a man page's content.

The print function can be useful if the client wants to define other man pages (e.g. to implement a help command).

Man pages

Sourcetype block = [
  1. | `S of string
  2. | `P of string
  3. | `Pre of string
  4. | `I of string * string
  5. | `Noblank
]

The type for a block of man page text.

  • `S s introduces a new section s.
  • `P t is a new paragraph with text t.
  • `Pre t is a new preformatted paragraph with text t.
  • `I (l,t) is an indented paragraph with label l and text t.
  • `Noblank suppresses the blank line introduced between two blocks.

Except in `Pre, whitespace and newlines are not significant and are all collapsed to a single space. In labels l and text strings t, the syntax "$(i,italic text)" and "$(b,bold text)" can be used to respectively produce italic and bold text.

Sourcetype title = string * int * string * string * string

The type for man page titles. Describes the man page title, section, center_footer, left_footer, center_header.

Sourcetype t = title * block list

The type for a man page. A title and the page text as a list of blocks.

Sourceval print : ?subst:(string -> string) -> [ `Pager | `Plain | `Groff ] -> Format.formatter -> t -> unit

print ~subst fmt ppf page prints page on ppf in the format fmt. If fmt is `Pager the function tries to write the formatted result in a pager, if that fails the format `Plain is written on ppf. subst can be used to perform variable substitution, see Buffer.add_substitute (defaults to the identity).

OCaml

Innovation. Community. Security.

On This Page
  1. Man pages