Module Stable_witness.Of_serializable1Source
Parameters
module Stable_format : Stable_witness.T1module M : Stable_witness.T1Signature
Source
val of_serializable :
('a Stable_witness.t -> 'a Stable_format.t Stable_witness.t) ->
('a Stable_format.t -> 'a M.t) ->
('a M.t -> 'a Stable_format.t) ->
'a Stable_witness.t ->
'a M.t Stable_witness.t @@ portableThis is the analogue of of_serializable for types with 1 type parameter, e.g. 'a M.t.
An example usage would look something like this:
let stable_witness (type a) : a Stable_witness.t -> a M.t Stable_witness.t =
fun witness ->
let module Stable_witness =
Stable_witness.Of_serializable1 (Stable_format) (M)
in
Stable_witness.of_serializable
Stable_format.stable_witness
M.of_stable_format
M.to_stable_format
witness
;;