summaryrefslogtreecommitdiff
path: root/toplevel/topmain.ml
blob: 80311169fd1ccaf4f679c27e3d34689b5de0eb5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(***********************************************************************)
(*                                                                     *)
(*                         Caml Special Light                          *)
(*                                                                     *)
(*            Xavier Leroy, projet Cristal, INRIA Rocquencourt         *)
(*                                                                     *)
(*  Copyright 1995 Institut National de Recherche en Informatique et   *)
(*  Automatique.  Distributed only by permission.                      *)
(*                                                                     *)
(***********************************************************************)

(* $Id$ *)

open Clflags

let main () =
  Arg.parse
    ["-I", Arg.String(fun dir -> include_dirs := dir :: !include_dirs);
     "-unsafe", Arg.Unit(fun () -> fast := true);
     "-dlambda", Arg.Unit(fun () -> dump_lambda := true);
     "-dinstr", Arg.Unit(fun () -> dump_instr := true)]
    (fun name -> raise(Arg.Bad("don't know what to do with " ^ name)));
  Toploop.loop()

let _ = Printexc.catch main ()