package memgraph_kitty

  1. Overview
  2. Docs
Module type
Class type

Display values graphically in the Kitty terminal emulator.

This module provides functions to display the memory representation of OCaml values as images in the terminal, by using the terminal graphics protocol of the Kitty terminal emulator. The functions below thus assume that the program is running in Kitty (or any terminal emulator implementing the terminal graphics protocol). They can be called either from the toplevel loop or a compiled OCaml program.


show l displays the memory representation of a list of values of the same type, labeled by names.


let l = [1; 2; 3] in
let l' = 0 :: l in ["l", l; "l'", l'] is similar to show but can be used to display the representation of values of different OCaml types.

Example (note the redefinition of the list syntax in Poly to implement heterogeneous lists):

let l = [1; 2] in
let p = (l, 0 :: l) in
Memgraph_kitty.Poly.(show ["l", l; "p", p])
val show : (string * 'a) list -> unit

Display the memory representation of a list of labeled values

module Poly : sig ... end
val configure : ?scale:float -> ?external_node_color:string option -> ?block_node_color:string option -> ?root_node_color:string option -> ?outline_color:string -> ?background_color:string option -> ?direction:[ `Vertical | `Horizontal ] -> unit -> unit

Set display settings