1234567891011121314151617181920212223242526272829303132(** This module provides result type and functions for compatibility
* with OCaml 4.06 *)typeerror=[`Premature_end_of_input|`Unknown_field_typeofint|`Wrong_field_typeofstring*Field.t|`Illegal_valueofstring*Field.t|`Not_implemented|`Unknown_enum_valueofint|`Oneof_missing|`Required_field_missing]letshow_error=function|`Premature_end_of_input->"`Premature_end_of_input"|`Unknown_field_typei->Printf.sprintf"`Unknown_field_type: %d"i|`Wrong_field_type(s,f)->Printf.sprintf"`Wrong_field_type: %s - %s"s(Field.showf)|`Illegal_value(s,f)->Printf.sprintf"`Illegal_value: %s - %s"s(Field.showf)|`Not_implemented->"`Not_implemente"|`Unknown_enum_valuei->Printf.sprintf"`Unknown_enum_value: %d"i|`Oneof_missing->"`Oneof_missin"|`Required_field_missing->"`Required_field_missing"type'at=('a,error)resultlet(>>|)vf=matchvwithOkx->Ok(fx)|Errorerr->Errorerrlet(>>=)vf=matchvwithOkx->fx|Errorerr->Errorerr(* Extra functions (from Base) *)letreturnx=Okxletfailx=Errorx