2020-12-29 00:39:12 +01:00
|
|
|
let printers =
|
|
|
|
[
|
2024-06-20 15:38:37 +02:00
|
|
|
|
2020-12-29 00:39:12 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
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 rec install_printers = function
|
2020-12-29 02:29:43 +01:00
|
|
|
| [] -> eval_exn "#require \"lacaml.top\";;"
|
2020-12-29 00:39:12 +01:00
|
|
|
| printer :: printers ->
|
|
|
|
let cmd = Printf.sprintf "#install_printer %s;;" printer in
|
|
|
|
eval_exn cmd && install_printers printers
|
|
|
|
|
|
|
|
let () =
|
|
|
|
if not (install_printers printers) then
|
|
|
|
Format.eprintf "Problem installing QCaml-printers@."
|
2024-06-20 15:38:37 +02:00
|
|
|
|