|
|
|
@ -10,9 +10,7 @@ open! IStd
|
|
|
|
|
module type Payload = sig
|
|
|
|
|
type t
|
|
|
|
|
|
|
|
|
|
val update_payloads : t -> Payloads.t -> Payloads.t
|
|
|
|
|
|
|
|
|
|
val of_payloads : Payloads.t -> t option
|
|
|
|
|
val field : (Payloads.t, t option) Field.t
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
module type S = sig
|
|
|
|
@ -30,11 +28,15 @@ end
|
|
|
|
|
module Make (P : Payload) : S with type t = P.t = struct
|
|
|
|
|
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) =
|
|
|
|
|
{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 open Option.Monad_infix in
|
|
|
|
|