mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-09-07 04:04:45 +02:00
38 lines
1.1 KiB
OCaml
38 lines
1.1 KiB
OCaml
(* [[file:~/QCaml/top/install_printers.org::*Intall printers][Intall printers:3]] *)
|
|
let printers =
|
|
[
|
|
"Common.Powers.pp" ;
|
|
"Common.Range.pp" ;
|
|
"Common.Spin.pp" ;
|
|
"Common.Zkey.pp" ;
|
|
"Gaussian.Atomic_shell.pp" ;
|
|
"Gaussian.Atomic_shell_pair.pp" ;
|
|
"Gaussian.Atomic_shell_pair_couple.pp" ;
|
|
"Mo.Frozen_core.pp" ;
|
|
"Mo.Localization.pp" ;
|
|
"Particles.Electrons.pp" ;
|
|
"Particles.Element.pp" ;
|
|
"Particles.Nuclei.pp" ;
|
|
"Particles.Zmatrix.pp" ;
|
|
"Perturbation.Mp2.pp" ;
|
|
"Simulation.pp" ;
|
|
|
|
]
|
|
|
|
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
|
|
| [] -> eval_exn "#require \"lacaml.top\";;"
|
|
| 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@."
|
|
(* Intall printers:3 ends here *)
|