1234567891011121314151617open!Baseopen!ImportincludePpxlibletsexp_as_pprinted_atomprinterdata=(* This [str_formatter] work roughly follows [Pprintast.string_of_expression]. *)ignore(Stdlib.Format.flush_str_formatter():string);printerStdlib.Format.str_formatterdata;Sexp.Atom(Stdlib.Format.flush_str_formatter());;letsexp_of_constant=Ast_traverse.sexp_of#constant(* Locations are remarkably verbose, so the sexp printout pretty-prints to avoid them. *)letsexp_of_expression=sexp_as_pprinted_atomPprintast.expressionletsexp_of_core_type=sexp_as_pprinted_atomPprintast.core_typeletsexp_of_locsexp_of_a{loc=(_:location);txt}=sexp_of_atxt