12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916(**************************************************************************)(* *)(* OCaml Migrate Parsetree *)(* *)(* Frédéric Bour *)(* Alain Frisch, LexiFi *)(* *)(* Copyright 2017 Institut National de Recherche en Informatique et *)(* en Automatique (INRIA). *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)moduleDef=Migrate_parsetree_defmoduleFrom=Ast_404moduleTo=Ast_403letfrom_loc{From.Location.txt=_;loc}=locletmigration_errorlocationfeature=raise(Def.Migration_error(feature,location))letreccopy_expression:From.Parsetree.expression->To.Parsetree.expression=fun{From.Parsetree.pexp_desc=pexp_desc;From.Parsetree.pexp_loc=pexp_loc;From.Parsetree.pexp_attributes=pexp_attributes}->{To.Parsetree.pexp_desc=(copy_expression_descpexp_locpexp_desc);To.Parsetree.pexp_loc=(copy_locationpexp_loc);To.Parsetree.pexp_attributes=(copy_attributespexp_attributes)}andcopy_expression_descloc:From.Parsetree.expression_desc->To.Parsetree.expression_desc=function|From.Parsetree.Pexp_identx0->To.Parsetree.Pexp_ident(copy_loccopy_longidentx0)|From.Parsetree.Pexp_constantx0->To.Parsetree.Pexp_constant(copy_constantx0)|From.Parsetree.Pexp_let(x0,x1,x2)->To.Parsetree.Pexp_let((copy_rec_flagx0),(List.mapcopy_value_bindingx1),(copy_expressionx2))|From.Parsetree.Pexp_functionx0->To.Parsetree.Pexp_function(List.mapcopy_casex0)|From.Parsetree.Pexp_fun(x0,x1,x2,x3)->To.Parsetree.Pexp_fun((copy_arg_labelx0),(copy_optioncopy_expressionx1),(copy_patternx2),(copy_expressionx3))|From.Parsetree.Pexp_apply(x0,x1)->To.Parsetree.Pexp_apply((copy_expressionx0),(List.map(funx->let(x0,x1)=xin((copy_arg_labelx0),(copy_expressionx1)))x1))|From.Parsetree.Pexp_match(x0,x1)->To.Parsetree.Pexp_match((copy_expressionx0),(List.mapcopy_casex1))|From.Parsetree.Pexp_try(x0,x1)->To.Parsetree.Pexp_try((copy_expressionx0),(List.mapcopy_casex1))|From.Parsetree.Pexp_tuplex0->To.Parsetree.Pexp_tuple(List.mapcopy_expressionx0)|From.Parsetree.Pexp_construct(x0,x1)->To.Parsetree.Pexp_construct((copy_loccopy_longidentx0),(copy_optioncopy_expressionx1))|From.Parsetree.Pexp_variant(x0,x1)->To.Parsetree.Pexp_variant((copy_labelx0),(copy_optioncopy_expressionx1))|From.Parsetree.Pexp_record(x0,x1)->To.Parsetree.Pexp_record((List.map(funx->let(x0,x1)=xin((copy_loccopy_longidentx0),(copy_expressionx1)))x0),(copy_optioncopy_expressionx1))|From.Parsetree.Pexp_field(x0,x1)->To.Parsetree.Pexp_field((copy_expressionx0),(copy_loccopy_longidentx1))|From.Parsetree.Pexp_setfield(x0,x1,x2)->To.Parsetree.Pexp_setfield((copy_expressionx0),(copy_loccopy_longidentx1),(copy_expressionx2))|From.Parsetree.Pexp_arrayx0->To.Parsetree.Pexp_array(List.mapcopy_expressionx0)|From.Parsetree.Pexp_ifthenelse(x0,x1,x2)->To.Parsetree.Pexp_ifthenelse((copy_expressionx0),(copy_expressionx1),(copy_optioncopy_expressionx2))|From.Parsetree.Pexp_sequence(x0,x1)->To.Parsetree.Pexp_sequence((copy_expressionx0),(copy_expressionx1))|From.Parsetree.Pexp_while(x0,x1)->To.Parsetree.Pexp_while((copy_expressionx0),(copy_expressionx1))|From.Parsetree.Pexp_for(x0,x1,x2,x3,x4)->To.Parsetree.Pexp_for((copy_patternx0),(copy_expressionx1),(copy_expressionx2),(copy_direction_flagx3),(copy_expressionx4))|From.Parsetree.Pexp_constraint(x0,x1)->To.Parsetree.Pexp_constraint((copy_expressionx0),(copy_core_typex1))|From.Parsetree.Pexp_coerce(x0,x1,x2)->To.Parsetree.Pexp_coerce((copy_expressionx0),(copy_optioncopy_core_typex1),(copy_core_typex2))|From.Parsetree.Pexp_send(x0,x1)->To.Parsetree.Pexp_send((copy_expressionx0),x1)|From.Parsetree.Pexp_newx0->To.Parsetree.Pexp_new(copy_loccopy_longidentx0)|From.Parsetree.Pexp_setinstvar(x0,x1)->To.Parsetree.Pexp_setinstvar((copy_loc(funx->x)x0),(copy_expressionx1))|From.Parsetree.Pexp_overridex0->To.Parsetree.Pexp_override(List.map(funx->let(x0,x1)=xin((copy_loc(funx->x)x0),(copy_expressionx1)))x0)|From.Parsetree.Pexp_letmodule(x0,x1,x2)->To.Parsetree.Pexp_letmodule((copy_loc(funx->x)x0),(copy_module_exprx1),(copy_expressionx2))|From.Parsetree.Pexp_letexception_->migration_errorlocDef.Pexp_letexception|From.Parsetree.Pexp_assertx0->To.Parsetree.Pexp_assert(copy_expressionx0)|From.Parsetree.Pexp_lazyx0->To.Parsetree.Pexp_lazy(copy_expressionx0)|From.Parsetree.Pexp_poly(x0,x1)->To.Parsetree.Pexp_poly((copy_expressionx0),(copy_optioncopy_core_typex1))|From.Parsetree.Pexp_objectx0->To.Parsetree.Pexp_object(copy_class_structurex0)|From.Parsetree.Pexp_newtype(x0,x1)->To.Parsetree.Pexp_newtype(x0,(copy_expressionx1))|From.Parsetree.Pexp_packx0->To.Parsetree.Pexp_pack(copy_module_exprx0)|From.Parsetree.Pexp_open(x0,x1,x2)->To.Parsetree.Pexp_open((copy_override_flagx0),(copy_loccopy_longidentx1),(copy_expressionx2))|From.Parsetree.Pexp_extensionx0->To.Parsetree.Pexp_extension(copy_extensionx0)|From.Parsetree.Pexp_unreachable->To.Parsetree.Pexp_unreachableandcopy_direction_flag:From.Asttypes.direction_flag->To.Asttypes.direction_flag=function|From.Asttypes.Upto->To.Asttypes.Upto|From.Asttypes.Downto->To.Asttypes.Downtoandcopy_case:From.Parsetree.case->To.Parsetree.case=fun{From.Parsetree.pc_lhs=pc_lhs;From.Parsetree.pc_guard=pc_guard;From.Parsetree.pc_rhs=pc_rhs}->{To.Parsetree.pc_lhs=(copy_patternpc_lhs);To.Parsetree.pc_guard=(copy_optioncopy_expressionpc_guard);To.Parsetree.pc_rhs=(copy_expressionpc_rhs)}andcopy_value_binding:From.Parsetree.value_binding->To.Parsetree.value_binding=fun{From.Parsetree.pvb_pat=pvb_pat;From.Parsetree.pvb_expr=pvb_expr;From.Parsetree.pvb_attributes=pvb_attributes;From.Parsetree.pvb_loc=pvb_loc}->{To.Parsetree.pvb_pat=(copy_patternpvb_pat);To.Parsetree.pvb_expr=(copy_expressionpvb_expr);To.Parsetree.pvb_attributes=(copy_attributespvb_attributes);To.Parsetree.pvb_loc=(copy_locationpvb_loc)}andcopy_pattern:From.Parsetree.pattern->To.Parsetree.pattern=fun{From.Parsetree.ppat_desc=ppat_desc;From.Parsetree.ppat_loc=ppat_loc;From.Parsetree.ppat_attributes=ppat_attributes}->{To.Parsetree.ppat_desc=(copy_pattern_descppat_locppat_desc);To.Parsetree.ppat_loc=(copy_locationppat_loc);To.Parsetree.ppat_attributes=(copy_attributesppat_attributes)}andcopy_pattern_descloc:From.Parsetree.pattern_desc->To.Parsetree.pattern_desc=function|From.Parsetree.Ppat_any->To.Parsetree.Ppat_any|From.Parsetree.Ppat_varx0->To.Parsetree.Ppat_var(copy_loc(funx->x)x0)|From.Parsetree.Ppat_alias(x0,x1)->To.Parsetree.Ppat_alias((copy_patternx0),(copy_loc(funx->x)x1))|From.Parsetree.Ppat_constantx0->To.Parsetree.Ppat_constant(copy_constantx0)|From.Parsetree.Ppat_interval(x0,x1)->To.Parsetree.Ppat_interval((copy_constantx0),(copy_constantx1))|From.Parsetree.Ppat_tuplex0->To.Parsetree.Ppat_tuple(List.mapcopy_patternx0)|From.Parsetree.Ppat_construct(x0,x1)->To.Parsetree.Ppat_construct((copy_loccopy_longidentx0),(copy_optioncopy_patternx1))|From.Parsetree.Ppat_variant(x0,x1)->To.Parsetree.Ppat_variant((copy_labelx0),(copy_optioncopy_patternx1))|From.Parsetree.Ppat_record(x0,x1)->To.Parsetree.Ppat_record((List.map(funx->let(x0,x1)=xin((copy_loccopy_longidentx0),(copy_patternx1)))x0),(copy_closed_flagx1))|From.Parsetree.Ppat_arrayx0->To.Parsetree.Ppat_array(List.mapcopy_patternx0)|From.Parsetree.Ppat_or(x0,x1)->To.Parsetree.Ppat_or((copy_patternx0),(copy_patternx1))|From.Parsetree.Ppat_constraint(x0,x1)->To.Parsetree.Ppat_constraint((copy_patternx0),(copy_core_typex1))|From.Parsetree.Ppat_typex0->To.Parsetree.Ppat_type(copy_loccopy_longidentx0)|From.Parsetree.Ppat_lazyx0->To.Parsetree.Ppat_lazy(copy_patternx0)|From.Parsetree.Ppat_unpackx0->To.Parsetree.Ppat_unpack(copy_loc(funx->x)x0)|From.Parsetree.Ppat_exceptionx0->To.Parsetree.Ppat_exception(copy_patternx0)|From.Parsetree.Ppat_extensionx0->To.Parsetree.Ppat_extension(copy_extensionx0)|From.Parsetree.Ppat_open_->migration_errorlocDef.Ppat_openandcopy_core_type:From.Parsetree.core_type->To.Parsetree.core_type=fun{From.Parsetree.ptyp_desc=ptyp_desc;From.Parsetree.ptyp_loc=ptyp_loc;From.Parsetree.ptyp_attributes=ptyp_attributes}->{To.Parsetree.ptyp_desc=(copy_core_type_descptyp_desc);To.Parsetree.ptyp_loc=(copy_locationptyp_loc);To.Parsetree.ptyp_attributes=(copy_attributesptyp_attributes)}andcopy_core_type_desc:From.Parsetree.core_type_desc->To.Parsetree.core_type_desc=function|From.Parsetree.Ptyp_any->To.Parsetree.Ptyp_any|From.Parsetree.Ptyp_varx0->To.Parsetree.Ptyp_varx0|From.Parsetree.Ptyp_arrow(x0,x1,x2)->To.Parsetree.Ptyp_arrow((copy_arg_labelx0),(copy_core_typex1),(copy_core_typex2))|From.Parsetree.Ptyp_tuplex0->To.Parsetree.Ptyp_tuple(List.mapcopy_core_typex0)|From.Parsetree.Ptyp_constr(x0,x1)->To.Parsetree.Ptyp_constr((copy_loccopy_longidentx0),(List.mapcopy_core_typex1))|From.Parsetree.Ptyp_object(x0,x1)->To.Parsetree.Ptyp_object((List.map(funx->let(x0,x1,x2)=xin(x0,(copy_attributesx1),(copy_core_typex2)))x0),(copy_closed_flagx1))|From.Parsetree.Ptyp_class(x0,x1)->To.Parsetree.Ptyp_class((copy_loccopy_longidentx0),(List.mapcopy_core_typex1))|From.Parsetree.Ptyp_alias(x0,x1)->To.Parsetree.Ptyp_alias((copy_core_typex0),x1)|From.Parsetree.Ptyp_variant(x0,x1,x2)->To.Parsetree.Ptyp_variant((List.mapcopy_row_fieldx0),(copy_closed_flagx1),(copy_option(funx->List.mapcopy_labelx)x2))|From.Parsetree.Ptyp_poly(x0,x1)->To.Parsetree.Ptyp_poly((List.map(funx->x)x0),(copy_core_typex1))|From.Parsetree.Ptyp_packagex0->To.Parsetree.Ptyp_package(copy_package_typex0)|From.Parsetree.Ptyp_extensionx0->To.Parsetree.Ptyp_extension(copy_extensionx0)andcopy_package_type:From.Parsetree.package_type->To.Parsetree.package_type=funx->let(x0,x1)=xin((copy_loccopy_longidentx0),(List.map(funx->let(x0,x1)=xin((copy_loccopy_longidentx0),(copy_core_typex1)))x1))andcopy_row_field:From.Parsetree.row_field->To.Parsetree.row_field=function|From.Parsetree.Rtag(x0,x1,x2,x3)->To.Parsetree.Rtag((copy_labelx0),(copy_attributesx1),(copy_boolx2),(List.mapcopy_core_typex3))|From.Parsetree.Rinheritx0->To.Parsetree.Rinherit(copy_core_typex0)andcopy_attributes:From.Parsetree.attributes->To.Parsetree.attributes=funx->List.mapcopy_attributexandcopy_attribute:From.Parsetree.attribute->To.Parsetree.attribute=funx->let(x0,x1)=xin((copy_loc(funx->x)x0),(copy_payloadx1))andcopy_payload:From.Parsetree.payload->To.Parsetree.payload=function|From.Parsetree.PStrx0->To.Parsetree.PStr(copy_structurex0)|From.Parsetree.PSigx0->To.Parsetree.PSig(copy_signaturex0)|From.Parsetree.PTypx0->To.Parsetree.PTyp(copy_core_typex0)|From.Parsetree.PPat(x0,x1)->To.Parsetree.PPat((copy_patternx0),(copy_optioncopy_expressionx1))andcopy_structure:From.Parsetree.structure->To.Parsetree.structure=funx->List.mapcopy_structure_itemxandcopy_structure_item:From.Parsetree.structure_item->To.Parsetree.structure_item=fun{From.Parsetree.pstr_desc=pstr_desc;From.Parsetree.pstr_loc=pstr_loc}->{To.Parsetree.pstr_desc=(copy_structure_item_descpstr_desc);To.Parsetree.pstr_loc=(copy_locationpstr_loc)}andcopy_structure_item_desc:From.Parsetree.structure_item_desc->To.Parsetree.structure_item_desc=function|From.Parsetree.Pstr_eval(x0,x1)->To.Parsetree.Pstr_eval((copy_expressionx0),(copy_attributesx1))|From.Parsetree.Pstr_value(x0,x1)->To.Parsetree.Pstr_value((copy_rec_flagx0),(List.mapcopy_value_bindingx1))|From.Parsetree.Pstr_primitivex0->To.Parsetree.Pstr_primitive(copy_value_descriptionx0)|From.Parsetree.Pstr_type(x0,x1)->To.Parsetree.Pstr_type((copy_rec_flagx0),(List.mapcopy_type_declarationx1))|From.Parsetree.Pstr_typextx0->To.Parsetree.Pstr_typext(copy_type_extensionx0)|From.Parsetree.Pstr_exceptionx0->To.Parsetree.Pstr_exception(copy_extension_constructorx0)|From.Parsetree.Pstr_modulex0->To.Parsetree.Pstr_module(copy_module_bindingx0)|From.Parsetree.Pstr_recmodulex0->To.Parsetree.Pstr_recmodule(List.mapcopy_module_bindingx0)|From.Parsetree.Pstr_modtypex0->To.Parsetree.Pstr_modtype(copy_module_type_declarationx0)|From.Parsetree.Pstr_openx0->To.Parsetree.Pstr_open(copy_open_descriptionx0)|From.Parsetree.Pstr_classx0->To.Parsetree.Pstr_class(List.mapcopy_class_declarationx0)|From.Parsetree.Pstr_class_typex0->To.Parsetree.Pstr_class_type(List.mapcopy_class_type_declarationx0)|From.Parsetree.Pstr_includex0->To.Parsetree.Pstr_include(copy_include_declarationx0)|From.Parsetree.Pstr_attributex0->To.Parsetree.Pstr_attribute(copy_attributex0)|From.Parsetree.Pstr_extension(x0,x1)->To.Parsetree.Pstr_extension((copy_extensionx0),(copy_attributesx1))andcopy_include_declaration:From.Parsetree.include_declaration->To.Parsetree.include_declaration=funx->copy_include_infoscopy_module_exprxandcopy_class_declaration:From.Parsetree.class_declaration->To.Parsetree.class_declaration=funx->copy_class_infoscopy_class_exprxandcopy_class_expr:From.Parsetree.class_expr->To.Parsetree.class_expr=fun{From.Parsetree.pcl_desc=pcl_desc;From.Parsetree.pcl_loc=pcl_loc;From.Parsetree.pcl_attributes=pcl_attributes}->{To.Parsetree.pcl_desc=(copy_class_expr_descpcl_desc);To.Parsetree.pcl_loc=(copy_locationpcl_loc);To.Parsetree.pcl_attributes=(copy_attributespcl_attributes)}andcopy_class_expr_desc:From.Parsetree.class_expr_desc->To.Parsetree.class_expr_desc=function|From.Parsetree.Pcl_constr(x0,x1)->To.Parsetree.Pcl_constr((copy_loccopy_longidentx0),(List.mapcopy_core_typex1))|From.Parsetree.Pcl_structurex0->To.Parsetree.Pcl_structure(copy_class_structurex0)|From.Parsetree.Pcl_fun(x0,x1,x2,x3)->To.Parsetree.Pcl_fun((copy_arg_labelx0),(copy_optioncopy_expressionx1),(copy_patternx2),(copy_class_exprx3))|From.Parsetree.Pcl_apply(x0,x1)->To.Parsetree.Pcl_apply((copy_class_exprx0),(List.map(funx->let(x0,x1)=xin((copy_arg_labelx0),(copy_expressionx1)))x1))|From.Parsetree.Pcl_let(x0,x1,x2)->To.Parsetree.Pcl_let((copy_rec_flagx0),(List.mapcopy_value_bindingx1),(copy_class_exprx2))|From.Parsetree.Pcl_constraint(x0,x1)->To.Parsetree.Pcl_constraint((copy_class_exprx0),(copy_class_typex1))|From.Parsetree.Pcl_extensionx0->To.Parsetree.Pcl_extension(copy_extensionx0)andcopy_class_structure:From.Parsetree.class_structure->To.Parsetree.class_structure=fun{From.Parsetree.pcstr_self=pcstr_self;From.Parsetree.pcstr_fields=pcstr_fields}->{To.Parsetree.pcstr_self=(copy_patternpcstr_self);To.Parsetree.pcstr_fields=(List.mapcopy_class_fieldpcstr_fields)}andcopy_class_field:From.Parsetree.class_field->To.Parsetree.class_field=fun{From.Parsetree.pcf_desc=pcf_desc;From.Parsetree.pcf_loc=pcf_loc;From.Parsetree.pcf_attributes=pcf_attributes}->{To.Parsetree.pcf_desc=(copy_class_field_descpcf_desc);To.Parsetree.pcf_loc=(copy_locationpcf_loc);To.Parsetree.pcf_attributes=(copy_attributespcf_attributes)}andcopy_class_field_desc:From.Parsetree.class_field_desc->To.Parsetree.class_field_desc=function|From.Parsetree.Pcf_inherit(x0,x1,x2)->To.Parsetree.Pcf_inherit((copy_override_flagx0),(copy_class_exprx1),(copy_option(funx->x)x2))|From.Parsetree.Pcf_valx0->To.Parsetree.Pcf_val(let(x0,x1,x2)=x0in((copy_loc(funx->x)x0),(copy_mutable_flagx1),(copy_class_field_kindx2)))|From.Parsetree.Pcf_methodx0->To.Parsetree.Pcf_method(let(x0,x1,x2)=x0in((copy_loc(funx->x)x0),(copy_private_flagx1),(copy_class_field_kindx2)))|From.Parsetree.Pcf_constraintx0->To.Parsetree.Pcf_constraint(let(x0,x1)=x0in((copy_core_typex0),(copy_core_typex1)))|From.Parsetree.Pcf_initializerx0->To.Parsetree.Pcf_initializer(copy_expressionx0)|From.Parsetree.Pcf_attributex0->To.Parsetree.Pcf_attribute(copy_attributex0)|From.Parsetree.Pcf_extensionx0->To.Parsetree.Pcf_extension(copy_extensionx0)andcopy_class_field_kind:From.Parsetree.class_field_kind->To.Parsetree.class_field_kind=function|From.Parsetree.Cfk_virtualx0->To.Parsetree.Cfk_virtual(copy_core_typex0)|From.Parsetree.Cfk_concrete(x0,x1)->To.Parsetree.Cfk_concrete((copy_override_flagx0),(copy_expressionx1))andcopy_module_binding:From.Parsetree.module_binding->To.Parsetree.module_binding=fun{From.Parsetree.pmb_name=pmb_name;From.Parsetree.pmb_expr=pmb_expr;From.Parsetree.pmb_attributes=pmb_attributes;From.Parsetree.pmb_loc=pmb_loc}->{To.Parsetree.pmb_name=(copy_loc(funx->x)pmb_name);To.Parsetree.pmb_expr=(copy_module_exprpmb_expr);To.Parsetree.pmb_attributes=(copy_attributespmb_attributes);To.Parsetree.pmb_loc=(copy_locationpmb_loc)}andcopy_module_expr:From.Parsetree.module_expr->To.Parsetree.module_expr=fun{From.Parsetree.pmod_desc=pmod_desc;From.Parsetree.pmod_loc=pmod_loc;From.Parsetree.pmod_attributes=pmod_attributes}->{To.Parsetree.pmod_desc=(copy_module_expr_descpmod_desc);To.Parsetree.pmod_loc=(copy_locationpmod_loc);To.Parsetree.pmod_attributes=(copy_attributespmod_attributes)}andcopy_module_expr_desc:From.Parsetree.module_expr_desc->To.Parsetree.module_expr_desc=function|From.Parsetree.Pmod_identx0->To.Parsetree.Pmod_ident(copy_loccopy_longidentx0)|From.Parsetree.Pmod_structurex0->To.Parsetree.Pmod_structure(copy_structurex0)|From.Parsetree.Pmod_functor(x0,x1,x2)->To.Parsetree.Pmod_functor((copy_loc(funx->x)x0),(copy_optioncopy_module_typex1),(copy_module_exprx2))|From.Parsetree.Pmod_apply(x0,x1)->To.Parsetree.Pmod_apply((copy_module_exprx0),(copy_module_exprx1))|From.Parsetree.Pmod_constraint(x0,x1)->To.Parsetree.Pmod_constraint((copy_module_exprx0),(copy_module_typex1))|From.Parsetree.Pmod_unpackx0->To.Parsetree.Pmod_unpack(copy_expressionx0)|From.Parsetree.Pmod_extensionx0->To.Parsetree.Pmod_extension(copy_extensionx0)andcopy_module_type:From.Parsetree.module_type->To.Parsetree.module_type=fun{From.Parsetree.pmty_desc=pmty_desc;From.Parsetree.pmty_loc=pmty_loc;From.Parsetree.pmty_attributes=pmty_attributes}->{To.Parsetree.pmty_desc=(copy_module_type_descpmty_desc);To.Parsetree.pmty_loc=(copy_locationpmty_loc);To.Parsetree.pmty_attributes=(copy_attributespmty_attributes)}andcopy_module_type_desc:From.Parsetree.module_type_desc->To.Parsetree.module_type_desc=function|From.Parsetree.Pmty_identx0->To.Parsetree.Pmty_ident(copy_loccopy_longidentx0)|From.Parsetree.Pmty_signaturex0->To.Parsetree.Pmty_signature(copy_signaturex0)|From.Parsetree.Pmty_functor(x0,x1,x2)->To.Parsetree.Pmty_functor((copy_loc(funx->x)x0),(copy_optioncopy_module_typex1),(copy_module_typex2))|From.Parsetree.Pmty_with(x0,x1)->To.Parsetree.Pmty_with((copy_module_typex0),(List.mapcopy_with_constraintx1))|From.Parsetree.Pmty_typeofx0->To.Parsetree.Pmty_typeof(copy_module_exprx0)|From.Parsetree.Pmty_extensionx0->To.Parsetree.Pmty_extension(copy_extensionx0)|From.Parsetree.Pmty_aliasx0->To.Parsetree.Pmty_alias(copy_loccopy_longidentx0)andcopy_with_constraint:From.Parsetree.with_constraint->To.Parsetree.with_constraint=function|From.Parsetree.Pwith_type(x0,x1)->To.Parsetree.Pwith_type((copy_loccopy_longidentx0),(copy_type_declarationx1))|From.Parsetree.Pwith_module(x0,x1)->To.Parsetree.Pwith_module((copy_loccopy_longidentx0),(copy_loccopy_longidentx1))|From.Parsetree.Pwith_typesubstx0->To.Parsetree.Pwith_typesubst(copy_type_declarationx0)|From.Parsetree.Pwith_modsubst(x0,x1)->To.Parsetree.Pwith_modsubst((copy_loc(funx->x)x0),(copy_loccopy_longidentx1))andcopy_signature:From.Parsetree.signature->To.Parsetree.signature=funx->List.mapcopy_signature_itemxandcopy_signature_item:From.Parsetree.signature_item->To.Parsetree.signature_item=fun{From.Parsetree.psig_desc=psig_desc;From.Parsetree.psig_loc=psig_loc}->{To.Parsetree.psig_desc=(copy_signature_item_descpsig_desc);To.Parsetree.psig_loc=(copy_locationpsig_loc)}andcopy_signature_item_desc:From.Parsetree.signature_item_desc->To.Parsetree.signature_item_desc=function|From.Parsetree.Psig_valuex0->To.Parsetree.Psig_value(copy_value_descriptionx0)|From.Parsetree.Psig_type(x0,x1)->To.Parsetree.Psig_type((copy_rec_flagx0),(List.mapcopy_type_declarationx1))|From.Parsetree.Psig_typextx0->To.Parsetree.Psig_typext(copy_type_extensionx0)|From.Parsetree.Psig_exceptionx0->To.Parsetree.Psig_exception(copy_extension_constructorx0)|From.Parsetree.Psig_modulex0->To.Parsetree.Psig_module(copy_module_declarationx0)|From.Parsetree.Psig_recmodulex0->To.Parsetree.Psig_recmodule(List.mapcopy_module_declarationx0)|From.Parsetree.Psig_modtypex0->To.Parsetree.Psig_modtype(copy_module_type_declarationx0)|From.Parsetree.Psig_openx0->To.Parsetree.Psig_open(copy_open_descriptionx0)|From.Parsetree.Psig_includex0->To.Parsetree.Psig_include(copy_include_descriptionx0)|From.Parsetree.Psig_classx0->To.Parsetree.Psig_class(List.mapcopy_class_descriptionx0)|From.Parsetree.Psig_class_typex0->To.Parsetree.Psig_class_type(List.mapcopy_class_type_declarationx0)|From.Parsetree.Psig_attributex0->To.Parsetree.Psig_attribute(copy_attributex0)|From.Parsetree.Psig_extension(x0,x1)->To.Parsetree.Psig_extension((copy_extensionx0),(copy_attributesx1))andcopy_class_type_declaration:From.Parsetree.class_type_declaration->To.Parsetree.class_type_declaration=funx->copy_class_infoscopy_class_typexandcopy_class_description:From.Parsetree.class_description->To.Parsetree.class_description=funx->copy_class_infoscopy_class_typexandcopy_class_type:From.Parsetree.class_type->To.Parsetree.class_type=fun{From.Parsetree.pcty_desc=pcty_desc;From.Parsetree.pcty_loc=pcty_loc;From.Parsetree.pcty_attributes=pcty_attributes}->{To.Parsetree.pcty_desc=(copy_class_type_descpcty_desc);To.Parsetree.pcty_loc=(copy_locationpcty_loc);To.Parsetree.pcty_attributes=(copy_attributespcty_attributes)}andcopy_class_type_desc:From.Parsetree.class_type_desc->To.Parsetree.class_type_desc=function|From.Parsetree.Pcty_constr(x0,x1)->To.Parsetree.Pcty_constr((copy_loccopy_longidentx0),(List.mapcopy_core_typex1))|From.Parsetree.Pcty_signaturex0->To.Parsetree.Pcty_signature(copy_class_signaturex0)|From.Parsetree.Pcty_arrow(x0,x1,x2)->To.Parsetree.Pcty_arrow((copy_arg_labelx0),(copy_core_typex1),(copy_class_typex2))|From.Parsetree.Pcty_extensionx0->To.Parsetree.Pcty_extension(copy_extensionx0)andcopy_class_signature:From.Parsetree.class_signature->To.Parsetree.class_signature=fun{From.Parsetree.pcsig_self=pcsig_self;From.Parsetree.pcsig_fields=pcsig_fields}->{To.Parsetree.pcsig_self=(copy_core_typepcsig_self);To.Parsetree.pcsig_fields=(List.mapcopy_class_type_fieldpcsig_fields)}andcopy_class_type_field:From.Parsetree.class_type_field->To.Parsetree.class_type_field=fun{From.Parsetree.pctf_desc=pctf_desc;From.Parsetree.pctf_loc=pctf_loc;From.Parsetree.pctf_attributes=pctf_attributes}->{To.Parsetree.pctf_desc=(copy_class_type_field_descpctf_desc);To.Parsetree.pctf_loc=(copy_locationpctf_loc);To.Parsetree.pctf_attributes=(copy_attributespctf_attributes)}andcopy_class_type_field_desc:From.Parsetree.class_type_field_desc->To.Parsetree.class_type_field_desc=function|From.Parsetree.Pctf_inheritx0->To.Parsetree.Pctf_inherit(copy_class_typex0)|From.Parsetree.Pctf_valx0->To.Parsetree.Pctf_val(let(x0,x1,x2,x3)=x0in(x0,(copy_mutable_flagx1),(copy_virtual_flagx2),(copy_core_typex3)))|From.Parsetree.Pctf_methodx0->To.Parsetree.Pctf_method(let(x0,x1,x2,x3)=x0in(x0,(copy_private_flagx1),(copy_virtual_flagx2),(copy_core_typex3)))|From.Parsetree.Pctf_constraintx0->To.Parsetree.Pctf_constraint(let(x0,x1)=x0in((copy_core_typex0),(copy_core_typex1)))|From.Parsetree.Pctf_attributex0->To.Parsetree.Pctf_attribute(copy_attributex0)|From.Parsetree.Pctf_extensionx0->To.Parsetree.Pctf_extension(copy_extensionx0)andcopy_extension:From.Parsetree.extension->To.Parsetree.extension=funx->let(x0,x1)=xin((copy_loc(funx->x)x0),(copy_payloadx1))andcopy_class_infos:'f0'g0.('f0->'g0)->'f0From.Parsetree.class_infos->'g0To.Parsetree.class_infos=funf0->fun{From.Parsetree.pci_virt=pci_virt;From.Parsetree.pci_params=pci_params;From.Parsetree.pci_name=pci_name;From.Parsetree.pci_expr=pci_expr;From.Parsetree.pci_loc=pci_loc;From.Parsetree.pci_attributes=pci_attributes}->{To.Parsetree.pci_virt=(copy_virtual_flagpci_virt);To.Parsetree.pci_params=(List.map(funx->let(x0,x1)=xin((copy_core_typex0),(copy_variancex1)))pci_params);To.Parsetree.pci_name=(copy_loc(funx->x)pci_name);To.Parsetree.pci_expr=(f0pci_expr);To.Parsetree.pci_loc=(copy_locationpci_loc);To.Parsetree.pci_attributes=(copy_attributespci_attributes)}andcopy_virtual_flag:From.Asttypes.virtual_flag->To.Asttypes.virtual_flag=function|From.Asttypes.Virtual->To.Asttypes.Virtual|From.Asttypes.Concrete->To.Asttypes.Concreteandcopy_include_description:From.Parsetree.include_description->To.Parsetree.include_description=funx->copy_include_infoscopy_module_typexandcopy_include_infos:'f0'g0.('f0->'g0)->'f0From.Parsetree.include_infos->'g0To.Parsetree.include_infos=funf0->fun{From.Parsetree.pincl_mod=pincl_mod;From.Parsetree.pincl_loc=pincl_loc;From.Parsetree.pincl_attributes=pincl_attributes}->{To.Parsetree.pincl_mod=(f0pincl_mod);To.Parsetree.pincl_loc=(copy_locationpincl_loc);To.Parsetree.pincl_attributes=(copy_attributespincl_attributes)}andcopy_open_description:From.Parsetree.open_description->To.Parsetree.open_description=fun{From.Parsetree.popen_lid=popen_lid;From.Parsetree.popen_override=popen_override;From.Parsetree.popen_loc=popen_loc;From.Parsetree.popen_attributes=popen_attributes}->{To.Parsetree.popen_lid=(copy_loccopy_longidentpopen_lid);To.Parsetree.popen_override=(copy_override_flagpopen_override);To.Parsetree.popen_loc=(copy_locationpopen_loc);To.Parsetree.popen_attributes=(copy_attributespopen_attributes)}andcopy_override_flag:From.Asttypes.override_flag->To.Asttypes.override_flag=function|From.Asttypes.Override->To.Asttypes.Override|From.Asttypes.Fresh->To.Asttypes.Freshandcopy_module_type_declaration:From.Parsetree.module_type_declaration->To.Parsetree.module_type_declaration=fun{From.Parsetree.pmtd_name=pmtd_name;From.Parsetree.pmtd_type=pmtd_type;From.Parsetree.pmtd_attributes=pmtd_attributes;From.Parsetree.pmtd_loc=pmtd_loc}->{To.Parsetree.pmtd_name=(copy_loc(funx->x)pmtd_name);To.Parsetree.pmtd_type=(copy_optioncopy_module_typepmtd_type);To.Parsetree.pmtd_attributes=(copy_attributespmtd_attributes);To.Parsetree.pmtd_loc=(copy_locationpmtd_loc)}andcopy_module_declaration:From.Parsetree.module_declaration->To.Parsetree.module_declaration=fun{From.Parsetree.pmd_name=pmd_name;From.Parsetree.pmd_type=pmd_type;From.Parsetree.pmd_attributes=pmd_attributes;From.Parsetree.pmd_loc=pmd_loc}->{To.Parsetree.pmd_name=(copy_loc(funx->x)pmd_name);To.Parsetree.pmd_type=(copy_module_typepmd_type);To.Parsetree.pmd_attributes=(copy_attributespmd_attributes);To.Parsetree.pmd_loc=(copy_locationpmd_loc)}andcopy_type_extension:From.Parsetree.type_extension->To.Parsetree.type_extension=fun{From.Parsetree.ptyext_path=ptyext_path;From.Parsetree.ptyext_params=ptyext_params;From.Parsetree.ptyext_constructors=ptyext_constructors;From.Parsetree.ptyext_private=ptyext_private;From.Parsetree.ptyext_attributes=ptyext_attributes}->{To.Parsetree.ptyext_path=(copy_loccopy_longidentptyext_path);To.Parsetree.ptyext_params=(List.map(funx->let(x0,x1)=xin((copy_core_typex0),(copy_variancex1)))ptyext_params);To.Parsetree.ptyext_constructors=(List.mapcopy_extension_constructorptyext_constructors);To.Parsetree.ptyext_private=(copy_private_flagptyext_private);To.Parsetree.ptyext_attributes=(copy_attributesptyext_attributes)}andcopy_extension_constructor:From.Parsetree.extension_constructor->To.Parsetree.extension_constructor=fun{From.Parsetree.pext_name=pext_name;From.Parsetree.pext_kind=pext_kind;From.Parsetree.pext_loc=pext_loc;From.Parsetree.pext_attributes=pext_attributes}->{To.Parsetree.pext_name=(copy_loc(funx->x)pext_name);To.Parsetree.pext_kind=(copy_extension_constructor_kindpext_kind);To.Parsetree.pext_loc=(copy_locationpext_loc);To.Parsetree.pext_attributes=(copy_attributespext_attributes)}andcopy_extension_constructor_kind:From.Parsetree.extension_constructor_kind->To.Parsetree.extension_constructor_kind=function|From.Parsetree.Pext_decl(x0,x1)->To.Parsetree.Pext_decl((copy_constructor_argumentsx0),(copy_optioncopy_core_typex1))|From.Parsetree.Pext_rebindx0->To.Parsetree.Pext_rebind(copy_loccopy_longidentx0)andcopy_type_declaration:From.Parsetree.type_declaration->To.Parsetree.type_declaration=fun{From.Parsetree.ptype_name=ptype_name;From.Parsetree.ptype_params=ptype_params;From.Parsetree.ptype_cstrs=ptype_cstrs;From.Parsetree.ptype_kind=ptype_kind;From.Parsetree.ptype_private=ptype_private;From.Parsetree.ptype_manifest=ptype_manifest;From.Parsetree.ptype_attributes=ptype_attributes;From.Parsetree.ptype_loc=ptype_loc}->{To.Parsetree.ptype_name=(copy_loc(funx->x)ptype_name);To.Parsetree.ptype_params=(List.map(funx->let(x0,x1)=xin((copy_core_typex0),(copy_variancex1)))ptype_params);To.Parsetree.ptype_cstrs=(List.map(funx->let(x0,x1,x2)=xin((copy_core_typex0),(copy_core_typex1),(copy_locationx2)))ptype_cstrs);To.Parsetree.ptype_kind=(copy_type_kindptype_kind);To.Parsetree.ptype_private=(copy_private_flagptype_private);To.Parsetree.ptype_manifest=(copy_optioncopy_core_typeptype_manifest);To.Parsetree.ptype_attributes=(copy_attributesptype_attributes);To.Parsetree.ptype_loc=(copy_locationptype_loc)}andcopy_private_flag:From.Asttypes.private_flag->To.Asttypes.private_flag=function|From.Asttypes.Private->To.Asttypes.Private|From.Asttypes.Public->To.Asttypes.Publicandcopy_type_kind:From.Parsetree.type_kind->To.Parsetree.type_kind=function|From.Parsetree.Ptype_abstract->To.Parsetree.Ptype_abstract|From.Parsetree.Ptype_variantx0->To.Parsetree.Ptype_variant(List.mapcopy_constructor_declarationx0)|From.Parsetree.Ptype_recordx0->To.Parsetree.Ptype_record(List.mapcopy_label_declarationx0)|From.Parsetree.Ptype_open->To.Parsetree.Ptype_openandcopy_constructor_declaration:From.Parsetree.constructor_declaration->To.Parsetree.constructor_declaration=fun{From.Parsetree.pcd_name=pcd_name;From.Parsetree.pcd_args=pcd_args;From.Parsetree.pcd_res=pcd_res;From.Parsetree.pcd_loc=pcd_loc;From.Parsetree.pcd_attributes=pcd_attributes}->{To.Parsetree.pcd_name=(copy_loc(funx->x)pcd_name);To.Parsetree.pcd_args=(copy_constructor_argumentspcd_args);To.Parsetree.pcd_res=(copy_optioncopy_core_typepcd_res);To.Parsetree.pcd_loc=(copy_locationpcd_loc);To.Parsetree.pcd_attributes=(copy_attributespcd_attributes)}andcopy_constructor_arguments:From.Parsetree.constructor_arguments->To.Parsetree.constructor_arguments=function|From.Parsetree.Pcstr_tuplex0->To.Parsetree.Pcstr_tuple(List.mapcopy_core_typex0)|From.Parsetree.Pcstr_recordx0->To.Parsetree.Pcstr_record(List.mapcopy_label_declarationx0)andcopy_label_declaration:From.Parsetree.label_declaration->To.Parsetree.label_declaration=fun{From.Parsetree.pld_name=pld_name;From.Parsetree.pld_mutable=pld_mutable;From.Parsetree.pld_type=pld_type;From.Parsetree.pld_loc=pld_loc;From.Parsetree.pld_attributes=pld_attributes}->{To.Parsetree.pld_name=(copy_loc(funx->x)pld_name);To.Parsetree.pld_mutable=(copy_mutable_flagpld_mutable);To.Parsetree.pld_type=(copy_core_typepld_type);To.Parsetree.pld_loc=(copy_locationpld_loc);To.Parsetree.pld_attributes=(copy_attributespld_attributes)}andcopy_mutable_flag:From.Asttypes.mutable_flag->To.Asttypes.mutable_flag=function|From.Asttypes.Immutable->To.Asttypes.Immutable|From.Asttypes.Mutable->To.Asttypes.Mutableandcopy_variance:From.Asttypes.variance->To.Asttypes.variance=function|From.Asttypes.Covariant->To.Asttypes.Covariant|From.Asttypes.Contravariant->To.Asttypes.Contravariant|From.Asttypes.Invariant->To.Asttypes.Invariantandcopy_value_description:From.Parsetree.value_description->To.Parsetree.value_description=fun{From.Parsetree.pval_name=pval_name;From.Parsetree.pval_type=pval_type;From.Parsetree.pval_prim=pval_prim;From.Parsetree.pval_attributes=pval_attributes;From.Parsetree.pval_loc=pval_loc}->{To.Parsetree.pval_name=(copy_loc(funx->x)pval_name);To.Parsetree.pval_type=(copy_core_typepval_type);To.Parsetree.pval_prim=(List.map(funx->x)pval_prim);To.Parsetree.pval_attributes=(copy_attributespval_attributes);To.Parsetree.pval_loc=(copy_locationpval_loc)}andcopy_arg_label:From.Asttypes.arg_label->To.Asttypes.arg_label=function|From.Asttypes.Nolabel->To.Asttypes.Nolabel|From.Asttypes.Labelledx0->To.Asttypes.Labelledx0|From.Asttypes.Optionalx0->To.Asttypes.Optionalx0andcopy_closed_flag:From.Asttypes.closed_flag->To.Asttypes.closed_flag=function|From.Asttypes.Closed->To.Asttypes.Closed|From.Asttypes.Open->To.Asttypes.Openandcopy_label:From.Asttypes.label->To.Asttypes.label=funx->xandcopy_rec_flag:From.Asttypes.rec_flag->To.Asttypes.rec_flag=function|From.Asttypes.Nonrecursive->To.Asttypes.Nonrecursive|From.Asttypes.Recursive->To.Asttypes.Recursiveandcopy_constant:From.Parsetree.constant->To.Parsetree.constant=function|From.Parsetree.Pconst_integer(x0,x1)->To.Parsetree.Pconst_integer(x0,(copy_option(funx->x)x1))|From.Parsetree.Pconst_charx0->To.Parsetree.Pconst_charx0|From.Parsetree.Pconst_string(x0,x1)->To.Parsetree.Pconst_string(x0,(copy_option(funx->x)x1))|From.Parsetree.Pconst_float(x0,x1)->To.Parsetree.Pconst_float(x0,(copy_option(funx->x)x1))andcopy_option:'f0'g0.('f0->'g0)->'f0option->'g0option=funf0->function|None->None|Somex0->Some(f0x0)andcopy_longident:From.Longident.t->To.Longident.t=function|From.Longident.Lidentx0->To.Longident.Lidentx0|From.Longident.Ldot(x0,x1)->To.Longident.Ldot((copy_longidentx0),x1)|From.Longident.Lapply(x0,x1)->To.Longident.Lapply((copy_longidentx0),(copy_longidentx1))andcopy_loc:'f0'g0.('f0->'g0)->'f0From.Asttypes.loc->'g0To.Asttypes.loc=funf0->fun{From.Asttypes.txt=txt;From.Asttypes.loc=loc}->{To.Asttypes.txt=(f0txt);To.Asttypes.loc=(copy_locationloc)}andcopy_location:From.Location.t->To.Location.t=fun{From.Location.loc_start=loc_start;From.Location.loc_end=loc_end;From.Location.loc_ghost=loc_ghost}->{To.Location.loc_start=(copy_Lexing_positionloc_start);To.Location.loc_end=(copy_Lexing_positionloc_end);To.Location.loc_ghost=(copy_boolloc_ghost)}andcopy_bool:bool->bool=function|false->false|true->trueandcopy_Lexing_position:Lexing.position->Lexing.position=fun{Lexing.pos_fname=pos_fname;Lexing.pos_lnum=pos_lnum;Lexing.pos_bol=pos_bol;Lexing.pos_cnum=pos_cnum}->{Lexing.pos_fname=pos_fname;Lexing.pos_lnum=pos_lnum;Lexing.pos_bol=pos_bol;Lexing.pos_cnum=pos_cnum}letreccopy_out_phrase:From.Outcometree.out_phrase->To.Outcometree.out_phrase=function|From.Outcometree.Ophr_eval(x0,x1)->To.Outcometree.Ophr_eval((copy_out_valuex0),(copy_out_typex1))|From.Outcometree.Ophr_signaturex0->To.Outcometree.Ophr_signature(List.map(funx->let(x0,x1)=xin((copy_out_sig_itemx0),(copy_optioncopy_out_valuex1)))x0)|From.Outcometree.Ophr_exceptionx0->To.Outcometree.Ophr_exception(let(x0,x1)=x0in((copy_exnx0),(copy_out_valuex1)))andcopy_exn:exn->exn=funx->xandcopy_out_sig_item:From.Outcometree.out_sig_item->To.Outcometree.out_sig_item=function|From.Outcometree.Osig_class(x0,x1,x2,x3,x4)->To.Outcometree.Osig_class((copy_boolx0),x1,(List.map(funx->let(x0,x1)=xin(x0,(let(x0,x1)=x1in((copy_boolx0),(copy_boolx1)))))x2),(copy_out_class_typex3),(copy_out_rec_statusx4))|From.Outcometree.Osig_class_type(x0,x1,x2,x3,x4)->To.Outcometree.Osig_class_type((copy_boolx0),x1,(List.map(funx->let(x0,x1)=xin(x0,(let(x0,x1)=x1in((copy_boolx0),(copy_boolx1)))))x2),(copy_out_class_typex3),(copy_out_rec_statusx4))|From.Outcometree.Osig_typext(x0,x1)->To.Outcometree.Osig_typext((copy_out_extension_constructorx0),(copy_out_ext_statusx1))|From.Outcometree.Osig_modtype(x0,x1)->To.Outcometree.Osig_modtype(x0,(copy_out_module_typex1))|From.Outcometree.Osig_module(x0,x1,x2)->To.Outcometree.Osig_module(x0,(copy_out_module_typex1),(copy_out_rec_statusx2))|From.Outcometree.Osig_type(x0,x1)->To.Outcometree.Osig_type((copy_out_type_declx0),(copy_out_rec_statusx1))|From.Outcometree.Osig_valuex0->To.Outcometree.Osig_value(copy_out_val_declx0)|From.Outcometree.Osig_ellipsis->To.Outcometree.Osig_ellipsisandcopy_out_val_decl:From.Outcometree.out_val_decl->To.Outcometree.out_val_decl=fun{From.Outcometree.oval_name=oval_name;From.Outcometree.oval_type=oval_type;From.Outcometree.oval_prims=oval_prims;From.Outcometree.oval_attributes=oval_attributes}->{To.Outcometree.oval_name=oval_name;To.Outcometree.oval_type=(copy_out_typeoval_type);To.Outcometree.oval_prims=(List.map(funx->x)oval_prims);To.Outcometree.oval_attributes=(List.mapcopy_out_attributeoval_attributes)}andcopy_out_type_decl:From.Outcometree.out_type_decl->To.Outcometree.out_type_decl=fun{From.Outcometree.otype_name=otype_name;From.Outcometree.otype_params=otype_params;From.Outcometree.otype_type=otype_type;From.Outcometree.otype_private=otype_private;From.Outcometree.otype_immediate=otype_immediate;From.Outcometree.otype_unboxed=_otype_unboxed;From.Outcometree.otype_cstrs=otype_cstrs}->{To.Outcometree.otype_name=otype_name;To.Outcometree.otype_params=(List.map(funx->let(x0,x1)=xin(x0,(let(x0,x1)=x1in((copy_boolx0),(copy_boolx1)))))otype_params);To.Outcometree.otype_type=(copy_out_typeotype_type);To.Outcometree.otype_private=(copy_From_Asttypes_private_flagotype_private);To.Outcometree.otype_immediate=(copy_boolotype_immediate);To.Outcometree.otype_cstrs=(List.map(funx->let(x0,x1)=xin((copy_out_typex0),(copy_out_typex1)))otype_cstrs)}andcopy_out_module_type:From.Outcometree.out_module_type->To.Outcometree.out_module_type=function|From.Outcometree.Omty_abstract->To.Outcometree.Omty_abstract|From.Outcometree.Omty_functor(x0,x1,x2)->To.Outcometree.Omty_functor(x0,(copy_optioncopy_out_module_typex1),(copy_out_module_typex2))|From.Outcometree.Omty_identx0->To.Outcometree.Omty_ident(copy_out_identx0)|From.Outcometree.Omty_signaturex0->To.Outcometree.Omty_signature(List.mapcopy_out_sig_itemx0)|From.Outcometree.Omty_aliasx0->To.Outcometree.Omty_alias(copy_out_identx0)andcopy_out_ext_status:From.Outcometree.out_ext_status->To.Outcometree.out_ext_status=function|From.Outcometree.Oext_first->To.Outcometree.Oext_first|From.Outcometree.Oext_next->To.Outcometree.Oext_next|From.Outcometree.Oext_exception->To.Outcometree.Oext_exceptionandcopy_out_extension_constructor:From.Outcometree.out_extension_constructor->To.Outcometree.out_extension_constructor=fun{From.Outcometree.oext_name=oext_name;From.Outcometree.oext_type_name=oext_type_name;From.Outcometree.oext_type_params=oext_type_params;From.Outcometree.oext_args=oext_args;From.Outcometree.oext_ret_type=oext_ret_type;From.Outcometree.oext_private=oext_private}->{To.Outcometree.oext_name=oext_name;To.Outcometree.oext_type_name=oext_type_name;To.Outcometree.oext_type_params=(List.map(funx->x)oext_type_params);To.Outcometree.oext_args=(List.mapcopy_out_typeoext_args);To.Outcometree.oext_ret_type=(copy_optioncopy_out_typeoext_ret_type);To.Outcometree.oext_private=(copy_From_Asttypes_private_flagoext_private)}andcopy_From_Asttypes_private_flag:From.Asttypes.private_flag->To.Asttypes.private_flag=function|From.Asttypes.Private->To.Asttypes.Private|From.Asttypes.Public->To.Asttypes.Publicandcopy_out_rec_status:From.Outcometree.out_rec_status->To.Outcometree.out_rec_status=function|From.Outcometree.Orec_not->To.Outcometree.Orec_not|From.Outcometree.Orec_first->To.Outcometree.Orec_first|From.Outcometree.Orec_next->To.Outcometree.Orec_nextandcopy_out_class_type:From.Outcometree.out_class_type->To.Outcometree.out_class_type=function|From.Outcometree.Octy_constr(x0,x1)->To.Outcometree.Octy_constr((copy_out_identx0),(List.mapcopy_out_typex1))|From.Outcometree.Octy_arrow(x0,x1,x2)->To.Outcometree.Octy_arrow(x0,(copy_out_typex1),(copy_out_class_typex2))|From.Outcometree.Octy_signature(x0,x1)->To.Outcometree.Octy_signature((copy_optioncopy_out_typex0),(List.mapcopy_out_class_sig_itemx1))andcopy_out_class_sig_item:From.Outcometree.out_class_sig_item->To.Outcometree.out_class_sig_item=function|From.Outcometree.Ocsg_constraint(x0,x1)->To.Outcometree.Ocsg_constraint((copy_out_typex0),(copy_out_typex1))|From.Outcometree.Ocsg_method(x0,x1,x2,x3)->To.Outcometree.Ocsg_method(x0,(copy_boolx1),(copy_boolx2),(copy_out_typex3))|From.Outcometree.Ocsg_value(x0,x1,x2,x3)->To.Outcometree.Ocsg_value(x0,(copy_boolx1),(copy_boolx2),(copy_out_typex3))andcopy_out_type:From.Outcometree.out_type->To.Outcometree.out_type=function|From.Outcometree.Otyp_abstract->To.Outcometree.Otyp_abstract|From.Outcometree.Otyp_open->To.Outcometree.Otyp_open|From.Outcometree.Otyp_alias(x0,x1)->To.Outcometree.Otyp_alias((copy_out_typex0),x1)|From.Outcometree.Otyp_arrow(x0,x1,x2)->To.Outcometree.Otyp_arrow(x0,(copy_out_typex1),(copy_out_typex2))|From.Outcometree.Otyp_class(x0,x1,x2)->To.Outcometree.Otyp_class((copy_boolx0),(copy_out_identx1),(List.mapcopy_out_typex2))|From.Outcometree.Otyp_constr(x0,x1)->To.Outcometree.Otyp_constr((copy_out_identx0),(List.mapcopy_out_typex1))|From.Outcometree.Otyp_manifest(x0,x1)->To.Outcometree.Otyp_manifest((copy_out_typex0),(copy_out_typex1))|From.Outcometree.Otyp_object(x0,x1)->To.Outcometree.Otyp_object((List.map(funx->let(x0,x1)=xin(x0,(copy_out_typex1)))x0),(copy_optioncopy_boolx1))|From.Outcometree.Otyp_recordx0->To.Outcometree.Otyp_record(List.map(funx->let(x0,x1,x2)=xin(x0,(copy_boolx1),(copy_out_typex2)))x0)|From.Outcometree.Otyp_stuffx0->To.Outcometree.Otyp_stuffx0|From.Outcometree.Otyp_sumx0->To.Outcometree.Otyp_sum(List.map(funx->let(x0,x1,x2)=xin(x0,(List.mapcopy_out_typex1),(copy_optioncopy_out_typex2)))x0)|From.Outcometree.Otyp_tuplex0->To.Outcometree.Otyp_tuple(List.mapcopy_out_typex0)|From.Outcometree.Otyp_var(x0,x1)->To.Outcometree.Otyp_var((copy_boolx0),x1)|From.Outcometree.Otyp_variant(x0,x1,x2,x3)->To.Outcometree.Otyp_variant((copy_boolx0),(copy_out_variantx1),(copy_boolx2),(copy_option(funx->List.map(funx->x)x)x3))|From.Outcometree.Otyp_poly(x0,x1)->To.Outcometree.Otyp_poly((List.map(funx->x)x0),(copy_out_typex1))|From.Outcometree.Otyp_module(x0,x1,x2)->To.Outcometree.Otyp_module(x0,(List.map(funx->x)x1),(List.mapcopy_out_typex2))|From.Outcometree.Otyp_attribute(x0,x1)->To.Outcometree.Otyp_attribute((copy_out_typex0),(copy_out_attributex1))andcopy_out_attribute:From.Outcometree.out_attribute->To.Outcometree.out_attribute=fun{From.Outcometree.oattr_name=oattr_name}->{To.Outcometree.oattr_name=oattr_name}andcopy_out_variant:From.Outcometree.out_variant->To.Outcometree.out_variant=function|From.Outcometree.Ovar_fieldsx0->To.Outcometree.Ovar_fields(List.map(funx->let(x0,x1,x2)=xin(x0,(copy_boolx1),(List.mapcopy_out_typex2)))x0)|From.Outcometree.Ovar_name(x0,x1)->To.Outcometree.Ovar_name((copy_out_identx0),(List.mapcopy_out_typex1))andcopy_out_value:From.Outcometree.out_value->To.Outcometree.out_value=function|From.Outcometree.Oval_arrayx0->To.Outcometree.Oval_array(List.mapcopy_out_valuex0)|From.Outcometree.Oval_charx0->To.Outcometree.Oval_charx0|From.Outcometree.Oval_constr(x0,x1)->To.Outcometree.Oval_constr((copy_out_identx0),(List.mapcopy_out_valuex1))|From.Outcometree.Oval_ellipsis->To.Outcometree.Oval_ellipsis|From.Outcometree.Oval_floatx0->To.Outcometree.Oval_float(copy_floatx0)|From.Outcometree.Oval_intx0->To.Outcometree.Oval_intx0|From.Outcometree.Oval_int32x0->To.Outcometree.Oval_int32x0|From.Outcometree.Oval_int64x0->To.Outcometree.Oval_int64x0|From.Outcometree.Oval_nativeintx0->To.Outcometree.Oval_nativeintx0|From.Outcometree.Oval_listx0->To.Outcometree.Oval_list(List.mapcopy_out_valuex0)|From.Outcometree.Oval_printerx0->To.Outcometree.Oval_printerx0|From.Outcometree.Oval_recordx0->To.Outcometree.Oval_record(List.map(funx->let(x0,x1)=xin((copy_out_identx0),(copy_out_valuex1)))x0)|From.Outcometree.Oval_stringx0->To.Outcometree.Oval_stringx0|From.Outcometree.Oval_stuffx0->To.Outcometree.Oval_stuffx0|From.Outcometree.Oval_tuplex0->To.Outcometree.Oval_tuple(List.mapcopy_out_valuex0)|From.Outcometree.Oval_variant(x0,x1)->To.Outcometree.Oval_variant(x0,(copy_optioncopy_out_valuex1))andcopy_float:float->float=funx->xandcopy_out_ident:From.Outcometree.out_ident->To.Outcometree.out_ident=function|From.Outcometree.Oide_apply(x0,x1)->To.Outcometree.Oide_apply((copy_out_identx0),(copy_out_identx1))|From.Outcometree.Oide_dot(x0,x1)->To.Outcometree.Oide_dot((copy_out_identx0),x1)|From.Outcometree.Oide_identx0->To.Outcometree.Oide_identx0letreccopy_toplevel_phrase:From.Parsetree.toplevel_phrase->To.Parsetree.toplevel_phrase=function|From.Parsetree.Ptop_defx0->To.Parsetree.Ptop_def(copy_structurex0)|From.Parsetree.Ptop_dir(x0,x1)->To.Parsetree.Ptop_dir(x0,(copy_directive_argumentx1))andcopy_directive_argument:From.Parsetree.directive_argument->To.Parsetree.directive_argument=function|From.Parsetree.Pdir_none->To.Parsetree.Pdir_none|From.Parsetree.Pdir_stringx0->To.Parsetree.Pdir_stringx0|From.Parsetree.Pdir_int(x0,x1)->To.Parsetree.Pdir_int(x0,(copy_option(funx->x)x1))|From.Parsetree.Pdir_identx0->To.Parsetree.Pdir_ident(copy_longidentx0)|From.Parsetree.Pdir_boolx0->To.Parsetree.Pdir_bool(copy_boolx0)letcopy_out_type_extension:From.Outcometree.out_type_extension->To.Outcometree.out_type_extension=fun{From.Outcometree.otyext_name=otyext_name;From.Outcometree.otyext_params=otyext_params;From.Outcometree.otyext_constructors=otyext_constructors;From.Outcometree.otyext_private=otyext_private}->{To.Outcometree.otyext_name=otyext_name;To.Outcometree.otyext_params=(List.map(funx->x)otyext_params);To.Outcometree.otyext_constructors=(List.map(funx->let(x0,x1,x2)=xin(x0,(List.mapcopy_out_typex1),(copy_optioncopy_out_typex2)))otyext_constructors);To.Outcometree.otyext_private=(copy_private_flagotyext_private)}letcopy_casesx=List.mapcopy_casexletcopy_pat=copy_patternletcopy_expr=copy_expressionletcopy_typ=copy_core_type