Provider_context.add_entry_from_file_contents -> add_entry_from_contents
[hiphop-php.git] / hphp / hack / src / client / clientTypeAtPos.ml
blob02cf4b199d27a412147a52dc8111107e965b83aa
1 (*
2 * Copyright (c) 2015, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 let go result output_json =
11 if output_json then
12 let response =
13 match result with
14 | None -> (None, None)
15 | Some (str, json) -> (Some str, Some json)
17 Nuclide_rpc_message_printer.(
18 infer_type_response_to_json response |> print_json)
19 else
20 match result with
21 | Some (str, _) -> print_endline str
22 | None -> print_endline "(unknown)"