1234567891011121314151617181920212223242526272829303132(* Small helper to find out who is the caller of a function *)letget~skip=letskip=__FILE__::skipinletstack=Printexc.get_callstack16inletlen=Printexc.raw_backtrace_lengthstackinletreclooppos=ifpos=lenthenNoneelse(matchPrintexc.get_raw_backtrace_slotstackpos|>Printexc.convert_raw_backtrace_slot|>Printexc.Slot.locationwith|None->None|Someloc->ifList.memskiploc.filename~equal:String.equalthenloop(pos+1)else(letstart:Lexing.position={pos_fname=loc.filename;pos_lnum=loc.line_number;pos_bol=0;pos_cnum=loc.start_char}inletstop={startwithpos_cnum=loc.end_char}inSome(Loc.create~start~stop)))inloop0;;