package dune

  1. Overview
  2. Docs

Pretty printers

type +'tag t

A document that is not yet rendered. The argument is the type of tags in the document. For instance tags might be used for styles.

module type Tag = sig ... end
module Renderer : sig ... end
module Render : Renderer.S with type Tag.t = unit with type Tag.Handler.t = unit

A simple renderer that doesn't take tags

val pp : Format.formatter -> unit t -> unit
val nop : 'a t
val seq : 'a t -> 'a t -> 'a t
val concat : 'a t list -> 'a t
val box : ?indent:int -> 'a t list -> 'a t
val vbox : ?indent:int -> 'a t list -> 'a t
val hbox : 'a t list -> 'a t
val hvbox : ?indent:int -> 'a t list -> 'a t
val hovbox : ?indent:int -> 'a t list -> 'a t
val int : int -> _ t
val string : string -> _ t
val char : char -> _ t
val list : ?sep:'b t -> 'a list -> f:('a -> 'b t) -> 'b t
val space : _ t
val cut : _ t
val newline : _ t
val text : string -> _ t
val tag : 'a t -> tag:'a -> 'a t
OCaml

Innovation. Community. Security.