package rope

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

Install

Dune Dependency

Authors

Maintainers

Sources

rope-0.6.1.tbz
sha256=62f676f5e5843403b17ee06b2d509995cf8b0d0121725206054bfef0251210ff
md5=b1a34f8a645ee153005565be87e9dbc7

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.