package rope

  1. Overview
  2. Docs
Ropes ("heavyweight strings")

Install

Dune Dependency

Authors

Maintainers

Sources

rope-0.6.tbz
sha256=ec06f5493de29aaa368c742d15c0daa97952c2e6efa56225289389a6a65df31a
md5=a238dea21241eb3103acff6f164256a2

doc/src/rope.top/rope_top.ml.html

Source file rope_top.ml

1
2
3
4
5
6
7
8
9
10
11
12
13

let eval_string ?(print_outcome = false)
      ?(err_formatter = Format.err_formatter) str =
  let lexbuf = Lexing.from_string str in
  let phrase = !Toploop.parse_toplevel_phrase lexbuf in
  Toploop.execute_phrase print_outcome err_formatter phrase

let install_printer p =
  eval_string (Printf.sprintf "#install_printer %s;;" p)

let () =
  if not (install_printer "Rope.Rope_toploop.printer") then
    Format.eprintf "Problem installing Rope-printer@."
OCaml

Innovation. Community. Security.