File tree Expand file tree Collapse file tree 1 file changed +0
-39
lines changed
Expand file tree Collapse file tree 1 file changed +0
-39
lines changed Original file line number Diff line number Diff line change 1- open Core_kernel
2-
3- module Time_span_with_json = struct
4- type t = Time.Span .t
5-
6- let to_yojson total = `String (Time.Span. to_string_hum total)
7-
8- let of_yojson = function
9- | `String time ->
10- Ok (Time.Span. of_string time)
11- | _ ->
12- Error " Snark_worker.Functor: Could not parse timespan"
13- end
14-
15- (* FIX: register_event fails when adding base types to the constructors*)
16- module String_with_json = struct
17- type t = string
18-
19- let to_yojson s = `String s
20-
21- let of_yojson = function
22- | `String s ->
23- Ok s
24- | _ ->
25- Error " Snark_worker.Functor: Could not parse string"
26- end
27-
28- module Int_with_json = struct
29- type t = int
30-
31- let to_yojson s = `Int s
32-
33- let of_yojson = function
34- | `Int s ->
35- Ok s
36- | _ ->
37- Error " Snark_worker.Functor: Could not parse int"
38- end
39-
401type Structured_log_events.t + =
412 | Generating_snark_work_failed of { error : Yojson.Safe .t }
423 [@@ deriving register_event { msg = " Failed to generate SNARK work: $error" }]
You can’t perform that action at this time.
0 commit comments