123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172(************************************************************************)(* v * The Coq Proof Assistant / The Coq Development Team *)(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2017 *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(************************************************************************)(************************************************************************)(* Coq serialization API/Plugin *)(* Copyright 2016-2017 MINES ParisTech *)(************************************************************************)(* Status: Very Experimental *)(************************************************************************)openSexplib.Stdtypepp_tag=[%import:Pp.pp_tag][@@derivingsexp,yojson]typeblock_type=[%import:Pp.block_type][@@derivingsexp,yojson]moduleP=structtype_t=|Pp_empty|Pp_stringofstring|Pp_glueof_tlist|Pp_boxofblock_type*_t|Pp_tagofpp_tag*_t(* Are those redundant? *)|Pp_print_breakofint*int|Pp_force_newline|Pp_commentofstringlist[@@derivingsexp,yojson]openPpletrecfrom_t(d:t):_t=matchreprdwith|Ppcmd_empty->Pp_empty|Ppcmd_strings->Pp_strings|Ppcmd_gluel->Pp_glue(List.mapfrom_tl)|Ppcmd_box(bt,d)->Pp_box(bt,from_td)|Ppcmd_tag(t,d)->Pp_tag(t,from_td)|Ppcmd_print_break(n,m)->Pp_print_break(n,m)|Ppcmd_force_newline->Pp_force_newline|Ppcmd_comments->Pp_commentsletrecto_t(d:_t):t=unrepr(matchdwith|Pp_empty->Ppcmd_empty|Pp_strings->Ppcmd_strings|Pp_gluel->Ppcmd_glue(List.mapto_tl)|Pp_box(bt,d)->Ppcmd_box(bt,to_td)|Pp_tag(t,d)->Ppcmd_tag(t,to_td)|Pp_print_break(n,m)->Ppcmd_print_break(n,m)|Pp_force_newline->Ppcmd_force_newline|Pp_comments->Ppcmd_comments)endtypet=Pp.tlett_of_sexps=P.(to_t(_t_of_sexps))letsexp_of_td=P.(sexp_of__t(from_td))letof_yojsonjson=Ppx_deriving_yojson_runtime.(P.(_t_of_yojsonjson>|=to_t))letto_yojsonlevel=P.(_t_to_yojson(from_tlevel))typedoc_view=[%import:Pp.doc_view][@@derivingsexp,yojson]