1 (* ========================================================================= *)
2 (* Some miscellaneous OCaml system hacking before we get started. *)
4 (* (c) Copyright, John Harrison 1998-2007 *)
5 (* ========================================================================= *)
7 Gc.set { (Gc.get()) with Gc.stack_limit = 16777216 };;
9 (* ------------------------------------------------------------------------- *)
10 (* Make sure user interrupts generate an exception, not kill the process. *)
11 (* ------------------------------------------------------------------------- *)
13 Sys.catch_break true;;
15 (* ------------------------------------------------------------------------- *)
16 (* Set up a quotation expander for the `...` quotes. *)
17 (* This includes the case `;...` to support miz3, even if that isn't loaded. *)
18 (* ------------------------------------------------------------------------- *)
21 if s = "" then failwith "Empty quotation" else
22 let c = String.sub s 0 1 in
25 (String.escaped (String.sub s 1 (String.length s - 1)))^"\""
26 else if c = ";" then "parse_qproof \""^(String.escaped s)^"\""
27 else "parse_term \""^(String.escaped s)^"\"";;
29 Quotation.add "tot" (Quotation.ExStr (fun x -> quotexpander));;
31 (* ------------------------------------------------------------------------- *)
32 (* Modify the lexical analysis of uppercase identifiers. *)
33 (* ------------------------------------------------------------------------- *)
37 (* ------------------------------------------------------------------------- *)
38 (* Load in the bignum library and set up printing in the toplevel. *)
39 (* ------------------------------------------------------------------------- *)
47 Format.print_string(string_of_num n);
50 #install_printer print_num;;