concat_traces: always print labels

Reviewed By: jvillard

Differential Revision: D13118979

fbshipit-source-id: 0875b7777
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent acf740e145
commit 4a4e8c6e1b

@ -46,20 +46,14 @@ let make_trace_element lt_level lt_loc lt_description lt_node_tags =
type loc_trace = loc_trace_elem list type loc_trace = loc_trace_elem list
let concat_traces labelled_traces = let concat_traces labelled_traces =
match labelled_traces with List.fold_right labelled_traces ~init:[] ~f:(fun labelled_trace res ->
| [] -> match labelled_trace with
[] | _, [] ->
| [(_, t)] -> res
t | "", trace ->
| _ -> trace @ res
List.fold_right labelled_traces ~init:[] ~f:(fun labelled_trace res -> | label, ({lt_loc} :: _ as trace) ->
match labelled_trace with (make_trace_element 0 lt_loc label [] :: trace) @ res )
| _, [] ->
res
| "", trace ->
trace @ res
| label, ({lt_loc} :: _ as trace) ->
(make_trace_element 0 lt_loc label [] :: trace) @ res )
let compute_local_exception_line loc_trace = let compute_local_exception_line loc_trace =

Loading…
Cancel
Save