2 * Copyright (c) Facebook, Inc. and its affiliates.
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the "hack" directory of this source tree.
10 (* Convert result type to tuple since it's not available to
11 Nuclide_rpc_message_printer *)
12 let tast_holes_result_to_tuple
21 (actual_ty_string
, actual_ty_json
, expected_ty_string
, expected_ty_json
, pos
)
23 let print_json result
=
24 Nuclide_rpc_message_printer.(
26 @@ tast_holes_response_to_json
27 @@ List.map ~f
:tast_holes_result_to_tuple result
)
29 let print_string result
=
31 TastHolesService.{ pos
; actual_ty_string
; expected_ty_string
; _
} =
34 {|%s actual
type: %s
, expected
type: %s
|}
35 Pos.(string_no_file pos
)
40 | [] -> print_endline
"No TAST Holes"
41 | _
-> List.iter ~f
:print_elem result
43 let go result output_json
=