File: pytop.ml

package info (click to toggle)
pyml 20200518-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 608 kB
  • sloc: ml: 6,229; ansic: 1,610; makefile: 1,224; sh: 13
file content (9 lines) | stat: -rw-r--r-- 334 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
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 () =
  assert
    (eval_exn (Printf.sprintf "#directory \"%s\";;" Pymltop_libdir.libdir));
  assert (eval_exn "#install_printer Py.Object.format_repr;;")