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 nop : 'a t
val seq : 'a t -> 'a t -> 'a t
val concat : 'a t list -> 'a t
val vbox : ?indent:int -> 'a t -> 'a t
val hbox : 'a t -> 'a t
val int : int -> _ t
val string : string -> _ t
val char : char -> _ t
val list : ('a -> 'b t) -> 'a list -> '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.