1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677moduleDriver:Ppx_protocol_driver.Driverwithtypet=Msgpck.t=structtypet=Msgpck.tletto_string_humt=Format.asprintf"%a"Msgpck.pptletof_list=Msgpck.of_listletto_list=Msgpck.to_listletis_list=functionMsgpck.List_->true|_->falseletof_alistalist=List.map(fun(k,v)->Msgpck.of_stringk,v)alist|>Msgpck.of_mapletto_alistt=Msgpck.to_mapt|>List.map(fun(k,v)->(Msgpck.to_stringk,v))letis_alist=functionMsgpck.Map_->true|_->falseletto_int=functionMsgpck.Inti->i|Msgpck.Int32i->Int32.to_inti|Msgpck.Uint32i->Int32.to_inti|Msgpck.Int64i->Int64.to_inti|Msgpck.Uint64i->Int64.to_inti|_->failwith"int expected"letof_int=Msgpck.of_intletof_int32=Msgpck.of_int32letto_int32=Msgpck.to_int32letof_int64=Msgpck.of_int64letto_int64=Msgpck.to_int64letof_nativeintv=Nativeint.to_intv|>of_intletto_nativeintt=to_intt|>Nativeint.of_intletto_float=functionMsgpck.Floatf->f|Msgpck.Float32i->Int32.float_of_bitsi|_->failwith"float expected"letof_float=Msgpck.of_floatletof_string=Msgpck.of_stringletto_string=Msgpck.to_stringletis_string=functionMsgpck.String_->true|_->falseletof_charc=of_string(String.make1c)letto_chart=matchto_stringtwith|swhenString.lengths=1->s.[0]|_->failwith"Got string with length != 1 when reading type 'char'"letof_bool=Msgpck.of_boolletto_bool=Msgpck.to_boolletof_bytesb=Bytes.to_stringb|>Msgpck.of_bytesletto_bytesm=Msgpck.to_bytesm|>Bytes.of_stringletnull=Msgpck.Nilletis_null=functionMsgpck.Nil->true|_->falseendincludePpx_protocol_driver.Make(Driver)(Ppx_protocol_driver.Default_parameters)moduleMake(P:Ppx_protocol_driver.Parameters)=Ppx_protocol_driver.Make(Driver)(P)typenonrecbytes=stringletbytes_of_msgpack_exn=Msgpck.to_bytesletbytes_to_msgpack=Msgpck.of_bytestypeuint32=intletuint32_of_msgpack_exnt=Msgpck.to_uint32t|>Int32.to_intletuint32_to_msgpackv=Int32.of_intv|>Msgpck.of_uint32typeuint64=intletuint64_of_msgpack_exnt=Msgpck.to_uint64t|>Int64.to_intletuint64_to_msgpackv=Int64.of_intv|>Msgpck.of_uint64typefloat32=floatletfloat32_of_msgpack_exnt=Msgpck.to_float32t|>Int32.float_of_bitsletfloat32_to_msgpackv=Int32.bits_of_floatv|>Msgpck.of_float32letof_msgpack_exnt=tletof_msgpackt=Oktletto_msgpackt=t