|
|
@ -10,9 +10,7 @@ open! IStd
|
|
|
|
module type Payload = sig
|
|
|
|
module type Payload = sig
|
|
|
|
type t
|
|
|
|
type t
|
|
|
|
|
|
|
|
|
|
|
|
val update_payloads : t -> Payloads.t -> Payloads.t
|
|
|
|
val field : (Payloads.t, t option) Field.t
|
|
|
|
|
|
|
|
|
|
|
|
val of_payloads : Payloads.t -> t option
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
module type S = sig
|
|
|
|
module type S = sig
|
|
|
@ -30,11 +28,15 @@ end
|
|
|
|
module Make (P : Payload) : S with type t = P.t = struct
|
|
|
|
module Make (P : Payload) : S with type t = P.t = struct
|
|
|
|
type t = P.t
|
|
|
|
type t = P.t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let update_payloads = Field.fset P.field
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let of_payloads = Field.get P.field
|
|
|
|
|
|
|
|
|
|
|
|
let update_summary p (summary : Summary.t) =
|
|
|
|
let update_summary p (summary : Summary.t) =
|
|
|
|
{summary with payloads= P.update_payloads p summary.payloads}
|
|
|
|
{summary with payloads= update_payloads summary.payloads (Some p)}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let of_summary (summary : Summary.t) = P.of_payloads summary.payloads
|
|
|
|
let of_summary (summary : Summary.t) = of_payloads summary.payloads
|
|
|
|
|
|
|
|
|
|
|
|
let read_full caller_pdesc callee_pname =
|
|
|
|
let read_full caller_pdesc callee_pname =
|
|
|
|
let open Option.Monad_infix in
|
|
|
|
let open Option.Monad_infix in
|
|
|
|