text
stringlengths
0
601k
let string_of__15 ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write__15 ob x ; Bi_outbuf . contents ob
let read__15 = ( Atdgen_runtime . Oj_run . read_list ( read_mixed_record ) )
let _15_of_string s = read__15 ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_test : _ -> test -> _ = ( fun ob ( x : test ) -> Bi_outbuf . add_char ob ' { ' ; let is_first = ref true in ( match x . x0 with None -> ( ) | Some x -> if ! is_first then is_first := false else Bi_outbuf . add_char ob ' , ' ; Bi_outbuf . add_string ob " " \ x0 " " ; \: ( Yojson . Safe . write_int ) ob x ; ) ;...
let string_of_test ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_test ob x ; Bi_outbuf . contents ob
let read_test = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_x0 = ref ( None ) in let field_x1 = ref ( None ) in let field_x2 = ref ( None ) in let field_x3 = ref ( None ) in let field_x4 = ref ( None ) in try Yojson . Safe . read_space p lb ; Yojson . Safe . read_object_e...
let test_of_string s = read_test ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_tup = ( fun ob x -> Bi_outbuf . add_char ob ' [ ' ; ( let x , _ = x in ( Yojson . Safe . write_int ) ob x ) ; Bi_outbuf . add_char ob ' , ' ; ( let _ , x = x in ( write_test ) ob x ) ; Bi_outbuf . add_char ob ' ] ' ; )
let string_of_tup ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_tup ob x ; Bi_outbuf . contents ob
let read_tup = ( fun p lb -> Yojson . Safe . read_space p lb ; let std_tuple = Yojson . Safe . start_any_tuple p lb in let len = ref 0 in let end_of_tuple = ref false in ( try let x0 = let x = ( Atdgen_runtime . Oj_run . read_int ) p lb in incr len ; Yojson . Safe . read_space p lb ; Yojson . Safe . read_tuple_sep2 p s...
let tup_of_string s = read_tup ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_test_field_prefix : _ -> test_field_prefix -> _ = ( fun ob ( x : test_field_prefix ) -> 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 " " \ hello " " ; \: ( Yojson . Safe . write_bool ) ob x . thep...
let string_of_test_field_prefix ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_test_field_prefix ob x ; Bi_outbuf . contents ob
let read_test_field_prefix = ( fun p lb -> Yojson . Safe . read_space p lb ; Yojson . Safe . read_lcurl p lb ; let field_theprefix_hello = ref ( None ) in let field_theprefix_world = 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 ...
let test_field_prefix_of_string s = read_test_field_prefix ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write_star_rating = ( Yojson . Safe . write_int )
let string_of_star_rating ( ? len = 1024 ) x = let ob = Bi_outbuf . create len in write_star_rating ob x ; Bi_outbuf . contents ob
let read_star_rating = ( Atdgen_runtime . Oj_run . read_int )
let star_rating_of_string s = read_star_rating ( Yojson . Safe . init_lexer ( ) ) ( Lexing . from_string s )
let write__30 : _ -> _ generic -> _ = ( fun ob ( x : _ 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_outbuf . add_char ob...
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_std_float_prec 5 ) ob x . sqrt2_5 ; if !...
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_std_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 )