@@ -104,9 +104,8 @@ module Json = struct
104104 let untagged_union (type a ) name (xs : (t -> a) list ) (json : t ) : a =
105105 match
106106 List. find_map xs ~f: (fun conv ->
107- try Some (conv json)
108- with Ppx_yojson_conv_lib.Yojson_conv. Of_yojson_error (_ , _ ) ->
109- None )
107+ try Some (conv json) with
108+ | Ppx_yojson_conv_lib.Yojson_conv. Of_yojson_error (_ , _ ) -> None )
110109 with
111110 | None -> error name json
112111 | Some x -> x
@@ -128,7 +127,7 @@ module Json = struct
128127 match ks with
129128 | [] -> error (sprintf " %s: key %s not found" name k) json
130129 | [ _ ] -> f (`Assoc xs)
131- | _ :: _ -> error (sprintf " %s: multiple keys %s" name k) json )
130+ | _ :: _ -> error (sprintf " %s: multiple keys %s" name k) json)
132131 | _ -> error (sprintf " %s: not a record (key: %s)" name k) json
133132 end
134133
@@ -223,13 +222,12 @@ module Log = struct
223222 let log ?section k =
224223 if ! level section then (
225224 let message = k () in
226- ( match section with
225+ (match section with
227226 | None -> Format. fprintf ! out " %s@." message.message
228- | Some section -> Format. fprintf ! out " [%s] %s@." section message.message
229- );
230- ( match message.payload with
227+ | Some section -> Format. fprintf ! out " [%s] %s@." section message.message);
228+ (match message.payload with
231229 | [] -> ()
232- | fields -> Format. fprintf ! out " %a@." Json. pp (`Assoc fields) );
230+ | fields -> Format. fprintf ! out " %a@." Json. pp (`Assoc fields));
233231 Format. pp_print_flush ! out ()
234232 )
235233end
0 commit comments