1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586# 1 "src/lib/eliom_lib_base.shared.ml"(* Ocsigen
* http://www.ocsigen.org
* Copyright (C) 2011 Grégoire Henry
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, with linking exception;
* either version 2.1 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*)openOcsigen_lib_baseexceptionEliom_Internal_ErrorofstringmoduleLwt_ops=structlet(>>=)=Lwt.(>>=)let(=<<)=Lwt.(=<<)let(>|=)=Lwt.(>|=)let(=|<)=Lwt.(=|<)endtypepos=Lexing.position*Lexing.positionletpos_to_string((start,stop):pos)=letopenLexinginletstart_col=start.pos_cnum-start.pos_bolinletstop_col=stop.pos_cnum-stop.pos_bolinifstart.pos_lnum=stop.pos_lnumthenifstart_col=stop_colthenPrintf.sprintf"%s %d:%d"start.pos_fnamestart.pos_lnumstart_colelsePrintf.sprintf"%s %d:%d-%d"start.pos_fnamestart.pos_lnumstart_colstop_colelsePrintf.sprintf"%s %d:%d-%d:%d"start.pos_fnamestart.pos_lnumstart_colstop.pos_lnumstop_colmoduletypeMap_S=sigincludeMap.Svalfrom_list:(key*'a)list->'atvalto_string:?sep:string->('a->string)->'at->stringendmoduleMap_make(Ord:sigincludeMap.OrderedTypevalto_string:t->stringend)=structincludeMap.Make(Ord)letfrom_listli=List.fold_right(uncurryadd)liemptyletto_string?(sep=", ")value_to_stringmap=String.concatsep(List.map(fun(key,value)->Ord.to_stringkey^":"^value_to_stringvalue)(bindingsmap))endmoduleInt64_map=Map_make(Int64)moduleInt_map=Map_make(structtypet=intletcompare=(-)letto_string=string_of_intend)moduleString_map=Map_make(structincludeStringletto_stringx=xend)