package ocamlformat-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Ocamlformat_lib.Conf_declSource

This module contains ways to declare command-line and config-files options for ocamlformat. To look at declared options, see Conf.mli. To declare a new option :

  • Add a field to one of the records in Conf_t
  • Declare the option in Conf, using functions from this module.
Sourcetype typ =
  1. | Int
  2. | Bool
  3. | Ocaml_version
  4. | Choice of Ocamlformat_stdlib.string Ocamlformat_stdlib.list
Sourcemodule UI : sig ... end
Sourcetype 'a t

The type of an option declaration

Sourcetype kind =
  1. | Formatting
  2. | Operational
Sourcetype deprecated
Sourcetype removed
Sourcetype status = [
  1. | `Valid
  2. | `Deprecated of deprecated
  3. | `Removed of removed
]
Sourcetype 'a declarator = names:Ocamlformat_stdlib.string Ocamlformat_stdlib.list -> default:Conf_t.t -> doc:Ocamlformat_stdlib.string -> kind:kind -> ?allow_inline:Ocamlformat_stdlib.bool -> ?status:[ `Valid | `Deprecated of deprecated ] -> (Conf_t.t -> 'a Conf_t.elt -> Conf_t.t) -> (Conf_t.t -> 'a Conf_t.elt) -> 'a t

The type of option declarators, that is functions returning a declaration

Sourcemodule Value : sig ... end

Values of multiple-choice options

Sourcemodule Value_removed : sig ... end
Sourcemodule Store : sig ... end
Sourceval ocaml_version : Ocaml_version.t declarator
Sourceval any : 'a Cmdliner.Arg.conv -> values:typ -> docv:Ocamlformat_stdlib.string -> 'a declarator

Declare an option as removed. Using such an option will result in an helpful error including msg and since.

Sourceval default : 'a t -> 'a
Sourceval update : Store.t -> config:Conf_t.t -> from:Conf_t.updated_from -> name:Ocamlformat_stdlib.string -> value:Ocamlformat_stdlib.string -> inline:Ocamlformat_stdlib.bool -> (Conf_t.t, Conf_t.Error.t) Ocamlformat_stdlib.Result.t
Sourceval to_ui : 'a t -> Conf_t.t UI.t
OCaml

Innovation. Community. Security.