123456789101112131415161718192021222324252627282930313233343536373839404142434445moduleCallBack=structtypet={trace:string->?extra:string->string->unit;send_diagnostics:ofmt:Format.formatter->uri:string->version:int->Types.Diagnostic.tlist->unit;send_fileProgress:ofmt:Format.formatter->uri:string->version:int->Progress.Info.tlist->unit}letdefault={trace=(fun_?extra:__->());send_diagnostics=(fun~ofmt:_~uri:_~version:__->());send_fileProgress=(fun~ofmt:_~uri:_~version:__->())}letcb=refdefaultletsett=cb:=tendmoduleLog=structlettraced?extram=!CallBack.cb.traced?extramletfeedbackfeedback=ifnot(CList.is_emptyfeedback)then(* Put feedbacks content here? *)letextra=Nonein!CallBack.cb.trace"feedback"?extra"feedback received in non-user facing place"endmoduleReport=structletdiagnostics~ofmt~uri~versiond=!CallBack.cb.send_diagnostics~ofmt~uri~versiondletfileProgress~ofmt~uri~versiond=!CallBack.cb.send_fileProgress~ofmt~uri~versiondend