12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091openCoremoduleRepr=structtypet={t:string;univ_constr:string}[@@derivingsexp,fields]letcreate~t~univ_constr={t;univ_constr};;letside_effect={t="Ocaml_plugin.Dynloader.Side_effect";univ_constr="Ocaml_plugin.Dynloader.side_effect_univ_constr"};;endmoduleV1=structtypet={uuid:Uuid.Stable.V1.t;ml_bundles:Ml_bundle.tlist;repr:Repr.toption}[@@derivingsexp,fields]endmoduleV2=structmodulePrev=V1typet={uuid:Uuid.Stable.V1.t;ml_bundles:Ml_bundle.tlist;repr:Repr.t}[@@derivingsexp,fields]lett_of_sexp=Sexp.of_sexp_allow_extra_fields_recursivelyt_of_sexpletof_prevprev=let{Prev.uuid;ml_bundles;repr}=previnletrepr=matchreprwith|Somerepr->repr|None->Repr.side_effectin{uuid;ml_bundles;repr};;endmoduleVersioned=structtypet=|V1ofV1.t|V2ofV2.t[@@derivingsexp]letto_current=function|V1v1->V2.of_prevv1|V2v2->v2letof_currentv2=V2v2endincludeV2letof_v1=V2.of_prevlett_of_sexpsexp=matchVersioned.t_of_sexpsexpwith|versioned->Versioned.to_currentversioned|exception_->(* initially this was not versioned *)of_v1(V1.t_of_sexpsexp);;letsexp_of_tt=Versioned.sexp_of_t(Versioned.of_currentt)letcreate~repr~ml_bundles()={uuid=Uuid_unix.create();ml_bundles;repr};;