123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210(**************************************************************************)(* *)(* OCaml Migrate Parsetree *)(* *)(* Frédéric Bour, Facebook *)(* Jérémie Dimino and Leo White, Jane Street Europe *)(* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)(* Alain Frisch, LexiFi *)(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)(* *)(* Copyright 2018 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. *)(* *)(**************************************************************************)moduleLocation=LocationmoduleLongident=Longident[@@@warning "-9"]moduleAsttypes=structtypeconstant(*IF_CURRENT = Asttypes.constant *)=Const_intofint|Const_charofchar|Const_stringofstring*Location.t*stringoption|Const_float ofstring|Const_int32 ofint32|Const_int64 ofint64|Const_nativeint ofnativeinttyperec_flag(*IF_CURRENT = Asttypes.rec_flag *) =Nonrecursive|Recursivetypedirection_flag(*IF_CURRENT = Asttypes.direction_flag *) =Upto|Downto(* Order matters, used inpolymorphic comparison *)typeprivate_flag(*IF_CURRENT = Asttypes.private_flag *)=Private|Publictypemutable_flag(*IF_CURRENT = Asttypes.mutable_flag *)=Immutable|Mutabletypevirtual_flag(*IF_CURRENT = Asttypes.virtual_flag *)=Virtual|Concretetypeoverride_flag(*IF_CURRENT = Asttypes.override_flag *)=Override|Freshtypeclosed_flag(*IF_CURRENT = Asttypes.closed_flag *)=Closed|Opentypelabel=stringtypearg_label(*IF_CURRENT = Asttypes.arg_label *)=Nolabel|Labelledofstring(* label:T -> ... *)|Optionalofstring(* ?label:T -> ... *)type'aloc='aLocation.loc={txt:'a;loc:Location.t;}typevariance(*IF_CURRENT = Asttypes.variance *) =|Covariant|Contravariant|InvariantendmoduleType_immediacy=structtypet(*IF_CURRENT = Type_immediacy.t *)=|Unknown|Always|Always_on_64bitsendmoduleOutcometree=struct(* Module [Outcometree]: results displayed by the toplevel *)(* These types represent messages that the toplevel displays as normal
results or errors. The real displaying is customisable using the hooks:
[Toploop.print_out_value]
[Toploop.print_out_type]
[Toploop.print_out_sig_item]
[Toploop.print_out_phrase] *)(** An [out_name] is a string representation of an identifier which can be
rewritten on the fly to avoid name collisions *)typeout_name(*IF_CURRENT = Outcometree.out_name *)={mutableprinted_name:string}typeout_ident(*IF_CURRENT = Outcometree.out_ident *)=|Oide_applyofout_ident*out_ident|Oide_dotofout_ident*string|Oide_identofout_nametypeout_string(*IF_CURRENT = Outcometree.out_string *)=|Ostr_string|Ostr_bytestypeout_attribute (*IF_CURRENT = Outcometree.out_attribute *)={oattr_name:string}typeout_value(*IF_CURRENT = Outcometree.out_value *)=|Oval_arrayofout_valuelist|Oval_charofchar|Oval_constr ofout_ident*out_valuelist|Oval_ellipsis|Oval_float offloat|Oval_intofint|Oval_int32ofint32|Oval_int64ofint64|Oval_nativeint ofnativeint|Oval_listofout_valuelist|Oval_printerof(Format.formatter ->unit)|Oval_recordof(out_ident*out_value)list|Oval_stringofstring*int*out_string (* string, size-to-print, kind *)|Oval_stuffofstring|Oval_tupleofout_valuelist|Oval_variantofstring*out_valueoptiontypeout_type(*IF_CURRENT = Outcometree.out_type *)=|Otyp_abstract|Otyp_open|Otyp_aliasofout_type *string|Otyp_arrowofstring*out_type*out_type|Otyp_classofbool*out_ident*out_typelist|Otyp_constr ofout_ident*out_typelist|Otyp_manifestofout_type*out_type|Otyp_objectof(string *out_type)list*booloption|Otyp_recordof(string *bool*out_type)list|Otyp_stuffofstring|Otyp_sum of(string*out_typelist*out_typeoption)list|Otyp_tuple ofout_type list|Otyp_varofbool*string|Otyp_variantofbool*out_variant*bool*(stringlist)option|Otyp_polyofstring list *out_type|Otyp_moduleofout_ident*string list*out_typelist|Otyp_attributeofout_type*out_attributeandout_variant(*IF_CURRENT = Outcometree.out_variant *) =|Ovar_fieldsof(string*bool*out_typelist)list|Ovar_typ ofout_typetype out_class_type (*IF_CURRENT = Outcometree.out_class_type *) =|Octy_constrofout_ident*out_typelist|Octy_arrowofstring*out_type*out_class_type|Octy_signature ofout_typeoption *out_class_sig_itemlistandout_class_sig_item(*IF_CURRENT = Outcometree.out_class_sig_item *) =|Ocsg_constraintofout_type*out_type|Ocsg_methodofstring *bool*bool*out_type|Ocsg_valueofstring*bool*bool *out_typetypeout_module_type(*IF_CURRENT = Outcometree.out_module_type *) =|Omty_abstract|Omty_functorof(stringoption*out_module_type)option*out_module_type|Omty_identofout_ident|Omty_signatureofout_sig_itemlist|Omty_aliasofout_identandout_sig_item (*IF_CURRENT = Outcometree.out_sig_item *) =|Osig_classofbool*string*(string*(bool*bool))list *out_class_type *out_rec_status|Osig_class_type ofbool*string*(string*(bool*bool))list *out_class_type *out_rec_status|Osig_typext ofout_extension_constructor*out_ext_status|Osig_modtypeofstring*out_module_type|Osig_moduleofstring*out_module_type*out_rec_status|Osig_typeofout_type_decl *out_rec_status|Osig_valueofout_val_decl|Osig_ellipsisandout_type_decl (*IF_CURRENT = Outcometree.out_type_decl *) ={otype_name:string;otype_params:(string*(bool*bool))list;otype_type:out_type;otype_private:Asttypes.private_flag;otype_immediate:Type_immediacy.t;otype_unboxed:bool;otype_cstrs:(out_type*out_type)list}andout_extension_constructor(*IF_CURRENT = Outcometree.out_extension_constructor *) ={oext_name:string;oext_type_name:string;oext_type_params:stringlist;oext_args:out_typelist;oext_ret_type:out_typeoption;oext_private:Asttypes.private_flag}andout_type_extension(*IF_CURRENT = Outcometree.out_type_extension *) ={otyext_name:string;otyext_params:stringlist;otyext_constructors:(string *out_typelist*out_typeoption)list;otyext_private:Asttypes.private_flag}andout_val_decl(*IF_CURRENT = Outcometree.out_val_decl *) ={oval_name:string;oval_type:out_type;oval_prims:stringlist;oval_attributes:out_attributelist}andout_rec_status(*IF_CURRENT = Outcometree.out_rec_status *) =|Orec_not|Orec_first|Orec_nextandout_ext_status(*IF_CURRENT = Outcometree.out_ext_status *) =|Oext_first|Oext_next|Oext_exceptiontypeout_phrase(*IF_CURRENT = Outcometree.out_phrase *) =|Ophr_evalofout_value*out_type|Ophr_signatureof(out_sig_item*out_valueoption)list|Ophr_exception of(exn*out_value)end