123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146(* This module is trying to minimize dependencies on modules in Core, so as to allow
[Info], [Error], and [Or_error] to be used in is many places places as possible.
Please avoid adding new dependencies. *)open!Importopen!Info_intfmoduletypeS=Base.Info.SmoduleSource_code_position=Source_code_position0moduleBinable=Binable0moduleSexp=structincludeSexplib.Sexpinclude(structtypet=Base.Sexp.t=|Atomofstring|Listoftlist[@@derivingbin_io,compare,hash]end:sigtypet[@@derivingbin_io,compare,hash]endwithtypet:=t)endmoduleBinable_exn=structmoduleStable=structmoduleV1=structmoduleT=structtypet=exn[@@derivingsexp_of]endincludeTincludeBinable.Stable.Of_binable.V1[@alert"-legacy"](Sexp)(structincludeTletto_binablet=t|>[%sexp_of:t]letof_binable=Exn.create_send)endendendmoduleExtend(Info:Base.Info.S)=structincludeInfomoduleInternal_repr=structmoduleStable=structmoduleBinable_exn=Binable_exn.StablemoduleSource_code_position=structmoduleV1=structtypet=Source_code_position.Stable.V1.t[@@derivingbin_io](* [sexp_of_t] as defined here is unstable; this is OK because there is no
[t_of_sexp]. [sexp_of_t] is only used to produce a sexp that is never
deserialized as a [Source_code_position]. *)letsexp_of_t=Source_code_position.sexp_of_tendendmoduleV2=structtypet=Info.Internal_repr.t=|Could_not_constructofSexp.t|Stringofstring|ExnofBinable_exn.V1.t|SexpofSexp.t|Tag_sexpofstring*Sexp.t*Source_code_position.V1.toption|Tag_tofstring*t|Tag_argofstring*Sexp.t*t|Of_listofintoption*tlist|With_backtraceoft*string(* backtrace *)[@@derivingbin_io,sexp_of]endendincludeStable.V2letto_info=Info.Internal_repr.to_infoletof_info=Info.Internal_repr.of_infoendmoduleStable=structmoduleV2=structmoduleT=structtypet=Info.t[@@derivingsexp,compare,hash]endincludeTincludeComparator.Stable.V1.Make(T)includeBinable.Stable.Of_binable.V1[@alert"-legacy"](Internal_repr.Stable.V2)(structtypenonrect=tletto_binable=Info.Internal_repr.of_infoletof_binable=Info.Internal_repr.to_infoend)endmoduleV1=structmoduleT=structtypet=Info.t[@@derivingcompare]includeSexpable.Stable.Of_sexpable.V1(Sexp)(structtypenonrect=tletto_sexpable=Info.sexp_of_tletof_sexpable=Info.t_of_sexpend)letcompare=compareendincludeTincludeComparator.Stable.V1.Make(T)includeBinable.Stable.Of_binable.V1[@alert"-legacy"](Sexp)(structtypenonrect=tletto_binable=sexp_of_tletof_binable=t_of_sexpend)endendtypet=Stable.V2.t[@@derivingbin_io]endincludeExtend(Base.Info)