(**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the "hack" directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 *)


(*****************************************************************************)
(* The main entry point *)
(*****************************************************************************)

type options = {
  ai_mode          : Ai_options.prepared option;
  check_mode       : bool;
  json_mode        : bool;
  root             : Path.t;
  should_detach    : bool;
  convert          : Path.t option;
  no_load          : bool;
  save_filename    : string option;
  waiting_client   : Handle.handle option;
}

val parse_options: unit -> options
val default_options: root:string -> options

(*****************************************************************************)
(* Accessors *)
(*****************************************************************************)

val ai_mode             : options -> Ai_options.prepared option
val check_mode          : options -> bool
val json_mode           : options -> bool
val root                : options -> Path.t
val should_detach       : options -> bool
val convert             : options -> Path.t option
val no_load             : options -> bool
val save_filename       : options -> string option
val waiting_client      : options -> Handle.handle option

(**
 * Copyright (c) 2015, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the "hack" directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 *
 *)


(*****************************************************************************)
(* The main entry point *)
(*****************************************************************************)

type options

val parse_options: unit -> options
val default_options: root:string -> options

(*****************************************************************************)
(* Accessors *)
(*****************************************************************************)

val ai_mode             : options -> Ai_options.prepared option
val check_mode          : options -> bool
val json_mode           : options -> bool
val root                : options -> Path.t
val should_detach       : options -> bool
val convert             : options -> Path.t option
val no_load             : options -> bool
val save_filename       : options -> string option
val waiting_client      : options -> Handle.handle option

Make ServerArgs.options an abstract type
[hack] Make ServerArgs.options an abstract type

Summary:Because we can (we probably didn't in the past due to code sharing between Hack
and Flow)

Reviewed By: andrewjkennedy

Differential Revision: D3056197

fb-gh-sync-id: c937959b0e5c27598afc20fec59aed1d7321eb0b
shipit-source-id: c937959b0e5c27598afc20fec59aed1d7321eb0b
