123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196(* Copyright (C) 2023 Antonio Nuno Monteiro
*
* 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, either version 3 of the License, or
* (at your option) any later version.
*
* In addition to the permissions granted to you by the LGPL, you may combine
* or link a "work that uses the Library" with a publicly distributed version
* of this file to produce a combined library or application, then distribute
* that combined work under the terms of your choosing, with no requirement
* to comply with the obligations normally placed on you by section 4 of the
* LGPL version 3 (or the corresponding section of a later version of the LGPL
* should you choose to use a 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. *)moduleConvert=Ppxlib_ast.Select_ast(Ppxlib_ast__.Versions.OCaml_414)moduleOf_ppxlib=structincludeConvert.To_ocamlletcopy_structureast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.structure=copy_structureastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.structure)letcopy_signatureast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.signature=copy_signatureastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.signature)letcopy_toplevel_phraseast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.toplevel_phrase=copy_toplevel_phraseastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.toplevel_phrase)letcopy_core_typeast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.core_type=copy_core_typeastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.core_type)letcopy_expressionast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.expression=copy_expressionastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.expression)letcopy_patternast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.pattern=copy_patternastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.pattern)letcopy_caseast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.case=copy_caseastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.case)letcopy_type_declarationast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.type_declaration=copy_type_declarationastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.type_declaration)letcopy_type_extensionast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.type_extension=copy_type_extensionastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.type_extension)letcopy_extension_constructorast=letast_414:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.extension_constructor=copy_extension_constructorastin(Obj.magicast_414:Melange_compiler_libs.Parsetree.extension_constructor)letcopy_payload(payload:Ppxlib.Parsetree.payload):Melange_compiler_libs.Parsetree.payload=matchpayloadwith|PStrstructure->PStr(copy_structurestructure)|PSigsignature->PSig(copy_signaturesignature)|PTypcore_type->PTyp(copy_core_typecore_type)|PPat(pattern,expression)->PPat(copy_patternpattern,Option.mapcopy_expressionexpression)endmoduleTo_ppxlib=structincludeConvert.Of_ocamlletcopy_structure(ast:Melange_compiler_libs.Parsetree.structure)=letast_414=copy_structure(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.structure)in(ast_414:Ppxlib.structure)letcopy_signature(ast:Melange_compiler_libs.Parsetree.signature)=letast_414=copy_signature(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.signature)inast_414letcopy_toplevel_phrase(ast:Melange_compiler_libs.Parsetree.toplevel_phrase)=letast_414=copy_toplevel_phrase(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.toplevel_phrase)inast_414letcopy_core_type(ast:Melange_compiler_libs.Parsetree.core_type)=letast_414=copy_core_type(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.core_type)inast_414letcopy_expression(ast:Melange_compiler_libs.Parsetree.expression)=letast_414=copy_expression(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.expression)inast_414letcopy_pattern(ast:Melange_compiler_libs.Parsetree.pattern)=letast_414=copy_pattern(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.pattern)inast_414letcopy_case(ast:Melange_compiler_libs.Parsetree.case)=letast_414=copy_case(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.case)inast_414letcopy_type_declaration(ast:Melange_compiler_libs.Parsetree.type_declaration)=letast_414=copy_type_declaration(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.type_declaration)inast_414letcopy_type_extension(ast:Melange_compiler_libs.Parsetree.type_extension)=letast_414=copy_type_extension(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.type_extension)inast_414letcopy_extension_constructor(ast:Melange_compiler_libs.Parsetree.extension_constructor)=letast_414=copy_extension_constructor(Obj.magicast:Ppxlib_ast__.Versions.OCaml_414.Ast.Parsetree.extension_constructor)inast_414letcopy_payload(payload:Melange_compiler_libs.Parsetree.payload):Ppxlib.Parsetree.payload=matchpayloadwith|PStrstructure->PStr(copy_structurestructure)|PSigsignature->PSig(copy_signaturesignature)|PTypcore_type->PTyp(copy_core_typecore_type)|PPat(pattern,expression)->PPat(copy_patternpattern,Option.mapcopy_expressionexpression)end