text
stringlengths
0
601k
let string_of__30 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__30 ob x ; Bi_outbuf . contents ob
let read__30 = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_x294623 = ref ( None ) in try Yojson . Safe . read_space p lb ; Yojson . Safe . read_object_end lb ; Yojson . Safe . read_space p lb ; let f = fun s pos len -> if pos < 0 || len < 0 || pos + len > String . length ...
let _30_of_string s = read__30 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_specialized = ( write__30 )
let string_of_specialized ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_specialized ob x ; Bi_outbuf . contents ob
let read_specialized = ( read__30 )
let specialized_of_string s = read_specialized ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_some_record : _ -> some_record -> _ = ( fun ob ( x : some_record ) -> Bi_outbuf . add_char ob ' { ' ; let is_first = ref true in if ! is_first then is_first := false else Bi_outbuf . add_char ob ' , ' ; Bi_outbuf . add_string ob " " \ some_field " " ; \: ( Yojson . Safe . write_int ) ob x . some_field ; Bi_ou...
let string_of_some_record ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_some_record ob x ; Bi_outbuf . contents ob
let read_some_record = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_some_field = ref ( None ) in try Yojson . Safe . read_space p lb ; Yojson . Safe . read_object_end lb ; Yojson . Safe . read_space p lb ; let f = fun s pos len -> if pos < 0 || len < 0 || pos + len > Strin...
let some_record_of_string s = read_some_record ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_precision : _ -> precision -> _ = ( fun ob ( x : precision ) -> Bi_outbuf . add_char ob ' { ' ; let is_first = ref true in if ! is_first then is_first := false else Bi_outbuf . add_char ob ' , ' ; Bi_outbuf . add_string ob " " \ sqrt2_5 " " ; \: ( Yojson . Safe . write_float_prec 5 ) ob x . sqrt2_5 ; if ! is_...
let string_of_precision ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_precision ob x ; Bi_outbuf . contents ob
let read_precision = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_sqrt2_5 = ref ( None ) in let field_small_2 = ref ( None ) in let field_large_2 = ref ( None ) in try Yojson . Safe . read_space p lb ; Yojson . Safe . read_object_end lb ; Yojson . Safe . read_space p lb ; ...
let precision_of_string s = read_precision ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_p ' ' = ( write__1 )
let string_of_p ' ' ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_p ' ' ob x ; Bi_outbuf . contents ob
let read_p ' ' = ( read__1 )
let p ' ' _of_string s = read_p ' ' ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__18 = ( Atdgen_runtime . Oj_run . write_option ( Yojson . Safe . write_int ) )
let string_of__18 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__18 ob x ; Bi_outbuf . contents ob
let read__18 = ( fun p lb -> Yojson . Safe . read_space p lb ; match Yojson . Safe . start_any_variant p lb with | ` Edgy_bracket -> ( match Yojson . Safe . read_ident p lb with | " None " -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_gt p lb ; ( None : _ option ) | " Some " -> Atdgen_runtime . Oj_run . rea...
let _18_of_string s = read__18 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_option_validation = ( write__18 )
let string_of_option_validation ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_option_validation ob x ; Bi_outbuf . contents ob
let read_option_validation = ( read__18 )
let option_validation_of_string s = read_option_validation ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__28 = ( write_some_record )
let string_of__28 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__28 ob x ; Bi_outbuf . contents ob
let read__28 = ( read_some_record )
let _28_of_string s = read__28 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_no_real_wrap = ( write__28 )
let string_of_no_real_wrap ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_no_real_wrap ob x ; Bi_outbuf . contents ob
let read_no_real_wrap = ( read__28 )
let no_real_wrap_of_string s = read_no_real_wrap ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__26 = ( fun ob x -> ( let x = ( Test_lib . Natural . unwrap ) x in ( Yojson . Safe . write_int ) ob x ) )
let string_of__26 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__26 ob x ; Bi_outbuf . contents ob
let read__26 = ( fun p lb -> let x = ( Atdgen_runtime . Oj_run . read_int ) p lb in ( Test_lib . Natural . wrap ) x )
let _26_of_string s = read__26 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_natural = ( write__26 )
let string_of_natural ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_natural ob x ; Bi_outbuf . contents ob
let read_natural = ( read__26 )
let natural_of_string s = read_natural ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__24 = ( fun ob x -> ( let x = ( function ` Id s -> s ) x in ( Yojson . Safe . write_string ) ob x ) )
let string_of__24 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__24 ob x ; Bi_outbuf . contents ob
let read__24 = ( fun p lb -> let x = ( Atdgen_runtime . Oj_run . read_string ) p lb in ( fun s -> ` Id s ) x )
let _24_of_string s = read__24 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_id = ( write__24 )
let string_of_id ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_id ob x ; Bi_outbuf . contents ob
let read_id = ( read__24 )
let id_of_string s = read_id ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__25 = ( Atdgen_runtime . Oj_run . write_assoc_list ( write_id ) ( Yojson . Safe . write_int ) )
let string_of__25 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__25 ob x ; Bi_outbuf . contents ob
let read__25 = ( Atdgen_runtime . Oj_run . read_assoc_list ( read_id ) ( Atdgen_runtime . Oj_run . read_int ) )
let _25_of_string s = read__25 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_json_map = ( write__25 )
let string_of_json_map ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_json_map ob x ; Bi_outbuf . contents ob
let read_json_map = ( read__25 )
let json_map_of_string s = read_json_map ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_intopt = ( write__4 )
let string_of_intopt ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_intopt ob x ; Bi_outbuf . contents ob
let read_intopt = ( read__4 )
let intopt_of_string s = read_intopt ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__21 = ( Atdgen_runtime . Oj_run . write_assoc_list ( Yojson . Safe . write_string ) ( Yojson . Safe . write_int ) )
let string_of__21 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__21 ob x ; Bi_outbuf . contents ob
let read__21 = ( Atdgen_runtime . Oj_run . read_assoc_list ( Atdgen_runtime . Oj_run . read_string ) ( Atdgen_runtime . Oj_run . read_int ) )
let _21_of_string s = read__21 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_int_assoc_list = ( write__21 )
let string_of_int_assoc_list ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_int_assoc_list ob x ; Bi_outbuf . contents ob
let read_int_assoc_list = ( read__21 )
let int_assoc_list_of_string s = read_int_assoc_list ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__22 = ( Atdgen_runtime . Oj_run . write_assoc_array ( Yojson . Safe . write_string ) ( Yojson . Safe . write_int ) )
let string_of__22 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__22 ob x ; Bi_outbuf . contents ob
let read__22 = ( Atdgen_runtime . Oj_run . read_assoc_array ( Atdgen_runtime . Oj_run . read_string ) ( Atdgen_runtime . Oj_run . read_int ) )
let _22_of_string s = read__22 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_int_assoc_array = ( write__22 )
let string_of_int_assoc_array ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_int_assoc_array ob x ; Bi_outbuf . contents ob
let read_int_assoc_array = ( read__22 )
let int_assoc_array_of_string s = read_int_assoc_array ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_int8 = ( Yojson . Safe . write_int )
let string_of_int8 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_int8 ob x ; Bi_outbuf . contents ob
let read_int8 = ( Atdgen_runtime . Oj_run . read_int )
let int8_of_string s = read_int8 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_int64 = ( Atdgen_runtime . Oj_run . write_int64 )
let string_of_int64 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_int64 ob x ; Bi_outbuf . contents ob
let read_int64 = ( Atdgen_runtime . Oj_run . read_int64 )
let int64_of_string s = read_int64 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_int32 = ( Atdgen_runtime . Oj_run . write_int32 )
let string_of_int32 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_int32 ob x ; Bi_outbuf . contents ob
let read_int32 = ( Atdgen_runtime . Oj_run . read_int32 )
let int32_of_string s = read_int32 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_hello = ( fun ob x -> match x with | ` Hello x -> Bi_outbuf . add_string ob " " <\ Hello " " ; \: ( Yojson . Safe . write_string ) ob x ; Bi_outbuf . add_char ob ' ' > | ` World -> Bi_outbuf . add_string ob " " <\ World " " \> )
let string_of_hello ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_hello ob x ; Bi_outbuf . contents ob
let read_hello = ( fun p lb -> Yojson . Safe . read_space p lb ; match Yojson . Safe . start_any_variant p lb with | ` Edgy_bracket -> ( match Yojson . Safe . read_ident p lb with | " Hello " -> Atdgen_runtime . Oj_run . read_until_field_value p lb ; let x = ( Atdgen_runtime . Oj_run . read_string ) p lb in Yojson . Sa...
let hello_of_string s = read_hello ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_generic write__a : _ -> ' a generic -> _ = ( fun ob ( x : ' a generic ) -> Bi_outbuf . add_char ob ' { ' ; let is_first = ref true in if ! is_first then is_first := false else Bi_outbuf . add_char ob ' , ' ; Bi_outbuf . add_string ob " " \ x294623 " " ; \: ( Yojson . Safe . write_int ) ob x . x294623 ; Bi_out...
let string_of_generic write__a ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_generic write__a ob x ; Bi_outbuf . contents ob
let read_generic read__a = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_x294623 = ref ( None ) in try Yojson . Safe . read_space p lb ; Yojson . Safe . read_object_end lb ; Yojson . Safe . read_space p lb ; let f = fun s pos len -> if pos < 0 || len < 0 || pos + len > Stri...
let generic_of_string read__a s = read_generic read__a ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_floats : _ -> floats -> _ = ( fun ob ( x : floats ) -> Bi_outbuf . add_char ob ' { ' ; let is_first = ref true in if ! is_first then is_first := false else Bi_outbuf . add_char ob ' , ' ; Bi_outbuf . add_string ob " " \ f32 " " ; \: ( Yojson . Safe . write_float ) ob x . f32 ; if ! is_first then is_first := f...