package containers

  1. Overview
  2. Docs
A modular, clean and powerful extension of the OCaml standard library

Install

Dune Dependency

Authors

Maintainers

Sources

v2.8.tar.gz
md5=03b80e963186e91ddac62ef645bf7fb2
sha512=c8f434808be540c16926bf03d89f394d33fc2d092f963a7b6d412481229e0a96290f1ad7c7d522415115d35426b7aa0b3fda4b991ddc321dad279d402c9a0c0b

doc/src/containers.top/containers_top.ml.html

Source file containers_top.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
(* This file is free software, part of containers. See file "license" for more details. *)

type 'a printer = Format.formatter -> 'a -> unit

let eval_exn str =
  let lexbuf = Lexing.from_string str in
  let phrase = !Toploop.parse_toplevel_phrase lexbuf in
  Toploop.execute_phrase false Format.err_formatter phrase

let install_printer s =
  try
    ignore (eval_exn ("#install_printer " ^ s ^ " ;; "))
  with _ ->
    Printexc.print_backtrace stderr;
    ()
let install_printers = List.iter install_printer

let () =
  install_printers
    [ "CCHashtbl.pp"
    ; "CCBV.pp"
    ; "CCDeque.pp"
    ; "CCFQueue.pp"
    ; "CCIntMap.pp"
    ; "CCPersistentArray.pp"
    ; "CCSexp.pp"
    ]
OCaml

Innovation. Community. Security.