Module Doc.Value

Documentation of a builtin or an operator.

type flag = [
  1. | `Deprecated
  2. | `Experimental
  3. | `Extra
  4. | `Hidden
]
type source = [
  1. | `Audio
  2. | `Conversion
  3. | `FFmpegFilter
  4. | `Fade
  5. | `Input of [ `Active | `Passive ]
  6. | `Liquidsoap
  7. | `MIDI
  8. | `Output
  9. | `Synthesis
  10. | `Testing
  11. | `Track
  12. | `Video
  13. | `Visualization
]

What a source-returning operator does, used to group the reference.

type category = [
  1. | `Bool
  2. | `Configuration
  3. | `File
  4. | `Getter
  5. | `Interaction
  6. | `Internet
  7. | `Liquidsoap
  8. | `List
  9. | `Math
  10. | `Metadata
  11. | `None
  12. | `Programming
  13. | `Settings
  14. | `Source of source
  15. | `String
  16. | `System
  17. | `Time
  18. | `Track of source
]
type argument = {
  1. arg_type : string;
  2. arg_default : string option;
  3. arg_description : string option;
}
type meth = {
  1. meth_type : string;
  2. meth_description : string option;
}
type t = {
  1. typ : string;
  2. category : category;
  3. flags : flag list;
  4. description : string;
  5. examples : string list;
    (*

    Unlabelled arguments are keyed by None.

    *)
  6. arguments : (string option * argument) list;
  7. methods : (string * meth) list;
  8. callbacks : (string * meth) list;
  9. sync_description : string option;
  10. composition_description : string option;
  11. composition : (string * meth) list;
}
val add : string -> t Stdlib.Lazy.t -> unit

Register documentation under a name. Lazy: building it forces the operator's type to be printed, which is wasted work for the common case where nobody asks for documentation.

val count : unit -> int
val print : string -> (string -> unit) -> unit

Print the documentation of one item, as liquidsoap -h does.

val print_functions : (string -> unit) -> unit
val print_functions_by_category : (string -> unit) -> unit
val print_functions_md : ?extra:bool -> ?deprecated:bool -> (string -> unit) -> unit
val print_emacs_completions : (string -> unit) -> unit
val to_json : unit -> Json.t