Private.CodecTopkg interprocess communication codec.
Codecs for communication between the topkg tool and topkg description files.
The type for decode errors.
Corrupted (kind, data), an error occured while decoding data for kind.Version (exp, fnd), a versioned decoder expected version exp but found fndval pp_error : Format.formatter -> error -> unitpp_error ppf e prints an unspecified representation of e on ppf.
exception Error of errorRaised on decode errors.
val v : kind:string -> enc:('a -> string) -> dec:(string -> 'a) -> 'a tv kind enc dec is a codec for value identified as kind using enc to encode and dec to decode.
val kind : 'a t -> stringkind c is c's kind.
val enc : 'a t -> 'a -> stringenc c is c's encoder.
val dec : 'a t -> string -> 'adec c is c's decoder. The decoder
val unit : unit tunit codecs a ().
val const : 'a -> 'a tconst v codecs the constant v.
val bool : bool tbool codecs booleans.
val int : int tint codecs integers.
val string : string tstring codecs strings.
t5 is like pair but for qintuples.
alt tag cs codecs values by tagging them with tag and using the corresponding codec in cs.
version num c versions codec c with number num. On decode a version number mismatch raises an error see error.
view kind t c views t as c for codecing.
val msg : [ `Msg of string ] tmsg codecs error messages.