From 1ce0549af1bd526453217ab665cdebda6061f938 Mon Sep 17 00:00:00 2001 From: c-cube Date: Mon, 15 Sep 2025 14:25:35 +0000 Subject: [PATCH] deploy: 9a77dad2fdab7012e34913cdd511ff119d452003 --- fonts/fira-mono-v14-latin-500.woff2 | Bin 0 -> 16148 bytes fonts/fira-mono-v14-latin-regular.woff2 | Bin 0 -> 16284 bytes fonts/fira-sans-v17-latin-500.woff2 | Bin 0 -> 24020 bytes fonts/fira-sans-v17-latin-500italic.woff2 | Bin 0 -> 24896 bytes fonts/fira-sans-v17-latin-700.woff2 | Bin 0 -> 24964 bytes fonts/fira-sans-v17-latin-700italic.woff2 | Bin 0 -> 26072 bytes fonts/fira-sans-v17-latin-italic.woff2 | Bin 0 -> 24936 bytes fonts/fira-sans-v17-latin-regular.woff2 | Bin 0 -> 23880 bytes fonts/noticia-text-v15-latin-700.woff2 | Bin 0 -> 21972 bytes fonts/noticia-text-v15-latin-italic.woff2 | Bin 0 -> 17356 bytes fonts/noticia-text-v15-latin-regular.woff2 | Bin 0 -> 22308 bytes highlight.pack.js | 373 ++++-- mtime/Mtime/Span/index.html | 2 +- mtime/Mtime/index.html | 2 +- mtime/Mtime_clock/index.html | 2 +- mtime/Mtime_top/index.html | 2 + mtime/index.html | 2 +- ocaml-compiler-libs/Ocaml_bytecomp/index.html | 2 +- ocaml-compiler-libs/Ocaml_common/index.html | 2 +- ocaml-compiler-libs/Ocaml_optcomp/index.html | 2 +- .../Do_not_use_directly/index.html | 2 +- ocaml-compiler-libs/Ocaml_shadow/index.html | 2 +- ocaml-compiler-libs/Ocaml_toplevel/index.html | 2 +- ocaml-compiler-libs/index.html | 2 +- ocaml/Afl_instrument/index.html | 4 +- ocaml/Alias_analysis/index.html | 6 +- ocaml/Allocated_const/index.html | 2 +- ocaml/Annot/index.html | 2 +- ocaml/Arch/index.html | 4 +- .../Make/argument-1-S/Key/Map/index.html | 6 +- .../Make/argument-1-S/Key/index.html | 2 +- .../Make/argument-1-S/Value/index.html | 2 +- ocaml/Arg_helper/Make/argument-1-S/index.html | 2 +- ocaml/Arg_helper/Make/index.html | 2 +- ocaml/Arg_helper/index.html | 2 +- ocaml/Asmgen/index.html | 30 +- ocaml/Asmlibrarian/index.html | 2 +- ocaml/Asmlink/index.html | 6 +- ocaml/Asmpackager/index.html | 8 +- ocaml/Ast_helper/Attr/index.html | 2 +- ocaml/Ast_helper/Cf/index.html | 36 +- ocaml/Ast_helper/Ci/index.html | 16 +- ocaml/Ast_helper/Cl/index.html | 40 +- ocaml/Ast_helper/Const/index.html | 8 +- ocaml/Ast_helper/Csig/index.html | 4 +- ocaml/Ast_helper/Cstr/index.html | 4 +- ocaml/Ast_helper/Ctf/index.html | 30 +- ocaml/Ast_helper/Cty/index.html | 28 +- ocaml/Ast_helper/Exp/index.html | 152 +-- ocaml/Ast_helper/Incl/index.html | 10 +- ocaml/Ast_helper/Mb/index.html | 12 +- ocaml/Ast_helper/Md/index.html | 12 +- ocaml/Ast_helper/Mod/index.html | 38 +- ocaml/Ast_helper/Ms/index.html | 12 +- ocaml/Ast_helper/Mtd/index.html | 14 +- ocaml/Ast_helper/Mty/index.html | 30 +- ocaml/Ast_helper/Of/index.html | 12 +- ocaml/Ast_helper/Opn/index.html | 12 +- ocaml/Ast_helper/Pat/index.html | 64 +- ocaml/Ast_helper/Rf/index.html | 12 +- ocaml/Ast_helper/Sig/index.html | 34 +- ocaml/Ast_helper/Str/index.html | 36 +- ocaml/Ast_helper/Te/index.html | 50 +- ocaml/Ast_helper/Typ/index.html | 50 +- ocaml/Ast_helper/Type/index.html | 42 +- ocaml/Ast_helper/Val/index.html | 12 +- ocaml/Ast_helper/Vb/index.html | 14 +- ocaml/Ast_helper/index.html | 2 +- ocaml/Ast_invariants/index.html | 2 +- ocaml/Ast_iterator/index.html | 4 +- ocaml/Ast_mapper/index.html | 16 +- ocaml/Asttypes/index.html | 2 +- ocaml/Attr_helper/index.html | 4 +- .../Definition/index.html | 2 +- .../Make/argument-1-_/index.html | 8 +- .../Augment_specialised_args/Make/index.html | 18 +- .../What_to_specialise/index.html | 10 +- ocaml/Augment_specialised_args/index.html | 2 +- .../module-type-S/index.html | 8 +- ocaml/Backend_intf/index.html | 2 +- ocaml/Backend_intf/module-type-S/index.html | 2 +- ocaml/Backend_var/Provenance/index.html | 10 +- ocaml/Backend_var/With_provenance/index.html | 2 +- ocaml/Backend_var/index.html | 2 +- ocaml/Binutils/index.html | 2 +- .../Make/argument-1-T/Cond_branch/index.html | 2 +- .../Make/argument-1-T/index.html | 8 +- ocaml/Branch_relaxation/Make/index.html | 2 +- ocaml/Branch_relaxation/index.html | 2 +- ocaml/Branch_relaxation_intf/index.html | 2 +- .../module-type-S/Cond_branch/index.html | 2 +- .../module-type-S/index.html | 8 +- ocaml/Btype/For_copy/index.html | 2 +- ocaml/Btype/TransientTypeMap/index.html | 6 +- ocaml/Btype/TypeHash/index.html | 2 +- ocaml/Btype/TypeMap/index.html | 6 +- ocaml/Btype/TypePairs/index.html | 2 +- ocaml/Btype/TypeSet/index.html | 3 +- ocaml/Btype/index.html | 8 +- ocaml/Build_export_info/index.html | 6 +- ocaml/Build_path_prefix_map/index.html | 2 +- ocaml/Builtin_attributes/index.html | 16 +- ocaml/Bytegen/index.html | 4 +- ocaml/Bytelibrarian/index.html | 2 +- ocaml/Bytelink/Dep/index.html | 2 +- ocaml/Bytelink/DepSet/index.html | 3 +- ocaml/Bytelink/index.html | 2 +- ocaml/Bytepackager/index.html | 6 +- ocaml/Bytesections/Name/index.html | 2 +- ocaml/Bytesections/index.html | 2 +- ocaml/CSE/index.html | 2 +- ocaml/CSEgen/class-cse_generic/index.html | 2 +- ocaml/CSEgen/index.html | 2 +- ocaml/CamlinternalFormat/index.html | 6 +- ocaml/CamlinternalFormatBasics/index.html | 4 +- ocaml/CamlinternalLazy/index.html | 2 +- .../Convert/Simplified/index.html | 4 +- .../CamlinternalMenhirLib/Convert/index.html | 4 +- .../Engine/Make/argument-1-T/Log/index.html | 4 +- .../Engine/Make/argument-1-T/index.html | 4 +- .../Engine/Make/index.html | 8 +- ocaml/CamlinternalMenhirLib/Engine/index.html | 4 +- .../EngineTypes/index.html | 2 +- .../EngineTypes/module-type-ENGINE/index.html | 8 +- .../index.html | 2 +- .../module-type-MONOLITHIC_ENGINE/index.html | 4 +- .../module-type-TABLE/Log/index.html | 4 +- .../EngineTypes/module-type-TABLE/index.html | 4 +- .../ErrorReports/index.html | 4 +- .../CamlinternalMenhirLib/General/index.html | 2 +- .../IncrementalEngine/index.html | 2 +- .../module-type-EVERYTHING/index.html | 6 +- .../module-type-INCREMENTAL_ENGINE/index.html | 6 +- .../module-type-INSPECTION/index.html | 2 +- .../module-type-SYMBOLS/index.html | 2 +- .../InfiniteArray/index.html | 2 +- .../InspectionTableFormat/index.html | 2 +- .../module-type-TABLES/index.html | 2 +- .../Make/argument-1-TT/index.html | 4 +- .../Make/argument-2-IT/index.html | 2 +- .../Make/argument-3-ET/Log/index.html | 4 +- .../Make/argument-3-ET/index.html | 4 +- .../Make/argument-4-E/index.html | 2 +- .../Make/index.html | 4 +- .../Symbols/argument-1-T/index.html | 2 +- .../Symbols/index.html | 2 +- .../InspectionTableInterpreter/index.html | 4 +- .../LexerUtil/index.html | 2 +- .../LinearizedArray/index.html | 2 +- .../PackedIntArray/index.html | 2 +- .../Printers/Make/argument-1-I/index.html | 8 +- .../Printers/Make/argument-2-User/index.html | 2 +- .../Printers/Make/index.html | 2 +- .../CamlinternalMenhirLib/Printers/index.html | 4 +- .../RowDisplacement/index.html | 4 +- .../StaticVersion/index.html | 2 +- .../TableFormat/index.html | 2 +- .../TableFormat/module-type-TABLES/index.html | 4 +- .../MakeEngineTable/Log/index.html | 4 +- .../MakeEngineTable/argument-1-T/index.html | 4 +- .../MakeEngineTable/index.html | 4 +- .../TableInterpreter/index.html | 4 +- ocaml/CamlinternalMenhirLib/index.html | 2 +- ocaml/CamlinternalMod/index.html | 2 +- ocaml/CamlinternalOO/index.html | 4 +- ocaml/Ccomp/index.html | 10 +- ocaml/Clambda/index.html | 4 +- ocaml/Clambda_primitives/index.html | 2 +- ocaml/Clflags/Compiler_pass/index.html | 2 +- ocaml/Clflags/Float_arg_helper/index.html | 2 +- ocaml/Clflags/Int_arg_helper/index.html | 2 +- ocaml/Clflags/index.html | 2 +- ocaml/Closure/index.html | 8 +- ocaml/Closure_conversion/index.html | 10 +- ocaml/Closure_conversion_aux/Env/index.html | 2 +- .../Function_decls/Function_decl/index.html | 18 +- .../Function_decls/index.html | 2 +- ocaml/Closure_conversion_aux/index.html | 2 +- ocaml/Closure_element/Map/index.html | 10 +- ocaml/Closure_element/Set/index.html | 2 +- ocaml/Closure_element/T/index.html | 2 +- ocaml/Closure_element/Tbl/index.html | 2 +- ocaml/Closure_element/index.html | 2 +- ocaml/Closure_id/Map/index.html | 10 +- ocaml/Closure_id/Set/index.html | 2 +- ocaml/Closure_id/T/index.html | 2 +- ocaml/Closure_id/Tbl/index.html | 2 +- ocaml/Closure_id/index.html | 2 +- ocaml/Closure_middle_end/index.html | 10 +- ocaml/Closure_offsets/index.html | 2 +- ocaml/Closure_origin/Map/index.html | 10 +- ocaml/Closure_origin/Set/index.html | 2 +- ocaml/Closure_origin/T/index.html | 2 +- ocaml/Closure_origin/Tbl/index.html | 2 +- ocaml/Closure_origin/index.html | 2 +- ocaml/Cmi_format/index.html | 2 +- ocaml/Cmm/index.html | 4 +- ocaml/Cmm_helpers/index.html | 14 +- ocaml/Cmm_invariants/index.html | 2 +- ocaml/Cmmgen/index.html | 4 +- ocaml/Cmmgen_state/index.html | 2 +- ocaml/Cmo_format/index.html | 2 +- ocaml/Cmt2annot/index.html | 8 +- ocaml/Cmt_format/index.html | 4 +- ocaml/Cmx_format/index.html | 2 +- ocaml/Cmxs_format/index.html | 2 +- ocaml/Coloring/index.html | 2 +- ocaml/Comballoc/index.html | 2 +- ocaml/Compenv/index.html | 16 +- ocaml/Compilation_unit/Map/index.html | 10 +- ocaml/Compilation_unit/Set/index.html | 2 +- ocaml/Compilation_unit/T/index.html | 2 +- ocaml/Compilation_unit/Tbl/index.html | 2 +- ocaml/Compilation_unit/index.html | 2 +- ocaml/Compile/index.html | 10 +- ocaml/Compile_common/index.html | 16 +- ocaml/Compilenv/index.html | 8 +- ocaml/Compmisc/index.html | 8 +- ocaml/Compression/index.html | 2 +- ocaml/Config/index.html | 2 +- ocaml/Config_boot/index.html | 2 +- ocaml/Config_main/index.html | 2 +- .../argument-1-Module_name/Map/index.html | 6 +- .../argument-1-Module_name/Set/index.html | 3 +- .../argument-1-Module_name/Tbl/index.html | 2 +- .../Make/argument-1-Module_name/index.html | 2 +- ocaml/Consistbl/Make/index.html | 4 +- ocaml/Consistbl/index.html | 2 +- ocaml/Convert_primitives/index.html | 2 +- ocaml/Ctype/index.html | 50 +- .../Dataflow/Backward/argument-1-D/index.html | 2 +- ocaml/Dataflow/Backward/index.html | 10 +- ocaml/Dataflow/index.html | 2 +- ocaml/Dataflow/module-type-DOMAIN/index.html | 2 +- ocaml/Datarepr/index.html | 8 +- ocaml/Deadcode/index.html | 2 +- ocaml/Debuginfo/Scoped_location/index.html | 2 +- ocaml/Debuginfo/index.html | 2 +- ocaml/Depend/index.html | 2 +- .../Left_variadic/argument-1-_/index.html | 2 +- ocaml/Diffing/Define/Left_variadic/index.html | 2 +- .../Right_variadic/argument-1-_/index.html | 2 +- .../Diffing/Define/Right_variadic/index.html | 2 +- .../Define/Simple/argument-1-_/index.html | 2 +- ocaml/Diffing/Define/Simple/index.html | 2 +- ocaml/Diffing/Define/argument-1-D/index.html | 2 +- ocaml/Diffing/Define/index.html | 4 +- .../Define/module-type-Parameters/index.html | 2 +- ocaml/Diffing/Define/module-type-S/index.html | 2 +- ocaml/Diffing/index.html | 2 +- ocaml/Diffing/module-type-Defs/index.html | 2 +- .../Define/Simple/argument-1-_/index.html | 2 +- .../Define/Simple/index.html | 2 +- .../Define/argument-1-D/index.html | 2 +- ocaml/Diffing_with_keys/Define/index.html | 2 +- .../Define/module-type-Parameters/index.html | 2 +- ocaml/Diffing_with_keys/index.html | 2 +- ocaml/Dll/index.html | 2 +- ocaml/Docstrings/WithMenhir/index.html | 4 +- ocaml/Docstrings/index.html | 4 +- ocaml/Domainstate/index.html | 2 +- ocaml/Dynlink/index.html | 2 +- ocaml/Effect_analysis/index.html | 2 +- ocaml/Emit/index.html | 2 +- ocaml/Emitaux/index.html | 22 +- ocaml/Emitcode/index.html | 10 +- ocaml/Emitenv/index.html | 2 +- ocaml/Env/index.html | 156 +-- ocaml/Envaux/index.html | 2 +- ocaml/Errors/index.html | 2 +- ocaml/Errortrace/Subtype/index.html | 8 +- ocaml/Errortrace/index.html | 16 +- ocaml/Event/index.html | 2 +- ocaml/Export_id/Map/index.html | 10 +- ocaml/Export_id/Set/index.html | 2 +- ocaml/Export_id/T/index.html | 2 +- ocaml/Export_id/Tbl/index.html | 2 +- ocaml/Export_id/index.html | 2 +- ocaml/Export_info/index.html | 54 +- ocaml/Export_info_for_pack/index.html | 8 +- ocaml/Expunge/index.html | 2 +- ocaml/Extract_projections/index.html | 10 +- ocaml/Find_recursive_functions/index.html | 8 +- .../Constant_defining_value/Map/index.html | 10 +- .../Constant_defining_value/Set/index.html | 2 +- .../Constant_defining_value/T/index.html | 2 +- .../Constant_defining_value/Tbl/index.html | 2 +- .../Constant_defining_value/index.html | 2 +- ocaml/Flambda/With_free_variables/index.html | 2 +- ocaml/Flambda/index.html | 112 +- ocaml/Flambda_invariants/index.html | 2 +- ocaml/Flambda_iterators/index.html | 50 +- ocaml/Flambda_middle_end/index.html | 10 +- ocaml/Flambda_to_clambda/index.html | 6 +- ocaml/Flambda_utils/Switch_storer/index.html | 2 +- ocaml/Flambda_utils/index.html | 30 +- ocaml/Freshening/Project_var/index.html | 8 +- ocaml/Freshening/index.html | 16 +- .../Genprintval/Make/argument-1-O/index.html | 2 +- .../Genprintval/Make/argument-2-_/index.html | 2 +- ocaml/Genprintval/Make/index.html | 4 +- ocaml/Genprintval/index.html | 2 +- .../module-type-EVALPATH/index.html | 2 +- ocaml/Genprintval/module-type-OBJ/index.html | 2 +- ocaml/Genprintval/module-type-S/index.html | 4 +- ocaml/Id_types/Id/index.html | 2 +- ocaml/Id_types/UnitId/argument-1-_/index.html | 2 +- .../argument-2-Compilation_unit/index.html | 2 +- ocaml/Id_types/UnitId/index.html | 2 +- ocaml/Id_types/index.html | 4 +- ocaml/Id_types/module-type-BaseId/index.html | 2 +- ocaml/Id_types/module-type-Id/index.html | 2 +- .../Compilation_unit/index.html | 2 +- ocaml/Id_types/module-type-UnitId/index.html | 2 +- ocaml/Ident/Map/index.html | 10 +- ocaml/Ident/Set/index.html | 2 +- ocaml/Ident/T/index.html | 2 +- ocaml/Ident/Tbl/index.html | 2 +- ocaml/Ident/index.html | 2 +- ocaml/Identifiable/Make/Map/index.html | 10 +- ocaml/Identifiable/Make/Set/index.html | 2 +- ocaml/Identifiable/Make/T/index.html | 2 +- ocaml/Identifiable/Make/Tbl/index.html | 2 +- .../Identifiable/Make/argument-1-T/index.html | 2 +- ocaml/Identifiable/Make/index.html | 2 +- .../Identifiable/Pair/argument-1-A/index.html | 2 +- .../Identifiable/Pair/argument-2-B/index.html | 2 +- ocaml/Identifiable/Pair/index.html | 2 +- ocaml/Identifiable/index.html | 2 +- .../Identifiable/module-type-Map/T/index.html | 2 +- ocaml/Identifiable/module-type-Map/index.html | 10 +- .../Identifiable/module-type-S/Map/index.html | 10 +- .../Identifiable/module-type-S/Set/index.html | 2 +- ocaml/Identifiable/module-type-S/T/index.html | 2 +- .../Identifiable/module-type-S/Tbl/index.html | 2 +- ocaml/Identifiable/module-type-S/index.html | 2 +- .../Identifiable/module-type-Set/T/index.html | 2 +- ocaml/Identifiable/module-type-Set/index.html | 2 +- .../Identifiable/module-type-Tbl/T/index.html | 2 +- ocaml/Identifiable/module-type-Tbl/index.html | 2 +- .../Identifiable/module-type-Thing/index.html | 2 +- ocaml/Import_approx/index.html | 2 +- ocaml/Includeclass/index.html | 6 +- ocaml/Includecore/index.html | 16 +- ocaml/Includemod/Error/index.html | 6 +- ocaml/Includemod/FieldMap/index.html | 6 +- .../Functor_app_diff/Defs/index.html | 2 +- ocaml/Includemod/Functor_app_diff/index.html | 8 +- .../Functor_inclusion_diff/Defs/index.html | 2 +- .../Functor_inclusion_diff/index.html | 4 +- ocaml/Includemod/index.html | 34 +- ocaml/Includemod_errorprinter/index.html | 2 +- ocaml/Inconstant_idents/index.html | 8 +- .../index.html | 4 +- ocaml/Inline_and_simplify/index.html | 22 +- ocaml/Inline_and_simplify_aux/Env/index.html | 28 +- .../Inline_and_simplify_aux/Result/index.html | 4 +- ocaml/Inline_and_simplify_aux/index.html | 30 +- ocaml/Inlining_cost/Benefit/index.html | 2 +- ocaml/Inlining_cost/Threshold/index.html | 2 +- .../Whether_sufficient_benefit/index.html | 32 +- ocaml/Inlining_cost/index.html | 8 +- ocaml/Inlining_decision/index.html | 30 +- ocaml/Inlining_decision_intf/index.html | 38 +- ocaml/Inlining_stats/Closure_stack/index.html | 8 +- ocaml/Inlining_stats/index.html | 6 +- .../Inlining_stats_types/Decision/index.html | 2 +- ocaml/Inlining_stats_types/Inlined/index.html | 4 +- .../Not_inlined/index.html | 4 +- .../Not_specialised/index.html | 4 +- .../Inlining_stats_types/Prevented/index.html | 2 +- .../Specialised/index.html | 4 +- ocaml/Inlining_stats_types/index.html | 2 +- ocaml/Inlining_transforms/index.html | 59 +- ocaml/Instruct/index.html | 2 +- .../index.html | 2 +- ocaml/Interf/index.html | 2 +- ocaml/Internal_variable_names/index.html | 2 +- ocaml/Interval/index.html | 2 +- ocaml/Invariant_params/index.html | 10 +- ocaml/Lambda/index.html | 26 +- ocaml/Lazy_backtrack/index.html | 4 +- ocaml/Lexer/index.html | 4 +- ocaml/Lift_code/index.html | 10 +- ocaml/Lift_constants/index.html | 6 +- .../Lift_let_to_initialize_symbol/index.html | 6 +- ocaml/Linear/index.html | 4 +- ocaml/Linear_format/index.html | 2 +- ocaml/Linearize/index.html | 2 +- ocaml/Linkage_name/Map/index.html | 10 +- ocaml/Linkage_name/Set/index.html | 2 +- ocaml/Linkage_name/T/index.html | 2 +- ocaml/Linkage_name/Tbl/index.html | 2 +- ocaml/Linkage_name/index.html | 2 +- ocaml/Linscan/index.html | 2 +- ocaml/Liveness/index.html | 2 +- ocaml/Load_path/Dir/index.html | 2 +- ocaml/Load_path/index.html | 4 +- ocaml/Local_store/index.html | 2 +- ocaml/Location/index.html | 20 +- ocaml/Longident/index.html | 4 +- ocaml/Mach/index.html | 4 +- ocaml/Main/index.html | 2 +- ocaml/Main_args/Default/Main/index.html | 2 +- ocaml/Main_args/Default/Odoc_args/index.html | 2 +- ocaml/Main_args/Default/Optmain/index.html | 2 +- ocaml/Main_args/Default/Opttopmain/index.html | 2 +- ocaml/Main_args/Default/Topmain/index.html | 2 +- ocaml/Main_args/Default/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../Make_bytecomp_options/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../Main_args/Make_bytetop_options/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../Make_ocamldoc_options/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../Main_args/Make_optcomp_options/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../Main_args/Make_opttop_options/index.html | 2 +- ocaml/Main_args/index.html | 4 +- .../Main_args/module-type-Arg_list/index.html | 2 +- .../module-type-Bytecomp_options/index.html | 2 +- .../module-type-Bytetop_options/index.html | 2 +- .../module-type-Common_options/index.html | 2 +- .../module-type-Compiler_options/index.html | 2 +- .../module-type-Core_options/index.html | 2 +- .../module-type-Ocamldoc_options/index.html | 2 +- .../module-type-Optcommon_options/index.html | 2 +- .../module-type-Optcomp_options/index.html | 2 +- .../module-type-Opttop_options/index.html | 2 +- .../module-type-Toplevel_options/index.html | 2 +- ocaml/Maindriver/index.html | 2 +- ocaml/Makedepend/index.html | 2 +- ocaml/Matching/index.html | 14 +- ocaml/Meta/index.html | 4 +- ocaml/Misc/Color/index.html | 2 +- ocaml/Misc/Error_style/index.html | 2 +- ocaml/Misc/Int_literal_converter/index.html | 2 +- ocaml/Misc/LongString/index.html | 2 +- ocaml/Misc/Magic_number/index.html | 30 +- ocaml/Misc/Stdlib/Array/index.html | 2 +- ocaml/Misc/Stdlib/List/index.html | 10 +- ocaml/Misc/Stdlib/Option/index.html | 4 +- ocaml/Misc/Stdlib/String/Map/index.html | 6 +- ocaml/Misc/Stdlib/String/Set/index.html | 3 +- ocaml/Misc/Stdlib/String/Tbl/index.html | 2 +- ocaml/Misc/Stdlib/String/index.html | 3 +- ocaml/Misc/Stdlib/index.html | 2 +- ocaml/Misc/index.html | 49 +- ocaml/Mtype/index.html | 12 +- ocaml/Mutable_variable/Map/index.html | 10 +- ocaml/Mutable_variable/Set/index.html | 2 +- ocaml/Mutable_variable/T/index.html | 2 +- ocaml/Mutable_variable/Tbl/index.html | 2 +- ocaml/Mutable_variable/index.html | 8 +- ocaml/Numbers/Float/Map/index.html | 10 +- ocaml/Numbers/Float/Set/index.html | 2 +- ocaml/Numbers/Float/T/index.html | 2 +- ocaml/Numbers/Float/Tbl/index.html | 2 +- ocaml/Numbers/Float/index.html | 2 +- ocaml/Numbers/Int/Map/index.html | 10 +- ocaml/Numbers/Int/Set/index.html | 2 +- ocaml/Numbers/Int/T/index.html | 2 +- ocaml/Numbers/Int/Tbl/index.html | 2 +- ocaml/Numbers/Int/index.html | 2 +- ocaml/Numbers/Int16/index.html | 2 +- ocaml/Numbers/Int8/index.html | 2 +- ocaml/Numbers/index.html | 2 +- ocaml/Odoc/index.html | 2 +- ocaml/Odoc_analyse/index.html | 6 +- ocaml/Odoc_args/index.html | 2 +- .../Odoc_ast/Analyser/argument-1-_/index.html | 4 +- ocaml/Odoc_ast/Analyser/index.html | 4 +- ocaml/Odoc_ast/Typedtree_search/index.html | 4 +- ocaml/Odoc_ast/index.html | 2 +- ocaml/Odoc_class/index.html | 10 +- .../Basic_info_retriever/index.html | 4 +- ocaml/Odoc_comments/index.html | 4 +- .../module-type-Texter/index.html | 2 +- ocaml/Odoc_comments_global/index.html | 2 +- ocaml/Odoc_config/index.html | 2 +- ocaml/Odoc_cross/index.html | 4 +- ocaml/Odoc_dag2html/index.html | 4 +- ocaml/Odoc_dep/index.html | 6 +- ocaml/Odoc_dot/Generator/class-dot/index.html | 4 +- ocaml/Odoc_dot/Generator/index.html | 2 +- ocaml/Odoc_dot/index.html | 2 +- .../class-dot/index.html | 4 +- .../module-type-Dot_generator/index.html | 2 +- ocaml/Odoc_env/index.html | 2 +- ocaml/Odoc_exception/index.html | 2 +- ocaml/Odoc_extension/index.html | 2 +- .../Base_generator/class-generator/index.html | 2 +- ocaml/Odoc_gen/Base_generator/index.html | 2 +- .../class-type-doc_generator/index.html | 2 +- ocaml/Odoc_gen/index.html | 4 +- .../class-generator/index.html | 2 +- ocaml/Odoc_gen/module-type-Base/index.html | 2 +- .../argument-1-_/class-generator/index.html | 2 +- .../argument-1-_/index.html | 2 +- .../class-generator/index.html | 2 +- .../module-type-Base_functor/index.html | 2 +- .../argument-1-_/class-dot/index.html | 4 +- .../argument-1-_/index.html | 2 +- .../class-dot/index.html | 4 +- .../module-type-Dot_functor/index.html | 2 +- .../argument-1-_/class-html/index.html | 62 +- .../argument-1-_/index.html | 2 +- .../class-html/index.html | 62 +- .../module-type-Html_functor/index.html | 2 +- .../argument-1-_/class-latex/index.html | 28 +- .../argument-1-_/index.html | 2 +- .../class-latex/index.html | 28 +- .../module-type-Latex_functor/index.html | 2 +- .../argument-1-_/class-man/index.html | 10 +- .../argument-1-_/index.html | 2 +- .../class-man/index.html | 10 +- .../module-type-Man_functor/index.html | 2 +- .../argument-1-_/class-texi/index.html | 22 +- .../argument-1-_/index.html | 2 +- .../class-texi/index.html | 22 +- .../module-type-Texi_functor/index.html | 2 +- ocaml/Odoc_global/index.html | 2 +- .../Odoc_html/Generator/class-html/index.html | 62 +- ocaml/Odoc_html/Generator/index.html | 2 +- ocaml/Odoc_html/Naming/index.html | 4 +- ocaml/Odoc_html/index.html | 2 +- .../class-html/index.html | 62 +- .../module-type-Html_generator/index.html | 2 +- ocaml/Odoc_info/Class/index.html | 6 +- ocaml/Odoc_info/Dep/index.html | 6 +- ocaml/Odoc_info/Exception/index.html | 2 +- ocaml/Odoc_info/Extension/index.html | 2 +- ocaml/Odoc_info/Global/index.html | 2 +- ocaml/Odoc_info/Module/index.html | 30 +- ocaml/Odoc_info/Name/index.html | 2 +- ocaml/Odoc_info/Parameter/index.html | 2 +- ocaml/Odoc_info/Scan/class-scanner/index.html | 2 +- ocaml/Odoc_info/Scan/index.html | 2 +- ocaml/Odoc_info/Search/index.html | 2 +- ocaml/Odoc_info/Type/index.html | 2 +- ocaml/Odoc_info/Value/index.html | 2 +- ocaml/Odoc_info/index.html | 22 +- .../Generator/class-latex/index.html | 28 +- ocaml/Odoc_latex/Generator/index.html | 2 +- ocaml/Odoc_latex/index.html | 2 +- .../class-latex/index.html | 28 +- .../module-type-Latex_generator/index.html | 2 +- ocaml/Odoc_latex_style/index.html | 2 +- ocaml/Odoc_lexer/index.html | 2 +- ocaml/Odoc_man/Generator/class-man/index.html | 10 +- ocaml/Odoc_man/Generator/index.html | 2 +- ocaml/Odoc_man/index.html | 2 +- .../class-man/index.html | 10 +- .../module-type-Man_generator/index.html | 2 +- ocaml/Odoc_merge/index.html | 4 +- ocaml/Odoc_messages/index.html | 2 +- ocaml/Odoc_misc/index.html | 4 +- ocaml/Odoc_module/index.html | 50 +- ocaml/Odoc_name/Map/index.html | 4 +- ocaml/Odoc_name/index.html | 2 +- ocaml/Odoc_ocamlhtml/index.html | 2 +- ocaml/Odoc_parameter/index.html | 6 +- ocaml/Odoc_parser/index.html | 4 +- ocaml/Odoc_print/index.html | 8 +- ocaml/Odoc_scan/class-scanner/index.html | 4 +- ocaml/Odoc_scan/index.html | 2 +- ocaml/Odoc_search/P_name/index.html | 4 +- .../Search/argument-1-P/index.html | 2 +- ocaml/Odoc_search/Search/index.html | 4 +- ocaml/Odoc_search/Search_by_name/index.html | 4 +- ocaml/Odoc_search/index.html | 4 +- .../module-type-Predicates/index.html | 2 +- ocaml/Odoc_see_lexer/index.html | 2 +- .../Odoc_sig/Analyser/argument-1-_/index.html | 4 +- ocaml/Odoc_sig/Analyser/index.html | 6 +- ocaml/Odoc_sig/Signature_search/index.html | 4 +- ocaml/Odoc_sig/index.html | 4 +- .../module-type-Info_retriever/index.html | 4 +- ocaml/Odoc_str/index.html | 4 +- ocaml/Odoc_test/index.html | 2 +- .../Odoc_texi/Generator/class-texi/index.html | 22 +- ocaml/Odoc_texi/Generator/index.html | 2 +- ocaml/Odoc_texi/index.html | 2 +- .../class-texi/index.html | 22 +- .../module-type-Texi_generator/index.html | 2 +- ocaml/Odoc_text/Texter/index.html | 2 +- ocaml/Odoc_text/index.html | 2 +- ocaml/Odoc_text_lexer/index.html | 2 +- ocaml/Odoc_text_parser/index.html | 4 +- ocaml/Odoc_to_text/class-to_text/index.html | 16 +- ocaml/Odoc_to_text/index.html | 2 +- ocaml/Odoc_type/index.html | 2 +- ocaml/Odoc_types/index.html | 2 +- ocaml/Odoc_value/index.html | 2 +- ocaml/Opcodes/index.html | 2 +- ocaml/Oprint/index.html | 4 +- ocaml/Optcompile/index.html | 12 +- ocaml/Opterrors/index.html | 2 +- ocaml/Optmain/index.html | 2 +- ocaml/Optmaindriver/index.html | 2 +- ocaml/Outcometree/index.html | 4 +- ocaml/Parameter/List/index.html | 2 +- ocaml/Parameter/Map/index.html | 10 +- ocaml/Parameter/Set/index.html | 2 +- ocaml/Parameter/T/index.html | 2 +- ocaml/Parameter/Tbl/index.html | 2 +- ocaml/Parameter/index.html | 2 +- ocaml/Parmatch/Compat/argument-1-_/index.html | 4 +- ocaml/Parmatch/Compat/index.html | 2 +- ocaml/Parmatch/index.html | 4 +- ocaml/Parse/index.html | 2 +- ocaml/Parser/Incremental/index.html | 4 +- ocaml/Parser/MenhirInterpreter/index.html | 8 +- ocaml/Parser/index.html | 4 +- ocaml/Parsetree/index.html | 16 +- ocaml/Pass_wrapper/index.html | 16 +- ocaml/Path/Map/index.html | 6 +- ocaml/Path/Set/index.html | 3 +- ocaml/Path/index.html | 2 +- ocaml/Patterns/General/index.html | 2 +- ocaml/Patterns/Half_simple/index.html | 2 +- ocaml/Patterns/Head/index.html | 2 +- ocaml/Patterns/Non_empty_row/index.html | 2 +- ocaml/Patterns/Simple/index.html | 6 +- ocaml/Patterns/index.html | 2 +- ocaml/Persistent_env/Consistbl/index.html | 4 +- .../Persistent_signature/index.html | 2 +- ocaml/Persistent_env/index.html | 8 +- ocaml/Polling/index.html | 10 +- ocaml/Pparse/index.html | 18 +- ocaml/Pprintast/index.html | 4 +- ocaml/Predef/index.html | 4 +- ocaml/Primitive/index.html | 18 +- ocaml/Printast/index.html | 4 +- ocaml/Printclambda/index.html | 4 +- ocaml/Printclambda_primitives/index.html | 2 +- ocaml/Printcmm/index.html | 4 +- ocaml/Printinstr/index.html | 2 +- ocaml/Printlambda/index.html | 4 +- ocaml/Printlinear/index.html | 2 +- ocaml/Printmach/index.html | 4 +- ocaml/Printpat/index.html | 4 +- ocaml/Printtyp/Conflicts/index.html | 4 +- ocaml/Printtyp/Naming_context/index.html | 2 +- ocaml/Printtyp/Out_name/index.html | 2 +- ocaml/Printtyp/Subtype/index.html | 4 +- ocaml/Printtyp/index.html | 10 +- ocaml/Printtyped/index.html | 4 +- ocaml/Proc/index.html | 2 +- ocaml/Profile/index.html | 2 +- ocaml/Profiling/index.html | 2 +- ocaml/Projection/Map/index.html | 10 +- ocaml/Projection/Set/index.html | 2 +- ocaml/Projection/T/index.html | 2 +- ocaml/Projection/Tbl/index.html | 2 +- ocaml/Projection/index.html | 4 +- ocaml/Rec_check/index.html | 4 +- ocaml/Ref_to_variables/index.html | 2 +- ocaml/Reg/Map/index.html | 6 +- ocaml/Reg/Raw_name/index.html | 2 +- ocaml/Reg/Set/index.html | 3 +- ocaml/Reg/index.html | 2 +- ocaml/Reload/index.html | 2 +- .../Reloadgen/class-reload_generic/index.html | 4 +- ocaml/Reloadgen/index.html | 2 +- .../Remove_free_vars_equal_to_args/index.html | 6 +- ocaml/Remove_unused_arguments/index.html | 15 +- ocaml/Remove_unused_closure_vars/index.html | 6 +- .../index.html | 2 +- ocaml/Runtime_events/Callbacks/index.html | 16 +- ocaml/Runtime_events/Timestamp/index.html | 2 +- ocaml/Runtime_events/Type/index.html | 8 +- ocaml/Runtime_events/User/index.html | 2 +- ocaml/Runtime_events/index.html | 2 +- ocaml/Runtimedef/index.html | 2 +- .../class-scheduler_generic/index.html | 2 +- ocaml/Schedgen/index.html | 2 +- ocaml/Scheduling/index.html | 2 +- ocaml/Selectgen/Coeffect/index.html | 2 +- ocaml/Selectgen/Effect/index.html | 2 +- .../Selectgen/Effect_and_coeffect/index.html | 2 +- .../class-selector_generic/index.html | 6 +- ocaml/Selectgen/index.html | 6 +- ocaml/Selection/index.html | 6 +- ocaml/Semantics_of_primitives/index.html | 2 +- ocaml/Set_of_closures_id/Map/index.html | 10 +- ocaml/Set_of_closures_id/Set/index.html | 2 +- ocaml/Set_of_closures_id/T/index.html | 2 +- ocaml/Set_of_closures_id/Tbl/index.html | 2 +- ocaml/Set_of_closures_id/index.html | 2 +- ocaml/Set_of_closures_origin/Map/index.html | 10 +- ocaml/Set_of_closures_origin/Set/index.html | 2 +- ocaml/Set_of_closures_origin/T/index.html | 2 +- ocaml/Set_of_closures_origin/Tbl/index.html | 2 +- ocaml/Set_of_closures_origin/index.html | 2 +- ocaml/Shape/Item/Map/index.html | 6 +- ocaml/Shape/Item/index.html | 2 +- .../Make_reduce/argument-1-Context/index.html | 2 +- ocaml/Shape/Make_reduce/index.html | 2 +- ocaml/Shape/Map/index.html | 2 +- ocaml/Shape/Sig_component_kind/index.html | 2 +- ocaml/Shape/Uid/Map/index.html | 10 +- ocaml/Shape/Uid/Set/index.html | 2 +- ocaml/Shape/Uid/T/index.html | 2 +- ocaml/Shape/Uid/Tbl/index.html | 2 +- ocaml/Shape/Uid/index.html | 2 +- ocaml/Shape/index.html | 8 +- ocaml/Share_constants/index.html | 2 +- ocaml/Signature_group/index.html | 6 +- ocaml/Simple_value_approx/index.html | 61 +- ocaml/Simplif/index.html | 18 +- .../Simplify_boxed_int32/index.html | 6 +- .../Simplify_boxed_int64/index.html | 6 +- .../Simplify_boxed_nativeint/index.html | 6 +- ocaml/Simplify_boxed_integer_ops/index.html | 4 +- .../index.html | 2 +- .../module-type-S/index.html | 6 +- ocaml/Simplify_common/index.html | 4 +- ocaml/Simplify_primitives/index.html | 6 +- ocaml/Spill/index.html | 2 +- ocaml/Split/index.html | 2 +- ocaml/Static_exception/Map/index.html | 10 +- ocaml/Static_exception/Set/index.html | 2 +- ocaml/Static_exception/T/index.html | 2 +- ocaml/Static_exception/Tbl/index.html | 2 +- ocaml/Static_exception/index.html | 2 +- ocaml/Std_exit/index.html | 2 +- ocaml/Stdlib/Arg/index.html | 30 +- ocaml/Stdlib/Array/index.html | 8 +- ocaml/Stdlib/ArrayLabels/index.html | 24 +- ocaml/Stdlib/Atomic/index.html | 4 +- ocaml/Stdlib/Bigarray/Array0/index.html | 2 +- ocaml/Stdlib/Bigarray/Array1/index.html | 2 +- ocaml/Stdlib/Bigarray/Array2/index.html | 4 +- ocaml/Stdlib/Bigarray/Array3/index.html | 4 +- ocaml/Stdlib/Bigarray/Genarray/index.html | 9 +- ocaml/Stdlib/Bigarray/index.html | 18 +- ocaml/Stdlib/Bool/index.html | 2 +- ocaml/Stdlib/Buffer/index.html | 9 +- ocaml/Stdlib/Bytes/index.html | 9 +- ocaml/Stdlib/BytesLabels/index.html | 33 +- ocaml/Stdlib/Callback/index.html | 2 +- ocaml/Stdlib/Char/index.html | 2 +- ocaml/Stdlib/Complex/index.html | 2 +- ocaml/Stdlib/Condition/index.html | 54 +- ocaml/Stdlib/Digest/index.html | 2 +- ocaml/Stdlib/Domain/DLS/index.html | 4 +- ocaml/Stdlib/Domain/index.html | 4 +- ocaml/Stdlib/Effect/Deep/index.html | 4 +- ocaml/Stdlib/Effect/Shallow/index.html | 4 +- ocaml/Stdlib/Effect/index.html | 2 +- ocaml/Stdlib/Either/index.html | 20 +- ocaml/Stdlib/Ephemeron/K1/Bucket/index.html | 2 +- .../Ephemeron/K1/Make/argument-1-H/index.html | 2 +- ocaml/Stdlib/Ephemeron/K1/Make/index.html | 2 +- .../K1/MakeSeeded/argument-1-H/index.html | 2 +- .../Stdlib/Ephemeron/K1/MakeSeeded/index.html | 2 +- ocaml/Stdlib/Ephemeron/K1/index.html | 2 +- ocaml/Stdlib/Ephemeron/K2/Bucket/index.html | 2 +- .../K2/Make/argument-1-H1/index.html | 2 +- .../K2/Make/argument-2-H2/index.html | 2 +- ocaml/Stdlib/Ephemeron/K2/Make/index.html | 2 +- .../K2/MakeSeeded/argument-1-H1/index.html | 2 +- .../K2/MakeSeeded/argument-2-H2/index.html | 2 +- .../Stdlib/Ephemeron/K2/MakeSeeded/index.html | 2 +- ocaml/Stdlib/Ephemeron/K2/index.html | 4 +- ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html | 2 +- .../Ephemeron/Kn/Make/argument-1-H/index.html | 2 +- ocaml/Stdlib/Ephemeron/Kn/Make/index.html | 2 +- .../Kn/MakeSeeded/argument-1-H/index.html | 2 +- .../Stdlib/Ephemeron/Kn/MakeSeeded/index.html | 2 +- ocaml/Stdlib/Ephemeron/Kn/index.html | 4 +- ocaml/Stdlib/Ephemeron/index.html | 2 +- .../Stdlib/Ephemeron/module-type-S/index.html | 2 +- .../Ephemeron/module-type-SeededS/index.html | 2 +- ocaml/Stdlib/Filename/index.html | 18 +- ocaml/Stdlib/Float/Array/index.html | 4 +- ocaml/Stdlib/Float/ArrayLabels/index.html | 4 +- ocaml/Stdlib/Float/index.html | 2 +- ocaml/Stdlib/Format/index.html | 59 +- ocaml/Stdlib/Fun/index.html | 2 +- ocaml/Stdlib/Gc/Memprof/index.html | 8 +- ocaml/Stdlib/Gc/index.html | 2 +- .../Hashtbl/Make/argument-1-H/index.html | 2 +- ocaml/Stdlib/Hashtbl/Make/index.html | 2 +- .../MakeSeeded/argument-1-H/index.html | 2 +- ocaml/Stdlib/Hashtbl/MakeSeeded/index.html | 2 +- ocaml/Stdlib/Hashtbl/index.html | 128 +- .../Hashtbl/module-type-HashedType/index.html | 2 +- ocaml/Stdlib/Hashtbl/module-type-S/index.html | 2 +- .../module-type-SeededHashedType/index.html | 2 +- .../Hashtbl/module-type-SeededS/index.html | 2 +- ocaml/Stdlib/In_channel/index.html | 3 +- ocaml/Stdlib/Int/index.html | 2 +- ocaml/Stdlib/Int32/index.html | 6 +- ocaml/Stdlib/Int64/index.html | 6 +- ocaml/Stdlib/LargeFile/index.html | 2 +- ocaml/Stdlib/Lazy/index.html | 8 +- ocaml/Stdlib/Lexing/index.html | 2 +- ocaml/Stdlib/List/index.html | 8 +- ocaml/Stdlib/ListLabels/index.html | 20 +- .../Stdlib/Map/Make/argument-1-Ord/index.html | 2 +- ocaml/Stdlib/Map/Make/index.html | 4 +- ocaml/Stdlib/Map/index.html | 20 +- .../Map/module-type-OrderedType/index.html | 2 +- ocaml/Stdlib/Map/module-type-S/index.html | 4 +- ocaml/Stdlib/Marshal/index.html | 2 +- .../Hashtbl/Make/argument-1-H/index.html | 2 +- .../Stdlib/MoreLabels/Hashtbl/Make/index.html | 2 +- .../MakeSeeded/argument-1-H/index.html | 2 +- .../MoreLabels/Hashtbl/MakeSeeded/index.html | 2 +- ocaml/Stdlib/MoreLabels/Hashtbl/index.html | 138 +- .../Hashtbl/module-type-HashedType/index.html | 2 +- .../Hashtbl/module-type-S/index.html | 2 +- .../module-type-SeededHashedType/index.html | 2 +- .../Hashtbl/module-type-SeededS/index.html | 2 +- .../Map/Make/argument-1-Ord/index.html | 2 +- ocaml/Stdlib/MoreLabels/Map/Make/index.html | 8 +- ocaml/Stdlib/MoreLabels/Map/index.html | 22 +- .../Map/module-type-OrderedType/index.html | 2 +- .../MoreLabels/Map/module-type-S/index.html | 8 +- .../Set/Make/argument-1-Ord/index.html | 2 +- ocaml/Stdlib/MoreLabels/Set/Make/index.html | 3 +- ocaml/Stdlib/MoreLabels/Set/index.html | 22 +- .../Set/module-type-OrderedType/index.html | 2 +- .../MoreLabels/Set/module-type-S/index.html | 3 +- ocaml/Stdlib/MoreLabels/index.html | 4 +- ocaml/Stdlib/Mutex/index.html | 6 +- ocaml/Stdlib/Nativeint/index.html | 7 +- ocaml/Stdlib/Obj/Closure/index.html | 2 +- ocaml/Stdlib/Obj/Ephemeron/index.html | 2 +- .../Obj/Extension_constructor/index.html | 2 +- ocaml/Stdlib/Obj/index.html | 2 +- ocaml/Stdlib/Oo/index.html | 2 +- ocaml/Stdlib/Option/index.html | 2 +- ocaml/Stdlib/Out_channel/index.html | 7 +- ocaml/Stdlib/Parsing/index.html | 2 +- ocaml/Stdlib/Printexc/Slot/index.html | 2 +- ocaml/Stdlib/Printexc/index.html | 25 +- ocaml/Stdlib/Printf/index.html | 4 +- ocaml/Stdlib/Queue/index.html | 102 +- ocaml/Stdlib/Random/State/index.html | 2 +- ocaml/Stdlib/Random/index.html | 2 +- ocaml/Stdlib/Result/index.html | 12 +- ocaml/Stdlib/Scanf/Scanning/index.html | 2 +- ocaml/Stdlib/Scanf/index.html | 13 +- ocaml/Stdlib/Semaphore/Binary/index.html | 2 +- ocaml/Stdlib/Semaphore/Counting/index.html | 2 +- ocaml/Stdlib/Semaphore/index.html | 2 +- ocaml/Stdlib/Seq/index.html | 2 +- .../Stdlib/Set/Make/argument-1-Ord/index.html | 2 +- ocaml/Stdlib/Set/Make/index.html | 3 +- ocaml/Stdlib/Set/index.html | 20 +- .../Set/module-type-OrderedType/index.html | 2 +- ocaml/Stdlib/Set/module-type-S/index.html | 3 +- ocaml/Stdlib/Stack/index.html | 2 +- ocaml/Stdlib/StdLabels/index.html | 8 +- ocaml/Stdlib/String/index.html | 5 +- ocaml/Stdlib/StringLabels/index.html | 17 +- .../Make/argument-1-Immediate/index.html | 2 +- .../Make/argument-2-Non_immediate/index.html | 2 +- ocaml/Stdlib/Sys/Immediate64/Make/index.html | 2 +- ocaml/Stdlib/Sys/Immediate64/index.html | 4 +- .../module-type-Immediate/index.html | 2 +- .../module-type-Non_immediate/index.html | 2 +- ocaml/Stdlib/Sys/index.html | 6 +- ocaml/Stdlib/Type/Id/index.html | 4 +- ocaml/Stdlib/Type/index.html | 2 +- ocaml/Stdlib/Uchar/index.html | 2 +- ocaml/Stdlib/Unit/index.html | 2 +- .../Stdlib/Weak/Make/argument-1-H/index.html | 2 +- ocaml/Stdlib/Weak/Make/index.html | 2 +- ocaml/Stdlib/Weak/index.html | 2 +- ocaml/Stdlib/Weak/module-type-S/index.html | 2 +- ocaml/Stdlib/index.html | 4 +- ocaml/Stdlib__Arg/index.html | 2 +- ocaml/Stdlib__Array/index.html | 2 +- ocaml/Stdlib__ArrayLabels/index.html | 2 +- ocaml/Stdlib__Atomic/index.html | 2 +- ocaml/Stdlib__Bigarray/index.html | 2 +- ocaml/Stdlib__Bool/index.html | 2 +- ocaml/Stdlib__Buffer/index.html | 2 +- ocaml/Stdlib__Bytes/index.html | 2 +- ocaml/Stdlib__BytesLabels/index.html | 2 +- ocaml/Stdlib__Callback/index.html | 2 +- ocaml/Stdlib__Char/index.html | 2 +- ocaml/Stdlib__Complex/index.html | 2 +- ocaml/Stdlib__Condition/index.html | 2 +- ocaml/Stdlib__Digest/index.html | 2 +- ocaml/Stdlib__Domain/index.html | 2 +- ocaml/Stdlib__Effect/index.html | 2 +- ocaml/Stdlib__Either/index.html | 2 +- ocaml/Stdlib__Ephemeron/index.html | 2 +- ocaml/Stdlib__Filename/index.html | 2 +- ocaml/Stdlib__Float/index.html | 2 +- ocaml/Stdlib__Format/index.html | 2 +- ocaml/Stdlib__Fun/index.html | 2 +- ocaml/Stdlib__Gc/index.html | 2 +- ocaml/Stdlib__Hashtbl/index.html | 2 +- ocaml/Stdlib__In_channel/index.html | 2 +- ocaml/Stdlib__Int/index.html | 2 +- ocaml/Stdlib__Int32/index.html | 2 +- ocaml/Stdlib__Int64/index.html | 2 +- ocaml/Stdlib__Lazy/index.html | 2 +- ocaml/Stdlib__Lexing/index.html | 2 +- ocaml/Stdlib__List/index.html | 2 +- ocaml/Stdlib__ListLabels/index.html | 2 +- ocaml/Stdlib__Map/index.html | 2 +- ocaml/Stdlib__Marshal/index.html | 2 +- ocaml/Stdlib__MoreLabels/index.html | 2 +- ocaml/Stdlib__Mutex/index.html | 2 +- ocaml/Stdlib__Nativeint/index.html | 2 +- ocaml/Stdlib__Obj/index.html | 2 +- ocaml/Stdlib__Oo/index.html | 2 +- ocaml/Stdlib__Option/index.html | 2 +- ocaml/Stdlib__Out_channel/index.html | 2 +- ocaml/Stdlib__Parsing/index.html | 2 +- ocaml/Stdlib__Printexc/index.html | 2 +- ocaml/Stdlib__Printf/index.html | 2 +- ocaml/Stdlib__Queue/index.html | 2 +- ocaml/Stdlib__Random/index.html | 2 +- ocaml/Stdlib__Result/index.html | 2 +- ocaml/Stdlib__Scanf/index.html | 2 +- ocaml/Stdlib__Semaphore/index.html | 2 +- ocaml/Stdlib__Seq/index.html | 2 +- ocaml/Stdlib__Set/index.html | 2 +- ocaml/Stdlib__Stack/index.html | 2 +- ocaml/Stdlib__StdLabels/index.html | 2 +- ocaml/Stdlib__String/index.html | 2 +- ocaml/Stdlib__StringLabels/index.html | 2 +- ocaml/Stdlib__Sys/index.html | 2 +- ocaml/Stdlib__Type/index.html | 2 +- ocaml/Stdlib__Uchar/index.html | 2 +- ocaml/Stdlib__Unit/index.html | 2 +- ocaml/Stdlib__Weak/index.html | 2 +- ocaml/Str/index.html | 6 +- ocaml/Strmatch/Make/argument-1-_/index.html | 4 +- ocaml/Strmatch/Make/index.html | 4 +- ocaml/Strmatch/index.html | 2 +- ocaml/Strmatch/module-type-I/index.html | 4 +- .../Make/argument-1-Id/Map/index.html | 10 +- .../Make/argument-1-Id/Set/index.html | 2 +- .../Make/argument-1-Id/T/index.html | 2 +- .../Make/argument-1-Id/Tbl/index.html | 2 +- .../Make/argument-1-Id/index.html | 2 +- .../Make/index.html | 4 +- .../Strongly_connected_components/index.html | 2 +- .../module-type-S/Id/Map/index.html | 10 +- .../module-type-S/Id/Set/index.html | 2 +- .../module-type-S/Id/T/index.html | 2 +- .../module-type-S/Id/Tbl/index.html | 2 +- .../module-type-S/Id/index.html | 2 +- .../module-type-S/index.html | 4 +- ocaml/Stypes/index.html | 4 +- ocaml/Subst/Lazy/index.html | 4 +- ocaml/Subst/index.html | 8 +- ocaml/Switch/CtxStore/argument-1-A/index.html | 2 +- ocaml/Switch/CtxStore/index.html | 2 +- ocaml/Switch/Make/argument-1-Arg/index.html | 2 +- ocaml/Switch/Make/index.html | 4 +- ocaml/Switch/Store/argument-1-A/index.html | 2 +- ocaml/Switch/Store/index.html | 2 +- ocaml/Switch/index.html | 2 +- ocaml/Switch/module-type-CtxStored/index.html | 2 +- ocaml/Switch/module-type-S/index.html | 2 +- ocaml/Switch/module-type-Stored/index.html | 2 +- ocaml/Symbol/Map/index.html | 10 +- ocaml/Symbol/Set/index.html | 2 +- ocaml/Symbol/T/index.html | 2 +- ocaml/Symbol/Tbl/index.html | 2 +- ocaml/Symbol/index.html | 2 +- ocaml/Symtable/index.html | 4 +- ocaml/Syntaxerr/index.html | 2 +- ocaml/Tag/Map/index.html | 10 +- ocaml/Tag/Set/index.html | 2 +- ocaml/Tag/T/index.html | 2 +- ocaml/Tag/Tbl/index.html | 2 +- ocaml/Tag/index.html | 2 +- ocaml/Targetint/index.html | 3 +- ocaml/Tast_iterator/index.html | 4 +- ocaml/Tast_mapper/index.html | 4 +- ocaml/Terminfo/index.html | 2 +- ocaml/Thread/index.html | 4 +- ocaml/Tmc/index.html | 4 +- ocaml/Topcommon/index.html | 4 +- ocaml/Topdirs/index.html | 2 +- ocaml/Topeval/index.html | 2 +- ocaml/Tophooks/index.html | 4 +- ocaml/Toploop/index.html | 4 +- ocaml/Topmain/index.html | 2 +- ocaml/Topprinters/index.html | 2 +- ocaml/Topstart/index.html | 2 +- ocaml/Trace/index.html | 4 +- ocaml/Translattribute/index.html | 4 +- ocaml/Translclass/index.html | 6 +- ocaml/Translcore/index.html | 26 +- ocaml/Translmod/index.html | 4 +- ocaml/Translobj/index.html | 4 +- ocaml/Translprim/index.html | 4 +- .../Traverse_for_exported_symbols/index.html | 16 +- ocaml/Type_immediacy/Violation/index.html | 2 +- ocaml/Type_immediacy/index.html | 2 +- ocaml/Typeclass/index.html | 6 +- ocaml/Typecore/Datatype_kind/index.html | 2 +- ocaml/Typecore/index.html | 16 +- ocaml/Typedecl/index.html | 14 +- ocaml/Typedecl_immediacy/index.html | 4 +- ocaml/Typedecl_properties/index.html | 4 +- ocaml/Typedecl_separability/index.html | 7 +- ocaml/Typedecl_unboxed/index.html | 4 +- ocaml/Typedecl_variance/index.html | 6 +- ocaml/Typedtree/index.html | 9 +- ocaml/Typemod/Sig_component_kind/index.html | 2 +- ocaml/Typemod/Signature_names/index.html | 2 +- ocaml/Typemod/index.html | 10 +- ocaml/Typeopt/index.html | 4 +- ocaml/Types/MethSet/index.html | 3 +- ocaml/Types/Meths/index.html | 6 +- ocaml/Types/Separability/index.html | 2 +- ocaml/Types/TransientTypeOps/index.html | 2 +- ocaml/Types/Transient_expr/index.html | 2 +- ocaml/Types/VarSet/index.html | 3 +- ocaml/Types/Variance/index.html | 2 +- ocaml/Types/Vars/index.html | 6 +- ocaml/Types/index.html | 29 +- ocaml/Typetexp/TyVarEnv/index.html | 4 +- ocaml/Typetexp/index.html | 8 +- ocaml/Un_anf/index.html | 8 +- ocaml/Unbox_closures/index.html | 18 +- ocaml/Unbox_free_vars_of_closures/index.html | 8 +- ocaml/Unbox_specialised_args/index.html | 18 +- ocaml/Unix/LargeFile/index.html | 2 +- ocaml/Unix/index.html | 20 +- ocaml/UnixLabels/LargeFile/index.html | 2 +- ocaml/UnixLabels/index.html | 134 +- ocaml/Untypeast/index.html | 12 +- ocaml/Var_within_closure/Map/index.html | 10 +- ocaml/Var_within_closure/Set/index.html | 2 +- ocaml/Var_within_closure/T/index.html | 2 +- ocaml/Var_within_closure/Tbl/index.html | 2 +- ocaml/Var_within_closure/index.html | 2 +- ocaml/Variable/Map/index.html | 10 +- ocaml/Variable/Pair/Map/index.html | 10 +- ocaml/Variable/Pair/Set/index.html | 2 +- ocaml/Variable/Pair/T/index.html | 2 +- ocaml/Variable/Pair/Tbl/index.html | 2 +- ocaml/Variable/Pair/index.html | 2 +- ocaml/Variable/Set/index.html | 2 +- ocaml/Variable/T/index.html | 2 +- ocaml/Variable/Tbl/index.html | 2 +- ocaml/Variable/index.html | 6 +- ocaml/Warnings/index.html | 2 +- ocaml/X86_ast/index.html | 2 +- ocaml/X86_dsl/D/index.html | 2 +- ocaml/X86_dsl/I/index.html | 2 +- ocaml/X86_dsl/index.html | 16 +- ocaml/X86_gas/index.html | 2 +- ocaml/X86_masm/index.html | 2 +- ocaml/X86_proc/index.html | 4 +- ocaml/index.html | 2 +- odoc.css | 1149 ++++++++++++++--- odoc_search.js | 150 +++ ppx_trace/Ppx_trace/index.html | 12 +- ppx_trace/index.html | 2 +- ppxlib/Astlib/Ast_408/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_408/Config/index.html | 2 +- ppxlib/Astlib/Ast_408/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_408/index.html | 2 +- ppxlib/Astlib/Ast_409/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_409/Config/index.html | 2 +- ppxlib/Astlib/Ast_409/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_409/index.html | 2 +- ppxlib/Astlib/Ast_410/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_410/Config/index.html | 2 +- ppxlib/Astlib/Ast_410/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_410/index.html | 2 +- ppxlib/Astlib/Ast_411/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_411/Config/index.html | 2 +- ppxlib/Astlib/Ast_411/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_411/index.html | 2 +- ppxlib/Astlib/Ast_412/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_412/Config/index.html | 2 +- ppxlib/Astlib/Ast_412/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_412/index.html | 2 +- ppxlib/Astlib/Ast_413/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_413/Config/index.html | 2 +- ppxlib/Astlib/Ast_413/Parsetree/index.html | 4 +- ppxlib/Astlib/Ast_413/index.html | 2 +- ppxlib/Astlib/Ast_414/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_414/Config/index.html | 2 +- ppxlib/Astlib/Ast_414/Parsetree/index.html | 16 +- ppxlib/Astlib/Ast_414/index.html | 2 +- ppxlib/Astlib/Ast_500/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_500/Config/index.html | 2 +- ppxlib/Astlib/Ast_500/Parsetree/index.html | 28 +- ppxlib/Astlib/Ast_500/index.html | 2 +- ppxlib/Astlib/Ast_501/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_501/Config/index.html | 2 +- ppxlib/Astlib/Ast_501/Parsetree/index.html | 16 +- ppxlib/Astlib/Ast_501/index.html | 2 +- ppxlib/Astlib/Ast_502/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_502/Config/index.html | 2 +- ppxlib/Astlib/Ast_502/Parsetree/index.html | 22 +- ppxlib/Astlib/Ast_502/index.html | 2 +- ppxlib/Astlib/Ast_503/Asttypes/index.html | 2 +- ppxlib/Astlib/Ast_503/Config/index.html | 2 +- ppxlib/Astlib/Ast_503/Parsetree/index.html | 22 +- ppxlib/Astlib/Ast_503/index.html | 2 +- ppxlib/Astlib/Ast_metadata/index.html | 12 +- ppxlib/Astlib/Compiler_pprintast/index.html | 4 +- ppxlib/Astlib/Config/index.html | 2 +- ppxlib/Astlib/Keyword/index.html | 2 +- ppxlib/Astlib/Location/Error/index.html | 2 +- ppxlib/Astlib/Location/index.html | 6 +- ppxlib/Astlib/Longident/index.html | 2 +- ppxlib/Astlib/Migrate_408_409/index.html | 4 +- ppxlib/Astlib/Migrate_409_408/index.html | 4 +- ppxlib/Astlib/Migrate_409_410/index.html | 4 +- ppxlib/Astlib/Migrate_410_409/index.html | 4 +- ppxlib/Astlib/Migrate_410_411/index.html | 4 +- ppxlib/Astlib/Migrate_411_410/index.html | 4 +- ppxlib/Astlib/Migrate_411_412/index.html | 4 +- ppxlib/Astlib/Migrate_412_411/index.html | 4 +- ppxlib/Astlib/Migrate_412_413/index.html | 4 +- ppxlib/Astlib/Migrate_413_412/index.html | 4 +- ppxlib/Astlib/Migrate_413_414/index.html | 4 +- ppxlib/Astlib/Migrate_414_413/index.html | 4 +- ppxlib/Astlib/Migrate_414_500/index.html | 4 +- ppxlib/Astlib/Migrate_500_414/index.html | 4 +- ppxlib/Astlib/Migrate_500_501/index.html | 4 +- ppxlib/Astlib/Migrate_501_500/index.html | 4 +- ppxlib/Astlib/Migrate_501_502/index.html | 4 +- ppxlib/Astlib/Migrate_502_501/index.html | 4 +- ppxlib/Astlib/Migrate_502_503/index.html | 4 +- ppxlib/Astlib/Migrate_503_502/index.html | 4 +- ppxlib/Astlib/Parse/index.html | 2 +- ppxlib/Astlib/Pprintast/index.html | 4 +- ppxlib/Astlib/index.html | 2 +- ppxlib/Astlib__/index.html | 2 +- ppxlib/Astlib__Ast_402/index.html | 2 +- ppxlib/Astlib__Ast_403/index.html | 2 +- ppxlib/Astlib__Ast_404/index.html | 2 +- ppxlib/Astlib__Ast_405/index.html | 2 +- ppxlib/Astlib__Ast_406/index.html | 2 +- ppxlib/Astlib__Ast_407/index.html | 2 +- ppxlib/Astlib__Ast_408/index.html | 2 +- ppxlib/Astlib__Ast_409/index.html | 2 +- ppxlib/Astlib__Ast_410/index.html | 2 +- ppxlib/Astlib__Ast_411/index.html | 2 +- ppxlib/Astlib__Ast_412/index.html | 2 +- ppxlib/Astlib__Ast_413/index.html | 2 +- ppxlib/Astlib__Ast_414/index.html | 2 +- ppxlib/Astlib__Ast_500/index.html | 2 +- ppxlib/Astlib__Ast_501/index.html | 2 +- ppxlib/Astlib__Ast_502/index.html | 2 +- ppxlib/Astlib__Ast_503/index.html | 2 +- ppxlib/Astlib__Ast_metadata/index.html | 2 +- ppxlib/Astlib__Config/index.html | 2 +- ppxlib/Astlib__Keyword/index.html | 2 +- ppxlib/Astlib__Location/index.html | 2 +- ppxlib/Astlib__Longident/index.html | 2 +- ppxlib/Astlib__Migrate_408_409/index.html | 2 +- ppxlib/Astlib__Migrate_409_408/index.html | 2 +- ppxlib/Astlib__Migrate_409_410/index.html | 2 +- ppxlib/Astlib__Migrate_410_409/index.html | 2 +- ppxlib/Astlib__Migrate_410_411/index.html | 2 +- ppxlib/Astlib__Migrate_411_410/index.html | 2 +- ppxlib/Astlib__Migrate_411_412/index.html | 2 +- ppxlib/Astlib__Migrate_412_411/index.html | 2 +- ppxlib/Astlib__Migrate_412_413/index.html | 2 +- ppxlib/Astlib__Migrate_413_412/index.html | 2 +- ppxlib/Astlib__Migrate_413_414/index.html | 2 +- ppxlib/Astlib__Migrate_414_413/index.html | 2 +- ppxlib/Astlib__Migrate_414_500/index.html | 2 +- ppxlib/Astlib__Migrate_500_414/index.html | 2 +- ppxlib/Astlib__Migrate_500_501/index.html | 2 +- ppxlib/Astlib__Migrate_501_500/index.html | 2 +- ppxlib/Astlib__Migrate_501_502/index.html | 2 +- ppxlib/Astlib__Migrate_502_501/index.html | 2 +- ppxlib/Astlib__Migrate_502_503/index.html | 2 +- ppxlib/Astlib__Migrate_503_502/index.html | 2 +- ppxlib/Astlib__Parse/index.html | 2 +- ppxlib/Astlib__Pprintast/index.html | 2 +- ppxlib/Astlib__Stdlib0/index.html | 2 +- .../Ast_builder/Default/Latest/index.html | 16 +- .../Ast_builder/Default/Located/index.html | 2 +- ppxlib/Ppxlib/Ast_builder/Default/index.html | 558 ++++---- .../Ppxlib/Ast_builder/Make/Latest/index.html | 12 +- .../Ast_builder/Make/Located/index.html | 2 +- .../Make/argument-1-Loc/index.html | 2 +- ppxlib/Ppxlib/Ast_builder/Make/index.html | 198 +-- ppxlib/Ppxlib/Ast_builder/index.html | 2 +- .../Ast_builder/module-type-Loc/index.html | 2 +- .../module-type-S/Latest/index.html | 12 +- .../module-type-S/Located/index.html | 2 +- .../Ast_builder/module-type-S/index.html | 198 +-- ppxlib/Ppxlib/Ast_io/index.html | 2 +- ppxlib/Ppxlib/Ast_pattern/Packed/index.html | 4 +- ppxlib/Ppxlib/Ast_pattern/index.html | 1028 +++++++-------- .../Ppxlib/Ast_traverse/class-fold/index.html | 2 +- .../Ast_traverse/class-fold_map/index.html | 2 +- .../Ppxlib/Ast_traverse/class-iter/index.html | 2 +- .../Ppxlib/Ast_traverse/class-lift/index.html | 2 +- .../class-lift_map_with_context/index.html | 2 +- .../Ppxlib/Ast_traverse/class-map/index.html | 2 +- .../class-map_with_context/index.html | 2 +- .../index.html | 4 +- .../class-map_with_path/index.html | 2 +- .../Ast_traverse/class-sexp_of/index.html | 2 +- ppxlib/Ppxlib/Ast_traverse/index.html | 32 +- ppxlib/Ppxlib/Attribute/Context/index.html | 4 +- .../Attribute/Floating/Context/index.html | 2 +- ppxlib/Ppxlib/Attribute/Floating/index.html | 4 +- ppxlib/Ppxlib/Attribute/index.html | 24 +- ppxlib/Ppxlib/Caller_id/index.html | 2 +- ppxlib/Ppxlib/Code_path/index.html | 2 +- .../Rule/Constant_kind/index.html | 2 +- ppxlib/Ppxlib/Context_free/Rule/index.html | 8 +- .../class-map_top_down/index.html | 2 +- ppxlib/Ppxlib/Context_free/index.html | 4 +- ppxlib/Ppxlib/Deriving/Args/index.html | 1048 +++++++-------- .../Ppxlib/Deriving/Generator/V2/index.html | 20 +- ppxlib/Ppxlib/Deriving/Generator/index.html | 24 +- ppxlib/Ppxlib/Deriving/index.html | 50 +- ppxlib/Ppxlib/Driver/Cookies/index.html | 6 +- .../argument-1-Name/index.html | 2 +- .../argument-2-T/index.html | 2 +- .../Driver/Create_file_property/index.html | 2 +- ppxlib/Ppxlib/Driver/Instrument/V2/index.html | 6 +- ppxlib/Ppxlib/Driver/Instrument/index.html | 6 +- ppxlib/Ppxlib/Driver/Lint_error/index.html | 2 +- ppxlib/Ppxlib/Driver/V2/index.html | 34 +- ppxlib/Ppxlib/Driver/index.html | 46 +- .../Ppxlib/Expansion_context/Base/index.html | 2 +- .../Expansion_context/Deriver/index.html | 2 +- .../Expansion_context/Extension/index.html | 2 +- ppxlib/Ppxlib/Expansion_context/index.html | 2 +- .../Expansion_helpers/Quoter/index.html | 4 +- ppxlib/Ppxlib/Expansion_helpers/index.html | 6 +- ppxlib/Ppxlib/Extension/Context/index.html | 4 +- ppxlib/Ppxlib/Extension/Expert/index.html | 10 +- .../Ppxlib/Extension/For_context/index.html | 12 +- ppxlib/Ppxlib/Extension/V2/index.html | 8 +- ppxlib/Ppxlib/Extension/V3/index.html | 20 +- ppxlib/Ppxlib/Extension/index.html | 24 +- ppxlib/Ppxlib/Keyword/index.html | 2 +- ppxlib/Ppxlib/Loc/index.html | 2 +- ppxlib/Ppxlib/Location/Error/index.html | 4 +- ppxlib/Ppxlib/Location/index.html | 10 +- ppxlib/Ppxlib/Longident/Map/index.html | 6 +- ppxlib/Ppxlib/Longident/Set/index.html | 3 +- ppxlib/Ppxlib/Longident/index.html | 2 +- ppxlib/Ppxlib/Merlin_helpers/index.html | 4 +- ppxlib/Ppxlib/Pp_ast/Config/index.html | 10 +- ppxlib/Ppxlib/Pp_ast/Default/index.html | 2 +- .../Pp_ast/Make/argument-1-Conf/index.html | 2 +- ppxlib/Ppxlib/Pp_ast/Make/index.html | 2 +- ppxlib/Ppxlib/Pp_ast/index.html | 12 +- .../Ppxlib/Pp_ast/module-type-Conf/index.html | 2 +- .../module-type-Configurable/index.html | 2 +- .../Pp_ast/module-type-Configured/index.html | 2 +- ppxlib/Ppxlib/Pp_ast/module-type-S/index.html | 2 +- ppxlib/Ppxlib/Reserved_namespaces/index.html | 2 +- ppxlib/Ppxlib/Spellcheck/index.html | 2 +- ppxlib/Ppxlib/With_errors/index.html | 6 +- ppxlib/Ppxlib/class-fold/index.html | 33 +- ppxlib/Ppxlib/class-fold_map/index.html | 208 +-- ppxlib/Ppxlib/class-iter/index.html | 2 +- ppxlib/Ppxlib/class-lift/index.html | 2 +- .../class-lift_map_with_context/index.html | 170 +-- ppxlib/Ppxlib/class-map/index.html | 26 +- .../Ppxlib/class-map_with_context/index.html | 87 +- .../Ppxlib/class-type_is_recursive/index.html | 2 +- ppxlib/Ppxlib/index.html | 30 +- ppxlib/Ppxlib__/index.html | 2 +- ppxlib/Ppxlib__Ast_builder/index.html | 2 +- .../Ppxlib__Ast_builder_generated/index.html | 2 +- ppxlib/Ppxlib__Ast_builder_intf/index.html | 2 +- ppxlib/Ppxlib__Ast_pattern/index.html | 2 +- ppxlib/Ppxlib__Ast_pattern0/index.html | 2 +- .../Ppxlib__Ast_pattern_generated/index.html | 2 +- ppxlib/Ppxlib__Ast_traverse/index.html | 2 +- ppxlib/Ppxlib__Ast_traverse0/index.html | 2 +- ppxlib/Ppxlib__Attribute/index.html | 2 +- ppxlib/Ppxlib__Caller_id/index.html | 2 +- ppxlib/Ppxlib__Code_matcher/index.html | 2 +- ppxlib/Ppxlib__Code_path/index.html | 2 +- ppxlib/Ppxlib__Common/index.html | 2 +- ppxlib/Ppxlib__Context_free/index.html | 2 +- ppxlib/Ppxlib__Deriving/index.html | 2 +- ppxlib/Ppxlib__Driver/index.html | 2 +- ppxlib/Ppxlib__Expansion_context/index.html | 2 +- ppxlib/Ppxlib__Expansion_helpers/index.html | 2 +- ppxlib/Ppxlib__Extension/index.html | 2 +- .../Ppxlib__Ignore_unused_warning/index.html | 2 +- ppxlib/Ppxlib__Import/index.html | 2 +- ppxlib/Ppxlib__Keyword/index.html | 2 +- ppxlib/Ppxlib__Loc/index.html | 2 +- ppxlib/Ppxlib__Location/index.html | 2 +- ppxlib/Ppxlib__Location_check/index.html | 2 +- ppxlib/Ppxlib__Longident/index.html | 2 +- ppxlib/Ppxlib__Merlin_helpers/index.html | 2 +- ppxlib/Ppxlib__Name/index.html | 2 +- ppxlib/Ppxlib__Options/index.html | 2 +- ppxlib/Ppxlib__Pp_ast/index.html | 2 +- ppxlib/Ppxlib__Quoter/index.html | 2 +- ppxlib/Ppxlib__Reconcile/index.html | 2 +- ppxlib/Ppxlib__Skip_hash_bang/index.html | 2 +- ppxlib/Ppxlib__Spellcheck/index.html | 2 +- ppxlib/Ppxlib__Utils/index.html | 2 +- ppxlib/Ppxlib_ast/Ast/class-fold/index.html | 33 +- .../Ppxlib_ast/Ast/class-fold_map/index.html | 208 +-- ppxlib/Ppxlib_ast/Ast/class-iter/index.html | 2 +- ppxlib/Ppxlib_ast/Ast/class-lift/index.html | 2 +- .../class-lift_map_with_context/index.html | 170 +-- ppxlib/Ppxlib_ast/Ast/class-map/index.html | 26 +- .../Ast/class-map_with_context/index.html | 87 +- ppxlib/Ppxlib_ast/Ast/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Attr/index.html | 6 +- ppxlib/Ppxlib_ast/Ast_helper/Cf/index.html | 34 +- ppxlib/Ppxlib_ast/Ast_helper/Ci/index.html | 12 +- ppxlib/Ppxlib_ast/Ast_helper/Cl/index.html | 40 +- ppxlib/Ppxlib_ast/Ast_helper/Const/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Csig/index.html | 4 +- ppxlib/Ppxlib_ast/Ast_helper/Cstr/index.html | 4 +- ppxlib/Ppxlib_ast/Ast_helper/Ctf/index.html | 30 +- ppxlib/Ppxlib_ast/Ast_helper/Cty/index.html | 28 +- ppxlib/Ppxlib_ast/Ast_helper/Exp/index.html | 158 +-- ppxlib/Ppxlib_ast/Ast_helper/Incl/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Mb/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Md/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Mod/index.html | 36 +- ppxlib/Ppxlib_ast/Ast_helper/Ms/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/Mtd/index.html | 10 +- ppxlib/Ppxlib_ast/Ast_helper/Mty/index.html | 36 +- ppxlib/Ppxlib_ast/Ast_helper/Of/index.html | 14 +- ppxlib/Ppxlib_ast/Ast_helper/Opn/index.html | 10 +- ppxlib/Ppxlib_ast/Ast_helper/Pat/index.html | 80 +- ppxlib/Ppxlib_ast/Ast_helper/Rf/index.html | 14 +- ppxlib/Ppxlib_ast/Ast_helper/Sig/index.html | 38 +- ppxlib/Ppxlib_ast/Ast_helper/Str/index.html | 40 +- ppxlib/Ppxlib_ast/Ast_helper/Te/index.html | 34 +- ppxlib/Ppxlib_ast/Ast_helper/Typ/index.html | 56 +- ppxlib/Ppxlib_ast/Ast_helper/Type/index.html | 34 +- ppxlib/Ppxlib_ast/Ast_helper/Val/index.html | 10 +- ppxlib/Ppxlib_ast/Ast_helper/Vb/index.html | 8 +- ppxlib/Ppxlib_ast/Ast_helper/index.html | 2 +- ppxlib/Ppxlib_ast/Compiler_version/index.html | 4 +- .../argument-1-A/Ast/Config/index.html | 2 +- .../argument-1-A/Ast/Parsetree/index.html | 2 +- .../Convert/argument-1-A/Ast/index.html | 2 +- .../Convert/argument-1-A/index.html | 4 +- .../argument-2-B/Ast/Config/index.html | 2 +- .../argument-2-B/Ast/Parsetree/index.html | 2 +- .../Convert/argument-2-B/Ast/index.html | 2 +- .../Convert/argument-2-B/index.html | 4 +- ppxlib/Ppxlib_ast/Convert/index.html | 4 +- ppxlib/Ppxlib_ast/Extra_warnings/index.html | 2 +- ppxlib/Ppxlib_ast/Find_version/index.html | 2 +- ppxlib/Ppxlib_ast/Js/index.html | 4 +- ppxlib/Ppxlib_ast/Location_error/index.html | 8 +- ppxlib/Ppxlib_ast/Parse/Of_ocaml/index.html | 4 +- ppxlib/Ppxlib_ast/Parse/index.html | 4 +- .../Ppxlib_ast/Select_ast/Of_ocaml/index.html | 4 +- .../Ppxlib_ast/Select_ast/To_ocaml/index.html | 4 +- ppxlib/Ppxlib_ast/Select_ast/Type/index.html | 4 +- .../argument-1-Ocaml/Ast/Config/index.html | 2 +- .../argument-1-Ocaml/Ast/Parsetree/index.html | 2 +- .../argument-1-Ocaml/Ast/index.html | 2 +- .../Select_ast/argument-1-Ocaml/index.html | 4 +- ppxlib/Ppxlib_ast/Select_ast/index.html | 4 +- .../Selected_ast/Of_ocaml/index.html | 4 +- .../Selected_ast/To_ocaml/index.html | 4 +- .../Ppxlib_ast/Selected_ast/Type/index.html | 4 +- ppxlib/Ppxlib_ast/Selected_ast/index.html | 4 +- ppxlib/Ppxlib_ast/index.html | 2 +- .../Ast/Config/index.html | 2 +- .../Ast/Parsetree/index.html | 2 +- .../module-type-OCaml_version/Ast/index.html | 2 +- .../module-type-OCaml_version/index.html | 4 +- ppxlib/Ppxlib_ast__/index.html | 2 +- ppxlib/Ppxlib_ast__Ast/index.html | 2 +- ppxlib/Ppxlib_ast__Ast_helper_lite/index.html | 2 +- ppxlib/Ppxlib_ast__Import/index.html | 2 +- ppxlib/Ppxlib_ast__Location_error/index.html | 2 +- ppxlib/Ppxlib_ast__Stdlib0/index.html | 2 +- ppxlib/Ppxlib_ast__Versions/index.html | 2 +- ppxlib/Ppxlib_ast__Warn/index.html | 2 +- ppxlib/Ppxlib_metaquot/Expr/index.html | 4 +- .../argument-1-M/class-std_lifters/index.html | 4 +- .../Make/argument-1-M/index.html | 6 +- ppxlib/Ppxlib_metaquot/Make/index.html | 4 +- ppxlib/Ppxlib_metaquot/Patt/index.html | 4 +- ppxlib/Ppxlib_metaquot/index.html | 2 +- .../class-expression_lifters/index.html | 11 +- .../class-pattern_lifters/index.html | 8 +- ppxlib/Ppxlib_metaquot_lifters/index.html | 2 +- ppxlib/Ppxlib_print_diff/index.html | 14 +- .../Ppx_driver_runner/index.html | 2 +- ppxlib/Ppxlib_runner/index.html | 2 +- .../index.html | 2 +- .../Ppx_driver_runner_as_ppx/index.html | 2 +- ppxlib/Ppxlib_runner_as_ppx/index.html | 2 +- .../index.html | 2 +- .../Backends/class-reconstructors/index.html | 11 +- .../Backends/class-type-what/index.html | 12 +- ppxlib/Ppxlib_traverse/Backends/index.html | 2 +- ppxlib/Ppxlib_traverse/index.html | 50 +- ppxlib/Ppxlib_traverse_builtins/T/index.html | 2 +- .../class-fold/index.html | 2 +- .../class-fold_map/index.html | 4 +- .../class-iter/index.html | 2 +- .../class-lift/index.html | 4 +- .../class-lift_map_with_context/index.html | 10 +- .../class-map/index.html | 2 +- .../class-map_with_context/index.html | 11 +- .../index.html | 4 +- .../class-type-std_lifters/index.html | 2 +- ppxlib/Ppxlib_traverse_builtins/index.html | 2 +- ppxlib/Stdppx/Bool/index.html | 2 +- ppxlib/Stdppx/Bytes/index.html | 35 +- ppxlib/Stdppx/Char/index.html | 2 +- ppxlib/Stdppx/Either/index.html | 2 +- ppxlib/Stdppx/Exn/index.html | 2 +- ppxlib/Stdppx/Float/index.html | 2 +- ppxlib/Stdppx/Fn/index.html | 2 +- ppxlib/Stdppx/Hashtbl/index.html | 128 +- ppxlib/Stdppx/In_channel/index.html | 2 +- ppxlib/Stdppx/Int/index.html | 2 +- ppxlib/Stdppx/List/index.html | 20 +- ppxlib/Stdppx/NonEmptyList/index.html | 2 +- ppxlib/Stdppx/Option/index.html | 2 +- ppxlib/Stdppx/Out_channel/index.html | 22 +- ppxlib/Stdppx/Poly/index.html | 2 +- ppxlib/Stdppx/Result/index.html | 2 +- ppxlib/Stdppx/String/Map/index.html | 4 +- ppxlib/Stdppx/String/Set/index.html | 2 +- ppxlib/Stdppx/String/index.html | 14 +- ppxlib/Stdppx/index.html | 17 +- .../Stdppx/module-type-Comparisons/index.html | 2 +- ppxlib/ast-traversal.html | 24 +- ppxlib/driver.html | 45 +- ppxlib/examples.html | 4 +- ppxlib/generating-code.html | 120 +- ppxlib/good-practices.html | 147 ++- ppxlib/index.html | 2 +- ppxlib/matching-code.html | 227 ++-- ppxlib/quick_intro.html | 2 +- ppxlib/writing-ppxs.html | 128 +- sexplib0/Sexplib0/Sexp/Private/index.html | 10 +- sexplib0/Sexplib0/Sexp/index.html | 8 +- .../For_unit_tests_only/index.html | 2 +- .../Sexp_conv/Exn_converter/index.html | 8 +- sexplib0/Sexplib0/Sexp_conv/index.html | 17 +- sexplib0/Sexplib0/Sexp_conv_error/index.html | 8 +- .../Sexp_conv_labeled_tuple/Fields/index.html | 2 +- .../Sexp_conv_labeled_tuple/index.html | 10 +- .../Sexp_conv_record/Fields/index.html | 2 +- .../Sexplib0/Sexp_conv_record/Kind/index.html | 2 +- sexplib0/Sexplib0/Sexp_conv_record/index.html | 26 +- sexplib0/Sexplib0/Sexp_grammar/index.html | 74 +- sexplib0/Sexplib0/Sexpable/index.html | 2 +- .../Sexpable/module-type-S/index.html | 2 +- .../Sexpable/module-type-S1/index.html | 2 +- .../Sexpable/module-type-S2/index.html | 2 +- .../Sexpable/module-type-S3/index.html | 4 +- sexplib0/Sexplib0/index.html | 2 +- sexplib0/Sexplib0__/index.html | 2 +- sexplib0/Sexplib0__Sexp/index.html | 2 +- sexplib0/Sexplib0__Sexp_conv/index.html | 2 +- sexplib0/Sexplib0__Sexp_conv_error/index.html | 2 +- .../Sexplib0__Sexp_conv_grammar/index.html | 2 +- .../index.html | 2 +- .../Sexplib0__Sexp_conv_record/index.html | 2 +- sexplib0/Sexplib0__Sexp_grammar/index.html | 2 +- sexplib0/Sexplib0__Sexpable/index.html | 2 +- sexplib0/index.html | 2 +- trace-fuchsia/Trace_fuchsia/Buf/index.html | 2 +- .../Trace_fuchsia/Buf_chain/index.html | 2 +- .../Trace_fuchsia/Buf_pool/index.html | 2 +- .../Trace_fuchsia/Exporter/index.html | 2 +- .../Subscriber/Callbacks/index.html | 74 +- .../Trace_fuchsia/Subscriber/index.html | 10 +- .../Trace_fuchsia/Writer/Argument/index.html | 2 +- .../Trace_fuchsia/Writer/Arguments/index.html | 2 +- .../Writer/Event/Async_begin/index.html | 20 +- .../Writer/Event/Async_end/index.html | 20 +- .../Writer/Event/Counter/index.html | 18 +- .../Writer/Event/Duration_begin/index.html | 18 +- .../Writer/Event/Duration_complete/index.html | 20 +- .../Writer/Event/Duration_end/index.html | 18 +- .../Writer/Event/Instant/index.html | 18 +- .../Trace_fuchsia/Writer/Event/index.html | 2 +- .../Trace_fuchsia/Writer/I64/index.html | 2 +- .../Writer/Kernel_object/index.html | 12 +- .../Metadata/Initialization_record/index.html | 2 +- .../Writer/Metadata/Magic_record/index.html | 2 +- .../Writer/Metadata/Provider_info/index.html | 2 +- .../Metadata/Provider_section/index.html | 2 +- .../Writer/Metadata/Trace_info/index.html | 2 +- .../Trace_fuchsia/Writer/Metadata/index.html | 2 +- .../Trace_fuchsia/Writer/Str_ref/index.html | 2 +- .../Writer/Thread_record/index.html | 2 +- .../Writer/Thread_ref/index.html | 2 +- .../Trace_fuchsia/Writer/Util/index.html | 2 +- trace-fuchsia/Trace_fuchsia/Writer/index.html | 2 +- trace-fuchsia/Trace_fuchsia/index.html | 2 +- trace-fuchsia/Trace_fuchsia__/index.html | 2 +- trace-fuchsia/Trace_fuchsia__Buf/index.html | 2 +- .../Trace_fuchsia__Buf_chain/index.html | 2 +- .../Trace_fuchsia__Buf_pool/index.html | 2 +- .../Trace_fuchsia__Common_/index.html | 2 +- .../Trace_fuchsia__Exporter/index.html | 2 +- trace-fuchsia/Trace_fuchsia__Lock/index.html | 2 +- .../Trace_fuchsia__Subscriber/index.html | 2 +- trace-fuchsia/Trace_fuchsia__Time/index.html | 2 +- trace-fuchsia/Trace_fuchsia__Util/index.html | 2 +- .../Trace_fuchsia__Writer/index.html | 2 +- trace-fuchsia/index.html | 2 +- trace-tef/Trace_tef/Exporter/index.html | 2 +- .../Trace_tef/Subscriber/Buf_pool/index.html | 2 +- .../Trace_tef/Subscriber/Callbacks/index.html | 74 +- trace-tef/Trace_tef/Subscriber/index.html | 10 +- trace-tef/Trace_tef/Writer/index.html | 70 +- trace-tef/Trace_tef/index.html | 2 +- trace-tef/Trace_tef__/index.html | 2 +- trace-tef/Trace_tef__Common_/index.html | 2 +- trace-tef/Trace_tef__Emit_tef/index.html | 2 +- trace-tef/Trace_tef__Exporter/index.html | 2 +- trace-tef/Trace_tef__Subscriber/index.html | 2 +- trace-tef/Trace_tef__Writer/index.html | 2 +- trace-tef/Trace_tef_tldrs/index.html | 2 +- trace-tef/index.html | 2 +- trace/Trace/index.html | 86 +- trace/Trace_core/Collector/index.html | 2 +- .../Collector/module-type-S/index.html | 40 +- trace/Trace_core/Level/index.html | 2 +- trace/Trace_core/Meta_map/Key/index.html | 2 +- trace/Trace_core/Meta_map/M/index.html | 4 +- trace/Trace_core/Meta_map/index.html | 2 +- .../Meta_map/module-type-KEY_IMPL/index.html | 2 +- trace/Trace_core/index.html | 86 +- trace/Trace_core__/index.html | 2 +- trace/Trace_core__Atomic_/index.html | 2 +- trace/Trace_core__Collector/index.html | 2 +- trace/Trace_core__Level/index.html | 2 +- trace/Trace_core__Meta_map/index.html | 2 +- trace/Trace_core__Types/index.html | 2 +- trace/Trace_event/Event/index.html | 2 +- .../Subscriber/Callbacks/index.html | 74 +- trace/Trace_event/Subscriber/index.html | 4 +- trace/Trace_event/index.html | 2 +- trace/Trace_event__Event/index.html | 2 +- trace/Trace_event__Subscriber/index.html | 2 +- .../Trace_private_util/Domain_util/index.html | 2 +- trace/Trace_private_util/Rpool/index.html | 10 +- trace/Trace_private_util/index.html | 2 +- .../index.html | 2 +- trace/Trace_private_util__Rpool/index.html | 2 +- .../Callbacks/Dummy/index.html | 60 +- trace/Trace_subscriber/Callbacks/index.html | 12 +- .../Callbacks/module-type-S/index.html | 74 +- trace/Trace_subscriber/Span_tbl/index.html | 2 +- trace/Trace_subscriber/Subscriber/index.html | 2 +- trace/Trace_subscriber/index.html | 2 +- trace/Trace_subscriber__/index.html | 2 +- trace/Trace_subscriber__Callbacks/index.html | 2 +- trace/Trace_subscriber__Span_tbl/index.html | 2 +- trace/Trace_subscriber__Subscriber/index.html | 2 +- trace/Trace_subscriber__Types/index.html | 2 +- trace/index.html | 2 +- 1572 files changed, 8657 insertions(+), 8204 deletions(-) create mode 100644 fonts/fira-mono-v14-latin-500.woff2 create mode 100644 fonts/fira-mono-v14-latin-regular.woff2 create mode 100644 fonts/fira-sans-v17-latin-500.woff2 create mode 100644 fonts/fira-sans-v17-latin-500italic.woff2 create mode 100644 fonts/fira-sans-v17-latin-700.woff2 create mode 100644 fonts/fira-sans-v17-latin-700italic.woff2 create mode 100644 fonts/fira-sans-v17-latin-italic.woff2 create mode 100644 fonts/fira-sans-v17-latin-regular.woff2 create mode 100644 fonts/noticia-text-v15-latin-700.woff2 create mode 100644 fonts/noticia-text-v15-latin-italic.woff2 create mode 100644 fonts/noticia-text-v15-latin-regular.woff2 create mode 100644 mtime/Mtime_top/index.html create mode 100644 odoc_search.js diff --git a/fonts/fira-mono-v14-latin-500.woff2 b/fonts/fira-mono-v14-latin-500.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..9d07a635ad643cebf9c65bce8dbdad1b6286bd90 GIT binary patch literal 16148 zcmV+vKkLAEPew8T0RR9106!D}5dZ)H0EXZI06ww+0RR9100000000000000000000 z0000Q92*`Sh$IGJ0EB!9ff5Oq7ZC^wfyrortaJ;68UO({0we>6LIfZMgH#8J91MXV z8!B}L)5X2Q1gnwXrV$mB?@I`n3 z;6bfGf(9kJ^ufdL1f{4?MpF2kzufrf2#tM`3so#z_w0WrB;gRA!iT89sHkxklt4&S z@?Qv_)a{ZTmBEp2A?T?}Y|VmIu}U^#RE$go`=S_$jgeplX5L4n zl@I?bRekUMzq+xlxuvPu8BqZNhF8=AXy;1HHUHl-O9NQXorRP>iegY zEfWOzlC#uQx*#h)JA|-jEa0?t7&CUA+6MRE2l&4^|MOlMFtH>fNVa1;dBkT%1DK(9 z)h@g2e)m5g>e5ror*sRmKfo;6g>?-9KSLyYEo@_m_4%K*8X_L#hY#M}Yt~rCRwY4` zF>Kc4aHMiOz4ST&A&zA()I0#nA1PBQ212?0pRV8ENjAv68D2$iMM+UXkB>xH!g~S2 zIl*OyGC8zv%fr5yRmleNe9u?;dsEH!zg?~bQVxW|4CSoT#n`XH+4MP=cIBdT`|4OzsJeD6=lgN)_oX_f(VtLa8$o zYC#&d4VyomSwR#!Q(z-t#mbw7g6DPayyWE$@usoQoK6c^HRCPbE%WE3E8*_BrIxyd z(XCWqbp{;srX(fXT&heK>7zOhLLhRA%d!&$mVH?^09kxCxUes$xXeEW$u`^@W;c zK~xm3iplc>g0w2ob?z4wM%T}oHeg7bejo+uRRzNXCPCE1^`=>g7fUKMa*127q8IMH zaLiqTmy;iL%&&g)JAiUkkAIzyyXX&p`b!u-6)IJ!R-;y(dJP&KcEmkD_&GWttZ+gE zg!f}RF2qDuHX(*UHHC}tI%LVqOv(13B$x}QV2Itt+z4C!iN4c3pQsK-q2wR)6gPaGJi0uaXVun~yP{lFud(k7rGEf$4FD|xhLucHOO+b{tB=9z!8~Ks z4-FqG59EX32SN8Q-am`33IiMfaN`RA-zi<+4r7F4l~vo;UH6k`j@~hhIs1PP>~q?b zJxg{y@U?GD`y>K49()9(%aADx90C#=Mh*%Zx?BuQJbZZsL{6J`$S)@_@EtV`9Rmw1 z8#|vuenpA})vDK^QIlpJI(6yR=cEr#x$S|2uKLW!KKH~c|9WA-HQ%}FWdQ#DV!Ii? zeeb#5{@AA6IZHHawS^rER-D*y;KEBpvJ|Ocz#yO!Wh21CA;J3*5f=*^hY(eWoP?B; zjDm`mSpg#xFDDl_y;7CRl&ePrMa?R$$ri%M=s=tGZx_h7J&49716Eqef>H8aHj7{Hg}C z-Jt~w#}zIMDS=Hub3Ow>TNQ&8#6djB@np$)Bh9hhAtk zZE$Bo+i~G0jb<}W`BT~p;TF>!(W6a;pnjc!1qTK6AZC~V*Wc%(@9!xj*K}BZf zM|9@@Ac@=@plXVu#HFdTNZ2T9DOj3UQV)r#z*rF{vW^&W6>K8o=)nOZ zPfsc%A$3@S7~cC5ijWM-5IW#E_VRF2*H-rdXPAR{s-zm4)`6eo&67{fr@W=7dfgLx zXlj`hGRT<=r&T~g&*+JJ1n5v9;Te~*%vK?~g4hsHDH9BP5g~jwcr)$4oF6&mO8ywF z#RLMe2+>WhK~$FzgGj%^#Tv^cJZ1o{a~`CD;f#pZfzKIrBnT@`Yb2zi0wVXn5tc9x z6j{*WZZdfkapaXh2qpn;T=)5JD_V~`J8G#XkIka9rN)*^X8Ic{j0 zxeKDxD%2g$ZdPO63%Z-XTv`-SiLON_yKa6Y8#~4m(xgP|1)7;k(c%V^N(#E!xR_{* zP4ymK?TR`qHadj6p*W5Y^2V<&=|t%c%AcP6Tka0+RPriDr=pZf7JGnp-$OCFRB}6w z(cRkyjUpe0_Nc&6`jisu1M;rjGvL3>_{=)eW%0;(I#OlbL?t&~#pqQ)DY%_zuc;Bz zuWP ziHJSkPs6mWG7Rmi(PP><-_UkjQOR>m?r7ZMqU#n6OBccH2i3D%OQ~QmcqDA}J=1nn znbrq)d@^k_Lbhd3b0ykzv!VVFO0j7-ohW#mcE8929k8St>O~;qk?SP}CDa8irbDr! z6G~Z%9$!8V!3=sbVAnMRS@>nLs)}JvH9`W}8k$2~OGj7_U2&07X?nwog+y##aZ>kk zO%j?Z`}$?!$SULG_}!~_df}rHdcAQ+<|FiZUWgPfyYsz=JaC<$nVrxWLkjQ#C8+1Be6SyV)i8Vn~(#E!wIMyNgOvJ zC(`3ILVutyXVn{q{W#AE7k89Gd@k1kJXbZqbq!o^SbT2R!7X<+$bAj+P=h=khIpzW zo@#%4xVCC3!iT+fgcPhr3FOJO&(3OUk&dEXL(TfuLS)4Ty2eforQKaQW2k zXZ^BOZB`b$N4nQauh%)7Gt@I~1emjF54LurzE`gMn7L}NECDL#;k~T!s=wcud)x1< z-HW&WhB{bh2j}DchTC;snjG}byzZvFPos~gJLsJAyx;R)uh-pOf@|)zz1?`DmETEQ zV{nQexNz4T?pQMZ4Lokm;P3NCMK>^Rqzo_(%qs3y&~V6$Nmr$?*ql9`~_#+q%iOu?r(HStwzcHaOrlf`e zJNrYOaO3CyGD(^J+_4z(VNg-XRQ&~_w?N~f(mh@AMSS4uTD>&bqmSyi!1@H@zD>m_ z_|J_Ot41Q-JRAO=+7SeVwQx?v5~;AqHgLL*#GeI|lCx)KQgv4P?}GFnjKpCc;I@E2 z<2lL+HsSj7(6FT1xad9SnH-W5IC{uN1g(Y+qQI^na-XB?KdM+Ho;9>47%W<%PoRZRCmWhm@^t~dI(CONK_w0u$c z;Y@?C4Z^zN)+sy1wGoUCbreNpU_oiFSSR;Jq-rjhhMsorh-sQ4V1l=4tMQlK_-f@Z zCM1Dd-bpW~C%Y_aA@89Yr;?g-Z`;UwefAC}uk`DBNL#p|o?-Pe>&kT9e3T0 z@_ZOk8zcWCV4_CcWih@nU9W?#eNVY22R;4&>x`CHEZ);*+BX)-R{9&j^)7QeZyd0Yg>9JFV_!dJG&96H zeB|xpHjAwO5U0h5hhW~Cp5B0zSpU&3cPA{8;D z*vkH$wIzCuab3GUqqYuFQ^jkGXk27u5RiqISOzo*DEHx0v*K2gkq^4fN0)zditDX6 zCSFN6;+%kt;1~;hs&lbC-KyWKZVO!PlU{W6g2!jxrdRFk?l%H=Z2GVdp&F)ZchrGw zyc4cyT*vc`t((2N4L|6dIG|%(kW|dk3*%fd*iQHI{z(+ zmku`0wA87Firb4gGGtl`K{$YC64PC!lj0&D83}|JN5l=6y=k@hYzmq>MeC6>^24Ck z$T$S;<2i`{LKn~J%^6gCbq5E;?qjhF^>hDwV4CM?jf(TPOQUvXbjuKnM=&&hU5oB| zcdN-#N3ctGF1jPAjH_|jJu0UN){L#Sjt}3&8aJg9+EXeCI zHt;zH;#>#G00U&4$Ph|CRlocpy->Ujrc*9ZA7L>p7U_40?NN(s%UYDbFPj#`R1gRo zgg&j$c=ZR!42O=s z36`mJOmAB@D#lovBI^!J4HpO3Q$t+#xpZv{!g#S`w$5l7R@|Y1OwVz8x>fV?DgdEV zbcHTX)#l?^w@=>?By%*C|Ax> zzS1a8qzqk}K+!x=`S z_GQY9T@5F`XW{Ju)Fa=v-W~}8+QS3Q&T)Unu9X6C*A0T?6lL9t>jl!=$BKi@`%U6w zCW&*NDcb>Zf&geSWPso_h=?;Oj;w9x-HCM2ZgWvIB%>;cQG(Jxe`wr)%t0->Y{t*V>H{O8n_chz6ATh@Zd!^LsnKGwYdLfH~)` zxb+tZ^jC~sW+tGFj_FOYE;!*?UxYgX+d91~#)Zcmk6nK3P_ucxZoSYN+>~Rbi_MwObZB)BCub3W|dt~&&z`*Fa$?c<;{E+jL z?epYw^m^)DFi$Z@2gBwgo>z&s)^BIlMecxCxHGd`)`>RP-=GII39oi_ytdCNFnr;* zTZ?~XrR%e1bL^@04NHEz|F@s!znP89SjSg1DR69wb4mC(SM%H{Se#v7b$IGv^@%!; zlh!xBEVrM{qxUZ_OKtlYdzM+Yw4u-bs%3g+WNBSp=gE*JEyrts_h88`?f- z>i71xPPg7n^(%Gx1uDHnMalhDHetXU;+>i-Lk+HqsVKnYbq$`G+%bBwe_&*0XXkv$ zuwE~jvtYh#SgV%|FCe0}IEqwhmq_#WL-f$r>GN^dI|T~1#`dREq2%Y2vgeBZ?M&-t zzb{`^pbm-6d^Tdip-?lb)?dIC+H0wbMLw%gp%NDI6ciHViUR&a5LV^)lFD1{_X8O* z{%a8M_bOg(tx(_8J5+za^^`NunlH(-I#0DhKAdX*VruReQ@vZ|kk|9&|Ed04=$Z<# zrP`+*il_O~D*WWs+}ES8d(H_zY8_gWy*9h&Uc)&VwxTuimpy}9RohkFzwCxVieidB z_6FVx0;heRSG2!Mq0TJ5HG1NbGn-}hdvvy8Pp2NuILn7>;|d|h0LEKg?Q{HfQ6Rz4 z+QbGWgHF6fR{3C2sgPMfYpx*|JT**}zEwiV6%1#*6ql>Ccy#t^R}~pk<;&a~4_52Y z`CJJh{iTFRA(?TiaL0Cl8LcOOa#uvBli_g4&hCwZvL9dSaHR60WpjEP)|R<*CAQ#C zjj_lr^M!$uGLDaf-YtFID;Zp6l#v-~N(q|PHE%_qMbzJ_F;^GlGnMb9GJT*ppm)hw z>mJZAb75(G-O`YP$fx|f{SQ0pAtC?2AAbr)N>=J|)L?LY$inFJt0WeF+!nkrP;$OO zM%BMvm>>LZaQe@5lRf?~mG(Py!O;5%LO4Goa_k|w3G7$!eO zLfN(RSR7tj$aCe;Wkl0F=b)z|o2cTI!Ar-uW+fJjET#F>8a^5FVCpxbipAyHgH(wF zP?og_H|%9FYuF4vr?zta^}Da^IGR>#HVlPAG#(x!As2Uter${(rd~>!4~Ne~qB`IR z)nhn6X5DyhUAM*>RoZE(eQu(%Qc^k)@D3Dm9vnU&>D;z-|LQ}CB*#F;V0D%AzExtl z9r~#;cK+=@FbjS_K72Hclq{8-@l%k3dW*^JHon)ioxlj10 zmL=Ldhnd-`6xl#?cA-0=BvKLSCgy6j7X462o4frDGFw6_?g?pK&t>3*iNEo75x8y# z94v$2enc;$Yjr5fc(32+gA=fx6@!C)E1Q~omk;;%uWk}Lh5nLKL7_+_@Rye0Kq2|N zFZjKVUUk!D+1<`8e4jb5&&mE9Nt5NYIWzIyr&&UOX?tyb(NmCcK;RFyd+GyEL8=s( zX>!sF-BNsv;bl!Yl|Kffj-B zmRF)(Bv?eeRa1`k5O;xLX?@jeN^OKUjj_L#0Og+=2^6Vgt>tx%G>`8qEoXY!wbwt~ zrpJ=b=lYqjvk8y-x0ARO#*_w2ert@K%~pBK{9|)_>(-XI9Or{9FFSjl^li7K_BFIF z`J%b5*zCwCxLjk#n~fo(d0R>sT<(_1{w`2oL1jSQerK9fAyqb6OWJHgno31AmF1;Y zw>LO4>`Iko#2TFA(B{db&2TcS`$^Cy#r*X}nJy(GiR*cbmeF_&i<7|77UT2^9O)}E zZfgHW#t#svGi%FBGvFRPBTfMcrPekyRV;rVWlAG^OA5{KHfvjZW9*#6v6e{~=>(m9 z9j9enpP*{6*)l?Ye<-m8C_m;Q&<%QvVIZWfA3l}PHFtV+x&=}rXwPq7;7+LH+|Z7O z1^7rw?nljYftuUe{mK(XXw+xPqCpeL{Vp5byS><`^54ab}FG`?uF3{ zEy(wt7|%*;W-#14&zc^jbw6?HR43DZiAa|*Z{A#_gyR%8tw`Rat>kB5@6*!XL%>Qq z+yMVuJd8m}F%U?meRS5Cdu;yVC!wx#8KbO-mtWGg0J{qk>oqk)`0WbEOvX>NdfRS3dM-AK1PJbiDY4mHdN0`n*oabu#It3ZqW}&$xqmOUXEUm^X zh$CSkew9?SASF^MbniDO)Wc?d#Z`|f;2OV(m*;I@>J4>FuAAFFBIwQ4@C8C^DS;~} z#^;&%Qrzd>C#M`ZT04{3mitGJRf71~OD*O|gkrHw%)qZc*RiyJvFXrc)nas}d13al z?&!*VjTgW(Y(`M76;@Ys<*??5Q(>)~QbnFnuT%4-Y#!uU`u}kW{{vkPi%+Yy7V30X zpH^$}>AbAJQPN87$rspGfzmf3YGNbaWTYPhL;e*XdlxC)#HAov5)QM!DuQ61?YP2c zDww%!yF_ZVd9*rTkzMphS;*Ve`yB%IM>>s}e>H364>JlFZ*vm*^vC(L_w7JXoE(F} z%A)X%DZf8}@S_s@w>m8@xH0JH*zOD70;(Nepcwl*~9Q18eoUtL;g%hk~@riFzH@582% znvUO>ejDUSLr z&j2?E{@^244i=hoSlFB#F*65;Y0MLY%VA;>*28ja`mJY%LoV9Q7wcMT@-hz8-m-5K<-81FeKtMB1iZ7Oh%UTK%PN}XL{o=`KwMn z)|nltoBW6dP#{-hwn883EX|e;fwT?e)T6c7x*o3k9E3d7-t2K^)|8r=04Y~X#7$aX zU53@dueSzGx;^?@pAOGnL(Nv9rgeN*`A8)DGy-`VX+(>#==JS8+(PV%hfvteb5zWe zl6nWWk@Z}~tA6ZG1bH@rx)VSi)}!i1H^m$sut=B{>%w5u&U|M$=%ihb;ihBj5j2t% zJg32h5C2Cw*ZZRIMdtOV{6pNN<57v+U29K{@RFmFj`L>tw(5|?m=Kw~FCvC2$D6z+ zIi3oNNZuEjU<^sC1qpMMh~w;!qpAo7uR%qm#wG8~XSMNXcuB{jl6c47{Bez!7*(AH z_dL%g1wCXWd3L_u=}toLX|v6*c6w&}q?_UGowS^W`jHs3nN68t8~ z-pJ_aN_U|<6J7x>1ZTEa)D+faF0K$4iZh?%_dPUR87Y3?zV_DO50uJ*jZv!S((Z@r zzwfy(%|r$9ha3@{mZ`?%)jWw=9GpM3gcvc4Df{U9P%g6oktKGEen0%EAVRziN*)VDq+itt%uu&CC zV=vF)NY<#rpTE~vE)Xch`2sngpC`{3=PCGA-m@b`MC!RgRph+@yt348stg5U#K(1C;BithNU$Rfn=rXu8-BdnYY|zD7 zeo2&nW51oKI0~|9403`RyuDn8G1mIh{8-^4k@w%i%kqW3h1>Vl zOr+#fTKKMZqHqE=;hR85R+kJs;+PzF9k-cQU}U88uJaDZJn*Pw_!00)cj#HYtvgRXn>_huc7aE!Ebz+ZMz2!geq3^>>>CRCdnoi9T47#5-kp;tE2Mk}9pEsf z-4|TxS-GZk&A4a$zM9IvVB9;tpzJ7X%9f)R`W8BNoqw--f6>kpy=&;5@?ECwx>aR$ zm>f2h&1u3$AG4Q_NY#C9qYtk|)ha411C47!CX%Df0N3Z>#9Ll$fEo?wY^dtr)<>ZzPf6r|=m}Qtv7A35iY}nYyIqQHN5|q0uPXI}|HMTiFh_vZFhTrp?D;7V-JafS1kZ zAboM;ThL0Z5m|_q*e@Z4wzwlB3AJErkMf`MfuZ1EdG0F8WE2)XQ>qe zJW0Y{Cs#IF3#)V-vigN2Er)>WaV5GLtdyOV#G)QZ;CkNC-5E z_L~H)encca#$X0BFPM1kJ9J!QEmrFQ3d$Yj%GBfspv-W0~%nSY||ACK5D!=wfurent9{M>UCZY9{ zN21L+F7RR5H>Q)f8-cKK-1MMjz;bbZiza#dzj6pf0fj0c5INKmRy#BiJWl@nGYi85 zOlMxurn56d%aO8c_ho_CFT~8f;H)zlrZi^wzvLU*n8dcLj|3~QXr3STbWjfggvox!-)LH5*gdAoA|Lys|jxkIjiH4j2iCVWZ|J7EGgG^;LQ_WN} zWx)l>az>e=+r6^*0i-KB!VR!K%^eGd{h42U&%Z6)%vR>)K6DT<8 zpMWuCNGZW!?TEk#ZtxhmvV^@0NioM5_){stgNneI0L`|{hXo}fMTUMmMuwO;QSO#pXRw5Qse zSG^i552TmXSG`awX$#wHMk}Ollv+VPkN8m8e1+)aJcg%^2I_M-kYnynCkLwte1-6s z&L$@_wkzKE_%YW`I^p*>b>ZM-ws@ey?K9!%OaNZs5*J{1iVhOekTI*aHuWPzB{PK= z=1odbGKC^FC|2r&U;`>UNT{YZqn|A(d}AA!mne7Td1)lRS=BXzuUjK zQ37OS)Gq`;d}Q2eNSimrQ7<0Y?v%vsF_+nppxm{Tb4bE+Fj%?Ns)lW|UfVN08z_=V zZ0IsEX3~ugDP>z06JWQ!`%2LxDdgx5nRFe?p8!B%Hg|(pjDHP16DX^wjkPXflL{@- zk-Fmqv`UXjCu%lo=Pmrkf#}e=foi)L^31^G))3A{eAn;HLTw4*z;u8b){M(>w8r?= zHlP4BG#Y7iHXz5y#!wx=sMs(D%~kbKMs$+NgbDFx!A6 zt+}QMTa?q|um(!HA`nfCl^SmL-XJ zvV{dWVI#@fyPBAV>~Iw?+(+Lpouzz-e~LL#UKVAcn>tA_%Y8_gCnd}@{dX{EUb}6R zB+b-}Nu5-SG;4D^zvD<933FMK4J4SzFC?q%wsBVt8taY?(W*}n)IMe;oAUrpZDmEB@6m7EjEsMhF~tkXsI!2pJKQ+@#3pQ{X~G_09Ts=|BHr)~9o-gEjzW9TDT??Bh~S<&7jj!IqG=W`ha@c8K^FKNNQ3 zdtZL`SCpS&oBMayR`RT|%7k*s#1K6!IZy@L)bZ(Ps(5PU#5l-P6^L&qpU^|^eIueP zj#BoN35vfQ?~@;2ewepA5svp0_v*~1W)Q-Flyb+3%u&EIH4P_LL>ib_%$|!Va(S3~ zK-D!p>jX_EoRDe}Lng=2B^y)(L>0Y^2Gf;LfX-#RHhj5h>4Z78l4-1%1CJK;PZR4@ zGgjoJL2J}orldQepC7c+6WO5lf<%T+CmHo>3y4{%wCu#x=EWjsm2_PY43LP&6cZC9 zQBy_XJ|UQzKWD=i779PiLcWw;**~X*aLQFODsYhq`Ou+`TeJ|SXI*6|P62-)?I=>0 z#2=;(iUQEWRxmD3Cv^PWwyx4}3e{*QxZyG3i!pbI&=PN27e6{x5Wa>o6e4E*=iC>; zRSca+50>5U)D{bbi5d;kgjr0SCNXgz>)kM|Bc+a$P&AFas;T}#R9G~|BdZ4a~FsY}8gGmg)KPgxE*v!I%J?mA$;oo`NC zH+7>JP(ebH6YU(@Op%B46eH$wwVUE5%oOKlW-!^0QIXTsrPHYjeruX`+A%bofMD;8 z!(avkyTKt2p~T9%uxfKtuW;`(qJdA*{_>GH)A+HdemK=^l=LbFPZWwUjje=L;6oV~ zB`g9o8nn70fD`cQoSk4F@uth1`KMpueu=_FL0J&zP6fa7_$Ua$-?jr##4knr8Q9%oFK3L9ksL^DS zRi)+XMFbpIv1vTIvb#mJfx@`^8H`6Qol;&0^4KInbrp?f@WGOR%#e2C2s84x1A^#k z?}?Ek_P&EVczShtT=O*IX031PGREL0N>I**(p*ETQaB2p9@{KDS(zSk(`8qpjAg+G zMdX_S@=jSp`g;~#)d4_zN9{lz?jl$?+@dnQ^omat*#?%~oTP=1Vk9Um71?^jmB#u$ zdZ{ywWY_~pbI8a@Q{k|w_5qXYab{sl4BE6qm4lvzwK4p@$7@jx)wMcw{?>3(k-xsjgUtdRFKZlf&>hqjVv}; zG+~rsMA_EVs)%3^=m|Gy?7K)y2hi%ozlIQ5!+Z{RGl+kIvt z8=A^1NRF7IN0dGHN&3Cw&4C6epKZBO%(6h;gjlU3e~c#4d>i80?*lV10&b(x@Xq^Ymub= zyD}bT`7$?eG}5S`BU;ciXjJZK=s4~kCF+X@poPC4K2F<=n!ihnx)}s9C z1E0^mYJ+8qBWYZ){*o52aG!Wn)D8z~^Yq5S_WxS}xR5~Cftb?Vq|%w`D*9<-N<78< z#?p|)Ab|3S>)P6V;QcF%*2cLknnt8h8Q%gPLt9eLmObsL@)H{*JAUjkJq>W;g|%e( zKhq!qAd+>#y;Xa3=IBaW7gat~QDlkw`p{dmMN^kWp8ZFHw927uyC6ujTusbZd9F$# zWFF;&F9}m}b3Z+g^0v;d1=_V;MiC!4Yn70X`m)N2ImV1-8WM-r&Bju9r(LaNQ@@kYjFs99L!e7TCg5Qpo+|Ow;=zg|5E1dpEh549T z{OkMNyMja9Lm3V_$1&-Tv{MLl6|1EXf_gpi{9t_DIiM z{rq>x_+okO?1@2fl?5Brrpl&b2kqE@EQr{}%dT}6*lkxJf|gzGDuBx(5hH_V(iNtg zVJG&Q%hvgR?3sO|Ga9=c-at+gf&|5nc|P45O#-b$2-YI0MZ)Ka&(ZeJN5Nc8m&ZO% zK8u^x+z;2Hhx*bE%qy|7$H<I6QHa~J1crL?UHiCxWlvQ z`tbw`P7@{VPFSSq$VW`@=QRZ`5bPp}c39h5=sj-ZH@FcuSv6X7RjCB3M(J3p;!m#| zCD*bZ){8Poxtli3^5F98PfKKW7(ccfR9D@P$y8hZi{O#D@S7i}kJ(ne=x?j7TFOF+Dm1E!1g62u&U)}4z^@rSv^~g_iY^E+9woS?Y>eE8uxZT+x z3KTE~oa@3YwcB1xr$VM&Q`7RGWNVuYIqs?b$+7FS8ph1AJyc@m{H{F0s`S18v5XRK zDx%oK3%;2Dr+>R=_C7mLBT?VPria(A#bg;vrl{2NKt#3_(9&Co(SDuV3$WZRx0k09 z_hOTj)98kNCBjX4=ng7xQ<5?lCPk29UJIbt&UEQVBZ<&ym}@-@Cvk!U><1=ChqdF@ zh7-;i0Z#y~^!CB!9CEl046f+uMtiYq17^sjogv3;H~3J3rCT$^}Ma4mDv3d6Vg zbjNO6m%}`bw53g!EDiR@RCfsM+sC!wB!!*bU@b_L{Iv|th(}(*!=}m-X{1Gs12B$Q z5$k+kpUEIp=qP}y2wd=EsgS|!RtaH)E(?7TpqyQU)}pXOoD9GL4gJkg3jNBFl08p} z9z>9V7;Xuz1V)$7AB4I2{#9bLCU8JDt6h>{RN{VtlHws-4KF#QI6I?f zK8led3{YdQ#`@IDyv8UXNl_E_;>bKLan2n>KJ3;@ADykcjU**J9n z5U9Ky_*MMz0$})IEu%vHwUG-f3JcVbxTYo;uyTs+6#@vst#m?`qF!4pghMfS01pm8 z0BTJlNPt<8ro?~%uxrU{|NplZ%LWR6O)_v03Bk1q|UW`BvuhJD7~_P12N=-0-V4{d7+SEc$(~Q3Vxzrjf}wztcIoV zfwf8k6R_yfHI|I`5ehs&hFh=)K7?zKWqp@eR0I@QZUXBu63D=?nn+;-VE^;{8>hnC+W zs9AN#XsyCjEk<2tH1>^3LB5HKfeLz?l_+pV0~wS&Rjy3+wyEb_MYAfEf3rwTR19<+ z@yY^nb_%lFLkCu)5{x=Yq8Xh)@>P*xg=$RDYIaKuB&18UDnYO>q)Rgns!~Y1(PB)y zWKqO?HZml;#46Wic1OajqXE^rHVwqwPf^lF)h=4DPPqzbFoSuo4V9GKS;~9$XNGP_ zNju>qU%&`uH(XO{zbFT^Q-M_m=XZGJuDj_L0wNN!+wQpQ9ttX2!o7IiDlpvlK&6M4 zS+mZ_-xD$&ii_tXAFJ}oG*g8_e-b4kf-~2uQ=>t>&0PE~RQrQQ=(*_i6oy@mma;kZBb&1mq+XzoEGro)^AXSG9KOsK;d6b2}#r>Y@3Co zN}C{yO)m8>?HOOa^eP-86`9CIAxcq++9Z=rG1WBF%`np}!9s)z6D~p|aqL_&kBkIM zs41)jpl!v1ldNPi0mZ~5VsPgmT8!BowuwJE?6&BLqfR?w$F4o6qAE^2a~;N(+l=TH z;Y5fap&)DziN~IZ!mBG}DN?0LH&=#Ciu?v6TD>NXYBj6kV2S%a^MSkMzVNlrV=P;a zTzT@%Q=pL3iM#biFUodIx{F+(}_OWdg;Q? z1*V0}a!7!l6QIC=78K};0tEte#efzJC{Um)`}8_)Xl_U3wE5=NmX6Wgj&rk}vcPD63s%Ew z`%*(>2&#brtx#a&7P*y`#m)7lvjX{HFzn)yc|~h4|6-`XYKdB(!BQE zuf1k{#o2jUS@Yf2em1JL7w-g#YXkE}>c#O}RqlvCz+bBlL_Y#(rj)u%0fGEZq51xC zxRufSJ(fI^I&E0XON^e1PgS0rK9v6-M+p2410jc^4*VU1sSOlDjy}EC@c(QmbRs!9 mf2}u&@BZ<$?q!(cboTo!`%LDv5p@sf{|Nm14^8{#Nge<~iWRp2 literal 0 HcmV?d00001 diff --git a/fonts/fira-mono-v14-latin-regular.woff2 b/fonts/fira-mono-v14-latin-regular.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..edc71a868ab6867ccab1e3b3b772033909548799 GIT binary patch literal 16284 zcmV;NKV!gmPew8T0RR9106&}n5dZ)H0Es9706#bY0RR9100000000000000000000 z0000Q92*`Sh$IGJ0EB!9ff5Oq7ZC^wfzB9#uvZI&8UO({0we>6LIfZMgKP(h91MXV z8zpx&%I*s)&>aB#k$RPvQIx6K%P|@m!Nvgu1;0V$|Nna27y}Bl?|wM29SQ}mN^#05 zb5%rF71~7=>Z}wlqj7IzahV?6XbxL98o^ec^YGD2)ySpJ?2Vg^_2LyPII4H)OML@d zF6GSl4U@H1U}ehqjZfI3k&GH1wfRIC;UE7a0w-)Nbzp39s_31(@Q8<+E3-WB3~U?u zlbpQ7f4|@N_S$CvLH(}*L#!qW*a4sdl(C6SMG*=aMSd!Z`Q4w-E8h<^vw};W2rj8x zsRi67Gr+s8$AzLfCR0HW1OeH~5`o9wiW5{6QE{U?)0VcE-E3(6pRJp9jdi!{>UMQ? zX5Ad|5B{Dz_eZK&>_>swFSi}5esuHyPlA*}g#<_`c#}}0W>51(Z2LB> ze_7r(-RtXv)c0{dJIPB`)D}RfVwl*5e{^n#L;VI?MF88`Gux*XrA26lyc1(1cCsc+DSg{BeP{`b6{X3?n_*j~%cH8)< zt*je{NEMy^pXfLKGJBb{AeoR|);X6Z_hY_0dmeLzCE^q3RPL+GuS#y!@84q226oSU z=z20{LM-^TU>bjKs@eYc7mz?mJ_8r2bJWE=JucJEO`Y4_|NmnD{sp+eg5)h1q(p+0 zM1qut1ZWZ>bT0*#wfrJ7SBIS@{6>}Lwi)`>uD(=vIO22eGT>h(wa9% z1Vuzv`UmvOSDVF2t~E>$a{Yd%oJfE%u%m(@JcWGnCzQLp5t>k<&OKje10^8-roa`j z9{p`1V0-oY{a9BBlp+yx*7;ftY~Amdzw1}dt8Kx^Y^e_(B%ao)la4IYlG7?(ES|xZ zdg(qa1xWbq)C_qD1*fLTfy14eA`1q4YLW~U`KKmGQ-(P;PKpxr$uVMz@|klPHOl2%u%m(Hs$Rnk7?XuXuhCcx~5DhMQ&PwAt=Fj3`a{7=0<87^M%54_|)# z1qc)*Scp)FG=hzpsAySlRF=EAuN65-Yv_(^tXqSH2Gtw5X-kCAFyucu7EU}(f z%Zp;|XSE3!#78K|1Nm1Pb&$t)lB)U)B3rlVtvsJ2>8?RC8k;lFx zFf8fuFLRx@EqY=}6dBJv_rgoBy!M7GH}0xb`|TSK(E&v-2gl&(YD|&0m`H{OU z%!EKS+CQ94eFzQ$^;z?rMJ5HkDY@6R7kjhdy~jYV19}-yll2C$*nqvG=fpt4*t+3Y z?J*d!R3)>)GweBH#9HU;QvIl3TO!OH27$@LU@-&?A0yMfshg>%pT9vbKwlo4{hy@k zFisa8-~Je}ls$SD1H+)sm-m^{{VuQvL??iHN5NSz5scef0JQ%F*nhW8wXJVcw%NB? z{Qdm*;NJs(-u-DopF{yifL!V>P+sy(rrIz)y-ILrGnF)1?S$L&w0x!o|ZUQ0AOemFAU_z!{WOG<3`?tZXV& z@~T#&UW-;CZ90VY>eDY`$Qh%~`r&=YeR9XgKJ|kcyeUsy_LWP14d5?5W+hqB?q_NK zN$^ywX`Z|lV2~&r8cRf)k_?%$D@Ro|M5Zc)FQ4CUcSjBAKwZ-e zH26Bu5KmLQu~vzqqYklRF)K#pk;l}NPn%lYozzO3v5EZb+u5>}Wm8fQZ$f-+(pwFp z`BwEVEMeSYx|Ol60XBFz0tN?}ywN%Y1nEh{)q?f+wrP~xX#i#pbU6K|yU$yP;i#xg ziP(-?voJRLFzx(-g&Q>s;g8sIT9HX+bJR7W%RFI*l?5@LvbTIig^)bCVj``QsW<}S z6mQ+(UE9acVy5EFn@6K^!x8$9WqCoeY54`&x zMU*_drY@zi`qH{UJBMg0pr*Gd@MTk1pMOJfYiXr0oQfC@gcVJ11C=cfY?Bf%QdwiE z!W|ZXHED@RcrYT5uC+ZZ75KdOfnD+F=)B+Fw1ryqh(zhPJ6VP;6QBPov^C}bhvtep z`Y7NXItD0cMGRxq!x{>)j{4X@5jIhb8z{jRN^x`G7^sLIEKSf)nxg*$I>Qpj%}U52 zgMtjG#25{*hB(%dzy^}oL=|qJA-2#6H+fB{MiI>hN4gP>1dOIaIQoh@;$m~;xouwB z_sIglfVxOYI+l)X>^!!ydYQ`#s*a{yl*RBt7p|#`<_eqA3|(vBw#E7ec?~(KafnQP z>6{d>U-10SY46K%S^MC?aSPNKEVcx`dNhgGf=@|D#{J8fhSU+$)g21TjMVTtI$-{Y`3sC1HAmr49N=k~lcs>XGtHtN4 zH{mDVuNLN=4y%#+Ua-$1GUty;|G8S7jY-6wh;{cBFyl<9G0jAA?DwF z=|TE*Y=jnjVl}9qYmAtLkS;k9(Qh?0>7r~7_284CX81I+e$J(h>mRz~1158`5m2zD zK2At?J86l}@}7t~QeWa;4s}7rG#9>x3bj}h)6O$M1N6A5{l#jz8>Z~{in@?g41uY0W1T`djEU@G0QL#Q(whzYNh#~%n1Ehz!X)VXb)_Aj3 zE5$Q7!U*8!%~odB6U}LO5eb^7H9|||YZ>3RydW=oUL6%cZk)TpU!(Mcf!=HhSSP5^ zXP%I<-W~;HoNt^#?~X=*b^^-4Akz=P!VxwX$gx8Rxqbj1j_?U2I3R>VKY$2F!~_6N z2%*#uAj1(kfdUtVQ0WIy;fR_*iW@?x^#kZ|R`nnOS`5iJ#gaylXtJ~gfkLxM`O)H` zX!THI8$hAmWOsCU7&<)+T^@$+g&aK|j$RK(pN9|oq4dj&D8Bi`{XN{AdOe1(=U-Lc z=?+5Id6L8!BzXx~g%^ik9m*B>7XDFrHgq?L1q?PhZb0rMET0{9$?%Kz0!nS}Qd&vI z&!|ujeJ`|7(|z^4mW9T&sjHFK0w_UDG!@Tv$yo&VvvAYwaPLjRt5`|ORp!-?kFZL+Xkk(!8WvZ%CT;;1lLiNt{ z?4_~?`;jI3`9mY8F!Aumbz-du>3Hr#FETP;JVzgWkn!&KR1jiq3PNJUt?%M-b(}mY zp?!5cZ*iT3Cy~zbd>0c(lA{NWC`NncC$W!2%tKrI{d;5Dwyx<&?292Dqs(&L%Z2s* zbzUk-eq0}{NDxH?=#fuA@BJnS<+D5Q@b5u+aJ}3c|IuN` zq2wjfV*!khC~250#&K53f)37+bl*nKc5O=bP;m&b3{rZ|%$Yt!ARz~Peij549LWJ< zE`zJeN2Cd}z1cMua(wF|B?7d(wmCYTQlb>bTC+Po(5>TdQ|FJ|sW5hv>YA`p>Jm=$ zD5y4ql58R&7fhgN;tefSsZR7#pAnm+EXM7WWx!IFiEmk{<`ZsGkZ2rlZLy7gVuP7j zf@lt6Q?!7xP}^*c%-Rx1Gc-F|ScPW_+`3223mr=RQb6s zT*c2qRP`;;HEB*fOVY%pI?FP;Q3-xewmx6VC$9K4N86Jn>{kCh4jJh2l>hkVG|$I3 zu~ZUup8rlwV1Ps>Y=|IDHl3uJiNTxsv*4LDxh0b;yZG;r4ZGmUlPifMZ4oNp|h#|Xzi4o3(Sy*N-dKSTL`+@7D>Q-p)V0!&^!oiHkn6 z+CM>;!?8;dPcpW9(mFl6( zMIS^ZaDs8PZ=08w?U-v*6r8kFwyY*i&5Tf36SUEVYJ-ozUv*SJM&2q4OroxLQtEhPf`K|IT($D01$h7FHe z7+}VJSk3^J`hO4YMgC-fl^YCEXomZR9ILh9GH*djweH@d6^5EsMhE=YtXn0CBC7&@ zESuU}%fc7erCG&X%L5d4G<|i?m2WwqUsrHYD>2?jlv*1LUyHSvvWJZipJbB)=~?$X z=?ZUP!>I-pUcR{Jgy7!Ztr3#ZZ_?qGk;}@ihd3h5>C*Ki5w$ptl_e4y)vUL0R+}ulMCc_!xzyqJ{Nv#%(&(Hg1n? z94cjb#@r|E=N50SaR}5N1j&dyM{u*9W{(Gl6yVD2#$AWMK$OhXJ*N<;NFL0PV@cSjS6RNSocarH`vuZIeFX znPc$0NvyBBHsTUvK!K`p91M$qDzU>#``f$%p!foiZQ`;h@z$)0L#5d>YKbb8yrZ2ysy+&~svSZp_OTl6M1-DzJqC^Q_-=tn?zEM9@X%6v<9j!v8Wvbo48T%!@)yA%I3#S>Irs zUObxH*2;-~j0C#rrS(9u`|4aubC}C%-yfcy7(8^_t&y3M5F;LV4YYXBUf<+!3~F=n z&^^Afkqk8JNH72E!Hn2eD21g-i1%~&69nPol^P!&R;SN;T{8OSw|F4pDv^Reudq`g zufBn7oAef{_Iza((8Ho^ebmaBXOR~-rcZMMbi6(HDF)~02S2W+@dKcz#8i2lk`+E( z9mIH6&d79dUUWnbZ(XzqUsw}-0@7rfe4A~NVwwT%Tc%~a9bPGhHFZ`Al69kKVq815 z0jEc=1uvs&Ja0~6P9!an0e{}nVn}26Zwq`v>e0w7TB^ub0SC#pJr7;<@mjRiaaiU4 zI73|_HnQiY#OoTrNyZhj`hqrP=@Dqr4ZR<4li6d!hOzI@t{>Gv!w{(L|EEpf`L#^H zX1d!lAl!0hnIWX8-&_k9Qzf6St^_=Wh~?HH&G@* zxpks(=&pSmy**W~JSr=J^_AVir?-UP?i*@aWAhBLr`^JO=#DL5VmAt#&s8Z^PRiH$ zGo05yHG*UhY)#KqpLBrdxZGSyh0*b8kf9@@j1e$wOxt~W)YP=NiA!}^17GFcp&K`? z(ABZRnKe>iQ}((hi?)ur#m|}?E&~*@DCT*cCLT?-1_2TXnAn@BY9d#JT9I&oq~+$J zq!&cgI!em`7Oq&MDGped4`4IQ>Wjiv$F*}?Z-ablVL3S9K~<$Rf$u+Wn7KYp{rfYZ zvkp`zy$=%oMPtPKsyl8{NVdcTd4WPPO!8aqDGR8}E58-^$TE1i=p9f-{#V2~@f}-j zgLW>lZ?}4ipG}=V$+1huJH(wo8khV?eMgm#Tb-bfd0+MMFv&+K?CK@@xVKbIFZ^HR z#Z&D`DdIzhqQ@6L_TcC5m4WqvFOFF}^ww-;m4Xbnbo2G4#Kff}o76~8%b6=h7 zgD94mkIyQPvVMA1`6KRFs!G*a*{MWUY_4cMJO4^xwaF_|Yl3?bGd*EBQ_}cF+ejGk zvwTb(%5zltsU8^gzaPs7x`P$w$9tuF|JpA6a1^8j{lZtQpPzy# z3rSz~rYKUF&iSnnB?osdapr%=!^VBfO?rtF_af&X8Io*kTd{eQXR1=Y{{1P4>aj}L zlqVA%Rm3Wt^G;kW?tSL`ADVX%cF0%DKh_niaX&opht>?SYS65~ zymLNd&c956?rMd#5vJxGK0%^x5)R?pvKr&6c6L5+4m`*dRtnP_ErhxLw%g6OBgAc$ z@k#rUp*`(T}j}O6}iNbt_tX z=y!?qmvbIDMDYtx20pY?xijV^u{udm5xff zFWsvpsZ%U!n5F`kZ>!MT4XqCD-j)FGK-g`GEPwNm$2Bl`jQ=yM2sT?$qs_QMZ#qx# z7CPqVM#pPwDkNH-*$49L4I()iHZJgVFb&!WZewrq!iqm74t& ziLANsQmLY>N~mWs^Zr!hq!~5HCbygDa5mi5#wTdrL#BQq=QcO+E{ zO3Bd@@9oe#5`xPGdHiC{Dfel&=kW`UHCTty}9WSQ3Zkz7>KyvtH5I*dS^Y5v8={amEkvk!?bN+Ow=S zzqosRHm9Ue zoTF^iRiWwO;mt$F(!oZB+!tQm2hFZCEovRH)(p^RxwDM-a0x&j%PtQ&TTUcMUp{0% zGz1I`S~fKpBs5; z?O|lHcsOfSlW*uAK-0Z$yKjYrug7EBqS4-N`zKv(*uZuz;7zZ6ZnjE zr9M*n36eFl!?4a%pDOW&<#PJ-+O9zMrH@$^qer-BOY;ybe|Miv~ z|BC2f=JwRXq5natU#a5Mzhf8EwxCw5srd2^c-O{}!Je(b*6v-qSK|UQoD8i*r;WrLm+0SlN##E0aATSE2)~1 z?@V*)TZnbEFQO>gxXOhnM}e7UOMzz$HEyYQRQzp)+*g6sS4?D@0B8(92*Wpcso2-l z#Pf@q7H(WL6jI(8_`<%riX6WGC<$8OC9;6(z7?{pROfv=BNEtN-3q+hDDah$B$Q6D z@jl-F2);AvgsdYj!aVv#izGv0owiCgrVgS37a%)l<;kf8M4G3yBF8BfOI!7xkeTNO zD`B*-95y|<&Yoja$c!U;@1R-n?Vq3WsEqEV8l$)%_pgcOOgM8@Qvyy*l` zA(nDj6C83(O6g^qBlD6f@Q+Z(@9yK?QSrC^U=!thm;mU%;cehIVAt~^q%HyA~F9#^C{ z8fI+f3!gf2G<+%)`d4@K$bS*71kjjOt1#$Q$j|LalpTeVqmXh`Su7x% zmc5+5yGnCoMAJ&ro~vRo9HnA@@7PRFPzF)%lueF~Z(ua?`4S1AA;v&=kNapcy7pXk zG0Q*`>Rl0WtjDPn2&#h|MOiylH#BF$QdB05WcfNCL`o{r3I(MqA&)H0rGH>GwwI^A z;C|8kVxH*gC-U4=CoX~CR$p*a?grC7eRD0w(a_N#<2DAkicXuE`Mq7PwHgh8jE6iU zl(|~VM&5AIST#xwFI3Ab>kA$|7#6-1t}tou#4qC-U7Mmto^PA7Nt05Kd0T|8V;_m? z0$SAaZOKWMfMUBOqYwV)J%M_^9HsY`ae3|*hEf$^mN-j0SBqD(RXjnNxr)Hxc=3D# zUrna$JV?DlVT*+Vfml$Qj60=3%VEuoW`SC&Q0V1c;)b(rYlb&yUfo%@5?{WNuw@F= zv)Mu`;kh`BIzYwu``G2!h?;gis#j8{0RXc}CsGMG@TWP?n}X-mAGfJmtu|LHRVJ@S zZStzLr5yyq1cyCEFa#ayXVomsdK*uoM4mYRTrrnmPOi=7c)2QCTn_Xxs&s_#z7|&` zQt;@+HieuspY1as9$S>6`nGiL=ktfli*X!r33Eq761Dit^a(bODQ7V_ z*77o)#j8;|yr%LbTD|k_6~}D_*eW%K?~&O#IEnJ z31Q4bIk}MMTU`;@CW0CF;97eDmSc@+MnMY<@5RB4TSdvUHdK5k32`9|-LabM(Pzr>LbtI}}+{`rzyO`(4FSw5a* zI;|_dcsDZ>o5{eVZ4Ibg^5vrXE+czTs3SK;^`fpI^C}>X-)JE>tI{}*3+#lk1F!h0 zQFOl|m;IqH)Fxd~sgHbT7FT4wtjvCSL(XRJK`wctS?E(+PO0I|8!#Zq{gvQ2e3O+hwts4T1 zjd%=UbsjZ~bbj*pi{285;JbMKbsrYE$utF#Fd=<-e1V3wmmK;gkQ$@e786K`(XfB} zrrBLa)&GYV&tJ9jUC*!uMdmX)+B=IeS=i7h2U~?W8J42K-)lz8FPdLqC|1;pcw^>` zgmn4`e^^0AI>g(10e~w5JRN14WN_AN;ADz~tV;N})-af?}R{-Lq<+Q(5uV%ig{2RM3{I_x< zRqc;{pKbL-w7^lPBD9MCa$B30Z@E`IsslXzl&y{6@rxA1WAE1?EsxZ`jtyX(HNTo7 zT`VUlU@jgX<|Zl17b!q~wGPZ&%t^q}Zaxp@Leke-3x+_vE|m+0smxL3zy>R;R8_Eb zm0T4U7FBZm-7=L!o4Pr5Yd3n%^UQT8n17}X>B(Elo3x1}>JtJbM`dN_t++M1z~_F^ zP9yZ*fg|>Nd6;YHl*o(bBU0kR!qc?ddEAdai$>(EgFj0zh>1Uo;iHk+rXxV?PHvgf zT5@A96$|f6IVGE0akyB9T}llZmyWCifY?wx6kWY+<@FSC(+ zuYr2(oF<#FyH+5xT9ZA$-hEbi_uiExufd@vtB@<4-I-Cn`{dYtfY5H91yg zzjdz65t-SA=LCiQxA?aPX>bY40#VM%v<1_IQ48NP%As2AG`=Y0>gCTkW&|@cu9>xh zwT`v?t~Z@EhlQ~(2;ICN*Ngu4-Ou1qZExIG$pzSDN&c*?yd~#rpZXQpN>L9A<xqW)P1nzI2W(f$y)- z&)`(;dG}v5Al!ze;QdU$zL-cnB}foMcUU3!ZA4*`tbst0lgGzw)cYCj+IHC8qmg5> zK5TYmU=09M_uV-u<+nx(*ib1WW7SeJl`5rRRb-j55_nS2pf#W|QWjf`F#`|`NR*(O z3>^8lnMtq7W*af*%qE)NC z0B-}E{Mu=4y6J+p-ct0Reb{T~h98`rgzhgl2@0#>(xlkJ+FFA$(mduHt;RpUInt=| za}lbzaAP=cyVv99wH0nk5SOlDEBeGNZ-Wu%AY;~IUXHzqGbqm*(9O9=TMF3D;=I@y zY!2W_`>4J|ukrC{-V(j3PLmq*jH_o+s9HOP7vp9~sAvU2s5B{yBna*=D)JRwVtG4T zm-wr(jaBOA@_C*x+Z=-#UF^4%PdlCEYx~VMTf{7$b~we;5sOXEsFBfoG#YwW4WLle z0JJWRhSpOfQxKJm|A|@)i&$crm?5UnEvW{%+FkD!l5J`-Wx9Q_QwDU&hD&o;CNQIP7polp~ z#L}SA?Ngo}$w$t z;DJx9T_hs4QZPWA=v6Eb;`PG2OGpU`J+B9J%X zh}V#an{b+C<5S9_Iw`IDvYMdBW`99Rf+eMP-S!Zh@;eck(vJ+@cbdScpK+QY)1b*S z+04s$_4!j1kGw}t)><-HPD>(Fp$ zI5Zp@HX|*V74{Iw@NUMgox_nATvNf2#!rlUye<;)kN|;)?H=d7Oe1)0dwoFeY7hi> zctgCQOMU4lIK&Tl{k;Ln8gzv-*Nz3Qi{{bZ^xmRzRq4{3tRHB$t>c+rT)#b} z&3ccu_Sr)1qPC7_esTS#RP^=(RYNfI%qzqqo_+rr6|BQi!5ZuV`2n0zplyFk9>X3F@kv?*xL&f#3F(wZN}nE>)SpnsYIt zdlOt+8c<6vpSi!KIaz~tp82&J7Z4{Gb$^=uoqDY+CJ!}~F9_YUPrV+eL*$uLoy~#j zu+XoT&T5|zdvmbX-Tm)Oc)g{~al#)bHE-f%)_9=7?K5CMV}OB*X#qv2=pZ5W#-yOq}SFlz_X|T<VjlLTq3!4jV4d%mOq~4nVi$z+6B9V~^gDyY@}aJ#5FcETdp@YXC_RW1Rg9wI+l~ zSsN_$2L2B>0}Ig55K=!IkOOEKr~`xwBSRm&&fT2kCsr|9j-7&qKP6G8!{5 z7_lbqs}kSc66P}}BW|w19_vU3(A5OQr$?LNg<~{1bQ5y_A2JV{H!o3Nk2*;(%Y%uo~E<&^XVHE!|_CZ+uoe{5;_{@vc|Q=6y^US1MIeNpB6OW2@LE4%uFaRlwk`r z=$(6yQa>q;AKGZCaMxU+xE6)EL0v{!mMZ{vJfD40A!DHZGb@q^=9--eWs9`d%-RJw zfR1(|5s@;W#4ZA8l#?>c1QZz@p+zsDoSIm3fAaSFKY zth0{Vg3QTC+Ayf7Mk>&J2qntigtQiT!Vub5Dv76(n8kVkL(*;Jci$WR77_uA}oem5`$Wkmp`Mj z@u4Tg^EOBq*U?IgxpLj2i%}6`>FS8g790~(GOB_)B}xF?S3W-335kc2lkG=Q_ff=r zOcU$GU@Ex)kWuYAK4enOv-bwDNdEv;3T})kF&aO7uK!`OH<1ic8)};D@IH1d0Kw6v3s_UhTseN-Ow|2*Q=>(7c`8PTXtv=@p zTny2}8VinBYi(OVs&Ud}Q-vu8&IRSV^^H~65Wn(AP%0D3brVzzkM-$VsXg*t!-%f< zUhvYBe<^x6Z~CKy8cw&I%AKIjo+TwZ62;sStOYDdjcCe-cUY=w%?)(Xx!&467sN0p$QWtsBrDLMc{u#4qRpC< zA~6rCt=Estm4x0un7bmKRY&l?Xm{Apl{SEwm63*Rj?{0&*PLDcb0KA^htosD<{WIupHETmk??-)OceKDPt*52P|RnSeUz? z)Taz>y3n-^Yq4x==9YHXQu5k*xzp~pP4oObFH6wFpZR9BEN5jslyK6~x`?)($|ICG zF^`tH-_*jK#fi`~4R=!-ks}8ul~e);2?UafLS|2yS$W+jU`IwTd>CMJH#Vs6I8p+% zXX}ts4t-%EU2(osCWhsf*`Z|O1C!F(S3#oj<`swd&uUSj0F3#1&AX4Ef+^|?ZaA(l-Fyi^?nsKg+fW7 zF3E2tRTf)#$vw@CfmPD2s+xBouAI6tI#-ONbaThBC%Ufq6jODyXS5ffJ;cWJD@5}l zQbt~zRx$Km089W>Yvu+Z)Vcjta#d3I2%@WfBx3+l^jndAXO)8^1Lb3RN^SSzq)hLgAIY+%Dfrd|bm0;wtwS+W=?&UDQHY!PW|I1cKuKr0zkw7i5lsr%!wiE;m>9%e326;>!=@I=4LSd;!Yl>d zeT;^@OslMdowh;LwopM{B?kipp=I3&8Vy-Kf$3XcYAWfKqP5WOcPA^hI#Xx6I9j3p z88vRG+l}9`2yg{&ecV{@TD^Z?b@%9JQP}$KeT_Q$7q>;_=@Hk01sx--NW9&T>7cVa zo@>SeEOki;T1y6LPJp@{awEOey-H&3*(>Xf@VhyKlUjgW7|2zFa9g*gLs^p^n>l`Hgi&*>5$L#yc%BaT$S5l-!3_BgvqSWwPl1(tT28aB`8s)yh!1^V zPgCpAHe7YCgn5YphL1>yWWJiBgz@6Vb`H5z6BTl4@ zj8hoceL1|mh&QSX;$kVu0-aWX`z^H%iFeIWUWqDP=7vzWz18HIUMn$W7RY!f=fl%*SATT)JD`uJn&~&Ai(_x*K1Us+(70laeQStIA4oUobwvK|=6+JR^evc8s zmaFMTh9ArM&Ala)d98mfy}rg@Nevdr7{SyRiL+_N>#|5Ri|S+rCxs!f9}yQ~I9&Bx z_fA>-CxncRmeV7Z15(6w1umrm5Q$ZU*$4i-m4Z|r*H{I60y4m0)vz_Z=FQRkBqr*@ zPA8PN$K6W0Wzg`^MgUwDtUn8K5Bz&J73x;!$}Z(->@%Lb-7yf76qv>C>E}*gJhG^yqoRm~`Tp>n zhh=FT^~3-9k-Awf$%T}=LA=W4?o$$D3%o9!@HJq7V~m5HF!y$N%0ZW&`B-u|X#Y&Y zugp!<$9AT$kZ7>c4tQ=N@-8it2i>`+aW8l>tC>r*E!X=BfMJ?pC zAw*akD7yP)ckd!~5U5bl{1D7C8t{M?1*2OFB(Bc>^-w=A$6;Fp)6N2qni zpf)8!3BfB|lSRPqJb@$WGh?EiIMa=aF4H*evLD$;V3@9&q%k(^vgT5pkG~(}jIClg z*WSm%fnSfBf!8(}^w?VB3a4|aK#xJ(Z!i1KNj0h%3WTL?sMyj@m7(ojQvRh9HA)OW zqokneW^JfI6mcCoJ&#o*>%oa_ih&|f3>2fJf12Z4)Tw7LOkU5miZV6F(27E+ciXCC zEQ4*Eh`otx2212(My4_RN6(QVE6Urhd)QA%@L|d8d z@h(QhE@jFZh7>ryD`tbk5n=nkVt`_H3~dQXjlcyP^V8! zhhisVWgW@Rj;@9>;lvlUV8b9BYI$z|l9Q?Jl?oI_HB4|1tMCYUR|Wt1b_chxbtC2{ zjhk{np0F_#+UoUd`Lr>UnZTF%!%JK>{&-sMKqirCaYKTX>uwD5{6oR%y+cHAG;yFV z=o0O`tc-JIL65#^<2dN9W(i%U7*bn>(;j0@9A%qN$N{^2P+)L*HUDt#00CX&;XCLz;5-Rsff=@~hAC@hIa-ZFu_LeS3iJ8#bBsRuV$!a7Mj!6?Zw zE^Ww$(j4C;HyR!Bd2Xydoz5}yef`NUbj*tVn7j;8$3wJKM@r$`_^?OQxvQVn9T;2w;w|$JBg30p0zZ?3QzQ=zf*kFKy#l=+Se6`H<&3vJ8qK zMXH71HRC?JVgJK-C$@M0DHd`8Q6Um3n{xa$eNMG)p(Vl0$>RY-)pnjX%VmM%FP_ zM>R068$N9Z7lg-pKc@YjG#skB2~;mlrCll)kRB0DU`=KWFQY1x(t;~s)Dj_BJ0zUl zNK`02WAQsk1h$ zmBv<7<8X?Aw;&Y3wNhVhhdXQxDmI1FJmFAc73>t5-pUBuDb}1UMIl%I7UtM23mJ4S zFB~|OP2-)Gv69MG4@`Wy>?0h_)>GR!eTB1?Mh!@$E84p88%S+}L^ncI8IFf*RzuE~ zcqn90c`#sADWK_k2~&RL`L{KgSW4M_;hz{06=_x>(J+Y1Tpby9|FiA3?RUswoa@r%lrQAC9%Tq z%rB#$CZw>)ZnpKKUd9i?VX)(EH};9UuMUh4&1nihX9A?Sh@ph5$X zfjF58fI}RhB`5=EQp&d&%{QE7{*_5(H0>=i~?t)fxh6xC)u7qS@I z)&mXHfN?S(AcPFyhKf23sYVU0YJy~UW-uUXaZ$*KOWnYC#@i2zidVzeh4S_?zkkewIzG2`MJvaSh5qTdSi;>oR zEY8{bV+r~~$CA|9j-}{g>(Vm`a>IIUs~sN=O{aQcfr#GKgT*@apryCP^+v>CBLy7= z^@i2biyqRwR2KfOccb;%sXKfTZcQ_`hQU&diLT_`#MpUY+}U4k0stEsDM6ow^QHRH zWih=`Lzf;wFZIFj8C`i$e{{QkVQ6Z_c)3NHid#{t-^xLW>o!c(U)_joAtP7^6m8u? zm9@1OwK3Z6#C}134G=QwZ@pH|veb;2>ej1c$~ z`VNub71vxxQiP1+hMR7A7gaG@F>CRvHDG$r`x<>{gB-aWJk{dbTq&-Pe5}bQ3S-$q zPm~qA1*^9RY8KLJzxC^zt+Ys`eQ(d!K}|zT=XM*~qqjJ>RJ=Ywfo)|j-dz^`1`LWg z;E{PdJY!?$u*x1T!$v*xgq!Eg$X;^Rp%V1>)+or5t&OJYiv3M{-jr!Gu^Gu|#xkCX zOlB(S$w+3hlAWAD0}DKeAcIP7@`4UVvXw5Fq9s)ZLIR2$tb<4#Z5gDh)DRI%BF=WO z!KJ`S`DDX;S-NU9n*2|ZVkH_gPGN{9RH1Xg3c-#!T@j3YXtR-h?*|NN0Z~FtacH53 z5oTDbJ%$6}%7eStJiV~mv_I~c@eAOt&%Nz;ws0t+6fQjY2oSnZcQ6>M^R;!Q7;Edh zyZpt$w)&t+r-cOkUYkW58_YXNp;{r*dlGJIZ}O+K<&rU55RuI8gtn01ZR+Zc8HsAB z^hrR5Nx}T)Ku_kOoq;|o3d`Q8#w&X}G!zK2UWmXYfw}|=gMLuxD}_R#nG6DhzELQ# z_-DMga6{>XF+(pWTTM|15dE{WXMZdWVi8Zk zv4X@FtomV8#zE^ohG^y9-nmt-dpq)B;{j)xQK;|doY?6~(l2LU78W!3q0GUUv4iiU S=daF)={K-yhxDBb0002=D`A}g literal 0 HcmV?d00001 diff --git a/fonts/fira-sans-v17-latin-500.woff2 b/fonts/fira-sans-v17-latin-500.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..24bb8f45f89f43e11b1e6589de9f6fa9f0175e94 GIT binary patch literal 24020 zcmV(_K-9l?Pew8T0RR910A17o5dZ)H0Pw&709|kZ0RR9100000000000000000000 z0000QbQ^)6P8^a-24Db%EC_-y37QrW2nvDaD1pXz3xx^*0X7081Bws?AO(X^2aZn+ zfmIvY-51c)b|BB)Hel%RmaqM~?5hw)*f#Vv|Yt6K)k#sB%h6%F$TYCV_Aic(uWXJSA|5s@

BF$fM9vsYs(%;pVL{QgttFZl2LrhoVLUHN_ z*%fVNWKol@#Hpe^eH${Uql`fG&AS#uT(fl1rDTGmh(PBumv-*=`QmzoV2uh@4i$WL|O10-|QK2;QTuYN0 z!*eFj;7D_=`hy%(wj=5__}szvH$W=f{jWun@{!Nq~kq%F;I z;VWL6eoxPydKkk(rnake;~rI)``-n_kL;I&EZrK47Q&Z0dA$(BmZSOKq zleJVg+7-VhW>qKr&1JoCaIwY#I_@DIyRITnrh}>=BhNWE@_}W&3z73H5^_noqd+L? zi0}q?3=IGqN4VL{eYyk8&d0vogBNKz!9(5!%w!mLEa!akmz;8|hDS6U&W}4=?M5UV9-yRO$x_Tu=_6TG(qkq98x(hc!G*P$IL~4LH;! z%m%mHox&~xvYak190p*)X@qRbrw8$&0k;;M#GfU3K_k|AlhW4WflaFgL3-@k3l{1P$@%> z0LthDuZS4#EtHdDD{)mP02pkp8RjAaGhq*K$=a(Mn}b1BVt`l0$!P#$ zIJGwN7y$TPnrI;I50abZ4SE0noz&Z`${*Zltf9e(UkPU1YbGAYOqX;@<%l5G7YmV$ z-SdQzd~m)=tK47iz0JDPSX$%1-&;PoK?_@C+J|~-+sD?!_s}Bk0P(s+-tH2gs zlyBnrXx#OA-p~D%cX_*2MsAjmUdI!^UkA{Ua-=TfuGS&lbc>wP%BgENW}V!aK-(tV zOkmJrKbaI`ZcW$q%vz$VU>aZ=U_X=s8^@1U|79E_UWWNJFlYIO_C^+v`VKQS-jLii z_g_t5xO6u>C<9b;Y362G&jtn$^DYtq10DT%JnUY3yNJgEv986XCc@q$g9*RF-Igr? z*8-1KMFt5Z)BXpnM;AD25knCs5Ht#wUC-;tKLm$#;Ov42fB2GTnz+C`(j}RI|3^SY zxmQ(hi*b@Bp+O#`M51@+T8_}<%xpzro&_!S_@z!1BYg?UlWSJ#HZ#xsY;R`u0Klk( z7Mv~SFJ0T!EPVATOAfwlZyIg17Zj95xa{W?!jjhuv#b8h(e{OI*G@%uIDkf&!_Z1J|=jHoDj ztz9s*M$enP1%d&5&{F}d&?O>L8%gO0ou-n$<3OLZuGc-%u#eAfVK{_^v8Mlv*5yu5 z?yipqH3}i~?vZ=>*wS2v=b5K&g-FqQkw+aAAD}gQn0Z`~mKr7G?ikQwUF+A>+8T`n z7RMUpm?u`ObQWp>vGtBjJDGL%gPw;VkCp=1gzMo|2ispiWLoC4nITb&*ASR&Sk0HN4&^;m78^HrM7Eq*8s;)K!tENgO#G%HPqw zq)YuaPguI`tR|&fr0-{n`XXU9?2p z%?-6^1mGOG&dDld=&sL?NIiv$)j&@n|A6NjsUf9PhX^IUL!Ilo-uC|i2+5VYVO*zyv4#(M^~Z;|Hp{h$ z)Qt??Y+c+kx6JOho@EEf;7Q~3Qnvsei70Sb`QG699CtV?7nCdyLD}!%kj@=l>E2qU zwV~04NLcpA0f4O~wU);iy)XeQ;ADM`eUpWbiOhY@OkL0rZ5onAFc2-^>=JO40+XSC zZ*f?8tPB88Ks)kiEW7P|Wch<3IAeowq;~Fe`DM=oOX_T8erwALzB* zM)2_h7gQ@IkhDx7Ta7WAcUP@Sw5duF3s2+0IB%p>dnh?1ny|znyY`;%01!mi&@z3| zxjzGwr~HSeuF5P4xrsv?+r6Rb@B_v)y!Lk?qnFQBJ&zfRPk&a_)xi*U{6Xlp8|bD^ zrCi>Csq15ohBPi(tYDZSQ^6A^KE{dMtv~1LomvD}BNgSy{dW@2QmSq_@qR&W!am0W zcZtIo#RY-g9_tCdxEMRjO-_H z-%v4rAhE# zsYziiuzl%yBrF=lIaV!b$*r^kCi`$O(OBZ;ePwu)bl2v zJ3kj|%6{_?8fE=j5^4vW5 zAY^>)G$pvyHMnaqIZ=ETH8WF>9RV@7Ood`r{^C;5ihmr$L`}bzSsxK7KRF2|sLY;} zdrgkMm3BuBe@$`gViPdY@Hlc`vOpDH_t*40f9q_0)`a_9Q400>99Z=)V^YcuIsYS; z7ClgE_(VkC*WKf=`TXZ%Xmb>a2~7j=(q^9C%vT#asG(Yfa29cjbd4S`;6fi)3=Hs> zvU@a}=&pZ+${1}^?b|L|&*VjU=sw5U494VcER%#zz&bDYW0uk#-7>!nF?iNqte170 z>mrUQNOfaav3HP{We%=trZL};aoxsqOI8e(qwo=%U*yDni}p0eT48=rrS- ze~i--$jF#S|H{MCXKiTcAW3Jbo7yhw9+JF<%L>mj{e1HN1nbo`w#Ps)^$kzT+&V4& zC(JxsnavYcPn69WZfOlC+t?1HDLazm^mRtXp9^l`J@HZGDe3#YgM(DNu#S1uk0$kS z*$=@{u?U*&Jsm&xOfZ?pfgo^gr`?$f1@f^9bT<$CmFMUHCa`tX*-3o3v>-JSfF!C2 zLQ307>rg5+GE}1hFtI!N(2|hT%;P8LlC=2uHIPVq5ybE6k}UM z4w+Dsg^p>kmLDbM6B7km_kJOU0Iwdl5Etjl>b&;s?E*jx|*wLCoQicJv#cziPc=fvk^1y1q^3{Mjm~fJYn*jBz4_FkKr=>`NA{> z*z{>v6_7x@GYrY#7IvOeVgxXIqn(0gU(7!K2otx1PpWsEGZGK>weICXEQ8<{KA9%$ z7{O|w z#4c@%LP`k4&NHBj3kWYbZmQT3h~c`wn1?Y*#{IZUhNQm`hhOk4L8<{^IyQ?57qg22 zR&CrA8AK2Q;s?Hg+&A;r@9^6tqON1imXR$2PYZq_%kGVMC4yB#+7mIy)AK3jca-$^ z;{NHzJj)t5w4UW%i)kJG4PiK^2hL_IvuY1Tc}4yS*o58szZLlAvIg^bP?djvoE)t` zq2I%0-Q|w{76rc?zpYHJt5`K~lxx!BC6(2XmdzL8VVO4bQ)e{CCMpOaMR%xj@@qps%Dw0s&n7$lQU8AY;4GuR)gPHY@$kTor=@nDADJ#!o9M*F!diY zZJqUwwzf@GruMp{FzHG7q7-9lxfr593|Ux~rqT)j6=V=YxnY36I=8N0Hvo@qnpq4` zL$$3Q2k$3^mw&HlDEcc~E(Cum*&B7K)*o?V5_7hjBD|!@Y^{Pka_cz_-{QHe(M-U*f8b~n?wj##tQPVZD_K0%@q>X82#2^ zTf_!UL>4=I{v-Y+iE+b58n%DRzu~7vzb|Y-I7a-jh4&L%)^O1&XfUWT1+?*&vYEIr zKTUj$C-$XsuoBCLoSX*3ckpS-qd>_84|y6gB77)Fx@l0JrkAsiJotyoaUwq9GLHb~ z2R8VuX-l8PNE|ZsChwZ-Y1!prF6OGtu-W5{HMm?h(RyD2;tv!qi;zc*DzA;;(WM#2 zPtX1k@*IQ`33n7~E-a#=;d6;y!G;t}9XY4gkva;<^nP>(1MtMTuO^78m%EITVjOxd zN1jK8YM}X;v-&O?i8)j<*TJ@T#I%xgdiGKTVIG3m?Y{m_yX!~^p7PMjNBQRe7~`jQ zRpr?1iI$q=6OMS-Y9{z$+%^OT>$fEUTps$z`T3+MT?U#h86LzmjH)7WUszDU6=Y35C* zy!rwVb4qQqh3Y?Rs@{t%_h8R5=YyW5QIgz}_S63UY1c zxfp=APyNzwp@TN!X@-I@+_RXvhu|MjaLgacd^*dB<)Ns%FnxA?>@%~{5Ic#g#lr^j~}c3GPbo8oVlQ0!1p7v{JOyIZ=f2$p@Df~A;TkkzZD3? zL?y3lzy9hAmv=p508ifccbBK#c9N`PZJzFUO1ef`q8-P}W}90a7H+>P5Xw|fMpbgv zQxIOFtE**9rL7FVdwJY15$VNBiU&U({a+*sy*Z)!Jpg3zP|qP5Hx?N$H%+i6{D$)x zs{#D|yk8nfslAWUdFQQ~Flir3wMN>d9r`_Mv^OE08O;Iab3b=PNh*B?%Mv-EBf~s% z!gtK=j1B+1xtYfPg6eQgl;CbWysU=-f&OJEj=8nEP+{STdw^d~sK(Y^e8??O%?*R&X*f&Y zo~rO|oQe|F7ffvNFK7(sh9orGqd2#UsrlpT50dja2cfh^xeg)MO6xf*8XRkpY(T1u zX@N-3$NCmaMe@P3**iXS#7PJjd%Rc!F=s4+m|Ipr%*+A^KKC0v!#xI_8EbG8yd45@ z&F6;#o~+4(IoWQX`y~;}!_5K&z!?e7`TzglkA7B&`fq~cF91I|Mda&i`nXg2H~a77 zi+<>VH4GrHM`?ZpEMF45|GnFXm=nl$%{3@=fO7%WWhf=KdVZ-&=BkBlto1&k?VRhz zj8I;~-(Of)a~}{7X}%#J3OPhWgmp9L6WSUE#B?3=yxuO%JHwkbnVD@1ls(*H?j-}a zW-`K2ptMdIC`2wfRwxFDN(l5$UK`Cy}exgsm$)XIF|%TGLDu zm8P-68d@&~I+Jfu0k19v9^am!gV94SXlw&Ck^?+!0ksEk1JY!(@t# zw4W2JqR(RT1tcvK&XGV{POE$f&+H;OVes|*&~qcgmF@i3KK5f1mGPfU6CMQOAQk+4orCSaJJf)LC&#{tjQT>eHns^U#dZ0aZ098{_4nzB%8 zU{gyaSBfkt>e*B&P{pcApnTP8^<`1TrcgCoxZS`SHB0%vyE22b3Ed$glm3_!DUm^v z1d&lE_N-YXmNc^3MzhnRn)wYgZzi^F(xA~mHq>z<4W=P8&?z2DfnX3&&9Ya#r99li zf|PE3S$Q*a=T%-cFnu+PYBjK$rt~bO_|CW#h1bU18*g`tBJ=P!`!U+?C^H)Io* zCJYJZ9k|n>JlD8|ANL625n((jz?Dxf2->}6xY79?Y>yRu%;Xq<3 zG6oUHC?qIXDMp-t4JE5Fv23#yFPg9Q4?gIStIPem$Il^!w0oa)r1HgzVYK0VVbmh_G_4QceiEt4gtPi*eE z?{=C-*3%8moZKf&eVeP5mIjkWpOs0k*CaONXHxrq*|CwDZohhG9vKtPW`{S!zb-g< z(y5p32j5Aq8e%O!Fc$ymdI0}Pj;3(%%P39T<~F;NMoV)(T`*^pHKbsZ%XDmfF%+bT z*WrHzm5{(NfeaBeAUG8QKvaWhTL>VD=o$j31ONd7paB2?P6+{l3jm;qo|L|;+|>H| zo0_x@#*J+>E_sphiMJE3Ylx)@y<(2P+F?WiO3}@{P}!HMwhLa1qd0zz5P|hLt3;bjOa>A~W^-Z(o@2=I#O)!WB9q+3p8Avc@eYxao+j9{*zHX#~k zoomWt9!gGN`96cy03A;{v3Q>5uu4Z)vNzLg<;GUNYwmFdDP>U_}_geE@_LEj86|Lqo_UVSBf+G`rSCu)Go->7ol zXqs)Sd@ExseC@x829;)3PCI4rs%~Xi#V?wc)vA`9tFNMqzb@=>>u~Jg#O>U%?m$In zxNHvMo;uudNct>8WA7;59Ji>*AZCv|YAs7#7K>m2gmws634&x12nvFhY=QVf3xiGo5~*MTHUcCAhZqDP1%rGCg&_=r zEgQ|IN5q{SMJ3Q31W{Glb(xU}8#P*CqY;hU0VRs`NcR8#f6CG^L=$8WpsL&2?vN!C zhXSIE5_(}23KLan^n{{TVG9*uj7e*uddqb0O{3vBrCYY8-QPZGSF;)iZ+x&xacFT_ zU#O)Zr)8}RvhF|N-m)J1r|}~H{8Qsm<86p!$mt4&9JcH!s~}5|t@9x1Is>0`BRN^D zFV*b5^ZN*0)cq2dwZaq+ORprJEPjH*5)P+5{bHJGnO^cc1KUQvCMPcs(b}VLc4zN? zN+^+i!mfnmm{cnfRBb@E>`_G);m-hVGi*>%^k@M=5D^puF|cR_3&lw60?e3mF3LGK zH+xaKIcF_?F6y^gn@iW>qWx0sm0>|F!rcdX_r$M%9L#-=1W^%64mnh68mFSN%hI)r za;M*__po>Se~`goxOP=K?b&(GjqdmN`2xWIoUX!Qx$FA5>S^qUP0RD&Sw3(iRUx`J<`0UNj5wG*>x}Ses(ZQgE zVcS9p=!+qyHyD^_sQttsUFKoVOn@U|JIMmTtG^y#Mdu+FsDM1#*S$u5`_>>Kf$f!^m&-t#JN8@O{=TbKFo9u+ zQp8yIBI+n-IwKwKN(Yp-&;H8az&o!3?e5stHM%qB90JMnu`WM5{T+qC5CS$7{@&EI zeTxN8OWbJ&5EW==-YM+yn!BQN4t;K#|KEOa|Ng%?EEb>$EI=Iy@&W)#2A4dGq$v4t zA@LM4Er*;K96(TsR3sHihmfiqs$4WK-Fn>A?#i5svUBasAcutD|NqTdpYB5;=9Tod z7B$926NT-v@3Tz22cqCs(R3AR18vcGja7diQ7}eO?bJQaWwfdd~EHaKldUaakQY%wvE~M zQzg*IiN6wm}J%rDjmTlBSyd zjHPF$lB!==6@IG;BRci#d;;B8zmgEzHX^+u6fniAAlvyG`AU1dW#l3n=!AUHvO* zp2j~<)7(DYtgU@7&_O`1V{Ofo&k2!(h=}_lz@7iM09juP-W#Ox!f9Qu9ulCa{e=e3 zzYKk!|3M3o`U66r=`*MS!}`q-6qHeo!0H!cCSXjN0BQA>T4sfg#)dW9(lP5Z20J$F zYs;ZNVRB@L#hz0gu!5Xmt`ojRpt6L1-c?bsitzT zrNUONqjn{wF0CP>*{s&(oVL793woD|`bq}MhOHP~tQxDCv~GH#VWw%WWzn|f`Hq#Y zb$hnw`gR8P9XgyHIT|~eICtuDX69<{)`k1&rH7TLwRbl@r?$R!e%6TZ$?RA}U#~XLOb=^WAel`ohmDFa7e$@4oh@(i?xh_0PKi^?hj6gb#WjQ9m&? z?z6!%>kIBzuEu=heHZ#etYd!K`DO37i~cdzsJ|xvARzt{RNjjn$Zn7tn}~M1^qqS& zB5g3${y~S3x2bln-EMdHt`MYj1-nzwyg|x|4 zCJ{}<-G4`-+YBlUw0!@s{-6A_+PB8{C%B*Ma%)_7*bZIgS$Ru&mC6}4d1!F)Dm?=1YI)Z>&n^Mq#j$W>t0O&ct_?Urb3m8n*v z)=7^PsZ*|AgGLpaH0x4og-R_}YBlA7RjRaEZH*neUGcwABV>j=Rwzh-Fo8xL6VA_O zM~xXbVbWE{J#@rj5&Q+)DZ~>?wrCemAx@$MN$C32Nz$g&urQm&JL6f{8IShBhi2^C z#&{VC3p@OSDd}(4Ga!2`1CYyo40APP=0gq%&%GZ*MPYU(y0aJ5eBJSNO%Jw@@8lzad%Ml9-H&%~$EFMX255C#+&sFa z>XWsLlf2dl7ZXSNn(PXeF;>_#YonwqXzJL(q6Y9rMtnNKLfd1a?X%I^=URNZX|?C@ z^rVAq4ZhiZgV?;^Y1G;Dw*zRT)rZhcf*lf`RjZb8+uGzEY|#@Ys^+(>SCQ_g`=>`^hA`Us1iaqQ(N*mGPBXb=3&q{pDg9249MZ!HUmlaJlAZ3}6Ss|`WjmJQ4&I3Rc z4IFiqPq7~ZkXrQ^&yl>GY09|3DX=qVN(GXj{p7T$S5ik$$m(+pTD@D*Q(eSaJv?W_ zyNf;2)0PXxmc-H(%AJ9ti3fiJTPoZ^wpU()xuyJ3x(JUotNc*;=g72Km1k#&|u z-c6LtZl^S{Rx*SViI}U+q^%+32}c=w7=m%m@xey+0gnC@UDC0ko{RDe@J8dxh%;lY zL7O;d4_G$0tw#i84G+TE<(5wtO1_3ivResX*X*HY_wg1C+66kZyDD*rY$$uXmiwHd z=uunx);B#T9|W#BO1gF*pISemiw69C6a=$}q1I_Qze?}~=FSG5EtFQJ)~T!r*CVBU zqDdTRW{V;&-4#DS#^9y{cI)a1Gwsu|S7~C!q)nB;Rgl^OotXv!Fgb+AY`ia9Vz)aC z#|GXSq2Wp6t)#M4#Zb>E$N2ZXN;qKuHYtUjb15XIR!f_Vm0H$XYuE# zGrxDMP_k)Rlrdw+*`J$wMIcO$A!>NM>OMGQNM4<0EB3L7i4IJ|Wb&6vk^EN*RqTkC zq)*w)){y0l=&BPFDtQo$N0dDhsVQ$`@RE13Fw?6e?#UAy*k7K>*?Em~>&xrT7Hd9` zh0e8uVqw@RqF!NA5^R3DOy#4itBp~*Bz_u7bCr#C5?M-6r7~ikxx*6YI72>I|l@s0`@m(!67xOBnSFPbv9m-OcUe_$1%kACWGUh~~N#Dz1zy zPM8x5J>m!wg(xOT!n8~^qoh4$$^+S(hP27$3DKQzw<+kj&9XlxcWwewzQzA|ZR}N*=ljooJ|w~l zqYQdl*-b`;AH3T1oHX@$ENyS@irxF`wCki$k%ojsCP{P_QD;tEc+lCvXkS&{U4_{r zZRG&%yxj^gq^|UcbrFu|AMY4dz2aB8H_>tIoopYT^oAVgl(Ao-XRT?g(ef@y=k9gL z`EaLnK0em<_4O1#soSHC`vKa9GU&^#i=?gR(qnNQRNxUuzGapW6R&~XsUe@ADn7^9 zkC^Vh8M#njTrTn=^=sTb59s5c5PuK`I35Oio6B$b#*TRRRc=v|#FMmaIV_spV!BnU%Cc8yOjU%k_TKBciVI6quUT_H;sb|(<73RvZssNQ zIpf0D9B@9(2eEj?rj>tH~IUy3f6z%po;&zZ=87ley#Y6^v+nZ}fFA@Op21YuvzS4hc z|KCloSS~o0upM-5Zy1KUCm+iUh=g;uNp_Rj&>$DKu@p>m+1fbk zrqVO~G&H9P0sW3%B(Bc-Rv5fQP42H|~X&##6S~lVXhp zE|zRoD1*ovVcp5(-4;qs3u*@Xh|O&+L5_3Co~L*1h9!DF_BxNpERy>&ZxZD;)GN^0 zY3F9)8~cMah_fhnoI5_x=`R}IbDW>@$Jkd4M-yBimfx4Xknk-^t2nN8eK#*gDwDRp*Ah=Idob z$K+&MqJ$8}ad_&d%v^2nq^dNgzQE%8{x*nqL9JQToispQ^db&~)zi34IeNXQeYpFj zrKRwtQa~#0K3#vl`=a($K!3Ex;_YZSr<*U|PIkEcUUyyDyM#-33D-IqKBPSvH*19) zl8%YQnV5OOggk*LqnESJhnV7MMOLo^bG+ezA7z~q7`GD}Q{QijCkbi>V3ik7`*D|( z&r64&yX7j^y1!njaV@x_t}y+zv}5QPgX2L$fT>;a7qb{E5(xG1%g^wyzKm$*WYtZQ zW*=sUq{AA)h{V{&@!Xwf0E4ac&&=@r4w$CCZ&(Y~Cv%ZT5YuEoyS@JDn<*e@LoDO` z%bXsue@MZ-R{(6Bgd~0YGF#!Rj(?1WKeaVF^svR57DRGUG&q^^j1Kveds^fl&K6A7 zz6I(%cFU&W4x*R<()A>MHb*3z&r31vqZy+I6N0s3_0j~YH6-X75}*o1xOK&a9}%bQ z9X_xt?Jj`^@>4|=`=UPqRDZXXfkF{}N6aRIu61|r?h+oc;-Zzll&7qcxBr%~oM_Gi9ZoEMt5@y#f!?Sk ztUDCcnm`W)f?QO0#612?wOP-|Ly_D+yfb-vPho)f&}!J-I+Sf6hWLmSVaJn8x>p}e zcMM0&M4F9cdm5^8*lYml)N}qr6y)4+!p%UO$u-{d_w4@^p7#7vwg7>CWOMEF_s-7! zXRY$x2XfGwHJe zzH#K8d0?YQ`&~H8G$|oNg5MLRgUoiLMy2Hl$gOA%WQO}1m-@VeVS7`Yt3sT4J%;g6 zs&guW^o1}Tf9`;TYDoi!0^?7eeDFvCg>yc#Y~mIE32IO;r15wB#>OMUg#F{U=jBLq z+1tcrVg&)Db9Xxe(DmtD8jRc>;#wQATKz%66RtGAVJT<%`VK0y@_AX>Wt&J-p{-AW8_LJB2;wRZy^|9unc5~v~iKZ4kRU06^7)M?My^w<*Z;7eHqOo~Ic;?P2aEEBfy zoocOotWeL_po&!X;{M5v49=S9NwMI3j46D2#2WtjNDL71(`w%3rk@sI?-$BU0aZ?0 z0dPLb)D#$@EKb1YCMdx4NUY-1YT8QE+lOIBpFKVslRaQ(57!KZyaVC}PM3aeEbPaT zORYX@$tP%grNsSqZn4fH8+3m{e*4U)>c*&&O*rkW&9NqEP!jaNzZd>0py1i6Z@h_P z6K^mn3l~>Ug#K?lYn(81{w0Tmde-r^`t06#OF$Nr{4>cax#h;#m_Vr0Fes{eR+BKR zzeuo8+_975^g~WRnO z=;i}kY6rlM(gjWq8D2|S_J@u1sKCsp-2qWdMZgNbm=kyz4o>Psgr55uYryntXYkN5 zq|bFt*U#KI9d^Pc)UGqK=LeU`U|9v<*( zw%TS+(`ag%IsJ0Gtd#+VODUjo&%FqyqbV$?URW#W{HgRpDJYF&M*2HDqQypKrD>G} z@2vG@?6!FaVH+>N z)Z`;0hMkw0?{2S`=1a^>;JoFp1z9*7Xhl`Vt`nqR#)X-|sU<&iCr#hMf0H$rj8PCj zw2yH4(w%PH(X+`u%qBxa4K-PoC*PJ3=owl_QX1w8nV!L!_qf*>+pv7(pKBH0&%eJ` zNHjOM`FGu0(rb2S+nYBdw|A8u)x0+!Pktja?kq)kltR{AfT`RISCkj0d+!UjQ9$?4 z13B#6oS2GMj4Ij841P=xt2~xu*70|0NP}7M`?K=*4TqC8Z9^suJcn%&FroL?uSbTC zgBPzII5zi+rAu^C*Yh|9u%G9Qa#^K~#kCFVL3R(nj2$g4+?$y)nlSD2j1~$8g=m8!q=xc0H8jl2DOpf%Eo(? zIP{C$n7e7UFN=5CN$UpNXLSe9tUg3O`A4}xlH%aVLA3nL$|QY9cBb*FVYi2T?1Opy_)-(p>Utq?MlQwETiwHB6(^$rYOm<6_hW zNf9ZLWQjiA1*q=kY6O0(_VMj#W>jFa8|eR&de zHTz49#64l>X$m7v|8~o?T-*BaSIfDLmue}YhhAOl#h)^I{P^o%gTE8`C91Xr>p08> z|Kr(LGQ$3j|@i)fW)E9gT!;qLJ{K6zB(g7)W2!lfY z?ErONyje~6Fez{@PN@v>367_Wq}F^i1}!;v$k(09;6NUndUC9F<@DF#gG&qC8!FOz7{bs&-f62ll)1U;r~^edM;mj}5BJ8Pl!lb3+6$3Ji+Fk|nY;}e2QoS%J4 zAgN|G<<;44N?N8vG>u@9<=F!9Ey-`rVwKX09g=ByN|Q$|#KG%H+(EnM)Zm?k1(IEj zxuecG<$$V(DS)Baj%NL7s4M`vN48>Ter9uiA9BKKZ5?>0rx+q_)#U54OOp!}%s_yD$mq1C(O1XByATEYUkYJ;P6U zbUEnm8c6t_@_(T&zCg4HA;T|PhDVegpf83Q3;GP~pIkeMHqgRjM_u!`?q~FBxb2BK z1gaf95&mS8zYdEPpxeJ3j$vTwCK$6IhdQr#MjX90JSNU2lWULn_x5FNI>1R5x-nA< zB$M>Em{$1j>J2E=7Su%8kz$dqt(8c(@AGCF9pi3_9_3l*J2Q1orMZmVgpe&af6j6b zvZhBd)w|V1l0Y8gns4!<^M?zX?MLnL+3{`=Gze$O_La( zexXQ^XvL)aLeA-qD|@}(L;`Lh1FTTHXuAijhN@|c6+S-s0Z0+MG%}?q_~fu#xP{b+ zPXI)`%BuKdE+vWUEfa7+?|Ip6ee!eb1G+Vcq1gHiPkNi9GJQAc+ zQ?WVMVHi6SG`T(nu60Zt6ySy4`UH7%ZHR0Q!649DnV7~)DG}C|aCvyOQ@xmuV9HO^7m^6Q=|A1w-2n^Oa8Wz#HEG0m z6rd1l*YS)5OHAbCR8ecc$M@FLNJcMQhwNfN8YyJ&4Awq3A}LpkPRVJ46q$kK^i3Tr z^p ze#R+LO_<^Th4KH)5 z*zkMF7QXcmb`JIYhY<1wpgzbZ3GWfpYOlz&8!S;Yi*Gk?`!BS@HcD?0csXkBm$)Tj z%xzCVRoY6pc$%%;hRd!t?Xk{;xsk4v>|S+XOAWM9w!&a;;G*eMa4R?7y`wy9(ycDC zi=_4wl}8Dzi^WMXa?-(%I|U3zOlUYqfzRTGc-G`cblS%HUiAoBy%G73`?V;+lX?(&@zcWpDqB^EQ|&U69;_d!(|Pal!M(Jcpvt zup$ROuhE5tITZ2uPFN^wJiZnhT6>Bo7l_<3*U4^lx*PdA#=Uzi)5x+OQ+8Dnt@M_3clWVuPC#PID<2Wgzp{kAw7fvztnzfV3KP01aIVxCAOV+13dacn zI1u|wix?mcmrjbs`2YYseE~tJg;?djX0~n1Ej?iNcgOeo$#CP+ zJYr;h;PoJc99fPpE?4z*$HOsbUTkg7PJ^r#vlQHHz1~RrT3b$L6Ukde%~tAYF_=pYL~H;8 zn>NQTK;s?lp&?Zp_j`q$T8lt?uibcitwycJt|{+d|4%EKzeaa`t^GR1ga4-fSrx2t zvEks(lT6DzZw@KzcjwsF+RkGQQE*55D0suxW1aO|NB>x4a=fhynB6C~*7Q#YSVY@~ zn#lUkbPKQlfu^ zV;z}6z+Mu+Gr)C%Y{V<9D>8%Osp#FT3``RXgQLAY#W>9y7946A*EQVi+61P@Y;8O# z;orhB%|O%L_)b68(Pa@!z*!)fp~0T+0zA++`~HJYtX*rY_qOrf{pnmkod8ER2aq{_ z#ZiUOj+fgNL%2&a6Gx$v7UpN4BP!#>2zIE|I|MP&9r2oA2isi{9W&lgR87Ltz`#;` zO$`y!;+I5x^NpKO6SkePA}BvUXa!??xYqR1F6U+_bfEX_nN=bfn9Ea^%N2b40J^T< z=?O6Rj6&P}sK^M+<$$>&qm$FaSPRFVLWZYVfC*)Y-KnpI-}dIL!wpPzJw7Y+n;#6q zC5_xYaM#Y0O=w&T`@2c!uUIN?SltlAw7Ku)-j4fjIh_{oqi=YaZ*bU=)lK{IIB8;n|zI8mmw6k9);6MpvfMeZd3nbGsmRp{RL$ z%8UDBlO&Cl{pLT$Or$pco-&SiwSQfKnf&~Mw|J*CdU|;Afx-mK{g9>QkZJ+au?;$Z zlEED5*d4Sz-n}w}#p|)og|X=|Cw=R1_&q}V+*Q{Gh`jJ#j z{8y0p+IP63Yu!G#iKjzh`{UwJd)?B-wvl)j3q|U#^v(8nNC=Qlp1Z1dN{-33<-W3X zlu^$c^bN6ZzqYR;nlv}HrNZV4eUG{-MJX^yV74dHne9lWz^U`gH_UPs+Jo;aurVgi zP7&~zOopvZykBxsnh3s$mKme3Kl3w0Bq}M5NVks^7%e-{{0(lp{yG$^gUP(1H7A18 zN1RATmn%`u3RilgBl9N3Wd88n5lm*R&cPo(Uu6ci>eA2vN(yx)cndbI*uvR5$e*2o z@z-x`D~9=j4SZ2UU8bEyIU_mY20@81NjwY^sLUYFZH}4$mvBoT<6F9T?vQ0*Jl{K| zC;c!E)u9MBGw$gbUXL$M(jFZ}oRNVYI0}HrAd6WCo2^?YVb7^FF2?dI29f*=uMukU zm@ZBu2;E4*j!cPlo>ZDf_4G=^N}Oq796L{oEOB6#jU~^9qqzoQG|)Fa5aQw#MRB)s z(W*s4H}@SmD|2Q=SkhfSOS;B(l)R6hEJu{JSeF zA0%)4w-j}>tZICbIDRxeYI9S#j|>j(PAmT=sTxJtZQ#vL!^MyK+5NvS22BN+?>zlE zc@XEg-f7P?oHNzsvh&Bez~h1D-KW1K=?fot#KM0oPD2fS4x02SnhMx`3jlCE<%wvb z*tWX?AYUtGxW~W^6?1YURDnc!LFwOz+pFs8Pf9eP zYICed3GDb6yw<;E#@SW{_@@$GowI;R+eb>wtZY3tT38CtV915{wMCw(u5~p3tzC`P z(LU=sQ$Dfx`L)JZCz?B1$W3AMW6bMy)LK}Wdc=M=kKMycP<6R0N@+*S>RqotGv$Rz z!b?rE?p~{nkgp`u-F3RrjuF;;r!K*^-t8*m98G?7gi#eaxSdYPwuff4OwBVI&$egOQLYBGV-dAE!Kg<)WKycm8W1~+UxCb7wS_&%2RD}rBHwm zMz)7IIs$d1fvgS(&7-cz%%Ltdn5z$Lmc@gkmyKLKt6pq6q$wu)BvofsbQh8hA@NUA zTM-f4+}1Qn3Z?qG!fn`wlm?ECL8_`=DkLPoCB9!;4WMWJ zUO##ORLZK2KLaDvlozOdFlhtVtNaud?qT5R;cZey45hkyvvkRfC}P@@y-q_&SIa={ zHCBsa-IUJm8533;tRqKl=|65b5CTnmP9GQO#&*+R#Ep3!2pijPJe(6l00jg}rb*2W zX34Tm3@c_$lGAE7(VimsjqPiBv*xn@7_XQ$51u}*Kh+ll0RzeD>Jm_XX^xdyj;*p7 z|0gm@U@SOe1Bv>sSr0N=vR-7%E4P0c8rH>j*T$ml)M%?^YHFCc_k0yt0i-mV zreSY>d~2;UBf&VeIA~Jz$ON@XgdH>*{ZP z6F7g_vAVn6RfEysqugCL>o`14!v~B&X#04Di~PV~JnS5wvW`VXi8YiM#UNYpmh?_tlc$1bVN@yHjKq|ff+R4)*tytpE|Wp5>7045M@z)w+cjzUnS|?I^P@??{kBvitL-Ae;t+JO)le$h$Fw1lPA zIp9c$Gs655YB%dF-r|~PPwyBK;l=uNOn@{Xo24aJ#cBqz6AkluJcqwF(wbR*jFb#l zv61tE3$J5w;5-Q`AyGAp>f%qp4+@d-Mhfa6;LQ!=83(r|Zl%&>%@aLL_iZQnLt|4rXBUI%-ZGTtLs|bhbSP5^g_+uDN^c98NlZM6ocAfcq-N6At8Y2# z;Uw9SJ<&eeE7eAg_SuL5&y4$XaSS#y&A^wFcnlp>Wvbd}mm;yS6Au#`QJ6Eb(xLPr z=PuL{ymKG}wHA8UQClD=!9arvRYU?~@cS!HPyH%=nxZ8moBsqMCy|+eX_@E{rRQ+g z?;M8(YD2d&G7CDq;w*wACdx}<_DpR+GJ$|)W*WRQ{sYsU(G##i#ZIxJPs^cA?1%|z zmuR3?$;>U2T+csT>@1z_72R0fA&SYW^O0YIL+K25+wQ78PK96uCt8~q)FqAWih8Qm za)heYZEUOB81B1B3}0OdrWPJvSP|5)!y~5^mL0|!TxMh{*_M@P3GoI`5NB{l7$J!f zn57;w-hWU5<()#)Z(($MK8v$y9q9;#8~JHCTIXLXDqmNW*IZW>*=+KCLNXi3jA*U# z8U-$bP?0X->U&e#CXD4*FP~V(CP9f91}2V{0_0=~&D5y3F@iU-8EC=*v>XNE6ql{* zC)hbGLax8HcIcSY1~oyIsaxEBSjU5unMMF{A!J2Rl^*#;7O3Bvz`bjiLB&?laqBp= zTbjV}b9LU|oVPSNJag-w{oDBQE;r6ECHP6;{_siqRmVO5-{GN}1O1E4F6MzhSN)yI zUVBJ3*mf%(x8@9EcoDq%Q@g46kz!R3L>n}@G_%00Fewr0j?7hb(+-GAEq#~Vz6C|r z9Mt)V!6~L`iM~&^;LJ5i9Qsi?+kp_!q7@giaos&S$=VlvstTjDF)<&n>&m0m>RTpa z)&~(iB@Ev8w6j6SdPodw@dgQ2+XPcM6&4KShmu4N2tw7}t-nPMVg*$i2w7Op% zVn6X|syOPbK_?-N%P}$2SRbAS{7`*0UpXbWu5jEJ0+Q#KRd|&<(^0OlXmnMw;csy< zK%UTo8~>&OBj947O#GNP6?I{#-V4|tRakc%Nv^_%Ms*{OlzRUXUJ`cFX3CyBp-5;WgF=NvN9m>P^|_k(-0ML*f+~X%!}O3*d4b4M7tE zZv+NYNWraW!bKa<_HE@^#mg@yo&~2pao$hKKRJyM_$MXkOrh3v+5>l$m^0HZP$JW5 zx5j0%L-ci6VXNuf(uJ=EVf%r0lMUpM=ppq00)Zbcbrs7;E%g=TRG zcH8Oh8mit*c|YYSo)#U4*BaoJ$c05c(t#kuOe(q&f`8L?(E>8H{-f@~y!v+A8_AFc zfdp3CU1_wLL>S*7U`^*<6*$0&cQadWdyP_Un`D(%Q7Ix#hJP+(5(Hy+a~)#sjB$pv z(N#kjZJ5tAU%1Y%ABm)HpyBQbn{pCpQ{hGDditfdN_erG*cCoj=}wI9;@z7T!z@GZ zDzYAjO}a;%YA-=kNN9g%Ut2h`7>65yFxfe3A9aX1%42`OT_NhU+PbGL)Q|s_`b>9v zQC+6pc9l5DAS%(lPsipl zgfdp2umxomTDY`}qps9?RD5-$g1XFp{?Mg98XsC^&=Mgsi|Zb2)z<-XGgI@CsDH$S zp1<+ncqY#e-=Hak4h9HgSW6f8CL$@)Beg1=5Gu98OAk6k*ATR3N{DUKL~PFin6`{%QWYc}!525o+x0E+vk~Z8|^g=g@4ZhvKztflf=dv!es{GmR zr?!G}mlXh97F6j#Fr;$t(j3G7{C;kx8=QUh36+-iK-7EnByiEnId8f2!gs}a;YwNR z$1|%6`JMKE*!=+fm*9(D1gZLBl5Xs)j_^||YNOu1mTswZbL8c3T*nGVMeweJ_*In< z@jR_RT|M7|V^a5(Zbt7){P~m>#(G+))7B}T#$+L~QYE1&#DYbj)Uk$je!*QUXOI9z zWc8DqL{Mt^&O?ZVxKM`O&*`y)uEQjOsr|jx$E@Smz~4 zkIAR!s29~+9O9}}cy2#HU+RxZ@@o@(vkAauvYel;f0<{110z~eoU&sQcYI+-!LzC;+83Ba=172+U=kqp|9YcQ>!3sVsF4)x_7S-q+1q-$ zg}Yn)Ub?eUQVg^;E_mFjNh?uxV|8ax-5Z9$MLyuB zz*&&E)KeW4k!yLxa>=)zJnu;mjWZR&lN|viS+`lp_TfZFh)$_Ng#*`Jsy4WBhV4US z*nr(DB_P=|0$CV`I*XxE;2hBAM8xw0Ww#K;TVt0*Go_N=0mXm#Uk8Pmb;@#t6 zc=#tmWF~o|9OIaVRR;|dx=1$Gk<(-hTSFOD`^LmXB2?N~%xXsO7mm3V{y1u*M>?L1_TG?gr8 zFs);>B4EDp64<)|p{4#}hOa;oJBU#WG+Z(vR**{81|`|ksI?*B`RHJ@W$cy^lOuUe zGYt93q14+*BLy92+Z3~w>jC9i%Kl!}2P}!+GK3R|F*MLFdSS~R(78Oq+-zc^PRf|a zHJF%0FtZ5nG?62Pn6~|@Am&MI zkpb1Niqfj#gsfd_QTRxhi<<~b-!zJlTuxY4(AVT8KFwBmm&?_2^v2#~*t3@wA)Kzg z9>3N;-rw5vO0O0)d{Hq}-GE%%!^Zc>@ycH7=CHD^o$r@oMriDWsZ_}gXc%gn-AzCC zN-Gv47WV6(1l?EOgc7wHn_A8!UyUA0$Lhzh&P=Fp`gAc)c0 zB=kXfh>i;>gCfuQ{X}ym*#| zc8~k1`hr*A+TA3nT`+)MeJBd0m44Nw%cVJI$9B&pNgXIA4_zp-zn2as0{#XlV$Ft+ zYg=qy#)?B*qz9J`DXY&VhkHuY%vKdOSj&lb9#&f!>+vD%MH8u70?J3>^qXZ0Ej7-b z-qD5NQ#)p>S$U#>LFMj^Qth5NF*-zIwvj_L_8qyv5f8FeDUoYTF1Iwk$fng)C$_!7 z#VZvKSaHbq8hKt+{M0~vOqSVxZrz)$v<%R!zJK|M1)Cn)lbE6&%E^2ihB#@`;S|LQ z#VkJHEhQ=K#{Z`N-74=U4x)dY13u?nGdkRJKQx`4c%=e212G-fZ<1wIcP_dok;}T-4H^moNiF3eX2NM~_a|Bvz%| z7O9@@Icb^zn`7(Z)RJ1#r)y_52auI}mRWI+JbbaVhUSoStV5fo6M4azs4pJVt1&e! zt)G-L3~+0;OES23?Afj|SNY$!!9-;69CmLD75j^BAcc86s-p=%jD|PHYm=*unuL+D zH@T7<(xK8DeY%xM35IE7E=F7}Wceb$3V`|{3 z>V5z$WwUaT)su130q^fal)E(DuhO2f6JyUs&hO1T3uckX1CM5QxjnwrTk(?*pLpxD z`7hdG6Yr(wR|zh)gBy0|_3gXT6GRWTAL%bV)x)kD%%*a=PB_tXo_{P;+8cQ8E_UbI zjc-kk>%rZEyVu*@Ub!wF%iB#)7bWgK`6KjVqiIP!qLB{Adn{%^!wVlWblEhlsNA|! zSD4S(?|J=CIzQlO+a1SjLK_Svn2qZ|Q^H~iuYMhjc-bKv)}L4J1aVs@xSQX@MiYy{ zg46|#NU7i1BQ(7_)IChx7YC)@1XiQ$(mmE>TW2|PDu7xoT3LQk-x()3)IES@18d4Y z95KKvp|h8>*+Gn)lokX!-${4_zRd>>dy47M*W^`)SOf$@6cx2J+r}jfVBw_Ac$#jY7CpgOyP+vPKn=Nwfs|+ zRz=oED_EUAk8|X0mEHY6NCg==+|v!ZqRz>kDxIVZtch(L9fp!6gx)>K1p*rrA75~U z53lw^^Y!xwouh9(XIs3N`|{tz*K~KfYF)p+q@rK=o&fra?g-iYaLcBc=c*zE0Impl zI&SUw8p^Zsy<+!L_x|_+Tv!6sKzs{GDuJcDjJ4%OSJhI9D%IE*ODtknxGi%J%bi)J zESVDtPzZ2Ihwd_lJ$}UbgmEpd8J7w4vkRSvT&S_2&=hiS9*o(OF^`-7Wq!U;VqqmR za!4!$Jh_xf@P#&EAWI^`jkT(%)*-*^yF~0`zxCOOMVp zuyiB205Mp=Mq2b2c9E$Z1A!PJ8Uy2sP=iGxL@FSRdv6sH)!RWqhMimvL@ME8Z4=-} zJBV=KA;}d88xx4_#mov#XdOycPYthT1%o9&@sOh7I>5YoL98Mt@!qr?!ZP%ynnA=Z z5&fbnk0gT)d;=S*i7IH$W+)OXmKSfMLN(0I422nS+rAB1(zwMM zl!m}1?OOn5AiAm;r9crDVY%nF z($_@6c5&d!G$Uh!qZEa&hsXS&5w)*wZOVsOCEQP!)}M&kH$A8uc`JT zBNKQnd5pR!_RtSR3Z*uPL`^J*$A(4(P}?vi8oBhUN$j(8OLj%24L2e|3J~GgL!n(~ zuhHcN+O(-mmh-@EpL6f~lRh~=8aUNvd7!vz_K~+olNfFDa=$9X9|Q;`9Tvttv?|4l zk9?&CO^yK8a(i;N`rXD%Gh`1+x>2)#G{fwXJ5Q;k8A7@)(W!Zow%J9aux{fv(JO-; z39W!XwE8{oqXvt-|9Z3OX_*5~zi!igdi(Y{`^@yr@9FyMMO3Ju?J?Wu$=cycmbryb zmbriJ@`F0h)Kx$Om6zpK!GEWD_UMVpXB`dOYO*Yw{Lj0p`*;RVsiZfOJt<_RAiK$7 zuq)Yjjo<0TDAS$XG1v0Z3g`H9=Y2$q;|J%zIUM$8GIXQ%{Py&*>zUir;Ct@gv-ck? z*ZF2wyP+E9%2X-LQ%%QI)@JxWWP`AI{T_)NQg}-qwEAZc@7+uq`yy}l=xhy5BF)_1 zn{TO{xd*e4TZ41vki&R$wg-Iud#Wbr%9C}HH$PgbxwjHf%pzv3%Lh=)w854z$CQ7T zfO5$>Z3!4S3os!A0%GMHIuJnctd&W*VRrIm*h1Q5mhj?j*u>d4Rf-V8wvGM6P4J*84;zixfRf#%6R9ALjd3exLJmra=rl-V+!!CK1o_gBjOAZ zZz3om5YG{b8AS*hhk%q3=@zB3AplXr9J_F>y&q@!PMt<}45FcV-1 zK})juU>ZKjQerk@*;_apLE2aZF!83!76Q|>#44mJI5b9Pz?NIoZyUnL*59QwG zyg%v(`GY-56jP*RAt@iM6iJ&pckxG$)UCofP?xm>5C@8WP z8c!6*F4Y1Q~RL$BpwwaQE54(h3Isn{LtF^3NtO`jz)ZH zHef;_IFS-k0hmToU&^sOm}>yaDhIU*NLz+ktk^z4fxcZXAdtm}Gxo0Gf0TFWJw7v{3NSWWL%G;3Mj^(cL`?p|tr z8AflVm5L&&_Dc(Krkt@A&!oATS=o@a@Tz*lsB>K>N~xqo;Q*2n+BFaN+`B^#_H^+A zDqD;<>qMn=Ej3+MtXc_PD=U`JTIo3#sxWVEO|7ku22hHWQh>h2S&cWsS?a^&(d~Xd zJ^%c5edyztFKFPssnN(Z{H3-6-mZT5y&cCo`>135SXF-2*#;N$;$F?Q07RK}fE1YS z-fQ*lFn^Y^%`v=ieeWUwEoVs&5^HgxzmE>bF`xqkk8m56%I5v6E|J#G+D3k^tq!lT zk8UnK&e@MLrB9LC=csFSf18NCS??{<+EYw9%{hq>-&T8let-Y_-_wV={;7gnDM>0ge?*LA=I4qoALbSj(IfBjM&eE zQ+b|8KhM>EoXm6ioFmB|g;^JHc|mQ9MKkn`>CFWH>T)KGDRt|zjh$QKS{&A@|Y zQ5vhPM1go1-kqR@Y=(i2jB)-90fn?m$hsSA#TZlB0k#ggjpGAd5mBGXuB&UPs_xl4 zX?yv!)xRUu#v%aJiUFGx=z}@Iotw4=uuNh#alw%Zr6=rJ3s3I~OkD#_%cVlDwPZyR z0ZAB^573v$OmfCkf&{X@hV-=zZ9Mz0gc1hXwn+k067&ZDG!qh!3M3-=;vMz zFVUjv*eEy%fGb_8X?iOS={d3DM^oS^u@+u%{%C^WoJd@+?+L-W9>l^!Jm0*_7m9CXY&1oy8E-A=9NthvBTY6@7Lz8QtX0mwj%s|XgEj*& zDWycL>Z)$r!7JO0(0D1OMno+e{~F-2);6y%%{Wr32^p)>4#HHezF5w zOy=BPy!iV4xJdctN*6ktg2ZuZ$JxDc!SpuX;%e`-fHiMv^3(jKc=#4dNL-^e);gPU z#~lVS`>6xd&5mSjcqc0x^VAzv>YD`6b)jv6-bbM#!TS3Y`*oclLLXdA?1s(sE7Kia#MdYaM~F9~Y&@F%N@o-w1TMS?J$vg`ejJ1$gjW%)Cu04MYAv zol50=Ph}fEq@1=iH)Y*yz@^#u(>%G=PM&7xP!{$AQQ1;L`#G!p9#7ItaukJKOL6qx^qpo0df<4G@|@2%vJ0 z#?9Gg%ZavBVXON2gstPAdT8yyS&W+r7fix*#vMsq+t}{b>v*+}d880E@3P3XxP1#@ zKaJnM;NuV>E+awvU*b%#-?$f_CI0LF}q{H)4_6QdS1vu}}p6^6kAJj`- zNCWMgTi0du#hiQn#1;*BJQq@ws4lQPr}+oDX{mchZI&W#~%TkOuVd8b? zxYAxsj21#0)SmIkj*{8c+uK&y&}-0|hqlQUx_#04qh06^czKs^R5aGAN#oI2yQQhl{yKbbFM)%Pf`F(+(&M#2=oznj`vEq!mR=aYrmo5ytz8!2PQ{t83Dg9>>^xBrFN zQC_aAz2itS@AJ%#()Jkok&NHN)i=`C@!Cctc$|P~BDh9@ZXUqx9{TM#++?goQ(&uT zZP|rGo=YjrR9sK7&UKu=r)e|sTqb<3QAh*GR%_`gp!1uBZTdBuJJCwLg|tl~SKJ)- zrgukaK)Z32Ca|kVY4Nh|C~X$p&Il@$I z|XzyHsCAiKOD6=QiZD)vRioLDNC9(hY#2X`9%#h;j2~zBVR2s=9%B^=`7USz@fl1TzL#+-h|0UfD z6pbb=!DM{-@fRY9lw7DV;Us(nh!7}Bv{*6X*s$Y*fyR|J2UL!n&{?rW!NTUo9+NX$ z9G={H0Kg$(A)uH+!@x0N43EHoq17VY(&8q8HA>VeP^?gnHzq8~Rz$59nT1~ZbewU_ zsG~-l1=GxwH!oa#+WJ6EgIM9dd?}$786&2crMW2871zx>@1P`?U2w@Y|GR3=j6>4h zupq;02k6;juXr!Ka>QY}6cU&tdFicpR%!rdgor0mqox3BcRV1mjoa?Y3j@_^L(_vlyB~9e0dbwE<-1~xw$ek zCuO*vDlgOCo@cLpUNF%;R|q*aP4m5OM@I*CJj|ZuXtPuvpA9_+?6$)SHH1z_KA$QD zdWl6v`6UG@qX#@R%ZUNpX9y2ds|Fe`>;JcR_E*M&xvT%JJF>}xrqllPZ?AG5&Q7;w z_uN()T6w{9EZ)k0d2O~yRtugi%PJnm{=<*iD>M0nuk@?$(Nc+4=(p4ln?+gpj=wk0 zW&A?AzX^xDD-QLUBmON3oy@MHUwZA2$FjfJkzR+|wc<~fWf^ytOFyKt{MOE5Ppy=t r$|JW&-Ntr0t+WSoy$Iv_6k8c%9JrR={P%z54?Fn?h9Ntv01n9wT-eOF literal 0 HcmV?d00001 diff --git a/fonts/noticia-text-v15-latin-italic.woff2 b/fonts/noticia-text-v15-latin-italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..9b83b0712894271751c61c2129c16baa44222e3a GIT binary patch literal 17356 zcmV(@K-Rx^Pew8T0RR9107J|G4*&oF0Fx*H07Gy90RR9100000000000000000000 z00006U>1vD0E9jWL33OHj-{5+&4h z*Wbc3W9)y zgd&P!qJo)kVb;H5H0J;Np}t~1`u}qMd%*)CA?h>!Jl|ASZO^`!Q_YZdiK6)Q_It~Y zvvvoX3!nf}Sbz)pE5`Ke>o13qB)8g}Zt&>-W3HCDgh!a~)WhKo1LL&yhw=(~(#cu6 z>8sYSA3xhUCV-JbkVa8NMTf$kMYT;)xL&yf01y%u!2iHJOAaG=X#e}1rrh%Tl9jNg z$`T)YBfPis{(s+=HwrshLRr7$>CI_Q;jsf_UIHgs09K-fTdTpgs8KS!RK>_)fF+flgh54Z{cNyETu>deL7FMe@%d zTJfq%SG$xcx<<_ZQcc_UNE~J&`_RQdJwipIhB{99ZS&axDr97Ox~*+1lckHLFPgJ9eVrpoXH4|L&D*Y&DBsf3#Q3 zi4r0#h{{Lw{czU5^u)U-|7T5V5Fkj988Q=T_d&HF7I6R>9}NyjoSgmCzX}rqksQhq z0@+~yGRWB=p0#(p>F(*QW`lYf0lH%Ut{~l(>QmT!$e#N0Aq82;2sT#;(wF^&K*8oL z7&wAM6ahK^hlGNHE*dbu!@vUIV1dQK&u>5kc+MqonO`|`<-(0C_qrj@FWiw3kxN3E zpLw7n^F-lQD%$+S6P*`EX_#{c9SZ}yOy2V&79VVWy!qEh!2G~hAU{F%7d-zHAVeUJ zAfXKwHs1>ojw7O>xbvMbk-|lb5L2$$`BtPjQQ{koH~$rbFP1=@gvJxjfAI95NIP*m zNKQIQbxG1q)*i`6z2y2R+D~~fKxL4+Lo|ECv_|NR(sxYC&N!n9rcO%Tnv!N(x)~Xr zmANq|%e?F^$XQ#IYe}AE`CU=CvdU~tQP)|P0Ez*X0I?RVbOE9aRC!@4=HMzJR6(jK zO6?3<9gO;JXqej6XiHPK&6(KIY*&jtbGxr~>_D4C?LE>la;(#d`A&89O!v^a9v6Ch zi8g>mhr@u!ECH*Jh=YV%GF}e_AC&-&uymq|L5xXK7HPpI!y(6|D33DnsR?K*qzxiE zV){xL{z)0hn8=x{VELnDrDCg^{g;N5mWz(NdY&H!UPiu}_`jJ2SOi&xY7_oq7vT`C zQ~Z-lf?JYDs$S_2J{f-52ILBY@B}04#MlDXu zAm~U&DP|hY!mzR2a=a9tPY_fTCP^Z)m?EhvP0(a?c@0IJsbs0ynmXDTSI5)WH$(+S zp-E(JY>7y%GFx+dSm98*wQ>)sJv5$LuXf%+y^q1SqhG+}GW%Ns9+18bo1aI#W9L2l z{>S0xVIMg9$jJ<7KY{)H#b;Z=ON#qe24ZwOlM)|K|kR9Oi>^Nby64l2w-hS zI{WllzAi##&sCsEJgMgTnNCBS$MSqW$VaE(sqR!V)r-oca;Q;MVf|wL`QYU_Gz^b8 zFT&5C2E-|XMBz&__Nu5Rk5&e$u2j;=hfpIuj{}+iK@iNq#xCvbli4e?>C@9|ET(DW zw0`>Nw0N379XpMDdh2QPlfRz4c{1?CLO(XRAZ`QkfN_v`NcwY0iN&X*XOJR}kx8ln zk)lLPlP<%cg%*h+kSR;HA&Z4WZ~y}Z=MLZ~43;w|_Fj1j1qlO$gN8@o%7vSwbQ%V* z1W>%Bd`p3ifLKrL56W_Aqx59t@CaJ1ykZKnDW#Kvair=+# z)m>jUgLg;#oWJUUp+d9oM!9=ITtF0Fig-wn7a-1KL0v!<>db0trBg)V>T8{=qUY&~ zJ~K1icIOuFZV=4u)n%O<<0?;<-Z%HApsR>#A>IvEdP_&W4YG#67#H-qU1yDLVt82- zT%{s_nF78U+oEW~1C;!N&#)zaUUj5kO<2w&Ze5w071UKSoyT{n)ROUXQ8$UF`}W~{ zbC$m_ILuY4s53(;zdUAAFRx6JK!T;<$-KB#uyH|eWk3Duk)d zW@6ea^}Sgf`|X-Z>>*_qS`m3(Re7K+8C{9J8zDqy3ZLRNd$#DVSPpj~OYRR^TI|=b?9RhQBze zG#;$p@Nx@k6$a6^7RP~>2qoU2sL*owY)|$Mhqu`&-oSDB`;}CxFLZrj^V}*Z)aYTV z8}c=hgVoD`hX@JEfFu}~Rd*ACN1~Mws_OS*ib7mtEMrUzq80@d!(olUg)yR!`L~Qw z_Un4_)&K#N0jz7ABVv(Y?PKnxq8d{TDy2L>wY}f;w?`XMxS>!P$R~snL>xm^3?eu~ zf@7J$RS}&~FsRNnPBy35LJf5S$!;S{x}p=fBI8XVV_LXT04jsy;=8tRl{&%;G$csw zoT^|6>N*M|sPW5TTeeg=1%I2KSeZXTDWXX6&m`8`+({_LKUAi z>b^}xfXEPtWisOmf|S@Bh!QnYeJhlgth;NhiWgN-vC1A98&@*U1ilytVJKUf*EMyl zO4-7CTw)eI0jC^FIBA`d>}7@%e+F95W$QW#tcwP$)C7Ke|GekSjA4<($MdQV8LmGt+5>Qh5B%4$JE1q z#f$>U!`xy*7KM0^=EVd9E;w*T@v}geV`5OYgS`bFs?@W@a&i-Wk=(2qGugGGwYBBi zjl^c-rwAP#~}k=Ku2&IJIv@Tho>>Q{#HDrFv1puFgMqX!IQzy zP~h+_iWMZ2ff7u`_YcJ8p3oz2-&Sgmu_Un%uPE@NZiHIQ7~$P%TmAdTh1>6^kdK9b)xG8-F{{NTVs(#4i@2>{n-{ z9Yba|UlA^y1U%{ULZrbC(5o{IG+ zT|2BTi*3qhxDQCUrP3Nf-3JDVv?QW$ZJd>hW`ddF#ofZmsK!(w^MaE2Ovf~Kdw@r< zWDsu&Ponm_h%#yT$ukGOLaJ_57 z14^@a-m14Caae(Y;4#$qTHxEPS0|=`3^&t$rg6O@Gh}zL&A#lVng)F~#QjX5SCA78 z@zhlc4i}nZ4vs|D(b6l=wSb~E47-*X{7EGV4%=A|5@BJIYe8G@=zmn%A9Ra!?JX*Vc@+LdTM4Eb2A$O0eElxrgBM5QpSX^kne4Z6d6uu2o!cq7Vbsj*;ZF3@G!ph{(!VWm@AfdD|;s&Y= zfaO*Tu=@}D)+CwLW5q0rudtMq{dafcj&3_?$8FZTvZu>-J_Crg^|I6IU1n4bJ0bqdh)8+(+DzS_8xglpZ0{S0`ByBZgzGQLF=25TpGdGN^3-w42H} z=^~ASDrO=SWlL*lW|Tmnrj)^BnVC}93~QRkC1q$Zm_ZcCR03fwP zszhKclYFPLsg9~ZG@7$j0RF^g{-%xYa5$_{ECp_woH+&w%I%r?DJSi3cpR^$Sp|@# z(p4|kQc806n}4_dJ$OH=UN1zN`pL?DG*ed+Mh=x9d1hm6_pTrurmH8(BNx+VqhrhU{=D92< z=Uc3y1sjuFHWg(a_c_fqPuS$9ES!ozP{|A^R=Ln7(!!%zaP==Dj7e5j)(!1<;?(w!`Qaekh)xjIYE~1$KgXwhE zI`jp8OJ@`00@}E0M#;N|D)VURXSf48U<8q?Ix2%D z4sJg|Txwt7W&zLd_Jz#K+|Zm46c9U1B5Wt96D!D(?{32_qsQX#vR^)UW30{pjvxLT z@&8KuXh{7}x%Fy&@*enmq+-5>F8tqC<9V~YFQ2anDtY>P{E&B}RCj)1PJiLkT?AE>v%7{^+8 zm;Go#n>y8VE-uU;uRTP%>2{R%70 z&`RPfpJeV4phl;8MNsP;;vlOz$#{NgMpwbpJp|&*7Y*)HlD$`t{QTa26C$t2y6a4v?I2_;X{+_f%=n0v3;SThN7|1 zw8_m+DbJDVbOaD{dEL;^?~eWn$yaa{RaU!DUlsm8uB)LDl`p8&(B*EyGj?}J-gs%q zGEsS)c=aUh0QhIU`-#AVdAbAZWX-ywrxqYEqFBusKJN&=Rq-vO z4^+k(I?i=vZ>%{=y6$$A_KDzgJ>`bKmV$Vt49g5SfUa)y_$_igUA}X`xKM9-YX*XX zO5A>D3j}AeHEQToZ2jGIpHw$rTA07B>=fzZr)RYPUFcUrtY~H0uKEx8~3 zvz~Z5XkV`8;2L?G-dt+IMVzd4ck$s}02-~qow4my3<|F5x!cjyre}kd^DTY&;p{#Y z{kmI=eHtXD3nQj>T^?hvM%YVD0O{Ab?#(0VJ}T1rh`%j}9r;TzF(ca*<1$b4s)Jgm z4J8XFo%yNG_f4qE#A$klUx8n#X+Aqpu(RX>@wD4fuNi0G>-sCcCQqjqoh%C3`(DNo z@4v9sD(@?(_AOU+4zi^L$KjR`3w(qLH_+xJc-^1iu+C8Oovo)=$IT(G_bW?sS?C^d z*|!5}goXO_gZoB9*>Vq#g6$FEokWUAV#hj$#_lFvKdE7Ra^Tv~)P7t~*r3A4>a)U- z)6Pm*S+vJ>PuhxI$;A5ICFbR*JaECg(Y@Mb%mA0S8uD3q8X_bp19*eKW`v346&ngy zWTo{Wjkv~#t9Gk~X%yFYYU=r4v~XX)6kw}pLV=K}GUGy^8>V_dKzD_pk~`g+E66K< zsCyVb1y5^K?0CPl%mad>rX%@#iZ_G^<#rV=w3~3EUF~{{2vF@o;eZ_k$6HYRFnPmk z(bZz7PWSp($VVS5cyb11UmG5VdC8s&Q`^iHm6x;#KsQV<=j?;ZEjG6nB?f){+K)3s zr()Z=@3?M8hb#qhnw{0F%T=8*FFM&|lFxn90j7jZ?JHru-V>_IL7EwXmHv`=rQD!37&J>SZ(jfcI)Oa9YQ}eEkLIC< zllh0d+|tz4a`4uPK3tFgnSVB@cNDq>zxY`-e%ck=*H*BW$??#|-hpfH!tk!78yhc8 z#5B20`IU7nA;-T7>_%n7gq-7W?Fr_~qo3CWX1mt1%3d~maLWb1V5+q7yDjA)pj+pp z>j&d`k5=*eD5w+4z|}u_!)I~@LIbo8_V+KBdr$XA%mFpwtj1GCT$ zLgo_zl+o|<%6VwHa&-WY9hqgY!!N;hlBX|zzLd}ClT!a0ha>Rtxk_T4D#iT{a*^|lqdr3#;+xaKfMmA=jIqF?Ph0|9Q z4T6;6jg^bN^AD0FzKq|+{b5Nzd=htPe8denxM9W=9lA)s=*& z6*IzOK2bHfQWTsD5rTQ~wIF?3%o*uABgOVo47FS2vg5>|v8Y<&9~e7>|CJ9+H&^M3 zNX7zWs?)ymNih71q=#00t}4aqfn2Xt@cZ=KrBUGVrM&slWMJrwWuZ)A@Oay|f^d3^ zrF2S#NE#i;zpFcdDIDO1$8D%Q5H>CWSW~+#;6eijJh?g~BIzL09brFBAq!74(v(Rs zNE5Y{1E-+9^r;=9$eDTkc&*HkUozX$y(RnfIv6cNk?d&?5TJjO7OWf+$UDQ*MoFSVN zS(wYp*_2=8D@DL0H`-$(`S0qvT`oJY&5Mr~`BdG5H-do9?uYq+8s6HagG ziwfiHM>zsH$0@Iu{j*K6*ayfITtt}*?u=A}11Y%Aa;4frXK#O_IaofbTtF@qPG5v% z$)7#})J$K%DmyH9bW*7Fy{oqJ_jJ>ed(7_)0RvC0_Z}qzYDgk7>>M6oGsoDgYokcr7$>bf`}>UEHj4} zv2%hAY?}8CINt~>Ll?}cDF`lQmjvgq={WWw6Hf)BmMEy-jz<$%3YTp?U-wmb#yIDP zXJ%wd!g$HqiK;Sh{7k{sJ?Q-_4&WCbfSbg$CxZw){og;=gY?I%-SPCt_s8&*8F7SA zla#*QkHift$bpz@7=My$fgWec?cPF$t$z@UnA!7aB?-BJGlTiKaZIz zFl3o{p;TIMjaCuTBAGY$ungXA^3581>! zW*V^Ol*d}hHy5Kk5N(j4^b@-o}sO`f$C-V-YpkA^e1jaAUjR9$}p??ZW+cGG|k+M+eEv5%$ylU|_%$ z9Me={U?qLee-tV<`h-yq5WTY!ujR+k~#9x>{)VXB&^3AIZD(_3yDHT$z z^{HOD7(RR9N#g}h8bR7ZdX{&YZewu0`H+2Aj`WKypvXm>GMECUbgha@%<_s&!{%lL z89ar;z(Qz3tE*8jcL`t$VH2NzQQp+j5q4u9ozAk!?Gw(cq5NR8KrRc5zoy`Z>0PQ| z5>&o!w6kzmXk_vUC*1;&`pJEhU-h1yKKq&@E#ZBW5q)(|x_;2}-2liNBsYW0xpvA{z0B%kH8lzk1UqbaIrk`?*|6Axp%U|zf z%?ezGE1%i;I`(@9X znwm#~;V&L#a;!P=J_q1iyleJF(%Hy_Z!n2?UUl~B$XxAQno2^o!V>$qg=&4SfXVkL zkjAIGR>33)wW7bha9?D3`T#p!#cD#RV1no>V|uCN;5R8hKm!zpW&*8+{npqVx+Km| zug(Ju9H}vm?|w5x6dEb4!IJUS z;R+oq%wLajZ;FQ-(3Q4(yc_lL3H%Iio|0AJn9rikbeWZe{9QoUTL>jKYV+u(B2l`i(llmBG|U*nNec`Io; zzc(JmZ~ETOl8S$(@>kOI{uDwzJ5kT?sF?sW!=r3nMy^uGg$pi4hdh{Xkqu)>H(Q8T zvTY3LY|PbZBchq`Wa@kvd|!Hrcoc9y(c*R_*;WEKprAK;5G(l}q8b;#uXuYGEPa?1 z6@L+etG`~!_B)jCD36NXtZq{~NO#c^8DZ-%+MFd1@Jh4Pbpd={aX_M)S~@ToZ}m&p z2k`h)Yh4?s0%W>kD)lnnOQup`WZDuc^$JLnG4>@7#LGoV56x3iVlWsj2B5sQuU1K? zosj97TjZh_P23oN8SJ3rs4f3yCNd3-RIiDbb2GVr#CH{qd08X@WpJ4XOen0*$*EJ0 z?efVarNC7JdcUZqE_EWJ$k61SB=ShjrVL7p>vGp-XNIa8*4D@I&YqL7jwB4;=yBTaA!OS6(?*$m-6P+H)$>#2MUo{C$UZ=Cn$S?XD<$%0GGKGO3cNA6Ftd+$+rlF zTbhGQ}$ktU_WB>Z_bxm%;EH7#zt zuwn*Y$^1}wdr6X0ke?iR!S(X}-P`eUHCzQ*4x0Vg{9z}aL;2`VYQYD$pi_50vTCVU7bdsbsn5?bQZb#$6;;%&RwZL%K`joBQzd{rv0eGj-UAA5SgYN$! zUQK}Al-#dLr%LxKh6#|mqB@yh8aWrr2U=e@pVhbHA7|!8*`?mEv)`|D;Dl)4zjGg~ zZY@3Kl|mJ%6Fb#e91)`=Nu(p@Ekx>zTBLy=-SrK5VcA8}^}e;L2K=fYUeR`G_Y2N+ z2pxSm8u)paEdztizXHb932{~8k{1&1TH)!nA&P3FyFeIUCYJl{&5xeD-Y2P61$Ljdh`4e;J<;C-C23Y{Xmot3 zTN-334%!Mdp$d$vx{9`i<$S!MFrl3>*be2M3hROZc}y0{wdrq+`X2MP66(*hg?i zh9|;mILA{mJA$DSaebL?Nnpyorr#&fX7|CE6b;KeB#lUIml}LtR927@+eR}fsojeB z;>b>xGA7Sc5Km5DfY7DRAJ6z0vKdnfS2)%NC`?Q#wKI1(*YtY|%YBfzr4|r%>=ZC% z0?D{IW6khjVnYNGD4PQ5kx!Z`+n$rFq#uMfKCH& zLnq0!Z4nLb6D#T{VkbU2MN{KR$>KIyUR5c_`_7H)8HMX<@76O8`QGeI;C1R5kJ`%H z7`Wrhli40ilG*TvszOfBThEvAxUB+M{WQRZ)p;B2z6~d3P6ebibh8(3+s{)PzbAt9 zB!bj*iL{@5qPZXktl#`X@cEgs2F7%J6iSK-G|niOPWMaG+MY(R5*v z8Jx?#M@}Mnw`~Vt^<6mpu%)ZeT@CYE9=f;r?P`-pXU#>AG_vS*?%09$xr_kmIjMz~ zI1|==(0kZ@@L!xvP!Vml?SyN}DmE(>c(+mXF%23kDs!)R&R(@#71RsrQ$3W)Bo-+) z+C#}^V%z-p7nBc$=w!VV?Hwyxwl9(R`(|c-$uA-E=0sk@uWVdRQud*ht1>(~V+EpG z0GxB?OcQ(ZpRNBY(@D1EHMKJx8lz*WLHxq`8ZdgQRD)kFj8a&n67uiq7RHn zo$=x+`#Zj+QhUP6w`t#W*q}fe-YqjVGdkN;P*Hr|es6?D1ZQ6O4X##-dKwDMu|^h> z9_%ebEc;`n^SIOjZn(!gimR<4xXHF*3bwwuXz1}UmK)M3d?c}!`MH=mJ}~gT7Hg`g77Y$!xBKKc77!0 zyxjU28SFNs=RsuEgfnN^`TzU-05=}jU7K%TTII3{Y0@s3ld&R5caDLY1d*MgYWR7l zEpL83>YS8bh)a)5$Y;vtiT+E1JKO(FP{~s}iz(59I29+&lapM^;-vv2=yJEC=yLV> z_TjyTif{}1o4>ptgz1jLbORu!@YPdxa}$+kGe|UT3Gz`g5+mb;Ki_TiMZKRUBrrc8 zIr@_O;|60Oa{!rME^nWCkT+eS2)Onjv8v10k5_+2(2l(y%BKPhqEAcj83udq$tS<( zo!)+WQ9kD}vkB9cN1hbvman~WW%o1cG%B5iW<}n;uB-aE8QZhwNwimpA;D6&V>xH$ zaB_+H!AbJlKn+mma-i;HpqBN9MS;!N&OXt0wkG3g)ME}z)d5Lv?*IlCu5deA zPT6|;kGv(7TEc&$nV#twXLeVe<|0WlH(tnYlm*)fw6YFoHuOZQ;!|DJuyN6;Dvxr; zt^094!#;7t$HPnN^T`f=R!8nr65vXFKbf)ihSzE@YY~9`Z9lnRiHF~cedK6Bwil6U zpIve_s{%p+hbz_*XVV+xA|xDm-BkyH&eXx`>0G-0YYK@&H-Z_Y3{MS-4}zfL8i`y3 z3k>tr9nn%ks75e{l<#RIi9j6Qe49YF!aPn-_HWMesp7{nOZ^v&w-)z~k7T)oaxz_( z_HJmi3d)~zkKy}PmoMDH5A*O&H7heH1*{s{QT&zbsU202{QTskQCoo<;i(&i9;Wco zaZvGfCYzvH)?jYhWjWr9!Jm5G6Ch=v;O8Dkl=CeBjau{KiNUU5pqb< z=`IgCAGQ4ccHM5|Wd$}UwvZy_dFP4Fq~uArx3z7T=H(SotEJmR(A`>)+nW7!V&Z95 zYb!!jXFX-I$fIv|tA3Slx3auk+3mY3cQTBNUcspl-uEu#x84&?p4rYrg zB_UdU#Bt7b394(=3Rv`65xVPRmk8Z>_axUDzxUR-cZ|Cn$27zzIlgiWV`Yd$8LY6d z1#W6qMhLpEZK3pV#!VveCL^4_xFD7>6&o+z1U_s%Fnqut=-55;X%x-om7YYg^kyK@I3b-KkpYBG9Qm>J-qGQqJo}Zx z!AT5=AF}%Q^*q8sn2QWRY>r}Q^};UW_jBYK09(M$irTPt#ev}i@P`AGyS-4HXG>2d zNVaN_`c}CD?nY1OY7!7HMVmzBynqz<2sR(pbGf-}!DjO|3jV{oy~DED=u$v*O$c%% zy)#DJF%A8C!_6cQf(u+CvwxrRVWM`0v@UB@V9~(qZu)HSMrv z#Q^fvswV#wex#D*!{mb(mFWY%Mjlt`?#mK@mq1>%4954DvVi>?_DxvTisQ*}zPHpL zRWQ6^d_iT|-`L0aZzD#x*aDWyp*!_fkD#O(`m*N)jI+v9es2EI6A@!+zNm z$xDS%9h|-Le3Z9kL~r_U`?;bzZ`B!@n>XY6ctoiv|0*4Od&9nsQL)jLjDkmW?7kms<2Nm-bd=Z@<`eCjN~T!=Y8BmVA2!Nqi>Gi zJ)9G?7?p<=Aya`itIIHdDUqFkS^l8^pJUa5OHtWE#6K@Z@1OW&!Y-|@Cdv7QAL$9u z2VDI5Uv%kP8L5Cn@H}%yzM~7&9P%pW4qZCDBrzopAC;d=tZ%ml-_|;;F#p0jJI6m%@2G_6sNyO-gpZ6O@7&+pl?G)~IER{PYa z)?+NC@WgPdT$)1<4^_Ala4B=MnuCkv$@#vG;yfooSDCXjYyZoQXSa^v6G|48tsTiB zxH#{h+H~sh2%eu#-A}j8ix5n+6 zUBWiI_zZF1VV3yL*x|e4f8QNveNP;#y>TuSef$)KU83+q6wY_rzu2*}^(Y*cy@~Jg zx^~+MyY^%!-o7L1d}lI!SJwLOjIBKxmOu@(E07QcGEad>!|@CcUYPcZpY)AG)_*7e z{4r;8xoW;?N5`%V6M)FQYE;u6pjs2ZgT>auiX`TZA1YRdyQ)!(VjSs99H9dOFo-$n z1DPg!zz}Hmhi)^}gjttaYFS7XFVij3grx^35C||p#moZ{t-%3u`DQ0bKf8Q^2ov<4 zYqrVHEw_kmsg~3*J_HUNq%MOsi^*_-pIL8DkQe9BEH@0wGAo3k+ld=> zYF2{GYzZjadqdlNN69xh(99Z>;D!_+7Yb!k0Wk%^e7#|I_w*ffDuDnX{z6b3Qa6R? znhUEda9V1i6;h`-3|EFX|1eWuw;tlAWEPoc7wEhqNYfI+nb8Yujx{&aPCBwC4mN1A zoQm`mpLv`!VDOHnWhu543`Q~XncXiM8sAvo%VPHTNAi%-J?7qI$Jk(GqPgdQAAps( z5F#5q5)S~IlIYg(@Lc;HSsEXh@_nc)M-t{C9_DUPjNgHUxcKP7IKJFRLhDm^)9R0XKUKnZ^dhJjSoLQ=25+|(V zn$AK8h+cc})`#FGLQ8@H4h0;efW$@8=4n=cOxBM1$2#5E#$GJKk)inw`Z~l6ryS0u zgX81uB~~auEJGK8A*{Et5fXPh(I~22256?paP|bCAX-UF3LQCg;aQvTnr~~1Jm!RX zz~*F}=wJ&VvP?E269e3BA+$Po*|ZvvSGZuZR%mWy3KJC4tCYh;-YGeCtm&?DSKU#N za1FQ(Y!?Get=Lk*&HYYOSY|;Asqm#`2tX1Jdy+09 ztheHpg`_FGOda&75Qi9G6lE-#G5Z9g5{dVTAgpviB;i}r(jtoz=75<>TVmjF!=Z?O<%P%l?ZNGO9?MBg{_>&TpUmo5KbUm zf>?mnx`(AuFV-S8NSaCk`OL;8$15WV+QsQ0Q>1w`NVKsfECzTXouy%bZ4?A7)+!v+ z?9lktVXQ1@8B7GS-Ju`jJSeVr{dM89P3&s%P4aP` zyP3ukj0)gv^zAr4-FSKk=hlp;8@DwS!#c0m>t-gK-ql}Fty;6Zwcl?m8kmt|(C_r; zk6xaX?w!v(>KrZHlUd!r-7~uCT~l^FGgaA_S&OUXdk~JycS4WiI@UEbX2uh z)v>L>I@}scM4{T{uVWRK`EPO7smivynJ$TWT7Oy(ZqAX73?ic7G+&5@U9A8?y$01* z;krJ$#zBGjj2Z+I|5dZo>Q3*Q$uj+Qh@sPBE=S8FdM7BrU4 zV-Uh3frBZ_t4t2)Q2?RN2(E73qwJQt9SaNB0*8(`P@|-_cHT}(8Z;!<4ncm8@2CG1 zhU~!GvgX#fe2Hm2Yh{H=IeiIjCCK$ngaPZ^% z9)g?mrLV+Hkn$?u*jtZq%ibY}<}NUr$BM)JGvE^b5tZ6a-JX{EiO;PEt-qlrNmCHu zStbXhf_Qz<6u|EH7b5|C`0}=BxUs_him5W7OJJ$XmhnMCc{(dJz^vLkQk={*51K?@j&X9?g1`@rrXcHS{N4%F`;?0Hh8XeuD8K_vb0<%^q5}?`$25r z%qh%S!};<8(-Rw`+o>KN`~Aqr5ZZ8173-NI_8qxV7O(G@*;b2O^^ zrz?lN)BGmr^P3N}GeYlBJtCpt$46DxS8Lq6G`%rL1Z-%ij8xnwL=y5*NGAwuz4+Ojt-mEVNQrDBG-bpnk81O zVx3bnDY$6HPpwbrvqPL(w}dSpG2xT>D}b4Q9l#s$4c@~&ZzQY)_nRgE7>{51*J$r< zeBpHJVjU^-ha4nc;vW7VmhxkG2@N|+F%!TpfdHgG|?scuQN)e`@v-l}p>I;{+fW2TFu4SXa zO|;9myqe(SafgiA<0CXubU^pQabyTo+g@j=rt0HFTzUy-Dvfg+vcb`mkpo6d(fS3o z^I2%UwN@UFj<*IZGrV~0v5Pab8wK(U9Y2EZY^XrKpbzF%E(nM=L6h`M&?Jf5PHrP} z=>Ut4!53OTIU3dt4n1i%oX>s6oKKfgD!HJoIaYgO@fU8NZ*vPy)&?K(ku;a>k*yvv zjmguv?Yyu7<*#}3ra$}I=$)Sq=%fF-j?cQd7FtZ(QL%=S#TKfw#(=O1pTnh^SLYIH zCX>~94Ad4WmjfbhGkSU5uH0%5Yed7$I5D>_qJVBG0QB%TcyfQ`j%{_Xr!l?4--nUm^T)891#z5>R`w3Xfm((znZB zCQ^RqSu7t;a@2>S-Xc_a>)0U2Ak$`h8bYVf5Ep(X5-FqhDPhFH@ip?Cp%n4G389xt z7KCeeN6#q^V(B17(hOZKHUjLirM8d$Rwv0Bb}2&FdOf?iA_wDL*Jt++ayw~2XBXZt z&1ptwc9Wj#N_L=iRd1t_8yI^gG^V1Q&-ko#ceH@^B#aK8>5kE*uk5g%jKSSEKa8+o z!_md7rf%7p;Kc7ZET>@qNM&^0+fYxOx>qHoVHps4?0GlLESZb_2ED1Wqfog$?f|J(+ULKk;Q7I56RY(YUboH+ zDWq>pIs=ygrqjC19<4*;##JEg{zPA+>b%8-i#Qw}!l)B1v(}WS+LEiFO|pxi5iW@k z3JJrBtx`aQo>+<)?8nSidG1*FC2_j5{&`^k$B!>uPx_~S?SHJtHbWrzZMBVpK=}Po z=P&=S_wRc7dL3IZwjct)!{LD2oS58+7)5ne`p+dNAkg zIq-&iXZAYK?&CQkwu%F68v*0}qm6CsvxR*%q4yW4@GHl)WO004HWmTj)_{&=?A`;~ zE~t%$Fh`M&z9DMuZ|r_G&vqR9u7l1Ni}SgQmFQwu8p&3v^~qRfNbP9*vqVFT5@#u1 zyNb$ZM%EI-G8B~L|btr=IaX8UYz+nnIQcZg%9I9qO8tK z>VFBkN_(F^FewhTIYz3(7`Qhy7Jlu6D4Bl7RH-FvfiYcb^&MQ}QT(YPUzVs4BM{X2 z*Z@6d4+jXmFL2Blh}A-hNu(5kYAG1B&sk-8?R5FomN1Ty{*lt`u=^}M4NubJC`wI<2g!fqeI|v^jQ2C9z}*xyi7ymhct96WV|O6yycDfAoWDOReQNe8^5ttIVO)?Ck`MiH$MY;_>$ zI;8VUome?r;}M+$NMEaY;mhtNfGzXOa1Y}0@z1;z z1}3Q#(xu5Dg)ejrOe}2PeE9O?FF>Hzy$`_=DonTt+)tYQ4JJmcWC;e`hXKIyVh?VE z^&HR?v#3R7J6dVs^apLi0$__iod?UJahCQT5uQ6M~ z0kYLz`y6!0S^FJuPIoxkI6)?z2&fIr25y6}K|+ps-+z5*rjLErlQ z&C}*@N9>U6k_&dqlkbYl3S4xQ^k`y8k zZ1pE$H)IRh8v$&6ZT4dAiUA+O#)NqjF_3LJgv-z*1i2NRPlZe%W`qGGaq#i7oO>su+!6O6d z?tmV`lSsh8^pI*nD8o$;MRLKRpn7OmJb-Z0!_Yij0C-IR7L9;9m2gmwsI34&x12nvFqSb~613xiGo5~*MTHUcCAhZqDP1%q4%g&_=r zX&d>fSH#_SisW_xhE$bp7>Nir4oJX|jgbgp;{cHDzo6{@|NoPc${5-NND4X}s{0Kw zJ4~{Nak$6U_s_ttnI;2vgDs6r(sjVsp`zYWFIZ=tY~l*jdBZblGKWg8uOW*>xAG@; zCjRKx$c{^ey9)nMsG848qS7bC{tvV5HdCnJlyRL`d=?muLLK0xNOZwlaf|G53yi11 zY_Q2yZ~IZj4I*zX)lBAg9cHuL46}7K+auXKsoFb2W1pm7^3eZ&|GH<+-1{Iz5&%_F zL|h(0bw$M&B`P3QTlJ0X8GyMtN*K9F7%R3h#>f#hV9BV#lBkX75jj$%LTN!U5yeQr zK&3>FeFY2*42uNqPH(!$`;4+|LCZU|bTqES{d0wO8GLX7(&L zL}#*4IE%9A(}JXM+?H=Y9m@#r!bq-mdGv3Y>xa37uO2w{aCp-}w$;Xhm`F-Ul%Ak{ zSlk))RiR5n+ug?)kOa1~wB2w1e zPMeWL+ZA9ZhFtBR*Y(G1R}1LQxOCEr#D0+TlP^E8omSjhr(7GDXKbT%LYRjj5|iw| zb`Q97$N7RtT+*t6d`|ZKH(R7)VoR;MGV}+My%QzbnYb2p84i2I`$R0{do@WPw28@Z z)oWXVBohIudp@XZC3jnaO})iTA}=P>(`i9XBACD5=X`y3c7TNiy+H~2X;uMY8{3F= z3O}UKx%)-+i`spEPd{kkJ>q~dz5TtZX8RX}tp(-LfR`e55yU0RsZMn)YP%@Y|L-q| z9~R_dL7jjFI9dc9^BGt`9uTBF1TT@7awL>8c!{DTNk>|aAvLX=+FhGcQFrc4fh<#6 zDjgSqI$Z#5K+VWKbE~W(JE2`XgoUxd)=+pQ5C@+BSG8>KBS88?8l6LGbZptV46$;( zo8^$ZhWsBC!UH%QfRo4x616F6oPt2^>=A*{Y)D$CTyIhBaTQBf?!1jD|CeA9Tmx-1 zMUdc|e~o*8u3m`BZqJq~93n(ADGZZB^Xh*+WomNLA1nWo1l<{Jldv3Yu<^R{!0>&{ z0>B&=oyMbg6=VVQXaleuSdZM7SJeR}5|)}bik_rMRlC$*?=87x!mwVAie!qNW8wHP zImXOj;8`G{pt3?^&4xV(4BCi&%>op1jM@P)r@lvO)p5=8>W%C=E*mHH(QT&|4A`A= zNNMcEbb$4n+s~YF#C2dmW3#MLu~!&U%K*0q#GobRmb_JeY&!0&XqH`f(t_h@(+QS0@!xskwAlAS6w0|TgpeyOL@wKt`n*iGZJfev)UwM;Q0`P@@ z2iM#1bP!crs>5FlM>WDUNRq3^eU00G$l0McLSGpGT>{+l5qMvQ9= z)L%@1fk1#k3jym-P;fAa!Xf(u0tyluifPfz`kg5ZGuUF_`i(g}ECL*2@htik0SOVg z7AXCK#1a{`6juGr5)Bod6`Ru7_7iJ%=fFYJ8b;6PH6auv(ts@DKj9-Oc2P%J>0J^{$g4#0$vj}SoX~z-DC8|f(wbYOTV>c} zcBg9QkmZ!!OHNa_T#r021$`?ld=&XA?vJ|UPYmT{_3<{p5RihZA>A(w5u;JFPs|dx zC7dSRUMWx7Z$_<0R$Wd*Ub6+QZbg6+uw_t}3Ro4Q25lYI(tv9s+Cp|}qX1|irVzFR zjDz5d5}Gg~oK%9`KvGatG_4H1j%DaD%du*BHi1LrR?@4I^(h8b4J$Mwx-r9~rfHdF zrfXi?vc$3CTI<=gZ(B65Gqmr>p-*E+6DL#W&RqI1ceQZq(xZ1PPiwDkynD0tvGcX} z>%qUh)5ICq&6@973k}X$^q(8%-0FF^>s_$qqC36hZk@~Sx#GU7mixa4wXS*Sx<{S& zxWToCU|h=h)$D}@l@|Na58!B+8-I8QD^@hCiI zdq=$cdvqkg|L^m*r?W;cb>es^1$SaWs{vYix7^=5)lO!9+^2)c5IlT zBd}nFgvJ&Ijx~FZ7#yTXmTH$Y{w})YGO$%Z4CvAW0i#ccHXuVrjG2JqfkQw+Lffdv zfMI)O*lmyf_UV-eQ>ypwSkknpA4mqSb^a+N`$LI_AM@@DOz7@NIw!4@pPR#6zQV1eF}ktfTzh@V)5v{Vd|w`38;rHoAPn{TmM$=Jvh5 zys&~Zl|G-mtF}Cpib-uq9PpAqCr^Gx#fIF&K<|H9qfG47B4Y?=8YK}9vHCg8L-UfT zdKldsZCCNT>gd?yWTd%+Y3H4}e)dNK{ko+)NARY8pzmfaZ}G!x{{h%;^1Xvf4$JeZ zN$pP6vPXPyL;3ScqQ=9F-k;mhkcfIY0%*|a|G)!afzQS7KORc~);$LRHhlwt{1PC( z2RP$9&>^Bpyi_x{FS%Ae(x}|Z!!=D>{5CXYtJP4hSrgc?x-Krl@DV}#nhVQSxQ^C> z<~!L%h^Xpry@p|Qjy9|SoU;xuhjf|4)6=3|&22--mm&K`En1n@!zJ`qYaeDyVf)|mSC!&xvUkZ76->+)&pVXMyRmpVcB=Da$$ z!U_QEwy}AACx;bJisT<;Ob7xL=mx*U1@^!He({pukQ4dvL8;nW+Lr(CICNDRLe&0@zum6z3u)M3HspFn4EYMRLJN$nfho1w9M6BZ zKq-Ccx1aL61Sie%Pb_Qpw$4gDin289+%$gMO=a~pTTxQTGsP7UAD+r>1Kb{s$zT?xB9MF@wOT}xtB}ix z^d5+$oko#?X!(BG0igBhrA8zZIm&=07SjvZrN-`-6>}VH^3zWl$c$3}(49HCT5ndR=$27&_srh61uq$_3uR?DfbXyOzyiaCnyntRy-V5NAr z+p);lFrcW@D@Kg&fbKg4^B)xY%CZ~D)#YbAZA3>9i%G|_QcPo7MPX>R4&b`|#cW?F zoeThNC~4p?gUa{Sn2~41jlESv)LPGwAgfJ9qs5lCMkEZ%@Wha3bY7*A8-dwAF;ADF zCRf52^+p<37VM0=`X)tMm~xk97D*q7*;H<{Je*WRw2rV=E3X&roqa*l4sp@gP-u%& z6PhB5B}lAY_YJ|7GL%uB8EQFL5qVttH-SA1VmMaD2t>`x@nwYGaCRlEO1FAKq_?KD zd%z^hZ@9vlvgs-0=?w`z9SXJ9BU4ux3o;e{A=`tFgiQmxgq|k1OC%ruH*4cK9=eO? z<{20z$-f?q*Jh3h1&{6x(0Z3rEwR@|L8&iqjG#hXYCg%34|bV!Jog#PTkGGStT}w* z6xJ1kfjHKsrsIW<=n(_Mq|w7x7^WdKr9ZM!DTU67(l;6#ttgVHBwA}K^5w)4m3wyt z$!n!{*j)PAQo+iuoeEJnGc~g2?I6YSy>xPsrsM9HfusuYB!fL^gTWMmTb*!-Q5vw; z$b;Ki&2*f(uAY#1ft;su4vu>|nf`Z*kVLg>*t@E|)P2J=IH8C0MDLVfMZ$ldAWcz7 zH=A1P>3E4WHCvZxAa${KDyf!ZHA?!Ldtw~9J;w%UJqoTgcxh~>Mj-;ksHJ|+Le;Jy zrr>)Fh9^Ssom!5SRFeScq@j}fn8^?s4M7c$Y{WwxMS||~60GK}z>p!S6$z?Tp}?UC znTuzcIvA8iAKP1^b0}PxA2KV2rXL(bs?rsx3_wOQ458S90{v=S*kMpy(dj!7IXOgC z#!uk2)}hQ>DPQ%RD+AbQhT|^zA4V62bUxQ;%DSUYIB> znB8jkisCN0zjGf99PGrs4BVkkpi@Y&&^1EAlCoE1yH@v_TdBBk@U*=wYi19T0$8YI z1Y~*%w222Rx|p7Rjvfu(xxeeGAK=U?5G!(VkRk)eXKx&FFhgC)*-;rVd0K^*_o9s# zQm)U~ox&ciN7lW)j9j+J=K6sCqq!4D9D*yenVaV5Zb69zXhG0!Ng+m_U5&w%3q3X; zxH+HGJ9@3AvOsvZSG;&(L~sHwXZzPv+Z|5)w@}CTb^VD=%|IbWc1X&yiI!e8!OP!{ zHYxA&__iu-M(eQZs6}T%C`F`Tn4c8Rm|Icb6p_D75W?a~_pEug3YgdI5k&G9qykO} zM=w^@_n&c{f<@2|o8sI3+_S}s)NU2K zJi3+>tkx?X52A8qOZ+TM92nx{pr}u4vz|r{RfbN(gmaFp zUZtpE0LmjESR~NF5jJJwX}4rqv_z4D)iwp;-Kvs%jw%YsGEq88k;FQSmazKnX9G4; zsDpYCk9I5$wVL74kJdw74VsDXwxl+RSY9HZRws@{z9?Y9S>YHzt~bpvu?CBkBWhd} zv*yV`&ELg62c4gBrRpA^5x18TCM8QJ%URhSJx0(ZNayaLNg?(nPJxgp!359OleFy+ zdTKT)th$x744WGx&^Ert56Mq}aeQwdDCB_>dpCH{FbH&VE>2Q(C)PO<64^=+?Y|C5 zloW2lEg*v69lVXyh9p%D5mpb1F7s8AQi7o4%8r?c4LZ?iwn2kb&467NDg*!}Ov1LO zc28Z185chso>Ln*RK2DkPRjQoiMnI8uH|JmZ8PKZlH|0|DI0JIjxMjhZLgzZ(5ZGt zqu{x};M6K%5Oy;g68(zjh4;KSUbr%CH0saYL-KpXD*er9!LYJBlC+qtbqzm zd~{%B63D%8fp2JV!L_2;QK4sC8DUVbtzB&&`Nq2=BX(k7Hga;Lh|1)%(tMM>_YOM0 zN(u4Q$uk`dZ;FmY^A}$vsQY)>i&9ts!Y%&4>eur+RNV&G*dq`cNY+nl7``V;x<)e zAC9Z)Y&0-p-*C1ZoN1QHxj^t)t5_Jxaww~J8vkd5^ODjB46PiO?@*JcvhhF63PVU5 zNAc+L;LK>ZY#*`tLly7LJMB9)$n5!b&ADkes~dWy9IPD|5y6Gm;>%+FuA0VE8Bl@?^O})DYId$^Gb`G)X^a+F1o2@&~CT&$8-uF8f`C`LBkr z^?I=G4I12G5?r6nxit%(Y7Q7X$y^zPZ^cg`BZ(kM5>J8Ot}WGP2w>?{m?&7xp>S%f~S!$RPu?SnwgCB^ovAc z)|?sG6M>a$`jdqbD&i7Dmu^?6)2dEXbHn!N!U#S>^Dz6fLy|l4OE0g{27*lA;A}oK@hvVMCMd8% zQTn%+Jh8N<8f$K7y%*;!jv@^mpwa z;F~%2w`SdS2lbc_SoMfls*cR%beIT4dG zvU_|+OtKQ5fQFYv>5pH(hSSO7dEdA_MMp~OZ>67XA}XyJUN=Wt-v$aB1Ek0Bm8Ecnj1W2kty6IPdYMua$4gu?6;&h6bEgPWzB3d z>p_eYk}X${kEZ$gi<^ho(mmAOYTJq;OE-~w1`)pW{Q3Veu;1SQFMWKz6bt<2?N_sR zU}Bx7tBUBhfp9XjczEAvS9s9zdPfg|dlJ?Ytv>ztU<7qisc?Q#?qv9Yxuu7TX6IzcoQ*vBnJY zPk5u6fQbEJ3CB*a+>bT+;omEWQj|@hSC#yHw z{@-?f$VCO6vZ$VHN4dh`l_4faGcHXIe?*R+UzI2;CnhxB8CRF?ovOeGLpx*d6%oB! zE7o=I+lqt6w+Tq;P;kB^ZL{tz?rV>N0ApLH9FokH|E(LQ?nLOiHO8^DhA|H3PAmk@ zn7a*6n2Sw9c{x>3Z~_N3;~k%><+iFAcVfVh{PPPS3onq#h}Qy)F&8I7`CG9X3euv2 zKxZ}|14B21jJv3HP^gl>-@cp4gDMpegydYr_XF3OJ&VmlEvgf`u$%}%JSGHPz*870 zE{8z!xgbalS5>_esf;oS+Q;21Gl42&p~`6E7Y?Au_Aw0E<%XGXH;PY16(Z@d?-vf} zEho-+os5esD#qy)eF8a-3{8w`-!H{jLhj0mk{iR$_K*E%GwTVg^&j}-Y%#`8hf2Aj z;;9rk%G&vIOe*uyIXZK9yq+<^!-$~N^WJUEl@fFJBh)~dlQ}2XA58TVSp6Sxw@@cX z$H21AY_HaQD4t3|AZca6>ejIvX`Kwen9%HO5}_m>DvXB`O82J_mQUUs3Td)wGq*mN zc&d%)RkVsBi$4(EAAi2lG; zIJv9vMj8>N9-UV4)8>5B{!EW(DzezbJ8ZyKZ4>SEwV`hQ!?WE^NzkileFSL6f6$Ee zgbd>XnwEyKb+9!TdOPPp8MHi1gB7mdys!mzj2R?(RTKN+ss5u}W2w~G?k(KiuqiKh ztJn&c1#9aon11=-GD!aQdiuworsyW*@SI5ot8iOYOTYj58etYHW)YRb%3Pb=(xI!& zz?juu=rLWmu;YfUv3*u!Vi2$55Ube|;c7(Zw3~iSTvq&Y|K-jjLs}NC z=IvJh5=i_<<0QMHO-=oYHL$h3{{PPKf$E~EWIHkJSx0Q7CE>>wqp+#VILf>$!3+Dq zX%5AG4Lw`Xq^I2&_-7~xz5?B2(D;mL6f@J63zKHr7t+m6^Ly(+@6BE_E(Bysf{cxx zRk?t$v*T&Fm2r?uESU>_@fe&M#WssLZxsw0pZ;o8LO68pKXnH&@AHMq{YSamt#dT} z$4S+`qvb<@y;7ee?S^Rm6(( zno5Qvtw$^9qs(A!(M*w5ZZLZx-%P+dY;mEPekVwyqZmUX;j%c+sMMnOqmRmALDrG8_T%`?qi~<6a+%z)6uZ@*{9)aafjtQl~aTXcZ7_@I6PyKU+!O#HIY?| zOxQ>`u|6dKRTfF?%6g_N9WvYtHY-vcwdvMZB%8q)@#f0iX&g|ES#Pn-gt3w z{6>&X_*zAdx-ui9y*@R#sNCgovRajG$t4HX#>Yk_heu|XBrU;XFS)Sr8hN^2(@R+p zX2FiZrka6{df#F&7ZoQbW}n|9KzGknqCA#9otyd(^(QLDQ<*)jZ4;>9T;QwYh?&sh zKJ990brl_5xY}oa_T&9C3oGF7hqBApc9gL4%wh7gJ-2c*%GQ;Hg3s(PYUovYm19>4 zZmxM=o}1m%qFFO<8*La-@YzqBepQ?Lw(Iytrey2QiyO_)Km2&<`W_xac@9LK*HSkG>au9SnxI1`^tp!Diz^A6YkG-3=Dx|C#p{nyM|WDm?tB*<(55isgavHX7-3ti)I(n$AE04AQgzp>l{#Z*9zJ=rMJHMX}2Bs?; z!)5|44OgTa?MjjaTXJ*QyNXqVE=tV>;myKJWo}7St#Rf0DvhY6uXE=3Po#Pb`#_wN z08=32v_2Let@&nKch)$;2%_{?A&?+o9{@g2M;X?oqVH9If|%aZ!$Z(_^FC~p-8%4v z_6bZowq`rB!{=Y+z^Pv+e#HXu&kJgE|JRKAULU^6YM4#tlYhAK4sLbzxgzM5ZNOVB ztH&z}`L^Un!|0)TK2?enn9k61RI_Ho-i=9dos5}^^}dG1kN1pSul&ks9M+8(8;pC} zT1Gz=*rrsbG1IU!9Y&$S=+lu`?@ahH!~|PbG}%oIsxgQ$h&Ij+oGEVKAx>cyql|L7 zx>^`Q5IoR^8{m|S9Z0KYU1(~#?$?n%vO(}0hwav)Bjfu>DSpl=9CvsWLoSVafrdIH_O!&^;@@-&qf z;<;h0Ys|#DWYuCLI_*VJ*bouelmWjjSuqLlwNEON9na3~?<3vwrD3}vcw{-=fF}IH zEZkW$v9rw%edcYnl^?AmADtPOw6e{~bT$MFL-nJuum?K=18O|~WdF_f46F&vgOwk{ zTK*$za35*I-E7i>5GopTq1d+y#eW3km;`>*4fomN$@QfdJGj^gf#(qC72AcsBcWcR zL2s#>-0hxsed(Cr$pf8j^9Z~Wrh>0Uv_he@ZrC`s9d+^0CtiF$BpzC%BU`pY zO#<1^esIXsM_H05%7JetpH9XC@un8FKoFX$$9wOlLn^OeV^xW9f$iY=ic9Gl5ukW* za8Ph=$VrRs_;XX`u?j&yXsY5QSAz$X8vGo%qigGZ2WSHa=tV5ogX1ps*nimIvx2Q3 zFck0QM0m9x>BQ%yF)!O8Ls)NzO+JXj*1%elEko?ADi$F~hw@HI*%_@-)?$fqdc5w9P%I7s5Fc*fNiW z!hu7Pg}KAboP5`9NiiL~d!@a@K?yc-X#a}9V)U=#@6=4^Hn}Jr?`-1_+3-6@dv+hB zCcHS7Q7@CFTe{H%kUhV*YE18etd3k~UR#y}fHoAiNxXJ(-@HYW_YPQ^!$z2;`JJYB ztZVO@G_4(3f{Mldj?Ondy|A7({X8ChxD%_V3Om@-p*{l2u}3ZWO^1e_H1DimKng&##51aClgRZ3%(v zhrn8~?$<`Ktvj|ccndbvt#A+i(hv9^24=&Gu(#KLsYSR+_^0Q{Ek#RU{^R@5FBe}Y zt|5M&_ewGr>|y5PIlFDPr^FVyp3JG)%PSa&(tJrh!;8xU!*T3&Im#Xf>EwzpJ)Xzb z=X#x_`Zq1d)tTWyUy>76&Shp1Lsx5ss04rxW4%`|KJ09$ZIZdSw8>GSa^9_ut@XND z(6>jd@>Uy-M?0s@i9|@Hw(z7e7EVqvRKLBFdrs<`zS>x4DP)O$=-1H$;PQZG5aUFe z@FUMRj?tHvzRf)=u$B-X=w2EjAQm!{WzqD5GgTK}1PP^1;b?_N2%|hkR%H|9p9gFE z%XpRrwAuAF(W#I^>8HqF#ISs_@MMs`b#Q>Joym8c(YeMt8=2&lVxHkyq{>Wl^fzw2 z5SZ>_ucPqIcE>sTCLJBLvt>uswNi85_{yj8Z!$5!R-W1Fd}Y(*v?HM7^7hV&hfW3lo97(shJOKNzR z*_Gt^+u?K<&AY3}b=q>3xQUpl|Lelz>a`Uam#{4cLVbNlda+AILQexUX zZ)LCF9Hun*RrHOcnF)=&g#8!o?Is>WKi-&DAI?H-GTyG>KU|lE@;|GadltXQ9GErRzVM5AjuZh;b=oQ)!KdJptPC>Qtd z8ZZ4@Doh?cU9}neo4&)hvg{P$x7DUqrr1&vMR@&`Sgf|Fvbc48qIEcqmd9dJR5r~! zR;M@Z=#4`~*`to85IlWEpE82F>f(pZ>#*An6xk==5Mr z|GVDJl_2fMOcDMClLl#yxb|2YQ&E2_uuGmnCAKHrS3(-E7z_a%w zfoBIthR_&OTbP4h&Dh|X9TZbE4hyO|^yTXiPDxq#m(}y-3xS`muVGs@$hu^F5oTI; z7Hp2;2ZPO~WQ$;PLtc>aVX-TB%s&mrbasY|+mIKSlKid-`m|@PYfOg8U$3-k4~|pW zap^pR`nfcNDUOkKXqCpUF4VSwT8t2A6^He^75uVj1<_-X}d|ctHrZXC~wP zeXSCBXTlQv_f=Kx^G`^q@P?0LOL#q6bNp(>^3c$7-0IZ|D>ZIe#ARQxPi* z?2rcQfiT^gv5%aQW@$rjQ(P|(RIihg78=I!6pgPcyW(e5Kd=GlImAF1b17 zhJYQJ-(lrt8VsSxeFpT-XjJ^)#e9j|5+ba|B}pR?)cfO{fzE`%pI+i{%l~$jSLxgd zRy+~v=<-4QJACzYzkj{CAYd~!&ckrn)?nCUznLarAn2cm-N$C_-cQA3w?luQHt{%A zyN>`>{)M|A3XVN2N^RZKQhbav?ibgaS>K2k>ry=Dl|Zx6L-@$cbEA_Z-+G@>rcRpp zQ6;LFh`^2ji()u*WYJUDE6>T8!F*&{aViaI5M%yug*ulRS z!e1p>AWrS5zk}3MxGN+zt=V0YPuyRit_(_Wua%3Ei8h`o(3UsVirw)Ks!WC6DnyKZ zKtQb?lN-aVvX-$_gisbeE+^1EffD41SHlEx{$)GhHj~gCDXRu=k7N6DphOOHYIip{ zMVoV44y&@21<~AS97yw}J%)AuJ85g%Q?L(_fblZUVZEOjdvz%c?XyUVBL6^J`F#;1 zg}}Dqf;_zU_t?K1fdfb@qc$`ZjW6`#$V{EwV=0zpTFIaP2h^xds!jqu%N35fu|pC; zK(0FzS>%k-IhTfjQ5HVmFjEC+4_x(pDFWNu31KB~t?lTFz@+$eKI{lJ%}-zdzw2Ti zuUH+HVjs>i;W}9H4UXyU9TMoE({4Z?%Mi%T1~hY`kNF!6U25w@Ww1^D5%Yun88x!U`Z&(^Z_ zXxU|wTu3qxJ0>pO zM;J?IvFs|PCMd{{9XEEZ3zM`^JZTw8A56iw#ukrPCb9ddw6y1}n}1|THO`;IltcIb zC>EUu*>r{-*o~dO*A+Bg_`af*vA)3jVFgi_=WrE#brz-r0I!`>$@5&PqCcr};oM4o zS<$9^(_@z|@!4*$(%|lLv-gDZ_!XP)Wd8@K3tlIrm8{;j`r!OJZ%tSQ;7WPB-n%V} z6PoKH$#04hcH}=vh;R=iYrX=;e{}I~egQRmPET3ayYJ=Q=V0(9`70BCUKl&|+hl}% z#hH$m(I3?U~zN<6b{>9b?AK7}sM;<%>{WZzaY}JNKcH8|%Ne@_)Jg$V3XG`LzQeT}dj+!>s zOBYkd^cL2(@Wyf+Ilg@TRds}uVcmC){KldXpDr{*w$$M>Jj-(zQ^sRo|K6cK@Uo&^ z^z;hDXm`7%j^-f+-kP?BSL@@}!?lg`M%y^=K+fo+pEIP~yW?Fvd)O|Ica^JpI~>Ei z4zBTub~0&Rw#f*c_V25=XSqFAfWI^He|fWmd(#fdc`xHHqiky=5#g2k@Fpa8x#&i~ z0l>fB`oBJQM*pq)r2YSWGv%N3KLC06@D!ylXKF+7p*?=qAAL=xnedP6bzfBCL(+%v z)MRWwXP`a?0mz5Ky82*|e%$cOx!C7&{dzV@5Xu<{g8U*$mLzuokU6|VGPyKKbWLY( zNX}fEgAl;;c^vr=S$saPL<^fv`J>d;|K#oVS^#v!T+=@~o}TgvMRgDaim6XfU<}TPFlvy0 z%h>^Z{R1Ft0^7ZxJ3#@OmB=c6K>&FoECnjx^}(j8mfIOwYxpEU0Wc6Ub#yeE>Q(Z{ zkcb=NB4k7g5^MyMs4eve0wE9taRxE!dOe7SXe=g(J@$?sYzAuC0i?a{7$Y(FuE37l zhFB9uD;@wtjFX+)C(1}E$arHsN!H24YFVpe%dy175*tN)G7|eLEksi=V;!RD0?j|q zc-nV6Slc{+qKSQ;Ix2cc7iQSh&oVsz`(Q$tg)S7bD)oZ(t?Js~ZBwYDV5nYM^X*h@ zM?rfNsUu0)2}NsZt6{&5`ZW$RLI9@B$2&?1@HW!0YwcMY~^N*4?r@ z7OHzw_y3C_`q}MRx^X%@5(3wvBZ!fl^!^w|#)R1C$a?`a1*W{(Glf>hAo&x`(%tAT zG8_#HVsF^9Y|VChH`1IWL?OXwfzPy75VB)pz1H+$3d3nZbrs6v>pV4qCE=aeA?%mo?~l9WgzOAQ}|i(Lz?qtitSO z51*j(gR*1@bOy4L7p&^bC?hw{(HP>a&H#(iz~7N4$+Sy>o4Z8w;$|-Pqo}A1-A*Hb zJUX=ze%`nRFztkMX#?bdBD$Uc)KBs|n$x>GV=8 zsB1jLxy;S;9O;7UPeu{`ONPL#6aMb5$(}))KjgIl8Utf3B02&(^=2nF)yfx7w}?8X zh0+AWvq_A+Qx~bXs-@gf9rCuNS1dY)?3TpF*ka@`-OUl#J?o-xx>!p)R*y75PL!aj zC;$ifRK4U*7PN{)X=OEft*KvSgKir$c4SQ)yq#j=?^+I7B(8)GEXIxrckn?{H|qG4 z&8A;^r%Otc_31I!u67525{VL%B_W_|C0(iRBW6fxho>8z>ECC}ma962P1U3rwf)*v zd11n;5>l0e3D+H1MoYx5T;kNyan@?sX>Sn1rujl>TaE)r1SkwlOE@ESREdPw9TqX2 zs9lp#+i(kRoC7DxQMGim*R<~8GzK3UZRF5l+Gad-h$~u|`*&U+0yA*?AkYCp&B%NT zhda^BN1C7vrn3)1GP0blpu*{fng+}O0z(i(t+R)8lB-dQ8gGF12cbEfE$*cvkyR|P z97#$^%cd*Yo|?!y{s^kfNGTlan|iOIB8+*(?LC;Vy}qzo8f2|-tluKAFWd@Q(=cmj ztqx+EY-{W?O-g8ur;H~aL#ukuZGAFsjH^hI6Qdr;##`|v66GpRGk_uWaa%hUgKG5k zibfw*_a%*pdWa;^6EzKWl@=3tjAW~}JEafkK?s*A{zNQUS+VwF6DQVUzoyWpJg?N>$yif^h)sP76QfVwYpK3htLexmTkZE;-yjHlnh5RM#i6-zu z7%Wp*>P)(WhF6(V;07P8C}?5OQ5_s1NkIj)Y>S3BS0-_5uVP-+thgXzvhx!RVenfT z&}eWA6OKkr7_cHPi*6H?SBnWAaA+Jrj3(fybdW9w`9_mW_dZFMJPT7>c0k31Ov!qg zFT4>yuq^{4OlhHFhbNE-nn_%Mq1{9_%dr%a5nc!j2@P0ARVWj~ms{X=&W8maOhf8H z;vo56NdqMZVHNsTpvacfiM=FfbjS*%u?d`r8o{Ls|Bfmn#?V28hEf!x@dJ512Ed_Q zS&(5WdG~u0Tu@!@szv8m$S65Ahc{Hom%7*0C!s+O*Gu!feD+muq!C18$>`huqpIou z=1uRQx~WxCAR8oSQ2eu-@6+`I_ZELbzH^BR@pbPeyILWM&xQ-T-i!Q=RE0vY;K84K zK-u^j93N=9YwJR-=PnnndS`6cYgQT_uwzGqiG??;?0wNRF4{K)O98XPdfISKCZpU~ zsP8n%R(ck_3B9?clfBxPSR3OokA9$~S({B>Vq)7Ww!1%*y&CHfeu6<&+=JFL41W&1K}tZG#j32(GTzv@_l?TGYh(ji)i+;vt=rg}68bMT@1eZG7i z)3nfXFBK!<&D>^Jb*b39TJj~*i&hn9*dr#CjIU8j3trz+khE<9Oxp-2!S+$T6byT_ zyQ6u%aYaT|n<+E%QAx0a->WfX76i#~39H)GNFtbD;vRdr*VU)HkkmVOdkY|>Z!r=8 zq8&p6DW$d;;?NBdvywpRl$QpI;qF|+31eQuv&Gw?_dT-9Y49ha|tIfo1FCV)@ zzs|SS0DSSNh-y|gTKsXpC7ZFvzbdPNA>`$;A-z$fk&>l?1Ii-t=Zx1IHBhyWjjN9- zVkA%&{4yb_X+cJl_<^T36q!*~iM4ZW90saHQVR>?pp0vgPi#LBua~q-g+#U#V%(Z^^}q8kDf%L|6`^#gJ6dOg=Q!dLx2n5$- z)53U@>?9PqTZnE%r{&xcR#Brx+p4#wS|9TB-{l6>>ckX#mD=par6X-BFb!(4LCPwB z-9sTE5o(GxXI^Y9Oqblrl8auLW1qzPRwMIuQ@pLD8)b1%!NT z!bSq3QfTOv#gA`XBEgYauA=61DfMdvi-Vbp#HLv& zrZXBbm+O-kob)%jKj=aD~KQTGy<71@q zZU%(1vC?stl$|@32}_Jfo;{&tWZB}DBnFO!8$VzWUt!>uDP;vj*7(9QW(tUQlvWgc zzt4AWD6m!l*4wX5iNs^pJb7-6dwGcXVRqt=3|qtOgbcZdI$)3E5c+YQxYnLpx@lpEzHcjV5TjtAnTTwa1QJjQa zlL^&z+pH)Uatz>SVoct0uy{cy-ao_uRq3(OLL4och|XcI3*`Q*59fVxGFMMpoBaw#c#Jc z!9EUf4GytRi`3_QijNe-)BqJ8xuDL&V;uP|4)k`nvtyMXU8n)BaP@w6&kYKkL#DaI>o4tS~QAhOzl z0-Ty60aX={BP#P?sfY7=VGfc|;}71!H0~vhQR9X99bbYhfT)DOV_aIy`GIok`68@K zoX8IIl1BMH@dp4`M3o#E{`nPVp)uNOftJRzn950n5_6b(c+ft)ys}Mu6|dQg^hRh^ zX(x#dWN3mN%m{=>I4fucH%rj0H!;8sZPlGbfTIcrJKT!{L~b3wIoZ^GaQkofLRa@< zU@A1*OQcV$*v7|S6<8ptCmZZlJ3_QK5Tpjg88eDwNRTD1O}$$S^M5$C7OBvHp3I}H zN@bONrF65R*afJzI!INysTfcxdGVOYK7~tKKr`4y!uu^^-E5-t0Q93a>`4dH2QhP*uCVdLJvWOpv&Tpmpm~?zL^3Wj*?4>Tg$N_zg=F>FS_~DSXiQ5$d2wD*hPNQkmLNXw9_swqxv(u*x!X6GP|B z4v1VYXIB)i1`x8FPEzqf)$cUac@rNONSvtO%`QaMU@@BJ>PLV|tq7#yET8Xq8Ou__ zyl)0UiHF$~(l~K;$V7y=YPD7r0jhwQ0)8s2#l9T~XALbX8T=3l>=Q2KWL0855Nsiw zLJG?sp&(+jv!w_QLL@Xx2%NxmTx|-KwIw>g@Q#cU_evO)V-ygDqG#0!4ZOkz6Jd?R z1cl%e;4DzDK?-~fWw901sSV4fYWBlUj^q7VkoQTtM#E8>%B7}r5q#R^7P;jlZYi<;!`G<_AHxgttwP-(dJ!p*=N+ztHt>}wf3v*?C6UAEN}C#c;x0YemW0%$3^S$Twlnmn3q|)SQaqAQXi%#!a$wMa!XrN9smS@K@2&> zw@u@6A%cJokTvT?%3m-sRr^IJ@*j7J1M#sOv_=gtX3D^~_b9b3K<5L(EH+g0R2M$o!zv_t0z=3yphQ9xPB zcSsVEwpf~X?JDCjz}gcqCv94{acZqh*W@|wAj#jZ>`>^K#wGJ3AP4L+9zWHH0;n8- zkv*zoiPLrR(!{AWqb%{;mg=j4GEK=ko`Fu~EZ*;I*ypD)6sP0JVRT4g;*8tuIK=CI zzUke&Fgl&4DXrt2Xoq=BvvMqpZOf3rNd(G?jB;JYq}p4-)&Mnw14Ydq${3OOzQxzr#fj)v zamTwuFR)VMfeTWaag-obx0^Tq$lb za?#NWbU#Ia4NHDASx`#XPm-7A{++vA`?l8#P&A~OF^tNY;nL?l$#o^>tb)1gO;~sn z2L(5#mbxC4J3gdy#-g{S+9{7IlP*iysn_V)-q~H5F?X?rk_-4FFv*!U!GfJ;3ANST zC3~PX@cL>p633=i8Y)x17h8V`or6xKpfY0?l;293TETk6u$40N!I}r|yWCE1o35J= zgG5-|G>84AHDHp)OQlaCUSJhi#7Jrh(Fb~FH+Bbf{LCd4Q!ZID^X9sGr*3OMr_>%6 zY`O(Vv~TK*)bmdatjdg+ohNg=WR0w@b`g!lAi&_#eea#La42$QZ+AD6X9+aj%NZ+e z=E@q`4QNFJoJUbL7!~P-tt05KL|#auEq6?=?T0HpJ7r_ev22eA>6_)=srV1+}3qan{m! zA^v-2gok9zYB#*X!UW{~7NmKb&85v2HTFWz7W_X%)-;0flMb)al3WGDM-!lR_+KaJ z^=iJMiqwY7MJK@JfE)Q!9{D0lvUJ_sy)MFj>$Dj!`&BpB4~Mz)pVQ%f*fC$D_{A5m zL8mAYdK91Wod2(1ypAWyDETGFjpHO$S~0A5pFKROlbBGbvf-=vC(M^`zgvutINh{T zn(Iu?=iNv*pcYHQE0MhuMZ;aHd(j6Mc?k|ZLsH>#6YOs=STZRDBL`BGYgaHR=)3urww|Ex3qK)M7Q_?5_$C7jN-QuV0Pd6YVsmhr; z>|@F7p6F}(V|>X5xf-V#7?Or%_UF0yzUy3P8tBM+WCz03J{rQn0AIM1|9N ztEaVGw^Upal)xTwZRUfPH_Edx7Fx|hJLe9d7>>)_)Kh^%IsBz;pN^C5%XcxWmgK)j z(J|F|P#1xyUt}TTS?Xg{16fh(l}~8CHW3kUDUnPoNnD(>Fz{+@jeQ&`reJ?4K>=J91KfE*}|Hj85w|46pxEkUz5 z|0LAsRjBuiVOS5=&R{L{_6uUWaE*S*i9|RHuQWxelNiek=H2SG$Fx3gdMM3IESPeQ)_GuzZq(n*`3DT@RgRBIfGnF7qJh1&T zdE&y9#ZbCvOZHV_$@!*P z5v>u+Nz0f?0oHH@)IKKFCWtZI{YjZiwNkBS$9l>|O}#@QiB3?W?8Q2kf44j-QXz0#0Cet+X9u!jfwtO)3MuLN}1nJa0g&OzkV@#Bg<78QNcRET!l3z;IObNi)7S z@8iw*WCpM%nm3An0uh8wu9=OKOd}^9$}$uquT?#5B`3N-yqdie+`6~L0Z)RNAh<`^ z2oWy-^N{w~!GYu*hUfz8;{yc#5oY4u=p8cFN!-ZH7n|8~skk@!`w8@7e8y~(H_ser z<{Rs0(;}K?9)QGlf(!y6MF@S4LRT|WB{g`lVoB$H-Koo8tYrElFCfNUGGij(Yv4eD z*ZT9uw?UdysKc&5`M#N73C=H+LwVa8kUC%G&~s*U=bY7zXZCN2e?!uAxu&fmKm}mr zYrr4Igyw(YyGa^^l0$jKqAtr-vSeJ5J6~X7NCNe z=P{-Lg!LHX@z17hr%$*iL~Km#bYO2A3Ystp8MDDHD~Ue);0E21EZTx}W{xDoI+D&6 zr+V(hvb6URq^q9QPwL+s~OmprHJ+JkJ^+1zG^|?-S;n30zY*sE-sZdtbw-7Ig zoN2&>wu*owYPB8Rt_dW$e!&V+((cJ~O!zL*s)UHlU4ja7=H$c5!b?3^ zwgraKNh#qZhF6^G=_sLllec6zx1S!aq1>u&j1A9WeLi=|dULs4Dyj-iFFhihwR`cX z2Ser7R_|tf)KVZp1_-$)<*GdCRe{S~G=>*(O&b=OQJHgU=FH!bsOMz^J1^UN)qong z(rDQ#P?fko>P%_s>iJC_ikW&fL&WeE2R&=7RouJyS`iX%KVea40osqD@rdf_a#`55fN-zb8^i3lRFZEETqZB5Z;KtS^-8JH5VA41ZW0>5MG4SrE zx8m#UY(?)2RpE7Me}6wP&WSvaQE^9`2M+nnfar$c=2#S>(siv+>kAf*!7ADq+NQC&td%K!=ow|W(WvlrPya@ zVJ)K+VF4lZ(Y55XrqRm6;uK%c)bdeN@%Bc-_v(@7-cg{eOtep$cQ-4=zhg2-OpBQx zbMNZpBh*^Z7%}4nK4LUxxAW}!FkX#zz=A{q%n&(qks?Rpzhiky=7 z)dj9XntXfoy_6$;c*+gb)GfPL>jLCNh6OBAIYUD&rJsr%I*-VO^66*2>e_ zVk8CMZ!QK15@&#mfQ)~u-ojGPp=MxkSSU+rylKkbK-ypGpNlFC>6Cz zV#XYTytQUAsiRi4$DPhz6$+aNJ5x84RM)^`qYHs|(*Zqni*6(x`EVDO3ifY#Mb_o^z!FYF`(r(2Q7Z&P>2{ zb+$S%=6wb?xkjd>;V4{&#xZNHHrXzb9}d-x=t1XpzeoS>-S&>qJB-XQW%UT$)!eG1 z){>!FT~fsoMY2v?cZ(?Aj5oHEqeMid>bhy#Rt0UDKo$_uYAr2I@QU&wZnQ1KFjyfN zGfmw$3m?FqFSR&eagI@Ph$)0pCF6`zZEN0{n6+h=wDHYB8SPNlCRo71)*)D8%mBl^ zk5lXF@Jd44z|JnI=Mpxvetn(h; zDkX0zg*koBL4J!%OoLIzTGuLfUEjMk5C_XwFG?|X%+UltTJs2%^&Ma$0M29EPVHWR zN$=h>alms*T`385?lP{JqW66tzQ+tev<-3XUVIF*4Ggl$xQWT|KH#7(?2?jMWj3%4~5H;zRa^9Xt|anz2?*L zaLU`cLL4$Ha$4OhZOG-j4|JQ?3>w22kL;oo)bBS}e?29MN-ENmpaRMI$ zF(0<+b}RA60WmNBea;JmUClc_@YCh;?C0t0x8>CJ0MGys&VKkgdDmY5^vrGm0DgTG zD*(W6&$^4>z(0=fdb^+~Us2R{@#)^a^%Q2dkrt(&&$GQo+)utY)c#L& z))2Ix0xF;J@D)Mr5;O>b21+peCa6A%155G{x+$>AV!~<^R5N`>_=Jz$cMf#ns+KCK zVj5M8!k=96-)fUiTtAQ|zF(R?d3lTTzE9RRbKEy@OA~7UBrT|{GLu?Fu}RT7H;hcF zz7^HC1dZ2C>pY2NBEPSRz^=6TIE_Ia}jVUTx!b6Y7URt*y zle{qJ*djPrxYNHaD zAb9#gzL5(utxFRFx@ouEAUS2J7x&t;I%5nev&P9M`t=5n$*<#zZsoFVEeqeS*3TIQ%>%rJTwHM z3~78=b~8-hvL~PR$JXgdA9QNhx#fXQVkEqNx7Ph7b@B8zB^zEZ$~|GV;%QTz8fD_k zzyT^Jo>J$-XN{h6%ml|(*?y7Gmlw>+M^$5|9;O->n>Pes5TWc?ngpGzB$Y(X zV>ZO^Sc*b1S86V2GOu%W*|Oj{uw~C4Lx5nCl4q)O^MHqH#^V(Y4#fy+9 zmXeQ77NFot1i0fzbT5y{mL~B+`v``=qzeF%G-(kDB@ifxScm`;QZjP>`~(Xl6d_Wy zC^6{lxUxp&#)<<9M^0!gk&!Ssb7#+%3mYDoJb8hFK`;e}WCjHd1I&auECYtxguAWL zO&n_#TO&ulT$x@QcS{BZ|Djj0K(w7c9kY%(YRss!KZ z__j)yraX*dX)N=>N1p<+$!1@C^*P``0u9Vzdu`J(!s~*9^i!Tz7A4sxe8^8SN_;3O zFDXAQztp3zyr;0>;7F7IheXr=om9(rD|jd~u~fJ4@icpT)>!-B016b$6Yx(_4IWE7 zIyyMNZEw$T)EQD1duH@6pEvy;v9zYmk$uRrkGjgI^RkO063F0pF|B-vwIe|;>l`^W zr(M_n-}&hLMi+NZ!A_(~a}hfB4Pn{7S7K_uJ{pQTw3}fBwF^&EWSpZ*hbCBB?!2 z{pe@2z3YL*lO;_UY*?yE5F*8i*DJ^$T!o0b$<1S zE8V1i%GeZ1P_KS>``nU1oA$?Jhy3(3tn)ZyoVBHlpLtScvG3QI$8D7eYbacG1AEAm P&>NsQ4M7L++xr0k%F9lN literal 0 HcmV?d00001 diff --git a/highlight.pack.js b/highlight.pack.js index a373159..7d1bcd0 100644 --- a/highlight.pack.js +++ b/highlight.pack.js @@ -302,7 +302,238 @@ e["after:highlightBlock"](Object.assign({block:t.el},t))})})(e),s.push(e)} },t.versionString="11.7.0",t.regex={concat:p,lookahead:d,either:f,optional:h, anyNumberOfTimes:u};for(const t in A)"object"==typeof A[t]&&e.exports(A[t]) ;return Object.assign(t,A),t})({});return te}() -;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `xml` grammar compiled for Highlight.js 11.7.0 */ +;"object"==typeof exports&&"undefined"!=typeof module&&(module.exports=hljs);/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ +keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", +literal:"true false" +},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ +className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ +className:"operator",relevance:0,begin:s},o=[{className:"identifier", +relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", +begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ +className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", +begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ +className:"identifier",begin:a,relevance:0}]}],m={className:"function", +relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", +end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", +variants:[{begin:n},{ +begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" +},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", +returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ +begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", +end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ +begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", +begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, +contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ +className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", +relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ +className:"module-access",keywords:r,returnBegin:!0,variants:[{ +begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, +contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ +begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ +name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", +contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ +className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 +},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ +className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ +className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ +className:"operator",begin:i,illegal:"--\x3e",relevance:0 +},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", +begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, +keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ +begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() +;hljs.registerLanguage("reasonml",e)})();/*! `javascript` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict" +;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],s=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) +;return o=>{const l=o.regex,b=e,d={begin:/<[A-Za-z0-9\\._:-]+/, +end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ +const a=e[0].length+e.index,t=e.input[a] +;if("<"===t||","===t)return void n.ignoreMatch();let s +;">"===t&&(((e,{after:n})=>{const a="",M={ +match:[/const|var|let/,/\s+/,b,/\s*/,/=\s*/,/(async\s*)?/,l.lookahead(C)], +keywords:"async",className:{1:"keyword",3:"title.function"},contains:[S]} +;return{name:"Javascript",aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{ +PARAMS_CONTAINS:p,CLASS_REFERENCE:R},illegal:/#(?![$_A-z])/, +contains:[o.SHEBANG({label:"shebang",binary:"node",relevance:5}),{ +label:"use_strict",className:"meta",relevance:10, +begin:/^\s*['"]use (strict|asm)['"]/ +},o.APOS_STRING_MODE,o.QUOTE_STRING_MODE,y,N,_,h,{match:/\$\d+/},E,R,{ +className:"attr",begin:b+l.lookahead(":"),relevance:0},M,{ +begin:"("+o.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", +keywords:"return throw case",relevance:0,contains:[h,o.REGEXP_MODE,{ +className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ +className:"params",variants:[{begin:o.UNDERSCORE_IDENT_RE,relevance:0},{ +className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, +excludeEnd:!0,keywords:g,contains:p}]}]},{begin:/,/,relevance:0},{match:/\s+/, +relevance:0},{variants:[{begin:"<>",end:""},{ +match:/<[A-Za-z0-9\\._:-]+\s*\/>/},{begin:d.begin, +"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ +begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},O,{ +beginKeywords:"while if switch catch for"},{ +begin:"\\b(?!function)"+o.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", +returnBegin:!0,label:"func.def",contains:[S,o.inherit(o.TITLE_MODE,{begin:b, +className:"title.function"})]},{match:/\.\.\./,relevance:0},x,{match:"\\$"+b, +relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, +contains:[S]},k,{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/, +className:"variable.constant"},w,T,{match:/\$[(.]/}]}}})() +;hljs.registerLanguage("javascript",e)})();/*! `sql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const r=e.regex,t=e.COMMENT("--","$"),n=["true","false","unknown"],a=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],i=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],s=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],o=i,c=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!i.includes(e))),l={ +begin:r.concat(/\b/,r.either(...o),/\s*\(/),relevance:0,keywords:{built_in:o}} +;return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{ +$pattern:/\b[\w\.]+/,keyword:((e,{exceptions:r,when:t}={})=>{const n=t +;return r=r||[],e.map((e=>e.match(/\|\d+$/)||r.includes(e)?e:n(e)?e+"|0":e)) +})(c,{when:e=>e.length<3}),literal:n,type:a, +built_in:["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"] +},contains:[{begin:r.either(...s),relevance:0,keywords:{$pattern:/[\w\.]+/, +keyword:c.concat(s),literal:n,type:a}},{className:"type", +begin:r.either("double precision","large object","with timezone","without timezone") +},l,{className:"variable",begin:/@[a-z0-9]+/},{className:"string",variants:[{ +begin:/'/,end:/'/,contains:[{begin:/''/}]}]},{begin:/"/,end:/"/,contains:[{ +begin:/""/}]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t,{className:"operator", +begin:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0}]}}})() +;hljs.registerLanguage("sql",e)})();/*! `bash` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const s=e.regex,t={},n={begin:/\$\{/, +end:/\}/,contains:["self",{begin:/:-/,contains:[t]}]};Object.assign(t,{ +className:"variable",variants:[{ +begin:s.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},n]});const a={ +className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},i={ +begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/, +end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,t,a]};a.contains.push(c);const o={begin:/\$?\(\(/, +end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,t] +},r=e.SHEBANG({binary:"(fish|bash|zsh|sh|csh|ksh|tcsh|dash|scsh)",relevance:10 +}),l={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0, +contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0};return{ +name:"Bash",aliases:["sh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/, +keyword:["if","then","else","elif","fi","for","while","in","do","done","case","esac","function"], +literal:["true","false"], +built_in:["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset","alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","type","typeset","ulimit","unalias","set","shopt","autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp","chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"] +},contains:[r,e.SHEBANG(),l,o,e.HASH_COMMENT_MODE,i,{match:/(\/[a-z._-]+)+/},c,{ +className:"",begin:/\\"/},{className:"string",begin:/'/,end:/'/},t]}}})() +;hljs.registerLanguage("bash",e)})();/*! `shell` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var s=(()=>{"use strict";return s=>({name:"Shell Session", +aliases:["console","shellsession"],contains:[{className:"meta.prompt", +begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/, +subLanguage:"bash"}}]})})();hljs.registerLanguage("shell",s)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", +aliases:["text","txt"],disableAutodetect:!0})})() +;hljs.registerLanguage("plaintext",t)})();/*! `graphql` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=e.regex;return{name:"GraphQL", +aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{ +keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"], +literal:["true","false","null"]}, +contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{ +scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation", +begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/, +end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{ +scope:"symbol",begin:a.concat(/[_A-Za-z][_0-9A-Za-z]*/,a.lookahead(/\s*:/)), +relevance:0}],illegal:[/[;<']/,/BEGIN/]}}})();hljs.registerLanguage("graphql",e) +})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], +keywords:{$pattern:"[a-z_]\\w*!?", +keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", +built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", +literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", +begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ +contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ +className:"type",begin:"`[A-Z][\\w']*"},{className:"type", +begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 +},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 +}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", +begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", +relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `json` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const a=["true","false","null"],n={ +scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",keywords:{ +literal:a},contains:[{className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/, +relevance:1.01},{match:/[{}[\],:]/,className:"punctuation",relevance:0 +},e.QUOTE_STRING_MODE,n,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE], +illegal:"\\S"}}})();hljs.registerLanguage("json",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{ +const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ +$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, +built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], +literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], +type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] +},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, +end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ +className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, +contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ +begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, +contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, +end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, +relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ +begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, +end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, +contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, +contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] +},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ +className:"number",relevance:0,variants:[{ +begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ +begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ +begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` +},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` +}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, +contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ +className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, +end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, +contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ +name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, +illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", +relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ +1:"keyword",3:"title.function"},contains:[m]},{variants:[{ +match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], +scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ +className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() +;hljs.registerLanguage("python",e)})();/*! `xml` grammar compiled for Highlight.js 11.7.0 */ (()=>{var e=(()=>{"use strict";return e=>{ const a=e.regex,n=a.concat(/[\p{L}_]/u,a.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),s={ className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},t={begin:/\s/, @@ -360,102 +591,44 @@ contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},{ begin:"^[-\\*]{3,}",end:"$"},a,{begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{ className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{ className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]}]}}})() -;hljs.registerLanguage("markdown",e)})();/*! `plaintext` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var t=(()=>{"use strict";return t=>({name:"Plain text", -aliases:["text","txt"],disableAutodetect:!0})})() -;hljs.registerLanguage("plaintext",t)})();/*! `ocaml` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>({name:"OCaml",aliases:["ml"], -keywords:{$pattern:"[a-z_]\\w*!?", -keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value", -built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref", -literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal", -begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{ -contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{ -className:"type",begin:"`[A-Z][\\w']*"},{className:"type", -begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0 -},e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0 -}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number", -begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)", -relevance:0},{begin:/->/}]})})();hljs.registerLanguage("ocaml",e)})();/*! `python` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>{ -const n=e.regex,a=/[\p{XID_Start}_]\p{XID_Continue}*/u,i=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],s={ -$pattern:/[A-Za-z]\w+|__\w+__/,keyword:i, -built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"], -literal:["__debug__","Ellipsis","False","None","NotImplemented","True"], -type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"] -},t={className:"meta",begin:/^(>>>|\.\.\.) /},r={className:"subst",begin:/\{/, -end:/\}/,keywords:s,illegal:/#/},l={begin:/\{\{/,relevance:0},b={ -className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ -begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/, -contains:[e.BACKSLASH_ESCAPE,t],relevance:10},{ -begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/, -contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/, -end:/"""/,contains:[e.BACKSLASH_ESCAPE,t,l,r]},{begin:/([uU]|[rR])'/,end:/'/, -relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{ -begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/, -end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/, -contains:[e.BACKSLASH_ESCAPE,l,r]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/, -contains:[e.BACKSLASH_ESCAPE,l,r]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE] -},o="[0-9](_?[0-9])*",c=`(\\b(${o}))?\\.(${o})|\\b(${o})\\.`,d="\\b|"+i.join("|"),g={ -className:"number",relevance:0,variants:[{ -begin:`(\\b(${o})|(${c}))[eE][+-]?(${o})[jJ]?(?=${d})`},{begin:`(${c})[jJ]?`},{ -begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${d})`},{ -begin:`\\b0[bB](_?[01])+[lL]?(?=${d})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${d})` -},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${d})`},{begin:`\\b(${o})[jJ](?=${d})` -}]},p={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:s, -contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},m={ -className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/, -end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:s, -contains:["self",t,g,b,e.HASH_COMMENT_MODE]}]};return r.contains=[b,g,t],{ -name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:s, -illegal:/(<\/|->|\?)|=>/,contains:[t,g,{begin:/\bself\b/},{beginKeywords:"if", -relevance:0},b,p,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,a],scope:{ -1:"keyword",3:"title.function"},contains:[m]},{variants:[{ -match:[/\bclass/,/\s+/,a,/\s*/,/\(\s*/,a,/\s*\)/]},{match:[/\bclass/,/\s+/,a]}], -scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{ -className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[g,m,b]}]}}})() -;hljs.registerLanguage("python",e)})();/*! `reasonml` grammar compiled for Highlight.js 11.7.0 */ -(()=>{var e=(()=>{"use strict";return e=>{ -const n="~?[a-z$_][0-9a-zA-Z$_]*",a="`?[A-Z$_][0-9a-zA-Z$_]*",s="("+["||","++","**","+.","*","/","*.","/.","..."].map((e=>e.split("").map((e=>"\\"+e)).join(""))).join("|")+"|\\|>|&&|==|===)",i="\\s+"+s+"\\s+",r={ -keyword:"and as asr assert begin class constraint do done downto else end exception external for fun function functor if in include inherit initializer land lazy let lor lsl lsr lxor match method mod module mutable new nonrec object of open or private rec sig struct then to try type val virtual when while with", -built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 ref string unit ", -literal:"true false" -},l="\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",t={ -className:"number",relevance:0,variants:[{begin:l},{begin:"\\(-"+l+"\\)"}]},c={ -className:"operator",relevance:0,begin:s},o=[{className:"identifier", -relevance:0,begin:n},c,t],g=[e.QUOTE_STRING_MODE,c,{className:"module", -begin:"\\b"+a,returnBegin:!0,relevance:0,end:".",contains:[{ -className:"identifier",begin:a,relevance:0}]}],b=[{className:"module", -begin:"\\b"+a,returnBegin:!0,end:".",relevance:0,contains:[{ -className:"identifier",begin:a,relevance:0}]}],m={className:"function", -relevance:0,keywords:r,variants:[{begin:"\\s(\\(\\.?.*?\\)|"+n+")\\s*=>", -end:"\\s*=>",returnBegin:!0,relevance:0,contains:[{className:"params", -variants:[{begin:n},{ -begin:"~?[a-z$_][0-9a-zA-Z$_]*(\\s*:\\s*[a-z$_][0-9a-z$_]*(\\(\\s*('?[a-z$_][0-9a-z$_]*\\s*(,'?[a-z$_][0-9a-z$_]*\\s*)*)?\\))?){0,2}" -},{begin:/\(\s*\)/}]}]},{begin:"\\s\\(\\.?[^;\\|]*\\)\\s*=>",end:"\\s=>", -returnBegin:!0,relevance:0,contains:[{className:"params",relevance:0,variants:[{ -begin:n,end:"(,|\\n|\\))",relevance:0,contains:[c,{className:"typing",begin:":", -end:"(,|\\n)",returnBegin:!0,relevance:0,contains:b}]}]}]},{ -begin:"\\(\\.\\s"+n+"\\)\\s*=>"}]};g.push(m);const d={className:"constructor", -begin:a+"\\(",end:"\\)",illegal:"\\n",keywords:r, -contains:[e.QUOTE_STRING_MODE,c,{className:"params",begin:"\\b"+n}]},u={ -className:"pattern-match",begin:"\\|",returnBegin:!0,keywords:r,end:"=>", -relevance:0,contains:[d,c,{relevance:0,className:"constructor",begin:a}]},v={ -className:"module-access",keywords:r,returnBegin:!0,variants:[{ -begin:"\\b("+a+"\\.)+"+n},{begin:"\\b("+a+"\\.)+\\(",end:"\\)",returnBegin:!0, -contains:[m,{begin:"\\(",end:"\\)",relevance:0,skip:!0}].concat(g)},{ -begin:"\\b("+a+"\\.)+\\{",end:/\}/}],contains:g};return b.push(v),{ -name:"ReasonML",aliases:["re"],keywords:r,illegal:"(:-|:=|\\$\\{|\\+=)", -contains:[e.COMMENT("/\\*","\\*/",{illegal:"^(#,\\/\\/)"}),{ -className:"character",begin:"'(\\\\[^']+|[^'])'",illegal:"\\n",relevance:0 -},e.QUOTE_STRING_MODE,{className:"literal",begin:"\\(\\)",relevance:0},{ -className:"literal",begin:"\\[\\|",end:"\\|\\]",relevance:0,contains:o},{ -className:"literal",begin:"\\[",end:"\\]",relevance:0,contains:o},d,{ -className:"operator",begin:i,illegal:"--\x3e",relevance:0 -},t,e.C_LINE_COMMENT_MODE,u,m,{className:"module-def", -begin:"\\bmodule\\s+"+n+"\\s+"+a+"\\s+=\\s+\\{",end:/\}/,returnBegin:!0, -keywords:r,relevance:0,contains:[{className:"module",relevance:0,begin:a},{ -begin:/\{/,end:/\}/,relevance:0,skip:!0}].concat(g)},v]}}})() -;hljs.registerLanguage("reasonml",e)})(); \ No newline at end of file +;hljs.registerLanguage("markdown",e)})();/*! `c` grammar compiled for Highlight.js 11.7.0 */ +(()=>{var e=(()=>{"use strict";return e=>{const n=e.regex,t=e.COMMENT("//","$",{ +contains:[{begin:/\\\n/}] +}),s="[a-zA-Z_]\\w*::",a="(decltype\\(auto\\)|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",r={ +className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{ +match:/\batomic_[a-z]{3,6}\b/}]},i={className:"string",variants:[{ +begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{ +begin:"(u8?|U|L)?'(\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)|.)", +end:"'",illegal:"."},e.END_SAME_AS_BEGIN({ +begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},l={ +className:"number",variants:[{begin:"\\b(0b[01']+)"},{ +begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)" +},{ +begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)" +}],relevance:0},o={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{ +keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include" +},contains:[{begin:/\\\n/,relevance:0},e.inherit(i,{className:"string"}),{ +className:"string",begin:/<.*?>/},t,e.C_BLOCK_COMMENT_MODE]},c={ +className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0 +},d=n.optional(s)+e.IDENT_RE+"\\s*\\(",u={ +keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"], +type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal128","const","static","complex","bool","imaginary"], +literal:"true false NULL", +built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr" +},g=[o,r,t,e.C_BLOCK_COMMENT_MODE,l,i],m={variants:[{begin:/=/,end:/;/},{ +begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}], +keywords:u,contains:g.concat([{begin:/\(/,end:/\)/,keywords:u, +contains:g.concat(["self"]),relevance:0}]),relevance:0},p={ +begin:"("+a+"[\\*&\\s]+)+"+d,returnBegin:!0,end:/[{;=]/,excludeEnd:!0, +keywords:u,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:"decltype\\(auto\\)", +keywords:u,relevance:0},{begin:d,returnBegin:!0,contains:[e.inherit(c,{ +className:"title.function"})],relevance:0},{relevance:0,match:/,/},{ +className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, +contains:[t,e.C_BLOCK_COMMENT_MODE,i,l,r,{begin:/\(/,end:/\)/,keywords:u, +relevance:0,contains:["self",t,e.C_BLOCK_COMMENT_MODE,i,l,r]}] +},r,t,e.C_BLOCK_COMMENT_MODE,o]};return{name:"C",aliases:["h"],keywords:u, +disableAutodetect:!0,illegal:"=]/,contains:[{ +beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:o, +strings:i,keywords:u}}}})();hljs.registerLanguage("c",e)})(); diff --git a/mtime/Mtime/Span/index.html b/mtime/Mtime/Span/index.html index 20c19f4..8e0bdab 100644 --- a/mtime/Mtime/Span/index.html +++ b/mtime/Mtime/Span/index.html @@ -1,2 +1,2 @@ -Span (mtime.Mtime.Span)

Module Mtime.Span

Monotonic time spans.

Monotonic time spans

type t = span
val zero : span

zero is a span of 0ns.

val one : span

one is a span of 1ns.

val min_span : span

min_span is zero.

val max_span : span

max_span is 264-1ns.

Predicates

val equal : span -> span -> bool

equal span span' is true iff span and span' are equal.

val compare : span -> span -> int

compare span span' orders spans by increasing duration.

val is_shorter : span -> than:span -> bool

is_shorter span ~than is true iff span lasts less than than.

val is_longer : span -> than:span -> bool

is_longer span ~than is true iff span lasts more than than.

Arithmetic

val add : span -> span -> span

add span span' is span + span'.

Warning. Rolls over on overflow.

val abs_diff : span -> span -> span

abs_diff span span' is the absolute difference between span and span'.

Durations

val (*) : int -> span -> span

n * dur is n times duration dur.

Warning. Does not check for overflow or that n is positive.

val ns : span

ns is a nanosecond duration, 1·10-9s.

  • since 1.4.0
val us : span

us is a microsecond duration, 1·10-6s.

  • since 1.4.0
val ms : span

ms is a millisecond duration, 1·10-3s.

  • since 1.4.0
val s : span

s is a second duration, 1s.

  • since 1.4.0
val min : span

min is a minute duration, 60s.

  • since 1.4.0
val hour : span

hour is an hour duration, 3600s.

  • since 1.4.0
val day : span

day is a day duration, 86'400s.

  • since 1.4.0
val year : span

year is a Julian year duration (365.25 days), 31'557'600s.

Converting

val to_uint64_ns : span -> int64

to_uint64_ns span is span as an unsigned 64-bit integer nanosecond span.

val of_uint64_ns : int64 -> span

of_uint64_ns u is the unsigned 64-bit integer nanosecond span u as a span.

val of_float_ns : float -> span option

of_float_ns f is the positive floating point nanosecond span f as a span. This is None if f is negative, non finite, or larger or equal than 253 (~104 days, the largest exact floating point integer).

  • since 2.0.0
val to_float_ns : span -> float

to_float_ns s is span as a nanosecond floating point span. Note that if s is larger than 253 (~104 days, the largest exact floating point integer) the result is an approximation and will not round trip with of_float_ns.

  • since 2.0.0

Formatters

val pp : Stdlib.Format.formatter -> span -> unit

pp formats spans according to their magnitude using SI prefixes on seconds and accepted non-SI units. Years are counted in Julian years (365.25 SI-accepted days) as defined by the International Astronomical Union.

Rounds towards positive infinity, i.e. over approximates, no duration is formatted shorter than it is.

The output is UTF-8 encoded, it uses U+03BC for µs (10-6s).

val dump : Stdlib.Format.formatter -> t -> unit

dump ppf span formats an unspecified raw representation of span on ppf.

\ No newline at end of file +Span (mtime.Mtime.Span)

Module Mtime.Span

Monotonic time spans.

Monotonic time spans

type t = span
val zero : span

zero is a span of 0ns.

val one : span

one is a span of 1ns.

val min_span : span

min_span is zero.

val max_span : span

max_span is 264-1ns.

Predicates

val equal : span -> span -> bool

equal span span' is true iff span and span' are equal.

val compare : span -> span -> int

compare span span' orders spans by increasing duration.

val is_shorter : span -> than:span -> bool

is_shorter span ~than is true iff span lasts less than than.

val is_longer : span -> than:span -> bool

is_longer span ~than is true iff span lasts more than than.

Arithmetic

val add : span -> span -> span

add span span' is span + span'.

Warning. Rolls over on overflow.

val abs_diff : span -> span -> span

abs_diff span span' is the absolute difference between span and span'.

Durations

val (*) : int -> span -> span

n * dur is n times duration dur.

Warning. Does not check for overflow or that n is positive.

val ns : span

ns is a nanosecond duration, 1·10-9s.

  • since 1.4.0
val us : span

us is a microsecond duration, 1·10-6s.

  • since 1.4.0
val ms : span

ms is a millisecond duration, 1·10-3s.

  • since 1.4.0
val s : span

s is a second duration, 1s.

  • since 1.4.0
val min : span

min is a minute duration, 60s.

  • since 1.4.0
val hour : span

hour is an hour duration, 3600s.

  • since 1.4.0
val day : span

day is a day duration, 86'400s.

  • since 1.4.0
val year : span

year is a Julian year duration (365.25 days), 31'557'600s.

Converting

val to_uint64_ns : span -> int64

to_uint64_ns span is span as an unsigned 64-bit integer nanosecond span.

val of_uint64_ns : int64 -> span

of_uint64_ns u is the unsigned 64-bit integer nanosecond span u as a span.

val of_float_ns : float -> span option

of_float_ns f is the positive floating point nanosecond span f as a span. This is None if f is negative, non finite, or larger or equal than 253 (~104 days, the largest exact floating point integer).

  • since 2.0.0
val to_float_ns : span -> float

to_float_ns s is span as a nanosecond floating point span. Note that if s is larger than 253 (~104 days, the largest exact floating point integer) the result is an approximation and will not round trip with of_float_ns.

  • since 2.0.0

Formatters

val pp : Stdlib.Format.formatter -> span -> unit

pp formats spans according to their magnitude using SI prefixes on seconds and accepted non-SI units. Years are counted in Julian years (365.25 SI-accepted days) as defined by the International Astronomical Union.

Rounds towards positive infinity, i.e. over approximates, no duration is formatted shorter than it is.

The output is UTF-8 encoded, it uses U+03BC for µs (10-6s).

val dump : Stdlib.Format.formatter -> t -> unit

dump ppf span formats an unspecified raw representation of span on ppf.

diff --git a/mtime/Mtime/index.html b/mtime/Mtime/index.html index cbf98fd..48a13d2 100644 --- a/mtime/Mtime/index.html +++ b/mtime/Mtime/index.html @@ -1,2 +1,2 @@ -Mtime (mtime.Mtime)

Module Mtime

Monotonic time values.

Mtime has platform independent support for monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustments.

Time spans represent non-negative monotonic time spans between two monotonic clock readings. Timestamps represent system-relative monotonic timestamps, their absolute value is meaningless but they can be compared across the processes of an operating system run.

Mtime_clock provides access to a system monotonic clock.

Monotonic time spans

type span

The type for non-negative monotonic time spans. They represent the difference between two monotonic clock readings. If the platform's clock has nanosecond resolution the representation guarantees that the function Mtime_clock.elapsed can measure up to approximatively 584 Julian year spans before silently rolling over (unlikely since this is in a single program run).

module Span : sig ... end

Monotonic time spans.

Monotonic timestamps

Note. Only use timestamps if you need inter-process time correlation, otherwise prefer Mtime_clock.elapsed and counters.

type t

The type for monotonic timestamps relative to an indeterminate system-wide event (e.g. last startup). Their absolute value has no meaning but can be used for inter-process time correlation.

val to_uint64_ns : t -> int64

to_uint64_ns t is t as an unsigned 64-bit integer nanosecond timestamp. The absolute value is meaningless.

val of_uint64_ns : int64 -> t

to_uint64_ns t is t is an unsigned 64-bit integer nanosecond timestamp as a timestamp.

Warning. Timestamps returned by this function should only be used with other timestamp values that are know to come from the same operating system run.

val min_stamp : t

min_stamp is the earliest timestamp.

val max_stamp : t

max_stamp is the latest timestamp.

Predicates

val equal : t -> t -> bool

equal t t' is true iff t and t' are equal.

val compare : t -> t -> int

compare t t' orders timestamps by increasing time.

val is_earlier : t -> than:t -> bool

is_earlier t ~than is true iff t occurred before than.

val is_later : t -> than:t -> bool

is_later t ~than is true iff t occurred after than.

Arithmetic

val span : t -> t -> span

span t t' is the span between t and t' regardless of the order between t and t'.

val add_span : t -> span -> t option

add_span t s is the timestamp s units later than t or None if the result overflows.

val sub_span : t -> span -> t option

sub_span t s is the timestamp s units earlier than t or None if the result underflows.

Formatting

val pp : Stdlib.Format.formatter -> t -> unit

pp formats t as an unsigned 64-bit integer nanosecond timestamp. Note that the absolute value is meaningless.

val dump : Stdlib.Format.formatter -> t -> unit

dump ppf t formats an unspecified raw representation of t on ppf.

\ No newline at end of file +Mtime (mtime.Mtime)

Module Mtime

Monotonic time values.

Mtime has platform independent support for monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustments.

Time spans represent non-negative monotonic time spans between two monotonic clock readings. Timestamps represent system-relative monotonic timestamps, their absolute value is meaningless but they can be compared across the processes of an operating system run.

Mtime_clock provides access to a system monotonic clock.

Monotonic time spans

type span

The type for non-negative monotonic time spans. They represent the difference between two monotonic clock readings. If the platform's clock has nanosecond resolution the representation guarantees that the function Mtime_clock.elapsed can measure up to approximatively 584 Julian year spans before silently rolling over (unlikely since this is in a single program run).

module Span : sig ... end

Monotonic time spans.

Monotonic timestamps

Note. Only use timestamps if you need inter-process time correlation, otherwise prefer Mtime_clock.elapsed and counters.

type t

The type for monotonic timestamps relative to an indeterminate system-wide event (e.g. last startup). Their absolute value has no meaning but can be used for inter-process time correlation.

val to_uint64_ns : t -> int64

to_uint64_ns t is t as an unsigned 64-bit integer nanosecond timestamp. The absolute value is meaningless.

val of_uint64_ns : int64 -> t

to_uint64_ns t is t is an unsigned 64-bit integer nanosecond timestamp as a timestamp.

Warning. Timestamps returned by this function should only be used with other timestamp values that are know to come from the same operating system run.

val min_stamp : t

min_stamp is the earliest timestamp.

val max_stamp : t

max_stamp is the latest timestamp.

Predicates

val equal : t -> t -> bool

equal t t' is true iff t and t' are equal.

val compare : t -> t -> int

compare t t' orders timestamps by increasing time.

val is_earlier : t -> than:t -> bool

is_earlier t ~than is true iff t occurred before than.

val is_later : t -> than:t -> bool

is_later t ~than is true iff t occurred after than.

Arithmetic

val span : t -> t -> span

span t t' is the span between t and t' regardless of the order between t and t'.

val add_span : t -> span -> t option

add_span t s is the timestamp s units later than t or None if the result overflows.

val sub_span : t -> span -> t option

sub_span t s is the timestamp s units earlier than t or None if the result underflows.

Formatting

val pp : Stdlib.Format.formatter -> t -> unit

pp formats t as an unsigned 64-bit integer nanosecond timestamp. Note that the absolute value is meaningless.

val dump : Stdlib.Format.formatter -> t -> unit

dump ppf t formats an unspecified raw representation of t on ppf.

diff --git a/mtime/Mtime_clock/index.html b/mtime/Mtime_clock/index.html index d210f84..a304345 100644 --- a/mtime/Mtime_clock/index.html +++ b/mtime/Mtime_clock/index.html @@ -1,2 +1,2 @@ -Mtime_clock (mtime.Mtime_clock)

Module Mtime_clock

Monotonic time clock.

Mtime_clock provides access to a system monotonic clock. This time increases monotonically and is not subject to operating system calendar time adjustments.

Only use Mtime_clock.now if you need inter-process time correlation, otherwise prefer Mtime_clock.elapsed and counters.

Consult important information about error handling and platform support.

Monotonic clock

val elapsed : unit -> Mtime.span

elapsed () is the monotonic time span elapsed since the beginning of the program.

Raises Sys_error, see error handling

val now : unit -> Mtime.t

now () is the current system-relative monotonic timestamp. Its absolute value is meaningless.

Raises Sys_error, see error handling

val period : unit -> Mtime.span option

period () is the clock's period as a monotonic time span (if available).

Time counters

type counter

The type for monotonic wall-clock time counters.

val counter : unit -> counter

counter () is a counter counting from now on.

Raises Sys_error, see error handling

val count : counter -> Mtime.span

count c is the monotonic time span elapsed since c was created.

Monotonic clock raw interface

val elapsed_ns : unit -> int64

elapsed_ns () is the unsigned 64-bit integer nanosecond monotonic time span elapsed since the beginning of the program.

Raises Sys_error, see error handling

val now_ns : unit -> int64

now_ns () is an unsigned 64-bit integer nanosecond system-relative monotonic timestamp. The absolute value is meaningless.

Raises Sys_error, see error handling

val period_ns : unit -> int64 option

period_ns () is the clock's period as an unsigned 64-bit integer nanosecond monotonic time span (if available).

Error handling

The functions elapsed, now, counter, elapsed_ns and now_ns raise Sys_error whenever they can't determine the current time or that it doesn't fit in Mtime's range. Usually this exception should only be catched at the toplevel of your program to log it and abort the program. It indicates a serious error condition in the system.

All the other functions, whose functionality is less essential, simply silently return None if they can't determine the information either because it is unavailable or because an error occured.

Platform support

\ No newline at end of file +Mtime_clock (mtime.Mtime_clock)

Module Mtime_clock

Monotonic time clock.

Mtime_clock provides access to a system monotonic clock. This time increases monotonically and is not subject to operating system calendar time adjustments.

Only use Mtime_clock.now if you need inter-process time correlation, otherwise prefer Mtime_clock.elapsed and counters.

Consult important information about error handling and platform support.

Monotonic clock

val elapsed : unit -> Mtime.span

elapsed () is the monotonic time span elapsed since the beginning of the program.

Raises Sys_error, see error handling

val now : unit -> Mtime.t

now () is the current system-relative monotonic timestamp. Its absolute value is meaningless.

Raises Sys_error, see error handling

val period : unit -> Mtime.span option

period () is the clock's period as a monotonic time span (if available).

Time counters

type counter

The type for monotonic wall-clock time counters.

val counter : unit -> counter

counter () is a counter counting from now on.

Raises Sys_error, see error handling

val count : counter -> Mtime.span

count c is the monotonic time span elapsed since c was created.

Monotonic clock raw interface

val elapsed_ns : unit -> int64

elapsed_ns () is the unsigned 64-bit integer nanosecond monotonic time span elapsed since the beginning of the program.

Raises Sys_error, see error handling

val now_ns : unit -> int64

now_ns () is an unsigned 64-bit integer nanosecond system-relative monotonic timestamp. The absolute value is meaningless.

Raises Sys_error, see error handling

val period_ns : unit -> int64 option

period_ns () is the clock's period as an unsigned 64-bit integer nanosecond monotonic time span (if available).

Error handling

The functions elapsed, now, counter, elapsed_ns and now_ns raise Sys_error whenever they can't determine the current time or that it doesn't fit in Mtime's range. Usually this exception should only be catched at the toplevel of your program to log it and abort the program. It indicates a serious error condition in the system.

All the other functions, whose functionality is less essential, simply silently return None if they can't determine the information either because it is unavailable or because an error occured.

Platform support

diff --git a/mtime/Mtime_top/index.html b/mtime/Mtime_top/index.html new file mode 100644 index 0000000..62bc845 --- /dev/null +++ b/mtime/Mtime_top/index.html @@ -0,0 +1,2 @@ + +Mtime_top (mtime.Mtime_top)

Module Mtime_top

This module is hidden.

diff --git a/mtime/index.html b/mtime/index.html index 509da37..de03692 100644 --- a/mtime/index.html +++ b/mtime/index.html @@ -1,2 +1,2 @@ -index (mtime.index)

Package mtime

Mtime has platform independent support for monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustments. The library has types to represent nanosecond precision timestamps and time spans.

Mtime_clock provides acces to a monotonic system clock and its resolution (if available).

Library mtime

  • Mtime Monotonic time values.

Library mtime.clock.os

This library also works with JavaScript, see the platform support.

Package info

changes-files
license-files
readme-files
\ No newline at end of file +index (mtime.index)

Package mtime

Mtime has platform independent support for monotonic wall-clock time. This time increases monotonically and is not subject to operating system calendar time adjustments. The library has types to represent nanosecond precision timestamps and time spans.

Mtime_clock provides acces to a monotonic system clock and its resolution (if available).

Library mtime

  • Mtime Monotonic time values.

Library mtime.clock.os

This library also works with JavaScript, see the platform support.

Package info

changes-files
license-files
readme-files
diff --git a/ocaml-compiler-libs/Ocaml_bytecomp/index.html b/ocaml-compiler-libs/Ocaml_bytecomp/index.html index 2fcdc26..4b32601 100644 --- a/ocaml-compiler-libs/Ocaml_bytecomp/index.html +++ b/ocaml-compiler-libs/Ocaml_bytecomp/index.html @@ -1,2 +1,2 @@ -Ocaml_bytecomp (ocaml-compiler-libs.Ocaml_bytecomp)

Module Ocaml_bytecomp

module Bytegen = Bytegen
module Bytelibrarian = Bytelibrarian
module Bytepackager = Bytepackager
module Compile = Compile
module Emitcode = Emitcode
module Errors = Errors
module Instruct = Instruct
module Maindriver = Maindriver
module Printinstr = Printinstr
\ No newline at end of file +Ocaml_bytecomp (ocaml-compiler-libs.Ocaml_bytecomp)

Module Ocaml_bytecomp

module Bytegen = Bytegen
module Bytelibrarian = Bytelibrarian
module Bytepackager = Bytepackager
module Compile = Compile
module Emitcode = Emitcode
module Errors = Errors
module Instruct = Instruct
module Maindriver = Maindriver
module Printinstr = Printinstr
diff --git a/ocaml-compiler-libs/Ocaml_common/index.html b/ocaml-compiler-libs/Ocaml_common/index.html index de793eb..e4f80f2 100644 --- a/ocaml-compiler-libs/Ocaml_common/index.html +++ b/ocaml-compiler-libs/Ocaml_common/index.html @@ -1,2 +1,2 @@ -Ocaml_common (ocaml-compiler-libs.Ocaml_common)

Module Ocaml_common

module Arg_helper = Arg_helper
module Ast_helper = Ast_helper
module Ast_invariants = Ast_invariants
module Ast_iterator = Ast_iterator
module Ast_mapper = Ast_mapper
module Attr_helper = Attr_helper
module Binutils = Binutils
module Btype = Btype
module Build_path_prefix_map = Build_path_prefix_map
module Builtin_attributes = Builtin_attributes
module Bytesections = Bytesections
module CamlinternalMenhirLib = CamlinternalMenhirLib
module Ccomp = Ccomp
module Clflags = Clflags
module Cmi_format = Cmi_format
module Cmt2annot = Cmt2annot
module Cmt_format = Cmt_format
module Compenv = Compenv
module Compile_common = Compile_common
module Compmisc = Compmisc
module Compression = Compression
module Config = Config
module Consistbl = Consistbl
module Ctype = Ctype
module Datarepr = Datarepr
module Debuginfo = Debuginfo
module Depend = Depend
module Diffing = Diffing
module Diffing_with_keys = Diffing_with_keys
module Dll = Dll
module Docstrings = Docstrings
module Domainstate = Domainstate
module Env = Env
module Envaux = Envaux
module Errortrace = Errortrace
module Ident = Ident
module Identifiable = Identifiable
module Includeclass = Includeclass
module Includecore = Includecore
module Includemod = Includemod
module Includemod_errorprinter = Includemod_errorprinter
module Int_replace_polymorphic_compare = Int_replace_polymorphic_compare
module Lambda = Lambda
module Lazy_backtrack = Lazy_backtrack
module Lexer = Lexer
module Load_path = Load_path
module Local_store = Local_store
module Location = Location
module Longident = Longident
module Main_args = Main_args
module Makedepend = Makedepend
module Matching = Matching
module Meta = Meta
module Misc = Misc
module Mtype = Mtype
module Numbers = Numbers
module Opcodes = Opcodes
module Oprint = Oprint
module Parmatch = Parmatch
module Parse = Parse
module Parser = Parser
module Path = Path
module Patterns = Patterns
module Persistent_env = Persistent_env
module Pparse = Pparse
module Pprintast = Pprintast
module Predef = Predef
module Primitive = Primitive
module Printast = Printast
module Printlambda = Printlambda
module Printpat = Printpat
module Printtyp = Printtyp
module Printtyped = Printtyped
module Profile = Profile
module Rec_check = Rec_check
module Runtimedef = Runtimedef
module Shape = Shape
module Signature_group = Signature_group
module Simplif = Simplif
module Strongly_connected_components = Strongly_connected_components
module Stypes = Stypes
module Subst = Subst
module Switch = Switch
module Symtable = Symtable
module Syntaxerr = Syntaxerr
module Targetint = Targetint
module Tast_iterator = Tast_iterator
module Tast_mapper = Tast_mapper
module Terminfo = Terminfo
module Tmc = Tmc
module Translattribute = Translattribute
module Translclass = Translclass
module Translcore = Translcore
module Translmod = Translmod
module Translobj = Translobj
module Translprim = Translprim
module Type_immediacy = Type_immediacy
module Typeclass = Typeclass
module Typecore = Typecore
module Typedecl = Typedecl
module Typedecl_immediacy = Typedecl_immediacy
module Typedecl_properties = Typedecl_properties
module Typedecl_separability = Typedecl_separability
module Typedecl_unboxed = Typedecl_unboxed
module Typedecl_variance = Typedecl_variance
module Typedtree = Typedtree
module Typemod = Typemod
module Typeopt = Typeopt
module Types = Types
module Typetexp = Typetexp
module Untypeast = Untypeast
module Warnings = Warnings
\ No newline at end of file +Ocaml_common (ocaml-compiler-libs.Ocaml_common)

Module Ocaml_common

module Arg_helper = Arg_helper
module Ast_helper = Ast_helper
module Ast_invariants = Ast_invariants
module Ast_iterator = Ast_iterator
module Ast_mapper = Ast_mapper
module Attr_helper = Attr_helper
module Binutils = Binutils
module Btype = Btype
module Build_path_prefix_map = Build_path_prefix_map
module Builtin_attributes = Builtin_attributes
module Bytesections = Bytesections
module CamlinternalMenhirLib = CamlinternalMenhirLib
module Ccomp = Ccomp
module Clflags = Clflags
module Cmi_format = Cmi_format
module Cmt2annot = Cmt2annot
module Cmt_format = Cmt_format
module Compenv = Compenv
module Compile_common = Compile_common
module Compmisc = Compmisc
module Compression = Compression
module Config = Config
module Consistbl = Consistbl
module Ctype = Ctype
module Datarepr = Datarepr
module Debuginfo = Debuginfo
module Depend = Depend
module Diffing = Diffing
module Diffing_with_keys = Diffing_with_keys
module Dll = Dll
module Docstrings = Docstrings
module Domainstate = Domainstate
module Env = Env
module Envaux = Envaux
module Errortrace = Errortrace
module Ident = Ident
module Identifiable = Identifiable
module Includeclass = Includeclass
module Includecore = Includecore
module Includemod = Includemod
module Includemod_errorprinter = Includemod_errorprinter
module Int_replace_polymorphic_compare = Int_replace_polymorphic_compare
module Lambda = Lambda
module Lazy_backtrack = Lazy_backtrack
module Lexer = Lexer
module Load_path = Load_path
module Local_store = Local_store
module Location = Location
module Longident = Longident
module Main_args = Main_args
module Makedepend = Makedepend
module Matching = Matching
module Meta = Meta
module Misc = Misc
module Mtype = Mtype
module Numbers = Numbers
module Opcodes = Opcodes
module Oprint = Oprint
module Parmatch = Parmatch
module Parse = Parse
module Parser = Parser
module Path = Path
module Patterns = Patterns
module Persistent_env = Persistent_env
module Pparse = Pparse
module Pprintast = Pprintast
module Predef = Predef
module Primitive = Primitive
module Printast = Printast
module Printlambda = Printlambda
module Printpat = Printpat
module Printtyp = Printtyp
module Printtyped = Printtyped
module Profile = Profile
module Rec_check = Rec_check
module Runtimedef = Runtimedef
module Shape = Shape
module Signature_group = Signature_group
module Simplif = Simplif
module Strongly_connected_components = Strongly_connected_components
module Stypes = Stypes
module Subst = Subst
module Switch = Switch
module Symtable = Symtable
module Syntaxerr = Syntaxerr
module Targetint = Targetint
module Tast_iterator = Tast_iterator
module Tast_mapper = Tast_mapper
module Terminfo = Terminfo
module Tmc = Tmc
module Translattribute = Translattribute
module Translclass = Translclass
module Translcore = Translcore
module Translmod = Translmod
module Translobj = Translobj
module Translprim = Translprim
module Type_immediacy = Type_immediacy
module Typeclass = Typeclass
module Typecore = Typecore
module Typedecl = Typedecl
module Typedecl_immediacy = Typedecl_immediacy
module Typedecl_properties = Typedecl_properties
module Typedecl_separability = Typedecl_separability
module Typedecl_unboxed = Typedecl_unboxed
module Typedecl_variance = Typedecl_variance
module Typedtree = Typedtree
module Typemod = Typemod
module Typeopt = Typeopt
module Types = Types
module Typetexp = Typetexp
module Untypeast = Untypeast
module Warnings = Warnings
diff --git a/ocaml-compiler-libs/Ocaml_optcomp/index.html b/ocaml-compiler-libs/Ocaml_optcomp/index.html index 779ebc5..03623b5 100644 --- a/ocaml-compiler-libs/Ocaml_optcomp/index.html +++ b/ocaml-compiler-libs/Ocaml_optcomp/index.html @@ -1,2 +1,2 @@ -Ocaml_optcomp (ocaml-compiler-libs.Ocaml_optcomp)

Module Ocaml_optcomp

module Afl_instrument = Afl_instrument
module Alias_analysis = Alias_analysis
module Allocated_const = Allocated_const
module Arch = Arch
module Asmgen = Asmgen
module Asmlibrarian = Asmlibrarian
module Asmpackager = Asmpackager
module Augment_specialised_args = Augment_specialised_args
module Backend_var = Backend_var
module Branch_relaxation = Branch_relaxation
module Build_export_info = Build_export_info
module CSE = CSE
module CSEgen = CSEgen
module Clambda = Clambda
module Clambda_primitives = Clambda_primitives
module Closure = Closure
module Closure_conversion = Closure_conversion
module Closure_conversion_aux = Closure_conversion_aux
module Closure_element = Closure_element
module Closure_id = Closure_id
module Closure_middle_end = Closure_middle_end
module Closure_offsets = Closure_offsets
module Closure_origin = Closure_origin
module Cmm = Cmm
module Cmm_helpers = Cmm_helpers
module Cmm_invariants = Cmm_invariants
module Cmmgen = Cmmgen
module Cmmgen_state = Cmmgen_state
module Coloring = Coloring
module Comballoc = Comballoc
module Compilation_unit = Compilation_unit
module Compilenv = Compilenv
module Convert_primitives = Convert_primitives
module Dataflow = Dataflow
module Deadcode = Deadcode
module Effect_analysis = Effect_analysis
module Emit = Emit
module Emitaux = Emitaux
module Export_id = Export_id
module Export_info = Export_info
module Export_info_for_pack = Export_info_for_pack
module Extract_projections = Extract_projections
module Find_recursive_functions = Find_recursive_functions
module Flambda = Flambda
module Flambda_invariants = Flambda_invariants
module Flambda_iterators = Flambda_iterators
module Flambda_middle_end = Flambda_middle_end
module Flambda_to_clambda = Flambda_to_clambda
module Flambda_utils = Flambda_utils
module Freshening = Freshening
module Id_types = Id_types
module Import_approx = Import_approx
module Inconstant_idents = Inconstant_idents
module Initialize_symbol_to_let_symbol = Initialize_symbol_to_let_symbol
module Inline_and_simplify = Inline_and_simplify
module Inline_and_simplify_aux = Inline_and_simplify_aux
module Inlining_cost = Inlining_cost
module Inlining_decision = Inlining_decision
module Inlining_stats = Inlining_stats
module Inlining_stats_types = Inlining_stats_types
module Inlining_transforms = Inlining_transforms
module Interf = Interf
module Internal_variable_names = Internal_variable_names
module Interval = Interval
module Invariant_params = Invariant_params
module Lift_code = Lift_code
module Lift_constants = Lift_constants
module Lift_let_to_initialize_symbol = Lift_let_to_initialize_symbol
module Linear = Linear
module Linear_format = Linear_format
module Linearize = Linearize
module Linkage_name = Linkage_name
module Linscan = Linscan
module Liveness = Liveness
module Mach = Mach
module Mutable_variable = Mutable_variable
module Optcompile = Optcompile
module Opterrors = Opterrors
module Optmaindriver = Optmaindriver
module Parameter = Parameter
module Pass_wrapper = Pass_wrapper
module Polling = Polling
module Printclambda = Printclambda
module Printclambda_primitives = Printclambda_primitives
module Printcmm = Printcmm
module Printlinear = Printlinear
module Printmach = Printmach
module Proc = Proc
module Projection = Projection
module Ref_to_variables = Ref_to_variables
module Reg = Reg
module Reload = Reload
module Reloadgen = Reloadgen
module Remove_free_vars_equal_to_args = Remove_free_vars_equal_to_args
module Remove_unused_arguments = Remove_unused_arguments
module Remove_unused_closure_vars = Remove_unused_closure_vars
module Remove_unused_program_constructs = Remove_unused_program_constructs
module Schedgen = Schedgen
module Scheduling = Scheduling
module Selectgen = Selectgen
module Selection = Selection
module Semantics_of_primitives = Semantics_of_primitives
module Set_of_closures_id = Set_of_closures_id
module Set_of_closures_origin = Set_of_closures_origin
module Share_constants = Share_constants
module Simple_value_approx = Simple_value_approx
module Simplify_boxed_integer_ops = Simplify_boxed_integer_ops
module Simplify_common = Simplify_common
module Simplify_primitives = Simplify_primitives
module Spill = Spill
module Split = Split
module Static_exception = Static_exception
module Strmatch = Strmatch
module Symbol = Symbol
module Tag = Tag
module Traverse_for_exported_symbols = Traverse_for_exported_symbols
module Un_anf = Un_anf
module Unbox_closures = Unbox_closures
module Unbox_free_vars_of_closures = Unbox_free_vars_of_closures
module Unbox_specialised_args = Unbox_specialised_args
module Var_within_closure = Var_within_closure
module Variable = Variable
module X86_dsl = X86_dsl
module X86_gas = X86_gas
module X86_masm = X86_masm
module X86_proc = X86_proc
\ No newline at end of file +Ocaml_optcomp (ocaml-compiler-libs.Ocaml_optcomp)

Module Ocaml_optcomp

module Afl_instrument = Afl_instrument
module Alias_analysis = Alias_analysis
module Allocated_const = Allocated_const
module Arch = Arch
module Asmgen = Asmgen
module Asmlibrarian = Asmlibrarian
module Asmpackager = Asmpackager
module Augment_specialised_args = Augment_specialised_args
module Backend_var = Backend_var
module Branch_relaxation = Branch_relaxation
module Build_export_info = Build_export_info
module CSE = CSE
module CSEgen = CSEgen
module Clambda = Clambda
module Clambda_primitives = Clambda_primitives
module Closure = Closure
module Closure_conversion = Closure_conversion
module Closure_conversion_aux = Closure_conversion_aux
module Closure_element = Closure_element
module Closure_id = Closure_id
module Closure_middle_end = Closure_middle_end
module Closure_offsets = Closure_offsets
module Closure_origin = Closure_origin
module Cmm = Cmm
module Cmm_helpers = Cmm_helpers
module Cmm_invariants = Cmm_invariants
module Cmmgen = Cmmgen
module Cmmgen_state = Cmmgen_state
module Coloring = Coloring
module Comballoc = Comballoc
module Compilation_unit = Compilation_unit
module Compilenv = Compilenv
module Convert_primitives = Convert_primitives
module Dataflow = Dataflow
module Deadcode = Deadcode
module Effect_analysis = Effect_analysis
module Emit = Emit
module Emitaux = Emitaux
module Export_id = Export_id
module Export_info = Export_info
module Export_info_for_pack = Export_info_for_pack
module Extract_projections = Extract_projections
module Find_recursive_functions = Find_recursive_functions
module Flambda = Flambda
module Flambda_invariants = Flambda_invariants
module Flambda_iterators = Flambda_iterators
module Flambda_middle_end = Flambda_middle_end
module Flambda_to_clambda = Flambda_to_clambda
module Flambda_utils = Flambda_utils
module Freshening = Freshening
module Id_types = Id_types
module Import_approx = Import_approx
module Inconstant_idents = Inconstant_idents
module Initialize_symbol_to_let_symbol = Initialize_symbol_to_let_symbol
module Inline_and_simplify = Inline_and_simplify
module Inline_and_simplify_aux = Inline_and_simplify_aux
module Inlining_cost = Inlining_cost
module Inlining_decision = Inlining_decision
module Inlining_stats = Inlining_stats
module Inlining_stats_types = Inlining_stats_types
module Inlining_transforms = Inlining_transforms
module Interf = Interf
module Internal_variable_names = Internal_variable_names
module Interval = Interval
module Invariant_params = Invariant_params
module Lift_code = Lift_code
module Lift_constants = Lift_constants
module Lift_let_to_initialize_symbol = Lift_let_to_initialize_symbol
module Linear = Linear
module Linear_format = Linear_format
module Linearize = Linearize
module Linkage_name = Linkage_name
module Linscan = Linscan
module Liveness = Liveness
module Mach = Mach
module Mutable_variable = Mutable_variable
module Optcompile = Optcompile
module Opterrors = Opterrors
module Optmaindriver = Optmaindriver
module Parameter = Parameter
module Pass_wrapper = Pass_wrapper
module Polling = Polling
module Printclambda = Printclambda
module Printclambda_primitives = Printclambda_primitives
module Printcmm = Printcmm
module Printlinear = Printlinear
module Printmach = Printmach
module Proc = Proc
module Projection = Projection
module Ref_to_variables = Ref_to_variables
module Reg = Reg
module Reload = Reload
module Reloadgen = Reloadgen
module Remove_free_vars_equal_to_args = Remove_free_vars_equal_to_args
module Remove_unused_arguments = Remove_unused_arguments
module Remove_unused_closure_vars = Remove_unused_closure_vars
module Remove_unused_program_constructs = Remove_unused_program_constructs
module Schedgen = Schedgen
module Scheduling = Scheduling
module Selectgen = Selectgen
module Selection = Selection
module Semantics_of_primitives = Semantics_of_primitives
module Set_of_closures_id = Set_of_closures_id
module Set_of_closures_origin = Set_of_closures_origin
module Share_constants = Share_constants
module Simple_value_approx = Simple_value_approx
module Simplify_boxed_integer_ops = Simplify_boxed_integer_ops
module Simplify_common = Simplify_common
module Simplify_primitives = Simplify_primitives
module Spill = Spill
module Split = Split
module Static_exception = Static_exception
module Strmatch = Strmatch
module Symbol = Symbol
module Tag = Tag
module Traverse_for_exported_symbols = Traverse_for_exported_symbols
module Un_anf = Un_anf
module Unbox_closures = Unbox_closures
module Unbox_free_vars_of_closures = Unbox_free_vars_of_closures
module Unbox_specialised_args = Unbox_specialised_args
module Var_within_closure = Var_within_closure
module Variable = Variable
module X86_dsl = X86_dsl
module X86_gas = X86_gas
module X86_masm = X86_masm
module X86_proc = X86_proc
diff --git a/ocaml-compiler-libs/Ocaml_shadow/Do_not_use_directly/index.html b/ocaml-compiler-libs/Ocaml_shadow/Do_not_use_directly/index.html index 0895e87..0557cb3 100644 --- a/ocaml-compiler-libs/Ocaml_shadow/Do_not_use_directly/index.html +++ b/ocaml-compiler-libs/Ocaml_shadow/Do_not_use_directly/index.html @@ -1,2 +1,2 @@ -Do_not_use_directly (ocaml-compiler-libs.Ocaml_shadow.Do_not_use_directly)

Module Ocaml_shadow.Do_not_use_directly

\ No newline at end of file +Do_not_use_directly (ocaml-compiler-libs.Ocaml_shadow.Do_not_use_directly)

Module Ocaml_shadow.Do_not_use_directly

diff --git a/ocaml-compiler-libs/Ocaml_shadow/index.html b/ocaml-compiler-libs/Ocaml_shadow/index.html index 414b80c..58e4112 100644 --- a/ocaml-compiler-libs/Ocaml_shadow/index.html +++ b/ocaml-compiler-libs/Ocaml_shadow/index.html @@ -1,2 +1,2 @@ -Ocaml_shadow (ocaml-compiler-libs.Ocaml_shadow)

Module Ocaml_shadow

module Do_not_use_directly : sig ... end
module Afl_instrument = Do_not_use_directly
module Alias_analysis = Do_not_use_directly
module Allocated_const = Do_not_use_directly
module Annot = Do_not_use_directly
module Arch = Do_not_use_directly
module Arg_helper = Do_not_use_directly
module Asmgen = Do_not_use_directly
module Asmlibrarian = Do_not_use_directly
module Asmpackager = Do_not_use_directly
module Ast_helper = Do_not_use_directly
module Ast_invariants = Do_not_use_directly
module Ast_iterator = Do_not_use_directly
module Ast_mapper = Do_not_use_directly
module Asttypes = Do_not_use_directly
module Attr_helper = Do_not_use_directly
module Augment_specialised_args = Do_not_use_directly
module Backend_intf = Do_not_use_directly
module Backend_var = Do_not_use_directly
module Binutils = Do_not_use_directly
module Branch_relaxation = Do_not_use_directly
module Branch_relaxation_intf = Do_not_use_directly
module Btype = Do_not_use_directly
module Build_export_info = Do_not_use_directly
module Build_path_prefix_map = Do_not_use_directly
module Builtin_attributes = Do_not_use_directly
module Bytegen = Do_not_use_directly
module Bytelibrarian = Do_not_use_directly
module Bytepackager = Do_not_use_directly
module Bytesections = Do_not_use_directly
module CSE = Do_not_use_directly
module CSEgen = Do_not_use_directly
module CamlinternalMenhirLib = Do_not_use_directly
module Ccomp = Do_not_use_directly
module Clambda = Do_not_use_directly
module Clambda_primitives = Do_not_use_directly
module Clflags = Do_not_use_directly
module Closure = Do_not_use_directly
module Closure_conversion = Do_not_use_directly
module Closure_conversion_aux = Do_not_use_directly
module Closure_element = Do_not_use_directly
module Closure_id = Do_not_use_directly
module Closure_middle_end = Do_not_use_directly
module Closure_offsets = Do_not_use_directly
module Closure_origin = Do_not_use_directly
module Cmi_format = Do_not_use_directly
module Cmm = Do_not_use_directly
module Cmm_helpers = Do_not_use_directly
module Cmm_invariants = Do_not_use_directly
module Cmmgen = Do_not_use_directly
module Cmmgen_state = Do_not_use_directly
module Cmo_format = Do_not_use_directly
module Cmt2annot = Do_not_use_directly
module Cmt_format = Do_not_use_directly
module Cmx_format = Do_not_use_directly
module Cmxs_format = Do_not_use_directly
module Coloring = Do_not_use_directly
module Comballoc = Do_not_use_directly
module Compenv = Do_not_use_directly
module Compilation_unit = Do_not_use_directly
module Compile = Do_not_use_directly
module Compile_common = Do_not_use_directly
module Compilenv = Do_not_use_directly
module Compmisc = Do_not_use_directly
module Compression = Do_not_use_directly
module Config = Do_not_use_directly
module Config_boot = Do_not_use_directly
module Config_main = Do_not_use_directly
module Consistbl = Do_not_use_directly
module Convert_primitives = Do_not_use_directly
module Ctype = Do_not_use_directly
module Dataflow = Do_not_use_directly
module Datarepr = Do_not_use_directly
module Deadcode = Do_not_use_directly
module Debuginfo = Do_not_use_directly
module Depend = Do_not_use_directly
module Diffing = Do_not_use_directly
module Diffing_with_keys = Do_not_use_directly
module Dll = Do_not_use_directly
module Docstrings = Do_not_use_directly
module Domainstate = Do_not_use_directly
module Effect_analysis = Do_not_use_directly
module Emit = Do_not_use_directly
module Emitaux = Do_not_use_directly
module Emitcode = Do_not_use_directly
module Emitenv = Do_not_use_directly
module Env = Do_not_use_directly
module Envaux = Do_not_use_directly
module Errors = Do_not_use_directly
module Errortrace = Do_not_use_directly
module Export_id = Do_not_use_directly
module Export_info = Do_not_use_directly
module Export_info_for_pack = Do_not_use_directly
module Expunge = Do_not_use_directly
module Extract_projections = Do_not_use_directly
module Find_recursive_functions = Do_not_use_directly
module Flambda = Do_not_use_directly
module Flambda_invariants = Do_not_use_directly
module Flambda_iterators = Do_not_use_directly
module Flambda_middle_end = Do_not_use_directly
module Flambda_to_clambda = Do_not_use_directly
module Flambda_utils = Do_not_use_directly
module Freshening = Do_not_use_directly
module Genprintval = Do_not_use_directly
module Id_types = Do_not_use_directly
module Ident = Do_not_use_directly
module Identifiable = Do_not_use_directly
module Import_approx = Do_not_use_directly
module Includeclass = Do_not_use_directly
module Includecore = Do_not_use_directly
module Includemod = Do_not_use_directly
module Includemod_errorprinter = Do_not_use_directly
module Inconstant_idents = Do_not_use_directly
module Initialize_symbol_to_let_symbol = Do_not_use_directly
module Inline_and_simplify = Do_not_use_directly
module Inline_and_simplify_aux = Do_not_use_directly
module Inlining_cost = Do_not_use_directly
module Inlining_decision = Do_not_use_directly
module Inlining_decision_intf = Do_not_use_directly
module Inlining_stats = Do_not_use_directly
module Inlining_stats_types = Do_not_use_directly
module Inlining_transforms = Do_not_use_directly
module Instruct = Do_not_use_directly
module Int_replace_polymorphic_compare = Do_not_use_directly
module Interf = Do_not_use_directly
module Internal_variable_names = Do_not_use_directly
module Interval = Do_not_use_directly
module Invariant_params = Do_not_use_directly
module Lambda = Do_not_use_directly
module Lazy_backtrack = Do_not_use_directly
module Lexer = Do_not_use_directly
module Lift_code = Do_not_use_directly
module Lift_constants = Do_not_use_directly
module Lift_let_to_initialize_symbol = Do_not_use_directly
module Linear = Do_not_use_directly
module Linear_format = Do_not_use_directly
module Linearize = Do_not_use_directly
module Linkage_name = Do_not_use_directly
module Linscan = Do_not_use_directly
module Liveness = Do_not_use_directly
module Load_path = Do_not_use_directly
module Local_store = Do_not_use_directly
module Location = Do_not_use_directly
module Longident = Do_not_use_directly
module Mach = Do_not_use_directly
module Main = Do_not_use_directly
module Main_args = Do_not_use_directly
module Maindriver = Do_not_use_directly
module Makedepend = Do_not_use_directly
module Matching = Do_not_use_directly
module Meta = Do_not_use_directly
module Misc = Do_not_use_directly
module Mtype = Do_not_use_directly
module Mutable_variable = Do_not_use_directly
module Numbers = Do_not_use_directly
module Opcodes = Do_not_use_directly
module Oprint = Do_not_use_directly
module Optcompile = Do_not_use_directly
module Opterrors = Do_not_use_directly
module Optmain = Do_not_use_directly
module Optmaindriver = Do_not_use_directly
module Outcometree = Do_not_use_directly
module Parameter = Do_not_use_directly
module Parmatch = Do_not_use_directly
module Parse = Do_not_use_directly
module Parser = Do_not_use_directly
module Parsetree = Do_not_use_directly
module Pass_wrapper = Do_not_use_directly
module Path = Do_not_use_directly
module Patterns = Do_not_use_directly
module Persistent_env = Do_not_use_directly
module Polling = Do_not_use_directly
module Pparse = Do_not_use_directly
module Pprintast = Do_not_use_directly
module Predef = Do_not_use_directly
module Primitive = Do_not_use_directly
module Printast = Do_not_use_directly
module Printclambda = Do_not_use_directly
module Printclambda_primitives = Do_not_use_directly
module Printcmm = Do_not_use_directly
module Printinstr = Do_not_use_directly
module Printlambda = Do_not_use_directly
module Printlinear = Do_not_use_directly
module Printmach = Do_not_use_directly
module Printpat = Do_not_use_directly
module Printtyp = Do_not_use_directly
module Printtyped = Do_not_use_directly
module Proc = Do_not_use_directly
module Profile = Do_not_use_directly
module Projection = Do_not_use_directly
module Rec_check = Do_not_use_directly
module Ref_to_variables = Do_not_use_directly
module Reg = Do_not_use_directly
module Reload = Do_not_use_directly
module Reloadgen = Do_not_use_directly
module Remove_free_vars_equal_to_args = Do_not_use_directly
module Remove_unused_arguments = Do_not_use_directly
module Remove_unused_closure_vars = Do_not_use_directly
module Remove_unused_program_constructs = Do_not_use_directly
module Runtimedef = Do_not_use_directly
module Schedgen = Do_not_use_directly
module Scheduling = Do_not_use_directly
module Selectgen = Do_not_use_directly
module Selection = Do_not_use_directly
module Semantics_of_primitives = Do_not_use_directly
module Set_of_closures_id = Do_not_use_directly
module Set_of_closures_origin = Do_not_use_directly
module Shape = Do_not_use_directly
module Share_constants = Do_not_use_directly
module Signature_group = Do_not_use_directly
module Simple_value_approx = Do_not_use_directly
module Simplif = Do_not_use_directly
module Simplify_boxed_integer_ops = Do_not_use_directly
module Simplify_boxed_integer_ops_intf = Do_not_use_directly
module Simplify_common = Do_not_use_directly
module Simplify_primitives = Do_not_use_directly
module Spill = Do_not_use_directly
module Split = Do_not_use_directly
module Static_exception = Do_not_use_directly
module Strmatch = Do_not_use_directly
module Strongly_connected_components = Do_not_use_directly
module Stypes = Do_not_use_directly
module Subst = Do_not_use_directly
module Switch = Do_not_use_directly
module Symbol = Do_not_use_directly
module Symtable = Do_not_use_directly
module Syntaxerr = Do_not_use_directly
module Tag = Do_not_use_directly
module Targetint = Do_not_use_directly
module Tast_iterator = Do_not_use_directly
module Tast_mapper = Do_not_use_directly
module Terminfo = Do_not_use_directly
module Tmc = Do_not_use_directly
module Topcommon = Do_not_use_directly
module Topdirs = Do_not_use_directly
module Topeval = Do_not_use_directly
module Tophooks = Do_not_use_directly
module Toploop = Do_not_use_directly
module Topmain = Do_not_use_directly
module Topprinters = Do_not_use_directly
module Topstart = Do_not_use_directly
module Trace = Do_not_use_directly
module Translattribute = Do_not_use_directly
module Translclass = Do_not_use_directly
module Translcore = Do_not_use_directly
module Translmod = Do_not_use_directly
module Translobj = Do_not_use_directly
module Translprim = Do_not_use_directly
module Traverse_for_exported_symbols = Do_not_use_directly
module Type_immediacy = Do_not_use_directly
module Typeclass = Do_not_use_directly
module Typecore = Do_not_use_directly
module Typedecl = Do_not_use_directly
module Typedecl_immediacy = Do_not_use_directly
module Typedecl_properties = Do_not_use_directly
module Typedecl_separability = Do_not_use_directly
module Typedecl_unboxed = Do_not_use_directly
module Typedecl_variance = Do_not_use_directly
module Typedtree = Do_not_use_directly
module Typemod = Do_not_use_directly
module Typeopt = Do_not_use_directly
module Types = Do_not_use_directly
module Typetexp = Do_not_use_directly
module Un_anf = Do_not_use_directly
module Unbox_closures = Do_not_use_directly
module Unbox_free_vars_of_closures = Do_not_use_directly
module Unbox_specialised_args = Do_not_use_directly
module Untypeast = Do_not_use_directly
module Var_within_closure = Do_not_use_directly
module Variable = Do_not_use_directly
module Warnings = Do_not_use_directly
module X86_ast = Do_not_use_directly
module X86_dsl = Do_not_use_directly
module X86_gas = Do_not_use_directly
module X86_masm = Do_not_use_directly
module X86_proc = Do_not_use_directly
\ No newline at end of file +Ocaml_shadow (ocaml-compiler-libs.Ocaml_shadow)

Module Ocaml_shadow

module Do_not_use_directly : sig ... end
module Afl_instrument = Do_not_use_directly
module Alias_analysis = Do_not_use_directly
module Allocated_const = Do_not_use_directly
module Annot = Do_not_use_directly
module Arch = Do_not_use_directly
module Arg_helper = Do_not_use_directly
module Asmgen = Do_not_use_directly
module Asmlibrarian = Do_not_use_directly
module Asmpackager = Do_not_use_directly
module Ast_helper = Do_not_use_directly
module Ast_invariants = Do_not_use_directly
module Ast_iterator = Do_not_use_directly
module Ast_mapper = Do_not_use_directly
module Asttypes = Do_not_use_directly
module Attr_helper = Do_not_use_directly
module Augment_specialised_args = Do_not_use_directly
module Backend_intf = Do_not_use_directly
module Backend_var = Do_not_use_directly
module Binutils = Do_not_use_directly
module Branch_relaxation = Do_not_use_directly
module Branch_relaxation_intf = Do_not_use_directly
module Btype = Do_not_use_directly
module Build_export_info = Do_not_use_directly
module Build_path_prefix_map = Do_not_use_directly
module Builtin_attributes = Do_not_use_directly
module Bytegen = Do_not_use_directly
module Bytelibrarian = Do_not_use_directly
module Bytepackager = Do_not_use_directly
module Bytesections = Do_not_use_directly
module CSE = Do_not_use_directly
module CSEgen = Do_not_use_directly
module CamlinternalMenhirLib = Do_not_use_directly
module Ccomp = Do_not_use_directly
module Clambda = Do_not_use_directly
module Clambda_primitives = Do_not_use_directly
module Clflags = Do_not_use_directly
module Closure = Do_not_use_directly
module Closure_conversion = Do_not_use_directly
module Closure_conversion_aux = Do_not_use_directly
module Closure_element = Do_not_use_directly
module Closure_id = Do_not_use_directly
module Closure_middle_end = Do_not_use_directly
module Closure_offsets = Do_not_use_directly
module Closure_origin = Do_not_use_directly
module Cmi_format = Do_not_use_directly
module Cmm = Do_not_use_directly
module Cmm_helpers = Do_not_use_directly
module Cmm_invariants = Do_not_use_directly
module Cmmgen = Do_not_use_directly
module Cmmgen_state = Do_not_use_directly
module Cmo_format = Do_not_use_directly
module Cmt2annot = Do_not_use_directly
module Cmt_format = Do_not_use_directly
module Cmx_format = Do_not_use_directly
module Cmxs_format = Do_not_use_directly
module Coloring = Do_not_use_directly
module Comballoc = Do_not_use_directly
module Compenv = Do_not_use_directly
module Compilation_unit = Do_not_use_directly
module Compile = Do_not_use_directly
module Compile_common = Do_not_use_directly
module Compilenv = Do_not_use_directly
module Compmisc = Do_not_use_directly
module Compression = Do_not_use_directly
module Config = Do_not_use_directly
module Config_boot = Do_not_use_directly
module Config_main = Do_not_use_directly
module Consistbl = Do_not_use_directly
module Convert_primitives = Do_not_use_directly
module Ctype = Do_not_use_directly
module Dataflow = Do_not_use_directly
module Datarepr = Do_not_use_directly
module Deadcode = Do_not_use_directly
module Debuginfo = Do_not_use_directly
module Depend = Do_not_use_directly
module Diffing = Do_not_use_directly
module Diffing_with_keys = Do_not_use_directly
module Dll = Do_not_use_directly
module Docstrings = Do_not_use_directly
module Domainstate = Do_not_use_directly
module Effect_analysis = Do_not_use_directly
module Emit = Do_not_use_directly
module Emitaux = Do_not_use_directly
module Emitcode = Do_not_use_directly
module Emitenv = Do_not_use_directly
module Env = Do_not_use_directly
module Envaux = Do_not_use_directly
module Errors = Do_not_use_directly
module Errortrace = Do_not_use_directly
module Export_id = Do_not_use_directly
module Export_info = Do_not_use_directly
module Export_info_for_pack = Do_not_use_directly
module Expunge = Do_not_use_directly
module Extract_projections = Do_not_use_directly
module Find_recursive_functions = Do_not_use_directly
module Flambda = Do_not_use_directly
module Flambda_invariants = Do_not_use_directly
module Flambda_iterators = Do_not_use_directly
module Flambda_middle_end = Do_not_use_directly
module Flambda_to_clambda = Do_not_use_directly
module Flambda_utils = Do_not_use_directly
module Freshening = Do_not_use_directly
module Genprintval = Do_not_use_directly
module Id_types = Do_not_use_directly
module Ident = Do_not_use_directly
module Identifiable = Do_not_use_directly
module Import_approx = Do_not_use_directly
module Includeclass = Do_not_use_directly
module Includecore = Do_not_use_directly
module Includemod = Do_not_use_directly
module Includemod_errorprinter = Do_not_use_directly
module Inconstant_idents = Do_not_use_directly
module Initialize_symbol_to_let_symbol = Do_not_use_directly
module Inline_and_simplify = Do_not_use_directly
module Inline_and_simplify_aux = Do_not_use_directly
module Inlining_cost = Do_not_use_directly
module Inlining_decision = Do_not_use_directly
module Inlining_decision_intf = Do_not_use_directly
module Inlining_stats = Do_not_use_directly
module Inlining_stats_types = Do_not_use_directly
module Inlining_transforms = Do_not_use_directly
module Instruct = Do_not_use_directly
module Int_replace_polymorphic_compare = Do_not_use_directly
module Interf = Do_not_use_directly
module Internal_variable_names = Do_not_use_directly
module Interval = Do_not_use_directly
module Invariant_params = Do_not_use_directly
module Lambda = Do_not_use_directly
module Lazy_backtrack = Do_not_use_directly
module Lexer = Do_not_use_directly
module Lift_code = Do_not_use_directly
module Lift_constants = Do_not_use_directly
module Lift_let_to_initialize_symbol = Do_not_use_directly
module Linear = Do_not_use_directly
module Linear_format = Do_not_use_directly
module Linearize = Do_not_use_directly
module Linkage_name = Do_not_use_directly
module Linscan = Do_not_use_directly
module Liveness = Do_not_use_directly
module Load_path = Do_not_use_directly
module Local_store = Do_not_use_directly
module Location = Do_not_use_directly
module Longident = Do_not_use_directly
module Mach = Do_not_use_directly
module Main = Do_not_use_directly
module Main_args = Do_not_use_directly
module Maindriver = Do_not_use_directly
module Makedepend = Do_not_use_directly
module Matching = Do_not_use_directly
module Meta = Do_not_use_directly
module Misc = Do_not_use_directly
module Mtype = Do_not_use_directly
module Mutable_variable = Do_not_use_directly
module Numbers = Do_not_use_directly
module Opcodes = Do_not_use_directly
module Oprint = Do_not_use_directly
module Optcompile = Do_not_use_directly
module Opterrors = Do_not_use_directly
module Optmain = Do_not_use_directly
module Optmaindriver = Do_not_use_directly
module Outcometree = Do_not_use_directly
module Parameter = Do_not_use_directly
module Parmatch = Do_not_use_directly
module Parse = Do_not_use_directly
module Parser = Do_not_use_directly
module Parsetree = Do_not_use_directly
module Pass_wrapper = Do_not_use_directly
module Path = Do_not_use_directly
module Patterns = Do_not_use_directly
module Persistent_env = Do_not_use_directly
module Polling = Do_not_use_directly
module Pparse = Do_not_use_directly
module Pprintast = Do_not_use_directly
module Predef = Do_not_use_directly
module Primitive = Do_not_use_directly
module Printast = Do_not_use_directly
module Printclambda = Do_not_use_directly
module Printclambda_primitives = Do_not_use_directly
module Printcmm = Do_not_use_directly
module Printinstr = Do_not_use_directly
module Printlambda = Do_not_use_directly
module Printlinear = Do_not_use_directly
module Printmach = Do_not_use_directly
module Printpat = Do_not_use_directly
module Printtyp = Do_not_use_directly
module Printtyped = Do_not_use_directly
module Proc = Do_not_use_directly
module Profile = Do_not_use_directly
module Projection = Do_not_use_directly
module Rec_check = Do_not_use_directly
module Ref_to_variables = Do_not_use_directly
module Reg = Do_not_use_directly
module Reload = Do_not_use_directly
module Reloadgen = Do_not_use_directly
module Remove_free_vars_equal_to_args = Do_not_use_directly
module Remove_unused_arguments = Do_not_use_directly
module Remove_unused_closure_vars = Do_not_use_directly
module Remove_unused_program_constructs = Do_not_use_directly
module Runtimedef = Do_not_use_directly
module Schedgen = Do_not_use_directly
module Scheduling = Do_not_use_directly
module Selectgen = Do_not_use_directly
module Selection = Do_not_use_directly
module Semantics_of_primitives = Do_not_use_directly
module Set_of_closures_id = Do_not_use_directly
module Set_of_closures_origin = Do_not_use_directly
module Shape = Do_not_use_directly
module Share_constants = Do_not_use_directly
module Signature_group = Do_not_use_directly
module Simple_value_approx = Do_not_use_directly
module Simplif = Do_not_use_directly
module Simplify_boxed_integer_ops = Do_not_use_directly
module Simplify_boxed_integer_ops_intf = Do_not_use_directly
module Simplify_common = Do_not_use_directly
module Simplify_primitives = Do_not_use_directly
module Spill = Do_not_use_directly
module Split = Do_not_use_directly
module Static_exception = Do_not_use_directly
module Strmatch = Do_not_use_directly
module Strongly_connected_components = Do_not_use_directly
module Stypes = Do_not_use_directly
module Subst = Do_not_use_directly
module Switch = Do_not_use_directly
module Symbol = Do_not_use_directly
module Symtable = Do_not_use_directly
module Syntaxerr = Do_not_use_directly
module Tag = Do_not_use_directly
module Targetint = Do_not_use_directly
module Tast_iterator = Do_not_use_directly
module Tast_mapper = Do_not_use_directly
module Terminfo = Do_not_use_directly
module Tmc = Do_not_use_directly
module Topcommon = Do_not_use_directly
module Topdirs = Do_not_use_directly
module Topeval = Do_not_use_directly
module Tophooks = Do_not_use_directly
module Toploop = Do_not_use_directly
module Topmain = Do_not_use_directly
module Topprinters = Do_not_use_directly
module Topstart = Do_not_use_directly
module Trace = Do_not_use_directly
module Translattribute = Do_not_use_directly
module Translclass = Do_not_use_directly
module Translcore = Do_not_use_directly
module Translmod = Do_not_use_directly
module Translobj = Do_not_use_directly
module Translprim = Do_not_use_directly
module Traverse_for_exported_symbols = Do_not_use_directly
module Type_immediacy = Do_not_use_directly
module Typeclass = Do_not_use_directly
module Typecore = Do_not_use_directly
module Typedecl = Do_not_use_directly
module Typedecl_immediacy = Do_not_use_directly
module Typedecl_properties = Do_not_use_directly
module Typedecl_separability = Do_not_use_directly
module Typedecl_unboxed = Do_not_use_directly
module Typedecl_variance = Do_not_use_directly
module Typedtree = Do_not_use_directly
module Typemod = Do_not_use_directly
module Typeopt = Do_not_use_directly
module Types = Do_not_use_directly
module Typetexp = Do_not_use_directly
module Un_anf = Do_not_use_directly
module Unbox_closures = Do_not_use_directly
module Unbox_free_vars_of_closures = Do_not_use_directly
module Unbox_specialised_args = Do_not_use_directly
module Untypeast = Do_not_use_directly
module Var_within_closure = Do_not_use_directly
module Variable = Do_not_use_directly
module Warnings = Do_not_use_directly
module X86_ast = Do_not_use_directly
module X86_dsl = Do_not_use_directly
module X86_gas = Do_not_use_directly
module X86_masm = Do_not_use_directly
module X86_proc = Do_not_use_directly
diff --git a/ocaml-compiler-libs/Ocaml_toplevel/index.html b/ocaml-compiler-libs/Ocaml_toplevel/index.html index 5a348bd..48a6bbc 100644 --- a/ocaml-compiler-libs/Ocaml_toplevel/index.html +++ b/ocaml-compiler-libs/Ocaml_toplevel/index.html @@ -1,2 +1,2 @@ -Ocaml_toplevel (ocaml-compiler-libs.Ocaml_toplevel)

Module Ocaml_toplevel

module Genprintval = Genprintval
module Topcommon = Topcommon
module Topdirs = Topdirs
module Topeval = Topeval
module Toploop = Toploop
module Topmain = Topmain
module Topprinters = Topprinters
module Trace = Trace
\ No newline at end of file +Ocaml_toplevel (ocaml-compiler-libs.Ocaml_toplevel)

Module Ocaml_toplevel

module Genprintval = Genprintval
module Topcommon = Topcommon
module Topdirs = Topdirs
module Topeval = Topeval
module Toploop = Toploop
module Topmain = Topmain
module Topprinters = Topprinters
module Trace = Trace
diff --git a/ocaml-compiler-libs/index.html b/ocaml-compiler-libs/index.html index 4d07392..a06af8f 100644 --- a/ocaml-compiler-libs/index.html +++ b/ocaml-compiler-libs/index.html @@ -1,2 +1,2 @@ -index (ocaml-compiler-libs.index)

Package ocaml-compiler-libs

Package info

changes-files
license-files
readme-files
\ No newline at end of file +index (ocaml-compiler-libs.index)

Package ocaml-compiler-libs

Package info

changes-files
license-files
readme-files
diff --git a/ocaml/Afl_instrument/index.html b/ocaml/Afl_instrument/index.html index b0bb71a..58d3f5a 100644 --- a/ocaml/Afl_instrument/index.html +++ b/ocaml/Afl_instrument/index.html @@ -1,5 +1,5 @@ -Afl_instrument (ocaml.Afl_instrument)

Module Afl_instrument

Instrumentation for afl-fuzz.

val instrument_function : Cmm.expression -> Debuginfo.t -> Cmm.expression
val instrument_initialiser : +Afl_instrument (ocaml.Afl_instrument)

Module Afl_instrument

Instrumentation for afl-fuzz.

val instrument_function : Cmm.expression -> Debuginfo.t -> Cmm.expression
val instrument_initialiser : Cmm.expression -> (unit -> Debuginfo.t) -> - Cmm.expression
\ No newline at end of file + Cmm.expression
diff --git a/ocaml/Alias_analysis/index.html b/ocaml/Alias_analysis/index.html index 1c1659b..532a828 100644 --- a/ocaml/Alias_analysis/index.html +++ b/ocaml/Alias_analysis/index.html @@ -1,10 +1,10 @@ -Alias_analysis (ocaml.Alias_analysis)

Module Alias_analysis

type allocation_point =
  1. | Symbol of Symbol.t
  2. | Variable of Variable.t
type allocated_const =
  1. | Normal of Allocated_const.t
  2. | Array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t list
  3. | Duplicate_array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t
type constant_defining_value =
  1. | Allocated_const of allocated_const
  2. | Block of Tag.t * Variable.t list
  3. | Set_of_closures of Flambda.set_of_closures
  4. | Project_closure of Flambda.project_closure
  5. | Move_within_set_of_closures of Flambda.move_within_set_of_closures
  6. | Project_var of Flambda.project_var
  7. | Field of Variable.t * int
  8. | Symbol_field of Symbol.t * int
  9. | Const of Flambda.const
  10. | Symbol of Symbol.t
  11. | Variable of Variable.t
type initialize_symbol_field = Variable.t option
val run : +Alias_analysis (ocaml.Alias_analysis)

Module Alias_analysis

type allocation_point =
  1. | Symbol of Symbol.t
  2. | Variable of Variable.t
type allocated_const =
  1. | Normal of Allocated_const.t
  2. | Array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t list
  3. | Duplicate_array of Lambda.array_kind * Asttypes.mutable_flag * Variable.t
type constant_defining_value =
  1. | Allocated_const of allocated_const
  2. | Block of Tag.t * Variable.t list
  3. | Set_of_closures of Flambda.set_of_closures
  4. | Project_closure of Flambda.project_closure
  5. | Move_within_set_of_closures of Flambda.move_within_set_of_closures
  6. | Project_var of Flambda.project_var
  7. | Field of Variable.t * int
  8. | Symbol_field of Symbol.t * int
  9. | Const of Flambda.const
  10. | Symbol of Symbol.t
  11. | Variable of Variable.t
type initialize_symbol_field = Variable.t option

Simple alias analysis working over information about which symbols have been assigned to variables; and which constants have been assigned to symbols. The return value gives the assignment of the defining values of constants to variables. Also see comments for Lift_constants, whose input feeds this pass.

Variables found to be ill-typed accesses to other constants, for example arising from dead code, will be pointed at the_dead_constant.

val print_constant_defining_value : Stdlib.Format.formatter -> constant_defining_value -> - unit
\ No newline at end of file + unit
diff --git a/ocaml/Allocated_const/index.html b/ocaml/Allocated_const/index.html index 66ed1ce..1ff3c28 100644 --- a/ocaml/Allocated_const/index.html +++ b/ocaml/Allocated_const/index.html @@ -1,2 +1,2 @@ -Allocated_const (ocaml.Allocated_const)

Module Allocated_const

Constants that are always allocated (possibly statically). Blocks are not included here since they are always encoded using Prim (Pmakeblock, ...).

type t =
  1. | Float of float
  2. | Int32 of int32
  3. | Int64 of int64
  4. | Nativeint of nativeint
  5. | Float_array of float list
  6. | Immutable_float_array of float list
  7. | String of string
  8. | Immutable_string of string
val compare_floats : float -> float -> int
val compare : t -> t -> int
val print : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Allocated_const (ocaml.Allocated_const)

Module Allocated_const

Constants that are always allocated (possibly statically). Blocks are not included here since they are always encoded using Prim (Pmakeblock, ...).

type t =
  1. | Float of float
  2. | Int32 of int32
  3. | Int64 of int64
  4. | Nativeint of nativeint
  5. | Float_array of float list
  6. | Immutable_float_array of float list
  7. | String of string
  8. | Immutable_string of string
val compare_floats : float -> float -> int
val compare : t -> t -> int
val print : Stdlib.Format.formatter -> t -> unit
diff --git a/ocaml/Annot/index.html b/ocaml/Annot/index.html index fa32e2f..214b88f 100644 --- a/ocaml/Annot/index.html +++ b/ocaml/Annot/index.html @@ -1,2 +1,2 @@ -Annot (ocaml.Annot)

Module Annot

type call =
  1. | Tail
  2. | Stack
  3. | Inline
type ident =
  1. | Iref_internal of Location.t
  2. | Iref_external
  3. | Idef of Location.t
\ No newline at end of file +Annot (ocaml.Annot)

Module Annot

type call =
  1. | Tail
  2. | Stack
  3. | Inline
type ident =
  1. | Iref_internal of Location.t
  2. | Iref_external
  3. | Idef of Location.t
diff --git a/ocaml/Arch/index.html b/ocaml/Arch/index.html index 8ae27a4..a66ab4a 100644 --- a/ocaml/Arch/index.html +++ b/ocaml/Arch/index.html @@ -1,5 +1,5 @@ -Arch (ocaml.Arch)

Module Arch

val command_line_options : (string * Stdlib.Arg.spec * string) list
type addressing_mode =
  1. | Ibased of string * int
  2. | Iindexed of int
  3. | Iindexed2 of int
  4. | Iscaled of int * int
  5. | Iindexed2scaled of int * int
type specific_operation =
  1. | Ilea of addressing_mode
  2. | Istore_int of nativeint * addressing_mode * bool
  3. | Ioffset_loc of int * addressing_mode
  4. | Ifloatarithmem of float_operation * addressing_mode
  5. | Ibswap of int
  6. | Isqrtf
  7. | Ifloatsqrtf of addressing_mode
  8. | Isextend32
  9. | Izextend32
and float_operation =
  1. | Ifloatadd
  2. | Ifloatsub
  3. | Ifloatmul
  4. | Ifloatdiv
val big_endian : bool
val size_addr : int
val size_int : int
val size_float : int
val allow_unaligned_access : bool
val division_crashes_on_overflow : bool
val identity_addressing : addressing_mode
val offset_addressing : addressing_mode -> int -> addressing_mode
val num_args_addressing : addressing_mode -> int
val print_addressing : +Arch (ocaml.Arch)

Module Arch

val command_line_options : (string * Stdlib.Arg.spec * string) list
type addressing_mode =
  1. | Ibased of string * int
  2. | Iindexed of int
  3. | Iindexed2 of int
  4. | Iscaled of int * int
  5. | Iindexed2scaled of int * int
type specific_operation =
  1. | Ilea of addressing_mode
  2. | Istore_int of nativeint * addressing_mode * bool
  3. | Ioffset_loc of int * addressing_mode
  4. | Ifloatarithmem of float_operation * addressing_mode
  5. | Ibswap of int
  6. | Isqrtf
  7. | Ifloatsqrtf of addressing_mode
  8. | Isextend32
  9. | Izextend32
and float_operation =
  1. | Ifloatadd
  2. | Ifloatsub
  3. | Ifloatmul
  4. | Ifloatdiv
val big_endian : bool
val size_addr : int
val size_int : int
val size_float : int
val allow_unaligned_access : bool
val division_crashes_on_overflow : bool
val identity_addressing : addressing_mode
val offset_addressing : addressing_mode -> int -> addressing_mode
val num_args_addressing : addressing_mode -> int
val print_addressing : (Stdlib.Format.formatter -> 'a -> unit) -> addressing_mode -> Stdlib.Format.formatter -> @@ -11,4 +11,4 @@ 'a array -> unit
val win64 : bool
val operation_is_pure : specific_operation -> bool
val operation_can_raise : specific_operation -> bool
val float_cond_and_need_swap : Lambda.float_comparison -> - X86_ast.float_condition * bool
\ No newline at end of file + X86_ast.float_condition * bool
diff --git a/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html b/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html index 9359c05..eb01f58 100644 --- a/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html +++ b/ocaml/Arg_helper/Make/argument-1-S/Key/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Arg_helper.Make.S.Key.Map)

Module Key.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : +Map (ocaml.Arg_helper.Make.S.Key.Map)

Module Key.Map

Maps

type key = t

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
   (fun _k li -> match li with [] -> None | _::tl -> Some tl)
-  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
\ No newline at end of file + m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/ocaml/Arg_helper/Make/argument-1-S/Key/index.html b/ocaml/Arg_helper/Make/argument-1-S/Key/index.html index 142a3c8..9752442 100644 --- a/ocaml/Arg_helper/Make/argument-1-S/Key/index.html +++ b/ocaml/Arg_helper/Make/argument-1-S/Key/index.html @@ -1,2 +1,2 @@ -Key (ocaml.Arg_helper.Make.S.Key)

Module S.Key

type t
val of_string : string -> t

The textual representation of a key must not contain '=' or ','.

module Map : Map.S with type key = t
\ No newline at end of file +Key (ocaml.Arg_helper.Make.S.Key)

Module S.Key

type t
val of_string : string -> t

The textual representation of a key must not contain '=' or ','.

module Map : Map.S with type key = t
diff --git a/ocaml/Arg_helper/Make/argument-1-S/Value/index.html b/ocaml/Arg_helper/Make/argument-1-S/Value/index.html index c95b878..d7bcbe1 100644 --- a/ocaml/Arg_helper/Make/argument-1-S/Value/index.html +++ b/ocaml/Arg_helper/Make/argument-1-S/Value/index.html @@ -1,2 +1,2 @@ -Value (ocaml.Arg_helper.Make.S.Value)

Module S.Value

type t
val of_string : string -> t

The textual representation of a value must not contain ','.

\ No newline at end of file +Value (ocaml.Arg_helper.Make.S.Value)

Module S.Value

type t
val of_string : string -> t

The textual representation of a value must not contain ','.

diff --git a/ocaml/Arg_helper/Make/argument-1-S/index.html b/ocaml/Arg_helper/Make/argument-1-S/index.html index bc4caf3..ca6ba1d 100644 --- a/ocaml/Arg_helper/Make/argument-1-S/index.html +++ b/ocaml/Arg_helper/Make/argument-1-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Arg_helper.Make.S)

Parameter Make.S

module Key : sig ... end
module Value : sig ... end
\ No newline at end of file +S (ocaml.Arg_helper.Make.S)

Parameter Make.S

module Key : sig ... end
module Value : sig ... end
diff --git a/ocaml/Arg_helper/Make/index.html b/ocaml/Arg_helper/Make/index.html index e3b6ec4..b53c7c5 100644 --- a/ocaml/Arg_helper/Make/index.html +++ b/ocaml/Arg_helper/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Arg_helper.Make)

Module Arg_helper.Make

Parameters

module S : sig ... end

Signature

type parsed
val default : S.Value.t -> parsed
val set_base_default : S.Value.t -> parsed -> parsed
val add_base_override : S.Key.t -> S.Value.t -> parsed -> parsed
val reset_base_overrides : parsed -> parsed
val set_user_default : S.Value.t -> parsed -> parsed
val add_user_override : S.Key.t -> S.Value.t -> parsed -> parsed
val parse : string -> string -> parsed ref -> unit
type parse_result =
  1. | Ok
  2. | Parse_failed of exn
val parse_no_error : string -> parsed ref -> parse_result
val get : key:S.Key.t -> parsed -> S.Value.t
\ No newline at end of file +Make (ocaml.Arg_helper.Make)

Module Arg_helper.Make

Parameters

module S : sig ... end

Signature

type parsed
val default : S.Value.t -> parsed
val set_base_default : S.Value.t -> parsed -> parsed
val add_base_override : S.Key.t -> S.Value.t -> parsed -> parsed
val reset_base_overrides : parsed -> parsed
val set_user_default : S.Value.t -> parsed -> parsed
val add_user_override : S.Key.t -> S.Value.t -> parsed -> parsed
val parse : string -> string -> parsed ref -> unit
type parse_result =
  1. | Ok
  2. | Parse_failed of exn
val parse_no_error : string -> parsed ref -> parse_result
val get : key:S.Key.t -> parsed -> S.Value.t
diff --git a/ocaml/Arg_helper/index.html b/ocaml/Arg_helper/index.html index 8371bcc..83aa7df 100644 --- a/ocaml/Arg_helper/index.html +++ b/ocaml/Arg_helper/index.html @@ -1,2 +1,2 @@ -Arg_helper (ocaml.Arg_helper)

Module Arg_helper

Decipher command line arguments of the form <value> | <key>=<value>,...

(as used for example for the specification of inlining parameters varying by simplification round).

Warning: this module is unstable and part of compiler-libs.

module Make (S : sig ... end) : sig ... end
\ No newline at end of file +Arg_helper (ocaml.Arg_helper)

Module Arg_helper

Decipher command line arguments of the form <value> | <key>=<value>,...

(as used for example for the specification of inlining parameters varying by simplification round).

Warning: this module is unstable and part of compiler-libs.

module Make (S : sig ... end) : sig ... end
diff --git a/ocaml/Asmgen/index.html b/ocaml/Asmgen/index.html index e8eebbe..e189457 100644 --- a/ocaml/Asmgen/index.html +++ b/ocaml/Asmgen/index.html @@ -1,20 +1,20 @@ -Asmgen (ocaml.Asmgen)

Module Asmgen

From Lambda to assembly code

type middle_end = - backend:(module Backend_intf.S) -> - prefixname:string -> - ppf_dump:Stdlib.Format.formatter -> +Asmgen (ocaml.Asmgen)

Module Asmgen

From Lambda to assembly code

type middle_end = + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Stdlib.Format.formatter -> Lambda.program -> Clambda.with_constants

The type of converters from Lambda to Clambda.

val compile_implementation : - ?toplevel:(string -> bool) -> - backend:(module Backend_intf.S) -> - prefixname:string -> - middle_end:middle_end -> - ppf_dump:Stdlib.Format.formatter -> + ?toplevel:(string -> bool) -> + backend:(module Backend_intf.S) -> + prefixname:string -> + middle_end:middle_end -> + ppf_dump:Stdlib.Format.formatter -> Lambda.program -> - unit

Compile an implementation from Lambda using the given middle end.

val compile_implementation_linear : string -> progname:string -> unit
val compile_phrase : ppf_dump:Stdlib.Format.formatter -> Cmm.phrase -> unit
type error =
  1. | Assembler_error of string
  2. | Mismatched_for_pack of string option
  3. | Asm_generation of string * Emitaux.error
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
val compile_unit : - output_prefix:string -> - asm_filename:string -> - keep_asm:bool -> - obj_filename:string -> + unit

Compile an implementation from Lambda using the given middle end.

val compile_implementation_linear : string -> progname:string -> unit
val compile_phrase : ppf_dump:Stdlib.Format.formatter -> Cmm.phrase -> unit
type error =
  1. | Assembler_error of string
  2. | Mismatched_for_pack of string option
  3. | Asm_generation of string * Emitaux.error
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
val compile_unit : + output_prefix:string -> + asm_filename:string -> + keep_asm:bool -> + obj_filename:string -> (unit -> unit) -> - unit
\ No newline at end of file + unit
diff --git a/ocaml/Asmlibrarian/index.html b/ocaml/Asmlibrarian/index.html index 2275cd1..0707e95 100644 --- a/ocaml/Asmlibrarian/index.html +++ b/ocaml/Asmlibrarian/index.html @@ -1,2 +1,2 @@ -Asmlibrarian (ocaml.Asmlibrarian)

Module Asmlibrarian

val create_archive : string list -> string -> unit
type error =
  1. | File_not_found of string
  2. | Archiver_error of string
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
\ No newline at end of file +Asmlibrarian (ocaml.Asmlibrarian)

Module Asmlibrarian

val create_archive : string list -> string -> unit
type error =
  1. | File_not_found of string
  2. | Archiver_error of string
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
diff --git a/ocaml/Asmlink/index.html b/ocaml/Asmlink/index.html index 80c7b63..8180d1a 100644 --- a/ocaml/Asmlink/index.html +++ b/ocaml/Asmlink/index.html @@ -1,10 +1,10 @@ -Asmlink (ocaml.Asmlink)

Module Asmlink

val extract_crc_interfaces : unit -> Misc.crcs
val extract_crc_implementations : unit -> Misc.crcs
type error =
  1. | File_not_found of Misc.filepath
  2. | Not_an_object_file of Misc.filepath
  3. | Missing_implementations of (Misc.modname * string list) list
  4. | Inconsistent_interface of Misc.modname * Misc.filepath * Misc.filepath
  5. | Inconsistent_implementation of Misc.modname * Misc.filepath * Misc.filepath
  6. | Assembler_error of Misc.filepath
  7. | Linking_error of int
  8. | Multiple_definition of Misc.modname * Misc.filepath * Misc.filepath
  9. | Missing_cmx of Misc.filepath * Misc.modname
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
diff --git a/ocaml/Asmpackager/index.html b/ocaml/Asmpackager/index.html index b347ddd..22a4a45 100644 --- a/ocaml/Asmpackager/index.html +++ b/ocaml/Asmpackager/index.html @@ -1,8 +1,8 @@ -Asmpackager (ocaml.Asmpackager)

Module Asmpackager

val package_files : - ppf_dump:Stdlib.Format.formatter -> +Asmpackager (ocaml.Asmpackager)

Module Asmpackager

val package_files : + ppf_dump:Stdlib.Format.formatter -> Env.t -> string list -> string -> - backend:(module Backend_intf.S) -> - unit
type error =
  1. | Illegal_renaming of string * string * string
  2. | Forward_reference of string * string
  3. | Wrong_for_pack of string * string
  4. | Linking_error
  5. | Assembler_error of string
  6. | File_not_found of string
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
\ No newline at end of file + backend:(module Backend_intf.S) -> + unit
type error =
  1. | Illegal_renaming of string * string * string
  2. | Forward_reference of string * string
  3. | Wrong_for_pack of string * string
  4. | Linking_error
  5. | Assembler_error of string
  6. | File_not_found of string
exception Error of error
val report_error : Stdlib.Format.formatter -> error -> unit
diff --git a/ocaml/Ast_helper/Attr/index.html b/ocaml/Ast_helper/Attr/index.html index 1d54eb4..4a47f15 100644 --- a/ocaml/Ast_helper/Attr/index.html +++ b/ocaml/Ast_helper/Attr/index.html @@ -1,2 +1,2 @@ -Attr (ocaml.Ast_helper.Attr)

Module Ast_helper.Attr

Attributes

\ No newline at end of file +Attr (ocaml.Ast_helper.Attr)

Module Ast_helper.Attr

Attributes

diff --git a/ocaml/Ast_helper/Cf/index.html b/ocaml/Ast_helper/Cf/index.html index 22e6e2f..0ad8fd8 100644 --- a/ocaml/Ast_helper/Cf/index.html +++ b/ocaml/Ast_helper/Cf/index.html @@ -1,44 +1,44 @@ -Cf (ocaml.Ast_helper.Cf)

Module Ast_helper.Cf

Class fields

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> +Cf (ocaml.Ast_helper.Cf)

Module Ast_helper.Cf

Class fields

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> Parsetree.class_field_desc -> Parsetree.class_field
val inherit_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.override_flag -> Parsetree.class_expr -> str option -> Parsetree.class_field
val val_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str -> Asttypes.mutable_flag -> Parsetree.class_field_kind -> Parsetree.class_field
val method_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str -> Asttypes.private_flag -> Parsetree.class_field_kind -> Parsetree.class_field
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.core_type -> Parsetree.core_type -> Parsetree.class_field
val initializer_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.class_field
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.class_field
val attribute : ?loc:loc -> Parsetree.attribute -> Parsetree.class_field
val concrete : + Parsetree.class_field
val attribute : ?loc:loc -> Parsetree.attribute -> Parsetree.class_field
\ No newline at end of file + Parsetree.class_field_kind
diff --git a/ocaml/Ast_helper/Ci/index.html b/ocaml/Ast_helper/Ci/index.html index 32f5dea..7a9d9e5 100644 --- a/ocaml/Ast_helper/Ci/index.html +++ b/ocaml/Ast_helper/Ci/index.html @@ -1,12 +1,12 @@ -Ci (ocaml.Ast_helper.Ci)

Module Ast_helper.Ci

Classes

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> - ?virt:Asttypes.virtual_flag -> - ?params: +Ci (ocaml.Ast_helper.Ci)

Module Ast_helper.Ci

Classes

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?virt:Asttypes.virtual_flag -> + ?params: (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> str -> 'a -> - 'a Parsetree.class_infos
\ No newline at end of file + 'a Parsetree.class_infos
diff --git a/ocaml/Ast_helper/Cl/index.html b/ocaml/Ast_helper/Cl/index.html index 1030211..d993197 100644 --- a/ocaml/Ast_helper/Cl/index.html +++ b/ocaml/Ast_helper/Cl/index.html @@ -1,47 +1,47 @@ -Cl (ocaml.Ast_helper.Cl)

Module Ast_helper.Cl

Class expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Cl (ocaml.Ast_helper.Cl)

Module Ast_helper.Cl

Class expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_expr_desc -> Parsetree.class_expr
val constr : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.class_expr
val structure : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_structure -> Parsetree.class_expr
val fun_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.arg_label -> Parsetree.expression option -> Parsetree.pattern -> Parsetree.class_expr -> Parsetree.class_expr
val apply : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_expr -> (Asttypes.arg_label * Parsetree.expression) list -> Parsetree.class_expr
val let_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.rec_flag -> Parsetree.value_binding list -> Parsetree.class_expr -> Parsetree.class_expr
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_expr -> Parsetree.class_type -> Parsetree.class_expr
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> Parsetree.class_expr
val open_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.open_description -> Parsetree.class_expr -> - Parsetree.class_expr
\ No newline at end of file + Parsetree.class_expr
diff --git a/ocaml/Ast_helper/Const/index.html b/ocaml/Ast_helper/Const/index.html index e87d439..1e578a0 100644 --- a/ocaml/Ast_helper/Const/index.html +++ b/ocaml/Ast_helper/Const/index.html @@ -1,6 +1,6 @@ -Const (ocaml.Ast_helper.Const)

Module Ast_helper.Const

val char : char -> Parsetree.constant
val string : - ?quotation_delimiter:string -> - ?loc:Location.t -> +Const (ocaml.Ast_helper.Const)

Module Ast_helper.Const

val char : char -> Parsetree.constant
val string : + ?quotation_delimiter:string -> + ?loc:Location.t -> string -> - Parsetree.constant
val integer : ?suffix:char -> string -> Parsetree.constant
val int : ?suffix:char -> int -> Parsetree.constant
val int32 : ?suffix:char -> int32 -> Parsetree.constant
val int64 : ?suffix:char -> int64 -> Parsetree.constant
val nativeint : ?suffix:char -> nativeint -> Parsetree.constant
val float : ?suffix:char -> string -> Parsetree.constant
\ No newline at end of file + Parsetree.constant
val integer : ?suffix:char -> string -> Parsetree.constant
val int : ?suffix:char -> int -> Parsetree.constant
val int32 : ?suffix:char -> int32 -> Parsetree.constant
val int64 : ?suffix:char -> int64 -> Parsetree.constant
val nativeint : ?suffix:char -> nativeint -> Parsetree.constant
val float : ?suffix:char -> string -> Parsetree.constant
diff --git a/ocaml/Ast_helper/Csig/index.html b/ocaml/Ast_helper/Csig/index.html index 46a66c8..a9cd005 100644 --- a/ocaml/Ast_helper/Csig/index.html +++ b/ocaml/Ast_helper/Csig/index.html @@ -1,5 +1,5 @@ -Csig (ocaml.Ast_helper.Csig)

Module Ast_helper.Csig

Class signatures

val mk : +Csig (ocaml.Ast_helper.Csig)

Module Ast_helper.Csig

Class signatures

\ No newline at end of file + Parsetree.class_signature
diff --git a/ocaml/Ast_helper/Cstr/index.html b/ocaml/Ast_helper/Cstr/index.html index 8a05845..5307870 100644 --- a/ocaml/Ast_helper/Cstr/index.html +++ b/ocaml/Ast_helper/Cstr/index.html @@ -1,5 +1,5 @@ -Cstr (ocaml.Ast_helper.Cstr)

Module Ast_helper.Cstr

Class structures

val mk : +Cstr (ocaml.Ast_helper.Cstr)

Module Ast_helper.Cstr

Class structures

\ No newline at end of file + Parsetree.class_structure
diff --git a/ocaml/Ast_helper/Ctf/index.html b/ocaml/Ast_helper/Ctf/index.html index 74c56ec..ff48422 100644 --- a/ocaml/Ast_helper/Ctf/index.html +++ b/ocaml/Ast_helper/Ctf/index.html @@ -1,37 +1,37 @@ -Ctf (ocaml.Ast_helper.Ctf)

Module Ast_helper.Ctf

Class type fields

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> +Ctf (ocaml.Ast_helper.Ctf)

Module Ast_helper.Ctf

Class type fields

val inherit_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_type -> Parsetree.class_type_field
val val_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str -> Asttypes.mutable_flag -> Asttypes.virtual_flag -> Parsetree.core_type -> Parsetree.class_type_field
val method_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str -> Asttypes.private_flag -> Asttypes.virtual_flag -> Parsetree.core_type -> Parsetree.class_type_field
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.core_type -> Parsetree.core_type -> Parsetree.class_type_field
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.class_type_field
\ No newline at end of file + Parsetree.class_type_field
diff --git a/ocaml/Ast_helper/Cty/index.html b/ocaml/Ast_helper/Cty/index.html index 22dd196..12348f8 100644 --- a/ocaml/Ast_helper/Cty/index.html +++ b/ocaml/Ast_helper/Cty/index.html @@ -1,30 +1,30 @@ -Cty (ocaml.Ast_helper.Cty)

Module Ast_helper.Cty

Class type expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Cty (ocaml.Ast_helper.Cty)

Module Ast_helper.Cty

Class type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_type_desc -> Parsetree.class_type
val constr : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.class_type
val signature : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_signature -> Parsetree.class_type
val arrow : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.arg_label -> Parsetree.core_type -> Parsetree.class_type -> Parsetree.class_type
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> Parsetree.class_type
val open_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.open_description -> Parsetree.class_type -> - Parsetree.class_type
\ No newline at end of file + Parsetree.class_type
diff --git a/ocaml/Ast_helper/Exp/index.html b/ocaml/Ast_helper/Exp/index.html index 8f33d97..ba47eb8 100644 --- a/ocaml/Ast_helper/Exp/index.html +++ b/ocaml/Ast_helper/Exp/index.html @@ -1,186 +1,186 @@ -Exp (ocaml.Ast_helper.Exp)

Module Ast_helper.Exp

Expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Exp (ocaml.Ast_helper.Exp)

Module Ast_helper.Exp

Expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression_desc -> - Parsetree.expression
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val constant : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.expression
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val constant : + ?loc:loc -> + ?attrs:attrs -> Parsetree.constant -> Parsetree.expression
val let_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.rec_flag -> Parsetree.value_binding list -> Parsetree.expression -> Parsetree.expression
val fun_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.arg_label -> Parsetree.expression option -> Parsetree.pattern -> Parsetree.expression -> Parsetree.expression
val function_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.case list -> Parsetree.expression
val apply : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> (Asttypes.arg_label * Parsetree.expression) list -> Parsetree.expression
val match_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.case list -> Parsetree.expression
val try_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.case list -> Parsetree.expression
val tuple : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression list -> Parsetree.expression
val construct : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.expression option -> Parsetree.expression
val variant : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.label -> Parsetree.expression option -> Parsetree.expression
val record : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> (lid * Parsetree.expression) list -> Parsetree.expression option -> Parsetree.expression
val field : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> lid -> Parsetree.expression
val setfield : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> lid -> Parsetree.expression -> Parsetree.expression
val array : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression list -> Parsetree.expression
val ifthenelse : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.expression -> Parsetree.expression option -> Parsetree.expression
val sequence : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.expression -> Parsetree.expression
val while_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.expression -> Parsetree.expression
val coerce : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.core_type option -> Parsetree.core_type -> Parsetree.expression
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.core_type -> Parsetree.expression
val send : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> str -> - Parsetree.expression
val new_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val setinstvar : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.expression
val new_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.expression
val setinstvar : + ?loc:loc -> + ?attrs:attrs -> str -> Parsetree.expression -> Parsetree.expression
val override : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> (str * Parsetree.expression) list -> Parsetree.expression
val letmodule : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str_opt -> Parsetree.module_expr -> Parsetree.expression -> Parsetree.expression
val letexception : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension_constructor -> Parsetree.expression -> Parsetree.expression
val assert_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.expression
val lazy_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.expression
val poly : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.core_type option -> Parsetree.expression
val object_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.class_structure -> Parsetree.expression
val newtype : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str -> Parsetree.expression -> Parsetree.expression
val pack : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr -> Parsetree.expression
val open_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.open_declaration -> Parsetree.expression -> Parsetree.expression
val letop : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.binding_op -> Parsetree.binding_op list -> Parsetree.expression -> Parsetree.expression
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.expression
val unreachable : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.expression
val unreachable : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.expression
\ No newline at end of file + Parsetree.binding_op
diff --git a/ocaml/Ast_helper/Incl/index.html b/ocaml/Ast_helper/Incl/index.html index 141b050..a6f69e6 100644 --- a/ocaml/Ast_helper/Incl/index.html +++ b/ocaml/Ast_helper/Incl/index.html @@ -1,7 +1,7 @@ -Incl (ocaml.Ast_helper.Incl)

Module Ast_helper.Incl

Includes

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> +Incl (ocaml.Ast_helper.Incl)

Module Ast_helper.Incl

Includes

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> 'a -> - 'a Parsetree.include_infos
\ No newline at end of file + 'a Parsetree.include_infos
diff --git a/ocaml/Ast_helper/Mb/index.html b/ocaml/Ast_helper/Mb/index.html index b8ceaec..fc39671 100644 --- a/ocaml/Ast_helper/Mb/index.html +++ b/ocaml/Ast_helper/Mb/index.html @@ -1,9 +1,9 @@ -Mb (ocaml.Ast_helper.Mb)

Module Ast_helper.Mb

Module bindings

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> +Mb (ocaml.Ast_helper.Mb)

Module Ast_helper.Mb

Module bindings

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> str_opt -> Parsetree.module_expr -> - Parsetree.module_binding
\ No newline at end of file + Parsetree.module_binding
diff --git a/ocaml/Ast_helper/Md/index.html b/ocaml/Ast_helper/Md/index.html index 058e5cc..6d529da 100644 --- a/ocaml/Ast_helper/Md/index.html +++ b/ocaml/Ast_helper/Md/index.html @@ -1,9 +1,9 @@ -Md (ocaml.Ast_helper.Md)

Module Ast_helper.Md

Module declarations

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> +Md (ocaml.Ast_helper.Md)

Module Ast_helper.Md

Module declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> str_opt -> Parsetree.module_type -> - Parsetree.module_declaration
\ No newline at end of file + Parsetree.module_declaration
diff --git a/ocaml/Ast_helper/Mod/index.html b/ocaml/Ast_helper/Mod/index.html index d6907a2..b82422b 100644 --- a/ocaml/Ast_helper/Mod/index.html +++ b/ocaml/Ast_helper/Mod/index.html @@ -1,40 +1,40 @@ -Mod (ocaml.Ast_helper.Mod)

Module Ast_helper.Mod

Module expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Mod (ocaml.Ast_helper.Mod)

Module Ast_helper.Mod

Module expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr_desc -> Parsetree.module_expr
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_expr
val structure : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.module_expr
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_expr
val structure : + ?loc:loc -> + ?attrs:attrs -> Parsetree.structure -> Parsetree.module_expr
val functor_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.functor_parameter -> Parsetree.module_expr -> Parsetree.module_expr
val apply : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr -> Parsetree.module_expr -> Parsetree.module_expr
val apply_unit : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr -> Parsetree.module_expr
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr -> Parsetree.module_type -> Parsetree.module_expr
val unpack : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.expression -> Parsetree.module_expr
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.module_expr
\ No newline at end of file + Parsetree.module_expr
diff --git a/ocaml/Ast_helper/Ms/index.html b/ocaml/Ast_helper/Ms/index.html index 7506a9a..4f4d774 100644 --- a/ocaml/Ast_helper/Ms/index.html +++ b/ocaml/Ast_helper/Ms/index.html @@ -1,9 +1,9 @@ -Ms (ocaml.Ast_helper.Ms)

Module Ast_helper.Ms

Module substitutions

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> +Ms (ocaml.Ast_helper.Ms)

Module Ast_helper.Ms

Module substitutions

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> str -> lid -> - Parsetree.module_substitution
\ No newline at end of file + Parsetree.module_substitution
diff --git a/ocaml/Ast_helper/Mtd/index.html b/ocaml/Ast_helper/Mtd/index.html index 4f5ecbe..5f9e9f8 100644 --- a/ocaml/Ast_helper/Mtd/index.html +++ b/ocaml/Ast_helper/Mtd/index.html @@ -1,9 +1,9 @@ -Mtd (ocaml.Ast_helper.Mtd)

Module Ast_helper.Mtd

Module type declarations

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> - ?typ:Parsetree.module_type -> +Mtd (ocaml.Ast_helper.Mtd)

Module Ast_helper.Mtd

Module type declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?typ:Parsetree.module_type -> str -> - Parsetree.module_type_declaration
\ No newline at end of file + Parsetree.module_type_declaration
diff --git a/ocaml/Ast_helper/Mty/index.html b/ocaml/Ast_helper/Mty/index.html index c3ca30f..ce84b8d 100644 --- a/ocaml/Ast_helper/Mty/index.html +++ b/ocaml/Ast_helper/Mty/index.html @@ -1,31 +1,31 @@ -Mty (ocaml.Ast_helper.Mty)

Module Ast_helper.Mty

Module type expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Mty (ocaml.Ast_helper.Mty)

Module Ast_helper.Mty

Module type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_type_desc -> Parsetree.module_type
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val alias : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val signature : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.module_type
val ident : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val alias : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.module_type
val signature : + ?loc:loc -> + ?attrs:attrs -> Parsetree.signature -> Parsetree.module_type
val functor_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.functor_parameter -> Parsetree.module_type -> Parsetree.module_type
val with_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_type -> Parsetree.with_constraint list -> Parsetree.module_type
val typeof_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.module_expr -> Parsetree.module_type
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.module_type
\ No newline at end of file + Parsetree.module_type
diff --git a/ocaml/Ast_helper/Of/index.html b/ocaml/Ast_helper/Of/index.html index e19a834..2ba2b3b 100644 --- a/ocaml/Ast_helper/Of/index.html +++ b/ocaml/Ast_helper/Of/index.html @@ -1,11 +1,11 @@ -Of (ocaml.Ast_helper.Of)

Module Ast_helper.Of

Object fields

val mk : - ?loc:loc -> - ?attrs:attrs -> +Of (ocaml.Ast_helper.Of)

Module Ast_helper.Of

Object fields

val tag : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.label with_loc -> Parsetree.core_type -> - Parsetree.object_field
\ No newline at end of file + Parsetree.object_field
diff --git a/ocaml/Ast_helper/Opn/index.html b/ocaml/Ast_helper/Opn/index.html index 6afc0e0..30ffd4e 100644 --- a/ocaml/Ast_helper/Opn/index.html +++ b/ocaml/Ast_helper/Opn/index.html @@ -1,8 +1,8 @@ -Opn (ocaml.Ast_helper.Opn)

Module Ast_helper.Opn

Opens

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?override:Asttypes.override_flag -> +Opn (ocaml.Ast_helper.Opn)

Module Ast_helper.Opn

Opens

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?override:Asttypes.override_flag -> 'a -> - 'a Parsetree.open_infos
\ No newline at end of file + 'a Parsetree.open_infos
diff --git a/ocaml/Ast_helper/Pat/index.html b/ocaml/Ast_helper/Pat/index.html index b39af9a..c0e792b 100644 --- a/ocaml/Ast_helper/Pat/index.html +++ b/ocaml/Ast_helper/Pat/index.html @@ -1,66 +1,66 @@ -Pat (ocaml.Ast_helper.Pat)

Module Ast_helper.Pat

Patterns

val mk : - ?loc:loc -> - ?attrs:attrs -> +Pat (ocaml.Ast_helper.Pat)

Module Ast_helper.Pat

Patterns

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern_desc -> - Parsetree.pattern
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.pattern
val var : ?loc:loc -> ?attrs:attrs -> str -> Parsetree.pattern
val alias : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.pattern
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.pattern
val var : ?loc:loc -> ?attrs:attrs -> str -> Parsetree.pattern
val alias : + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern -> str -> Parsetree.pattern
val constant : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.constant -> Parsetree.pattern
val interval : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.constant -> Parsetree.constant -> Parsetree.pattern
val tuple : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern list -> Parsetree.pattern
val construct : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> (str list * Parsetree.pattern) option -> Parsetree.pattern
val variant : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.label -> Parsetree.pattern option -> Parsetree.pattern
val record : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> (lid * Parsetree.pattern) list -> Asttypes.closed_flag -> Parsetree.pattern
val array : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern list -> Parsetree.pattern
val or_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern -> Parsetree.pattern -> Parsetree.pattern
val constraint_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern -> Parsetree.core_type -> - Parsetree.pattern
val type_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.pattern
val lazy_ : ?loc:loc -> ?attrs:attrs -> Parsetree.pattern -> Parsetree.pattern
val unpack : ?loc:loc -> ?attrs:attrs -> str_opt -> Parsetree.pattern
val open_ : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.pattern
val type_ : ?loc:loc -> ?attrs:attrs -> lid -> Parsetree.pattern
val lazy_ : ?loc:loc -> ?attrs:attrs -> Parsetree.pattern -> Parsetree.pattern
val unpack : ?loc:loc -> ?attrs:attrs -> str_opt -> Parsetree.pattern
val open_ : + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.pattern -> Parsetree.pattern
val exception_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.pattern -> Parsetree.pattern
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.pattern
\ No newline at end of file + Parsetree.pattern
diff --git a/ocaml/Ast_helper/Rf/index.html b/ocaml/Ast_helper/Rf/index.html index f322757..b45e315 100644 --- a/ocaml/Ast_helper/Rf/index.html +++ b/ocaml/Ast_helper/Rf/index.html @@ -1,12 +1,12 @@ -Rf (ocaml.Ast_helper.Rf)

Module Ast_helper.Rf

Row fields

val mk : - ?loc:loc -> - ?attrs:attrs -> +Rf (ocaml.Ast_helper.Rf)

Module Ast_helper.Rf

Row fields

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.row_field_desc -> Parsetree.row_field
val tag : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Asttypes.label with_loc -> bool -> Parsetree.core_type list -> - Parsetree.row_field
val inherit_ : ?loc:loc -> Parsetree.core_type -> Parsetree.row_field
\ No newline at end of file + Parsetree.row_field
val inherit_ : ?loc:loc -> Parsetree.core_type -> Parsetree.row_field
diff --git a/ocaml/Ast_helper/Sig/index.html b/ocaml/Ast_helper/Sig/index.html index f4f7221..c6f9fb9 100644 --- a/ocaml/Ast_helper/Sig/index.html +++ b/ocaml/Ast_helper/Sig/index.html @@ -1,43 +1,43 @@ -Sig (ocaml.Ast_helper.Sig)

Module Ast_helper.Sig

Signature items

val type_ : - ?loc:loc -> +Sig (ocaml.Ast_helper.Sig)

Module Ast_helper.Sig

Signature items

val type_subst : - ?loc:loc -> + ?loc:loc -> Parsetree.type_declaration list -> Parsetree.signature_item
val type_extension : - ?loc:loc -> + ?loc:loc -> Parsetree.type_extension -> Parsetree.signature_item
val exception_ : - ?loc:loc -> + ?loc:loc -> Parsetree.type_exception -> Parsetree.signature_item
val module_ : - ?loc:loc -> + ?loc:loc -> Parsetree.module_declaration -> Parsetree.signature_item
val mod_subst : - ?loc:loc -> + ?loc:loc -> Parsetree.module_substitution -> Parsetree.signature_item
val rec_module : - ?loc:loc -> + ?loc:loc -> Parsetree.module_declaration list -> Parsetree.signature_item
val modtype_subst : - ?loc:loc -> + ?loc:loc -> Parsetree.module_type_declaration -> - Parsetree.signature_item
val include_ : - ?loc:loc -> + Parsetree.signature_item
val class_ : - ?loc:loc -> + ?loc:loc -> Parsetree.class_description list -> Parsetree.signature_item
val class_type : - ?loc:loc -> + ?loc:loc -> Parsetree.class_type_declaration list -> Parsetree.signature_item
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.signature_item
\ No newline at end of file + Parsetree.signature_item
diff --git a/ocaml/Ast_helper/Str/index.html b/ocaml/Ast_helper/Str/index.html index 53531f9..34e8976 100644 --- a/ocaml/Ast_helper/Str/index.html +++ b/ocaml/Ast_helper/Str/index.html @@ -1,42 +1,42 @@ -Str (ocaml.Ast_helper.Str)

Module Ast_helper.Str

Structure items

val eval : - ?loc:loc -> - ?attrs:Parsetree.attributes -> +Str (ocaml.Ast_helper.Str)

Module Ast_helper.Str

Structure items

val value : - ?loc:loc -> + ?loc:loc -> Asttypes.rec_flag -> Parsetree.value_binding list -> Parsetree.structure_item
val primitive : - ?loc:loc -> + ?loc:loc -> Parsetree.value_description -> Parsetree.structure_item
val type_extension : - ?loc:loc -> + ?loc:loc -> Parsetree.type_extension -> Parsetree.structure_item
val exception_ : - ?loc:loc -> + ?loc:loc -> Parsetree.type_exception -> - Parsetree.structure_item
val rec_module : - ?loc:loc -> + Parsetree.structure_item
val rec_module : + ?loc:loc -> Parsetree.module_binding list -> Parsetree.structure_item
val modtype : - ?loc:loc -> + ?loc:loc -> Parsetree.module_type_declaration -> - Parsetree.structure_item
val class_ : - ?loc:loc -> + Parsetree.structure_item
val class_type : - ?loc:loc -> + ?loc:loc -> Parsetree.class_type_declaration list -> Parsetree.structure_item
val include_ : - ?loc:loc -> + ?loc:loc -> Parsetree.include_declaration -> Parsetree.structure_item
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> - Parsetree.structure_item
\ No newline at end of file + Parsetree.structure_item
diff --git a/ocaml/Ast_helper/Te/index.html b/ocaml/Ast_helper/Te/index.html index 7fa742f..97ac8ae 100644 --- a/ocaml/Ast_helper/Te/index.html +++ b/ocaml/Ast_helper/Te/index.html @@ -1,39 +1,39 @@ -Te (ocaml.Ast_helper.Te)

Module Ast_helper.Te

Type extensions

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?params: +Te (ocaml.Ast_helper.Te)

Module Ast_helper.Te

Type extensions

val mk_exception : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> Parsetree.extension_constructor -> Parsetree.type_exception
val constructor : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?info:Docstrings.info -> + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> str -> Parsetree.extension_constructor_kind -> Parsetree.extension_constructor
val decl : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?info:Docstrings.info -> - ?vars:str list -> - ?args:Parsetree.constructor_arguments -> - ?res:Parsetree.core_type -> + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> + ?vars:str list -> + ?args:Parsetree.constructor_arguments -> + ?res:Parsetree.core_type -> str -> Parsetree.extension_constructor
val rebind : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?info:Docstrings.info -> + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?info:Docstrings.info -> str -> lid -> - Parsetree.extension_constructor
\ No newline at end of file + Parsetree.extension_constructor
diff --git a/ocaml/Ast_helper/Typ/index.html b/ocaml/Ast_helper/Typ/index.html index 68b9888..b76440d 100644 --- a/ocaml/Ast_helper/Typ/index.html +++ b/ocaml/Ast_helper/Typ/index.html @@ -1,59 +1,59 @@ -Typ (ocaml.Ast_helper.Typ)

Module Ast_helper.Typ

Type expressions

val mk : - ?loc:loc -> - ?attrs:attrs -> +Typ (ocaml.Ast_helper.Typ)

Module Ast_helper.Typ

Type expressions

val mk : + ?loc:loc -> + ?attrs:attrs -> Parsetree.core_type_desc -> - Parsetree.core_type
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.core_type
val var : ?loc:loc -> ?attrs:attrs -> string -> Parsetree.core_type
val arrow : - ?loc:loc -> - ?attrs:attrs -> + Parsetree.core_type
val any : ?loc:loc -> ?attrs:attrs -> unit -> Parsetree.core_type
val var : ?loc:loc -> ?attrs:attrs -> string -> Parsetree.core_type
val tuple : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.core_type list -> Parsetree.core_type
val constr : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.core_type
val object_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.object_field list -> Asttypes.closed_flag -> Parsetree.core_type
val class_ : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> Parsetree.core_type list -> Parsetree.core_type
val alias : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.core_type -> string -> Parsetree.core_type
val variant : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.row_field list -> Asttypes.closed_flag -> Asttypes.label list option -> Parsetree.core_type
val poly : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> str list -> Parsetree.core_type -> Parsetree.core_type
val package : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> lid -> (lid * Parsetree.core_type) list -> Parsetree.core_type
val extension : - ?loc:loc -> - ?attrs:attrs -> + ?loc:loc -> + ?attrs:attrs -> Parsetree.extension -> Parsetree.core_type
val varify_constructors : str list -> Parsetree.core_type -> - Parsetree.core_type

varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

  • since 4.05
\ No newline at end of file + Parsetree.core_type

varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

  • since 4.05
diff --git a/ocaml/Ast_helper/Type/index.html b/ocaml/Ast_helper/Type/index.html index 39267a1..4b88bf8 100644 --- a/ocaml/Ast_helper/Type/index.html +++ b/ocaml/Ast_helper/Type/index.html @@ -1,29 +1,29 @@ -Type (ocaml.Ast_helper.Type)

Module Ast_helper.Type

Type declarations

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> - ?params: +Type (ocaml.Ast_helper.Type)

Module Ast_helper.Type

Type declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?params: (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> - ?cstrs:(Parsetree.core_type * Parsetree.core_type * loc) list -> - ?kind:Parsetree.type_kind -> - ?priv:Asttypes.private_flag -> - ?manifest:Parsetree.core_type -> + ?cstrs:(Parsetree.core_type * Parsetree.core_type * loc) list -> + ?kind:Parsetree.type_kind -> + ?priv:Asttypes.private_flag -> + ?manifest:Parsetree.core_type -> str -> Parsetree.type_declaration
val constructor : - ?loc:loc -> - ?attrs:attrs -> - ?info:Docstrings.info -> - ?vars:str list -> - ?args:Parsetree.constructor_arguments -> - ?res:Parsetree.core_type -> + ?loc:loc -> + ?attrs:attrs -> + ?info:Docstrings.info -> + ?vars:str list -> + ?args:Parsetree.constructor_arguments -> + ?res:Parsetree.core_type -> str -> Parsetree.constructor_declaration
val field : - ?loc:loc -> - ?attrs:attrs -> - ?info:Docstrings.info -> - ?mut:Asttypes.mutable_flag -> + ?loc:loc -> + ?attrs:attrs -> + ?info:Docstrings.info -> + ?mut:Asttypes.mutable_flag -> str -> Parsetree.core_type -> - Parsetree.label_declaration
\ No newline at end of file + Parsetree.label_declaration
diff --git a/ocaml/Ast_helper/Val/index.html b/ocaml/Ast_helper/Val/index.html index f71954d..a435034 100644 --- a/ocaml/Ast_helper/Val/index.html +++ b/ocaml/Ast_helper/Val/index.html @@ -1,9 +1,9 @@ -Val (ocaml.Ast_helper.Val)

Module Ast_helper.Val

Value declarations

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?prim:string list -> +Val (ocaml.Ast_helper.Val)

Module Ast_helper.Val

Value declarations

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?prim:string list -> str -> Parsetree.core_type -> - Parsetree.value_description
\ No newline at end of file + Parsetree.value_description
diff --git a/ocaml/Ast_helper/Vb/index.html b/ocaml/Ast_helper/Vb/index.html index a583a7b..7eaa87d 100644 --- a/ocaml/Ast_helper/Vb/index.html +++ b/ocaml/Ast_helper/Vb/index.html @@ -1,10 +1,10 @@ -Vb (ocaml.Ast_helper.Vb)

Module Ast_helper.Vb

Value bindings

val mk : - ?loc:loc -> - ?attrs:attrs -> - ?docs:Docstrings.docs -> - ?text:Docstrings.text -> - ?value_constraint:Parsetree.value_constraint -> +Vb (ocaml.Ast_helper.Vb)

Module Ast_helper.Vb

Value bindings

val mk : + ?loc:loc -> + ?attrs:attrs -> + ?docs:Docstrings.docs -> + ?text:Docstrings.text -> + ?value_constraint:Parsetree.value_constraint -> Parsetree.pattern -> Parsetree.expression -> - Parsetree.value_binding
\ No newline at end of file + Parsetree.value_binding
diff --git a/ocaml/Ast_helper/index.html b/ocaml/Ast_helper/index.html index f168fda..539283d 100644 --- a/ocaml/Ast_helper/index.html +++ b/ocaml/Ast_helper/index.html @@ -1,2 +1,2 @@ -Ast_helper (ocaml.Ast_helper)

Module Ast_helper

Helpers to produce Parsetree fragments

Warning This module is unstable and part of compiler-libs.

type 'a with_loc = 'a Location.loc
type loc = Location.t
type str = string with_loc
type str_opt = string option with_loc
type attrs = Parsetree.attribute list

Default locations

val default_loc : loc ref

Default value for all optional location arguments.

val with_default_loc : loc -> (unit -> 'a) -> 'a

Set the default_loc within the scope of the execution of the provided function.

Constants

module Const : sig ... end
module Attr : sig ... end

Core language

module Typ : sig ... end

Type expressions

module Pat : sig ... end

Patterns

module Exp : sig ... end

Expressions

module Val : sig ... end

Value declarations

module Type : sig ... end

Type declarations

module Te : sig ... end

Type extensions

Module language

module Mty : sig ... end

Module type expressions

module Mod : sig ... end

Module expressions

module Sig : sig ... end

Signature items

module Str : sig ... end

Structure items

module Md : sig ... end

Module declarations

module Ms : sig ... end

Module substitutions

module Mtd : sig ... end

Module type declarations

module Mb : sig ... end

Module bindings

module Opn : sig ... end

Opens

module Incl : sig ... end

Includes

module Vb : sig ... end

Value bindings

Class language

module Cty : sig ... end

Class type expressions

module Ctf : sig ... end

Class type fields

module Cl : sig ... end

Class expressions

module Cf : sig ... end

Class fields

module Ci : sig ... end

Classes

module Csig : sig ... end

Class signatures

module Cstr : sig ... end

Class structures

module Rf : sig ... end

Row fields

module Of : sig ... end

Object fields

\ No newline at end of file +Ast_helper (ocaml.Ast_helper)

Module Ast_helper

Helpers to produce Parsetree fragments

Warning This module is unstable and part of compiler-libs.

type 'a with_loc = 'a Location.loc
type loc = Location.t
type str = string with_loc
type str_opt = string option with_loc
type attrs = Parsetree.attribute list

Default locations

val default_loc : loc ref

Default value for all optional location arguments.

val with_default_loc : loc -> (unit -> 'a) -> 'a

Set the default_loc within the scope of the execution of the provided function.

Constants

module Const : sig ... end
module Attr : sig ... end

Core language

module Typ : sig ... end

Type expressions

module Pat : sig ... end

Patterns

module Exp : sig ... end

Expressions

module Val : sig ... end

Value declarations

module Type : sig ... end

Type declarations

module Te : sig ... end

Type extensions

Module language

module Mty : sig ... end

Module type expressions

module Mod : sig ... end

Module expressions

module Sig : sig ... end

Signature items

module Str : sig ... end

Structure items

module Md : sig ... end

Module declarations

module Ms : sig ... end

Module substitutions

module Mtd : sig ... end

Module type declarations

module Mb : sig ... end

Module bindings

module Opn : sig ... end

Opens

module Incl : sig ... end

Includes

module Vb : sig ... end

Value bindings

Class language

module Cty : sig ... end

Class type expressions

module Ctf : sig ... end

Class type fields

module Cl : sig ... end

Class expressions

module Cf : sig ... end

Class fields

module Ci : sig ... end

Classes

module Csig : sig ... end

Class signatures

module Cstr : sig ... end

Class structures

module Rf : sig ... end

Row fields

module Of : sig ... end

Object fields

diff --git a/ocaml/Ast_invariants/index.html b/ocaml/Ast_invariants/index.html index 0b16057..a41f269 100644 --- a/ocaml/Ast_invariants/index.html +++ b/ocaml/Ast_invariants/index.html @@ -1,2 +1,2 @@ -Ast_invariants (ocaml.Ast_invariants)

Module Ast_invariants

Check AST invariants

Warning: this module is unstable and part of compiler-libs.

val structure : Parsetree.structure -> unit
val signature : Parsetree.signature -> unit
\ No newline at end of file +Ast_invariants (ocaml.Ast_invariants)

Module Ast_invariants

Check AST invariants

Warning: this module is unstable and part of compiler-libs.

val structure : Parsetree.structure -> unit
val signature : Parsetree.signature -> unit
diff --git a/ocaml/Ast_iterator/index.html b/ocaml/Ast_iterator/index.html index 1d292f9..08c19e8 100644 --- a/ocaml/Ast_iterator/index.html +++ b/ocaml/Ast_iterator/index.html @@ -1,6 +1,6 @@ -Ast_iterator (ocaml.Ast_iterator)

Module Ast_iterator

Ast_iterator.iterator enables AST inspection using open recursion. A typical mapper would be based on Ast_iterator.default_iterator, a trivial iterator, and will fall back on it for handling the syntax it does not modify.

Warning: this module is unstable and part of compiler-libs.

A generic Parsetree iterator

type iterator = {
  1. attribute : iterator -> Parsetree.attribute -> unit;
  2. attributes : iterator -> Parsetree.attribute list -> unit;
  3. binding_op : iterator -> Parsetree.binding_op -> unit;
  4. case : iterator -> Parsetree.case -> unit;
  5. cases : iterator -> Parsetree.case list -> unit;
  6. class_declaration : iterator -> Parsetree.class_declaration -> unit;
  7. class_description : iterator -> Parsetree.class_description -> unit;
  8. class_expr : iterator -> Parsetree.class_expr -> unit;
  9. class_field : iterator -> Parsetree.class_field -> unit;
  10. class_signature : iterator -> Parsetree.class_signature -> unit;
  11. class_structure : iterator -> Parsetree.class_structure -> unit;
  12. class_type : iterator -> Parsetree.class_type -> unit;
  13. class_type_declaration : iterator -> Parsetree.class_type_declaration -> unit;
  14. class_type_field : iterator -> Parsetree.class_type_field -> unit;
  15. constructor_declaration : iterator -> +Ast_iterator (ocaml.Ast_iterator)

    Module Ast_iterator

    Ast_iterator.iterator enables AST inspection using open recursion. A typical mapper would be based on Ast_iterator.default_iterator, a trivial iterator, and will fall back on it for handling the syntax it does not modify.

    Warning: this module is unstable and part of compiler-libs.

    A generic Parsetree iterator

    type iterator = {
    1. attribute : iterator -> Parsetree.attribute -> unit;
    2. attributes : iterator -> Parsetree.attribute list -> unit;
    3. binding_op : iterator -> Parsetree.binding_op -> unit;
    4. case : iterator -> Parsetree.case -> unit;
    5. cases : iterator -> Parsetree.case list -> unit;
    6. class_declaration : iterator -> Parsetree.class_declaration -> unit;
    7. class_description : iterator -> Parsetree.class_description -> unit;
    8. class_expr : iterator -> Parsetree.class_expr -> unit;
    9. class_field : iterator -> Parsetree.class_field -> unit;
    10. class_signature : iterator -> Parsetree.class_signature -> unit;
    11. class_structure : iterator -> Parsetree.class_structure -> unit;
    12. class_type : iterator -> Parsetree.class_type -> unit;
    13. class_type_declaration : iterator -> Parsetree.class_type_declaration -> unit;
    14. class_type_field : iterator -> Parsetree.class_type_field -> unit;
    15. constructor_declaration : iterator -> Parsetree.constructor_declaration -> unit;
    16. expr : iterator -> Parsetree.expression -> unit;
    17. extension : iterator -> Parsetree.extension -> unit;
    18. extension_constructor : iterator -> Parsetree.extension_constructor -> unit;
    19. include_declaration : iterator -> Parsetree.include_declaration -> unit;
    20. include_description : iterator -> Parsetree.include_description -> unit;
    21. label_declaration : iterator -> Parsetree.label_declaration -> unit;
    22. location : iterator -> Location.t -> unit;
    23. module_binding : iterator -> Parsetree.module_binding -> unit;
    24. module_declaration : iterator -> Parsetree.module_declaration -> unit;
    25. module_substitution : iterator -> Parsetree.module_substitution -> unit;
    26. module_expr : iterator -> Parsetree.module_expr -> unit;
    27. module_type : iterator -> Parsetree.module_type -> unit;
    28. module_type_declaration : iterator -> Parsetree.module_type_declaration -> - unit;
    29. open_declaration : iterator -> Parsetree.open_declaration -> unit;
    30. open_description : iterator -> Parsetree.open_description -> unit;
    31. pat : iterator -> Parsetree.pattern -> unit;
    32. payload : iterator -> Parsetree.payload -> unit;
    33. signature : iterator -> Parsetree.signature -> unit;
    34. signature_item : iterator -> Parsetree.signature_item -> unit;
    35. structure : iterator -> Parsetree.structure -> unit;
    36. structure_item : iterator -> Parsetree.structure_item -> unit;
    37. typ : iterator -> Parsetree.core_type -> unit;
    38. row_field : iterator -> Parsetree.row_field -> unit;
    39. object_field : iterator -> Parsetree.object_field -> unit;
    40. type_declaration : iterator -> Parsetree.type_declaration -> unit;
    41. type_extension : iterator -> Parsetree.type_extension -> unit;
    42. type_exception : iterator -> Parsetree.type_exception -> unit;
    43. type_kind : iterator -> Parsetree.type_kind -> unit;
    44. value_binding : iterator -> Parsetree.value_binding -> unit;
    45. value_description : iterator -> Parsetree.value_description -> unit;
    46. with_constraint : iterator -> Parsetree.with_constraint -> unit;
    }

    A iterator record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the iterator to be applied to children in the syntax tree.

    val default_iterator : iterator

    A default iterator, which implements a "do not do anything" mapping.

    \ No newline at end of file + unit;
  16. open_declaration : iterator -> Parsetree.open_declaration -> unit;
  17. open_description : iterator -> Parsetree.open_description -> unit;
  18. pat : iterator -> Parsetree.pattern -> unit;
  19. payload : iterator -> Parsetree.payload -> unit;
  20. signature : iterator -> Parsetree.signature -> unit;
  21. signature_item : iterator -> Parsetree.signature_item -> unit;
  22. structure : iterator -> Parsetree.structure -> unit;
  23. structure_item : iterator -> Parsetree.structure_item -> unit;
  24. typ : iterator -> Parsetree.core_type -> unit;
  25. row_field : iterator -> Parsetree.row_field -> unit;
  26. object_field : iterator -> Parsetree.object_field -> unit;
  27. type_declaration : iterator -> Parsetree.type_declaration -> unit;
  28. type_extension : iterator -> Parsetree.type_extension -> unit;
  29. type_exception : iterator -> Parsetree.type_exception -> unit;
  30. type_kind : iterator -> Parsetree.type_kind -> unit;
  31. value_binding : iterator -> Parsetree.value_binding -> unit;
  32. value_description : iterator -> Parsetree.value_description -> unit;
  33. with_constraint : iterator -> Parsetree.with_constraint -> unit;
}

A iterator record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the iterator to be applied to children in the syntax tree.

val default_iterator : iterator

A default iterator, which implements a "do not do anything" mapping.

diff --git a/ocaml/Ast_mapper/index.html b/ocaml/Ast_mapper/index.html index 2e07856..21a2776 100644 --- a/ocaml/Ast_mapper/index.html +++ b/ocaml/Ast_mapper/index.html @@ -1,5 +1,5 @@ -Ast_mapper (ocaml.Ast_mapper)

Module Ast_mapper

The interface of a -ppx rewriter

A -ppx rewriter is a program that accepts a serialized abstract syntax tree and outputs another, possibly modified, abstract syntax tree. This module encapsulates the interface between the compiler and the -ppx rewriters, handling such details as the serialization format, forwarding of command-line flags, and storing state.

mapper enables AST rewriting using open recursion. A typical mapper would be based on default_mapper, a deep identity mapper, and will fall back on it for handling the syntax it does not modify. For example:

open Asttypes
+Ast_mapper (ocaml.Ast_mapper)

Module Ast_mapper

The interface of a -ppx rewriter

A -ppx rewriter is a program that accepts a serialized abstract syntax tree and outputs another, possibly modified, abstract syntax tree. This module encapsulates the interface between the compiler and the -ppx rewriters, handling such details as the serialization format, forwarding of command-line flags, and storing state.

mapper enables AST rewriting using open recursion. A typical mapper would be based on default_mapper, a deep identity mapper, and will fall back on it for handling the syntax it does not modify. For example:

open Asttypes
 open Parsetree
 open Ast_mapper
 
@@ -12,7 +12,7 @@ let test_mapper argv =
       | other -> default_mapper.expr mapper other; }
 
 let () =
-  register "ppx_test" test_mapper

This -ppx rewriter, which replaces [%test] in expressions with the constant 42, can be compiled using ocamlc -o ppx_test -I +compiler-libs ocamlcommon.cma ppx_test.ml.

Warning: this module is unstable and part of compiler-libs.

A generic Parsetree mapper

type mapper = {
  1. attribute : mapper -> Parsetree.attribute -> Parsetree.attribute;
  2. attributes : mapper -> Parsetree.attribute list -> Parsetree.attribute list;
  3. binding_op : mapper -> Parsetree.binding_op -> Parsetree.binding_op;
  4. case : mapper -> Parsetree.case -> Parsetree.case;
  5. cases : mapper -> Parsetree.case list -> Parsetree.case list;
  6. class_declaration : mapper -> + register "ppx_test" test_mapper

This -ppx rewriter, which replaces [%test] in expressions with the constant 42, can be compiled using ocamlc -o ppx_test -I +compiler-libs ocamlcommon.cma ppx_test.ml.

Warning: this module is unstable and part of compiler-libs.

A generic Parsetree mapper

A mapper record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the mapper to be applied to children in the syntax tree.

val default_mapper : mapper

A default mapper, which implements a "deep identity" mapping.

Apply mappers to compilation units

val tool_name : unit -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ... Some global variables that reflect command-line options are automatically synchronized between the calling tool and the ppx preprocessor: Clflags.include_dirs, Load_path, Clflags.open_modules, Clflags.for_package, Clflags.debug.

val apply : source:string -> target:string -> mapper -> unit

Apply a mapper (parametrized by the unit name) to a dumped parsetree found in the source file and put the result in the target file. The structure or signature field of the mapper is applied to the implementation or interface.

val run_main : (string list -> mapper) -> unit

Entry point to call to implement a standalone -ppx rewriter from a mapper, parametrized by the command line arguments. The current unit name can be obtained from Location.input_name. This function implements proper error reporting for uncaught exceptions.

Registration API

val register_function : (string -> (string list -> mapper) -> unit) ref
val register : string -> (string list -> mapper) -> unit

Apply the register_function. The default behavior is to run the mapper immediately, taking arguments from the process command line. This is to support a scenario where a mapper is linked as a stand-alone executable.

It is possible to overwrite the register_function to define "-ppx drivers", which combine several mappers in a single process. Typically, a driver starts by defining register_function to a custom implementation, then lets ppx rewriters (linked statically or dynamically) register themselves, and then run all or some of them. It is also possible to have -ppx drivers apply rewriters to only specific parts of an AST.

The first argument to register is a symbolic name to be used by the ppx driver.

Convenience functions to write mappers

val map_opt : ('a -> 'b) -> 'a option -> 'b option
val extension_of_error : Location.error -> Parsetree.extension

Encode an error into an 'ocaml.error' extension node which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the error.

val attribute_of_warning : Location.t -> string -> Parsetree.attribute

Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

Helper functions to call external mappers

val add_ppx_context_str : - tool_name:string -> + Parsetree.with_constraint;}

A mapper record implements one "method" per syntactic category, using an open recursion style: each method takes as its first argument the mapper to be applied to children in the syntax tree.

val default_mapper : mapper

A default mapper, which implements a "deep identity" mapping.

Apply mappers to compilation units

val tool_name : unit -> string

Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ... Some global variables that reflect command-line options are automatically synchronized between the calling tool and the ppx preprocessor: Clflags.include_dirs, Load_path, Clflags.open_modules, Clflags.for_package, Clflags.debug.

val apply : source:string -> target:string -> mapper -> unit

Apply a mapper (parametrized by the unit name) to a dumped parsetree found in the source file and put the result in the target file. The structure or signature field of the mapper is applied to the implementation or interface.

val run_main : (string list -> mapper) -> unit

Entry point to call to implement a standalone -ppx rewriter from a mapper, parametrized by the command line arguments. The current unit name can be obtained from Location.input_name. This function implements proper error reporting for uncaught exceptions.

Registration API

val register_function : (string -> (string list -> mapper) -> unit) ref
val register : string -> (string list -> mapper) -> unit

Apply the register_function. The default behavior is to run the mapper immediately, taking arguments from the process command line. This is to support a scenario where a mapper is linked as a stand-alone executable.

It is possible to overwrite the register_function to define "-ppx drivers", which combine several mappers in a single process. Typically, a driver starts by defining register_function to a custom implementation, then lets ppx rewriters (linked statically or dynamically) register themselves, and then run all or some of them. It is also possible to have -ppx drivers apply rewriters to only specific parts of an AST.

The first argument to register is a symbolic name to be used by the ppx driver.

Convenience functions to write mappers

val map_opt : ('a -> 'b) -> 'a option -> 'b option
val extension_of_error : Location.error -> Parsetree.extension

Encode an error into an 'ocaml.error' extension node which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the error.

val attribute_of_warning : Location.t -> string -> Parsetree.attribute

Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

Helper functions to call external mappers

val add_ppx_context_str : + tool_name:string -> Parsetree.structure -> Parsetree.structure

Extract information from the current environment and encode it into an attribute which is prepended to the list of structure items in order to pass the information to an external processor.

val add_ppx_context_sig : - tool_name:string -> + tool_name:string -> Parsetree.signature -> Parsetree.signature

Same as add_ppx_context_str, but for signatures.

val drop_ppx_context_str : - restore:bool -> + restore:bool -> Parsetree.structure -> Parsetree.structure

Drop the ocaml.ppx.context attribute from a structure. If restore is true, also restore the associated data in the current process.

val drop_ppx_context_sig : - restore:bool -> + restore:bool -> Parsetree.signature -> - Parsetree.signature

Same as drop_ppx_context_str, but for signatures.

Cookies

Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

\ No newline at end of file + Parsetree.signature

Same as drop_ppx_context_str, but for signatures.

Cookies

Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

diff --git a/ocaml/Asttypes/index.html b/ocaml/Asttypes/index.html index 3f33140..2f9ddd5 100644 --- a/ocaml/Asttypes/index.html +++ b/ocaml/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ocaml.Asttypes)

Module Asttypes

Auxiliary AST types used by parsetree and typedtree.

Warning: this module is unstable and part of compiler-libs.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
\ No newline at end of file +Asttypes (ocaml.Asttypes)

Module Asttypes

Auxiliary AST types used by parsetree and typedtree.

Warning: this module is unstable and part of compiler-libs.

type constant =
  1. | Const_int of int
  2. | Const_char of char
  3. | Const_string of string * Location.t * string option
  4. | Const_float of string
  5. | Const_int32 of int32
  6. | Const_int64 of int64
  7. | Const_nativeint of nativeint
type rec_flag =
  1. | Nonrecursive
  2. | Recursive
type direction_flag =
  1. | Upto
  2. | Downto
type private_flag =
  1. | Private
  2. | Public
type mutable_flag =
  1. | Immutable
  2. | Mutable
type virtual_flag =
  1. | Virtual
  2. | Concrete
type override_flag =
  1. | Override
  2. | Fresh
type closed_flag =
  1. | Closed
  2. | Open
type label = string
type arg_label =
  1. | Nolabel
  2. | Labelled of string
    (*

    label:T -> ...

    *)
  3. | Optional of string
    (*

    ?label:T -> ...

    *)
type 'a loc = 'a Location.loc = {
  1. txt : 'a;
  2. loc : Location.t;
}
type variance =
  1. | Covariant
  2. | Contravariant
  3. | NoVariance
type injectivity =
  1. | Injective
  2. | NoInjectivity
diff --git a/ocaml/Attr_helper/index.html b/ocaml/Attr_helper/index.html index b58f190..d7ac411 100644 --- a/ocaml/Attr_helper/index.html +++ b/ocaml/Attr_helper/index.html @@ -1,5 +1,5 @@ -Attr_helper (ocaml.Attr_helper)

Module Attr_helper

Helpers for attributes

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | Multiple_attributes of string
  2. | No_payload_expected of string
val get_no_payload_attribute : +Attr_helper (ocaml.Attr_helper)

Module Attr_helper

Helpers for attributes

Warning: this module is unstable and part of compiler-libs.

type error =
  1. | Multiple_attributes of string
  2. | No_payload_expected of string
val get_no_payload_attribute : string list -> Parsetree.attributes -> - string Asttypes.loc option

The string list argument of the following functions is a list of alternative names for the attribute we are looking for. For instance:

["foo"; "ocaml.foo"]
val has_no_payload_attribute : string list -> Parsetree.attributes -> bool
exception Error of Location.t * error
val report_error : Stdlib.Format.formatter -> error -> unit
\ No newline at end of file + string Asttypes.loc option

The string list argument of the following functions is a list of alternative names for the attribute we are looking for. For instance:

  ["foo"; "ocaml.foo"]
val has_no_payload_attribute : string list -> Parsetree.attributes -> bool
exception Error of Location.t * error
val report_error : Stdlib.Format.formatter -> error -> unit
diff --git a/ocaml/Augment_specialised_args/Definition/index.html b/ocaml/Augment_specialised_args/Definition/index.html index 682fda5..6105d9f 100644 --- a/ocaml/Augment_specialised_args/Definition/index.html +++ b/ocaml/Augment_specialised_args/Definition/index.html @@ -1,2 +1,2 @@ -Definition (ocaml.Augment_specialised_args.Definition)

Module Augment_specialised_args.Definition

type t =
  1. | Existing_inner_free_var of Variable.t
  2. | Projection_from_existing_specialised_arg of Projection.t
\ No newline at end of file +Definition (ocaml.Augment_specialised_args.Definition)

Module Augment_specialised_args.Definition

type t =
  1. | Existing_inner_free_var of Variable.t
  2. | Projection_from_existing_specialised_arg of Projection.t
diff --git a/ocaml/Augment_specialised_args/Make/argument-1-_/index.html b/ocaml/Augment_specialised_args/Make/argument-1-_/index.html index 7eeff48..13f6330 100644 --- a/ocaml/Augment_specialised_args/Make/argument-1-_/index.html +++ b/ocaml/Augment_specialised_args/Make/argument-1-_/index.html @@ -1,5 +1,5 @@ -_ (ocaml.Augment_specialised_args.Make._)

Parameter Make._

val pass_name : string
val what_to_specialise : - env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - What_to_specialise.t
\ No newline at end of file +_ (ocaml.Augment_specialised_args.Make._)

Parameter Make._

val pass_name : string
val what_to_specialise : + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + What_to_specialise.t
diff --git a/ocaml/Augment_specialised_args/Make/index.html b/ocaml/Augment_specialised_args/Make/index.html index c2a74b9..e4ec4cc 100644 --- a/ocaml/Augment_specialised_args/Make/index.html +++ b/ocaml/Augment_specialised_args/Make/index.html @@ -1,11 +1,11 @@ -Make (ocaml.Augment_specialised_args.Make)

Module Augment_specialised_args.Make

Parameters

module _ : S

Signature

val rewrite_set_of_closures : - env:Inline_and_simplify_aux.Env.t -> - duplicate_function: - (env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - fun_var:Variable.t -> - new_fun_var:Variable.t -> +Make (ocaml.Augment_specialised_args.Make)

Module Augment_specialised_args.Make

Parameters

module _ : S

Signature

val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> - set_of_closures:Flambda.set_of_closures -> - (Flambda.expr * Inlining_cost.Benefit.t) option

duplicate_function should be Inline_and_simplify.duplicate_function.

\ No newline at end of file + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option

duplicate_function should be Inline_and_simplify.duplicate_function.

diff --git a/ocaml/Augment_specialised_args/What_to_specialise/index.html b/ocaml/Augment_specialised_args/What_to_specialise/index.html index 23c34cb..07541a9 100644 --- a/ocaml/Augment_specialised_args/What_to_specialise/index.html +++ b/ocaml/Augment_specialised_args/What_to_specialise/index.html @@ -1,7 +1,7 @@ -What_to_specialise (ocaml.Augment_specialised_args.What_to_specialise)

Module Augment_specialised_args.What_to_specialise

type t
val create : set_of_closures:Flambda.set_of_closures -> t
val new_specialised_arg : +What_to_specialise (ocaml.Augment_specialised_args.What_to_specialise)

Module Augment_specialised_args.What_to_specialise

type t
val create : set_of_closures:Flambda.set_of_closures -> t
val new_specialised_arg : t -> - fun_var:Variable.t -> - group:Variable.t -> - definition:Definition.t -> - t
val make_direct_call_surrogate_for : t -> fun_var:Variable.t -> t
\ No newline at end of file + fun_var:Variable.t -> + group:Variable.t -> + definition:Definition.t -> + t
val make_direct_call_surrogate_for : t -> fun_var:Variable.t -> t
diff --git a/ocaml/Augment_specialised_args/index.html b/ocaml/Augment_specialised_args/index.html index 2d3af26..9354e84 100644 --- a/ocaml/Augment_specialised_args/index.html +++ b/ocaml/Augment_specialised_args/index.html @@ -1,2 +1,2 @@ -Augment_specialised_args (ocaml.Augment_specialised_args)

Module Augment_specialised_args

Helper module for adding specialised arguments to sets of closures.

module Definition : sig ... end
module What_to_specialise : sig ... end
module type S = sig ... end
module Make (_ : S) : sig ... end
\ No newline at end of file +Augment_specialised_args (ocaml.Augment_specialised_args)

Module Augment_specialised_args

Helper module for adding specialised arguments to sets of closures.

module Definition : sig ... end
module What_to_specialise : sig ... end
module type S = sig ... end
module Make (_ : S) : sig ... end
diff --git a/ocaml/Augment_specialised_args/module-type-S/index.html b/ocaml/Augment_specialised_args/module-type-S/index.html index 00be235..2a72f02 100644 --- a/ocaml/Augment_specialised_args/module-type-S/index.html +++ b/ocaml/Augment_specialised_args/module-type-S/index.html @@ -1,5 +1,5 @@ -S (ocaml.Augment_specialised_args.S)

Module type Augment_specialised_args.S

val pass_name : string
val what_to_specialise : - env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - What_to_specialise.t
\ No newline at end of file +S (ocaml.Augment_specialised_args.S)

Module type Augment_specialised_args.S

val pass_name : string
val what_to_specialise : + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + What_to_specialise.t
diff --git a/ocaml/Backend_intf/index.html b/ocaml/Backend_intf/index.html index a620336..e6766fc 100644 --- a/ocaml/Backend_intf/index.html +++ b/ocaml/Backend_intf/index.html @@ -1,2 +1,2 @@ -Backend_intf (ocaml.Backend_intf)

Module Backend_intf

Knowledge that the middle end needs about the backend.

module type S = sig ... end
\ No newline at end of file +Backend_intf (ocaml.Backend_intf)

Module Backend_intf

Knowledge that the middle end needs about the backend.

module type S = sig ... end
diff --git a/ocaml/Backend_intf/module-type-S/index.html b/ocaml/Backend_intf/module-type-S/index.html index d841eb9..5044d6f 100644 --- a/ocaml/Backend_intf/module-type-S/index.html +++ b/ocaml/Backend_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Backend_intf.S)

Module type Backend_intf.S

val symbol_for_global' : Ident.t -> Symbol.t

Compute the symbol for the given identifier.

val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

If the given approximation is that of a symbol (Value_symbol) or an external (Value_extern), attempt to find a more informative approximation from a previously-written compilation artifact. In the native code backend, for example, this might consult a .cmx file.

val import_symbol : Symbol.t -> Simple_value_approx.t
val closure_symbol : Closure_id.t -> Symbol.t
val size_int : int

The natural size of an integer on the target architecture (cf. Arch.size_int in the native code backend).

val big_endian : bool

true iff the target architecture is big endian.

val max_sensible_number_of_arguments : int

The maximum number of arguments that is reasonable for a function to have. This should be fewer than the threshold that causes non-self tail call optimization to be inhibited (in particular, if it would entail passing arguments on the stack; see Selectgen).

\ No newline at end of file +S (ocaml.Backend_intf.S)

Module type Backend_intf.S

val symbol_for_global' : Ident.t -> Symbol.t

Compute the symbol for the given identifier.

val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

If the given approximation is that of a symbol (Value_symbol) or an external (Value_extern), attempt to find a more informative approximation from a previously-written compilation artifact. In the native code backend, for example, this might consult a .cmx file.

val import_symbol : Symbol.t -> Simple_value_approx.t
val closure_symbol : Closure_id.t -> Symbol.t
val size_int : int

The natural size of an integer on the target architecture (cf. Arch.size_int in the native code backend).

val big_endian : bool

true iff the target architecture is big endian.

val max_sensible_number_of_arguments : int

The maximum number of arguments that is reasonable for a function to have. This should be fewer than the threshold that causes non-self tail call optimization to be inhibited (in particular, if it would entail passing arguments on the stack; see Selectgen).

diff --git a/ocaml/Backend_var/Provenance/index.html b/ocaml/Backend_var/Provenance/index.html index 2825db4..420beee 100644 --- a/ocaml/Backend_var/Provenance/index.html +++ b/ocaml/Backend_var/Provenance/index.html @@ -1,6 +1,6 @@ -Provenance (ocaml.Backend_var.Provenance)

Module Backend_var.Provenance

type t
val create : - module_path:Path.t -> - location:Debuginfo.t -> - original_ident:Ident.t -> - t
val module_path : t -> Path.t
val location : t -> Debuginfo.t
val original_ident : t -> Ident.t
val print : Stdlib.Format.formatter -> t -> unit
\ No newline at end of file +Provenance (ocaml.Backend_var.Provenance)

Module Backend_var.Provenance

type t
val create : + module_path:Path.t -> + location:Debuginfo.t -> + original_ident:Ident.t -> + t
val module_path : t -> Path.t
val location : t -> Debuginfo.t
val original_ident : t -> Ident.t
val print : Stdlib.Format.formatter -> t -> unit
diff --git a/ocaml/Backend_var/With_provenance/index.html b/ocaml/Backend_var/With_provenance/index.html index f922c47..f810713 100644 --- a/ocaml/Backend_var/With_provenance/index.html +++ b/ocaml/Backend_var/With_provenance/index.html @@ -1,2 +1,2 @@ -With_provenance (ocaml.Backend_var.With_provenance)

Module Backend_var.With_provenance

type t

Values of type t should be used for variables in binding position.

val print : Stdlib.Format.formatter -> t -> unit
val create : ?provenance:Provenance.t -> backend_var -> t
val var : t -> backend_var
val provenance : t -> Provenance.t option
val name : t -> string
val rename : t -> t
\ No newline at end of file +With_provenance (ocaml.Backend_var.With_provenance)

Module Backend_var.With_provenance

type t

Values of type t should be used for variables in binding position.

val print : Stdlib.Format.formatter -> t -> unit
val create : ?provenance:Provenance.t -> backend_var -> t
val var : t -> backend_var
val provenance : t -> Provenance.t option
val name : t -> string
val rename : t -> t
diff --git a/ocaml/Backend_var/index.html b/ocaml/Backend_var/index.html index c906c07..fc2cb51 100644 --- a/ocaml/Backend_var/index.html +++ b/ocaml/Backend_var/index.html @@ -1,2 +1,2 @@ -Backend_var (ocaml.Backend_var)

Module Backend_var

Variables used in the backend, optionally equipped with "provenance" information, used for the emission of debugging information.

include module type of struct include Ident end
type t = Ident.t
include Identifiable.S with type t := t
module T = Ident.T
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val output : out_channel -> T.t -> unit
val print : Stdlib.Format.formatter -> T.t -> unit
module Set = Ident.Set
module Map = Ident.Map
module Tbl = Ident.Tbl
val print_with_scope : Stdlib.Format.formatter -> t -> unit

Same as print except that it will also add a "n" suffix if the scope of the argument is n.

val create_scoped : scope:int -> string -> t
val create_local : string -> t
val create_persistent : string -> t
val create_predef : string -> t
val rename : t -> t

Creates an identifier with the same name as the input, a fresh stamp, and no scope.

  • raises [Fatal_error]

    if called on a persistent / predef ident.

val name : t -> string
val unique_name : t -> string
val unique_toplevel_name : t -> string
val persistent : t -> bool
val same : t -> t -> bool

Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

val compare : t -> t -> int
val global : t -> bool
val is_predef : t -> bool
val scope : t -> int
val lowest_scope : int
val highest_scope : int
val reinit : unit -> unit
type 'a tbl = 'a Ident.tbl

'a tbl represents association tables from identifiers to values of type 'a.

'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

find_all returns the bindings for all idents of a given name, most recently introduced first.

In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

val empty : 'a tbl
val add : t -> 'a -> 'a tbl -> 'a tbl
val find_same : t -> 'a tbl -> 'a
val find_name : string -> 'a tbl -> t * 'a
val find_all : string -> 'a tbl -> (t * 'a) list
val find_all_seq : string -> 'a tbl -> (t * 'a) Stdlib.Seq.t
val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val iter : (t -> 'a -> unit) -> 'a tbl -> unit
val remove : t -> 'a tbl -> 'a tbl
val make_key_generator : unit -> t -> t
type backend_var = t
module Provenance : sig ... end
module With_provenance : sig ... end
\ No newline at end of file +Backend_var (ocaml.Backend_var)

Module Backend_var

Variables used in the backend, optionally equipped with "provenance" information, used for the emission of debugging information.

include module type of struct include Ident end
type t = Ident.t
include Identifiable.S with type t := t
module T = Ident.T
include Identifiable.Thing with type t := T.t
include Hashtbl.HashedType with type t := T.t
val equal : T.t -> T.t -> bool

The equality predicate used to compare keys.

val hash : T.t -> int

A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

  • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
  • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
  • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
include Map.OrderedType with type t := T.t
val output : out_channel -> T.t -> unit
val print : Stdlib.Format.formatter -> T.t -> unit
module Set = Ident.Set
module Map = Ident.Map
module Tbl = Ident.Tbl
val print_with_scope : Stdlib.Format.formatter -> t -> unit

Same as print except that it will also add a "n" suffix if the scope of the argument is n.

val create_scoped : scope:int -> string -> t
val create_local : string -> t
val create_persistent : string -> t
val create_predef : string -> t
val rename : t -> t

Creates an identifier with the same name as the input, a fresh stamp, and no scope.

  • raises [Fatal_error]

    if called on a persistent / predef ident.

val name : t -> string
val unique_name : t -> string
val unique_toplevel_name : t -> string
val persistent : t -> bool
val same : t -> t -> bool

Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

val compare : t -> t -> int
val global : t -> bool
val is_predef : t -> bool
val scope : t -> int
val lowest_scope : int
val highest_scope : int
val reinit : unit -> unit
type 'a tbl = 'a Ident.tbl

'a tbl represents association tables from identifiers to values of type 'a.

'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

find_all returns the bindings for all idents of a given name, most recently introduced first.

In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

val empty : 'a tbl
val add : t -> 'a -> 'a tbl -> 'a tbl
val find_same : t -> 'a tbl -> 'a
val find_name : string -> 'a tbl -> t * 'a
val find_all : string -> 'a tbl -> (t * 'a) list
val find_all_seq : string -> 'a tbl -> (t * 'a) Stdlib.Seq.t
val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
val iter : (t -> 'a -> unit) -> 'a tbl -> unit
val remove : t -> 'a tbl -> 'a tbl
val make_key_generator : unit -> t -> t
type backend_var = t
module Provenance : sig ... end
module With_provenance : sig ... end
diff --git a/ocaml/Binutils/index.html b/ocaml/Binutils/index.html index ac09dbf..314f742 100644 --- a/ocaml/Binutils/index.html +++ b/ocaml/Binutils/index.html @@ -1,2 +1,2 @@ -Binutils (ocaml.Binutils)

Module Binutils

type error =
  1. | Truncated_file
  2. | Unrecognized of string
  3. | Unsupported of string * int64
  4. | Out_of_range of string
val error_to_string : error -> string
type t
val read : string -> (t, error) Stdlib.Result.t
val defines_symbol : t -> string -> bool
val symbol_offset : t -> string -> int64 option
\ No newline at end of file +Binutils (ocaml.Binutils)

Module Binutils

type error =
  1. | Truncated_file
  2. | Unrecognized of string
  3. | Unsupported of string * int64
  4. | Out_of_range of string
val error_to_string : error -> string
type t
val read : string -> (t, error) Stdlib.Result.t
val defines_symbol : t -> string -> bool
val symbol_offset : t -> string -> int64 option
diff --git a/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html b/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html index b80f24b..b3c3902 100644 --- a/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html +++ b/ocaml/Branch_relaxation/Make/argument-1-T/Cond_branch/index.html @@ -1,2 +1,2 @@ -Cond_branch (ocaml.Branch_relaxation.Make.T.Cond_branch)

Module T.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
\ No newline at end of file +Cond_branch (ocaml.Branch_relaxation.Make.T.Cond_branch)

Module T.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
diff --git a/ocaml/Branch_relaxation/Make/argument-1-T/index.html b/ocaml/Branch_relaxation/Make/argument-1-T/index.html index 865e9c6..f21afb0 100644 --- a/ocaml/Branch_relaxation/Make/argument-1-T/index.html +++ b/ocaml/Branch_relaxation/Make/argument-1-T/index.html @@ -1,5 +1,5 @@ -T (ocaml.Branch_relaxation.Make.T)

Parameter Make.T

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : - num_bytes:int -> - dbginfo:Debuginfo.alloc_dbginfo -> - Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
\ No newline at end of file +T (ocaml.Branch_relaxation.Make.T)

Parameter Make.T

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : + num_bytes:int -> + dbginfo:Debuginfo.alloc_dbginfo -> + Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
diff --git a/ocaml/Branch_relaxation/Make/index.html b/ocaml/Branch_relaxation/Make/index.html index 97a021a..43a936c 100644 --- a/ocaml/Branch_relaxation/Make/index.html +++ b/ocaml/Branch_relaxation/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Branch_relaxation.Make)

Module Branch_relaxation.Make

Parameters

Signature

val relax : Linear.fundecl -> max_out_of_line_code_offset:T.distance -> unit
\ No newline at end of file +Make (ocaml.Branch_relaxation.Make)

Module Branch_relaxation.Make

Parameters

Signature

val relax : Linear.fundecl -> max_out_of_line_code_offset:T.distance -> unit
diff --git a/ocaml/Branch_relaxation/index.html b/ocaml/Branch_relaxation/index.html index 99013b8..d387b2e 100644 --- a/ocaml/Branch_relaxation/index.html +++ b/ocaml/Branch_relaxation/index.html @@ -1,2 +1,2 @@ -Branch_relaxation (ocaml.Branch_relaxation)

Module Branch_relaxation

module Make (T : Branch_relaxation_intf.S) : sig ... end
\ No newline at end of file +Branch_relaxation (ocaml.Branch_relaxation)

Module Branch_relaxation

module Make (T : Branch_relaxation_intf.S) : sig ... end
diff --git a/ocaml/Branch_relaxation_intf/index.html b/ocaml/Branch_relaxation_intf/index.html index 67eb720..8444149 100644 --- a/ocaml/Branch_relaxation_intf/index.html +++ b/ocaml/Branch_relaxation_intf/index.html @@ -1,2 +1,2 @@ -Branch_relaxation_intf (ocaml.Branch_relaxation_intf)

Module Branch_relaxation_intf

module type S = sig ... end
\ No newline at end of file +Branch_relaxation_intf (ocaml.Branch_relaxation_intf)

Module Branch_relaxation_intf

module type S = sig ... end
diff --git a/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html b/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html index 04db6c2..52ab3fd 100644 --- a/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html +++ b/ocaml/Branch_relaxation_intf/module-type-S/Cond_branch/index.html @@ -1,2 +1,2 @@ -Cond_branch (ocaml.Branch_relaxation_intf.S.Cond_branch)

Module S.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
\ No newline at end of file +Cond_branch (ocaml.Branch_relaxation_intf.S.Cond_branch)

Module S.Cond_branch

type t
val all : t list
val max_displacement : t -> distance
val classify_instr : Linear.instruction_desc -> t option
diff --git a/ocaml/Branch_relaxation_intf/module-type-S/index.html b/ocaml/Branch_relaxation_intf/module-type-S/index.html index 5ca18c3..2b7d7b6 100644 --- a/ocaml/Branch_relaxation_intf/module-type-S/index.html +++ b/ocaml/Branch_relaxation_intf/module-type-S/index.html @@ -1,5 +1,5 @@ -S (ocaml.Branch_relaxation_intf.S)

Module type Branch_relaxation_intf.S

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : - num_bytes:int -> - dbginfo:Debuginfo.alloc_dbginfo -> - Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
\ No newline at end of file +S (ocaml.Branch_relaxation_intf.S)

Module type Branch_relaxation_intf.S

type distance = int
module Cond_branch : sig ... end
val offset_pc_at_branch : distance
val relax_allocation : + num_bytes:int -> + dbginfo:Debuginfo.alloc_dbginfo -> + Linear.instruction_desc
val relax_poll : return_label:Cmm.label option -> Linear.instruction_desc
val relax_intop_checkbound : unit -> Linear.instruction_desc
val relax_intop_imm_checkbound : bound:int -> Linear.instruction_desc
diff --git a/ocaml/Btype/For_copy/index.html b/ocaml/Btype/For_copy/index.html index d5b8299..7da7b7d 100644 --- a/ocaml/Btype/For_copy/index.html +++ b/ocaml/Btype/For_copy/index.html @@ -1,2 +1,2 @@ -For_copy (ocaml.Btype.For_copy)

Module Btype.For_copy

type copy_scope
val redirect_desc : copy_scope -> Types.type_expr -> Types.type_desc -> unit
val with_scope : (copy_scope -> 'a) -> 'a
\ No newline at end of file +For_copy (ocaml.Btype.For_copy)

Module Btype.For_copy

type copy_scope
val redirect_desc : copy_scope -> Types.type_expr -> Types.type_desc -> unit
val with_scope : (copy_scope -> 'a) -> 'a
diff --git a/ocaml/Btype/TransientTypeMap/index.html b/ocaml/Btype/TransientTypeMap/index.html index be2d060..fe9fc60 100644 --- a/ocaml/Btype/TransientTypeMap/index.html +++ b/ocaml/Btype/TransientTypeMap/index.html @@ -1,8 +1,8 @@ -TransientTypeMap (ocaml.Btype.TransientTypeMap)

Module Btype.TransientTypeMap

Maps

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : +TransientTypeMap (ocaml.Btype.TransientTypeMap)

Module Btype.TransientTypeMap

Maps

The type of the map keys.

type !+'a t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add : key -> 'a -> 'a t -> 'a t

add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

  • before 4.03

    Physical equality was not ensured.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val singleton : key -> 'a -> 'a t

singleton x y returns the one-element map that contains a binding y for x.

  • since 3.12
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find : key -> 'a t -> 'a

find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
   (fun _k li -> match li with [] -> None | _::tl -> Some tl)
-  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
\ No newline at end of file + m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
diff --git a/ocaml/Btype/TypeHash/index.html b/ocaml/Btype/TypeHash/index.html index 469d740..3d6e3cd 100644 --- a/ocaml/Btype/TypeHash/index.html +++ b/ocaml/Btype/TypeHash/index.html @@ -1,2 +1,2 @@ -TypeHash (ocaml.Btype.TypeHash)

Module Btype.TypeHash

include Hashtbl.S with type key = Types.transient_expr
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
val add : 'a t -> Types.type_expr -> 'a -> unit
val remove : 'a t -> Types.type_expr -> unit
val find : 'a t -> Types.type_expr -> 'a
val iter : (Types.type_expr -> 'a -> unit) -> 'a t -> unit
\ No newline at end of file +TypeHash (ocaml.Btype.TypeHash)

Module Btype.TypeHash

include Hashtbl.S with type key = Types.transient_expr
type !'a t
val create : int -> 'a t
val clear : 'a t -> unit
val reset : 'a t -> unit
  • since 4.00
val copy : 'a t -> 'a t
val find_opt : 'a t -> key -> 'a option
  • since 4.05
val find_all : 'a t -> key -> 'a list
val replace : 'a t -> key -> 'a -> unit
val mem : 'a t -> key -> bool
val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
  • since 4.03
val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
val length : 'a t -> int
val stats : 'a t -> Stdlib.Hashtbl.statistics
  • since 4.00
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
  • since 4.07
val to_seq_keys : _ t -> key Stdlib.Seq.t
  • since 4.07
val to_seq_values : 'a t -> 'a Stdlib.Seq.t
  • since 4.07
val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
  • since 4.07
val add : 'a t -> Types.type_expr -> 'a -> unit
val remove : 'a t -> Types.type_expr -> unit
val find : 'a t -> Types.type_expr -> 'a
val iter : (Types.type_expr -> 'a -> unit) -> 'a t -> unit
diff --git a/ocaml/Btype/TypeMap/index.html b/ocaml/Btype/TypeMap/index.html index 27f422b..a9da7c3 100644 --- a/ocaml/Btype/TypeMap/index.html +++ b/ocaml/Btype/TypeMap/index.html @@ -1,10 +1,10 @@ -TypeMap (ocaml.Btype.TypeMap)

Module Btype.TypeMap

include Map.S +TypeMap (ocaml.Btype.TypeMap)

Module Btype.TypeMap

include Map.S with type key = Types.transient_expr and type 'a t = 'a TransientTypeMap.t

Maps

The type of the map keys.

type 'a t = 'a TransientTypeMap.t

The type of maps from type key to type 'a.

val empty : 'a t

The empty map.

val add_to_list : key -> 'a -> 'a list t -> 'a list t

add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

  • since 5.1
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

  • since 4.06
val remove : key -> 'a t -> 'a t

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

  • before 4.03

    Physical equality was not ensured.

val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
+  'c t

merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

  • since 3.12
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

  • f' _key None None = None
  • f' _key (Some v) None = Some v
  • f' _key None (Some v) = Some v
  • f' key (Some v1) (Some v2) = f key v1 v2
  • since 4.03
val cardinal : 'a t -> int

Return the number of bindings of a map.

  • since 3.12

Bindings

val bindings : 'a t -> (key * 'a) list

Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

  • since 3.12
val min_binding : 'a t -> key * 'a

Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

  • since 3.12
val min_binding_opt : 'a t -> (key * 'a) option

Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

  • since 4.05
val max_binding : 'a t -> key * 'a

Same as min_binding, but returns the binding with the largest key in the given map.

  • since 3.12
val max_binding_opt : 'a t -> (key * 'a) option

Same as min_binding_opt, but returns the binding with the largest key in the given map.

  • since 4.05
val choose : 'a t -> key * 'a

Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 3.12
val choose_opt : 'a t -> (key * 'a) option

Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

  • since 4.05

Searching

val find_opt : key -> 'a t -> 'a option

find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

  • since 4.05
val find_first : (key -> bool) -> 'a t -> key * 'a

find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

  • since 4.05
val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

  • since 4.05
val find_last : (key -> bool) -> 'a t -> key * 'a

find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

  • since 4.05
val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

  • since 4.05

Traversing

val iter : (key -> 'a -> unit) -> 'a t -> unit

iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

Transforming

val map : ('a -> 'b) -> 'a t -> 'b t

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

val filter : (key -> 'a -> bool) -> 'a t -> 'a t

filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

  • since 3.12
  • before 4.03

    Physical equality was not ensured.

val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

  • if f k v is None then k is not in the result,
  • if f k v is Some v' then the binding (k, v') is in the output map.

For example, the following function on maps whose values are lists

filter_map
   (fun _k li -> match li with [] -> None | _::tl -> Some tl)
-  m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val add : Types.type_expr -> 'a -> 'a t -> 'a t
val find : Types.type_expr -> 'a t -> 'a
val singleton : Types.type_expr -> 'a -> 'a t
val fold : (Types.type_expr -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
\ No newline at end of file + m

drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

  • since 4.11
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

  • since 3.12
val split : key -> 'a t -> 'a t * 'a option * 'a t

split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

  • since 3.12

Predicates and comparisons

val is_empty : 'a t -> bool

Test whether a map is empty or not.

val mem : key -> 'a t -> bool

mem x m returns true if m contains a binding for x, and false otherwise.

val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

val for_all : (key -> 'a -> bool) -> 'a t -> bool

for_all f m checks if all the bindings of the map satisfy the predicate f.

  • since 3.12
val exists : (key -> 'a -> bool) -> 'a t -> bool

exists f m checks if at least one binding of the map satisfies the predicate f.

  • since 3.12

Converting

val to_list : 'a t -> (key * 'a) list

to_list m is bindings m.

  • since 5.1
val of_list : (key * 'a) list -> 'a t

of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

  • since 5.1
val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

Iterate on the whole map, in ascending order of keys

  • since 4.07
val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

Iterate on the whole map, in descending order of keys

  • since 4.12
val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

  • since 4.07
val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

Add the given bindings to the map, in order.

  • since 4.07
val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

Build a map from the given bindings

  • since 4.07
val add : Types.type_expr -> 'a -> 'a t -> 'a t
val find : Types.type_expr -> 'a t -> 'a
val singleton : Types.type_expr -> 'a -> 'a t
val fold : (Types.type_expr -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
diff --git a/ocaml/Btype/TypePairs/index.html b/ocaml/Btype/TypePairs/index.html index 3099592..a7becb1 100644 --- a/ocaml/Btype/TypePairs/index.html +++ b/ocaml/Btype/TypePairs/index.html @@ -1,2 +1,2 @@ -TypePairs (ocaml.Btype.TypePairs)

Module Btype.TypePairs

type t
val create : int -> t
val clear : t -> unit
val add : t -> (Types.type_expr * Types.type_expr) -> unit
val mem : t -> (Types.type_expr * Types.type_expr) -> bool
val iter : ((Types.type_expr * Types.type_expr) -> unit) -> t -> unit
\ No newline at end of file +TypePairs (ocaml.Btype.TypePairs)

Module Btype.TypePairs

type t
val create : int -> t
val clear : t -> unit
val add : t -> (Types.type_expr * Types.type_expr) -> unit
val mem : t -> (Types.type_expr * Types.type_expr) -> bool
val iter : ((Types.type_expr * Types.type_expr) -> unit) -> t -> unit
diff --git a/ocaml/Btype/TypeSet/index.html b/ocaml/Btype/TypeSet/index.html index 6943fca..1c4aeb0 100644 --- a/ocaml/Btype/TypeSet/index.html +++ b/ocaml/Btype/TypeSet/index.html @@ -1,3 +1,2 @@ -TypeSet (ocaml.Btype.TypeSet)

Module Btype.TypeSet

include Set.S with type elt = Types.transient_expr

Sets

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Stdlib.Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Stdlib.Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given bindings

  • since 4.07
val add : Types.type_expr -> t -> t
val mem : Types.type_expr -> t -> bool
val singleton : Types.type_expr -> t
val exists : (Types.type_expr -> bool) -> t -> bool
val elements : t -> Types.type_expr list
\ No newline at end of file +TypeSet (ocaml.Btype.TypeSet)

Module Btype.TypeSet

include Set.S with type elt = Types.transient_expr

Sets

The type of the set elements.

type t

The type of sets.

val empty : t

The empty set.

val remove : elt -> t -> t

remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val union : t -> t -> t

Set union.

val inter : t -> t -> t

Set intersection.

val disjoint : t -> t -> bool

Test if two sets are disjoint.

  • since 4.08
val diff : t -> t -> t

Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

val cardinal : t -> int

Return the number of elements of a set.

Elements

val min_elt : t -> elt

Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

val min_elt_opt : t -> elt option

Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

  • since 4.05
val max_elt : t -> elt

Same as min_elt, but returns the largest element of the given set.

val max_elt_opt : t -> elt option

Same as min_elt_opt, but returns the largest element of the given set.

  • since 4.05
val choose : t -> elt

Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

val choose_opt : t -> elt option

Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

  • since 4.05

Searching

val find : elt -> t -> elt

find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

  • since 4.01
val find_opt : elt -> t -> elt option

find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

  • since 4.05
val find_first : (elt -> bool) -> t -> elt

find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

  • since 4.05
val find_first_opt : (elt -> bool) -> t -> elt option

find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

  • since 4.05
val find_last : (elt -> bool) -> t -> elt

find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

  • since 4.05
val find_last_opt : (elt -> bool) -> t -> elt option

find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

  • since 4.05

Traversing

val iter : (elt -> unit) -> t -> unit

iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

Transforming

val map : (elt -> elt) -> t -> t

map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

  • since 4.04
val filter : (elt -> bool) -> t -> t

filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

  • before 4.03

    Physical equality was not ensured.

val filter_map : (elt -> elt option) -> t -> t

filter_map f s returns the set of all v such that f x = Some v for some element x of s.

For example,

filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

is the set of halves of the even elements of s.

If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

  • since 4.11
val partition : (elt -> bool) -> t -> t * t

partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

val split : elt -> t -> t * bool * t

split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

Predicates and comparisons

val is_empty : t -> bool

Test whether a set is empty or not.

val equal : t -> t -> bool

equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

val compare : t -> t -> int

Total ordering between sets. Can be used as the ordering function for doing sets of sets.

val subset : t -> t -> bool

subset s1 s2 tests whether the set s1 is a subset of the set s2.

val for_all : (elt -> bool) -> t -> bool

for_all f s checks if all elements of the set satisfy the predicate f.

Converting

val to_list : t -> elt list

to_list s is elements s.

  • since 5.1
val of_list : elt list -> t

of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

  • since 4.02
val to_seq_from : elt -> t -> elt Stdlib.Seq.t

to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

  • since 4.07
val to_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in ascending order

  • since 4.07
val to_rev_seq : t -> elt Stdlib.Seq.t

Iterate on the whole set, in descending order

  • since 4.12
val add_seq : elt Stdlib.Seq.t -> t -> t

Add the given elements to the set, in order.

  • since 4.07
val of_seq : elt Stdlib.Seq.t -> t

Build a set from the given bindings

  • since 4.07
val add : Types.type_expr -> t -> t
val mem : Types.type_expr -> t -> bool
val singleton : Types.type_expr -> t
val exists : (Types.type_expr -> bool) -> t -> bool
val elements : t -> Types.type_expr list
diff --git a/ocaml/Btype/index.html b/ocaml/Btype/index.html index 7f686f0..a941758 100644 --- a/ocaml/Btype/index.html +++ b/ocaml/Btype/index.html @@ -1,8 +1,8 @@ -Btype (ocaml.Btype)

Module Btype

module TypeSet : sig ... end
module TypeMap : sig ... end
module TypeHash : sig ... end
module TypePairs : sig ... end
val generic_level : int
val newgenvar : ?name:string -> unit -> Types.type_expr
val newgenstub : scope:int -> Types.type_expr
val is_Tvar : Types.type_expr -> bool
val is_Tunivar : Types.type_expr -> bool
val is_Tconstr : Types.type_expr -> bool
val dummy_method : Asttypes.label
val is_fixed : Types.row_desc -> bool
val has_fixed_explanation : Types.row_desc -> bool
val fixed_explanation : Types.row_desc -> Types.fixed_explanation option
val merge_fixed_explanation : +Btype (ocaml.Btype)

Module Btype

module TypeSet : sig ... end
module TypeMap : sig ... end
module TypeHash : sig ... end
module TypePairs : sig ... end
val generic_level : int
val newgenvar : ?name:string -> unit -> Types.type_expr
val newgenstub : scope:int -> Types.type_expr
val is_Tvar : Types.type_expr -> bool
val is_Tunivar : Types.type_expr -> bool
val is_Tconstr : Types.type_expr -> bool
val dummy_method : Asttypes.label
val is_fixed : Types.row_desc -> bool
val has_fixed_explanation : Types.row_desc -> bool
val fixed_explanation : Types.row_desc -> Types.fixed_explanation option
val merge_fixed_explanation : Types.fixed_explanation option -> Types.fixed_explanation option -> - Types.fixed_explanation option
val static_row : Types.row_desc -> bool
val hash_variant : Asttypes.label -> int
val row_of_type : Types.type_expr -> Types.type_expr
val has_constr_row : Types.type_expr -> bool
val is_row_name : string -> bool
val is_constr_row : allow_ident:bool -> Types.type_expr -> bool
val set_static_row_name : Types.type_declaration -> Path.t -> unit
val iter_type_expr : (Types.type_expr -> unit) -> Types.type_expr -> unit
val fold_type_expr : + Types.fixed_explanation option
val static_row : Types.row_desc -> bool
val hash_variant : Asttypes.label -> int
val row_of_type : Types.type_expr -> Types.type_expr
val has_constr_row : Types.type_expr -> bool
val is_row_name : string -> bool
val is_constr_row : allow_ident:bool -> Types.type_expr -> bool
val set_static_row_name : Types.type_declaration -> Path.t -> unit
val iter_type_expr : (Types.type_expr -> unit) -> Types.type_expr -> unit
val fold_type_expr : ('a -> Types.type_expr -> 'a) -> 'a -> Types.type_expr -> @@ -20,7 +20,7 @@ unit;
  • it_module_declaration : type_iterators -> Types.module_declaration -> unit;
  • it_modtype_declaration : type_iterators -> Types.modtype_declaration -> unit;
  • it_class_declaration : type_iterators -> Types.class_declaration -> unit;
  • it_class_type_declaration : type_iterators -> Types.class_type_declaration -> unit;
  • it_functor_param : type_iterators -> Types.functor_parameter -> unit;
  • it_module_type : type_iterators -> Types.module_type -> unit;
  • it_class_type : type_iterators -> Types.class_type -> unit;
  • it_type_kind : type_iterators -> Types.type_decl_kind -> unit;
  • it_do_type_expr : type_iterators -> Types.type_expr -> unit;
  • it_type_expr : type_iterators -> Types.type_expr -> unit;
  • it_path : Path.t -> unit;
  • }
    val type_iterators : type_iterators
    val unmark_iterators : type_iterators
    val copy_type_desc : - ?keep_names:bool -> + ?keep_names:bool -> (Types.type_expr -> Types.type_expr) -> Types.type_desc -> Types.type_desc
    val copy_row : @@ -49,4 +49,4 @@ Types.class_type
    val self_type_row : Types.class_type -> Types.type_expr
    val methods : Types.class_signature -> string list
    val virtual_methods : Types.class_signature -> string list
    val concrete_methods : Types.class_signature -> Types.MethSet.t
    val public_methods : Types.class_signature -> string list
    val instance_vars : Types.class_signature -> string list
    val virtual_instance_vars : Types.class_signature -> string list
    val concrete_instance_vars : Types.class_signature -> Types.VarSet.t
    val instance_variable_type : Asttypes.label -> Types.class_signature -> - Types.type_expr
    val print_raw : (Stdlib.Format.formatter -> Types.type_expr -> unit) ref
    val cstr_type_path : Types.constructor_description -> Path.t
    \ No newline at end of file + Types.type_expr
    val print_raw : (Stdlib.Format.formatter -> Types.type_expr -> unit) ref
    val cstr_type_path : Types.constructor_description -> Path.t
    diff --git a/ocaml/Build_export_info/index.html b/ocaml/Build_export_info/index.html index 8e80c97..bc354ae 100644 --- a/ocaml/Build_export_info/index.html +++ b/ocaml/Build_export_info/index.html @@ -1,5 +1,5 @@ -Build_export_info (ocaml.Build_export_info)

    Module Build_export_info

    Construct export information, for emission into .cmx files, from an Flambda program.

    val build_transient : - backend:(module Backend_intf.S) -> +Build_export_info (ocaml.Build_export_info)

    Module Build_export_info

    Construct export information, for emission into .cmx files, from an Flambda program.

    val build_transient : + backend:(module Backend_intf.S) -> Flambda.program -> - Export_info.transient
    \ No newline at end of file + Export_info.transient
    diff --git a/ocaml/Build_path_prefix_map/index.html b/ocaml/Build_path_prefix_map/index.html index 9e5ebc2..3592655 100644 --- a/ocaml/Build_path_prefix_map/index.html +++ b/ocaml/Build_path_prefix_map/index.html @@ -1,2 +1,2 @@ -Build_path_prefix_map (ocaml.Build_path_prefix_map)

    Module Build_path_prefix_map

    Rewrite paths for reproducible builds

    Warning: this module is unstable and part of compiler-libs.

    See the BUILD_PATH_PREFIX_MAP spec

    type path = string
    type path_prefix = string
    type error_message = string
    val encode_prefix : path_prefix -> string
    val decode_prefix : string -> (path_prefix, error_message) result
    type pair = {
    1. target : path_prefix;
    2. source : path_prefix;
    }
    val encode_pair : pair -> string
    val decode_pair : string -> (pair, error_message) result
    type map = pair option list
    val encode_map : map -> string
    val decode_map : string -> (map, error_message) result
    val rewrite_first : map -> path -> path option

    rewrite_first map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.

    val rewrite_all : map -> path -> path list

    rewrite_all map path finds all sources in map that are a prefix of the input path. For each matching source, in priority order, it replaces this prefix with the corresponding target and adds the result to the returned list. If there are no matches, it just returns [].

    val rewrite : map -> path -> path

    rewrite path uses rewrite_first to try to find a mapping for path. If found, it returns that, otherwise it just returns path.

    \ No newline at end of file +Build_path_prefix_map (ocaml.Build_path_prefix_map)

    Module Build_path_prefix_map

    Rewrite paths for reproducible builds

    Warning: this module is unstable and part of compiler-libs.

    See the BUILD_PATH_PREFIX_MAP spec

    type path = string
    type path_prefix = string
    type error_message = string
    val encode_prefix : path_prefix -> string
    val decode_prefix : string -> (path_prefix, error_message) result
    type pair = {
    1. target : path_prefix;
    2. source : path_prefix;
    }
    val encode_pair : pair -> string
    val decode_pair : string -> (pair, error_message) result
    type map = pair option list
    val encode_map : map -> string
    val decode_map : string -> (map, error_message) result
    val rewrite_first : map -> path -> path option

    rewrite_first map path tries to find a source in map that is a prefix of the input path. If it succeeds, it replaces this prefix with the corresponding target. If it fails, it just returns None.

    val rewrite_all : map -> path -> path list

    rewrite_all map path finds all sources in map that are a prefix of the input path. For each matching source, in priority order, it replaces this prefix with the corresponding target and adds the result to the returned list. If there are no matches, it just returns [].

    val rewrite : map -> path -> path

    rewrite path uses rewrite_first to try to find a mapping for path. If found, it returns that, otherwise it just returns path.

    diff --git a/ocaml/Builtin_attributes/index.html b/ocaml/Builtin_attributes/index.html index 14fcb7f..c79816b 100644 --- a/ocaml/Builtin_attributes/index.html +++ b/ocaml/Builtin_attributes/index.html @@ -1,7 +1,7 @@ -Builtin_attributes (ocaml.Builtin_attributes)

    Module Builtin_attributes

    Support for some of the builtin attributes

    • ocaml.deprecated
    • ocaml.alert
    • ocaml.error
    • ocaml.ppwarning
    • ocaml.warning
    • ocaml.warnerror
    • ocaml.explicit_arity (for camlp4/camlp5)
    • ocaml.warn_on_literal_pattern
    • ocaml.deprecated_mutable
    • ocaml.immediate
    • ocaml.immediate64
    • ocaml.boxed / ocaml.unboxed

    Warning: this module is unstable and part of compiler-libs.

    val check_alerts : Location.t -> Parsetree.attributes -> string -> unit
    val check_alerts_inclusion : - def:Location.t -> - use:Location.t -> +Builtin_attributes (ocaml.Builtin_attributes)

    Module Builtin_attributes

    Support for some of the builtin attributes

    • ocaml.deprecated
    • ocaml.alert
    • ocaml.error
    • ocaml.ppwarning
    • ocaml.warning
    • ocaml.warnerror
    • ocaml.explicit_arity (for camlp4/camlp5)
    • ocaml.warn_on_literal_pattern
    • ocaml.deprecated_mutable
    • ocaml.immediate
    • ocaml.immediate64
    • ocaml.boxed / ocaml.unboxed

    Warning: this module is unstable and part of compiler-libs.

    val check_alerts : Location.t -> Parsetree.attributes -> string -> unit
    val check_alerts_inclusion : + def:Location.t -> + use:Location.t -> Location.t -> Parsetree.attributes -> Parsetree.attributes -> @@ -11,14 +11,14 @@ Parsetree.attributes -> string -> unit
    val check_deprecated_mutable_inclusion : - def:Location.t -> - use:Location.t -> + def:Location.t -> + use:Location.t -> Location.t -> Parsetree.attributes -> Parsetree.attributes -> string -> - unit
    val check_no_alert : Parsetree.attributes -> unit
    val error_of_extension : Parsetree.extension -> Location.error
    val warning_attribute : ?ppwarning:bool -> Parsetree.attribute -> unit

    Apply warning settings from the specified attribute. "ocaml.warning"/"ocaml.warnerror" (and variants without the prefix) are processed and other attributes are ignored.

    Also implement ocaml.ppwarning (unless ~ppwarning:false is passed).

    val warning_scope : - ?ppwarning:bool -> + unit
    val check_no_alert : Parsetree.attributes -> unit
    val error_of_extension : Parsetree.extension -> Location.error
    val warning_attribute : ?ppwarning:bool -> Parsetree.attribute -> unit

    Apply warning settings from the specified attribute. "ocaml.warning"/"ocaml.warnerror" (and variants without the prefix) are processed and other attributes are ignored.

    Also implement ocaml.ppwarning (unless ~ppwarning:false is passed).

    val warning_scope : + ?ppwarning:bool -> Parsetree.attributes -> (unit -> 'a) -> - 'a

    Execute a function in a new scope for warning settings. This means that the effect of any call to warning_attribute during the execution of this function will be discarded after execution.

    The function also takes a list of attributes which are processed with warning_attribute in the fresh scope before the function is executed.

    val warn_on_literal_pattern : Parsetree.attributes -> bool
    val explicit_arity : Parsetree.attributes -> bool
    val immediate : Parsetree.attributes -> bool
    val immediate64 : Parsetree.attributes -> bool
    val has_unboxed : Parsetree.attributes -> bool
    val has_boxed : Parsetree.attributes -> bool
    \ No newline at end of file + 'a

    Execute a function in a new scope for warning settings. This means that the effect of any call to warning_attribute during the execution of this function will be discarded after execution.

    The function also takes a list of attributes which are processed with warning_attribute in the fresh scope before the function is executed.

    val warn_on_literal_pattern : Parsetree.attributes -> bool
    val explicit_arity : Parsetree.attributes -> bool
    val immediate : Parsetree.attributes -> bool
    val immediate64 : Parsetree.attributes -> bool
    val has_unboxed : Parsetree.attributes -> bool
    val has_boxed : Parsetree.attributes -> bool
    diff --git a/ocaml/Bytegen/index.html b/ocaml/Bytegen/index.html index d820339..197c4c5 100644 --- a/ocaml/Bytegen/index.html +++ b/ocaml/Bytegen/index.html @@ -1,5 +1,5 @@ -Bytegen (ocaml.Bytegen)

    Module Bytegen

    val compile_implementation : +Bytegen (ocaml.Bytegen)

    Module Bytegen

    val compile_implementation : string -> Lambda.lambda -> Instruct.instruction list
    val compile_phrase : @@ -7,4 +7,4 @@ Instruct.instruction list * Instruct.instruction list
    \ No newline at end of file + Instruct.debug_event
    diff --git a/ocaml/Bytelibrarian/index.html b/ocaml/Bytelibrarian/index.html index a59e4a2..9c75304 100644 --- a/ocaml/Bytelibrarian/index.html +++ b/ocaml/Bytelibrarian/index.html @@ -1,2 +1,2 @@ -Bytelibrarian (ocaml.Bytelibrarian)

    Module Bytelibrarian

    val create_archive : string list -> string -> unit
    type error =
    1. | File_not_found of string
    2. | Not_an_object_file of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    val reset : unit -> unit
    \ No newline at end of file +Bytelibrarian (ocaml.Bytelibrarian)

    Module Bytelibrarian

    val create_archive : string list -> string -> unit
    type error =
    1. | File_not_found of string
    2. | Not_an_object_file of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    val reset : unit -> unit
    diff --git a/ocaml/Bytelink/Dep/index.html b/ocaml/Bytelink/Dep/index.html index 34da074..5bb7311 100644 --- a/ocaml/Bytelink/Dep/index.html +++ b/ocaml/Bytelink/Dep/index.html @@ -1,2 +1,2 @@ -Dep (ocaml.Bytelink.Dep)

    Module Bytelink.Dep

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +Dep (ocaml.Bytelink.Dep)

    Module Bytelink.Dep

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Bytelink/DepSet/index.html b/ocaml/Bytelink/DepSet/index.html index 16358df..f302804 100644 --- a/ocaml/Bytelink/DepSet/index.html +++ b/ocaml/Bytelink/DepSet/index.html @@ -1,3 +1,2 @@ -DepSet (ocaml.Bytelink.DepSet)

    Module Bytelink.DepSet

    Sets

    type elt = Dep.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +DepSet (ocaml.Bytelink.DepSet)

    Module Bytelink.DepSet

    Sets

    type elt = Dep.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Bytelink/index.html b/ocaml/Bytelink/index.html index 5b29879..c48074b 100644 --- a/ocaml/Bytelink/index.html +++ b/ocaml/Bytelink/index.html @@ -1,2 +1,2 @@ -Bytelink (ocaml.Bytelink)

    Module Bytelink

    module DepSet : Set.S with type elt = Dep.t
    val reset : unit -> unit
    val check_consistency : Misc.filepath -> Cmo_format.compilation_unit -> unit
    val extract_crc_interfaces : unit -> Misc.crcs
    type error =
    1. | File_not_found of Misc.filepath
    2. | Not_an_object_file of Misc.filepath
    3. | Wrong_object_name of Misc.filepath
    4. | Symbol_error of Misc.filepath * Symtable.error
    5. | Inconsistent_import of Misc.modname * Misc.filepath * Misc.filepath
    6. | Custom_runtime
    7. | File_exists of Misc.filepath
    8. | Cannot_open_dll of Misc.filepath
    9. | Required_module_unavailable of Misc.modname * Misc.modname
    10. | Camlheader of string * Misc.filepath
    11. | Multiple_definition of Misc.modname * Misc.filepath * Misc.filepath
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file +Bytelink (ocaml.Bytelink)

    Module Bytelink

    module DepSet : Set.S with type elt = Dep.t
    val reset : unit -> unit
    val check_consistency : Misc.filepath -> Cmo_format.compilation_unit -> unit
    val extract_crc_interfaces : unit -> Misc.crcs
    type error =
    1. | File_not_found of Misc.filepath
    2. | Not_an_object_file of Misc.filepath
    3. | Wrong_object_name of Misc.filepath
    4. | Symbol_error of Misc.filepath * Symtable.error
    5. | Inconsistent_import of Misc.modname * Misc.filepath * Misc.filepath
    6. | Custom_runtime
    7. | File_exists of Misc.filepath
    8. | Cannot_open_dll of Misc.filepath
    9. | Required_module_unavailable of Misc.modname * Misc.modname
    10. | Camlheader of string * Misc.filepath
    11. | Multiple_definition of Misc.modname * Misc.filepath * Misc.filepath
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Bytepackager/index.html b/ocaml/Bytepackager/index.html index 60be35e..93b4991 100644 --- a/ocaml/Bytepackager/index.html +++ b/ocaml/Bytepackager/index.html @@ -1,7 +1,7 @@ -Bytepackager (ocaml.Bytepackager)

    Module Bytepackager

    val package_files : - ppf_dump:Stdlib.Format.formatter -> +Bytepackager (ocaml.Bytepackager)

    Module Bytepackager

    val package_files : + ppf_dump:Stdlib.Format.formatter -> Env.t -> string list -> string -> - unit
    type error =
    1. | Forward_reference of string * Ident.t
    2. | Multiple_definition of string * Ident.t
    3. | Not_an_object_file of string
    4. | Illegal_renaming of string * string * string
    5. | File_not_found of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file + unit
    type error =
    1. | Forward_reference of string * Ident.t
    2. | Multiple_definition of string * Ident.t
    3. | Not_an_object_file of string
    4. | Illegal_renaming of string * string * string
    5. | File_not_found of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Bytesections/Name/index.html b/ocaml/Bytesections/Name/index.html index 7bb264b..ac2e091 100644 --- a/ocaml/Bytesections/Name/index.html +++ b/ocaml/Bytesections/Name/index.html @@ -1,2 +1,2 @@ -Name (ocaml.Bytesections.Name)

    Module Bytesections.Name

    type raw_name = private string
    type t =
    1. | CODE
      (*

      bytecode

      *)
    2. | CRCS
      (*

      crcs for modules

      *)
    3. | DATA
      (*

      global data (constant)

      *)
    4. | DBUG
      (*

      debug info

      *)
    5. | DLLS
      (*

      dll names

      *)
    6. | DLPT
      (*

      dll paths

      *)
    7. | PRIM
      (*

      primitives names

      *)
    8. | RNTM
      (*

      The path to the bytecode interpreter (use_runtime mode)

      *)
    9. | SYMB
      (*

      global identifiers

      *)
    10. | Other of raw_name
    val of_string : string -> t
    • raises Invalid_argument

      if the input is not of size 4

    val to_string : t -> string
    \ No newline at end of file +Name (ocaml.Bytesections.Name)

    Module Bytesections.Name

    type raw_name = private string
    type t =
    1. | CODE
      (*

      bytecode

      *)
    2. | CRCS
      (*

      crcs for modules

      *)
    3. | DATA
      (*

      global data (constant)

      *)
    4. | DBUG
      (*

      debug info

      *)
    5. | DLLS
      (*

      dll names

      *)
    6. | DLPT
      (*

      dll paths

      *)
    7. | PRIM
      (*

      primitives names

      *)
    8. | RNTM
      (*

      The path to the bytecode interpreter (use_runtime mode)

      *)
    9. | SYMB
      (*

      global identifiers

      *)
    10. | Other of raw_name
    val of_string : string -> t
    • raises Invalid_argument

      if the input is not of size 4

    val to_string : t -> string
    diff --git a/ocaml/Bytesections/index.html b/ocaml/Bytesections/index.html index 112a7ba..ab531f8 100644 --- a/ocaml/Bytesections/index.html +++ b/ocaml/Bytesections/index.html @@ -1,2 +1,2 @@ -Bytesections (ocaml.Bytesections)

    Module Bytesections

    module Name : sig ... end

    Recording sections written to a bytecode executable file

    type toc_writer
    val init_record : out_channel -> toc_writer

    Start recording sections from the current position in out_channel

    val record : toc_writer -> Name.t -> unit

    Record the current position in the out_channel as the end of the section with the given name.

    val write_toc_and_trailer : toc_writer -> unit

    Write the table of contents and the standard trailer for bytecode executable files

    Reading sections from a bytecode executable file

    type section_entry = {
    1. name : Name.t;
      (*

      name of the section.

      *)
    2. pos : int;
      (*

      byte offset at which the section starts.

      *)
    3. len : int;
      (*

      length of the section.

      *)
    }
    type section_table
    exception Bad_magic_number
    val read_toc : in_channel -> section_table

    Read the table of sections from a bytecode executable. Raise Bad_magic_number if magic number doesn't match

    val seek_section : section_table -> in_channel -> Name.t -> int

    Position the input channel at the beginning of the section named "name", and return the length of that section. Raise Not_found if no such section exists.

    val read_section_string : section_table -> in_channel -> Name.t -> string

    Return the contents of a section, as a string.

    val read_section_struct : section_table -> in_channel -> Name.t -> 'a

    Return the contents of a section, as marshalled data.

    val all : section_table -> section_entry list

    Returns all section_entry from a section_table in increasing position order.

    val pos_first_section : section_table -> int

    Return the position of the beginning of the first section

    \ No newline at end of file +Bytesections (ocaml.Bytesections)

    Module Bytesections

    module Name : sig ... end

    Recording sections written to a bytecode executable file

    type toc_writer
    val init_record : out_channel -> toc_writer

    Start recording sections from the current position in out_channel

    val record : toc_writer -> Name.t -> unit

    Record the current position in the out_channel as the end of the section with the given name.

    val write_toc_and_trailer : toc_writer -> unit

    Write the table of contents and the standard trailer for bytecode executable files

    Reading sections from a bytecode executable file

    type section_entry = {
    1. name : Name.t;
      (*

      name of the section.

      *)
    2. pos : int;
      (*

      byte offset at which the section starts.

      *)
    3. len : int;
      (*

      length of the section.

      *)
    }
    type section_table
    exception Bad_magic_number
    val read_toc : in_channel -> section_table

    Read the table of sections from a bytecode executable. Raise Bad_magic_number if magic number doesn't match

    val seek_section : section_table -> in_channel -> Name.t -> int

    Position the input channel at the beginning of the section named "name", and return the length of that section. Raise Not_found if no such section exists.

    val read_section_string : section_table -> in_channel -> Name.t -> string

    Return the contents of a section, as a string.

    val read_section_struct : section_table -> in_channel -> Name.t -> 'a

    Return the contents of a section, as marshalled data.

    val all : section_table -> section_entry list

    Returns all section_entry from a section_table in increasing position order.

    val pos_first_section : section_table -> int

    Return the position of the beginning of the first section

    diff --git a/ocaml/CSE/index.html b/ocaml/CSE/index.html index 511d9d7..7b3466c 100644 --- a/ocaml/CSE/index.html +++ b/ocaml/CSE/index.html @@ -1,2 +1,2 @@ -CSE (ocaml.CSE)

    Module CSE

    Common interface to all architecture-specific CSE modules

    val fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +CSE (ocaml.CSE)

    Module CSE

    Common interface to all architecture-specific CSE modules

    val fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/ocaml/CSEgen/class-cse_generic/index.html b/ocaml/CSEgen/class-cse_generic/index.html index 69124d6..35b495e 100644 --- a/ocaml/CSEgen/class-cse_generic/index.html +++ b/ocaml/CSEgen/class-cse_generic/index.html @@ -1,2 +1,2 @@ -cse_generic (ocaml.CSEgen.cse_generic)

    Class CSEgen.cse_generic

    method class_of_operation : Mach.operation -> op_class
    method is_cheap_operation : Mach.operation -> bool
    method fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +cse_generic (ocaml.CSEgen.cse_generic)

    Class CSEgen.cse_generic

    method class_of_operation : Mach.operation -> op_class
    method is_cheap_operation : Mach.operation -> bool
    method fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/ocaml/CSEgen/index.html b/ocaml/CSEgen/index.html index 19fe773..f7614c6 100644 --- a/ocaml/CSEgen/index.html +++ b/ocaml/CSEgen/index.html @@ -1,2 +1,2 @@ -CSEgen (ocaml.CSEgen)

    Module CSEgen

    type op_class =
    1. | Op_pure
    2. | Op_checkbound
    3. | Op_load of Asttypes.mutable_flag
    4. | Op_store of bool
    5. | Op_other
    class cse_generic : object ... end
    \ No newline at end of file +CSEgen (ocaml.CSEgen)

    Module CSEgen

    type op_class =
    1. | Op_pure
    2. | Op_checkbound
    3. | Op_load of Asttypes.mutable_flag
    4. | Op_store of bool
    5. | Op_other
    class cse_generic : object ... end
    diff --git a/ocaml/CamlinternalFormat/index.html b/ocaml/CamlinternalFormat/index.html index 249d6ad..1c2169b 100644 --- a/ocaml/CamlinternalFormat/index.html +++ b/ocaml/CamlinternalFormat/index.html @@ -1,5 +1,5 @@ -CamlinternalFormat (ocaml.CamlinternalFormat)

    Module CamlinternalFormat

    val is_in_char_set : CamlinternalFormatBasics.char_set -> char -> bool
    val rev_char_set : +CamlinternalFormat (ocaml.CamlinternalFormat)

    Module CamlinternalFormat

    val is_in_char_set : CamlinternalFormatBasics.char_set -> char -> bool
    type mutable_char_set = bytes
    val create_char_set : unit -> mutable_char_set
    val add_in_char_set : mutable_char_set -> char -> unit
    type ('a, 'b, 'c, 'd, 'e, 'f) param_format_ebb =
    1. | Param_format_EBB : ('x -> 'a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt -> ('a, 'b, 'c, 'd, 'e, 'f) @@ -22,7 +22,7 @@ ('x, 'b, 'c, 't, 'u, 'v) CamlinternalFormatBasics.fmt -> ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmtty -> ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.fmt
    val fmt_ebb_of_string : - ?legacy_behavior:bool -> + ?legacy_behavior:bool -> string -> ('b, 'c, 'e, 'f) fmt_ebb
    val format_of_string_fmtty : string -> @@ -50,4 +50,4 @@ ('a1, 'b1, 'c1, 'd1, 'e1, 'f1) CamlinternalFormatBasics.fmt -> ('a1, 'b1, 'c1, 'd1, 'e1, 'f1, 'a2, 'b2, 'c2, 'd2, 'e2, 'f2) CamlinternalFormatBasics.fmtty_rel -> - ('a2, 'b2, 'c2, 'd2, 'e2, 'f2) CamlinternalFormatBasics.fmt
    \ No newline at end of file + ('a2, 'b2, 'c2, 'd2, 'e2, 'f2) CamlinternalFormatBasics.fmt
    diff --git a/ocaml/CamlinternalFormatBasics/index.html b/ocaml/CamlinternalFormatBasics/index.html index 8752577..7596261 100644 --- a/ocaml/CamlinternalFormatBasics/index.html +++ b/ocaml/CamlinternalFormatBasics/index.html @@ -1,5 +1,5 @@ -CamlinternalFormatBasics (ocaml.CamlinternalFormatBasics)

    Module CamlinternalFormatBasics

    type padty =
    1. | Left
    2. | Right
    3. | Zeros
    type int_conv =
    1. | Int_d
    2. | Int_pd
    3. | Int_sd
    4. | Int_i
    5. | Int_pi
    6. | Int_si
    7. | Int_x
    8. | Int_Cx
    9. | Int_X
    10. | Int_CX
    11. | Int_o
    12. | Int_Co
    13. | Int_u
    14. | Int_Cd
    15. | Int_Ci
    16. | Int_Cu
    type float_flag_conv =
    1. | Float_flag_
    2. | Float_flag_p
    3. | Float_flag_s
    type float_kind_conv =
    1. | Float_f
    2. | Float_e
    3. | Float_E
    4. | Float_g
    5. | Float_G
    6. | Float_F
    7. | Float_h
    8. | Float_H
    9. | Float_CF
    type float_conv = float_flag_conv * float_kind_conv
    type char_set = string
    type counter =
    1. | Line_counter
    2. | Char_counter
    3. | Token_counter
    type ('a, 'b) padding =
    1. | No_padding : ('a, 'a) padding
    2. | Lit_padding : padty * int -> ('a, 'a) padding
    3. | Arg_padding : padty -> (int -> 'a, 'a) padding
    type pad_option = int option
    type ('a, 'b) precision =
    1. | No_precision : ('a, 'a) precision
    2. | Lit_precision : int -> ('a, 'a) precision
    3. | Arg_precision : (int -> 'a, 'a) precision
    type prec_option = int option
    type ('a, 'b, 'c) custom_arity =
    1. | Custom_zero : ('a, string, 'a) custom_arity
    2. | Custom_succ : ('a, 'b, 'c) custom_arity -> ('a, 'x -> 'b, 'x -> 'c) +CamlinternalFormatBasics (ocaml.CamlinternalFormatBasics)

      Module CamlinternalFormatBasics

      type padty =
      1. | Left
      2. | Right
      3. | Zeros
      type int_conv =
      1. | Int_d
      2. | Int_pd
      3. | Int_sd
      4. | Int_i
      5. | Int_pi
      6. | Int_si
      7. | Int_x
      8. | Int_Cx
      9. | Int_X
      10. | Int_CX
      11. | Int_o
      12. | Int_Co
      13. | Int_u
      14. | Int_Cd
      15. | Int_Ci
      16. | Int_Cu
      type float_flag_conv =
      1. | Float_flag_
      2. | Float_flag_p
      3. | Float_flag_s
      type float_kind_conv =
      1. | Float_f
      2. | Float_e
      3. | Float_E
      4. | Float_g
      5. | Float_G
      6. | Float_F
      7. | Float_h
      8. | Float_H
      9. | Float_CF
      type float_conv = float_flag_conv * float_kind_conv
      type char_set = string
      type counter =
      1. | Line_counter
      2. | Char_counter
      3. | Token_counter
      type ('a, 'b) padding =
      1. | No_padding : ('a, 'a) padding
      2. | Lit_padding : padty * int -> ('a, 'a) padding
      3. | Arg_padding : padty -> (int -> 'a, 'a) padding
      type pad_option = int option
      type ('a, 'b) precision =
      1. | No_precision : ('a, 'a) precision
      2. | Lit_precision : int -> ('a, 'a) precision
      3. | Arg_precision : (int -> 'a, 'a) precision
      type prec_option = int option
      type ('a, 'b, 'c) custom_arity =
      1. | Custom_zero : ('a, string, 'a) custom_arity
      2. | Custom_succ : ('a, 'b, 'c) custom_arity -> ('a, 'x -> 'b, 'x -> 'c) custom_arity
      type block_type =
      1. | Pp_hbox
      2. | Pp_vbox
      3. | Pp_hvbox
      4. | Pp_hovbox
      5. | Pp_box
      6. | Pp_fits
      type formatting_lit =
      1. | Close_box
      2. | Close_tag
      3. | Break of string * int * int
      4. | FFlush
      5. | Force_newline
      6. | Flush_newline
      7. | Magic_size of string * int
      8. | Escaped_at
      9. | Escaped_percent
      10. | Scan_indic of char
      type ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen =
      1. | Open_tag : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen
      2. | Open_box : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) formatting_gen
      and ('a, 'b, 'c, 'd, 'e, 'f) fmtty = @@ -305,4 +305,4 @@ ('a, 'b, 'c, 'd, 'e, 'f) fmtty
      val concat_fmt : ('a, 'b, 'c, 'd, 'e, 'f) fmt -> ('f, 'b, 'c, 'e, 'g, 'h) fmt -> - ('a, 'b, 'c, 'd, 'g, 'h) fmt
      \ No newline at end of file + ('a, 'b, 'c, 'd, 'g, 'h) fmt
    diff --git a/ocaml/CamlinternalLazy/index.html b/ocaml/CamlinternalLazy/index.html index 4d3efc4..9898e41 100644 --- a/ocaml/CamlinternalLazy/index.html +++ b/ocaml/CamlinternalLazy/index.html @@ -1,2 +1,2 @@ -CamlinternalLazy (ocaml.CamlinternalLazy)

    Module CamlinternalLazy

    Run-time support for lazy values. All functions in this module are for system use only, not for the casual user.

    type 'a t = 'a lazy_t
    exception Undefined
    val force_lazy_block : 'a lazy_t -> 'a
    val force_gen : only_val:bool -> 'a lazy_t -> 'a
    \ No newline at end of file +CamlinternalLazy (ocaml.CamlinternalLazy)

    Module CamlinternalLazy

    Run-time support for lazy values. All functions in this module are for system use only, not for the casual user.

    type 'a t = 'a lazy_t
    exception Undefined
    val force_lazy_block : 'a lazy_t -> 'a
    val force_gen : only_val:bool -> 'a lazy_t -> 'a
    diff --git a/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html b/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html index 240c1e4..da817c0 100644 --- a/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html +++ b/ocaml/CamlinternalMenhirLib/Convert/Simplified/index.html @@ -1,8 +1,8 @@ -Simplified (ocaml.CamlinternalMenhirLib.Convert.Simplified)

    Module Convert.Simplified

    val traditional2revised : +Simplified (ocaml.CamlinternalMenhirLib.Convert.Simplified)

    Module Convert.Simplified

    val traditional2revised : ('token, 'semantic_value) traditional -> ('token * Stdlib.Lexing.position * Stdlib.Lexing.position, 'semantic_value) revised
    val revised2traditional : ('token * Stdlib.Lexing.position * Stdlib.Lexing.position, 'semantic_value) revised -> - ('token, 'semantic_value) traditional
    \ No newline at end of file + ('token, 'semantic_value) traditional
    diff --git a/ocaml/CamlinternalMenhirLib/Convert/index.html b/ocaml/CamlinternalMenhirLib/Convert/index.html index 6c87c44..ad11589 100644 --- a/ocaml/CamlinternalMenhirLib/Convert/index.html +++ b/ocaml/CamlinternalMenhirLib/Convert/index.html @@ -1,5 +1,5 @@ -Convert (ocaml.CamlinternalMenhirLib.Convert)

    Module CamlinternalMenhirLib.Convert

    type ('token, 'semantic_value) traditional = +Convert (ocaml.CamlinternalMenhirLib.Convert)

    Module CamlinternalMenhirLib.Convert

    type ('token, 'semantic_value) traditional = (Stdlib.Lexing.lexbuf -> 'token) -> Stdlib.Lexing.lexbuf -> 'semantic_value
    type ('token, 'semantic_value) revised = (unit -> 'token) -> 'semantic_value
    val traditional2revised : @@ -10,4 +10,4 @@ ('token, 'semantic_value) revised
    val revised2traditional : ('raw_token -> Stdlib.Lexing.position -> Stdlib.Lexing.position -> 'token) -> ('token, 'semantic_value) revised -> - ('raw_token, 'semantic_value) traditional
    module Simplified : sig ... end
    \ No newline at end of file + ('raw_token, 'semantic_value) traditional
    module Simplified : sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html b/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html index 609c66b..c912790 100644 --- a/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html +++ b/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/Log/index.html @@ -1,6 +1,6 @@ -Log (ocaml.CamlinternalMenhirLib.Engine.Make.T.Log)

    Module T.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : +Log (ocaml.CamlinternalMenhirLib.Engine.Make.T.Log)

    Module T.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : terminal -> Stdlib.Lexing.position -> Stdlib.Lexing.position -> - unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    \ No newline at end of file + unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html b/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html index 08b0337..dc46230 100644 --- a/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html +++ b/ocaml/CamlinternalMenhirLib/Engine/Make/argument-1-T/index.html @@ -1,5 +1,5 @@ -T (ocaml.CamlinternalMenhirLib.Engine.Make.T)

    Parameter Make.T

    type state
    val number : state -> int
    type token
    type terminal
    type nonterminal
    type semantic_value
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : +T (ocaml.CamlinternalMenhirLib.Engine.Make.T)

    Parameter Make.T

    type state
    val number : state -> int
    type token
    type terminal
    type nonterminal
    type semantic_value
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> @@ -14,4 +14,4 @@ 'env -> 'answer
    val goto_nt : state -> nonterminal -> state
    val goto_prod : state -> production -> state
    val maybe_goto_nt : state -> nonterminal -> state option
    val is_start : production -> bool
    exception Error
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    \ No newline at end of file + (state, semantic_value) EngineTypes.stack
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/Engine/Make/index.html b/ocaml/CamlinternalMenhirLib/Engine/Make/index.html index ec6c336..471a1ac 100644 --- a/ocaml/CamlinternalMenhirLib/Engine/Make/index.html +++ b/ocaml/CamlinternalMenhirLib/Engine/Make/index.html @@ -1,5 +1,5 @@ -Make (ocaml.CamlinternalMenhirLib.Engine.Make)

    Module Engine.Make

    Parameters

    Signature

    include EngineTypes.MONOLITHIC_ENGINE +Make (ocaml.CamlinternalMenhirLib.Engine.Make)

    Module Engine.Make

    Parameters

    Signature

    include EngineTypes.MONOLITHIC_ENGINE with type state = T.state with type token = T.token with type semantic_value = T.semantic_value
    type state = T.state
    type token = T.token
    type semantic_value = T.semantic_value
    exception Error
    val entry : @@ -14,12 +14,12 @@ with type 'a env = (T.state, T.semantic_value, T.token) EngineTypes.env
    type production = T.production
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = + 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -37,4 +37,4 @@ IncrementalEngine.position * IncrementalEngine.position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    \ No newline at end of file + and type 'a checkpoint := 'a checkpoint diff --git a/ocaml/CamlinternalMenhirLib/Engine/index.html b/ocaml/CamlinternalMenhirLib/Engine/index.html index f6d2c03..e28560b 100644 --- a/ocaml/CamlinternalMenhirLib/Engine/index.html +++ b/ocaml/CamlinternalMenhirLib/Engine/index.html @@ -1,9 +1,9 @@ -Engine (ocaml.CamlinternalMenhirLib.Engine)

    Module CamlinternalMenhirLib.Engine

    module Make +Engine (ocaml.CamlinternalMenhirLib.Engine)

    Module CamlinternalMenhirLib.Engine

    \ No newline at end of file + and type 'a env = (T.state, T.semantic_value, T.token) EngineTypes.env
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/index.html index efa3066..cdebe11 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/index.html @@ -1,2 +1,2 @@ -EngineTypes (ocaml.CamlinternalMenhirLib.EngineTypes)

    Module CamlinternalMenhirLib.EngineTypes

    type ('state, 'semantic_value) stack = {
    1. state : 'state;
    2. semv : 'semantic_value;
    3. startp : Stdlib.Lexing.position;
    4. endp : Stdlib.Lexing.position;
    5. next : ('state, 'semantic_value) stack;
    }
    type ('state, 'semantic_value, 'token) env = {
    1. error : bool;
    2. triple : 'token * Stdlib.Lexing.position * Stdlib.Lexing.position;
    3. stack : ('state, 'semantic_value) stack;
    4. current : 'state;
    }
    module type TABLE = sig ... end
    module type MONOLITHIC_ENGINE = sig ... end
    module type INCREMENTAL_ENGINE_START = sig ... end
    module type ENGINE = sig ... end
    \ No newline at end of file +EngineTypes (ocaml.CamlinternalMenhirLib.EngineTypes)

    Module CamlinternalMenhirLib.EngineTypes

    type ('state, 'semantic_value) stack = {
    1. state : 'state;
    2. semv : 'semantic_value;
    3. startp : Stdlib.Lexing.position;
    4. endp : Stdlib.Lexing.position;
    5. next : ('state, 'semantic_value) stack;
    }
    type ('state, 'semantic_value, 'token) env = {
    1. error : bool;
    2. triple : 'token * Stdlib.Lexing.position * Stdlib.Lexing.position;
    3. stack : ('state, 'semantic_value) stack;
    4. current : 'state;
    }
    module type TABLE = sig ... end
    module type MONOLITHIC_ENGINE = sig ... end
    module type INCREMENTAL_ENGINE_START = sig ... end
    module type ENGINE = sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html index cd80b70..aea1011 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-ENGINE/index.html @@ -1,5 +1,5 @@ -ENGINE (ocaml.CamlinternalMenhirLib.EngineTypes.ENGINE)

    Module type EngineTypes.ENGINE

    include MONOLITHIC_ENGINE
    type state
    type token
    type semantic_value
    exception Error
    val entry : +ENGINE (ocaml.CamlinternalMenhirLib.EngineTypes.ENGINE)

    Module type EngineTypes.ENGINE

    include MONOLITHIC_ENGINE
    type state
    type token
    type semantic_value
    exception Error
    val entry : [ `Legacy | `Simplified ] -> state -> (Stdlib.Lexing.lexbuf -> token) -> @@ -9,12 +9,12 @@ and type 'a lr1state = state
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = + 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -32,4 +32,4 @@ IncrementalEngine.position * IncrementalEngine.position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    \ No newline at end of file + and type 'a checkpoint := 'a checkpoint
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html index 63cbb2a..d023645 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-INCREMENTAL_ENGINE_START/index.html @@ -1,2 +1,2 @@ -INCREMENTAL_ENGINE_START (ocaml.CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START)

    Module type EngineTypes.INCREMENTAL_ENGINE_START

    type state
    type semantic_value
    type 'a checkpoint
    \ No newline at end of file +INCREMENTAL_ENGINE_START (ocaml.CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START)

    Module type EngineTypes.INCREMENTAL_ENGINE_START

    type state
    type semantic_value
    type 'a checkpoint
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html index a11f29e..947d1d4 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-MONOLITHIC_ENGINE/index.html @@ -1,7 +1,7 @@ -MONOLITHIC_ENGINE (ocaml.CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE)

    Module type EngineTypes.MONOLITHIC_ENGINE

    type state
    type token
    type semantic_value
    exception Error
    val entry : +MONOLITHIC_ENGINE (ocaml.CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE)

    Module type EngineTypes.MONOLITHIC_ENGINE

    type state
    type token
    type semantic_value
    exception Error
    val entry : [ `Legacy | `Simplified ] -> state -> (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - semantic_value
    \ No newline at end of file + semantic_value
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html index 4c34af8..cb43124 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/Log/index.html @@ -1,6 +1,6 @@ -Log (ocaml.CamlinternalMenhirLib.EngineTypes.TABLE.Log)

    Module TABLE.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : +Log (ocaml.CamlinternalMenhirLib.EngineTypes.TABLE.Log)

    Module TABLE.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : terminal -> Stdlib.Lexing.position -> Stdlib.Lexing.position -> - unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    \ No newline at end of file + unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html index 73c019a..344ee72 100644 --- a/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html +++ b/ocaml/CamlinternalMenhirLib/EngineTypes/module-type-TABLE/index.html @@ -1,5 +1,5 @@ -TABLE (ocaml.CamlinternalMenhirLib.EngineTypes.TABLE)

    Module type EngineTypes.TABLE

    type state
    val number : state -> int
    type token
    type terminal
    type nonterminal
    type semantic_value
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : +TABLE (ocaml.CamlinternalMenhirLib.EngineTypes.TABLE)

    Module type EngineTypes.TABLE

    type state
    val number : state -> int
    type token
    type terminal
    type nonterminal
    type semantic_value
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> @@ -14,4 +14,4 @@ 'env -> 'answer
    val goto_nt : state -> nonterminal -> state
    val goto_prod : state -> production -> state
    val maybe_goto_nt : state -> nonterminal -> state option
    val is_start : production -> bool
    exception Error
    type semantic_action = (state, semantic_value, token) env -> - (state, semantic_value) stack
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    \ No newline at end of file + (state, semantic_value) stack
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/ErrorReports/index.html b/ocaml/CamlinternalMenhirLib/ErrorReports/index.html index 5522305..924040a 100644 --- a/ocaml/CamlinternalMenhirLib/ErrorReports/index.html +++ b/ocaml/CamlinternalMenhirLib/ErrorReports/index.html @@ -1,5 +1,5 @@ -ErrorReports (ocaml.CamlinternalMenhirLib.ErrorReports)

    Module CamlinternalMenhirLib.ErrorReports

    type 'a buffer
    val wrap : +ErrorReports (ocaml.CamlinternalMenhirLib.ErrorReports)

    Module CamlinternalMenhirLib.ErrorReports

    type 'a buffer
    val show : ('a -> string) -> 'a buffer -> string
    val last : 'a buffer -> 'a
    val extract : string -> (Stdlib.Lexing.position * Stdlib.Lexing.position) -> - string
    val sanitize : string -> string
    val compress : string -> string
    val shorten : int -> string -> string
    val expand : (int -> string) -> string -> string
    \ No newline at end of file + string
    val sanitize : string -> string
    val compress : string -> string
    val shorten : int -> string -> string
    val expand : (int -> string) -> string -> string
    diff --git a/ocaml/CamlinternalMenhirLib/General/index.html b/ocaml/CamlinternalMenhirLib/General/index.html index 6fd627d..88d2480 100644 --- a/ocaml/CamlinternalMenhirLib/General/index.html +++ b/ocaml/CamlinternalMenhirLib/General/index.html @@ -1,2 +1,2 @@ -General (ocaml.CamlinternalMenhirLib.General)

    Module CamlinternalMenhirLib.General

    val take : int -> 'a list -> 'a list
    val drop : int -> 'a list -> 'a list
    val uniq : ('a -> 'a -> int) -> 'a list -> 'a list
    val weed : ('a -> 'a -> int) -> 'a list -> 'a list
    type 'a stream = 'a head Stdlib.Lazy.t
    and 'a head =
    1. | Nil
    2. | Cons of 'a * 'a stream
    val length : 'a stream -> int
    val foldr : ('a -> 'b -> 'b) -> 'a stream -> 'b -> 'b
    \ No newline at end of file +General (ocaml.CamlinternalMenhirLib.General)

    Module CamlinternalMenhirLib.General

    val take : int -> 'a list -> 'a list
    val drop : int -> 'a list -> 'a list
    val uniq : ('a -> 'a -> int) -> 'a list -> 'a list
    val weed : ('a -> 'a -> int) -> 'a list -> 'a list
    type 'a stream = 'a head Stdlib.Lazy.t
    and 'a head =
    1. | Nil
    2. | Cons of 'a * 'a stream
    val length : 'a stream -> int
    val foldr : ('a -> 'b -> 'b) -> 'a stream -> 'b -> 'b
    diff --git a/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html b/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html index 35072d6..aa36147 100644 --- a/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html +++ b/ocaml/CamlinternalMenhirLib/IncrementalEngine/index.html @@ -1,2 +1,2 @@ -IncrementalEngine (ocaml.CamlinternalMenhirLib.IncrementalEngine)

    Module CamlinternalMenhirLib.IncrementalEngine

    type position = Stdlib.Lexing.position
    module type INCREMENTAL_ENGINE = sig ... end
    module type SYMBOLS = sig ... end
    module type INSPECTION = sig ... end
    module type EVERYTHING = sig ... end
    \ No newline at end of file +IncrementalEngine (ocaml.CamlinternalMenhirLib.IncrementalEngine)

    Module CamlinternalMenhirLib.IncrementalEngine

    type position = Stdlib.Lexing.position
    module type INCREMENTAL_ENGINE = sig ... end
    module type SYMBOLS = sig ... end
    module type INSPECTION = sig ... end
    module type EVERYTHING = sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html index 9aceeee..cfc8cf5 100644 --- a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html +++ b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-EVERYTHING/index.html @@ -1,8 +1,8 @@ -EVERYTHING (ocaml.CamlinternalMenhirLib.IncrementalEngine.EVERYTHING)

    Module type IncrementalEngine.EVERYTHING

    include INCREMENTAL_ENGINE
    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = unit -> token * position * position
    val lexer_lexbuf_to_supplier : +EVERYTHING (ocaml.CamlinternalMenhirLib.IncrementalEngine.EVERYTHING)

    Module type IncrementalEngine.EVERYTHING

    include INCREMENTAL_ENGINE
    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = unit -> token * position * position
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -15,4 +15,4 @@ 'answer
    val shifts : 'a checkpoint -> 'a env option
    val acceptable : 'a checkpoint -> token -> position -> bool
    type 'a lr1state
    val number : _ lr1state -> int
    val production_index : production -> int
    val find_production : int -> production
    type element =
    1. | Element : 'a lr1state * 'a * position * position -> element
    type stack = element General.stream
    val stack : 'a env -> stack
    val top : 'a env -> element option
    val pop_many : int -> 'a env -> 'a env option
    val get : int -> 'a env -> element option
    val current_state_number : 'a env -> int
    val equal : 'a env -> 'a env -> bool
    val positions : 'a env -> position * position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    include INSPECTION with type 'a lr1state := 'a lr1state with type production := production - with type 'a env := 'a env
    include SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type item = production * int
    val compare_terminals : _ terminal -> _ terminal -> int
    val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
    val compare_symbols : xsymbol -> xsymbol -> int
    val compare_productions : production -> production -> int
    val compare_items : item -> item -> int
    val incoming_symbol : 'a lr1state -> 'a symbol
    val items : _ lr1state -> item list
    val lhs : production -> xsymbol
    val rhs : production -> xsymbol list
    val nullable : _ nonterminal -> bool
    val first : _ nonterminal -> _ terminal -> bool
    val xfirst : xsymbol -> _ terminal -> bool
    val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
    \ No newline at end of file + with type 'a env := 'a env
    include SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type item = production * int
    val compare_terminals : _ terminal -> _ terminal -> int
    val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
    val compare_symbols : xsymbol -> xsymbol -> int
    val compare_productions : production -> production -> int
    val compare_items : item -> item -> int
    val incoming_symbol : 'a lr1state -> 'a symbol
    val items : _ lr1state -> item list
    val lhs : production -> xsymbol
    val rhs : production -> xsymbol list
    val nullable : _ nonterminal -> bool
    val first : _ nonterminal -> _ terminal -> bool
    val xfirst : xsymbol -> _ terminal -> bool
    val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
    diff --git a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html index 7e5b28a..884b6af 100644 --- a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html +++ b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INCREMENTAL_ENGINE/index.html @@ -1,8 +1,8 @@ -INCREMENTAL_ENGINE (ocaml.CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE)

    Module type IncrementalEngine.INCREMENTAL_ENGINE

    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = unit -> token * position * position
    val lexer_lexbuf_to_supplier : +INCREMENTAL_ENGINE (ocaml.CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE)

    Module type IncrementalEngine.INCREMENTAL_ENGINE

    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    val offer : 'a checkpoint -> (token * position * position) -> 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = unit -> token * position * position
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -12,4 +12,4 @@ ('a checkpoint -> 'a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> - 'answer
    val shifts : 'a checkpoint -> 'a env option
    val acceptable : 'a checkpoint -> token -> position -> bool
    type 'a lr1state
    val number : _ lr1state -> int
    val production_index : production -> int
    val find_production : int -> production
    type element =
    1. | Element : 'a lr1state * 'a * position * position -> element
    type stack = element General.stream
    val stack : 'a env -> stack
    val top : 'a env -> element option
    val pop_many : int -> 'a env -> 'a env option
    val get : int -> 'a env -> element option
    val current_state_number : 'a env -> int
    val equal : 'a env -> 'a env -> bool
    val positions : 'a env -> position * position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    \ No newline at end of file + 'answer
    val shifts : 'a checkpoint -> 'a env option
    val acceptable : 'a checkpoint -> token -> position -> bool
    type 'a lr1state
    val number : _ lr1state -> int
    val production_index : production -> int
    val find_production : int -> production
    type element =
    1. | Element : 'a lr1state * 'a * position * position -> element
    type stack = element General.stream
    val stack : 'a env -> stack
    val top : 'a env -> element option
    val pop_many : int -> 'a env -> 'a env option
    val get : int -> 'a env -> element option
    val current_state_number : 'a env -> int
    val equal : 'a env -> 'a env -> bool
    val positions : 'a env -> position * position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    diff --git a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html index 077d4b8..61fff03 100644 --- a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html +++ b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-INSPECTION/index.html @@ -1,2 +1,2 @@ -INSPECTION (ocaml.CamlinternalMenhirLib.IncrementalEngine.INSPECTION)

    Module type IncrementalEngine.INSPECTION

    include SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state
    type production
    type item = production * int
    val compare_terminals : _ terminal -> _ terminal -> int
    val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
    val compare_symbols : xsymbol -> xsymbol -> int
    val compare_productions : production -> production -> int
    val compare_items : item -> item -> int
    val incoming_symbol : 'a lr1state -> 'a symbol
    val items : _ lr1state -> item list
    val lhs : production -> xsymbol
    val rhs : production -> xsymbol list
    val nullable : _ nonterminal -> bool
    val first : _ nonterminal -> _ terminal -> bool
    val xfirst : xsymbol -> _ terminal -> bool
    val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    type 'a env
    val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
    \ No newline at end of file +INSPECTION (ocaml.CamlinternalMenhirLib.IncrementalEngine.INSPECTION)

    Module type IncrementalEngine.INSPECTION

    include SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state
    type production
    type item = production * int
    val compare_terminals : _ terminal -> _ terminal -> int
    val compare_nonterminals : _ nonterminal -> _ nonterminal -> int
    val compare_symbols : xsymbol -> xsymbol -> int
    val compare_productions : production -> production -> int
    val compare_items : item -> item -> int
    val incoming_symbol : 'a lr1state -> 'a symbol
    val items : _ lr1state -> item list
    val lhs : production -> xsymbol
    val rhs : production -> xsymbol list
    val nullable : _ nonterminal -> bool
    val first : _ nonterminal -> _ terminal -> bool
    val xfirst : xsymbol -> _ terminal -> bool
    val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
    type 'a env
    val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
    diff --git a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html index 3fb10ef..e282290 100644 --- a/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html +++ b/ocaml/CamlinternalMenhirLib/IncrementalEngine/module-type-SYMBOLS/index.html @@ -1,2 +1,2 @@ -SYMBOLS (ocaml.CamlinternalMenhirLib.IncrementalEngine.SYMBOLS)

    Module type IncrementalEngine.SYMBOLS

    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    \ No newline at end of file +SYMBOLS (ocaml.CamlinternalMenhirLib.IncrementalEngine.SYMBOLS)

    Module type IncrementalEngine.SYMBOLS

    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    diff --git a/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html b/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html index de0ad06..591523d 100644 --- a/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html +++ b/ocaml/CamlinternalMenhirLib/InfiniteArray/index.html @@ -1,2 +1,2 @@ -InfiniteArray (ocaml.CamlinternalMenhirLib.InfiniteArray)

    Module CamlinternalMenhirLib.InfiniteArray

    type 'a t

    This module implements infinite arrays. *

    val make : 'a -> 'a t

    make x creates an infinite array, where every slot contains x. *

    val get : 'a t -> int -> 'a

    get a i returns the element contained at offset i in the array a. Slots are numbered 0 and up. *

    val set : 'a t -> int -> 'a -> unit

    set a i x sets the element contained at offset i in the array a to x. Slots are numbered 0 and up. *

    val extent : 'a t -> int

    extent a is the length of an initial segment of the array a that is sufficiently large to contain all set operations ever performed. In other words, all elements beyond that segment have the default value.

    val domain : 'a t -> 'a array

    domain a is a fresh copy of an initial segment of the array a whose length is extent a.

    \ No newline at end of file +InfiniteArray (ocaml.CamlinternalMenhirLib.InfiniteArray)

    Module CamlinternalMenhirLib.InfiniteArray

    type 'a t

    This module implements infinite arrays. *

    val make : 'a -> 'a t

    make x creates an infinite array, where every slot contains x. *

    val get : 'a t -> int -> 'a

    get a i returns the element contained at offset i in the array a. Slots are numbered 0 and up. *

    val set : 'a t -> int -> 'a -> unit

    set a i x sets the element contained at offset i in the array a to x. Slots are numbered 0 and up. *

    val extent : 'a t -> int

    extent a is the length of an initial segment of the array a that is sufficiently large to contain all set operations ever performed. In other words, all elements beyond that segment have the default value.

    val domain : 'a t -> 'a array

    domain a is a fresh copy of an initial segment of the array a whose length is extent a.

    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html index 01aaab2..1d41fe0 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableFormat/index.html @@ -1,2 +1,2 @@ -InspectionTableFormat (ocaml.CamlinternalMenhirLib.InspectionTableFormat)

    Module CamlinternalMenhirLib.InspectionTableFormat

    module type TABLES = sig ... end
    \ No newline at end of file +InspectionTableFormat (ocaml.CamlinternalMenhirLib.InspectionTableFormat)

    Module CamlinternalMenhirLib.InspectionTableFormat

    module type TABLES = sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html index 6dd5ff2..fc6fbf8 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableFormat/module-type-TABLES/index.html @@ -1,2 +1,2 @@ -TABLES (ocaml.CamlinternalMenhirLib.InspectionTableFormat.TABLES)

    Module type InspectionTableFormat.TABLES

    include IncrementalEngine.SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state
    val terminal : int -> xsymbol
    val nonterminal : int -> xsymbol
    val lr0_core : PackedIntArray.t
    val lr0_incoming : PackedIntArray.t
    val nullable : string
    val first : int * string
    \ No newline at end of file +TABLES (ocaml.CamlinternalMenhirLib.InspectionTableFormat.TABLES)

    Module type InspectionTableFormat.TABLES

    include IncrementalEngine.SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state
    val terminal : int -> xsymbol
    val nonterminal : int -> xsymbol
    val lr0_core : PackedIntArray.t
    val lr0_incoming : PackedIntArray.t
    val nullable : string
    val first : int * string
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html index 2b01e9c..55924bf 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-1-TT/index.html @@ -1,5 +1,5 @@ -TT (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.TT)

    Parameter Make.TT

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : +TT (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.TT)

    Parameter Make.TT

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : ((int, Stdlib.Obj.t, token) EngineTypes.env -> (int, Stdlib.Obj.t) EngineTypes.stack) - array
    exception Error
    val trace : (string array * string array) option
    \ No newline at end of file + array
    exception Error
    val trace : (string array * string array) option
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html index 3724e14..b1b7169 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-2-IT/index.html @@ -1,2 +1,2 @@ -IT (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.IT)

    Parameter Make.IT

    include IncrementalEngine.SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state = int
    val terminal : int -> xsymbol
    val nonterminal : int -> xsymbol
    val lr0_core : PackedIntArray.t
    val lr0_incoming : PackedIntArray.t
    val nullable : string
    val first : int * string
    \ No newline at end of file +IT (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.IT)

    Parameter Make.IT

    include IncrementalEngine.SYMBOLS
    type 'a terminal
    type 'a nonterminal
    type 'a symbol =
    1. | T : 'a terminal -> 'a symbol
    2. | N : 'a nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    type 'a lr1state = int
    val terminal : int -> xsymbol
    val nonterminal : int -> xsymbol
    val lr0_core : PackedIntArray.t
    val lr0_incoming : PackedIntArray.t
    val nullable : string
    val first : int * string
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html index ae6ab16..c649c78 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/Log/index.html @@ -1,6 +1,6 @@ -Log (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET.Log)

    Module ET.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : +Log (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET.Log)

    Module ET.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : terminal -> Stdlib.Lexing.position -> Stdlib.Lexing.position -> - unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    \ No newline at end of file + unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html index f53d0f6..57bd75a 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-3-ET/index.html @@ -1,5 +1,5 @@ -ET (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET)

    Parameter Make.ET

    type state
    val number : state -> int
    type token
    type terminal = int
    type nonterminal = int
    type semantic_value = Stdlib.Obj.t
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : +ET (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.ET)

    Parameter Make.ET

    type state
    val number : state -> int
    type token
    type terminal = int
    type nonterminal = int
    type semantic_value = Stdlib.Obj.t
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> @@ -14,4 +14,4 @@ 'env -> 'answer
    val goto_nt : state -> nonterminal -> state
    val goto_prod : state -> production -> state
    val maybe_goto_nt : state -> nonterminal -> state option
    val is_start : production -> bool
    exception Error
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    \ No newline at end of file + (state, semantic_value) EngineTypes.stack
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html index 882a3ad..d35c466 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/argument-4-E/index.html @@ -1,2 +1,2 @@ -E (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.E)

    Parameter Make.E

    \ No newline at end of file +E (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make.E)

    Parameter Make.E

    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html index 52ca62a..de7e194 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Make/index.html @@ -1,5 +1,5 @@ -Make (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make)

    Module InspectionTableInterpreter.Make

    Parameters

    module IT : InspectionTableFormat.TABLES with type 'a lr1state = int
    module ET : +Make (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Make)

    Module InspectionTableInterpreter.Make

    Parameters

    module IT : InspectionTableFormat.TABLES with type 'a lr1state = int
    module ET : EngineTypes.TABLE with type terminal = int and type nonterminal = int @@ -11,4 +11,4 @@ 'a -> IncrementalEngine.position -> 'b E.env -> - 'b E.env
    \ No newline at end of file + 'b E.env
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html index 1f7824d..8016500 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/argument-1-T/index.html @@ -1,2 +1,2 @@ -T (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols.T)

    Parameter Symbols.T

    type 'a terminal
    type 'a nonterminal
    \ No newline at end of file +T (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols.T)

    Parameter Symbols.T

    type 'a terminal
    type 'a nonterminal
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html index 859d11c..1505dea 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/Symbols/index.html @@ -1,2 +1,2 @@ -Symbols (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols)

    Module InspectionTableInterpreter.Symbols

    Parameters

    module T : sig ... end

    Signature

    type 'a symbol =
    1. | T : 'a T.terminal -> 'a symbol
    2. | N : 'a T.nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    \ No newline at end of file +Symbols (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter.Symbols)

    Module InspectionTableInterpreter.Symbols

    Parameters

    module T : sig ... end

    Signature

    type 'a symbol =
    1. | T : 'a T.terminal -> 'a symbol
    2. | N : 'a T.nonterminal -> 'a symbol
    type xsymbol =
    1. | X : 'a symbol -> xsymbol
    diff --git a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html index 99e6935..e071d1b 100644 --- a/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html +++ b/ocaml/CamlinternalMenhirLib/InspectionTableInterpreter/index.html @@ -1,5 +1,5 @@ -InspectionTableInterpreter (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter)

    Module CamlinternalMenhirLib.InspectionTableInterpreter

    module Symbols +InspectionTableInterpreter (ocaml.CamlinternalMenhirLib.InspectionTableInterpreter)

    Module CamlinternalMenhirLib.InspectionTableInterpreter

    module Symbols (T : sig ... end) : IncrementalEngine.SYMBOLS with type 'a terminal := 'a T.terminal @@ -17,4 +17,4 @@ and type 'a nonterminal := 'a IT.nonterminal and type 'a lr1state := 'a IT.lr1state and type production := int - and type 'a env := 'a E.env
    \ No newline at end of file + and type 'a env := 'a E.env
    diff --git a/ocaml/CamlinternalMenhirLib/LexerUtil/index.html b/ocaml/CamlinternalMenhirLib/LexerUtil/index.html index 153ffda..39e9120 100644 --- a/ocaml/CamlinternalMenhirLib/LexerUtil/index.html +++ b/ocaml/CamlinternalMenhirLib/LexerUtil/index.html @@ -1,2 +1,2 @@ -LexerUtil (ocaml.CamlinternalMenhirLib.LexerUtil)

    Module CamlinternalMenhirLib.LexerUtil

    val read : string -> string * Stdlib.Lexing.lexbuf
    val newline : Stdlib.Lexing.lexbuf -> unit
    \ No newline at end of file +LexerUtil (ocaml.CamlinternalMenhirLib.LexerUtil)

    Module CamlinternalMenhirLib.LexerUtil

    val read : string -> string * Stdlib.Lexing.lexbuf
    val newline : Stdlib.Lexing.lexbuf -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html b/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html index d23fb1e..9f5ad45 100644 --- a/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html +++ b/ocaml/CamlinternalMenhirLib/LinearizedArray/index.html @@ -1,2 +1,2 @@ -LinearizedArray (ocaml.CamlinternalMenhirLib.LinearizedArray)

    Module CamlinternalMenhirLib.LinearizedArray

    type 'a t = 'a array * int array
    val make : 'a array array -> 'a t
    val read : 'a t -> int -> int -> 'a
    val write : 'a t -> int -> int -> 'a -> unit
    val length : 'a t -> int
    val row_length : 'a t -> int -> int
    val read_row : 'a t -> int -> 'a list
    val row_length_via : (int -> int) -> int -> int
    val read_via : (int -> 'a) -> (int -> int) -> int -> int -> 'a
    val read_row_via : (int -> 'a) -> (int -> int) -> int -> 'a list
    \ No newline at end of file +LinearizedArray (ocaml.CamlinternalMenhirLib.LinearizedArray)

    Module CamlinternalMenhirLib.LinearizedArray

    type 'a t = 'a array * int array
    val make : 'a array array -> 'a t
    val read : 'a t -> int -> int -> 'a
    val write : 'a t -> int -> int -> 'a -> unit
    val length : 'a t -> int
    val row_length : 'a t -> int -> int
    val read_row : 'a t -> int -> 'a list
    val row_length_via : (int -> int) -> int -> int
    val read_via : (int -> 'a) -> (int -> int) -> int -> int -> 'a
    val read_row_via : (int -> 'a) -> (int -> int) -> int -> 'a list
    diff --git a/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html b/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html index 66dd36f..bff56a1 100644 --- a/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html +++ b/ocaml/CamlinternalMenhirLib/PackedIntArray/index.html @@ -1,2 +1,2 @@ -PackedIntArray (ocaml.CamlinternalMenhirLib.PackedIntArray)

    Module CamlinternalMenhirLib.PackedIntArray

    type t = int * string
    val pack : int array -> t
    val get : t -> int -> int
    val get1 : string -> int -> int
    val unflatten1 : (int * string) -> int -> int -> int
    \ No newline at end of file +PackedIntArray (ocaml.CamlinternalMenhirLib.PackedIntArray)

    Module CamlinternalMenhirLib.PackedIntArray

    type t = int * string
    val pack : int array -> t
    val get : t -> int -> int
    val get1 : string -> int -> int
    val unflatten1 : (int * string) -> int -> int -> int
    diff --git a/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html b/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html index 0f8da50..4eed6db 100644 --- a/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html +++ b/ocaml/CamlinternalMenhirLib/Printers/Make/argument-1-I/index.html @@ -1,13 +1,13 @@ -I (ocaml.CamlinternalMenhirLib.Printers.Make.I)

    Parameter Make.I

    include IncrementalEngine.INCREMENTAL_ENGINE
    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    val offer : +I (ocaml.CamlinternalMenhirLib.Printers.Make.I)

    Parameter Make.I

    include IncrementalEngine.INCREMENTAL_ENGINE
    type token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = + 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -31,4 +31,4 @@ 'a -> IncrementalEngine.position -> 'b env -> - 'b env
    \ No newline at end of file + 'b env
    diff --git a/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html b/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html index 97c9d1a..093384f 100644 --- a/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html +++ b/ocaml/CamlinternalMenhirLib/Printers/Make/argument-2-User/index.html @@ -1,2 +1,2 @@ -User (ocaml.CamlinternalMenhirLib.Printers.Make.User)

    Parameter Make.User

    val print : string -> unit
    val print_symbol : I.xsymbol -> unit
    val print_element : (I.element -> unit) option
    \ No newline at end of file +User (ocaml.CamlinternalMenhirLib.Printers.Make.User)

    Parameter Make.User

    val print : string -> unit
    val print_symbol : I.xsymbol -> unit
    val print_element : (I.element -> unit) option
    diff --git a/ocaml/CamlinternalMenhirLib/Printers/Make/index.html b/ocaml/CamlinternalMenhirLib/Printers/Make/index.html index 611bdf1..85fb5a8 100644 --- a/ocaml/CamlinternalMenhirLib/Printers/Make/index.html +++ b/ocaml/CamlinternalMenhirLib/Printers/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.CamlinternalMenhirLib.Printers.Make)

    Module Printers.Make

    Parameters

    module User : sig ... end

    Signature

    val print_symbols : I.xsymbol list -> unit
    val print_element_as_symbol : I.element -> unit
    val print_stack : 'a I.env -> unit
    val print_item : I.item -> unit
    val print_production : I.production -> unit
    val print_current_state : 'a I.env -> unit
    val print_env : 'a I.env -> unit
    \ No newline at end of file +Make (ocaml.CamlinternalMenhirLib.Printers.Make)

    Module Printers.Make

    Parameters

    module User : sig ... end

    Signature

    val print_symbols : I.xsymbol list -> unit
    val print_element_as_symbol : I.element -> unit
    val print_stack : 'a I.env -> unit
    val print_item : I.item -> unit
    val print_production : I.production -> unit
    val print_current_state : 'a I.env -> unit
    val print_env : 'a I.env -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/Printers/index.html b/ocaml/CamlinternalMenhirLib/Printers/index.html index 1b1c213..f3e1d85 100644 --- a/ocaml/CamlinternalMenhirLib/Printers/index.html +++ b/ocaml/CamlinternalMenhirLib/Printers/index.html @@ -1,5 +1,5 @@ -Printers (ocaml.CamlinternalMenhirLib.Printers)

    Module CamlinternalMenhirLib.Printers

    module Make +Printers (ocaml.CamlinternalMenhirLib.Printers)

    Module CamlinternalMenhirLib.Printers

    module Make (I : IncrementalEngine.EVERYTHING) (User : sig ... end) : - sig ... end
    \ No newline at end of file + sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html b/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html index cd91432..ba2041b 100644 --- a/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html +++ b/ocaml/CamlinternalMenhirLib/RowDisplacement/index.html @@ -1,5 +1,5 @@ -RowDisplacement (ocaml.CamlinternalMenhirLib.RowDisplacement)

    Module CamlinternalMenhirLib.RowDisplacement

    type 'a table = int array * 'a array
    val compress : +RowDisplacement (ocaml.CamlinternalMenhirLib.RowDisplacement)

    Module CamlinternalMenhirLib.RowDisplacement

    type 'a table = int array * 'a array
    val compress : ('a -> 'a -> bool) -> ('a -> bool) -> 'a -> @@ -12,4 +12,4 @@ ('displacement * 'data) -> int -> int -> - 'a
    \ No newline at end of file + 'a
    diff --git a/ocaml/CamlinternalMenhirLib/StaticVersion/index.html b/ocaml/CamlinternalMenhirLib/StaticVersion/index.html index 6c51bc9..3f3fa2e 100644 --- a/ocaml/CamlinternalMenhirLib/StaticVersion/index.html +++ b/ocaml/CamlinternalMenhirLib/StaticVersion/index.html @@ -1,2 +1,2 @@ -StaticVersion (ocaml.CamlinternalMenhirLib.StaticVersion)

    Module CamlinternalMenhirLib.StaticVersion

    val require_20210419 : unit
    \ No newline at end of file +StaticVersion (ocaml.CamlinternalMenhirLib.StaticVersion)

    Module CamlinternalMenhirLib.StaticVersion

    val require_20210419 : unit
    diff --git a/ocaml/CamlinternalMenhirLib/TableFormat/index.html b/ocaml/CamlinternalMenhirLib/TableFormat/index.html index 0352445..2e5ea13 100644 --- a/ocaml/CamlinternalMenhirLib/TableFormat/index.html +++ b/ocaml/CamlinternalMenhirLib/TableFormat/index.html @@ -1,2 +1,2 @@ -TableFormat (ocaml.CamlinternalMenhirLib.TableFormat)

    Module CamlinternalMenhirLib.TableFormat

    module type TABLES = sig ... end
    \ No newline at end of file +TableFormat (ocaml.CamlinternalMenhirLib.TableFormat)

    Module CamlinternalMenhirLib.TableFormat

    module type TABLES = sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html b/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html index 7cf1fe5..4e240d7 100644 --- a/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html +++ b/ocaml/CamlinternalMenhirLib/TableFormat/module-type-TABLES/index.html @@ -1,5 +1,5 @@ -TABLES (ocaml.CamlinternalMenhirLib.TableFormat.TABLES)

    Module type TableFormat.TABLES

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : +TABLES (ocaml.CamlinternalMenhirLib.TableFormat.TABLES)

    Module type TableFormat.TABLES

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : ((int, Stdlib.Obj.t, token) EngineTypes.env -> (int, Stdlib.Obj.t) EngineTypes.stack) - array
    exception Error
    val trace : (string array * string array) option
    \ No newline at end of file + array
    exception Error
    val trace : (string array * string array) option
    diff --git a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html index 3098cb1..d5b3cee 100644 --- a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html +++ b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/Log/index.html @@ -1,6 +1,6 @@ -Log (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.Log)

    Module MakeEngineTable.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : +Log (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.Log)

    Module MakeEngineTable.Log

    val state : state -> unit
    val shift : terminal -> state -> unit
    val reduce_or_accept : production -> unit
    val lookahead_token : terminal -> Stdlib.Lexing.position -> Stdlib.Lexing.position -> - unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    \ No newline at end of file + unit
    val initiating_error_handling : unit -> unit
    val resuming_error_handling : unit -> unit
    val handling_error : state -> unit
    diff --git a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html index f7d2e5c..08d341e 100644 --- a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html +++ b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/argument-1-T/index.html @@ -1,5 +1,5 @@ -T (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.T)

    Parameter MakeEngineTable.T

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : +T (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable.T)

    Parameter MakeEngineTable.T

    type token
    val token2terminal : token -> int
    val error_terminal : int
    val token2value : token -> Stdlib.Obj.t
    val default_reduction : PackedIntArray.t
    val error : int * string
    val start : int
    val semantic_action : ((int, Stdlib.Obj.t, token) EngineTypes.env -> (int, Stdlib.Obj.t) EngineTypes.stack) - array
    exception Error
    val trace : (string array * string array) option
    \ No newline at end of file + array
    exception Error
    val trace : (string array * string array) option
    diff --git a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html index 43e7110..6465729 100644 --- a/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html +++ b/ocaml/CamlinternalMenhirLib/TableInterpreter/MakeEngineTable/index.html @@ -1,5 +1,5 @@ -MakeEngineTable (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable)

    Module TableInterpreter.MakeEngineTable

    Parameters

    Signature

    type state = int
    val number : state -> int
    type token = T.token
    type terminal = int
    type nonterminal = int
    type semantic_value = Stdlib.Obj.t
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production = int
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : +MakeEngineTable (ocaml.CamlinternalMenhirLib.TableInterpreter.MakeEngineTable)

    Module TableInterpreter.MakeEngineTable

    Parameters

    Signature

    type state = int
    val number : state -> int
    type token = T.token
    type terminal = int
    type nonterminal = int
    type semantic_value = Stdlib.Obj.t
    val token2terminal : token -> terminal
    val token2value : token -> semantic_value
    val error_terminal : terminal
    val error_value : semantic_value
    val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
    type production = int
    val production_index : production -> int
    val find_production : int -> production
    val default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> @@ -14,4 +14,4 @@ 'env -> 'answer
    val goto_nt : state -> nonterminal -> state
    val goto_prod : state -> production -> state
    val maybe_goto_nt : state -> nonterminal -> state option
    val is_start : production -> bool
    exception Error
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    \ No newline at end of file + (state, semantic_value) EngineTypes.stack
    val semantic_action : production -> semantic_action
    val may_reduce : state -> production -> bool
    val log : bool
    module Log : sig ... end
    diff --git a/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html b/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html index 7cc55d9..cc93bf9 100644 --- a/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html +++ b/ocaml/CamlinternalMenhirLib/TableInterpreter/index.html @@ -1,5 +1,5 @@ -TableInterpreter (ocaml.CamlinternalMenhirLib.TableInterpreter)

    Module CamlinternalMenhirLib.TableInterpreter

    module MakeEngineTable +TableInterpreter (ocaml.CamlinternalMenhirLib.TableInterpreter)

    Module CamlinternalMenhirLib.TableInterpreter

    module MakeEngineTable (T : TableFormat.TABLES) : EngineTypes.TABLE with type state = int @@ -7,4 +7,4 @@ and type semantic_value = Stdlib.Obj.t and type production = int and type terminal = int - and type nonterminal = int
    \ No newline at end of file + and type nonterminal = int
    diff --git a/ocaml/CamlinternalMenhirLib/index.html b/ocaml/CamlinternalMenhirLib/index.html index 2b8fd09..8a2dc2b 100644 --- a/ocaml/CamlinternalMenhirLib/index.html +++ b/ocaml/CamlinternalMenhirLib/index.html @@ -1,2 +1,2 @@ -CamlinternalMenhirLib (ocaml.CamlinternalMenhirLib)

    Module CamlinternalMenhirLib

    module General : sig ... end
    module Convert : sig ... end
    module IncrementalEngine : sig ... end
    module EngineTypes : sig ... end
    module Engine : sig ... end
    module ErrorReports : sig ... end
    module LexerUtil : sig ... end
    module Printers : sig ... end
    module InfiniteArray : sig ... end
    module PackedIntArray : sig ... end
    module RowDisplacement : sig ... end
    module LinearizedArray : sig ... end
    module TableFormat : sig ... end
    module InspectionTableFormat : sig ... end
    module InspectionTableInterpreter : sig ... end
    module TableInterpreter : sig ... end
    module StaticVersion : sig ... end
    \ No newline at end of file +CamlinternalMenhirLib (ocaml.CamlinternalMenhirLib)

    Module CamlinternalMenhirLib

    module General : sig ... end
    module Convert : sig ... end
    module IncrementalEngine : sig ... end
    module EngineTypes : sig ... end
    module Engine : sig ... end
    module ErrorReports : sig ... end
    module LexerUtil : sig ... end
    module Printers : sig ... end
    module InfiniteArray : sig ... end
    module PackedIntArray : sig ... end
    module RowDisplacement : sig ... end
    module LinearizedArray : sig ... end
    module TableFormat : sig ... end
    module InspectionTableFormat : sig ... end
    module InspectionTableInterpreter : sig ... end
    module TableInterpreter : sig ... end
    module StaticVersion : sig ... end
    diff --git a/ocaml/CamlinternalMod/index.html b/ocaml/CamlinternalMod/index.html index 4c377bf..5417b54 100644 --- a/ocaml/CamlinternalMod/index.html +++ b/ocaml/CamlinternalMod/index.html @@ -1,2 +1,2 @@ -CamlinternalMod (ocaml.CamlinternalMod)

    Module CamlinternalMod

    Run-time support for recursive modules. All functions in this module are for system use only, not for the casual user.

    type shape =
    1. | Function
    2. | Lazy
    3. | Class
    4. | Module of shape array
    5. | Value of Stdlib.Obj.t
    val init_mod : (string * int * int) -> shape -> Stdlib.Obj.t
    val update_mod : shape -> Stdlib.Obj.t -> Stdlib.Obj.t -> unit
    \ No newline at end of file +CamlinternalMod (ocaml.CamlinternalMod)

    Module CamlinternalMod

    Run-time support for recursive modules. All functions in this module are for system use only, not for the casual user.

    type shape =
    1. | Function
    2. | Lazy
    3. | Class
    4. | Module of shape array
    5. | Value of Stdlib.Obj.t
    val init_mod : (string * int * int) -> shape -> Stdlib.Obj.t
    val update_mod : shape -> Stdlib.Obj.t -> Stdlib.Obj.t -> unit
    diff --git a/ocaml/CamlinternalOO/index.html b/ocaml/CamlinternalOO/index.html index 064fd6c..c093e7a 100644 --- a/ocaml/CamlinternalOO/index.html +++ b/ocaml/CamlinternalOO/index.html @@ -1,5 +1,5 @@ -CamlinternalOO (ocaml.CamlinternalOO)

    Module CamlinternalOO

    Run-time support for objects and classes. All functions in this module are for system use only, not for the casual user.

    Classes

    type tag
    type label
    type table
    type meth
    type t
    type obj
    type closure
    val public_method_label : string -> tag
    val new_method : table -> label
    val new_variable : table -> string -> int
    val new_methods_variables : +CamlinternalOO (ocaml.CamlinternalOO)

    Module CamlinternalOO

    Run-time support for objects and classes. All functions in this module are for system use only, not for the casual user.

    Classes

    type tag
    type label
    type table
    type meth
    type t
    type obj
    type closure
    val public_method_label : string -> tag
    val new_method : table -> label
    val new_variable : table -> string -> int
    val new_methods_variables : table -> string array -> string array -> @@ -15,4 +15,4 @@ (table -> Stdlib.Obj.t -> t) -> t * (table -> Stdlib.Obj.t -> t) * (Stdlib.Obj.t -> t) * Stdlib.Obj.t
    type init_table
    val make_class_store : string array -> (table -> t) -> init_table -> unit
    val dummy_class : (string * int * int) -> - t * (table -> Stdlib.Obj.t -> t) * (Stdlib.Obj.t -> t) * Stdlib.Obj.t

    Objects

    val copy : < .. > as 'a -> 'a
    val create_object : table -> obj
    val create_object_opt : obj -> table -> obj
    val run_initializers : obj -> table -> unit
    val run_initializers_opt : obj -> obj -> table -> obj
    val create_object_and_run_initializers : obj -> table -> obj
    val send : obj -> tag -> t
    val sendcache : obj -> tag -> t -> int -> t
    val sendself : obj -> label -> t
    val get_public_method : obj -> tag -> closure

    Table cache

    type tables
    val lookup_tables : tables -> closure array -> tables

    Builtins to reduce code size

    type impl =
    1. | GetConst
    2. | GetVar
    3. | GetEnv
    4. | GetMeth
    5. | SetVar
    6. | AppConst
    7. | AppVar
    8. | AppEnv
    9. | AppMeth
    10. | AppConstConst
    11. | AppConstVar
    12. | AppConstEnv
    13. | AppConstMeth
    14. | AppVarConst
    15. | AppEnvConst
    16. | AppMethConst
    17. | MethAppConst
    18. | MethAppVar
    19. | MethAppEnv
    20. | MethAppMeth
    21. | SendConst
    22. | SendVar
    23. | SendEnv
    24. | SendMeth
    25. | Closure of closure

    Parameters

    type params = {
    1. mutable compact_table : bool;
    2. mutable copy_parent : bool;
    3. mutable clean_when_copying : bool;
    4. mutable retry_count : int;
    5. mutable bucket_small_size : int;
    }
    val params : params

    Statistics

    type stats = {
    1. classes : int;
    2. methods : int;
    3. inst_vars : int;
    }
    val stats : unit -> stats
    \ No newline at end of file + t * (table -> Stdlib.Obj.t -> t) * (Stdlib.Obj.t -> t) * Stdlib.Obj.t

    Objects

    val copy : (< .. > as 'a) -> 'a
    val create_object : table -> obj
    val create_object_opt : obj -> table -> obj
    val run_initializers : obj -> table -> unit
    val run_initializers_opt : obj -> obj -> table -> obj
    val create_object_and_run_initializers : obj -> table -> obj
    val send : obj -> tag -> t
    val sendcache : obj -> tag -> t -> int -> t
    val sendself : obj -> label -> t
    val get_public_method : obj -> tag -> closure

    Table cache

    type tables
    val lookup_tables : tables -> closure array -> tables

    Builtins to reduce code size

    type impl =
    1. | GetConst
    2. | GetVar
    3. | GetEnv
    4. | GetMeth
    5. | SetVar
    6. | AppConst
    7. | AppVar
    8. | AppEnv
    9. | AppMeth
    10. | AppConstConst
    11. | AppConstVar
    12. | AppConstEnv
    13. | AppConstMeth
    14. | AppVarConst
    15. | AppEnvConst
    16. | AppMethConst
    17. | MethAppConst
    18. | MethAppVar
    19. | MethAppEnv
    20. | MethAppMeth
    21. | SendConst
    22. | SendVar
    23. | SendEnv
    24. | SendMeth
    25. | Closure of closure

    Parameters

    type params = {
    1. mutable compact_table : bool;
    2. mutable copy_parent : bool;
    3. mutable clean_when_copying : bool;
    4. mutable retry_count : int;
    5. mutable bucket_small_size : int;
    }
    val params : params

    Statistics

    type stats = {
    1. classes : int;
    2. methods : int;
    3. inst_vars : int;
    }
    val stats : unit -> stats
    diff --git a/ocaml/Ccomp/index.html b/ocaml/Ccomp/index.html index ba34d18..08dcad7 100644 --- a/ocaml/Ccomp/index.html +++ b/ocaml/Ccomp/index.html @@ -1,7 +1,7 @@ -Ccomp (ocaml.Ccomp)

    Module Ccomp

    Compiling C files and building C libraries

    Warning: this module is unstable and part of compiler-libs.

    val command : string -> int
    val run_command : string -> unit
    val compile_file : - ?output:string -> - ?opt:string -> - ?stable_name:string -> +Ccomp (ocaml.Ccomp)

    Module Ccomp

    Compiling C files and building C libraries

    Warning: this module is unstable and part of compiler-libs.

    val command : string -> int
    val run_command : string -> unit
    val compile_file : + ?output:string -> + ?opt:string -> + ?stable_name:string -> string -> - int
    val create_archive : string -> string list -> int
    val quote_files : response_files:bool -> string list -> string
    val quote_optfile : string option -> string
    val call_linker : link_mode -> string -> string list -> string -> int
    \ No newline at end of file + int
    val create_archive : string -> string list -> int
    val quote_files : response_files:bool -> string list -> string
    val quote_optfile : string option -> string
    val call_linker : link_mode -> string -> string list -> string -> int
    diff --git a/ocaml/Clambda/index.html b/ocaml/Clambda/index.html index cd40c0a..5466f7e 100644 --- a/ocaml/Clambda/index.html +++ b/ocaml/Clambda/index.html @@ -1,5 +1,5 @@ -Clambda (ocaml.Clambda)

    Module Clambda

    type function_label = string
    type ustructured_constant =
    1. | Uconst_float of float
    2. | Uconst_int32 of int32
    3. | Uconst_int64 of int64
    4. | Uconst_nativeint of nativeint
    5. | Uconst_block of int * uconstant list
    6. | Uconst_float_array of float list
    7. | Uconst_string of string
    8. | Uconst_closure of ufunction list * string * uconstant list
    and uconstant =
    1. | Uconst_ref of string * ustructured_constant option
    2. | Uconst_int of int
    and uphantom_defining_expr =
    1. | Uphantom_const of uconstant
      (*

      The phantom-let-bound variable is a constant.

      *)
    2. | Uphantom_var of Backend_var.t
      (*

      The phantom-let-bound variable is an alias for another variable.

      *)
    3. | Uphantom_offset_var of {
      1. var : Backend_var.t;
      2. offset_in_words : int;
      }
      (*

      The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

      *)
    4. | Uphantom_read_field of {
      1. var : Backend_var.t;
      2. field : int;
      }
      (*

      The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

      *)
    5. | Uphantom_read_symbol_field of {
      1. sym : string;
      2. field : int;
      }
      (*

      As for Uphantom_read_var_field, but with the pointer specified by a symbol.

      *)
    6. | Uphantom_block of {
      1. tag : int;
      2. fields : Backend_var.t list;
      }
      (*

      The phantom-let-bound variable points at a block with the given structure.

      *)
    and ulambda =
    1. | Uvar of Backend_var.t
    2. | Uconst of uconstant
    3. | Udirect_apply of function_label * ulambda list * Debuginfo.t
    4. | Ugeneric_apply of ulambda * ulambda list * Debuginfo.t
    5. | Uclosure of ufunction list * ulambda list
    6. | Uoffset of ulambda * int
    7. | Ulet of Asttypes.mutable_flag +Clambda (ocaml.Clambda)

      Module Clambda

      type function_label = string
      type ustructured_constant =
      1. | Uconst_float of float
      2. | Uconst_int32 of int32
      3. | Uconst_int64 of int64
      4. | Uconst_nativeint of nativeint
      5. | Uconst_block of int * uconstant list
      6. | Uconst_float_array of float list
      7. | Uconst_string of string
      8. | Uconst_closure of ufunction list * string * uconstant list
      and uconstant =
      1. | Uconst_ref of string * ustructured_constant option
      2. | Uconst_int of int
      and uphantom_defining_expr =
      1. | Uphantom_const of uconstant
        (*

        The phantom-let-bound variable is a constant.

        *)
      2. | Uphantom_var of Backend_var.t
        (*

        The phantom-let-bound variable is an alias for another variable.

        *)
      3. | Uphantom_offset_var of {
        1. var : Backend_var.t;
        2. offset_in_words : int;
        }
        (*

        The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

        *)
      4. | Uphantom_read_field of {
        1. var : Backend_var.t;
        2. field : int;
        }
        (*

        The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

        *)
      5. | Uphantom_read_symbol_field of {
        1. sym : string;
        2. field : int;
        }
        (*

        As for Uphantom_read_var_field, but with the pointer specified by a symbol.

        *)
      6. | Uphantom_block of {
        1. tag : int;
        2. fields : Backend_var.t list;
        }
        (*

        The phantom-let-bound variable points at a block with the given structure.

        *)
      and ulambda =
      1. | Uvar of Backend_var.t
      2. | Uconst of uconstant
      3. | Udirect_apply of function_label * ulambda list * Debuginfo.t
      4. | Ugeneric_apply of ulambda * ulambda list * Debuginfo.t
      5. | Uclosure of ufunction list * ulambda list
      6. | Uoffset of ulambda * int
      7. | Ulet of Asttypes.mutable_flag * Lambda.value_kind * Backend_var.With_provenance.t * ulambda @@ -16,4 +16,4 @@ ustructured_constant -> ustructured_constant -> int
      val compare_constants : uconstant -> uconstant -> int
      type usymbol_provenance = {
      1. original_idents : Ident.t list;
      2. module_path : Path.t;
      }
      type uconstant_block_field =
      1. | Uconst_field_ref of string
      2. | Uconst_field_int of int
      type preallocated_block = {
      1. symbol : string;
      2. exported : bool;
      3. tag : int;
      4. fields : uconstant_block_field option list;
      5. provenance : usymbol_provenance option;
      }
      type preallocated_constant = {
      1. symbol : string;
      2. exported : bool;
      3. definition : ustructured_constant;
      4. provenance : usymbol_provenance option;
      }
      type with_constants = - ulambda * preallocated_block list * preallocated_constant list
      \ No newline at end of file + ulambda * preallocated_block list * preallocated_constant list
    diff --git a/ocaml/Clambda_primitives/index.html b/ocaml/Clambda_primitives/index.html index fc429aa..30cbff7 100644 --- a/ocaml/Clambda_primitives/index.html +++ b/ocaml/Clambda_primitives/index.html @@ -1,2 +1,2 @@ -Clambda_primitives (ocaml.Clambda_primitives)

    Module Clambda_primitives

    type mutable_flag = Asttypes.mutable_flag
    type immediate_or_pointer = Lambda.immediate_or_pointer
    type initialization_or_assignment = Lambda.initialization_or_assignment
    type is_safe = Lambda.is_safe
    type boxed =
    1. | Boxed
    2. | Unboxed
    type memory_access_size =
    1. | Sixteen
    2. | Thirty_two
    3. | Sixty_four
    type primitive =
    1. | Pread_symbol of string
    2. | Pmakeblock of int * mutable_flag * block_shape
    3. | Pfield of int * immediate_or_pointer * mutable_flag
    4. | Pfield_computed
    5. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
    6. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
    7. | Pfloatfield of int
    8. | Psetfloatfield of int * initialization_or_assignment
    9. | Pduprecord of Types.record_representation * int
    10. | Prunstack
    11. | Pperform
    12. | Presume
    13. | Preperform
    14. | Pccall of Primitive.description
    15. | Praise of raise_kind
    16. | Psequand
    17. | Psequor
    18. | Pnot
    19. | Pnegint
    20. | Paddint
    21. | Psubint
    22. | Pmulint
    23. | Pdivint of is_safe
    24. | Pmodint of is_safe
    25. | Pandint
    26. | Porint
    27. | Pxorint
    28. | Plslint
    29. | Plsrint
    30. | Pasrint
    31. | Pintcomp of integer_comparison
    32. | Pcompare_ints
    33. | Pcompare_floats
    34. | Pcompare_bints of boxed_integer
    35. | Poffsetint of int
    36. | Poffsetref of int
    37. | Pintoffloat
    38. | Pfloatofint
    39. | Pnegfloat
    40. | Pabsfloat
    41. | Paddfloat
    42. | Psubfloat
    43. | Pmulfloat
    44. | Pdivfloat
    45. | Pfloatcomp of float_comparison
    46. | Pstringlength
    47. | Pstringrefu
    48. | Pstringrefs
    49. | Pbyteslength
    50. | Pbytesrefu
    51. | Pbytessetu
    52. | Pbytesrefs
    53. | Pbytessets
    54. | Pmakearray of array_kind * mutable_flag
      (*

      For Pmakearray, the list of arguments must not be empty. The empty array should be represented by a distinguished constant in the middle end.

      *)
    55. | Pduparray of array_kind * mutable_flag
      (*

      For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

      *)
    56. | Parraylength of array_kind
    57. | Parrayrefu of array_kind
    58. | Parraysetu of array_kind
    59. | Parrayrefs of array_kind
    60. | Parraysets of array_kind
    61. | Pisint
    62. | Pisout
    63. | Pbintofint of boxed_integer
    64. | Pintofbint of boxed_integer
    65. | Pcvtbint of boxed_integer * boxed_integer
    66. | Pnegbint of boxed_integer
    67. | Paddbint of boxed_integer
    68. | Psubbint of boxed_integer
    69. | Pmulbint of boxed_integer
    70. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    71. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    72. | Pandbint of boxed_integer
    73. | Porbint of boxed_integer
    74. | Pxorbint of boxed_integer
    75. | Plslbint of boxed_integer
    76. | Plsrbint of boxed_integer
    77. | Pasrbint of boxed_integer
    78. | Pbintcomp of boxed_integer * integer_comparison
    79. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    80. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    81. | Pbigarraydim of int
    82. | Pstring_load of memory_access_size * is_safe
    83. | Pbytes_load of memory_access_size * is_safe
    84. | Pbytes_set of memory_access_size * is_safe
    85. | Pbigstring_load of memory_access_size * is_safe
    86. | Pbigstring_set of memory_access_size * is_safe
    87. | Pbswap16
    88. | Pbbswap of boxed_integer
    89. | Pint_as_pointer
    90. | Patomic_load of {
      1. immediate_or_pointer : immediate_or_pointer;
      }
    91. | Patomic_exchange
    92. | Patomic_cas
    93. | Patomic_fetch_add
    94. | Popaque
    95. | Pdls_get
    and integer_comparison = Lambda.integer_comparison =
    1. | Ceq
    2. | Cne
    3. | Clt
    4. | Cgt
    5. | Cle
    6. | Cge
    and float_comparison = Lambda.float_comparison =
    1. | CFeq
    2. | CFneq
    3. | CFlt
    4. | CFnlt
    5. | CFgt
    6. | CFngt
    7. | CFle
    8. | CFnle
    9. | CFge
    10. | CFnge
    and array_kind = Lambda.array_kind =
    1. | Pgenarray
    2. | Paddrarray
    3. | Pintarray
    4. | Pfloatarray
    and value_kind = Lambda.value_kind =
    1. | Pgenval
    2. | Pfloatval
    3. | Pboxedintval of boxed_integer
    4. | Pintval
    and block_shape = Lambda.block_shape
    and boxed_integer = Primitive.boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    and bigarray_kind = Lambda.bigarray_kind =
    1. | Pbigarray_unknown
    2. | Pbigarray_float32
    3. | Pbigarray_float64
    4. | Pbigarray_sint8
    5. | Pbigarray_uint8
    6. | Pbigarray_sint16
    7. | Pbigarray_uint16
    8. | Pbigarray_int32
    9. | Pbigarray_int64
    10. | Pbigarray_caml_int
    11. | Pbigarray_native_int
    12. | Pbigarray_complex32
    13. | Pbigarray_complex64
    and bigarray_layout = Lambda.bigarray_layout =
    1. | Pbigarray_unknown_layout
    2. | Pbigarray_c_layout
    3. | Pbigarray_fortran_layout
    and raise_kind = Lambda.raise_kind =
    1. | Raise_regular
    2. | Raise_reraise
    3. | Raise_notrace
    val equal : primitive -> primitive -> bool
    \ No newline at end of file +Clambda_primitives (ocaml.Clambda_primitives)

    Module Clambda_primitives

    type mutable_flag = Asttypes.mutable_flag
    type immediate_or_pointer = Lambda.immediate_or_pointer
    type initialization_or_assignment = Lambda.initialization_or_assignment
    type is_safe = Lambda.is_safe
    type boxed =
    1. | Boxed
    2. | Unboxed
    type memory_access_size =
    1. | Sixteen
    2. | Thirty_two
    3. | Sixty_four
    type primitive =
    1. | Pread_symbol of string
    2. | Pmakeblock of int * mutable_flag * block_shape
    3. | Pfield of int * immediate_or_pointer * mutable_flag
    4. | Pfield_computed
    5. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
    6. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
    7. | Pfloatfield of int
    8. | Psetfloatfield of int * initialization_or_assignment
    9. | Pduprecord of Types.record_representation * int
    10. | Prunstack
    11. | Pperform
    12. | Presume
    13. | Preperform
    14. | Pccall of Primitive.description
    15. | Praise of raise_kind
    16. | Psequand
    17. | Psequor
    18. | Pnot
    19. | Pnegint
    20. | Paddint
    21. | Psubint
    22. | Pmulint
    23. | Pdivint of is_safe
    24. | Pmodint of is_safe
    25. | Pandint
    26. | Porint
    27. | Pxorint
    28. | Plslint
    29. | Plsrint
    30. | Pasrint
    31. | Pintcomp of integer_comparison
    32. | Pcompare_ints
    33. | Pcompare_floats
    34. | Pcompare_bints of boxed_integer
    35. | Poffsetint of int
    36. | Poffsetref of int
    37. | Pintoffloat
    38. | Pfloatofint
    39. | Pnegfloat
    40. | Pabsfloat
    41. | Paddfloat
    42. | Psubfloat
    43. | Pmulfloat
    44. | Pdivfloat
    45. | Pfloatcomp of float_comparison
    46. | Pstringlength
    47. | Pstringrefu
    48. | Pstringrefs
    49. | Pbyteslength
    50. | Pbytesrefu
    51. | Pbytessetu
    52. | Pbytesrefs
    53. | Pbytessets
    54. | Pmakearray of array_kind * mutable_flag
      (*

      For Pmakearray, the list of arguments must not be empty. The empty array should be represented by a distinguished constant in the middle end.

      *)
    55. | Pduparray of array_kind * mutable_flag
      (*

      For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

      *)
    56. | Parraylength of array_kind
    57. | Parrayrefu of array_kind
    58. | Parraysetu of array_kind
    59. | Parrayrefs of array_kind
    60. | Parraysets of array_kind
    61. | Pisint
    62. | Pisout
    63. | Pbintofint of boxed_integer
    64. | Pintofbint of boxed_integer
    65. | Pcvtbint of boxed_integer * boxed_integer
    66. | Pnegbint of boxed_integer
    67. | Paddbint of boxed_integer
    68. | Psubbint of boxed_integer
    69. | Pmulbint of boxed_integer
    70. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    71. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    72. | Pandbint of boxed_integer
    73. | Porbint of boxed_integer
    74. | Pxorbint of boxed_integer
    75. | Plslbint of boxed_integer
    76. | Plsrbint of boxed_integer
    77. | Pasrbint of boxed_integer
    78. | Pbintcomp of boxed_integer * integer_comparison
    79. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    80. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    81. | Pbigarraydim of int
    82. | Pstring_load of memory_access_size * is_safe
    83. | Pbytes_load of memory_access_size * is_safe
    84. | Pbytes_set of memory_access_size * is_safe
    85. | Pbigstring_load of memory_access_size * is_safe
    86. | Pbigstring_set of memory_access_size * is_safe
    87. | Pbswap16
    88. | Pbbswap of boxed_integer
    89. | Pint_as_pointer
    90. | Patomic_load of {
      1. immediate_or_pointer : immediate_or_pointer;
      }
    91. | Patomic_exchange
    92. | Patomic_cas
    93. | Patomic_fetch_add
    94. | Popaque
    95. | Pdls_get
    and integer_comparison = Lambda.integer_comparison =
    1. | Ceq
    2. | Cne
    3. | Clt
    4. | Cgt
    5. | Cle
    6. | Cge
    and float_comparison = Lambda.float_comparison =
    1. | CFeq
    2. | CFneq
    3. | CFlt
    4. | CFnlt
    5. | CFgt
    6. | CFngt
    7. | CFle
    8. | CFnle
    9. | CFge
    10. | CFnge
    and array_kind = Lambda.array_kind =
    1. | Pgenarray
    2. | Paddrarray
    3. | Pintarray
    4. | Pfloatarray
    and value_kind = Lambda.value_kind =
    1. | Pgenval
    2. | Pfloatval
    3. | Pboxedintval of boxed_integer
    4. | Pintval
    and block_shape = Lambda.block_shape
    and boxed_integer = Primitive.boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    and bigarray_kind = Lambda.bigarray_kind =
    1. | Pbigarray_unknown
    2. | Pbigarray_float32
    3. | Pbigarray_float64
    4. | Pbigarray_sint8
    5. | Pbigarray_uint8
    6. | Pbigarray_sint16
    7. | Pbigarray_uint16
    8. | Pbigarray_int32
    9. | Pbigarray_int64
    10. | Pbigarray_caml_int
    11. | Pbigarray_native_int
    12. | Pbigarray_complex32
    13. | Pbigarray_complex64
    and bigarray_layout = Lambda.bigarray_layout =
    1. | Pbigarray_unknown_layout
    2. | Pbigarray_c_layout
    3. | Pbigarray_fortran_layout
    and raise_kind = Lambda.raise_kind =
    1. | Raise_regular
    2. | Raise_reraise
    3. | Raise_notrace
    val equal : primitive -> primitive -> bool
    diff --git a/ocaml/Clflags/Compiler_pass/index.html b/ocaml/Clflags/Compiler_pass/index.html index 6f762ab..3632630 100644 --- a/ocaml/Clflags/Compiler_pass/index.html +++ b/ocaml/Clflags/Compiler_pass/index.html @@ -1,2 +1,2 @@ -Compiler_pass (ocaml.Clflags.Compiler_pass)

    Module Clflags.Compiler_pass

    type t =
    1. | Parsing
    2. | Typing
    3. | Lambda
    4. | Scheduling
    5. | Emit
    val of_string : string -> t option
    val to_string : t -> string
    val is_compilation_pass : t -> bool
    val available_pass_names : filter:(t -> bool) -> native:bool -> string list
    val can_save_ir_after : t -> bool
    val compare : t -> t -> int
    val to_output_filename : t -> prefix:string -> string
    val of_input_filename : string -> t option
    \ No newline at end of file +Compiler_pass (ocaml.Clflags.Compiler_pass)

    Module Clflags.Compiler_pass

    type t =
    1. | Parsing
    2. | Typing
    3. | Lambda
    4. | Scheduling
    5. | Emit
    val of_string : string -> t option
    val to_string : t -> string
    val is_compilation_pass : t -> bool
    val available_pass_names : filter:(t -> bool) -> native:bool -> string list
    val can_save_ir_after : t -> bool
    val compare : t -> t -> int
    val to_output_filename : t -> prefix:string -> string
    val of_input_filename : string -> t option
    diff --git a/ocaml/Clflags/Float_arg_helper/index.html b/ocaml/Clflags/Float_arg_helper/index.html index 394a92b..96e226a 100644 --- a/ocaml/Clflags/Float_arg_helper/index.html +++ b/ocaml/Clflags/Float_arg_helper/index.html @@ -1,2 +1,2 @@ -Float_arg_helper (ocaml.Clflags.Float_arg_helper)

    Module Clflags.Float_arg_helper

    Optimization parameters represented as floats indexed by round number.

    type parsed
    val parse : string -> string -> parsed ref -> unit
    type parse_result =
    1. | Ok
    2. | Parse_failed of exn
    val parse_no_error : string -> parsed ref -> parse_result
    val get : key:int -> parsed -> float
    \ No newline at end of file +Float_arg_helper (ocaml.Clflags.Float_arg_helper)

    Module Clflags.Float_arg_helper

    Optimization parameters represented as floats indexed by round number.

    type parsed
    val parse : string -> string -> parsed ref -> unit
    type parse_result =
    1. | Ok
    2. | Parse_failed of exn
    val parse_no_error : string -> parsed ref -> parse_result
    val get : key:int -> parsed -> float
    diff --git a/ocaml/Clflags/Int_arg_helper/index.html b/ocaml/Clflags/Int_arg_helper/index.html index 5a8a997..c162aec 100644 --- a/ocaml/Clflags/Int_arg_helper/index.html +++ b/ocaml/Clflags/Int_arg_helper/index.html @@ -1,2 +1,2 @@ -Int_arg_helper (ocaml.Clflags.Int_arg_helper)

    Module Clflags.Int_arg_helper

    Optimization parameters represented as ints indexed by round number.

    type parsed
    val parse : string -> string -> parsed ref -> unit
    type parse_result =
    1. | Ok
    2. | Parse_failed of exn
    val parse_no_error : string -> parsed ref -> parse_result
    val get : key:int -> parsed -> int
    \ No newline at end of file +Int_arg_helper (ocaml.Clflags.Int_arg_helper)

    Module Clflags.Int_arg_helper

    Optimization parameters represented as ints indexed by round number.

    type parsed
    val parse : string -> string -> parsed ref -> unit
    type parse_result =
    1. | Ok
    2. | Parse_failed of exn
    val parse_no_error : string -> parsed ref -> parse_result
    val get : key:int -> parsed -> int
    diff --git a/ocaml/Clflags/index.html b/ocaml/Clflags/index.html index fb59af2..76c7e87 100644 --- a/ocaml/Clflags/index.html +++ b/ocaml/Clflags/index.html @@ -1,2 +1,2 @@ -Clflags (ocaml.Clflags)

    Module Clflags

    Command line flags

    module Int_arg_helper : sig ... end

    Optimization parameters represented as ints indexed by round number.

    module Float_arg_helper : sig ... end

    Optimization parameters represented as floats indexed by round number.

    type inlining_arguments = {
    1. inline_call_cost : int option;
    2. inline_alloc_cost : int option;
    3. inline_prim_cost : int option;
    4. inline_branch_cost : int option;
    5. inline_indirect_cost : int option;
    6. inline_lifting_benefit : int option;
    7. inline_branch_factor : float option;
    8. inline_max_depth : int option;
    9. inline_max_unroll : int option;
    10. inline_threshold : float option;
    11. inline_toplevel_threshold : int option;
    }
    val classic_arguments : inlining_arguments
    val o1_arguments : inlining_arguments
    val o2_arguments : inlining_arguments
    val o3_arguments : inlining_arguments
    val use_inlining_arguments_set : ?round:int -> inlining_arguments -> unit

    Set all the inlining arguments for a round. The default is set if no round is provided.

    val objfiles : string list ref
    val ccobjs : string list ref
    val dllibs : string list ref
    val cmi_file : string option ref
    val compile_only : bool ref
    val output_name : string option ref
    val include_dirs : string list ref
    val no_std_include : bool ref
    val no_cwd : bool ref
    val print_types : bool ref
    val make_archive : bool ref
    val debug : bool ref
    val debug_full : bool ref
    val unsafe : bool ref
    val use_linscan : bool ref
    val custom_runtime : bool ref
    val no_check_prims : bool ref
    val bytecode_compatible_32 : bool ref
    val output_c_object : bool ref
    val output_complete_object : bool ref
    val output_complete_executable : bool ref
    val all_ccopts : string list ref
    val classic : bool ref
    val nopervasives : bool ref
    val match_context_rows : int ref
    val safer_matching : bool ref
    val open_modules : string list ref
    val preprocessor : string option ref
    val all_ppx : string list ref
    val absname : bool ref
    val annotations : bool ref
    val binary_annotations : bool ref
    val use_threads : bool ref
    val noassert : bool ref
    val verbose : bool ref
    val noprompt : bool ref
    val nopromptcont : bool ref
    val init_file : string option ref
    val noinit : bool ref
    val noversion : bool ref
    val use_prims : string ref
    val use_runtime : string ref
    val plugin : bool ref
    val principal : bool ref
    val real_paths : bool ref
    val recursive_types : bool ref
    val strict_sequence : bool ref
    val strict_formats : bool ref
    val applicative_functors : bool ref
    val make_runtime : bool ref
    val c_compiler : string option ref
    val dllpaths : string list ref
    val make_package : bool ref
    val for_package : string option ref
    val error_size : int ref
    val float_const_prop : bool ref
    val transparent_modules : bool ref
    val unique_ids : bool ref
    val locations : bool ref
    val dump_source : bool ref
    val dump_parsetree : bool ref
    val dump_typedtree : bool ref
    val dump_shape : bool ref
    val dump_rawlambda : bool ref
    val dump_lambda : bool ref
    val dump_rawclambda : bool ref
    val dump_clambda : bool ref
    val dump_rawflambda : bool ref
    val dump_flambda : bool ref
    val dump_flambda_let : int option ref
    val dump_instr : bool ref
    val keep_camlprimc_file : bool ref
    val keep_asm_file : bool ref
    val optimize_for_speed : bool ref
    val dump_cmm : bool ref
    val dump_selection : bool ref
    val dump_cse : bool ref
    val dump_live : bool ref
    val dump_spill : bool ref
    val dump_split : bool ref
    val dump_interf : bool ref
    val dump_prefer : bool ref
    val dump_regalloc : bool ref
    val dump_reload : bool ref
    val dump_scheduling : bool ref
    val dump_linear : bool ref
    val dump_interval : bool ref
    val keep_startup_file : bool ref
    val dump_combine : bool ref
    val native_code : bool ref
    val default_inline_threshold : float
    val inline_threshold : Float_arg_helper.parsed ref
    val inlining_report : bool ref
    val simplify_rounds : int option ref
    val default_simplify_rounds : int ref
    val rounds : unit -> int
    val default_inline_max_unroll : int
    val inline_max_unroll : Int_arg_helper.parsed ref
    val default_inline_toplevel_threshold : int
    val inline_toplevel_threshold : Int_arg_helper.parsed ref
    val default_inline_call_cost : int
    val default_inline_alloc_cost : int
    val default_inline_prim_cost : int
    val default_inline_branch_cost : int
    val default_inline_indirect_cost : int
    val default_inline_lifting_benefit : int
    val inline_call_cost : Int_arg_helper.parsed ref
    val inline_alloc_cost : Int_arg_helper.parsed ref
    val inline_prim_cost : Int_arg_helper.parsed ref
    val inline_branch_cost : Int_arg_helper.parsed ref
    val inline_indirect_cost : Int_arg_helper.parsed ref
    val inline_lifting_benefit : Int_arg_helper.parsed ref
    val default_inline_branch_factor : float
    val inline_branch_factor : Float_arg_helper.parsed ref
    val dont_write_files : bool ref
    val std_include_flag : string -> string
    val std_include_dir : unit -> string list
    val shared : bool ref
    val dlcode : bool ref
    val pic_code : bool ref
    val runtime_variant : string ref
    val with_runtime : bool ref
    val force_slash : bool ref
    val keep_docs : bool ref
    val keep_locs : bool ref
    val opaque : bool ref
    val profile_columns : Profile.column list ref
    val flambda_invariant_checks : bool ref
    val unbox_closures : bool ref
    val unbox_closures_factor : int ref
    val default_unbox_closures_factor : int
    val unbox_free_vars_of_closures : bool ref
    val unbox_specialised_args : bool ref
    val clambda_checks : bool ref
    val cmm_invariants : bool ref
    val default_inline_max_depth : int
    val inline_max_depth : Int_arg_helper.parsed ref
    val remove_unused_arguments : bool ref
    val dump_flambda_verbose : bool ref
    val classic_inlining : bool ref
    val afl_instrument : bool ref
    val afl_inst_ratio : int ref
    val function_sections : bool ref
    val all_passes : string list ref
    val dumped_pass : string -> bool
    val set_dumped_pass : string -> bool -> unit
    val dump_into_file : bool ref
    val dump_dir : string option ref
    type 'a env_reader = {
    1. parse : string -> 'a option;
    2. print : 'a -> string;
    3. usage : string;
    4. env_var : string;
    }
    val color : Misc.Color.setting option ref
    val color_reader : Misc.Color.setting env_reader
    val error_style : Misc.Error_style.setting option ref
    val error_style_reader : Misc.Error_style.setting env_reader
    val unboxed_types : bool ref
    val insn_sched : bool ref
    val insn_sched_default : bool
    module Compiler_pass : sig ... end
    val stop_after : Compiler_pass.t option ref
    val should_stop_after : Compiler_pass.t -> bool
    val set_save_ir_after : Compiler_pass.t -> bool -> unit
    val should_save_ir_after : Compiler_pass.t -> bool
    val arg_spec : (string * Stdlib.Arg.spec * string) list ref
    val add_arguments : string -> (string * Stdlib.Arg.spec * string) list -> unit
    val create_usage_msg : string -> string
    val print_arguments : string -> unit
    val reset_arguments : unit -> unit
    \ No newline at end of file +Clflags (ocaml.Clflags)

    Module Clflags

    Command line flags

    module Int_arg_helper : sig ... end

    Optimization parameters represented as ints indexed by round number.

    module Float_arg_helper : sig ... end

    Optimization parameters represented as floats indexed by round number.

    type inlining_arguments = {
    1. inline_call_cost : int option;
    2. inline_alloc_cost : int option;
    3. inline_prim_cost : int option;
    4. inline_branch_cost : int option;
    5. inline_indirect_cost : int option;
    6. inline_lifting_benefit : int option;
    7. inline_branch_factor : float option;
    8. inline_max_depth : int option;
    9. inline_max_unroll : int option;
    10. inline_threshold : float option;
    11. inline_toplevel_threshold : int option;
    }
    val classic_arguments : inlining_arguments
    val o1_arguments : inlining_arguments
    val o2_arguments : inlining_arguments
    val o3_arguments : inlining_arguments
    val use_inlining_arguments_set : ?round:int -> inlining_arguments -> unit

    Set all the inlining arguments for a round. The default is set if no round is provided.

    val objfiles : string list ref
    val ccobjs : string list ref
    val dllibs : string list ref
    val cmi_file : string option ref
    val compile_only : bool ref
    val output_name : string option ref
    val include_dirs : string list ref
    val no_std_include : bool ref
    val no_cwd : bool ref
    val print_types : bool ref
    val make_archive : bool ref
    val debug : bool ref
    val debug_full : bool ref
    val unsafe : bool ref
    val use_linscan : bool ref
    val custom_runtime : bool ref
    val no_check_prims : bool ref
    val bytecode_compatible_32 : bool ref
    val output_c_object : bool ref
    val output_complete_object : bool ref
    val output_complete_executable : bool ref
    val all_ccopts : string list ref
    val classic : bool ref
    val nopervasives : bool ref
    val match_context_rows : int ref
    val safer_matching : bool ref
    val open_modules : string list ref
    val preprocessor : string option ref
    val all_ppx : string list ref
    val absname : bool ref
    val annotations : bool ref
    val binary_annotations : bool ref
    val use_threads : bool ref
    val noassert : bool ref
    val verbose : bool ref
    val noprompt : bool ref
    val nopromptcont : bool ref
    val init_file : string option ref
    val noinit : bool ref
    val noversion : bool ref
    val use_prims : string ref
    val use_runtime : string ref
    val plugin : bool ref
    val principal : bool ref
    val real_paths : bool ref
    val recursive_types : bool ref
    val strict_sequence : bool ref
    val strict_formats : bool ref
    val applicative_functors : bool ref
    val make_runtime : bool ref
    val c_compiler : string option ref
    val dllpaths : string list ref
    val make_package : bool ref
    val for_package : string option ref
    val error_size : int ref
    val float_const_prop : bool ref
    val transparent_modules : bool ref
    val unique_ids : bool ref
    val locations : bool ref
    val dump_source : bool ref
    val dump_parsetree : bool ref
    val dump_typedtree : bool ref
    val dump_shape : bool ref
    val dump_rawlambda : bool ref
    val dump_lambda : bool ref
    val dump_rawclambda : bool ref
    val dump_clambda : bool ref
    val dump_rawflambda : bool ref
    val dump_flambda : bool ref
    val dump_flambda_let : int option ref
    val dump_instr : bool ref
    val keep_camlprimc_file : bool ref
    val keep_asm_file : bool ref
    val optimize_for_speed : bool ref
    val dump_cmm : bool ref
    val dump_selection : bool ref
    val dump_cse : bool ref
    val dump_live : bool ref
    val dump_spill : bool ref
    val dump_split : bool ref
    val dump_interf : bool ref
    val dump_prefer : bool ref
    val dump_regalloc : bool ref
    val dump_reload : bool ref
    val dump_scheduling : bool ref
    val dump_linear : bool ref
    val dump_interval : bool ref
    val keep_startup_file : bool ref
    val dump_combine : bool ref
    val native_code : bool ref
    val default_inline_threshold : float
    val inline_threshold : Float_arg_helper.parsed ref
    val inlining_report : bool ref
    val simplify_rounds : int option ref
    val default_simplify_rounds : int ref
    val rounds : unit -> int
    val default_inline_max_unroll : int
    val inline_max_unroll : Int_arg_helper.parsed ref
    val default_inline_toplevel_threshold : int
    val inline_toplevel_threshold : Int_arg_helper.parsed ref
    val default_inline_call_cost : int
    val default_inline_alloc_cost : int
    val default_inline_prim_cost : int
    val default_inline_branch_cost : int
    val default_inline_indirect_cost : int
    val default_inline_lifting_benefit : int
    val inline_call_cost : Int_arg_helper.parsed ref
    val inline_alloc_cost : Int_arg_helper.parsed ref
    val inline_prim_cost : Int_arg_helper.parsed ref
    val inline_branch_cost : Int_arg_helper.parsed ref
    val inline_indirect_cost : Int_arg_helper.parsed ref
    val inline_lifting_benefit : Int_arg_helper.parsed ref
    val default_inline_branch_factor : float
    val inline_branch_factor : Float_arg_helper.parsed ref
    val dont_write_files : bool ref
    val std_include_flag : string -> string
    val std_include_dir : unit -> string list
    val shared : bool ref
    val dlcode : bool ref
    val pic_code : bool ref
    val runtime_variant : string ref
    val with_runtime : bool ref
    val force_slash : bool ref
    val keep_docs : bool ref
    val keep_locs : bool ref
    val opaque : bool ref
    val profile_columns : Profile.column list ref
    val flambda_invariant_checks : bool ref
    val unbox_closures : bool ref
    val unbox_closures_factor : int ref
    val default_unbox_closures_factor : int
    val unbox_free_vars_of_closures : bool ref
    val unbox_specialised_args : bool ref
    val clambda_checks : bool ref
    val cmm_invariants : bool ref
    val default_inline_max_depth : int
    val inline_max_depth : Int_arg_helper.parsed ref
    val remove_unused_arguments : bool ref
    val dump_flambda_verbose : bool ref
    val classic_inlining : bool ref
    val afl_instrument : bool ref
    val afl_inst_ratio : int ref
    val function_sections : bool ref
    val all_passes : string list ref
    val dumped_pass : string -> bool
    val set_dumped_pass : string -> bool -> unit
    val dump_into_file : bool ref
    val dump_dir : string option ref
    type 'a env_reader = {
    1. parse : string -> 'a option;
    2. print : 'a -> string;
    3. usage : string;
    4. env_var : string;
    }
    val color : Misc.Color.setting option ref
    val color_reader : Misc.Color.setting env_reader
    val error_style : Misc.Error_style.setting option ref
    val error_style_reader : Misc.Error_style.setting env_reader
    val unboxed_types : bool ref
    val insn_sched : bool ref
    val insn_sched_default : bool
    module Compiler_pass : sig ... end
    val stop_after : Compiler_pass.t option ref
    val should_stop_after : Compiler_pass.t -> bool
    val set_save_ir_after : Compiler_pass.t -> bool -> unit
    val should_save_ir_after : Compiler_pass.t -> bool
    val arg_spec : (string * Stdlib.Arg.spec * string) list ref
    val add_arguments : string -> (string * Stdlib.Arg.spec * string) list -> unit
    val create_usage_msg : string -> string
    val print_arguments : string -> unit
    val reset_arguments : unit -> unit
    diff --git a/ocaml/Closure/index.html b/ocaml/Closure/index.html index ff97197..fbc9366 100644 --- a/ocaml/Closure/index.html +++ b/ocaml/Closure/index.html @@ -1,6 +1,6 @@ -Closure (ocaml.Closure)

    Module Closure

    val intro : - backend:(module Backend_intf.S) -> - size:int -> +Closure (ocaml.Closure)

    Module Closure

    val intro : + backend:(module Backend_intf.S) -> + size:int -> Lambda.lambda -> - Clambda.ulambda
    val reset : unit -> unit
    \ No newline at end of file + Clambda.ulambda
    val reset : unit -> unit
    diff --git a/ocaml/Closure_conversion/index.html b/ocaml/Closure_conversion/index.html index 147321a..17953f8 100644 --- a/ocaml/Closure_conversion/index.html +++ b/ocaml/Closure_conversion/index.html @@ -1,7 +1,7 @@ -Closure_conversion (ocaml.Closure_conversion)

    Module Closure_conversion

    val lambda_to_flambda : - backend:(module Backend_intf.S) -> - module_ident:Ident.t -> - size:int -> +Closure_conversion (ocaml.Closure_conversion)

    Module Closure_conversion

    val lambda_to_flambda : + backend:(module Backend_intf.S) -> + module_ident:Ident.t -> + size:int -> Lambda.lambda -> - Flambda.program

    Generation of Flambda intermediate language code from Lambda code by performing a form of closure conversion.

    Function declarations (which may bind one or more variables identifying functions, possibly with mutual recursion) are transformed to Set_of_closures expressions. Project_closure expressions are then used to select a closure for a particular function from a Set_of_closures expression. The Set_of_closures expressions say nothing about the actual runtime layout of the closures; this is handled when Flambda code is translated to Clambda code.

    The following transformations are also performed during closure conversion:

    • Constant blocks (by which is meant things wrapped in Lambda.Const_block) are converted to applications of the Pmakeblock primitive.
    • Levent debugging event nodes are removed and the information within them attached to function, method and raise calls.
    • Tuplified functions are converted to curried functions and a stub function emitted to call the curried version. For example: let rec f (x, y) = f (x + 1, y + 1) is transformed to: let rec internal_f x y = f (x + 1,y + 1) and f (x, y) = internal_f x y (* f is marked as a stub function *)
    • The Pdirapply and Prevapply application primitives are removed and converted to normal Flambda application nodes.

    The lambda_to_flambda function is not re-entrant.

    \ No newline at end of file + Flambda.program

    Generation of Flambda intermediate language code from Lambda code by performing a form of closure conversion.

    Function declarations (which may bind one or more variables identifying functions, possibly with mutual recursion) are transformed to Set_of_closures expressions. Project_closure expressions are then used to select a closure for a particular function from a Set_of_closures expression. The Set_of_closures expressions say nothing about the actual runtime layout of the closures; this is handled when Flambda code is translated to Clambda code.

    The following transformations are also performed during closure conversion:

    • Constant blocks (by which is meant things wrapped in Lambda.Const_block) are converted to applications of the Pmakeblock primitive.
    • Levent debugging event nodes are removed and the information within them attached to function, method and raise calls.
    • Tuplified functions are converted to curried functions and a stub function emitted to call the curried version. For example: let rec f (x, y) = f (x + 1, y + 1) is transformed to: let rec internal_f x y = f (x + 1,y + 1) and f (x, y) = internal_f x y (* f is marked as a stub function *)
    • The Pdirapply and Prevapply application primitives are removed and converted to normal Flambda application nodes.

    The lambda_to_flambda function is not re-entrant.

    diff --git a/ocaml/Closure_conversion_aux/Env/index.html b/ocaml/Closure_conversion_aux/Env/index.html index 619442e..7b750ce 100644 --- a/ocaml/Closure_conversion_aux/Env/index.html +++ b/ocaml/Closure_conversion_aux/Env/index.html @@ -1,2 +1,2 @@ -Env (ocaml.Closure_conversion_aux.Env)

    Module Closure_conversion_aux.Env

    Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

    type t
    val empty : t
    val add_var : t -> Ident.t -> Variable.t -> t
    val add_vars : t -> Ident.t list -> Variable.t list -> t
    val find_var : t -> Ident.t -> Variable.t
    val find_var_exn : t -> Ident.t -> Variable.t
    val add_mutable_var : t -> Ident.t -> Mutable_variable.t -> t
    val find_mutable_var_exn : t -> Ident.t -> Mutable_variable.t
    val add_static_exception : t -> int -> Static_exception.t -> t
    val find_static_exception : t -> int -> Static_exception.t
    val add_global : t -> int -> Symbol.t -> t
    val find_global : t -> int -> Symbol.t
    \ No newline at end of file +Env (ocaml.Closure_conversion_aux.Env)

    Module Closure_conversion_aux.Env

    Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

    type t
    val empty : t
    val add_var : t -> Ident.t -> Variable.t -> t
    val add_vars : t -> Ident.t list -> Variable.t list -> t
    val find_var : t -> Ident.t -> Variable.t
    val find_var_exn : t -> Ident.t -> Variable.t
    val add_mutable_var : t -> Ident.t -> Mutable_variable.t -> t
    val find_mutable_var_exn : t -> Ident.t -> Mutable_variable.t
    val add_static_exception : t -> int -> Static_exception.t -> t
    val find_static_exception : t -> int -> Static_exception.t
    val add_global : t -> int -> Symbol.t -> t
    val find_global : t -> int -> Symbol.t
    diff --git a/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html b/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html index e600edd..18b316d 100644 --- a/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html +++ b/ocaml/Closure_conversion_aux/Function_decls/Function_decl/index.html @@ -1,10 +1,10 @@ -Function_decl (ocaml.Closure_conversion_aux.Function_decls.Function_decl)

    Module Function_decls.Function_decl

    type t
    val create : - let_rec_ident:Ident.t option -> - closure_bound_var:Variable.t -> - kind:Lambda.function_kind -> - params:Ident.t list -> - body:Lambda.lambda -> - attr:Lambda.function_attribute -> - loc:Lambda.scoped_location -> - t
    val let_rec_ident : t -> Ident.t
    val closure_bound_var : t -> Variable.t
    val kind : t -> Lambda.function_kind
    val params : t -> Ident.t list
    val body : t -> Lambda.lambda
    val inline : t -> Lambda.inline_attribute
    val specialise : t -> Lambda.specialise_attribute
    val is_a_functor : t -> bool
    val stub : t -> bool
    val poll_attribute : t -> Lambda.poll_attribute
    val free_idents : t -> Ident.Set.t
    \ No newline at end of file +Function_decl (ocaml.Closure_conversion_aux.Function_decls.Function_decl)

    Module Function_decls.Function_decl

    type t
    val create : + let_rec_ident:Ident.t option -> + closure_bound_var:Variable.t -> + kind:Lambda.function_kind -> + params:Ident.t list -> + body:Lambda.lambda -> + attr:Lambda.function_attribute -> + loc:Lambda.scoped_location -> + t
    val let_rec_ident : t -> Ident.t
    val closure_bound_var : t -> Variable.t
    val kind : t -> Lambda.function_kind
    val params : t -> Ident.t list
    val body : t -> Lambda.lambda
    val inline : t -> Lambda.inline_attribute
    val specialise : t -> Lambda.specialise_attribute
    val is_a_functor : t -> bool
    val stub : t -> bool
    val poll_attribute : t -> Lambda.poll_attribute
    val free_idents : t -> Ident.Set.t
    diff --git a/ocaml/Closure_conversion_aux/Function_decls/index.html b/ocaml/Closure_conversion_aux/Function_decls/index.html index 4346225..c0862f4 100644 --- a/ocaml/Closure_conversion_aux/Function_decls/index.html +++ b/ocaml/Closure_conversion_aux/Function_decls/index.html @@ -1,2 +1,2 @@ -Function_decls (ocaml.Closure_conversion_aux.Function_decls)

    Module Closure_conversion_aux.Function_decls

    Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

    module Function_decl : sig ... end
    type t
    val create : Function_decl.t list -> t
    val to_list : t -> Function_decl.t list
    val all_free_idents : t -> Ident.Set.t
    val closure_env_without_parameters : Env.t -> t -> Env.t
    \ No newline at end of file +Function_decls (ocaml.Closure_conversion_aux.Function_decls)

    Module Closure_conversion_aux.Function_decls

    Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

    module Function_decl : sig ... end
    type t
    val create : Function_decl.t list -> t
    val to_list : t -> Function_decl.t list
    val all_free_idents : t -> Ident.Set.t
    val closure_env_without_parameters : Env.t -> t -> Env.t
    diff --git a/ocaml/Closure_conversion_aux/index.html b/ocaml/Closure_conversion_aux/index.html index 057a7d7..d57ef18 100644 --- a/ocaml/Closure_conversion_aux/index.html +++ b/ocaml/Closure_conversion_aux/index.html @@ -1,2 +1,2 @@ -Closure_conversion_aux (ocaml.Closure_conversion_aux)

    Module Closure_conversion_aux

    Environments and auxiliary structures used during closure conversion.

    module Env : sig ... end

    Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

    module Function_decls : sig ... end

    Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

    \ No newline at end of file +Closure_conversion_aux (ocaml.Closure_conversion_aux)

    Module Closure_conversion_aux

    Environments and auxiliary structures used during closure conversion.

    module Env : sig ... end

    Used to remember which Variable.t values correspond to which Ident.t values during closure conversion, and similarly for static exception identifiers.

    module Function_decls : sig ... end

    Used to represent information about a set of function declarations during closure conversion. (The only case in which such a set may contain more than one declaration is when processing "let rec".)

    diff --git a/ocaml/Closure_element/Map/index.html b/ocaml/Closure_element/Map/index.html index 038f750..9b09662 100644 --- a/ocaml/Closure_element/Map/index.html +++ b/ocaml/Closure_element/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Closure_element.Map)

    Module Closure_element.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Closure_element.Map)

    Module Closure_element.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Closure_element/Set/index.html b/ocaml/Closure_element/Set/index.html index 6ffa42a..d5553a6 100644 --- a/ocaml/Closure_element/Set/index.html +++ b/ocaml/Closure_element/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Closure_element.Set)

    Module Closure_element.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Closure_element.Set)

    Module Closure_element.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Closure_element/T/index.html b/ocaml/Closure_element/T/index.html index 2a74e9b..cb39c6f 100644 --- a/ocaml/Closure_element/T/index.html +++ b/ocaml/Closure_element/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Closure_element.T)

    Module Closure_element.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Closure_element.T)

    Module Closure_element.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Closure_element/Tbl/index.html b/ocaml/Closure_element/Tbl/index.html index 1e0e2f4..067cfe4 100644 --- a/ocaml/Closure_element/Tbl/index.html +++ b/ocaml/Closure_element/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Closure_element.Tbl)

    Module Closure_element.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Closure_element.Tbl)

    Module Closure_element.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Closure_element/index.html b/ocaml/Closure_element/index.html index fce4255..5b99278 100644 --- a/ocaml/Closure_element/index.html +++ b/ocaml/Closure_element/index.html @@ -1,2 +1,2 @@ -Closure_element (ocaml.Closure_element)

    Module Closure_element

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    \ No newline at end of file +Closure_element (ocaml.Closure_element)

    Module Closure_element

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    diff --git a/ocaml/Closure_id/Map/index.html b/ocaml/Closure_id/Map/index.html index 3c27056..89121aa 100644 --- a/ocaml/Closure_id/Map/index.html +++ b/ocaml/Closure_id/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Closure_id.Map)

    Module Closure_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Closure_id.Map)

    Module Closure_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Closure_id/Set/index.html b/ocaml/Closure_id/Set/index.html index f2da64d..071d273 100644 --- a/ocaml/Closure_id/Set/index.html +++ b/ocaml/Closure_id/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Closure_id.Set)

    Module Closure_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Closure_id.Set)

    Module Closure_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Closure_id/T/index.html b/ocaml/Closure_id/T/index.html index 1a8baf9..9321cae 100644 --- a/ocaml/Closure_id/T/index.html +++ b/ocaml/Closure_id/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Closure_id.T)

    Module Closure_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Closure_id.T)

    Module Closure_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Closure_id/Tbl/index.html b/ocaml/Closure_id/Tbl/index.html index e6bf3ba..41241a9 100644 --- a/ocaml/Closure_id/Tbl/index.html +++ b/ocaml/Closure_id/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Closure_id.Tbl)

    Module Closure_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Closure_id.Tbl)

    Module Closure_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Closure_id/index.html b/ocaml/Closure_id/index.html index 81993e0..2d75ed6 100644 --- a/ocaml/Closure_id/index.html +++ b/ocaml/Closure_id/index.html @@ -1,2 +1,2 @@ -Closure_id (ocaml.Closure_id)

    Module Closure_id

    CR-someday lwhite: "Closure_id" is quite a generic name. I wonder whether something like "Closure_label" would better capture that it is the label of a projection.

    An identifier, unique across the whole program (not just one compilation unit), that identifies a closure within a particular set of closures (viz. Project_closure).

    include module type of Closure_element
    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    \ No newline at end of file +Closure_id (ocaml.Closure_id)

    Module Closure_id

    CR-someday lwhite: "Closure_id" is quite a generic name. I wonder whether something like "Closure_label" would better capture that it is the label of a projection.

    An identifier, unique across the whole program (not just one compilation unit), that identifies a closure within a particular set of closures (viz. Project_closure).

    include module type of Closure_element
    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    diff --git a/ocaml/Closure_middle_end/index.html b/ocaml/Closure_middle_end/index.html index 3dd6409..9a27c84 100644 --- a/ocaml/Closure_middle_end/index.html +++ b/ocaml/Closure_middle_end/index.html @@ -1,7 +1,7 @@ -Closure_middle_end (ocaml.Closure_middle_end)

    Module Closure_middle_end

    val lambda_to_clambda : - backend:(module Backend_intf.S) -> - prefixname:string -> - ppf_dump:Stdlib.Format.formatter -> +Closure_middle_end (ocaml.Closure_middle_end)

    Module Closure_middle_end

    val lambda_to_clambda : + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Stdlib.Format.formatter -> Lambda.program -> - Clambda.with_constants
    \ No newline at end of file + Clambda.with_constants
    diff --git a/ocaml/Closure_offsets/index.html b/ocaml/Closure_offsets/index.html index 041a7bb..1f5453f 100644 --- a/ocaml/Closure_offsets/index.html +++ b/ocaml/Closure_offsets/index.html @@ -1,2 +1,2 @@ -Closure_offsets (ocaml.Closure_offsets)

    Module Closure_offsets

    Assign numerical offsets, within closure blocks, for code pointers and environment entries.

    type result = private {
    1. function_offsets : int Closure_id.Map.t;
    2. free_variable_offsets : int Var_within_closure.Map.t;
    }
    val compute : Flambda.program -> result
    \ No newline at end of file +Closure_offsets (ocaml.Closure_offsets)

    Module Closure_offsets

    Assign numerical offsets, within closure blocks, for code pointers and environment entries.

    type result = private {
    1. function_offsets : int Closure_id.Map.t;
    2. free_variable_offsets : int Var_within_closure.Map.t;
    }
    val compute : Flambda.program -> result
    diff --git a/ocaml/Closure_origin/Map/index.html b/ocaml/Closure_origin/Map/index.html index 60b3e04..514eb75 100644 --- a/ocaml/Closure_origin/Map/index.html +++ b/ocaml/Closure_origin/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Closure_origin.Map)

    Module Closure_origin.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Closure_origin.Map)

    Module Closure_origin.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Closure_origin/Set/index.html b/ocaml/Closure_origin/Set/index.html index 9a62994..f7a328d 100644 --- a/ocaml/Closure_origin/Set/index.html +++ b/ocaml/Closure_origin/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Closure_origin.Set)

    Module Closure_origin.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Closure_origin.Set)

    Module Closure_origin.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Closure_origin/T/index.html b/ocaml/Closure_origin/T/index.html index 09bad1d..eb56e38 100644 --- a/ocaml/Closure_origin/T/index.html +++ b/ocaml/Closure_origin/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Closure_origin.T)

    Module Closure_origin.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Closure_origin.T)

    Module Closure_origin.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Closure_origin/Tbl/index.html b/ocaml/Closure_origin/Tbl/index.html index fc347c7..b4d0fe3 100644 --- a/ocaml/Closure_origin/Tbl/index.html +++ b/ocaml/Closure_origin/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Closure_origin.Tbl)

    Module Closure_origin.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Closure_origin.Tbl)

    Module Closure_origin.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Closure_origin/index.html b/ocaml/Closure_origin/index.html index e1ba665..6923de9 100644 --- a/ocaml/Closure_origin/index.html +++ b/ocaml/Closure_origin/index.html @@ -1,2 +1,2 @@ -Closure_origin (ocaml.Closure_origin)

    Module Closure_origin

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Closure_id.t -> t
    val get_compilation_unit : t -> Compilation_unit.t
    \ No newline at end of file +Closure_origin (ocaml.Closure_origin)

    Module Closure_origin

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Closure_id.t -> t
    val get_compilation_unit : t -> Compilation_unit.t
    diff --git a/ocaml/Cmi_format/index.html b/ocaml/Cmi_format/index.html index 512614d..20460af 100644 --- a/ocaml/Cmi_format/index.html +++ b/ocaml/Cmi_format/index.html @@ -1,2 +1,2 @@ -Cmi_format (ocaml.Cmi_format)

    Module Cmi_format

    type pers_flags =
    1. | Rectypes
    2. | Alerts of Misc.alerts
    3. | Opaque
    type cmi_infos = {
    1. cmi_name : Misc.modname;
    2. cmi_sign : Types.signature_item list;
    3. cmi_crcs : Misc.crcs;
    4. cmi_flags : pers_flags list;
    }
    val output_cmi : string -> out_channel -> cmi_infos -> Stdlib.Digest.t
    val input_cmi : in_channel -> cmi_infos
    val read_cmi : string -> cmi_infos
    type error =
    1. | Not_an_interface of Misc.filepath
    2. | Wrong_version_interface of Misc.filepath * string
    3. | Corrupted_interface of Misc.filepath
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file +Cmi_format (ocaml.Cmi_format)

    Module Cmi_format

    type pers_flags =
    1. | Rectypes
    2. | Alerts of Misc.alerts
    3. | Opaque
    type cmi_infos = {
    1. cmi_name : Misc.modname;
    2. cmi_sign : Types.signature_item list;
    3. cmi_crcs : Misc.crcs;
    4. cmi_flags : pers_flags list;
    }
    val output_cmi : string -> out_channel -> cmi_infos -> Stdlib.Digest.t
    val input_cmi : in_channel -> cmi_infos
    val read_cmi : string -> cmi_infos
    type error =
    1. | Not_an_interface of Misc.filepath
    2. | Wrong_version_interface of Misc.filepath * string
    3. | Corrupted_interface of Misc.filepath
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Cmm/index.html b/ocaml/Cmm/index.html index e088085..1324e73 100644 --- a/ocaml/Cmm/index.html +++ b/ocaml/Cmm/index.html @@ -1,5 +1,5 @@ -Cmm (ocaml.Cmm)

    Module Cmm

    type machtype_component =
    1. | Val
    2. | Addr
    3. | Int
    4. | Float
    type machtype = machtype_component array
    val typ_void : machtype
    val typ_val : machtype
    val typ_addr : machtype
    val typ_int : machtype
    val typ_float : machtype
    val lub_component : +Cmm (ocaml.Cmm)

    Module Cmm

    type machtype_component =
    1. | Val
    2. | Addr
    3. | Int
    4. | Float
    type machtype = machtype_component array
    val typ_void : machtype
    val typ_val : machtype
    val typ_addr : machtype
    val typ_int : machtype
    val typ_float : machtype

    Least upper bound of two machtype_components.

    val ge_component : machtype_component -> machtype_component -> bool

    Returns true iff the first supplied machtype_component is greater than or equal to the second under the relation used by lub_component.

    type exttype =
    1. | XInt
      (*

      r OCaml value, word-sized integer

      *)
    2. | XInt32
      (*

      r 32-bit integer

      *)
    3. | XInt64
      (*

      r 64-bit integer

      *)
    4. | XFloat
      (*

      r double-precision FP number

      *)

    A variant of machtype used to describe arguments to external C functions

    val machtype_of_exttype : exttype -> machtype
    val machtype_of_exttype_list : exttype list -> machtype
    type integer_comparison = Lambda.integer_comparison =
    1. | Ceq
    2. | Cne
    3. | Clt
    4. | Cgt
    5. | Cle
    6. | Cge
    val negate_integer_comparison : integer_comparison -> integer_comparison
    val swap_integer_comparison : integer_comparison -> integer_comparison
    type float_comparison = Lambda.float_comparison =
    1. | CFeq
    2. | CFneq
    3. | CFlt
    4. | CFnlt
    5. | CFgt
    6. | CFngt
    7. | CFle
    8. | CFnle
    9. | CFge
    10. | CFnge
    val negate_float_comparison : float_comparison -> float_comparison
    val swap_float_comparison : float_comparison -> float_comparison
    type label = int
    val new_label : unit -> label
    val set_label : label -> unit
    val cur_label : unit -> label
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type phantom_defining_expr =
    1. | Cphantom_const_int of Targetint.t
      (*

      The phantom-let-bound variable is a constant integer. The argument must be the tagged representation of an integer within the range of type int on the target. (Analogously to Cconst_int.)

      *)
    2. | Cphantom_const_symbol of string
      (*

      The phantom-let-bound variable is an alias for a symbol.

      *)
    3. | Cphantom_var of Backend_var.t
      (*

      The phantom-let-bound variable is an alias for another variable. The aliased variable must not be a bound by a phantom let.

      *)
    4. | Cphantom_offset_var of {
      1. var : Backend_var.t;
      2. offset_in_words : int;
      }
      (*

      The phantom-let-bound-variable's value is defined by adding the given number of words to the pointer contained in the given identifier.

      *)
    5. | Cphantom_read_field of {
      1. var : Backend_var.t;
      2. field : int;
      }
      (*

      The phantom-let-bound-variable's value is found by adding the given number of words to the pointer contained in the given identifier, then dereferencing.

      *)
    6. | Cphantom_read_symbol_field of {
      1. sym : string;
      2. field : int;
      }
      (*

      As for Uphantom_read_var_field, but with the pointer specified by a symbol.

      *)
    7. | Cphantom_block of {
      1. tag : int;
      2. fields : Backend_var.t list;
      }
      (*

      The phantom-let-bound variable points at a block with the given structure.

      *)
    type memory_chunk =
    1. | Byte_unsigned
    2. | Byte_signed
    3. | Sixteen_unsigned
    4. | Sixteen_signed
    5. | Thirtytwo_unsigned
    6. | Thirtytwo_signed
    7. | Word_int
    8. | Word_val
    9. | Single
    10. | Double
    and operation =
    1. | Capply of machtype
    2. | Cextcall of string * machtype * exttype list * bool
      (*

      The machtype is the machine type of the result. The exttype list describes the unboxing types of the arguments. An empty list means "all arguments are machine words XInt". The boolean indicates whether the function may allocate.

      *)
    3. | Cload of {
      1. memory_chunk : memory_chunk;
      2. mutability : Asttypes.mutable_flag;
      3. is_atomic : bool;
      }
    4. | Calloc
    5. | Cstore of memory_chunk * Lambda.initialization_or_assignment
    6. | Caddi
    7. | Csubi
    8. | Cmuli
    9. | Cmulhi
    10. | Cdivi
    11. | Cmodi
    12. | Cand
    13. | Cor
    14. | Cxor
    15. | Clsl
    16. | Clsr
    17. | Casr
    18. | Ccmpi of integer_comparison
    19. | Caddv
    20. | Cadda
    21. | Ccmpa of integer_comparison
    22. | Cnegf
    23. | Cabsf
    24. | Caddf
    25. | Csubf
    26. | Cmulf
    27. | Cdivf
    28. | Cfloatofint
    29. | Cintoffloat
    30. | Ccmpf of float_comparison
    31. | Craise of Lambda.raise_kind
    32. | Ccheckbound
    33. | Copaque
    34. | Cdls_get
    and expression =
    1. | Cconst_int of int * Debuginfo.t
    2. | Cconst_natint of nativeint * Debuginfo.t
    3. | Cconst_float of float * Debuginfo.t
    4. | Cconst_symbol of string * Debuginfo.t
    5. | Cvar of Backend_var.t
    6. | Clet of Backend_var.With_provenance.t * expression * expression
    7. | Clet_mut of Backend_var.With_provenance.t * machtype * expression * expression
    8. | Cphantom_let of Backend_var.With_provenance.t @@ -27,4 +27,4 @@ * expression * expression * Debuginfo.t) -> - expression
    val reset : unit -> unit
    val iter_shallow_tail : (expression -> unit) -> expression -> bool

    Either apply the callback to all immediate sub-expressions that can produce the final result for the expression and return true, or do nothing and return false. Note that the notion of "tail" sub-expression used here does not match the one used to trigger tail calls; in particular, try...with handlers are considered to be in tail position (because their result become the final result for the expression).

    val map_tail : (expression -> expression) -> expression -> expression

    Apply the transformation to an expression, trying to push it to all inner sub-expressions that can produce the final result. Same disclaimer as for iter_shallow_tail about the notion of "tail" sub-expression.

    val map_shallow : (expression -> expression) -> expression -> expression

    Apply the transformation to each immediate sub-expression.

    \ No newline at end of file + expression
    val reset : unit -> unit
    val iter_shallow_tail : (expression -> unit) -> expression -> bool

    Either apply the callback to all immediate sub-expressions that can produce the final result for the expression and return true, or do nothing and return false. Note that the notion of "tail" sub-expression used here does not match the one used to trigger tail calls; in particular, try...with handlers are considered to be in tail position (because their result become the final result for the expression).

    val map_tail : (expression -> expression) -> expression -> expression

    Apply the transformation to an expression, trying to push it to all inner sub-expressions that can produce the final result. Same disclaimer as for iter_shallow_tail about the notion of "tail" sub-expression.

    val map_shallow : (expression -> expression) -> expression -> expression

    Apply the transformation to each immediate sub-expression.

    diff --git a/ocaml/Cmm_helpers/index.html b/ocaml/Cmm_helpers/index.html index 814f45f..fb5dc09 100644 --- a/ocaml/Cmm_helpers/index.html +++ b/ocaml/Cmm_helpers/index.html @@ -1,5 +1,5 @@ -Cmm_helpers (ocaml.Cmm_helpers)

    Module Cmm_helpers

    val bind : +Cmm_helpers (ocaml.Cmm_helpers)

    Module Cmm_helpers

    val bind : string -> Cmm.expression -> (Cmm.expression -> Cmm.expression) -> @@ -11,9 +11,9 @@ string -> Cmm.expression -> (Cmm.expression -> Cmm.expression) -> - Cmm.expression

    Same as bind, but does not treat variables as simple

    Headers

    val caml_black : nativeint

    A null header with GC bits set to black

    val floatarray_tag : Debuginfo.t -> Cmm.expression

    A constant equal to the tag for float arrays

    val block_header : int -> int -> nativeint

    block_header tag size creates a header with tag tag for a block of size size

    val black_block_header : int -> int -> nativeint

    Same as block_header, but with GC bits set to black

    val white_closure_header : int -> nativeint

    Closure headers of the given size

    val black_closure_header : int -> nativeint
    val infix_header : int -> nativeint

    Infix header at the given offset

    val float_header : nativeint

    Header for a boxed float value

    val floatarray_header : int -> nativeint

    Header for an unboxed float array of the given size

    val string_header : int -> nativeint

    Header for a string (or bytes) of the given length

    val boxedint32_header : nativeint

    Boxed integer headers

    val boxedint64_header : nativeint
    val boxedintnat_header : nativeint
    val closure_info : arity:int -> startenv:int -> nativeint

    Closure info for a closure of given arity and distance to environment

    val alloc_float_header : Debuginfo.t -> Cmm.expression

    Wrappers

    val alloc_floatarray_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_closure_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_infix_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_closure_info : - arity:int -> - startenv:int -> + Cmm.expression

    Same as bind, but does not treat variables as simple

    Headers

    val caml_black : nativeint

    A null header with GC bits set to black

    val floatarray_tag : Debuginfo.t -> Cmm.expression

    A constant equal to the tag for float arrays

    val block_header : int -> int -> nativeint

    block_header tag size creates a header with tag tag for a block of size size

    val black_block_header : int -> int -> nativeint

    Same as block_header, but with GC bits set to black

    val white_closure_header : int -> nativeint

    Closure headers of the given size

    val black_closure_header : int -> nativeint
    val infix_header : int -> nativeint

    Infix header at the given offset

    val float_header : nativeint

    Header for a boxed float value

    val floatarray_header : int -> nativeint

    Header for an unboxed float array of the given size

    val string_header : int -> nativeint

    Header for a string (or bytes) of the given length

    val boxedint32_header : nativeint

    Boxed integer headers

    val boxedint64_header : nativeint
    val boxedintnat_header : nativeint
    val closure_info : arity:int -> startenv:int -> nativeint

    Closure info for a closure of given arity and distance to environment

    val alloc_float_header : Debuginfo.t -> Cmm.expression

    Wrappers

    val alloc_floatarray_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_closure_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_infix_header : int -> Debuginfo.t -> Cmm.expression
    val alloc_closure_info : + arity:int -> + startenv:int -> Debuginfo.t -> Cmm.expression
    val alloc_boxedint32_header : Debuginfo.t -> Cmm.expression
    val alloc_boxedint64_header : Debuginfo.t -> Cmm.expression
    val alloc_boxedintnat_header : Debuginfo.t -> Cmm.expression

    Integers

    val max_repr_int : int

    Minimal/maximal OCaml integer values whose backend representation fits in a regular OCaml integer

    val min_repr_int : int
    val int_const : Debuginfo.t -> int -> Cmm.expression

    Make an integer constant from the given integer (tags the integer)

    val cint_const : int -> Cmm.data_item
    val targetint_const : int -> Targetint.t
    val natint_const_untagged : Debuginfo.t -> Stdlib.Nativeint.t -> Cmm.expression

    Make a Cmm constant holding the given nativeint value. Uses Cconst_int instead of Cconst_nativeint when possible to preserve peephole optimisations.

    val add_const : Cmm.expression -> int -> Debuginfo.t -> Cmm.expression

    Add an integer to the given expression

    Increment/decrement of integers

    val ignore_low_bit_int : Cmm.expression -> Cmm.expression

    Simplify the given expression knowing its last bit will be irrelevant

    val ignore_high_bit_int : Cmm.expression -> Cmm.expression

    Simplify the given expression knowing its first bit will be irrelevant

    Arithmetical operations on integers

    val div_int : Cmm.expression -> @@ -71,7 +71,7 @@ Cmm.expression -> Debuginfo.t -> Cmm.expression
    val array_indexing : - ?typ:Cmm.machtype_component -> + ?typ:Cmm.machtype_component -> int -> Cmm.expression -> Cmm.expression -> @@ -281,7 +281,7 @@ Cmm.expression -> Cmm.expression list -> Debuginfo.t -> - Cmm.expression

    Method call : send kind met obj args dbg

    • met is a method identifier, which can be a hashed variant or an index in obj's method table, depending on kind
    • obj is the object whose method is being called
    • args is the extra arguments to the method call (Note: I'm not aware of any way for the frontend to generate any arguments other than the cache and cache position)

    Generic Cmm fragments

    val generic_functions : bool -> Cmx_format.unit_infos list -> Cmm.phrase list

    Generate generic functions

    val placeholder_dbg : unit -> Debuginfo.t
    val placeholder_fun_dbg : human_name:string -> Debuginfo.t
    val entry_point : string list -> Cmm.phrase

    Entry point

    val global_table : string list -> Cmm.phrase

    Generate the caml_globals table

    val reference_symbols : string list -> Cmm.phrase

    Add references to the given symbols

    val globals_map : + Cmm.expression

    Method call : send kind met obj args dbg

    • met is a method identifier, which can be a hashed variant or an index in obj's method table, depending on kind
    • obj is the object whose method is being called
    • args is the extra arguments to the method call (Note: I'm not aware of any way for the frontend to generate any arguments other than the cache and cache position)

    Generic Cmm fragments

    val generic_functions : bool -> Cmx_format.unit_infos list -> Cmm.phrase list

    Generate generic functions

    val placeholder_dbg : unit -> Debuginfo.t
    val placeholder_fun_dbg : human_name:string -> Debuginfo.t
    val entry_point : string list -> Cmm.phrase

    Entry point

    val global_table : string list -> Cmm.phrase

    Generate the caml_globals table

    val reference_symbols : string list -> Cmm.phrase

    Add references to the given symbols

    val globals_map : (string * Stdlib.Digest.t option * Stdlib.Digest.t option * string list) list -> Cmm.phrase

    Generate the caml_globals_map structure, as a marshalled string constant

    val frame_table : string list -> Cmm.phrase

    Generate the caml_frametable table, referencing the frametables from the given compilation units

    val data_segment_table : string list -> Cmm.phrase

    Generate the tables for data and code positions respectively of the given compilation units

    val code_segment_table : string list -> Cmm.phrase
    val predef_exception : int -> string -> Cmm.phrase

    Generate data for a predefined exception

    val plugin_header : (Cmx_format.unit_infos * Stdlib.Digest.t) list -> @@ -321,4 +321,4 @@ Cmm.data_item list
    val emit_preallocated_blocks : Clambda.preallocated_block list -> Cmm.phrase list -> - Cmm.phrase list
    \ No newline at end of file + Cmm.phrase list
    diff --git a/ocaml/Cmm_invariants/index.html b/ocaml/Cmm_invariants/index.html index 02ed8fb..2d90df3 100644 --- a/ocaml/Cmm_invariants/index.html +++ b/ocaml/Cmm_invariants/index.html @@ -1,2 +1,2 @@ -Cmm_invariants (ocaml.Cmm_invariants)

    Module Cmm_invariants

    Check a number of continuation-related invariants

    run ppf fundecl analyses the given function, and returns whether any errors were encountered (with corresponding error messages printed on the given formatter).

    \ No newline at end of file +Cmm_invariants (ocaml.Cmm_invariants)

    Module Cmm_invariants

    Check a number of continuation-related invariants

    run ppf fundecl analyses the given function, and returns whether any errors were encountered (with corresponding error messages printed on the given formatter).

    diff --git a/ocaml/Cmmgen/index.html b/ocaml/Cmmgen/index.html index a463765..83d353e 100644 --- a/ocaml/Cmmgen/index.html +++ b/ocaml/Cmmgen/index.html @@ -1,6 +1,6 @@ -Cmmgen (ocaml.Cmmgen)

    Module Cmmgen

    val compunit : +Cmmgen (ocaml.Cmmgen)

    Module Cmmgen

    \ No newline at end of file + Cmm.phrase list
    diff --git a/ocaml/Cmmgen_state/index.html b/ocaml/Cmmgen_state/index.html index 0f74b0e..74024c9 100644 --- a/ocaml/Cmmgen_state/index.html +++ b/ocaml/Cmmgen_state/index.html @@ -1,2 +1,2 @@ -Cmmgen_state (ocaml.Cmmgen_state)

    Module Cmmgen_state

    Mutable state used by Cmmgen.

    type is_global =
    1. | Global
    2. | Local
    type constant =
    1. | Const_closure of is_global * Clambda.ufunction list * Clambda.uconstant list
    2. | Const_table of is_global * Cmm.data_item list
    val add_constant : Misc.Stdlib.String.t -> constant -> unit
    val add_data_items : Cmm.data_item list -> unit
    val add_function : Clambda.ufunction -> unit
    val get_and_clear_constants : unit -> constant Misc.Stdlib.String.Map.t
    val get_and_clear_data_items : unit -> Cmm.data_item list
    val next_function : unit -> Clambda.ufunction option
    val no_more_functions : unit -> bool
    val set_structured_constants : Clambda.preallocated_constant list -> unit
    val add_structured_constant : string -> Clambda.ustructured_constant -> unit
    val structured_constant_of_sym : string -> Clambda.ustructured_constant option
    \ No newline at end of file +Cmmgen_state (ocaml.Cmmgen_state)

    Module Cmmgen_state

    Mutable state used by Cmmgen.

    type is_global =
    1. | Global
    2. | Local
    type constant =
    1. | Const_closure of is_global * Clambda.ufunction list * Clambda.uconstant list
    2. | Const_table of is_global * Cmm.data_item list
    val add_constant : Misc.Stdlib.String.t -> constant -> unit
    val add_data_items : Cmm.data_item list -> unit
    val add_function : Clambda.ufunction -> unit
    val get_and_clear_constants : unit -> constant Misc.Stdlib.String.Map.t
    val get_and_clear_data_items : unit -> Cmm.data_item list
    val next_function : unit -> Clambda.ufunction option
    val no_more_functions : unit -> bool
    val set_structured_constants : Clambda.preallocated_constant list -> unit
    val add_structured_constant : string -> Clambda.ustructured_constant -> unit
    val structured_constant_of_sym : string -> Clambda.ustructured_constant option
    diff --git a/ocaml/Cmo_format/index.html b/ocaml/Cmo_format/index.html index e608ec6..e210ef1 100644 --- a/ocaml/Cmo_format/index.html +++ b/ocaml/Cmo_format/index.html @@ -1,2 +1,2 @@ -Cmo_format (ocaml.Cmo_format)

    Module Cmo_format

    type reloc_info =
    1. | Reloc_literal of Stdlib.Obj.t
    2. | Reloc_getglobal of Ident.t
    3. | Reloc_setglobal of Ident.t
    4. | Reloc_primitive of string
    type compilation_unit = {
    1. cu_name : Misc.modname;
    2. mutable cu_pos : int;
    3. cu_codesize : int;
    4. cu_reloc : (reloc_info * int) list;
    5. cu_imports : Misc.crcs;
    6. cu_required_globals : Ident.t list;
    7. cu_primitives : string list;
    8. mutable cu_debug : int;
    9. cu_debugsize : int;
    }
    type library = {
    1. lib_units : compilation_unit list;
    2. lib_custom : bool;
    3. lib_ccobjs : string list;
    4. lib_ccopts : string list;
    5. lib_dllibs : string list;
    }
    \ No newline at end of file +Cmo_format (ocaml.Cmo_format)

    Module Cmo_format

    type reloc_info =
    1. | Reloc_literal of Stdlib.Obj.t
    2. | Reloc_getglobal of Ident.t
    3. | Reloc_setglobal of Ident.t
    4. | Reloc_primitive of string
    type compilation_unit = {
    1. cu_name : Misc.modname;
    2. mutable cu_pos : int;
    3. cu_codesize : int;
    4. cu_reloc : (reloc_info * int) list;
    5. cu_imports : Misc.crcs;
    6. cu_required_globals : Ident.t list;
    7. cu_primitives : string list;
    8. mutable cu_debug : int;
    9. cu_debugsize : int;
    }
    type library = {
    1. lib_units : compilation_unit list;
    2. lib_custom : bool;
    3. lib_ccobjs : string list;
    4. lib_ccopts : string list;
    5. lib_dllibs : string list;
    }
    diff --git a/ocaml/Cmt2annot/index.html b/ocaml/Cmt2annot/index.html index ff27ea7..6d66a5b 100644 --- a/ocaml/Cmt2annot/index.html +++ b/ocaml/Cmt2annot/index.html @@ -1,7 +1,7 @@ -Cmt2annot (ocaml.Cmt2annot)

    Module Cmt2annot

    val gen_annot : +Cmt2annot (ocaml.Cmt2annot)

    Module Cmt2annot

    val gen_annot : string option -> - sourcefile:string option -> - use_summaries:bool -> + sourcefile:string option -> + use_summaries:bool -> Cmt_format.binary_annots -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Cmt_format/index.html b/ocaml/Cmt_format/index.html index 79fec12..cd59709 100644 --- a/ocaml/Cmt_format/index.html +++ b/ocaml/Cmt_format/index.html @@ -1,5 +1,5 @@ -Cmt_format (ocaml.Cmt_format)

    Module Cmt_format

    cmt and cmti files format.

    The layout of a cmt file is as follows: <cmt> := {<cmi>} <cmt magic> {cmt infos} {<source info>} where <cmi> is the cmi file format: <cmi> := <cmi magic> <cmi info>. More precisely, the optional <cmi> part must be present if and only if the file is:

    • a cmti, or
    • a cmt, for a ml file which has no corresponding mli (hence no corresponding cmti).

    Thus, we provide a common reading function for cmi and cmt(i) files which returns an option for each of the three parts: cmi info, cmt info, source info.

    type binary_annots =
    1. | Packed of Types.signature * string list
    2. | Implementation of Typedtree.structure
    3. | Interface of Typedtree.signature
    4. | Partial_implementation of binary_part array
    5. | Partial_interface of binary_part array
    and binary_part =
    1. | Partial_structure of Typedtree.structure
    2. | Partial_structure_item of Typedtree.structure_item
    3. | Partial_expression of Typedtree.expression
    4. | Partial_pattern : 'k Typedtree.pattern_category +Cmt_format (ocaml.Cmt_format)

      Module Cmt_format

      cmt and cmti files format.

      The layout of a cmt file is as follows: <cmt> := {<cmi>} <cmt magic> {cmt infos} {<source info>} where <cmi> is the cmi file format: <cmi> := <cmi magic> <cmi info>. More precisely, the optional <cmi> part must be present if and only if the file is:

      • a cmti, or
      • a cmt, for a ml file which has no corresponding mli (hence no corresponding cmti).

      Thus, we provide a common reading function for cmi and cmt(i) files which returns an option for each of the three parts: cmi info, cmt info, source info.

      type binary_annots =
      1. | Packed of Types.signature * string list
      2. | Implementation of Typedtree.structure
      3. | Interface of Typedtree.signature
      4. | Partial_implementation of binary_part array
      5. | Partial_interface of binary_part array
      and binary_part =
      1. | Partial_structure of Typedtree.structure
      2. | Partial_structure_item of Typedtree.structure_item
      3. | Partial_expression of Typedtree.expression
      4. | Partial_pattern : 'k Typedtree.pattern_category * 'k Typedtree.general_pattern -> binary_part
      5. | Partial_class_expr of Typedtree.class_expr
      6. | Partial_signature of Typedtree.signature
      7. | Partial_signature_item of Typedtree.signature_item
      8. | Partial_module_type of Typedtree.module_type
      type cmt_infos = {
      1. cmt_modname : Misc.modname;
      2. cmt_annots : binary_annots;
      3. cmt_value_dependencies : (Types.value_description * Types.value_description) list;
      4. cmt_comments : (string * Location.t) list;
      5. cmt_args : string array;
      6. cmt_sourcefile : string option;
      7. cmt_builddir : string;
      8. cmt_loadpath : string list;
      9. cmt_source_digest : string option;
      10. cmt_initial_env : Env.t;
      11. cmt_imports : Misc.crcs;
      12. cmt_interface_digest : Stdlib.Digest.t option;
      13. cmt_use_summaries : bool;
      14. cmt_uid_to_loc : Location.t Shape.Uid.Tbl.t;
      15. cmt_impl_shape : Shape.t option;
      }
      type error =
      1. | Not_a_typedtree of string
      exception Error of error
      val read : string -> Cmi_format.cmi_infos option * cmt_infos option

      read filename opens filename, and extract both the cmi_infos, if it exists, and the cmt_infos, if it exists. Thus, it can be used with .cmi, .cmt and .cmti files.

      .cmti files always contain a cmi_infos at the beginning. .cmt files only contain a cmi_infos at the beginning if there is no associated .cmti file.

      val read_cmt : string -> cmt_infos
      val read_cmi : string -> Cmi_format.cmi_infos
      val save_cmt : string -> @@ -12,4 +12,4 @@ unit

      save_cmt filename modname binary_annots sourcefile initial_env cmi writes a cmt(i) file.

      val read_magic_number : in_channel -> string
      val clear : unit -> unit
      val add_saved_type : binary_part -> unit
      val get_saved_types : unit -> binary_part list
      val set_saved_types : binary_part list -> unit
      val record_value_dependency : Types.value_description -> Types.value_description -> - unit
      \ No newline at end of file + unit
    diff --git a/ocaml/Cmx_format/index.html b/ocaml/Cmx_format/index.html index 0740a28..7e5963f 100644 --- a/ocaml/Cmx_format/index.html +++ b/ocaml/Cmx_format/index.html @@ -1,2 +1,2 @@ -Cmx_format (ocaml.Cmx_format)

    Module Cmx_format

    type export_info =
    1. | Clambda of Clambda.value_approximation
    2. | Flambda of Export_info.t
    type unit_infos = {
    1. mutable ui_name : Misc.modname;
    2. mutable ui_symbol : string;
    3. mutable ui_defines : string list;
    4. mutable ui_imports_cmi : Misc.crcs;
    5. mutable ui_imports_cmx : Misc.crcs;
    6. mutable ui_curry_fun : int list;
    7. mutable ui_apply_fun : int list;
    8. mutable ui_send_fun : int list;
    9. mutable ui_export_info : export_info;
    10. mutable ui_for_pack : string option;
    }
    type library_infos = {
    1. lib_units : (unit_infos * Stdlib.Digest.t) list;
    2. lib_ccobjs : string list;
    3. lib_ccopts : string list;
    }
    \ No newline at end of file +Cmx_format (ocaml.Cmx_format)

    Module Cmx_format

    type export_info =
    1. | Clambda of Clambda.value_approximation
    2. | Flambda of Export_info.t
    type unit_infos = {
    1. mutable ui_name : Misc.modname;
    2. mutable ui_symbol : string;
    3. mutable ui_defines : string list;
    4. mutable ui_imports_cmi : Misc.crcs;
    5. mutable ui_imports_cmx : Misc.crcs;
    6. mutable ui_curry_fun : int list;
    7. mutable ui_apply_fun : int list;
    8. mutable ui_send_fun : int list;
    9. mutable ui_export_info : export_info;
    10. mutable ui_for_pack : string option;
    }
    type library_infos = {
    1. lib_units : (unit_infos * Stdlib.Digest.t) list;
    2. lib_ccobjs : string list;
    3. lib_ccopts : string list;
    }
    diff --git a/ocaml/Cmxs_format/index.html b/ocaml/Cmxs_format/index.html index 462992f..07b5b9a 100644 --- a/ocaml/Cmxs_format/index.html +++ b/ocaml/Cmxs_format/index.html @@ -1,2 +1,2 @@ -Cmxs_format (ocaml.Cmxs_format)

    Module Cmxs_format

    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type dynunit = {
    1. dynu_name : modname;
    2. dynu_crc : Stdlib.Digest.t;
    3. dynu_imports_cmi : crcs;
    4. dynu_imports_cmx : crcs;
    5. dynu_defines : string list;
    }
    type dynheader = {
    1. dynu_magic : string;
    2. dynu_units : dynunit list;
    }
    \ No newline at end of file +Cmxs_format (ocaml.Cmxs_format)

    Module Cmxs_format

    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type dynunit = {
    1. dynu_name : modname;
    2. dynu_crc : Stdlib.Digest.t;
    3. dynu_imports_cmi : crcs;
    4. dynu_imports_cmx : crcs;
    5. dynu_defines : string list;
    }
    type dynheader = {
    1. dynu_magic : string;
    2. dynu_units : dynunit list;
    }
    diff --git a/ocaml/Coloring/index.html b/ocaml/Coloring/index.html index 3d8b2ca..25a0541 100644 --- a/ocaml/Coloring/index.html +++ b/ocaml/Coloring/index.html @@ -1,2 +1,2 @@ -Coloring (ocaml.Coloring)

    Module Coloring

    val allocate_registers : unit -> int array
    \ No newline at end of file +Coloring (ocaml.Coloring)

    Module Coloring

    val allocate_registers : unit -> int array
    diff --git a/ocaml/Comballoc/index.html b/ocaml/Comballoc/index.html index 44c9997..56a53a8 100644 --- a/ocaml/Comballoc/index.html +++ b/ocaml/Comballoc/index.html @@ -1,2 +1,2 @@ -Comballoc (ocaml.Comballoc)

    Module Comballoc

    val fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +Comballoc (ocaml.Comballoc)

    Module Comballoc

    val fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/ocaml/Compenv/index.html b/ocaml/Compenv/index.html index 43dd777..08d951e 100644 --- a/ocaml/Compenv/index.html +++ b/ocaml/Compenv/index.html @@ -1,18 +1,18 @@ -Compenv (ocaml.Compenv)

    Module Compenv

    exception Exit_with_status of int
    val module_of_filename : string -> string -> string
    val output_prefix : string -> string
    val extract_output : string option -> string
    val default_output : string option -> string
    val print_version_and_library : string -> 'a
    val print_version_string : unit -> 'a
    val print_standard_library : unit -> 'a
    val fatal : string -> 'a
    val first_ccopts : string list ref
    val first_ppx : string list ref
    val first_include_dirs : string list ref
    val last_include_dirs : string list ref
    val get_objfiles : with_ocamlparam:bool -> string list
    val last_objfiles : string list ref
    val first_objfiles : string list ref
    val stop_early : bool ref
    val has_linker_inputs : bool ref
    type filename = string
    type readenv_position =
    1. | Before_args
    2. | Before_compile of filename
    val readenv : Stdlib.Format.formatter -> readenv_position -> unit
    val is_unit_name : string -> bool
    val check_unit_name : string -> string -> unit
    type deferred_action =
    1. | ProcessImplementation of string
    2. | ProcessInterface of string
    3. | ProcessCFile of string
    4. | ProcessOtherFile of string
    5. | ProcessObjects of string list
    6. | ProcessDLLs of string list
    val c_object_of_filename : string -> string
    val defer : deferred_action -> unit
    val anonymous : string -> unit
    val impl : string -> unit
    val intf : string -> unit
    val process_deferred_actions : +Compenv (ocaml.Compenv)

    Module Compenv

    exception Exit_with_status of int
    val module_of_filename : string -> string -> string
    val output_prefix : string -> string
    val extract_output : string option -> string
    val default_output : string option -> string
    val print_version_and_library : string -> 'a
    val print_version_string : unit -> 'a
    val print_standard_library : unit -> 'a
    val fatal : string -> 'a
    val first_ccopts : string list ref
    val first_ppx : string list ref
    val first_include_dirs : string list ref
    val last_include_dirs : string list ref
    val get_objfiles : with_ocamlparam:bool -> string list
    val last_objfiles : string list ref
    val first_objfiles : string list ref
    val stop_early : bool ref
    val has_linker_inputs : bool ref
    type filename = string
    type readenv_position =
    1. | Before_args
    2. | Before_compile of filename
    val readenv : Stdlib.Format.formatter -> readenv_position -> unit
    val is_unit_name : string -> bool
    val check_unit_name : string -> string -> unit
    type deferred_action =
    1. | ProcessImplementation of string
    2. | ProcessInterface of string
    3. | ProcessCFile of string
    4. | ProcessOtherFile of string
    5. | ProcessObjects of string list
    6. | ProcessDLLs of string list
    val c_object_of_filename : string -> string
    val defer : deferred_action -> unit
    val anonymous : string -> unit
    val impl : string -> unit
    val intf : string -> unit
    val process_deferred_actions : (Stdlib.Format.formatter - * (start_from:Clflags.Compiler_pass.t -> - source_file:string -> - output_prefix:string -> + * (start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> unit) - * (source_file:string -> - output_prefix:string -> + * (source_file:string -> + output_prefix:string -> unit) * string * string) -> unit
    val parse_arguments : - ?current:int ref -> + ?current:int ref -> string array ref -> Stdlib.Arg.anon_fun -> string -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Compilation_unit/Map/index.html b/ocaml/Compilation_unit/Map/index.html index 1afe3a3..5632b3d 100644 --- a/ocaml/Compilation_unit/Map/index.html +++ b/ocaml/Compilation_unit/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Compilation_unit.Map)

    Module Compilation_unit.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Compilation_unit.Map)

    Module Compilation_unit.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Compilation_unit/Set/index.html b/ocaml/Compilation_unit/Set/index.html index 92e2a0f..dad1882 100644 --- a/ocaml/Compilation_unit/Set/index.html +++ b/ocaml/Compilation_unit/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Compilation_unit.Set)

    Module Compilation_unit.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Compilation_unit.Set)

    Module Compilation_unit.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Compilation_unit/T/index.html b/ocaml/Compilation_unit/T/index.html index 5cbdf06..e615c1a 100644 --- a/ocaml/Compilation_unit/T/index.html +++ b/ocaml/Compilation_unit/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Compilation_unit.T)

    Module Compilation_unit.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Compilation_unit.T)

    Module Compilation_unit.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Compilation_unit/Tbl/index.html b/ocaml/Compilation_unit/Tbl/index.html index 716e6c8..60b7d62 100644 --- a/ocaml/Compilation_unit/Tbl/index.html +++ b/ocaml/Compilation_unit/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Compilation_unit.Tbl)

    Module Compilation_unit.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Compilation_unit.Tbl)

    Module Compilation_unit.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Compilation_unit/index.html b/ocaml/Compilation_unit/index.html index f52bea6..eac72f5 100644 --- a/ocaml/Compilation_unit/index.html +++ b/ocaml/Compilation_unit/index.html @@ -1,2 +1,2 @@ -Compilation_unit (ocaml.Compilation_unit)

    Module Compilation_unit

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Ident.t -> Linkage_name.t -> t
    val get_persistent_ident : t -> Ident.t
    val get_linkage_name : t -> Linkage_name.t
    val is_current : t -> bool
    val set_current : t -> unit
    val get_current : unit -> t option
    val get_current_exn : unit -> t
    val get_current_id_exn : unit -> Ident.t
    val string_for_printing : t -> string
    \ No newline at end of file +Compilation_unit (ocaml.Compilation_unit)

    Module Compilation_unit

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Ident.t -> Linkage_name.t -> t
    val get_persistent_ident : t -> Ident.t
    val get_linkage_name : t -> Linkage_name.t
    val is_current : t -> bool
    val set_current : t -> unit
    val get_current : unit -> t option
    val get_current_exn : unit -> t
    val get_current_id_exn : unit -> Ident.t
    val string_for_printing : t -> string
    diff --git a/ocaml/Compile/index.html b/ocaml/Compile/index.html index 01b8b61..8c5f93a 100644 --- a/ocaml/Compile/index.html +++ b/ocaml/Compile/index.html @@ -1,12 +1,12 @@ -Compile (ocaml.Compile)

    Module Compile

    Bytecode compilation for .ml and .mli files.

    val interface : source_file:string -> output_prefix:string -> unit
    val implementation : - start_from:Clflags.Compiler_pass.t -> - source_file:string -> - output_prefix:string -> +Compile (ocaml.Compile)

    Module Compile

    Bytecode compilation for .ml and .mli files.

    val interface : source_file:string -> output_prefix:string -> unit
    val implementation : + start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> unit

    Internal functions

    *

    to_bytecode info typed takes a typechecked implementation and returns its bytecode.

    val emit_bytecode : Compile_common.info -> (Instruct.instruction list * Ident.Set.t) -> - unit

    emit_bytecode bytecode output the bytecode executable.

    \ No newline at end of file + unit

    emit_bytecode bytecode output the bytecode executable.

    diff --git a/ocaml/Compile_common/index.html b/ocaml/Compile_common/index.html index 8c94384..f46ae04 100644 --- a/ocaml/Compile_common/index.html +++ b/ocaml/Compile_common/index.html @@ -1,12 +1,12 @@ -Compile_common (ocaml.Compile_common)

    Module Compile_common

    Common compilation pipeline between bytecode and native.

    Initialization

    type info = {
    1. source_file : string;
    2. module_name : string;
    3. output_prefix : string;
    4. env : Env.t;
    5. ppf_dump : Stdlib.Format.formatter;
    6. tool_name : string;
    7. native : bool;
    }

    Information needed to compile a file.

    val with_info : - native:bool -> - tool_name:string -> - source_file:string -> - output_prefix:string -> - dump_ext:string -> +Compile_common (ocaml.Compile_common)

    Module Compile_common

    Common compilation pipeline between bytecode and native.

    Initialization

    type info = {
    1. source_file : string;
    2. module_name : string;
    3. output_prefix : string;
    4. env : Env.t;
    5. ppf_dump : Stdlib.Format.formatter;
    6. tool_name : string;
    7. native : bool;
    }

    Information needed to compile a file.

    val with_info : + native:bool -> + tool_name:string -> + source_file:string -> + output_prefix:string -> + dump_ext:string -> (info -> 'a) -> 'a

    with_info ~native ~tool_name ~source_file ~output_prefix ~dump_ext k invokes its continuation k with an info structure built from its input, after initializing various global variables. This info structure and the initialized global state are not valid anymore after the continuation returns.

    Due to current implementation limitations in the compiler, it is unsafe to try to compile several distinct compilation units by calling with_info several times.

    Interfaces

    val parse_intf : info -> Parsetree.signature

    parse_intf info parses an interface (usually an .mli file).

    val typecheck_intf : info -> Parsetree.signature -> Typedtree.signature

    typecheck_intf info parsetree typechecks an interface and returns the typedtree of the associated signature.

    val emit_signature : info -> Parsetree.signature -> Typedtree.signature -> unit

    emit_signature info parsetree typedtree emits the .cmi file containing the given signature.

    val interface : info -> unit

    The complete compilation pipeline for interfaces.

    Implementations

    val parse_impl : info -> Parsetree.structure

    parse_impl info parses an implementation (usually an .ml file).

    typecheck_impl info parsetree typechecks an implementation and returns the typedtree of the associated module, its public interface, and a coercion against that public interface.

    val implementation : info -> - backend:(info -> Typedtree.implementation -> unit) -> - unit

    The complete compilation pipeline for implementations.

    Build artifacts

    val cmo : info -> string
    val cmx : info -> string
    val obj : info -> string
    val annot : info -> string

    Return the filename of some compiler build artifacts associated with the file being compiled.

    \ No newline at end of file + backend:(info -> Typedtree.implementation -> unit) -> + unit

    The complete compilation pipeline for implementations.

    Build artifacts

    val cmo : info -> string
    val cmx : info -> string
    val obj : info -> string
    val annot : info -> string

    Return the filename of some compiler build artifacts associated with the file being compiled.

    diff --git a/ocaml/Compilenv/index.html b/ocaml/Compilenv/index.html index 2f4ebc7..09a9ada 100644 --- a/ocaml/Compilenv/index.html +++ b/ocaml/Compilenv/index.html @@ -1,8 +1,8 @@ -Compilenv (ocaml.Compilenv)

    Module Compilenv

    val imported_sets_of_closures_table : - Simple_value_approx.function_declarations option Set_of_closures_id.Tbl.t
    val reset : ?packname:string -> string -> unit
    val unit_id_from_name : string -> Ident.t
    val current_unit_infos : unit -> Cmx_format.unit_infos
    val current_unit_name : unit -> string
    val current_unit_linkage_name : unit -> Linkage_name.t
    val current_unit : unit -> Compilation_unit.t
    val current_unit_symbol : unit -> Symbol.t
    val make_symbol : ?unitname:string -> string option -> string
    val symbol_in_current_unit : string -> bool
    val is_predefined_exception : Symbol.t -> bool
    val unit_for_global : Ident.t -> Compilation_unit.t
    val symbol_for_global : Ident.t -> string
    val symbol_for_global' : Ident.t -> Symbol.t
    val global_approx : Ident.t -> Clambda.value_approximation
    val set_global_approx : Clambda.value_approximation -> unit
    val record_global_approx_toplevel : unit -> unit
    val set_export_info : Export_info.t -> unit
    val approx_env : unit -> Export_info.t
    val approx_for_global : Compilation_unit.t -> Export_info.t option
    val need_curry_fun : int -> unit
    val need_apply_fun : int -> unit
    val need_send_fun : int -> unit
    val new_const_symbol : unit -> string
    val closure_symbol : Closure_id.t -> Symbol.t
    val function_label : Closure_id.t -> string
    val new_structured_constant : +Compilenv (ocaml.Compilenv)

    Module Compilenv

    val imported_sets_of_closures_table : + Simple_value_approx.function_declarations option Set_of_closures_id.Tbl.t
    val reset : ?packname:string -> string -> unit
    val unit_id_from_name : string -> Ident.t
    val current_unit_infos : unit -> Cmx_format.unit_infos
    val current_unit_name : unit -> string
    val current_unit_linkage_name : unit -> Linkage_name.t
    val current_unit : unit -> Compilation_unit.t
    val current_unit_symbol : unit -> Symbol.t
    val make_symbol : ?unitname:string -> string option -> string
    val symbol_in_current_unit : string -> bool
    val is_predefined_exception : Symbol.t -> bool
    val unit_for_global : Ident.t -> Compilation_unit.t
    val symbol_for_global : Ident.t -> string
    val symbol_for_global' : Ident.t -> Symbol.t
    val global_approx : Ident.t -> Clambda.value_approximation
    val set_global_approx : Clambda.value_approximation -> unit
    val record_global_approx_toplevel : unit -> unit
    val set_export_info : Export_info.t -> unit
    val approx_env : unit -> Export_info.t
    val approx_for_global : Compilation_unit.t -> Export_info.t option
    val need_curry_fun : int -> unit
    val need_apply_fun : int -> unit
    val need_send_fun : int -> unit
    val new_const_symbol : unit -> string
    val closure_symbol : Closure_id.t -> Symbol.t
    val function_label : Closure_id.t -> string
    val new_structured_constant : Clambda.ustructured_constant -> - shared:bool -> + shared:bool -> string
    val structured_constants : unit -> Clambda.preallocated_constant list
    val clear_structured_constants : unit -> unit
    val structured_constant_of_symbol : string -> - Clambda.ustructured_constant option
    val add_exported_constant : string -> unit
    type structured_constants
    val snapshot : unit -> structured_constants
    val backtrack : structured_constants -> unit
    val read_unit_info : string -> Cmx_format.unit_infos * Stdlib.Digest.t
    val write_unit_info : Cmx_format.unit_infos -> string -> unit
    val save_unit_info : string -> unit
    val cache_unit_info : Cmx_format.unit_infos -> unit
    val require_global : Ident.t -> unit
    val read_library_info : string -> Cmx_format.library_infos
    type error =
    1. | Not_a_unit_info of string
    2. | Corrupted_unit_info of string
    3. | Illegal_renaming of string * string * string
    4. | Mismatching_for_pack of string * string * string * string option
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file + Clambda.ustructured_constant option
    val add_exported_constant : string -> unit
    type structured_constants
    val snapshot : unit -> structured_constants
    val backtrack : structured_constants -> unit
    val read_unit_info : string -> Cmx_format.unit_infos * Stdlib.Digest.t
    val write_unit_info : Cmx_format.unit_infos -> string -> unit
    val save_unit_info : string -> unit
    val cache_unit_info : Cmx_format.unit_infos -> unit
    val require_global : Ident.t -> unit
    val read_library_info : string -> Cmx_format.library_infos
    type error =
    1. | Not_a_unit_info of string
    2. | Corrupted_unit_info of string
    3. | Illegal_renaming of string * string * string
    4. | Mismatching_for_pack of string * string * string * string option
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Compmisc/index.html b/ocaml/Compmisc/index.html index c639948..94b980e 100644 --- a/ocaml/Compmisc/index.html +++ b/ocaml/Compmisc/index.html @@ -1,6 +1,6 @@ -Compmisc (ocaml.Compmisc)

    Module Compmisc

    val init_path : - ?auto_include:Load_path.auto_include_callback -> - ?dir:string -> +Compmisc (ocaml.Compmisc)

    Module Compmisc

    val init_path : + ?auto_include:Load_path.auto_include_callback -> + ?dir:string -> unit -> - unit
    val initial_env : unit -> Env.t
    val set_from_env : 'a option ref -> 'a Clflags.env_reader -> unit
    val read_clflags_from_env : unit -> unit
    val with_ppf_dump : file_prefix:string -> (Stdlib.Format.formatter -> 'a) -> 'a

    auto_include find_in_dir fn is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after displaying an alert.

    \ No newline at end of file + unit
    val initial_env : unit -> Env.t
    val set_from_env : 'a option ref -> 'a Clflags.env_reader -> unit
    val read_clflags_from_env : unit -> unit
    val with_ppf_dump : file_prefix:string -> (Stdlib.Format.formatter -> 'a) -> 'a

    auto_include find_in_dir fn is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after displaying an alert.

    diff --git a/ocaml/Compression/index.html b/ocaml/Compression/index.html index eeea9a6..04a4b16 100644 --- a/ocaml/Compression/index.html +++ b/ocaml/Compression/index.html @@ -1,2 +1,2 @@ -Compression (ocaml.Compression)

    Module Compression

    val output_value : out_channel -> 'a -> unit

    Compression.output_value chan v writes the representation of v on channel chan. If compression is supported, the marshaled data representing value v is compressed before being written to channel chan. If compression is not supported, this function behaves like Stdlib.output_value.

    val input_value : in_channel -> 'a

    Compression.input_value chan reads from channel chan the byte representation of a structured value, as produced by Compression.output_value, and reconstructs and returns the corresponding value. If compression is not supported, this function behaves like Stdlib.input_value.

    val compression_supported : bool

    Reports whether compression is supported.

    \ No newline at end of file +Compression (ocaml.Compression)

    Module Compression

    val output_value : out_channel -> 'a -> unit

    Compression.output_value chan v writes the representation of v on channel chan. If compression is supported, the marshaled data representing value v is compressed before being written to channel chan. If compression is not supported, this function behaves like Stdlib.output_value.

    val input_value : in_channel -> 'a

    Compression.input_value chan reads from channel chan the byte representation of a structured value, as produced by Compression.output_value, and reconstructs and returns the corresponding value. If compression is not supported, this function behaves like Stdlib.input_value.

    val compression_supported : bool

    Reports whether compression is supported.

    diff --git a/ocaml/Config/index.html b/ocaml/Config/index.html index 21bca09..b7bb71b 100644 --- a/ocaml/Config/index.html +++ b/ocaml/Config/index.html @@ -1,2 +1,2 @@ -Config (ocaml.Config)

    Module Config

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    \ No newline at end of file +Config (ocaml.Config)

    Module Config

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    diff --git a/ocaml/Config_boot/index.html b/ocaml/Config_boot/index.html index 507cdb6..99bbcf9 100644 --- a/ocaml/Config_boot/index.html +++ b/ocaml/Config_boot/index.html @@ -1,2 +1,2 @@ -Config_boot (ocaml.Config_boot)

    Module Config_boot

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    \ No newline at end of file +Config_boot (ocaml.Config_boot)

    Module Config_boot

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    diff --git a/ocaml/Config_main/index.html b/ocaml/Config_main/index.html index ab1b90a..c6c396e 100644 --- a/ocaml/Config_main/index.html +++ b/ocaml/Config_main/index.html @@ -1,2 +1,2 @@ -Config_main (ocaml.Config_main)

    Module Config_main

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    \ No newline at end of file +Config_main (ocaml.Config_main)

    Module Config_main

    System configuration

    Warning: this module is unstable and part of compiler-libs.

    val version : string

    The current version number of the system

    val bindir : string

    The directory containing the binary programs

    val standard_library : string

    The directory containing the standard libraries

    val ccomp_type : string

    The "kind" of the C compiler, assembler and linker used: one of "cc" (for Unix-style C compilers) "msvc" (for Microsoft Visual C++ and MASM)

    val c_compiler : string

    The compiler to use for compiling C files

    val c_output_obj : string

    Name of the option of the C compiler for specifying the output file

    val c_has_debug_prefix_map : bool

    Whether the C compiler supports -fdebug-prefix-map

    val as_has_debug_prefix_map : bool

    Whether the assembler supports --debug-prefix-map

    val ocamlc_cflags : string

    The flags ocamlc should pass to the C compiler

    val ocamlc_cppflags : string

    The flags ocamlc should pass to the C preprocessor

    val ocamlopt_cflags : string
    • deprecated

      ocamlc_cflags should be used instead. The flags ocamlopt should pass to the C compiler

    val ocamlopt_cppflags : string
    • deprecated

      ocamlc_cppflags should be used instead. The flags ocamlopt should pass to the C preprocessor

    val bytecomp_c_libraries : string

    The C libraries to link with custom runtimes

    val native_c_libraries : string

    The C libraries to link with native-code programs

    val native_pack_linker : string

    The linker to use for packaging (ocamlopt -pack) and for partial links (ocamlopt -output-obj).

    val mkdll : string

    The linker command line to build dynamic libraries.

    val mkexe : string

    The linker command line to build executables.

    val mkmaindll : string

    The linker command line to build main programs as dlls.

    val default_rpath : string

    Option to add a directory to be searched for libraries at runtime (used by ocamlmklib)

    val mksharedlibrpath : string

    Option to add a directory to be searched for shared libraries at runtime (used by ocamlmklib)

    val ar : string

    Name of the ar command, or "" if not needed (MSVC)

    val interface_suffix : string ref

    Suffix for interface file names

    val exec_magic_number : string

    Magic number for bytecode executable files

    val cmi_magic_number : string

    Magic number for compiled interface files

    val cmo_magic_number : string

    Magic number for object bytecode files

    val cma_magic_number : string

    Magic number for archive files

    val cmx_magic_number : string

    Magic number for compilation unit descriptions

    val cmxa_magic_number : string

    Magic number for libraries of compilation unit descriptions

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    val cmxs_magic_number : string

    Magic number for dynamically-loadable plugins

    val cmt_magic_number : string

    Magic number for compiled interface files

    val linear_magic_number : string

    Magic number for Linear internal representation files

    val max_tag : int

    Biggest tag that can be stored in the header of a regular block.

    val lazy_tag : int

    Normally the same as Obj.lazy_tag. Separate definition because of technical reasons for bootstrapping.

    val max_young_wosize : int

    Maximal size of arrays that are directly allocated in the minor heap

    val stack_threshold : int

    Size in words of safe area at bottom of VM stack, see runtime/caml/config.h

    val stack_safety_margin : int

    Size in words of the safety margin between the bottom of the stack and the stack pointer. This margin can be used by intermediate computations of some instructions, or the event handler.

    val native_compiler : bool

    Whether the native compiler is available or not

    • since 5.1
    val architecture : string

    Name of processor type for the native-code compiler

    val model : string

    Name of processor submodel for the native-code compiler

    val system : string

    Name of operating system for the native-code compiler

    val asm : string

    The assembler (and flags) to use for assembling ocamlopt-generated code.

    val asm_cfi_supported : bool

    Whether assembler understands CFI directives

    val with_frame_pointers : bool

    Whether assembler should maintain frame pointers

    val ext_obj : string

    Extension for object files, e.g. .o under Unix.

    val ext_asm : string

    Extension for assembler files, e.g. .s under Unix.

    val ext_lib : string

    Extension for library files, e.g. .a under Unix.

    val ext_dll : string

    Extension for dynamically-loaded libraries, e.g. .so under Unix.

    val ext_exe : string

    Extension for executable programs, e.g. .exe under Windows.

    • since 4.12
    val default_executable_name : string

    Name of executable produced by linking if none is given with -o, e.g. a.out under Unix.

    val systhread_supported : bool

    Whether the system thread library is implemented

    val flexdll_dirs : string list

    Directories needed for the FlexDLL objects

    val host : string

    Whether the compiler is a cross-compiler

    val target : string

    Whether the compiler is a cross-compiler

    val flambda : bool

    Whether the compiler was configured for flambda

    val with_flambda_invariants : bool

    Whether the invariants checks for flambda are enabled

    val with_cmm_invariants : bool

    Whether the invariants checks for Cmm are enabled

    val reserved_header_bits : int

    How many bits of a block's header are reserved

    val flat_float_array : bool

    Whether the compiler and runtime automagically flatten float arrays

    val function_sections : bool

    Whether the compiler was configured to generate each function in a separate section

    val windows_unicode : bool

    Whether Windows Unicode runtime is enabled

    val naked_pointers : bool

    Whether the runtime supports naked pointers

    • since 4.14
    val supports_shared_libraries : bool

    Whether shared libraries are supported

    • since 4.08

    Whether native shared libraries are supported

    • since 5.1
    val afl_instrument : bool

    Whether afl-fuzz instrumentation is generated by default

    val ar_supports_response_files : bool

    Whether ar supports @FILE arguments.

    val print_config : out_channel -> unit

    Access to configuration values

    val config_var : string -> string option

    the configuration value of a variable, if it exists

    diff --git a/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html b/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html index 90c386c..af71fef 100644 --- a/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html +++ b/ocaml/Consistbl/Make/argument-1-Module_name/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Consistbl.Make.Module_name.Map)

    Module Module_name.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Consistbl.Make.Module_name.Map)

    Module Module_name.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html b/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html index e789c1a..5951de7 100644 --- a/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html +++ b/ocaml/Consistbl/Make/argument-1-Module_name/Set/index.html @@ -1,3 +1,2 @@ -Set (ocaml.Consistbl.Make.Module_name.Set)

    Module Module_name.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Set (ocaml.Consistbl.Make.Module_name.Set)

    Module Module_name.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html b/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html index 5f2ef2e..264e9c8 100644 --- a/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html +++ b/ocaml/Consistbl/Make/argument-1-Module_name/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Consistbl.Make.Module_name.Tbl)

    Module Module_name.Tbl

    type key = t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +Tbl (ocaml.Consistbl.Make.Module_name.Tbl)

    Module Module_name.Tbl

    type key = t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Consistbl/Make/argument-1-Module_name/index.html b/ocaml/Consistbl/Make/argument-1-Module_name/index.html index 3713204..c45a7c4 100644 --- a/ocaml/Consistbl/Make/argument-1-Module_name/index.html +++ b/ocaml/Consistbl/Make/argument-1-Module_name/index.html @@ -1,2 +1,2 @@ -Module_name (ocaml.Consistbl.Make.Module_name)

    Parameter Make.Module_name

    type t
    module Set : Set.S with type elt = t
    module Map : Map.S with type key = t
    module Tbl : Hashtbl.S with type key = t
    val compare : t -> t -> int
    \ No newline at end of file +Module_name (ocaml.Consistbl.Make.Module_name)

    Parameter Make.Module_name

    type t
    module Set : Set.S with type elt = t
    module Map : Map.S with type key = t
    module Tbl : Hashtbl.S with type key = t
    val compare : t -> t -> int
    diff --git a/ocaml/Consistbl/Make/index.html b/ocaml/Consistbl/Make/index.html index e0bdd26..5ff9f9e 100644 --- a/ocaml/Consistbl/Make/index.html +++ b/ocaml/Consistbl/Make/index.html @@ -1,5 +1,5 @@ -Make (ocaml.Consistbl.Make)

    Module Consistbl.Make

    Parameters

    module Module_name : sig ... end

    Signature

    type t
    val create : unit -> t
    val clear : t -> unit
    val check : t -> Module_name.t -> Stdlib.Digest.t -> Misc.filepath -> unit
    val check_noadd : +Make (ocaml.Consistbl.Make)

    Module Consistbl.Make

    Parameters

    module Module_name : sig ... end

    Signature

    type t
    val create : unit -> t
    val clear : t -> unit
    val check : t -> Module_name.t -> Stdlib.Digest.t -> Misc.filepath -> unit
    val check_noadd : t -> Module_name.t -> Stdlib.Digest.t -> @@ -10,4 +10,4 @@ (Module_name.t * Stdlib.Digest.t option) list
    val extract_map : Module_name.Set.t -> t -> - Stdlib.Digest.t option Module_name.Map.t
    val filter : (Module_name.t -> bool) -> t -> unit
    exception Inconsistency of {
    1. unit_name : Module_name.t;
    2. inconsistent_source : string;
    3. original_source : string;
    }
    exception Not_available of Module_name.t
    \ No newline at end of file + Stdlib.Digest.t option Module_name.Map.t
    val filter : (Module_name.t -> bool) -> t -> unit
    exception Inconsistency of {
    1. unit_name : Module_name.t;
    2. inconsistent_source : string;
    3. original_source : string;
    }
    exception Not_available of Module_name.t
    diff --git a/ocaml/Consistbl/index.html b/ocaml/Consistbl/index.html index ad2d5a4..a7a9912 100644 --- a/ocaml/Consistbl/index.html +++ b/ocaml/Consistbl/index.html @@ -1,2 +1,2 @@ -Consistbl (ocaml.Consistbl)

    Module Consistbl

    Consistency tables: for checking consistency of module CRCs

    Warning: this module is unstable and part of compiler-libs.

    module Make (Module_name : sig ... end) : sig ... end
    \ No newline at end of file +Consistbl (ocaml.Consistbl)

    Module Consistbl

    Consistency tables: for checking consistency of module CRCs

    Warning: this module is unstable and part of compiler-libs.

    module Make (Module_name : sig ... end) : sig ... end
    diff --git a/ocaml/Convert_primitives/index.html b/ocaml/Convert_primitives/index.html index 89e78e2..8300a7b 100644 --- a/ocaml/Convert_primitives/index.html +++ b/ocaml/Convert_primitives/index.html @@ -1,2 +1,2 @@ -Convert_primitives (ocaml.Convert_primitives)

    Module Convert_primitives

    \ No newline at end of file +Convert_primitives (ocaml.Convert_primitives)

    Module Convert_primitives

    diff --git a/ocaml/Ctype/index.html b/ocaml/Ctype/index.html index 40bdbeb..2488bdd 100644 --- a/ocaml/Ctype/index.html +++ b/ocaml/Ctype/index.html @@ -1,12 +1,12 @@ -Ctype (ocaml.Ctype)

    Module Ctype

    exception Unify of Errortrace.unification_error
    exception Equality of Errortrace.equality_error
    exception Moregen of Errortrace.moregen_error
    exception Subtype of Errortrace.Subtype.error
    exception Tags of Asttypes.label * Asttypes.label
    exception Cannot_expand
    exception Cannot_apply
    exception Matches_failure of Env.t * Errortrace.unification_error
    exception Incompatible
    val with_local_level : ?post:('a -> unit) -> (unit -> 'a) -> 'a
    val with_local_level_if : bool -> (unit -> 'a) -> post:('a -> unit) -> 'a
    val with_local_level_iter : (unit -> 'a * 'b list) -> post:('b -> unit) -> 'a
    val with_local_level_iter_if : +Ctype (ocaml.Ctype)

    Module Ctype

    exception Unify of Errortrace.unification_error
    exception Equality of Errortrace.equality_error
    exception Moregen of Errortrace.moregen_error
    exception Subtype of Errortrace.Subtype.error
    exception Tags of Asttypes.label * Asttypes.label
    exception Cannot_expand
    exception Cannot_apply
    exception Matches_failure of Env.t * Errortrace.unification_error
    exception Incompatible
    val with_local_level : ?post:('a -> unit) -> (unit -> 'a) -> 'a
    val with_local_level_if : bool -> (unit -> 'a) -> post:('a -> unit) -> 'a
    val with_local_level_iter : (unit -> 'a * 'b list) -> post:('b -> unit) -> 'a
    val with_local_level_iter_if : bool -> (unit -> 'a * 'b list) -> - post:('b -> unit) -> - 'a
    val with_level : level:int -> (unit -> 'a) -> 'a
    val with_level_if : bool -> level:int -> (unit -> 'a) -> 'a
    val with_local_level_if_principal : (unit -> 'a) -> post:('a -> unit) -> 'a
    val with_local_level_iter_if_principal : + post:('b -> unit) -> + 'a
    val with_level : level:int -> (unit -> 'a) -> 'a
    val with_level_if : bool -> level:int -> (unit -> 'a) -> 'a
    val with_local_level_if_principal : (unit -> 'a) -> post:('a -> unit) -> 'a
    val with_local_level_iter_if_principal : (unit -> 'a * 'b list) -> - post:('b -> unit) -> - 'a
    val with_local_level_for_class : ?post:('a -> unit) -> (unit -> 'a) -> 'a
    val with_raised_nongen_level : (unit -> 'a) -> 'a
    val reset_global_level : unit -> unit
    val increase_global_level : unit -> int
    val restore_global_level : int -> unit
    val create_scope : unit -> int
    val new_scoped_ty : int -> Types.type_desc -> Types.type_expr
    val newvar : ?name:string -> unit -> Types.type_expr
    val newvar2 : ?name:string -> int -> Types.type_expr
    val new_global_var : ?name:string -> unit -> Types.type_expr
    val newconstr : Path.t -> Types.type_expr list -> Types.type_expr
    val none : Types.type_expr
    val object_fields : Types.type_expr -> Types.type_expr
    val flatten_fields : + post:('b -> unit) -> + 'a
    val with_local_level_for_class : ?post:('a -> unit) -> (unit -> 'a) -> 'a
    val with_raised_nongen_level : (unit -> 'a) -> 'a
    val reset_global_level : unit -> unit
    val increase_global_level : unit -> int
    val restore_global_level : int -> unit
    val create_scope : unit -> int
    val new_scoped_ty : int -> Types.type_desc -> Types.type_expr
    val newvar : ?name:string -> unit -> Types.type_expr
    val newvar2 : ?name:string -> int -> Types.type_expr
    val new_global_var : ?name:string -> unit -> Types.type_expr
    val newconstr : Path.t -> Types.type_expr list -> Types.type_expr
    val none : Types.type_expr
    val object_fields : Types.type_expr -> Types.type_expr
    val flatten_fields : Types.type_expr -> (string * Types.field_kind * Types.type_expr) list * Types.type_expr

    Transform a field type into a list of pairs label-type. The fields are sorted.

    Beware of the interaction with GADTs:

    Due to the introduction of object indexes for GADTs, the row variable of an object may now be an expansible type abbreviation. A first consequence is that flatten_fields will not completely flatten the object, since the type abbreviation will not be expanded (flatten_fields does not receive the current environment). Another consequence is that various functions may be called with the expansion of this type abbreviation, which is a Tfield, e.g. during printing.

    Concrete problems have been fixed, but new bugs may appear in the future. (Test cases were added to typing-gadts/test.ml)

    val associate_fields : (string * Types.field_kind * Types.type_expr) list -> @@ -35,9 +35,9 @@ * (Asttypes.label * Types.row_field * Types.row_field) list
    val filter_row_fields : bool -> (Asttypes.label * Types.row_field) list -> - (Asttypes.label * Types.row_field) list
    val generalize : Types.type_expr -> unit
    val lower_contravariant : Env.t -> Types.type_expr -> unit
    val lower_variables_only : Env.t -> int -> Types.type_expr -> unit
    val enforce_current_level : Env.t -> Types.type_expr -> unit
    val generalize_structure : Types.type_expr -> unit
    val generalize_class_type : Types.class_type -> unit
    val generalize_class_type_structure : Types.class_type -> unit
    val generalize_class_signature_spine : Env.t -> Types.class_signature -> unit
    val correct_levels : Types.type_expr -> Types.type_expr
    val limited_generalize : Types.type_expr -> Types.type_expr -> unit
    val limited_generalize_class_type : Types.type_expr -> Types.class_type -> unit
    val fully_generic : Types.type_expr -> bool
    val check_scope_escape : Env.t -> int -> Types.type_expr -> unit
    val instance : ?partial:bool -> Types.type_expr -> Types.type_expr
    val generic_instance : Types.type_expr -> Types.type_expr
    val instance_list : Types.type_expr list -> Types.type_expr list
    val new_local_type : - ?loc:Location.t -> - ?manifest_and_scope:(Types.type_expr * int) -> + (Asttypes.label * Types.row_field) list
    val generalize : Types.type_expr -> unit
    val lower_contravariant : Env.t -> Types.type_expr -> unit
    val lower_variables_only : Env.t -> int -> Types.type_expr -> unit
    val enforce_current_level : Env.t -> Types.type_expr -> unit
    val generalize_structure : Types.type_expr -> unit
    val generalize_class_type : Types.class_type -> unit
    val generalize_class_type_structure : Types.class_type -> unit
    val generalize_class_signature_spine : Env.t -> Types.class_signature -> unit
    val correct_levels : Types.type_expr -> Types.type_expr
    val limited_generalize : Types.type_expr -> Types.type_expr -> unit
    val limited_generalize_class_type : Types.type_expr -> Types.class_type -> unit
    val fully_generic : Types.type_expr -> bool
    val check_scope_escape : Env.t -> int -> Types.type_expr -> unit
    val instance : ?partial:bool -> Types.type_expr -> Types.type_expr
    val generic_instance : Types.type_expr -> Types.type_expr
    val instance_list : Types.type_expr list -> Types.type_expr list
    val new_local_type : + ?loc:Location.t -> + ?manifest_and_scope:(Types.type_expr * int) -> unit -> Types.type_declaration
    val instance_parameterized_type : - ?keep_names:bool -> + ?keep_names:bool -> Types.type_expr list -> Types.type_expr -> Types.type_expr list * Types.type_expr
    val instance_declaration : Types.type_declaration -> Types.type_declaration
    val generic_instance_declaration : @@ -55,7 +55,7 @@ Types.type_expr list -> Types.class_type -> Types.type_expr list * Types.class_type
    val instance_poly : - ?keep_names:bool -> + ?keep_names:bool -> bool -> Types.type_expr list -> Types.type_expr -> @@ -67,28 +67,28 @@ bool -> Types.label_description -> Types.type_expr list * Types.type_expr * Types.type_expr
    val apply : - ?use_current_level:bool -> + ?use_current_level:bool -> Env.t -> Types.type_expr list -> Types.type_expr -> Types.type_expr list -> Types.type_expr
    val try_expand_once_opt : Env.t -> Types.type_expr -> Types.type_expr
    val try_expand_safe_opt : Env.t -> Types.type_expr -> Types.type_expr
    val expand_head_once : Env.t -> Types.type_expr -> Types.type_expr
    val expand_head : Env.t -> Types.type_expr -> Types.type_expr
    val expand_head_opt : Env.t -> Types.type_expr -> Types.type_expr

    The compiler's own version of expand_head necessary for type-based optimisations.

    Expansion of types for error traces; lives here instead of in Errortrace because the expansion machinery lives here.

    val expanded_diff : Env.t -> - got:Types.type_expr -> - expected:Types.type_expr -> + got:Types.type_expr -> + expected:Types.type_expr -> (Errortrace.expanded_type, 'variant) Errortrace.elt

    Create an Errortrace.Diff by expanding the two types

    val unexpanded_diff : - got:Types.type_expr -> - expected:Types.type_expr -> + got:Types.type_expr -> + expected:Types.type_expr -> (Errortrace.expanded_type, 'variant) Errortrace.elt

    Create an Errortrace.Diff by *duplicating* the two types, so that each one's expansion is identical to itself. Despite the name, does create Errortrace.expanded_types.

    val full_expand : - may_forget_scope:bool -> + may_forget_scope:bool -> Env.t -> Types.type_expr -> Types.type_expr
    type typedecl_extraction_result =
    1. | Typedecl of Path.t * Path.t * Types.type_declaration
    2. | Has_no_typedecl
    3. | May_have_typedecl
    val extract_concrete_typedecl : Env.t -> Types.type_expr -> typedecl_extraction_result
    val unify : Env.t -> Types.type_expr -> Types.type_expr -> unit
    val unify_gadt : - equations_level:int -> - allow_recursive_equations:bool -> + equations_level:int -> + allow_recursive_equations:bool -> Env.t ref -> Types.type_expr -> Types.type_expr -> @@ -102,12 +102,12 @@ Types.type_expr -> Types.type_expr -> bool
    val rigidify : Types.type_expr -> Types.type_expr list
    val all_distinct_vars : Env.t -> Types.type_expr list -> bool
    val matches : - expand_error_trace:bool -> + expand_error_trace:bool -> Env.t -> Types.type_expr -> Types.type_expr -> unit
    val does_match : Env.t -> Types.type_expr -> Types.type_expr -> bool
    val reify_univars : Env.t -> Types.type_expr -> Types.type_expr
    type filter_arrow_failure =
    1. | Unification_error of Errortrace.unification_error
    2. | Label_mismatch of {
      1. got : Asttypes.arg_label;
      2. expected : Asttypes.arg_label;
      3. expected_type : Types.type_expr;
      }
    3. | Not_a_function
    exception Filter_arrow_failed of filter_arrow_failure
    type filter_method_failure =
    1. | Unification_error of Errortrace.unification_error
    2. | Not_a_method
    3. | Not_an_object of Types.type_expr
    exception Filter_method_failed of filter_method_failure
    type class_match_failure =
    1. | CM_Virtual_class
    2. | CM_Parameter_arity_mismatch of int * int
    3. | CM_Type_parameter_mismatch of Env.t * Errortrace.equality_error
    4. | CM_Class_type_mismatch of Env.t * Types.class_type * Types.class_type
    5. | CM_Parameter_mismatch of Env.t * Errortrace.moregen_error
    6. | CM_Val_type_mismatch of string * Env.t * Errortrace.comparison_error
    7. | CM_Meth_type_mismatch of string * Env.t * Errortrace.comparison_error
    8. | CM_Non_mutable_value of string
    9. | CM_Non_concrete_value of string
    10. | CM_Missing_value of string
    11. | CM_Missing_method of string
    12. | CM_Hide_public of string
    13. | CM_Hide_virtual of string * string
    14. | CM_Public_method of string
    15. | CM_Private_method of string
    16. | CM_Virtual_method of string
    val match_class_types : - ?trace:bool -> + ?trace:bool -> Env.t -> Types.class_type -> Types.class_type -> @@ -133,7 +133,7 @@ Types.class_type -> Types.type_expr list -> Types.class_type -> - class_match_failure list
    val enlarge_type : Env.t -> Types.type_expr -> Types.type_expr * bool
    val subtype : Env.t -> Types.type_expr -> Types.type_expr -> unit -> unit
    val new_class_signature : unit -> Types.class_signature
    val add_dummy_method : Env.t -> scope:int -> Types.class_signature -> unit
    type add_method_failure =
    1. | Unexpected_method
    2. | Type_mismatch of Errortrace.unification_error
    exception Add_method_failed of add_method_failure
    val add_method : + class_match_failure list
    val enlarge_type : Env.t -> Types.type_expr -> Types.type_expr * bool
    val subtype : Env.t -> Types.type_expr -> Types.type_expr -> unit -> unit
    val new_class_signature : unit -> Types.class_signature
    val add_dummy_method : Env.t -> scope:int -> Types.class_signature -> unit
    type add_method_failure =
    1. | Unexpected_method
    2. | Type_mismatch of Errortrace.unification_error
    exception Add_method_failed of add_method_failure
    val add_method : Env.t -> Asttypes.label -> Asttypes.private_flag -> @@ -141,7 +141,7 @@ Types.type_expr -> Types.class_signature -> unit
    type add_instance_variable_failure =
    1. | Mutability_mismatch of Asttypes.mutable_flag
    2. | Type_mismatch of Errortrace.unification_error
    exception Add_instance_variable_failed of add_instance_variable_failure
    val add_instance_variable : - strict:bool -> + strict:bool -> Env.t -> Asttypes.label -> Asttypes.mutable_flag -> @@ -149,7 +149,7 @@ Types.type_expr -> Types.class_signature -> unit
    type inherit_class_signature_failure =
    1. | Self_type_mismatch of Errortrace.unification_error
    2. | Method of Asttypes.label * add_method_failure
    3. | Instance_variable of Asttypes.label * add_instance_variable_failure
    exception Inherit_class_signature_failed of inherit_class_signature_failure
    val inherit_class_signature : - strict:bool -> + strict:bool -> Env.t -> Types.class_signature -> Types.class_signature -> @@ -175,7 +175,7 @@ Types.class_type_declaration -> Types.class_type_declaration
    val is_contractive : Env.t -> Path.t -> bool
    val normalize_type : Types.type_expr -> unit
    val nongen_vars_in_schema : Env.t -> Types.type_expr -> Btype.TypeSet.t option
    val nongen_vars_in_class_declaration : Types.class_declaration -> - Btype.TypeSet.t option
    type variable_kind =
    1. | Row_variable
    2. | Type_variable
    type closed_class_failure = {
    1. free_variable : Types.type_expr * variable_kind;
    2. meth : string;
    3. meth_ty : Types.type_expr;
    }
    val free_variables : ?env:Env.t -> Types.type_expr -> Types.type_expr list
    val closed_type_decl : Types.type_declaration -> Types.type_expr option
    val closed_extension_constructor : + Btype.TypeSet.t option
    type variable_kind =
    1. | Row_variable
    2. | Type_variable
    type closed_class_failure = {
    1. free_variable : Types.type_expr * variable_kind;
    2. meth : string;
    3. meth_ty : Types.type_expr;
    }
    val free_variables : ?env:Env.t -> Types.type_expr -> Types.type_expr list
    val closed_type_decl : Types.type_declaration -> Types.type_expr option
    val closed_extension_constructor : Types.extension_constructor -> Types.type_expr option
    val closed_class : Types.type_expr list -> @@ -187,4 +187,4 @@ Path.t -> (Longident.t * Types.type_expr) list -> bool) - ref
    val mcomp : Env.t -> Types.type_expr -> Types.type_expr -> unit
    \ No newline at end of file + ref
    val mcomp : Env.t -> Types.type_expr -> Types.type_expr -> unit
    diff --git a/ocaml/Dataflow/Backward/argument-1-D/index.html b/ocaml/Dataflow/Backward/argument-1-D/index.html index 872de30..d9ffb0a 100644 --- a/ocaml/Dataflow/Backward/argument-1-D/index.html +++ b/ocaml/Dataflow/Backward/argument-1-D/index.html @@ -1,2 +1,2 @@ -D (ocaml.Dataflow.Backward.D)

    Parameter Backward.D

    type t
    val bot : t
    val join : t -> t -> t
    val lessequal : t -> t -> bool
    \ No newline at end of file +D (ocaml.Dataflow.Backward.D)

    Parameter Backward.D

    type t
    val bot : t
    val join : t -> t -> t
    val lessequal : t -> t -> bool
    diff --git a/ocaml/Dataflow/Backward/index.html b/ocaml/Dataflow/Backward/index.html index b8136ef..5f8aa01 100644 --- a/ocaml/Dataflow/Backward/index.html +++ b/ocaml/Dataflow/Backward/index.html @@ -1,7 +1,7 @@ -Backward (ocaml.Dataflow.Backward)

    Module Dataflow.Backward

    Parameters

    module D : DOMAIN

    Signature

    val analyze : - ?exnhandler:(D.t -> D.t) -> - ?exnescape:D.t -> - transfer:(Mach.instruction -> next:D.t -> exn:D.t -> D.t) -> +Backward (ocaml.Dataflow.Backward)

    Module Dataflow.Backward

    Parameters

    module D : DOMAIN

    Signature

    val analyze : + ?exnhandler:(D.t -> D.t) -> + ?exnescape:D.t -> + transfer:(Mach.instruction -> next:D.t -> exn:D.t -> D.t) -> Mach.instruction -> - D.t * (int -> D.t)
    \ No newline at end of file + D.t * (int -> D.t)
    diff --git a/ocaml/Dataflow/index.html b/ocaml/Dataflow/index.html index 7415b5b..d8ce855 100644 --- a/ocaml/Dataflow/index.html +++ b/ocaml/Dataflow/index.html @@ -1,2 +1,2 @@ -Dataflow (ocaml.Dataflow)

    Module Dataflow

    module type DOMAIN = sig ... end
    module Backward (D : DOMAIN) : sig ... end
    \ No newline at end of file +Dataflow (ocaml.Dataflow)

    Module Dataflow

    module type DOMAIN = sig ... end
    module Backward (D : DOMAIN) : sig ... end
    diff --git a/ocaml/Dataflow/module-type-DOMAIN/index.html b/ocaml/Dataflow/module-type-DOMAIN/index.html index 082bf90..7ff2db3 100644 --- a/ocaml/Dataflow/module-type-DOMAIN/index.html +++ b/ocaml/Dataflow/module-type-DOMAIN/index.html @@ -1,2 +1,2 @@ -DOMAIN (ocaml.Dataflow.DOMAIN)

    Module type Dataflow.DOMAIN

    type t
    val bot : t
    val join : t -> t -> t
    val lessequal : t -> t -> bool
    \ No newline at end of file +DOMAIN (ocaml.Dataflow.DOMAIN)

    Module type Dataflow.DOMAIN

    type t
    val bot : t
    val join : t -> t -> t
    val lessequal : t -> t -> bool
    diff --git a/ocaml/Datarepr/index.html b/ocaml/Datarepr/index.html index bf22d2a..7ff6cdf 100644 --- a/ocaml/Datarepr/index.html +++ b/ocaml/Datarepr/index.html @@ -1,13 +1,13 @@ -Datarepr (ocaml.Datarepr)

    Module Datarepr

    val extension_descr : - current_unit:string -> +Datarepr (ocaml.Datarepr)

    Module Datarepr

    val extension_descr : + current_unit:string -> Path.t -> Types.extension_constructor -> Types.constructor_description
    val labels_of_type : Path.t -> Types.type_declaration -> (Ident.t * Types.label_description) list
    val constructors_of_type : - current_unit:string -> + current_unit:string -> Path.t -> Types.type_declaration -> (Ident.t * Types.constructor_description) list
    exception Constr_not_found
    val find_constr_by_tag : @@ -16,4 +16,4 @@ Types.constructor_declaration
    val constructor_existentials : Types.constructor_arguments -> Types.type_expr option -> - Types.type_expr list * Types.type_expr list

    Takes cd_args and cd_res from a constructor_declaration and returns:

    • the types of the constructor's arguments
    • the existential variables introduced by the constructor
    \ No newline at end of file + Types.type_expr list * Types.type_expr list

    Takes cd_args and cd_res from a constructor_declaration and returns:

    • the types of the constructor's arguments
    • the existential variables introduced by the constructor
    diff --git a/ocaml/Deadcode/index.html b/ocaml/Deadcode/index.html index 05b0009..499a70e 100644 --- a/ocaml/Deadcode/index.html +++ b/ocaml/Deadcode/index.html @@ -1,2 +1,2 @@ -Deadcode (ocaml.Deadcode)

    Module Deadcode

    val fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +Deadcode (ocaml.Deadcode)

    Module Deadcode

    val fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/ocaml/Debuginfo/Scoped_location/index.html b/ocaml/Debuginfo/Scoped_location/index.html index 83263e0..9e125c8 100644 --- a/ocaml/Debuginfo/Scoped_location/index.html +++ b/ocaml/Debuginfo/Scoped_location/index.html @@ -1,2 +1,2 @@ -Scoped_location (ocaml.Debuginfo.Scoped_location)

    Module Debuginfo.Scoped_location

    type scopes
    val string_of_scopes : scopes -> string
    val empty_scopes : scopes
    val enter_anonymous_function : scopes:scopes -> scopes
    val enter_value_definition : scopes:scopes -> Ident.t -> scopes
    val enter_module_definition : scopes:scopes -> Ident.t -> scopes
    val enter_class_definition : scopes:scopes -> Ident.t -> scopes
    val enter_method_definition : scopes:scopes -> Asttypes.label -> scopes
    type t =
    1. | Loc_unknown
    2. | Loc_known of {
      1. loc : Location.t;
      2. scopes : scopes;
      }
    val of_location : scopes:scopes -> Location.t -> t
    val to_location : t -> Location.t
    val string_of_scoped_location : t -> string
    \ No newline at end of file +Scoped_location (ocaml.Debuginfo.Scoped_location)

    Module Debuginfo.Scoped_location

    type scopes
    val string_of_scopes : scopes -> string
    val empty_scopes : scopes
    val enter_anonymous_function : scopes:scopes -> scopes
    val enter_value_definition : scopes:scopes -> Ident.t -> scopes
    val enter_module_definition : scopes:scopes -> Ident.t -> scopes
    val enter_class_definition : scopes:scopes -> Ident.t -> scopes
    val enter_method_definition : scopes:scopes -> Asttypes.label -> scopes
    type t =
    1. | Loc_unknown
    2. | Loc_known of {
      1. loc : Location.t;
      2. scopes : scopes;
      }
    val of_location : scopes:scopes -> Location.t -> t
    val to_location : t -> Location.t
    val string_of_scoped_location : t -> string
    diff --git a/ocaml/Debuginfo/index.html b/ocaml/Debuginfo/index.html index de6bb77..d1c2931 100644 --- a/ocaml/Debuginfo/index.html +++ b/ocaml/Debuginfo/index.html @@ -1,2 +1,2 @@ -Debuginfo (ocaml.Debuginfo)

    Module Debuginfo

    module Scoped_location : sig ... end
    type item = private {
    1. dinfo_file : string;
    2. dinfo_line : int;
    3. dinfo_char_start : int;
    4. dinfo_char_end : int;
    5. dinfo_start_bol : int;
    6. dinfo_end_bol : int;
    7. dinfo_end_line : int;
    8. dinfo_scopes : Scoped_location.scopes;
    }
    type t = item list
    type alloc_dbginfo_item = {
    1. alloc_words : int;
    2. alloc_dbg : t;
    }

    Due to Comballoc, a single Ialloc instruction may combine several unrelated allocations. Their Debuginfo.t (which may differ) are stored as a list of alloc_dbginfo. This list is in order of increasing memory address, which is the reverse of the original allocation order. Later allocations are consed to the front of this list by Comballoc.

    type alloc_dbginfo = alloc_dbginfo_item list
    val none : t
    val is_none : t -> bool
    val to_string : t -> string
    val from_location : Scoped_location.t -> t
    val to_location : t -> Location.t
    val inline : t -> t -> t
    val compare : t -> t -> int
    val hash : t -> int
    val print_compact : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Debuginfo (ocaml.Debuginfo)

    Module Debuginfo

    module Scoped_location : sig ... end
    type item = private {
    1. dinfo_file : string;
    2. dinfo_line : int;
    3. dinfo_char_start : int;
    4. dinfo_char_end : int;
    5. dinfo_start_bol : int;
    6. dinfo_end_bol : int;
    7. dinfo_end_line : int;
    8. dinfo_scopes : Scoped_location.scopes;
    }
    type t = item list
    type alloc_dbginfo_item = {
    1. alloc_words : int;
    2. alloc_dbg : t;
    }

    Due to Comballoc, a single Ialloc instruction may combine several unrelated allocations. Their Debuginfo.t (which may differ) are stored as a list of alloc_dbginfo. This list is in order of increasing memory address, which is the reverse of the original allocation order. Later allocations are consed to the front of this list by Comballoc.

    type alloc_dbginfo = alloc_dbginfo_item list
    val none : t
    val is_none : t -> bool
    val to_string : t -> string
    val from_location : Scoped_location.t -> t
    val to_location : t -> Location.t
    val inline : t -> t -> t
    val compare : t -> t -> int
    val hash : t -> int
    val print_compact : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Depend/index.html b/ocaml/Depend/index.html index b12996c..8d7c0e2 100644 --- a/ocaml/Depend/index.html +++ b/ocaml/Depend/index.html @@ -1,2 +1,2 @@ -Depend (ocaml.Depend)

    Module Depend

    Module dependencies.

    Warning: this module is unstable and part of compiler-libs.

    module String = Misc.Stdlib.String
    type map_tree =
    1. | Node of String.Set.t * bound_map
    and bound_map = map_tree String.Map.t
    val make_leaf : string -> map_tree
    val make_node : bound_map -> map_tree
    val weaken_map : String.Set.t -> map_tree -> map_tree
    val free_structure_names : String.Set.t ref
    val pp_deps : string list ref

    dependencies found by preprocessing tools

    val open_module : bound_map -> Longident.t -> bound_map
    val add_use_file : bound_map -> Parsetree.toplevel_phrase list -> unit
    val add_signature : bound_map -> Parsetree.signature -> unit
    val add_implementation : bound_map -> Parsetree.structure -> unit
    val add_implementation_binding : bound_map -> Parsetree.structure -> bound_map
    val add_signature_binding : bound_map -> Parsetree.signature -> bound_map
    \ No newline at end of file +Depend (ocaml.Depend)

    Module Depend

    Module dependencies.

    Warning: this module is unstable and part of compiler-libs.

    module String = Misc.Stdlib.String
    type map_tree =
    1. | Node of String.Set.t * bound_map
    and bound_map = map_tree String.Map.t
    val make_leaf : string -> map_tree
    val make_node : bound_map -> map_tree
    val weaken_map : String.Set.t -> map_tree -> map_tree
    val free_structure_names : String.Set.t ref
    val pp_deps : string list ref

    dependencies found by preprocessing tools

    val open_module : bound_map -> Longident.t -> bound_map
    val add_use_file : bound_map -> Parsetree.toplevel_phrase list -> unit
    val add_signature : bound_map -> Parsetree.signature -> unit
    val add_implementation : bound_map -> Parsetree.structure -> unit
    val add_implementation_binding : bound_map -> Parsetree.structure -> bound_map
    val add_signature_binding : bound_map -> Parsetree.signature -> bound_map
    diff --git a/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html b/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html index 5c84078..370a173 100644 --- a/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html +++ b/ocaml/Diffing/Define/Left_variadic/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Diffing.Define.Left_variadic._)

    Parameter Left_variadic._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state * D.left array

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    \ No newline at end of file +_ (ocaml.Diffing.Define.Left_variadic._)

    Parameter Left_variadic._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state * D.left array

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    diff --git a/ocaml/Diffing/Define/Left_variadic/index.html b/ocaml/Diffing/Define/Left_variadic/index.html index 54304f8..cb79230 100644 --- a/ocaml/Diffing/Define/Left_variadic/index.html +++ b/ocaml/Diffing/Define/Left_variadic/index.html @@ -1,2 +1,2 @@ -Left_variadic (ocaml.Diffing.Define.Left_variadic)

    Module Define.Left_variadic

    Variadic diffing

    Variadic diffing allows to expand the lists being diffed during diffing. in one specific direction.

    Parameters

    module _ : Parameters with type update_result := D.state * D.left array

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    \ No newline at end of file +Left_variadic (ocaml.Diffing.Define.Left_variadic)

    Module Define.Left_variadic

    Variadic diffing

    Variadic diffing allows to expand the lists being diffed during diffing. in one specific direction.

    Parameters

    module _ : Parameters with type update_result := D.state * D.left array

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    diff --git a/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html b/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html index f6aadc5..f4f621f 100644 --- a/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html +++ b/ocaml/Diffing/Define/Right_variadic/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Diffing.Define.Right_variadic._)

    Parameter Right_variadic._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state * D.right array

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    \ No newline at end of file +_ (ocaml.Diffing.Define.Right_variadic._)

    Parameter Right_variadic._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state * D.right array

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    diff --git a/ocaml/Diffing/Define/Right_variadic/index.html b/ocaml/Diffing/Define/Right_variadic/index.html index 8f8a3ed..d79cfd4 100644 --- a/ocaml/Diffing/Define/Right_variadic/index.html +++ b/ocaml/Diffing/Define/Right_variadic/index.html @@ -1,2 +1,2 @@ -Right_variadic (ocaml.Diffing.Define.Right_variadic)

    Module Define.Right_variadic

    Parameters

    module _ : Parameters with type update_result := D.state * D.right array

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    \ No newline at end of file +Right_variadic (ocaml.Diffing.Define.Right_variadic)

    Module Define.Right_variadic

    Parameters

    module _ : Parameters with type update_result := D.state * D.right array

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    diff --git a/ocaml/Diffing/Define/Simple/argument-1-_/index.html b/ocaml/Diffing/Define/Simple/argument-1-_/index.html index 7392899..2e028ce 100644 --- a/ocaml/Diffing/Define/Simple/argument-1-_/index.html +++ b/ocaml/Diffing/Define/Simple/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Diffing.Define.Simple._)

    Parameter Simple._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    \ No newline at end of file +_ (ocaml.Diffing.Define.Simple._)

    Parameter Simple._

    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> D.state

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    diff --git a/ocaml/Diffing/Define/Simple/index.html b/ocaml/Diffing/Define/Simple/index.html index 97213e2..0b25778 100644 --- a/ocaml/Diffing/Define/Simple/index.html +++ b/ocaml/Diffing/Define/Simple/index.html @@ -1,2 +1,2 @@ -Simple (ocaml.Diffing.Define.Simple)

    Module Define.Simple

    Parameters

    module _ : Parameters with type update_result := D.state

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    \ No newline at end of file +Simple (ocaml.Diffing.Define.Simple)

    Module Define.Simple

    Parameters

    module _ : Parameters with type update_result := D.state

    Signature

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    diff --git a/ocaml/Diffing/Define/argument-1-D/index.html b/ocaml/Diffing/Define/argument-1-D/index.html index 875854c..e8fc7a3 100644 --- a/ocaml/Diffing/Define/argument-1-D/index.html +++ b/ocaml/Diffing/Define/argument-1-D/index.html @@ -1,2 +1,2 @@ -D (ocaml.Diffing.Define.D)

    Parameter Define.D

    type left
    type right
    type eq

    Detailed equality trace

    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    \ No newline at end of file +D (ocaml.Diffing.Define.D)

    Parameter Define.D

    type left
    type right
    type eq

    Detailed equality trace

    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    diff --git a/ocaml/Diffing/Define/index.html b/ocaml/Diffing/Define/index.html index 56a2f9b..cb2e090 100644 --- a/ocaml/Diffing/Define/index.html +++ b/ocaml/Diffing/Define/index.html @@ -1,6 +1,6 @@ -Define (ocaml.Diffing.Define)

    Module Diffing.Define

    Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

    Parameters

    module D : Defs

    Signature

    type nonrec change = (D.left, D.right, D.eq, D.diff) change

    The type of potential changes on a list.

    type patch = change list

    A patch is an ordered list of changes.

    module type Parameters = sig ... end
    module type S = sig ... end
    module Simple (_ : Parameters with type update_result := D.state) : S
    module Left_variadic +Define (ocaml.Diffing.Define)

    Module Diffing.Define

    Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

    Parameters

    module D : Defs

    Signature

    type nonrec change = (D.left, D.right, D.eq, D.diff) change

    The type of potential changes on a list.

    type patch = change list

    A patch is an ordered list of changes.

    module type Parameters = sig ... end
    module type S = sig ... end
    module Simple (_ : Parameters with type update_result := D.state) : S
    module Left_variadic (_ : Parameters with type update_result := D.state * D.left array) : S
    module Right_variadic (_ : Parameters with type update_result := D.state * D.right array) : - S
    \ No newline at end of file + S
    diff --git a/ocaml/Diffing/Define/module-type-Parameters/index.html b/ocaml/Diffing/Define/module-type-Parameters/index.html index 45d724c..beb9a58 100644 --- a/ocaml/Diffing/Define/module-type-Parameters/index.html +++ b/ocaml/Diffing/Define/module-type-Parameters/index.html @@ -1,2 +1,2 @@ -Parameters (ocaml.Diffing.Define.Parameters)

    Module type Define.Parameters

    type update_result
    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> update_result

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    \ No newline at end of file +Parameters (ocaml.Diffing.Define.Parameters)

    Module type Define.Parameters

    type update_result
    val weight : change -> int

    weight ch returns the weight of the change ch. Used to find the smallest patch.

    val test : D.state -> D.left -> D.right -> (D.eq, D.diff) result

    test st xl xr tests if the elements xl and xr are co mpatible (Ok) or not (Error).

    val update : change -> D.state -> update_result

    update ch st returns the new state after applying a change. The update_result type also contains expansions in the variadic case.

    diff --git a/ocaml/Diffing/Define/module-type-S/index.html b/ocaml/Diffing/Define/module-type-S/index.html index b5db49f..0c63dac 100644 --- a/ocaml/Diffing/Define/module-type-S/index.html +++ b/ocaml/Diffing/Define/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Diffing.Define.S)

    Module type Define.S

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    \ No newline at end of file +S (ocaml.Diffing.Define.S)

    Module type Define.S

    val diff : D.state -> D.left array -> D.right array -> patch

    diff state l r computes the optimal patch between l and r, using the initial state state.

    diff --git a/ocaml/Diffing/index.html b/ocaml/Diffing/index.html index 393fb70..299f180 100644 --- a/ocaml/Diffing/index.html +++ b/ocaml/Diffing/index.html @@ -1,2 +1,2 @@ -Diffing (ocaml.Diffing)

    Module Diffing

    Parametric diffing

    This module implements diffing over lists of arbitrary content. It is parameterized by

    • The content of the two lists
    • The equality witness when an element is kept
    • The diffing witness when an element is changed

    Diffing is extended to maintain state depending on the computed changes while walking through the two lists.

    The underlying algorithm is a modified Wagner-Fischer algorithm (see <https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm>).

    We provide the following guarantee: Given two lists l and r, if different patches result in different states, we say that the state diverges.

    • We always return the optimal patch on prefixes of l and r on which state does not diverge.
    • Otherwise, we return a correct but non-optimal patch where subpatches with no divergent states are optimal for the given initial state.

    More precisely, the optimality of Wagner-Fischer depends on the property that the edit-distance between a k-prefix of the left input and a l-prefix of the right input d(k,l) satisfies

    d(k,l) = min ( del_cost + d(k-1,l), insert_cost + d(k,l-1), change_cost + d(k-1,l-1) )

    Under this hypothesis, it is optimal to choose greedily the state of the minimal patch transforming the left k-prefix into the right l-prefix as a representative of the states of all possible patches transforming the left k-prefix into the right l-prefix.

    If this property is not satisfied, we can still choose greedily a representative state. However, the computed patch is no more guaranteed to be globally optimal. Nevertheless, it is still a correct patch, which is even optimal among all explored patches.

    module type Defs = sig ... end

    The core types of a diffing implementation

    type change_kind =
    1. | Deletion
    2. | Insertion
    3. | Modification
    4. | Preservation

    The kind of changes which is used to share printing and styling across implementation

    val prefix : Stdlib.Format.formatter -> (int * change_kind) -> unit
    val style : change_kind -> Misc.Color.style list
    type ('left, 'right, 'eq, 'diff) change =
    1. | Delete of 'left
    2. | Insert of 'right
    3. | Keep of 'left * 'right * 'eq
    4. | Change of 'left * 'right * 'diff
    val classify : (_, _, _, _) change -> change_kind
    module Define (D : Defs) : sig ... end

    Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

    \ No newline at end of file +Diffing (ocaml.Diffing)

    Module Diffing

    Parametric diffing

    This module implements diffing over lists of arbitrary content. It is parameterized by

    • The content of the two lists
    • The equality witness when an element is kept
    • The diffing witness when an element is changed

    Diffing is extended to maintain state depending on the computed changes while walking through the two lists.

    The underlying algorithm is a modified Wagner-Fischer algorithm (see <https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm>).

    We provide the following guarantee: Given two lists l and r, if different patches result in different states, we say that the state diverges.

    • We always return the optimal patch on prefixes of l and r on which state does not diverge.
    • Otherwise, we return a correct but non-optimal patch where subpatches with no divergent states are optimal for the given initial state.

    More precisely, the optimality of Wagner-Fischer depends on the property that the edit-distance between a k-prefix of the left input and a l-prefix of the right input d(k,l) satisfies

    d(k,l) = min ( del_cost + d(k-1,l), insert_cost + d(k,l-1), change_cost + d(k-1,l-1) )

    Under this hypothesis, it is optimal to choose greedily the state of the minimal patch transforming the left k-prefix into the right l-prefix as a representative of the states of all possible patches transforming the left k-prefix into the right l-prefix.

    If this property is not satisfied, we can still choose greedily a representative state. However, the computed patch is no more guaranteed to be globally optimal. Nevertheless, it is still a correct patch, which is even optimal among all explored patches.

    module type Defs = sig ... end

    The core types of a diffing implementation

    type change_kind =
    1. | Deletion
    2. | Insertion
    3. | Modification
    4. | Preservation

    The kind of changes which is used to share printing and styling across implementation

    val prefix : Stdlib.Format.formatter -> (int * change_kind) -> unit
    val style : change_kind -> Misc.Color.style list
    type ('left, 'right, 'eq, 'diff) change =
    1. | Delete of 'left
    2. | Insert of 'right
    3. | Keep of 'left * 'right * 'eq
    4. | Change of 'left * 'right * 'diff
    val classify : (_, _, _, _) change -> change_kind
    module Define (D : Defs) : sig ... end

    Define(Defs) creates the diffing types from the types defined in Defs and the functors that need to be instantatied with the diffing algorithm parameters

    diff --git a/ocaml/Diffing/module-type-Defs/index.html b/ocaml/Diffing/module-type-Defs/index.html index 7da6c64..618fd2f 100644 --- a/ocaml/Diffing/module-type-Defs/index.html +++ b/ocaml/Diffing/module-type-Defs/index.html @@ -1,2 +1,2 @@ -Defs (ocaml.Diffing.Defs)

    Module type Diffing.Defs

    The core types of a diffing implementation

    type left
    type right
    type eq

    Detailed equality trace

    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    \ No newline at end of file +Defs (ocaml.Diffing.Defs)

    Module type Diffing.Defs

    The core types of a diffing implementation

    type left
    type right
    type eq

    Detailed equality trace

    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    diff --git a/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html b/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html index 8a7ec99..2a69548 100644 --- a/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html +++ b/ocaml/Diffing_with_keys/Define/Simple/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Diffing_with_keys.Define.Simple._)

    Parameter Simple._

    val weight : change -> int
    val test : D.state -> left -> right -> (unit, diff) result
    val update : change -> D.state -> D.state
    val key_left : D.left -> string
    val key_right : D.right -> string
    \ No newline at end of file +_ (ocaml.Diffing_with_keys.Define.Simple._)

    Parameter Simple._

    val weight : change -> int
    val test : D.state -> left -> right -> (unit, diff) result
    val update : change -> D.state -> D.state
    val key_left : D.left -> string
    val key_right : D.right -> string
    diff --git a/ocaml/Diffing_with_keys/Define/Simple/index.html b/ocaml/Diffing_with_keys/Define/Simple/index.html index 0f2f52e..80101a4 100644 --- a/ocaml/Diffing_with_keys/Define/Simple/index.html +++ b/ocaml/Diffing_with_keys/Define/Simple/index.html @@ -1,2 +1,2 @@ -Simple (ocaml.Diffing_with_keys.Define.Simple)

    Module Define.Simple

    Parameters

    module _ : Parameters

    Signature

    val diff : D.state -> D.left list -> D.right list -> patch
    \ No newline at end of file +Simple (ocaml.Diffing_with_keys.Define.Simple)

    Module Define.Simple

    Parameters

    module _ : Parameters

    Signature

    val diff : D.state -> D.left list -> D.right list -> patch
    diff --git a/ocaml/Diffing_with_keys/Define/argument-1-D/index.html b/ocaml/Diffing_with_keys/Define/argument-1-D/index.html index cdf1e29..e56cbee 100644 --- a/ocaml/Diffing_with_keys/Define/argument-1-D/index.html +++ b/ocaml/Diffing_with_keys/Define/argument-1-D/index.html @@ -1,2 +1,2 @@ -D (ocaml.Diffing_with_keys.Define.D)

    Parameter Define.D

    type left
    type right
    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    \ No newline at end of file +D (ocaml.Diffing_with_keys.Define.D)

    Parameter Define.D

    type left
    type right
    type diff

    Detailed difference trace

    type state

    environment of a partial patch

    diff --git a/ocaml/Diffing_with_keys/Define/index.html b/ocaml/Diffing_with_keys/Define/index.html index d8098b6..d0277f2 100644 --- a/ocaml/Diffing_with_keys/Define/index.html +++ b/ocaml/Diffing_with_keys/Define/index.html @@ -1,2 +1,2 @@ -Define (ocaml.Diffing_with_keys.Define)

    Module Diffing_with_keys.Define

    Parameters

    module D : Diffing.Defs with type eq := unit

    Signature

    type diff = (D.left, D.right, D.diff) mismatch
    type left = D.left with_pos
    type right = D.right with_pos
    type composite_change = (D.left, D.right, D.diff) change

    Composite changes and patches

    type patch = composite_change list
    type change = (left, right, unit, diff) Diffing.change

    Atomic changes

    module type Parameters = sig ... end
    module Simple (_ : Parameters) : sig ... end
    \ No newline at end of file +Define (ocaml.Diffing_with_keys.Define)

    Module Diffing_with_keys.Define

    Parameters

    module D : Diffing.Defs with type eq := unit

    Signature

    type diff = (D.left, D.right, D.diff) mismatch
    type left = D.left with_pos
    type right = D.right with_pos
    type composite_change = (D.left, D.right, D.diff) change

    Composite changes and patches

    type patch = composite_change list
    type change = (left, right, unit, diff) Diffing.change

    Atomic changes

    module type Parameters = sig ... end
    module Simple (_ : Parameters) : sig ... end
    diff --git a/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html b/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html index 18b40b3..26d5857 100644 --- a/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html +++ b/ocaml/Diffing_with_keys/Define/module-type-Parameters/index.html @@ -1,2 +1,2 @@ -Parameters (ocaml.Diffing_with_keys.Define.Parameters)

    Module type Define.Parameters

    val weight : change -> int
    val test : D.state -> left -> right -> (unit, diff) result
    val update : change -> D.state -> D.state
    val key_left : D.left -> string
    val key_right : D.right -> string
    \ No newline at end of file +Parameters (ocaml.Diffing_with_keys.Define.Parameters)

    Module type Define.Parameters

    val weight : change -> int
    val test : D.state -> left -> right -> (unit, diff) result
    val update : change -> D.state -> D.state
    val key_left : D.left -> string
    val key_right : D.right -> string
    diff --git a/ocaml/Diffing_with_keys/index.html b/ocaml/Diffing_with_keys/index.html index d32ae19..19330de 100644 --- a/ocaml/Diffing_with_keys/index.html +++ b/ocaml/Diffing_with_keys/index.html @@ -1,2 +1,2 @@ -Diffing_with_keys (ocaml.Diffing_with_keys)

    Module Diffing_with_keys

    When diffing lists where each element has a distinct key, we can refine the diffing patch by introducing two composite edit moves: swaps and moves.

    Swaps exchange the position of two elements. Swap cost is set to 2 * change - epsilon. Moves change the position of one element. Move cost is set to delete + addition - epsilon.

    When the cost delete + addition is greater than change and with those specific weights, the optimal patch with Swaps and Moves can be computed directly and cheaply from the original optimal patch.

    type 'a with_pos = {
    1. pos : int;
    2. data : 'a;
    }
    val with_pos : 'a list -> 'a with_pos list
    type ('l, 'r, 'diff) mismatch =
    1. | Name of {
      1. pos : int;
      2. got : string;
      3. expected : string;
      4. types_match : bool;
      }
    2. | Type of {
      1. pos : int;
      2. got : 'l;
      3. expected : 'r;
      4. reason : 'diff;
      }
    type ('l, 'r, 'diff) change =
    1. | Change of ('l, 'r, 'diff) mismatch
    2. | Swap of {
      1. pos : int * int;
      2. first : string;
      3. last : string;
      }
    3. | Move of {
      1. name : string;
      2. got : int;
      3. expected : int;
      }
    4. | Insert of {
      1. pos : int;
      2. insert : 'r;
      }
    5. | Delete of {
      1. pos : int;
      2. delete : 'l;
      }

    This specialized version of changes introduces two composite changes: Move and Swap

    val prefix : Stdlib.Format.formatter -> ('l, 'r, 'diff) change -> unit
    module Define (D : Diffing.Defs with type eq := unit) : sig ... end
    \ No newline at end of file +Diffing_with_keys (ocaml.Diffing_with_keys)

    Module Diffing_with_keys

    When diffing lists where each element has a distinct key, we can refine the diffing patch by introducing two composite edit moves: swaps and moves.

    Swaps exchange the position of two elements. Swap cost is set to 2 * change - epsilon. Moves change the position of one element. Move cost is set to delete + addition - epsilon.

    When the cost delete + addition is greater than change and with those specific weights, the optimal patch with Swaps and Moves can be computed directly and cheaply from the original optimal patch.

    type 'a with_pos = {
    1. pos : int;
    2. data : 'a;
    }
    val with_pos : 'a list -> 'a with_pos list
    type ('l, 'r, 'diff) mismatch =
    1. | Name of {
      1. pos : int;
      2. got : string;
      3. expected : string;
      4. types_match : bool;
      }
    2. | Type of {
      1. pos : int;
      2. got : 'l;
      3. expected : 'r;
      4. reason : 'diff;
      }
    type ('l, 'r, 'diff) change =
    1. | Change of ('l, 'r, 'diff) mismatch
    2. | Swap of {
      1. pos : int * int;
      2. first : string;
      3. last : string;
      }
    3. | Move of {
      1. name : string;
      2. got : int;
      3. expected : int;
      }
    4. | Insert of {
      1. pos : int;
      2. insert : 'r;
      }
    5. | Delete of {
      1. pos : int;
      2. delete : 'l;
      }

    This specialized version of changes introduces two composite changes: Move and Swap

    val prefix : Stdlib.Format.formatter -> ('l, 'r, 'diff) change -> unit
    module Define (D : Diffing.Defs with type eq := unit) : sig ... end
    diff --git a/ocaml/Dll/index.html b/ocaml/Dll/index.html index 7620763..ca1d365 100644 --- a/ocaml/Dll/index.html +++ b/ocaml/Dll/index.html @@ -1,2 +1,2 @@ -Dll (ocaml.Dll)

    Module Dll

    val extract_dll_name : string -> string
    type dll_mode =
    1. | For_checking
    2. | For_execution
    val open_dlls : dll_mode -> string list -> unit
    val close_all_dlls : unit -> unit
    type dll_address
    type primitive_address =
    1. | Prim_loaded of dll_address
    2. | Prim_exists
    val find_primitive : string -> primitive_address option
    val synchronize_primitive : int -> dll_address -> unit
    val add_path : string list -> unit
    val remove_path : string list -> unit
    val init_compile : bool -> unit
    val init_toplevel : string list -> unit
    val reset : unit -> unit
    \ No newline at end of file +Dll (ocaml.Dll)

    Module Dll

    val extract_dll_name : string -> string
    type dll_mode =
    1. | For_checking
    2. | For_execution
    val open_dlls : dll_mode -> string list -> unit
    val close_all_dlls : unit -> unit
    type dll_address
    type primitive_address =
    1. | Prim_loaded of dll_address
    2. | Prim_exists
    val find_primitive : string -> primitive_address option
    val synchronize_primitive : int -> dll_address -> unit
    val add_path : string list -> unit
    val remove_path : string list -> unit
    val init_compile : bool -> unit
    val init_toplevel : string list -> unit
    val reset : unit -> unit
    diff --git a/ocaml/Docstrings/WithMenhir/index.html b/ocaml/Docstrings/WithMenhir/index.html index 9453e64..12f8a17 100644 --- a/ocaml/Docstrings/WithMenhir/index.html +++ b/ocaml/Docstrings/WithMenhir/index.html @@ -1,9 +1,9 @@ -WithMenhir (ocaml.Docstrings.WithMenhir)

    Module Docstrings.WithMenhir

    Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

    val symbol_docs_lazy : +WithMenhir (ocaml.Docstrings.WithMenhir)

    Module Docstrings.WithMenhir

    Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

    Fetch the item documentation for the symbols between two positions. This also marks this documentation (for ambiguity warnings).

    val mark_symbol_docs : (Stdlib.Lexing.position * Stdlib.Lexing.position) -> - unit

    Mark the item documentation for the current symbol (for ambiguity warnings).

    val mark_rhs_docs : Stdlib.Lexing.position -> Stdlib.Lexing.position -> unit

    Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

    val symbol_info : Stdlib.Lexing.position -> info

    Fetch the field info for the current symbol.

    val rhs_info : Stdlib.Lexing.position -> info

    Fetch the field info following the symbol at a given position.

    val symbol_text : Stdlib.Lexing.position -> text

    Fetch the text preceding the current symbol.

    val symbol_text_lazy : Stdlib.Lexing.position -> text Stdlib.Lazy.t
    val rhs_text : Stdlib.Lexing.position -> text

    Fetch the text preceding the symbol at the given position.

    Extra text

    There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

    val symbol_pre_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text preceding the current symbol

    val symbol_post_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text following the current symbol

    val rhs_pre_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text preceding the symbol at the given position

    val rhs_post_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text following the symbol at the given position

    val rhs_post_text : Stdlib.Lexing.position -> text

    Fetch text following the symbol at the given position

    \ No newline at end of file + unit

    Mark the item documentation for the current symbol (for ambiguity warnings).

    val mark_rhs_docs : Stdlib.Lexing.position -> Stdlib.Lexing.position -> unit

    Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

    val symbol_info : Stdlib.Lexing.position -> info

    Fetch the field info for the current symbol.

    val rhs_info : Stdlib.Lexing.position -> info

    Fetch the field info following the symbol at a given position.

    val symbol_text : Stdlib.Lexing.position -> text

    Fetch the text preceding the current symbol.

    val symbol_text_lazy : Stdlib.Lexing.position -> text Stdlib.Lazy.t
    val rhs_text : Stdlib.Lexing.position -> text

    Fetch the text preceding the symbol at the given position.

    Extra text

    There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

    val symbol_pre_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text preceding the current symbol

    val symbol_post_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text following the current symbol

    val rhs_pre_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text preceding the symbol at the given position

    val rhs_post_extra_text : Stdlib.Lexing.position -> text

    Fetch additional text following the symbol at the given position

    val rhs_post_text : Stdlib.Lexing.position -> text

    Fetch text following the symbol at the given position

    diff --git a/ocaml/Docstrings/index.html b/ocaml/Docstrings/index.html index 46951d8..ca24545 100644 --- a/ocaml/Docstrings/index.html +++ b/ocaml/Docstrings/index.html @@ -1,5 +1,5 @@ -Docstrings (ocaml.Docstrings)

    Module Docstrings

    Documentation comments

    Warning: this module is unstable and part of compiler-libs.

    val init : unit -> unit

    (Re)Initialise all docstring state

    val warn_bad_docstrings : unit -> unit

    Emit warnings for unattached and ambiguous docstrings

    Docstrings

    type docstring

    Documentation comments

    val docstring : string -> Location.t -> docstring

    Create a docstring

    val register : docstring -> unit

    Register a docstring

    val docstring_body : docstring -> string

    Get the text of a docstring

    val docstring_loc : docstring -> Location.t

    Get the location of a docstring

    Set functions

    These functions are used by the lexer to associate docstrings to the locations of tokens.

    val set_pre_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately preceding a token

    val set_post_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately following a token

    val set_floating_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings not immediately adjacent to a token

    val set_pre_extra_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately following the token which precedes this one

    val set_post_extra_docstrings : +Docstrings (ocaml.Docstrings)

    Module Docstrings

    Documentation comments

    Warning: this module is unstable and part of compiler-libs.

    val init : unit -> unit

    (Re)Initialise all docstring state

    val warn_bad_docstrings : unit -> unit

    Emit warnings for unattached and ambiguous docstrings

    Docstrings

    type docstring

    Documentation comments

    val docstring : string -> Location.t -> docstring

    Create a docstring

    val register : docstring -> unit

    Register a docstring

    val docstring_body : docstring -> string

    Get the text of a docstring

    val docstring_loc : docstring -> Location.t

    Get the location of a docstring

    Set functions

    These functions are used by the lexer to associate docstrings to the locations of tokens.

    val set_pre_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately preceding a token

    val set_post_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately following a token

    val set_floating_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings not immediately adjacent to a token

    val set_pre_extra_docstrings : Stdlib.Lexing.position -> docstring list -> unit

    Docstrings immediately following the token which precedes this one

    val set_post_extra_docstrings : Stdlib.Lexing.position -> docstring list -> - unit

    Docstrings immediately preceding the token which follows this one

    Items

    The docs type represents documentation attached to an item.

    type docs = {
    1. docs_pre : docstring option;
    2. docs_post : docstring option;
    }
    val empty_docs : docs
    val docs_attr : docstring -> Parsetree.attribute

    Convert item documentation to attributes and add them to an attribute list

    val symbol_docs : unit -> docs

    Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

    val symbol_docs_lazy : unit -> docs Stdlib.Lazy.t
    val rhs_docs : int -> int -> docs

    Fetch the item documentation for the symbols between two positions. This also marks this documentation (for ambiguity warnings).

    val rhs_docs_lazy : int -> int -> docs Stdlib.Lazy.t
    val mark_symbol_docs : unit -> unit

    Mark the item documentation for the current symbol (for ambiguity warnings).

    val mark_rhs_docs : int -> int -> unit

    Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

    Fields and constructors

    The info type represents documentation attached to a field or constructor.

    type info = docstring option
    val empty_info : info
    val info_attr : docstring -> Parsetree.attribute

    Convert field info to attributes and add them to an attribute list

    val symbol_info : unit -> info

    Fetch the field info for the current symbol.

    val rhs_info : int -> info

    Fetch the field info following the symbol at a given position.

    Unattached comments

    The text type represents documentation which is not attached to anything.

    type text = docstring list
    val empty_text : text
    val empty_text_lazy : text Stdlib.Lazy.t
    val text_attr : docstring -> Parsetree.attribute

    Convert text to attributes and add them to an attribute list

    val symbol_text : unit -> text

    Fetch the text preceding the current symbol.

    val symbol_text_lazy : unit -> text Stdlib.Lazy.t
    val rhs_text : int -> text

    Fetch the text preceding the symbol at the given position.

    val rhs_text_lazy : int -> text Stdlib.Lazy.t

    Extra text

    There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

    val symbol_pre_extra_text : unit -> text

    Fetch additional text preceding the current symbol

    val symbol_post_extra_text : unit -> text

    Fetch additional text following the current symbol

    val rhs_pre_extra_text : int -> text

    Fetch additional text preceding the symbol at the given position

    val rhs_post_extra_text : int -> text

    Fetch additional text following the symbol at the given position

    val rhs_post_text : int -> text

    Fetch text following the symbol at the given position

    module WithMenhir : sig ... end
    \ No newline at end of file + unit

    Docstrings immediately preceding the token which follows this one

    Items

    The docs type represents documentation attached to an item.

    type docs = {
    1. docs_pre : docstring option;
    2. docs_post : docstring option;
    }
    val empty_docs : docs
    val docs_attr : docstring -> Parsetree.attribute

    Convert item documentation to attributes and add them to an attribute list

    val symbol_docs : unit -> docs

    Fetch the item documentation for the current symbol. This also marks this documentation (for ambiguity warnings).

    val symbol_docs_lazy : unit -> docs Stdlib.Lazy.t
    val rhs_docs : int -> int -> docs

    Fetch the item documentation for the symbols between two positions. This also marks this documentation (for ambiguity warnings).

    val rhs_docs_lazy : int -> int -> docs Stdlib.Lazy.t
    val mark_symbol_docs : unit -> unit

    Mark the item documentation for the current symbol (for ambiguity warnings).

    val mark_rhs_docs : int -> int -> unit

    Mark as associated the item documentation for the symbols between two positions (for ambiguity warnings)

    Fields and constructors

    The info type represents documentation attached to a field or constructor.

    type info = docstring option
    val empty_info : info
    val info_attr : docstring -> Parsetree.attribute

    Convert field info to attributes and add them to an attribute list

    val symbol_info : unit -> info

    Fetch the field info for the current symbol.

    val rhs_info : int -> info

    Fetch the field info following the symbol at a given position.

    Unattached comments

    The text type represents documentation which is not attached to anything.

    type text = docstring list
    val empty_text : text
    val empty_text_lazy : text Stdlib.Lazy.t
    val text_attr : docstring -> Parsetree.attribute

    Convert text to attributes and add them to an attribute list

    val symbol_text : unit -> text

    Fetch the text preceding the current symbol.

    val symbol_text_lazy : unit -> text Stdlib.Lazy.t
    val rhs_text : int -> text

    Fetch the text preceding the symbol at the given position.

    val rhs_text_lazy : int -> text Stdlib.Lazy.t

    Extra text

    There may be additional text attached to the delimiters of a block (e.g. struct and end). This is fetched by the following functions, which are applied to the contents of the block rather than the delimiters.

    val symbol_pre_extra_text : unit -> text

    Fetch additional text preceding the current symbol

    val symbol_post_extra_text : unit -> text

    Fetch additional text following the current symbol

    val rhs_pre_extra_text : int -> text

    Fetch additional text preceding the symbol at the given position

    val rhs_post_extra_text : int -> text

    Fetch additional text following the symbol at the given position

    val rhs_post_text : int -> text

    Fetch text following the symbol at the given position

    module WithMenhir : sig ... end
    diff --git a/ocaml/Domainstate/index.html b/ocaml/Domainstate/index.html index 66e0df4..548b3bb 100644 --- a/ocaml/Domainstate/index.html +++ b/ocaml/Domainstate/index.html @@ -1,2 +1,2 @@ -Domainstate (ocaml.Domainstate)

    Module Domainstate

    val stack_ctx_words : int
    type t =
    1. | Domain_young_limit
    2. | Domain_young_ptr
    3. | Domain_young_start
    4. | Domain_young_end
    5. | Domain_young_trigger
    6. | Domain_current_stack
    7. | Domain_exn_handler
    8. | Domain_action_pending
    9. | Domain_c_stack
    10. | Domain_stack_cache
    11. | Domain_gc_regs_buckets
    12. | Domain_gc_regs
    13. | Domain_minor_tables
    14. | Domain_mark_stack
    15. | Domain_marking_done
    16. | Domain_sweeping_done
    17. | Domain_allocated_words
    18. | Domain_swept_words
    19. | Domain_major_slice_epoch
    20. | Domain_local_roots
    21. | Domain_ephe_info
    22. | Domain_final_info
    23. | Domain_backtrace_pos
    24. | Domain_backtrace_active
    25. | Domain_backtrace_buffer
    26. | Domain_backtrace_last_exn
    27. | Domain_compare_unordered
    28. | Domain_oo_next_id_local
    29. | Domain_requested_major_slice
    30. | Domain_requested_global_major_slice
    31. | Domain_requested_minor_gc
    32. | Domain_requested_external_interrupt
    33. | Domain_parser_trace
    34. | Domain_minor_heap_wsz
    35. | Domain_shared_heap
    36. | Domain_id
    37. | Domain_unique_id
    38. | Domain_dls_root
    39. | Domain_extra_heap_resources
    40. | Domain_extra_heap_resources_minor
    41. | Domain_dependent_size
    42. | Domain_dependent_allocated
    43. | Domain_slice_target
    44. | Domain_slice_budget
    45. | Domain_major_work_done_between_slices
    46. | Domain_extern_state
    47. | Domain_intern_state
    48. | Domain_stat_minor_words
    49. | Domain_stat_promoted_words
    50. | Domain_stat_major_words
    51. | Domain_stat_forced_major_collections
    52. | Domain_stat_blocks_marked
    53. | Domain_inside_stw_handler
    54. | Domain_trap_sp_off
    55. | Domain_trap_barrier_off
    56. | Domain_trap_barrier_block
    57. | Domain_external_raise
    58. | Domain_extra_params
    val idx_of_field : t -> int
    \ No newline at end of file +Domainstate (ocaml.Domainstate)

    Module Domainstate

    val stack_ctx_words : int
    type t =
    1. | Domain_young_limit
    2. | Domain_young_ptr
    3. | Domain_young_start
    4. | Domain_young_end
    5. | Domain_young_trigger
    6. | Domain_current_stack
    7. | Domain_exn_handler
    8. | Domain_action_pending
    9. | Domain_c_stack
    10. | Domain_stack_cache
    11. | Domain_gc_regs_buckets
    12. | Domain_gc_regs
    13. | Domain_minor_tables
    14. | Domain_mark_stack
    15. | Domain_marking_done
    16. | Domain_sweeping_done
    17. | Domain_allocated_words
    18. | Domain_swept_words
    19. | Domain_major_slice_epoch
    20. | Domain_local_roots
    21. | Domain_ephe_info
    22. | Domain_final_info
    23. | Domain_backtrace_pos
    24. | Domain_backtrace_active
    25. | Domain_backtrace_buffer
    26. | Domain_backtrace_last_exn
    27. | Domain_compare_unordered
    28. | Domain_oo_next_id_local
    29. | Domain_requested_major_slice
    30. | Domain_requested_global_major_slice
    31. | Domain_requested_minor_gc
    32. | Domain_requested_external_interrupt
    33. | Domain_parser_trace
    34. | Domain_minor_heap_wsz
    35. | Domain_shared_heap
    36. | Domain_id
    37. | Domain_unique_id
    38. | Domain_dls_root
    39. | Domain_extra_heap_resources
    40. | Domain_extra_heap_resources_minor
    41. | Domain_dependent_size
    42. | Domain_dependent_allocated
    43. | Domain_slice_target
    44. | Domain_slice_budget
    45. | Domain_major_work_done_between_slices
    46. | Domain_extern_state
    47. | Domain_intern_state
    48. | Domain_stat_minor_words
    49. | Domain_stat_promoted_words
    50. | Domain_stat_major_words
    51. | Domain_stat_forced_major_collections
    52. | Domain_stat_blocks_marked
    53. | Domain_inside_stw_handler
    54. | Domain_trap_sp_off
    55. | Domain_trap_barrier_off
    56. | Domain_trap_barrier_block
    57. | Domain_external_raise
    58. | Domain_extra_params
    val idx_of_field : t -> int
    diff --git a/ocaml/Dynlink/index.html b/ocaml/Dynlink/index.html index 1e98f53..6a4912c 100644 --- a/ocaml/Dynlink/index.html +++ b/ocaml/Dynlink/index.html @@ -1,2 +1,2 @@ -Dynlink (ocaml.Dynlink)

    Module Dynlink

    Dynamic loading of .cmo, .cma and .cmxs files.

    val is_native : bool

    true if the program is native, false if the program is bytecode.

    Dynamic loading of compiled files

    val loadfile : string -> unit

    In bytecode: load the given bytecode object file (.cmo file) or bytecode library file (.cma file), and link it with the running program. In native code: load the given OCaml plugin file (usually .cmxs), and link it with the running program.

    All toplevel expressions in the loaded compilation units are evaluated. No facilities are provided to access value names defined by the unit. Therefore, the unit must itself register its entry points with the main program (or a previously-loaded library) e.g. by modifying tables of functions.

    An exception will be raised if the given library defines toplevel modules whose names clash with modules existing either in the main program or a shared library previously loaded with loadfile. Modules from shared libraries previously loaded with loadfile_private are not included in this restriction.

    The compilation units loaded by this function are added to the "allowed units" list (see set_allowed_units).

    val loadfile_private : string -> unit

    Same as loadfile, except that the compilation units just loaded are hidden (cannot be referenced) from other modules dynamically loaded afterwards.

    An exception will be raised if the given library defines toplevel modules whose names clash with modules existing in either the main program or a shared library previously loaded with loadfile. Modules from shared libraries previously loaded with loadfile_private are not included in this restriction.

    An exception will also be raised if the given library defines toplevel modules whose name matches that of an interface depended on by a module existing in either the main program or a shared library previously loaded with loadfile. This applies even if such dependency is only a "module alias" dependency (i.e. just on the name rather than the contents of the interface).

    The compilation units loaded by this function are not added to the "allowed units" list (see set_allowed_units) since they cannot be referenced from other compilation units.

    val adapt_filename : string -> string

    In bytecode, the identity function. In native code, replace the last extension with .cmxs.

    Access control

    val set_allowed_units : string list -> unit

    Set the list of compilation units that may be referenced from units that are dynamically loaded in the future to be exactly the given value.

    Initially all compilation units composing the program currently running are available for reference from dynamically-linked units. set_allowed_units can be used to restrict access to a subset of these units, e.g. to the units that compose the API for dynamically-linked code, and prevent access to all other units, e.g. private, internal modules of the running program.

    Note that loadfile changes the allowed-units list.

    val allow_only : string list -> unit

    allow_only units sets the list of allowed units to be the intersection of the existing allowed units and the given list of units. As such it can never increase the set of allowed units.

    val prohibit : string list -> unit

    prohibit units prohibits dynamically-linked units from referencing the units named in list units by removing such units from the allowed units list. This can be used to prevent access to selected units, e.g. private, internal modules of the running program.

    val main_program_units : unit -> string list

    Return the list of compilation units that form the main program (i.e. are not dynamically linked).

    val public_dynamically_loaded_units : unit -> string list

    Return the list of compilation units that have been dynamically loaded via loadfile (and not via loadfile_private). Note that compilation units loaded dynamically cannot be unloaded.

    val all_units : unit -> string list

    Return the list of compilation units that form the main program together with those that have been dynamically loaded via loadfile (and not via loadfile_private).

    val allow_unsafe_modules : bool -> unit

    Govern whether unsafe object files are allowed to be dynamically linked. A compilation unit is 'unsafe' if it contains declarations of external functions, which can break type safety. By default, dynamic linking of unsafe object files is not allowed. In native code, this function does nothing; object files with external functions are always allowed to be dynamically linked.

    Error reporting

    type linking_error = private
    1. | Undefined_global of string
    2. | Unavailable_primitive of string
    3. | Uninitialized_global of string
    type error = private
    1. | Not_a_bytecode_file of string
    2. | Inconsistent_import of string
    3. | Unavailable_unit of string
    4. | Unsafe_file
    5. | Linking_error of string * linking_error
    6. | Corrupted_interface of string
    7. | Cannot_open_dynamic_library of exn
    8. | Library's_module_initializers_failed of exn
    9. | Inconsistent_implementation of string
    10. | Module_already_loaded of string
    11. | Private_library_cannot_implement_interface of string
    exception Error of error

    Errors in dynamic linking are reported by raising the Error exception with a description of the error. A common case is the dynamic library not being found on the system: this is reported via Cannot_open_dynamic_library (the enclosed exception may be platform-specific).

    val error_message : error -> string

    Convert an error description to a printable message.

    \ No newline at end of file +Dynlink (ocaml.Dynlink)

    Module Dynlink

    Dynamic loading of .cmo, .cma and .cmxs files.

    val is_native : bool

    true if the program is native, false if the program is bytecode.

    Dynamic loading of compiled files

    val loadfile : string -> unit

    In bytecode: load the given bytecode object file (.cmo file) or bytecode library file (.cma file), and link it with the running program. In native code: load the given OCaml plugin file (usually .cmxs), and link it with the running program.

    All toplevel expressions in the loaded compilation units are evaluated. No facilities are provided to access value names defined by the unit. Therefore, the unit must itself register its entry points with the main program (or a previously-loaded library) e.g. by modifying tables of functions.

    An exception will be raised if the given library defines toplevel modules whose names clash with modules existing either in the main program or a shared library previously loaded with loadfile. Modules from shared libraries previously loaded with loadfile_private are not included in this restriction.

    The compilation units loaded by this function are added to the "allowed units" list (see set_allowed_units).

    val loadfile_private : string -> unit

    Same as loadfile, except that the compilation units just loaded are hidden (cannot be referenced) from other modules dynamically loaded afterwards.

    An exception will be raised if the given library defines toplevel modules whose names clash with modules existing in either the main program or a shared library previously loaded with loadfile. Modules from shared libraries previously loaded with loadfile_private are not included in this restriction.

    An exception will also be raised if the given library defines toplevel modules whose name matches that of an interface depended on by a module existing in either the main program or a shared library previously loaded with loadfile. This applies even if such dependency is only a "module alias" dependency (i.e. just on the name rather than the contents of the interface).

    The compilation units loaded by this function are not added to the "allowed units" list (see set_allowed_units) since they cannot be referenced from other compilation units.

    val adapt_filename : string -> string

    In bytecode, the identity function. In native code, replace the last extension with .cmxs.

    Access control

    val set_allowed_units : string list -> unit

    Set the list of compilation units that may be referenced from units that are dynamically loaded in the future to be exactly the given value.

    Initially all compilation units composing the program currently running are available for reference from dynamically-linked units. set_allowed_units can be used to restrict access to a subset of these units, e.g. to the units that compose the API for dynamically-linked code, and prevent access to all other units, e.g. private, internal modules of the running program.

    Note that loadfile changes the allowed-units list.

    val allow_only : string list -> unit

    allow_only units sets the list of allowed units to be the intersection of the existing allowed units and the given list of units. As such it can never increase the set of allowed units.

    val prohibit : string list -> unit

    prohibit units prohibits dynamically-linked units from referencing the units named in list units by removing such units from the allowed units list. This can be used to prevent access to selected units, e.g. private, internal modules of the running program.

    val main_program_units : unit -> string list

    Return the list of compilation units that form the main program (i.e. are not dynamically linked).

    val public_dynamically_loaded_units : unit -> string list

    Return the list of compilation units that have been dynamically loaded via loadfile (and not via loadfile_private). Note that compilation units loaded dynamically cannot be unloaded.

    val all_units : unit -> string list

    Return the list of compilation units that form the main program together with those that have been dynamically loaded via loadfile (and not via loadfile_private).

    val allow_unsafe_modules : bool -> unit

    Govern whether unsafe object files are allowed to be dynamically linked. A compilation unit is 'unsafe' if it contains declarations of external functions, which can break type safety. By default, dynamic linking of unsafe object files is not allowed. In native code, this function does nothing; object files with external functions are always allowed to be dynamically linked.

    Error reporting

    type linking_error = private
    1. | Undefined_global of string
    2. | Unavailable_primitive of string
    3. | Uninitialized_global of string
    type error = private
    1. | Not_a_bytecode_file of string
    2. | Inconsistent_import of string
    3. | Unavailable_unit of string
    4. | Unsafe_file
    5. | Linking_error of string * linking_error
    6. | Corrupted_interface of string
    7. | Cannot_open_dynamic_library of exn
    8. | Library's_module_initializers_failed of exn
    9. | Inconsistent_implementation of string
    10. | Module_already_loaded of string
    11. | Private_library_cannot_implement_interface of string
    exception Error of error

    Errors in dynamic linking are reported by raising the Error exception with a description of the error. A common case is the dynamic library not being found on the system: this is reported via Cannot_open_dynamic_library (the enclosed exception may be platform-specific).

    val error_message : error -> string

    Convert an error description to a printable message.

    diff --git a/ocaml/Effect_analysis/index.html b/ocaml/Effect_analysis/index.html index b69835b..17785a3 100644 --- a/ocaml/Effect_analysis/index.html +++ b/ocaml/Effect_analysis/index.html @@ -1,2 +1,2 @@ -Effect_analysis (ocaml.Effect_analysis)

    Module Effect_analysis

    Simple side effect analysis.

    val no_effects : Flambda.t -> bool

    Conservative approximation as to whether a given Flambda expression may have any side effects.

    val no_effects_named : Flambda.named -> bool
    \ No newline at end of file +Effect_analysis (ocaml.Effect_analysis)

    Module Effect_analysis

    Simple side effect analysis.

    val no_effects : Flambda.t -> bool

    Conservative approximation as to whether a given Flambda expression may have any side effects.

    val no_effects_named : Flambda.named -> bool
    diff --git a/ocaml/Emit/index.html b/ocaml/Emit/index.html index 9209a1b..617f988 100644 --- a/ocaml/Emit/index.html +++ b/ocaml/Emit/index.html @@ -1,2 +1,2 @@ -Emit (ocaml.Emit)

    Module Emit

    val fundecl : Linear.fundecl -> unit
    val data : Cmm.data_item list -> unit
    val begin_assembly : unit -> unit
    val end_assembly : unit -> unit
    \ No newline at end of file +Emit (ocaml.Emit)

    Module Emit

    val fundecl : Linear.fundecl -> unit
    val data : Cmm.data_item list -> unit
    val begin_assembly : unit -> unit
    val end_assembly : unit -> unit
    diff --git a/ocaml/Emitaux/index.html b/ocaml/Emitaux/index.html index 4dd4a2a..65350e8 100644 --- a/ocaml/Emitaux/index.html +++ b/ocaml/Emitaux/index.html @@ -1,15 +1,15 @@ -Emitaux (ocaml.Emitaux)

    Module Emitaux

    val output_channel : out_channel ref
    val emit_string : string -> unit
    val emit_int : int -> unit
    val emit_nativeint : nativeint -> unit
    val emit_int32 : int32 -> unit
    val emit_symbol : string -> unit
    val emit_printf : ('a, out_channel, unit) format -> 'a
    val emit_char : char -> unit
    val emit_string_literal : string -> unit
    val emit_string_directive : string -> string -> unit
    val emit_bytes_directive : string -> string -> unit
    val emit_float64_directive : string -> int64 -> unit
    val emit_float64_split_directive : string -> int64 -> unit
    val emit_float32_directive : string -> int32 -> unit
    val reset : unit -> unit
    val reset_debug_info : unit -> unit
    val emit_debug_info : Debuginfo.t -> unit
    val emit_debug_info_gen : +Emitaux (ocaml.Emitaux)

    Module Emitaux

    val output_channel : out_channel ref
    val emit_string : string -> unit
    val emit_int : int -> unit
    val emit_nativeint : nativeint -> unit
    val emit_int32 : int32 -> unit
    val emit_symbol : string -> unit
    val emit_printf : ('a, out_channel, unit) format -> 'a
    val emit_char : char -> unit
    val emit_string_literal : string -> unit
    val emit_string_directive : string -> string -> unit
    val emit_bytes_directive : string -> string -> unit
    val emit_float64_directive : string -> int64 -> unit
    val emit_float64_split_directive : string -> int64 -> unit
    val emit_float32_directive : string -> int32 -> unit
    val reset : unit -> unit
    val reset_debug_info : unit -> unit
    val emit_debug_info : Debuginfo.t -> unit
    val emit_debug_info_gen : Debuginfo.t -> - (file_num:int -> file_name:string -> unit) -> - (file_num:int -> line:int -> col:int -> unit) -> + (file_num:int -> file_name:string -> unit) -> + (file_num:int -> line:int -> col:int -> unit) -> unit
    type frame_debuginfo =
    1. | Dbg_alloc of Debuginfo.alloc_dbginfo
    2. | Dbg_raise of Debuginfo.t
    3. | Dbg_other of Debuginfo.t
    val record_frame_descr : - label:int -> - frame_size:int -> - live_offset:int list -> + label:int -> + frame_size:int -> + live_offset:int list -> frame_debuginfo -> - unit
    type emit_frame_actions = {
    1. efa_code_label : int -> unit;
    2. efa_data_label : int -> unit;
    3. efa_8 : int -> unit;
    4. efa_16 : int -> unit;
    5. efa_32 : int32 -> unit;
    6. efa_word : int -> unit;
    7. efa_align : int -> unit;
    8. efa_label_rel : int -> int32 -> unit;
    9. efa_def_label : int -> unit;
    10. efa_string : string -> unit;
    }
    val emit_frames : emit_frame_actions -> unit
    val is_generic_function : string -> bool
    val cfi_startproc : unit -> unit
    val cfi_endproc : unit -> unit
    val cfi_adjust_cfa_offset : int -> unit
    val cfi_offset : reg:int -> offset:int -> unit
    val cfi_def_cfa_offset : int -> unit
    val cfi_remember_state : unit -> unit
    val cfi_restore_state : unit -> unit
    val cfi_def_cfa_register : reg:int -> unit
    val binary_backend_available : bool ref

    Is a binary backend available. If yes, we don't need to generate the textual assembly file (unless the user request it with -S).

    val create_asm_file : bool ref

    Are we actually generating the textual assembly file?

    type error =
    1. | Stack_frame_too_large of int
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    type preproc_stack_check_result = {
    1. max_frame_size : int;
    2. contains_nontail_calls : bool;
    }
    val preproc_stack_check : - fun_body:Linear.instruction -> - frame_size:int -> - trap_size:int -> - preproc_stack_check_result
    \ No newline at end of file + unit
    type emit_frame_actions = {
    1. efa_code_label : int -> unit;
    2. efa_data_label : int -> unit;
    3. efa_8 : int -> unit;
    4. efa_16 : int -> unit;
    5. efa_32 : int32 -> unit;
    6. efa_word : int -> unit;
    7. efa_align : int -> unit;
    8. efa_label_rel : int -> int32 -> unit;
    9. efa_def_label : int -> unit;
    10. efa_string : string -> unit;
    }
    val emit_frames : emit_frame_actions -> unit
    val is_generic_function : string -> bool
    val cfi_startproc : unit -> unit
    val cfi_endproc : unit -> unit
    val cfi_adjust_cfa_offset : int -> unit
    val cfi_offset : reg:int -> offset:int -> unit
    val cfi_def_cfa_offset : int -> unit
    val cfi_remember_state : unit -> unit
    val cfi_restore_state : unit -> unit
    val cfi_def_cfa_register : reg:int -> unit
    val binary_backend_available : bool ref

    Is a binary backend available. If yes, we don't need to generate the textual assembly file (unless the user request it with -S).

    val create_asm_file : bool ref

    Are we actually generating the textual assembly file?

    type error =
    1. | Stack_frame_too_large of int
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    type preproc_stack_check_result = {
    1. max_frame_size : int;
    2. contains_nontail_calls : bool;
    }
    val preproc_stack_check : + fun_body:Linear.instruction -> + frame_size:int -> + trap_size:int -> + preproc_stack_check_result
    diff --git a/ocaml/Emitcode/index.html b/ocaml/Emitcode/index.html index a300aac..290d0fc 100644 --- a/ocaml/Emitcode/index.html +++ b/ocaml/Emitcode/index.html @@ -1,9 +1,9 @@ -Emitcode (ocaml.Emitcode)

    Module Emitcode

    val to_file : +Emitcode (ocaml.Emitcode)

    Module Emitcode

    val to_file : out_channel -> string -> string -> - required_globals:Ident.Set.t -> + required_globals:Ident.Set.t -> Instruct.instruction list -> unit
    val to_memory : Instruct.instruction list -> @@ -17,8 +17,8 @@ * (Cmo_format.reloc_info * int) list * Instruct.debug_event list * Misc.Stdlib.String.Set.t
    val marshal_to_channel_with_possibly_32bit_compat : - filename:string -> - kind:string -> + filename:string -> + kind:string -> out_channel -> 'a -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Emitenv/index.html b/ocaml/Emitenv/index.html index f5aaebd..2e787bd 100644 --- a/ocaml/Emitenv/index.html +++ b/ocaml/Emitenv/index.html @@ -1,2 +1,2 @@ -Emitenv (ocaml.Emitenv)

    Module Emitenv

    type label = Linear.label
    type gc_call = {
    1. gc_lbl : label;
    2. gc_return_lbl : label;
    3. gc_frame_lbl : label;
    }
    type bound_error_call = {
    1. bd_lbl : label;
    2. bd_frame : label;
    }
    type float_literal = {
    1. fl : int64;
    2. lbl : label;
    }
    type int_literal = {
    1. n : nativeint;
    2. n_lbl : label;
    }
    type offset_computation = {
    1. lbl : label;
    2. dst : label;
    3. src : label;
    }
    type gotrel_literal = {
    1. lbl_got : label;
    2. lbl_pic : label;
    }
    type symbol_literal = {
    1. sym : string;
    2. lbl : label;
    }
    type per_function_env = {
    1. f : Linear.fundecl;
    2. mutable stack_offset : int;
    3. mutable call_gc_sites : gc_call list;
    4. mutable call_gc_label : label;
    5. mutable bound_error_sites : bound_error_call list;
    6. mutable bound_error_call : label option;
    7. mutable jumptables_lbl : label option;
    8. mutable jumptables : label list;
    9. mutable float_literals : float_literal list;
    10. mutable int_literals : int_literal list;
    }
    \ No newline at end of file +Emitenv (ocaml.Emitenv)

    Module Emitenv

    type label = Linear.label
    type gc_call = {
    1. gc_lbl : label;
    2. gc_return_lbl : label;
    3. gc_frame_lbl : label;
    }
    type bound_error_call = {
    1. bd_lbl : label;
    2. bd_frame : label;
    }
    type float_literal = {
    1. fl : int64;
    2. lbl : label;
    }
    type int_literal = {
    1. n : nativeint;
    2. n_lbl : label;
    }
    type offset_computation = {
    1. lbl : label;
    2. dst : label;
    3. src : label;
    }
    type gotrel_literal = {
    1. lbl_got : label;
    2. lbl_pic : label;
    }
    type symbol_literal = {
    1. sym : string;
    2. lbl : label;
    }
    type per_function_env = {
    1. f : Linear.fundecl;
    2. mutable stack_offset : int;
    3. mutable call_gc_sites : gc_call list;
    4. mutable call_gc_label : label;
    5. mutable bound_error_sites : bound_error_call list;
    6. mutable bound_error_call : label option;
    7. mutable jumptables_lbl : label option;
    8. mutable jumptables : label list;
    9. mutable float_literals : float_literal list;
    10. mutable int_literals : int_literal list;
    }
    diff --git a/ocaml/Env/index.html b/ocaml/Env/index.html index 4424a1d..ea6a6ac 100644 --- a/ocaml/Env/index.html +++ b/ocaml/Env/index.html @@ -1,5 +1,5 @@ -Env (ocaml.Env)

    Module Env

    val register_uid : Types.Uid.t -> Location.t -> unit
    val get_uid_to_loc_tbl : unit -> Location.t Types.Uid.Tbl.t
    type value_unbound_reason =
    1. | Val_unbound_instance_variable
    2. | Val_unbound_self
    3. | Val_unbound_ancestor
    4. | Val_unbound_ghost_recursive of Location.t
    type module_unbound_reason =
    1. | Mod_unbound_illegal_recursion
    type summary =
    1. | Env_empty
    2. | Env_value of summary * Ident.t * Types.value_description
    3. | Env_type of summary * Ident.t * Types.type_declaration
    4. | Env_extension of summary * Ident.t * Types.extension_constructor
    5. | Env_module of summary +Env (ocaml.Env)

      Module Env

      val register_uid : Types.Uid.t -> Location.t -> unit
      val get_uid_to_loc_tbl : unit -> Location.t Types.Uid.Tbl.t
      type value_unbound_reason =
      1. | Val_unbound_instance_variable
      2. | Val_unbound_self
      3. | Val_unbound_ancestor
      4. | Val_unbound_ghost_recursive of Location.t
      type module_unbound_reason =
      1. | Mod_unbound_illegal_recursion
      type summary =
      1. | Env_empty
      2. | Env_value of summary * Ident.t * Types.value_description
      3. | Env_type of summary * Ident.t * Types.type_declaration
      4. | Env_extension of summary * Ident.t * Types.extension_constructor
      5. | Env_module of summary * Ident.t * Types.module_presence * Types.module_declaration
      6. | Env_modtype of summary * Ident.t * Types.modtype_declaration
      7. | Env_class of summary * Ident.t * Types.class_declaration
      8. | Env_cltype of summary * Ident.t * Types.class_type_declaration
      9. | Env_open of summary * Path.t
        (*

        The string set argument of Env_open represents a list of module names to skip, i.e. that won't be imported in the toplevel namespace.

        *)
      10. | Env_functor_arg of summary * Ident.t
      11. | Env_constraints of summary * Types.type_declaration Path.Map.t
      12. | Env_copy_types of summary
      13. | Env_persistent of summary * Ident.t
      14. | Env_value_unbound of summary * string * value_unbound_reason
      15. | Env_module_unbound of summary * string * module_unbound_reason
      type address =
      1. | Aident of Ident.t
      2. | Adot of address * int
      type t
      val empty : t
      val initial : t
      val diff : t -> t -> Ident.t list
      type type_descr_kind = @@ -7,7 +7,7 @@ (Path.t -> (Path.t * Types.type_declaration) -> unit) -> t -> iter_cont
      val run_iter_cont : iter_cont list -> (Path.t * iter_cont) list
      val same_types : t -> t -> bool
      val used_persistent : unit -> Misc.Stdlib.String.Set.t
      val find_shadowed_types : Path.t -> t -> Path.t list
      val without_cmis : ('a -> 'b) -> 'a -> 'b
      val find_value : Path.t -> t -> Types.value_description
      val find_type : Path.t -> t -> Types.type_declaration
      val find_type_descrs : Path.t -> t -> type_descriptions
      val find_module : Path.t -> t -> Types.module_declaration
      val find_modtype : Path.t -> t -> Types.modtype_declaration
      val find_class : Path.t -> t -> Types.class_declaration
      val find_cltype : Path.t -> t -> Types.class_type_declaration
      val find_strengthened_module : - aliasable:bool -> + aliasable:bool -> Path.t -> t -> Types.module_type
      val find_ident_constructor : Ident.t -> t -> Types.constructor_description
      val find_ident_label : Ident.t -> t -> Types.label_description
      val find_type_expansion : @@ -17,7 +17,7 @@ Path.t -> t -> Types.type_expr list * Types.type_expr * int
      val find_modtype_expansion : Path.t -> t -> Types.module_type
      val find_modtype_expansion_lazy : Path.t -> t -> Subst.Lazy.modtype
      val find_hash_type : Path.t -> t -> Types.type_declaration
      val find_value_address : Path.t -> t -> address
      val find_module_address : Path.t -> t -> address
      val find_class_address : Path.t -> t -> address
      val find_constructor_address : Path.t -> t -> address
      val shape_of_path : - namespace:Shape.Sig_component_kind.t -> + namespace:Shape.Sig_component_kind.t -> t -> Path.t -> Shape.t
      val add_functor_arg : Ident.t -> t -> t
      val is_functor_arg : Path.t -> t -> bool
      val normalize_module_path : Location.t option -> t -> Path.t -> Path.t
      val normalize_type_path : Location.t option -> t -> Path.t -> Path.t
      val normalize_value_path : Location.t option -> t -> Path.t -> Path.t
      val normalize_modtype_path : t -> Path.t -> Path.t
      val reset_required_globals : unit -> unit
      val get_required_globals : unit -> Ident.t list
      val add_required_global : Ident.t -> unit
      val has_local_constraints : t -> bool
      val mark_value_used : Types.Uid.t -> unit
      val mark_module_used : Types.Uid.t -> unit
      val mark_type_used : Types.Uid.t -> unit
      type constructor_usage =
      1. | Positive
      2. | Pattern
      3. | Exported_private
      4. | Exported
      val mark_constructor_used : @@ -27,89 +27,89 @@ constructor_usage -> Types.extension_constructor -> unit
      type label_usage =
      1. | Projection
      2. | Mutation
      3. | Construct
      4. | Exported_private
      5. | Exported
      val mark_label_used : label_usage -> Types.label_declaration -> unit
      type unbound_value_hint =
      1. | No_hint
      2. | Missing_rec of Location.t
      type lookup_error =
      1. | Unbound_value of Longident.t * unbound_value_hint
      2. | Unbound_type of Longident.t
      3. | Unbound_constructor of Longident.t
      4. | Unbound_label of Longident.t
      5. | Unbound_module of Longident.t
      6. | Unbound_class of Longident.t
      7. | Unbound_modtype of Longident.t
      8. | Unbound_cltype of Longident.t
      9. | Unbound_instance_variable of string
      10. | Not_an_instance_variable of string
      11. | Masked_instance_variable of Longident.t
      12. | Masked_self_variable of Longident.t
      13. | Masked_ancestor_variable of Longident.t
      14. | Structure_used_as_functor of Longident.t
      15. | Abstract_used_as_functor of Longident.t
      16. | Functor_used_as_structure of Longident.t
      17. | Abstract_used_as_structure of Longident.t
      18. | Generative_used_as_applicative of Longident.t
      19. | Illegal_reference_to_recursive_module
      20. | Cannot_scrape_alias of Longident.t * Path.t
      val lookup_error : Location.t -> t -> lookup_error -> 'a
      val lookup_value : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.value_description
      val lookup_type : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.type_declaration
      val lookup_module : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.module_declaration
      val lookup_modtype : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.modtype_declaration
      val lookup_class : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.class_declaration
      val lookup_cltype : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t * Types.class_type_declaration
      val lookup_module_path : - ?use:bool -> - loc:Location.t -> - load:bool -> + ?use:bool -> + loc:Location.t -> + load:bool -> Longident.t -> t -> Path.t
      val lookup_modtype_path : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> Longident.t -> t -> Path.t
      val lookup_constructor : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> constructor_usage -> Longident.t -> t -> Types.constructor_description
      val lookup_all_constructors : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> constructor_usage -> Longident.t -> t -> ((Types.constructor_description * (unit -> unit)) list, Location.t * t * lookup_error) result
      val lookup_all_constructors_from_type : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> constructor_usage -> Path.t -> t -> (Types.constructor_description * (unit -> unit)) list
      val lookup_label : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> label_usage -> Longident.t -> t -> Types.label_description
      val lookup_all_labels : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> label_usage -> Longident.t -> t -> ((Types.label_description * (unit -> unit)) list, Location.t * t * lookup_error) result
      val lookup_all_labels_from_type : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> label_usage -> Path.t -> t -> (Types.label_description * (unit -> unit)) list
      val lookup_instance_variable : - ?use:bool -> - loc:Location.t -> + ?use:bool -> + loc:Location.t -> string -> t -> Path.t * Asttypes.mutable_flag * string * Types.type_expr
      val find_value_by_name : Longident.t -> t -> Path.t * Types.value_description
      val find_type_by_name : Longident.t -> t -> Path.t * Types.type_declaration
      val find_module_by_name : Longident.t -> t -> Path.t * Types.module_declaration
      val find_modtype_by_name : @@ -122,124 +122,124 @@ Longident.t -> t -> Types.constructor_description
      val find_label_by_name : Longident.t -> t -> Types.label_description
      val find_value_index : Ident.t -> t -> int option

      The find_*_index functions computes a "namespaced" De Bruijn index of an identifier in a given environment. In other words, it returns how many times an identifier has been shadowed by a more recent identifiers with the same name in a given environment. Those functions return None when the identifier is not bound in the environment. This behavior is there to facilitate the detection of inconsistent printing environment, but should disappear in the long term.

      val find_type_index : Ident.t -> t -> int option
      val find_module_index : Ident.t -> t -> int option
      val find_modtype_index : Ident.t -> t -> int option
      val find_class_index : Ident.t -> t -> int option
      val find_cltype_index : Ident.t -> t -> int option
      val bound_value : string -> t -> bool
      val bound_module : string -> t -> bool
      val bound_type : string -> t -> bool
      val bound_modtype : string -> t -> bool
      val bound_class : string -> t -> bool
      val bound_cltype : string -> t -> bool
      val make_copy_of_types : t -> t -> t
      val add_value : - ?check:(string -> Warnings.t) -> + ?check:(string -> Warnings.t) -> Ident.t -> Types.value_description -> t -> - t
      val add_type : check:bool -> Ident.t -> Types.type_declaration -> t -> t
      val add_extension : - check:bool -> - rebind:bool -> + t
      val add_type : check:bool -> Ident.t -> Types.type_declaration -> t -> t
      val add_extension : + check:bool -> + rebind:bool -> Ident.t -> Types.extension_constructor -> t -> t
      val add_module : - ?arg:bool -> - ?shape:Shape.t -> + ?arg:bool -> + ?shape:Shape.t -> Ident.t -> Types.module_presence -> Types.module_type -> t -> t
      val add_module_lazy : - update_summary:bool -> + update_summary:bool -> Ident.t -> Types.module_presence -> Subst.Lazy.modtype -> t -> t
      val add_module_declaration : - ?arg:bool -> - ?shape:Shape.t -> - check:bool -> + ?arg:bool -> + ?shape:Shape.t -> + check:bool -> Ident.t -> Types.module_presence -> Types.module_declaration -> t -> t
      val add_module_declaration_lazy : - update_summary:bool -> + update_summary:bool -> Ident.t -> Types.module_presence -> Subst.Lazy.module_decl -> t -> t
      val add_modtype : Ident.t -> Types.modtype_declaration -> t -> t
      val add_modtype_lazy : - update_summary:bool -> + update_summary:bool -> Ident.t -> Subst.Lazy.modtype_declaration -> t -> t
      val add_class : Ident.t -> Types.class_declaration -> t -> t
      val add_cltype : Ident.t -> Types.class_type_declaration -> t -> t
      val add_local_type : Path.t -> Types.type_declaration -> t -> t
      val add_persistent_structure : Ident.t -> t -> t
      val persistent_structures_of_dir : Load_path.Dir.t -> Misc.Stdlib.String.Set.t
      val filter_non_loaded_persistent : (Ident.t -> bool) -> t -> t
      val add_signature : Types.signature -> t -> t
      val open_signature : - ?used_slot:bool ref -> - ?loc:Location.t -> - ?toplevel:bool -> + ?used_slot:bool ref -> + ?loc:Location.t -> + ?toplevel:bool -> Asttypes.override_flag -> Path.t -> t -> (t, [ `Not_found | `Functor ]) result
      val open_pers_signature : string -> t -> (t, [ `Not_found ]) result
      val remove_last_open : Path.t -> t -> t option
      val enter_value : - ?check:(string -> Warnings.t) -> + ?check:(string -> Warnings.t) -> string -> Types.value_description -> t -> Ident.t * t
      val enter_type : - scope:int -> + scope:int -> string -> Types.type_declaration -> t -> Ident.t * t
      val enter_extension : - scope:int -> - rebind:bool -> + scope:int -> + rebind:bool -> string -> Types.extension_constructor -> t -> Ident.t * t
      val enter_module : - scope:int -> - ?arg:bool -> + scope:int -> + ?arg:bool -> string -> Types.module_presence -> Types.module_type -> t -> Ident.t * t
      val enter_module_declaration : - scope:int -> - ?arg:bool -> - ?shape:Shape.t -> + scope:int -> + ?arg:bool -> + ?shape:Shape.t -> string -> Types.module_presence -> Types.module_declaration -> t -> Ident.t * t
      val enter_modtype : - scope:int -> + scope:int -> string -> Types.modtype_declaration -> t -> Ident.t * t
      val enter_class : - scope:int -> + scope:int -> string -> Types.class_declaration -> t -> Ident.t * t
      val enter_cltype : - scope:int -> + scope:int -> string -> Types.class_type_declaration -> t -> Ident.t * t
      val enter_signature : - ?mod_shape:Shape.t -> - scope:int -> + ?mod_shape:Shape.t -> + scope:int -> Types.signature -> t -> Types.signature * t
      val enter_signature_and_shape : - scope:int -> - parent_shape:Shape.Map.t -> + scope:int -> + parent_shape:Shape.Map.t -> Shape.t -> Types.signature -> t -> Types.signature * Shape.Map.t * t
      val enter_unbound_value : string -> value_unbound_reason -> t -> t
      val enter_unbound_module : string -> module_unbound_reason -> t -> t
      val reset_cache : unit -> unit
      val reset_cache_toplevel : unit -> unit
      val set_unit_name : string -> unit
      val get_unit_name : unit -> string
      val read_signature : Misc.modname -> Misc.filepath -> Types.signature
      val save_signature : - alerts:Misc.alerts -> + alerts:Misc.alerts -> Types.signature -> Misc.modname -> Misc.filepath -> Cmi_format.cmi_infos
      val save_signature_with_imports : - alerts:Misc.alerts -> + alerts:Misc.alerts -> Types.signature -> Misc.modname -> Misc.filepath -> Misc.crcs -> - Cmi_format.cmi_infos
      val crc_of_unit : Misc.modname -> Stdlib.Digest.t
      val imports : unit -> Misc.crcs
      val import_crcs : source:string -> Misc.crcs -> unit
      val is_imported_opaque : Misc.modname -> bool
      val register_import_as_opaque : Misc.modname -> unit
      val summary : t -> summary
      val keep_only_summary : t -> t
      val env_of_only_summary : (summary -> Subst.t -> t) -> t -> t
      type error =
      1. | Missing_module of Location.t * Path.t * Path.t
      2. | Illegal_value_name of Location.t * string
      3. | Lookup_error of Location.t * t * lookup_error
      exception Error of error
      val report_error : Stdlib.Format.formatter -> error -> unit
      val report_lookup_error : + Cmi_format.cmi_infos
      val crc_of_unit : Misc.modname -> Stdlib.Digest.t
      val imports : unit -> Misc.crcs
      val import_crcs : source:string -> Misc.crcs -> unit
      val is_imported_opaque : Misc.modname -> bool
      val register_import_as_opaque : Misc.modname -> unit
      val summary : t -> summary
      val keep_only_summary : t -> t
      val env_of_only_summary : (summary -> Subst.t -> t) -> t -> t
      type error =
      1. | Missing_module of Location.t * Path.t * Path.t
      2. | Illegal_value_name of Location.t * string
      3. | Lookup_error of Location.t * t * lookup_error
      exception Error of error
      val report_error : Stdlib.Format.formatter -> error -> unit
      val report_lookup_error : Location.t -> t -> Stdlib.Format.formatter -> @@ -248,19 +248,19 @@ Types.type_declaration -> ((unit -> unit) -> unit) -> unit
      val check_functor_application : - (errors:bool -> - loc:Location.t -> - lid_whole_app:Longident.t -> - f0_path:Path.t -> - args:(Path.t * Types.module_type) list -> - arg_path:Path.t -> - arg_mty:Types.module_type -> - param_mty:Types.module_type -> + (errors:bool -> + loc:Location.t -> + lid_whole_app:Longident.t -> + f0_path:Path.t -> + args:(Path.t * Types.module_type) list -> + arg_path:Path.t -> + arg_mty:Types.module_type -> + param_mty:Types.module_type -> t -> unit) ref
      val check_well_formed_module : (t -> Location.t -> string -> Types.module_type -> unit) ref
      val add_delayed_check_forward : ((unit -> unit) -> unit) ref
      val strengthen : - (aliasable:bool -> + (aliasable:bool -> t -> Subst.Lazy.modtype -> Path.t -> @@ -305,4 +305,4 @@ Longident.t option -> t -> 'a -> - 'a
      val scrape_alias : t -> Types.module_type -> Types.module_type

      Utilities

      val check_value_name : string -> Location.t -> unit
      val print_address : Stdlib.Format.formatter -> address -> unit
      \ No newline at end of file + 'a
    val scrape_alias : t -> Types.module_type -> Types.module_type

    Utilities

    val check_value_name : string -> Location.t -> unit
    val print_address : Stdlib.Format.formatter -> address -> unit
    diff --git a/ocaml/Envaux/index.html b/ocaml/Envaux/index.html index 6fc9470..d3e440c 100644 --- a/ocaml/Envaux/index.html +++ b/ocaml/Envaux/index.html @@ -1,2 +1,2 @@ -Envaux (ocaml.Envaux)

    Module Envaux

    val env_from_summary : Env.summary -> Subst.t -> Env.t
    val reset_cache : unit -> unit
    val env_of_only_summary : Env.t -> Env.t
    type error =
    1. | Module_not_found of Path.t
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file +Envaux (ocaml.Envaux)

    Module Envaux

    val env_from_summary : Env.summary -> Subst.t -> Env.t
    val reset_cache : unit -> unit
    val env_of_only_summary : Env.t -> Env.t
    type error =
    1. | Module_not_found of Path.t
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Errors/index.html b/ocaml/Errors/index.html index be435a7..22a52c7 100644 --- a/ocaml/Errors/index.html +++ b/ocaml/Errors/index.html @@ -1,2 +1,2 @@ -Errors (ocaml.Errors)

    Module Errors

    val report_error : Stdlib.Format.formatter -> exn -> unit
    \ No newline at end of file +Errors (ocaml.Errors)

    Module Errors

    val report_error : Stdlib.Format.formatter -> exn -> unit
    diff --git a/ocaml/Errortrace/Subtype/index.html b/ocaml/Errortrace/Subtype/index.html index 05137aa..84116a6 100644 --- a/ocaml/Errortrace/Subtype/index.html +++ b/ocaml/Errortrace/Subtype/index.html @@ -1,5 +1,5 @@ -Subtype (ocaml.Errortrace.Subtype)

    Module Errortrace.Subtype

    type 'a elt =
    1. | Diff of 'a diff
    type 'a t = 'a elt list

    Just as outside Subtype, we split traces, completed traces, and complete errors. However, in a minor asymmetry, the name Subtype.error_trace corresponds to the outside error type, and Subtype.error corresponds to the outside *_error types (e.g., unification_error). This error type has the invariant that the subtype trace is nonempty; note that no such invariant is imposed on the unification trace.

    type trace = Types.type_expr t
    type error_trace = expanded_type t
    type unification_error_trace = unification error

    To avoid shadowing

    type nonrec error = private {
    1. trace : error_trace;
    2. unification_trace : unification error;
    }
    val error : - trace:error_trace -> - unification_trace:unification_error_trace -> - error
    val map : ('a -> 'b) -> 'a t -> 'b t
    \ No newline at end of file +Subtype (ocaml.Errortrace.Subtype)

    Module Errortrace.Subtype

    type 'a elt =
    1. | Diff of 'a diff
    type 'a t = 'a elt list

    Just as outside Subtype, we split traces, completed traces, and complete errors. However, in a minor asymmetry, the name Subtype.error_trace corresponds to the outside error type, and Subtype.error corresponds to the outside *_error types (e.g., unification_error). This error type has the invariant that the subtype trace is nonempty; note that no such invariant is imposed on the unification trace.

    type trace = Types.type_expr t
    type error_trace = expanded_type t
    type unification_error_trace = unification error

    To avoid shadowing

    type nonrec error = private {
    1. trace : error_trace;
    2. unification_trace : unification error;
    }
    val error : + trace:error_trace -> + unification_trace:unification_error_trace -> + error
    val map : ('a -> 'b) -> 'a t -> 'b t
    diff --git a/ocaml/Errortrace/index.html b/ocaml/Errortrace/index.html index d845729..f8dc1e3 100644 --- a/ocaml/Errortrace/index.html +++ b/ocaml/Errortrace/index.html @@ -1,11 +1,11 @@ -Errortrace (ocaml.Errortrace)

    Module Errortrace

    type position =
    1. | First
    2. | Second
    val swap_position : position -> position
    val print_pos : Stdlib.Format.formatter -> position -> unit
    type expanded_type = {
    1. ty : Types.type_expr;
    2. expanded : Types.type_expr;
    }
    val trivial_expansion : Types.type_expr -> expanded_type

    trivial_expansion ty creates an expanded_type whose expansion is also ty. Usually, you want Ctype.expand_type instead, since the expansion carries useful information; however, in certain circumstances, the error is about the expansion of the type, meaning that actually performing the expansion produces more confusing or inaccurate output.

    type 'a diff = {
    1. got : 'a;
    2. expected : 'a;
    }
    val map_diff : ('a -> 'b) -> 'a diff -> 'b diff

    map_diff f {expected;got} is {expected=f expected; got=f got}

    type 'a escape_kind =
    1. | Constructor of Path.t
    2. | Univ of Types.type_expr
    3. | Self
    4. | Module_type of Path.t
    5. | Equation of 'a
    6. | Constraint

    Scope escape related errors

    type 'a escape = {
    1. kind : 'a escape_kind;
    2. context : Types.type_expr option;
    }
    val map_escape : ('a -> 'b) -> 'a escape -> 'b escape
    val explain : 'a list -> (prev:'a option -> 'a -> 'b option) -> 'b option
    type unification = private
    1. | Unification

    Type indices

    type comparison = private
    1. | Comparison
    type fixed_row_case =
    1. | Cannot_be_closed
    2. | Cannot_add_tags of string list
    type 'variety variant =
    1. | Incompatible_types_for : string -> _ variant
    2. | No_tags : position * (Asttypes.label * Types.row_field) list -> _ variant
    3. | No_intersection : unification variant
    4. | Fixed_row : position +Errortrace (ocaml.Errortrace)

      Module Errortrace

      type position =
      1. | First
      2. | Second
      val swap_position : position -> position
      val print_pos : Stdlib.Format.formatter -> position -> unit
      type expanded_type = {
      1. ty : Types.type_expr;
      2. expanded : Types.type_expr;
      }
      val trivial_expansion : Types.type_expr -> expanded_type

      trivial_expansion ty creates an expanded_type whose expansion is also ty. Usually, you want Ctype.expand_type instead, since the expansion carries useful information; however, in certain circumstances, the error is about the expansion of the type, meaning that actually performing the expansion produces more confusing or inaccurate output.

      type 'a diff = {
      1. got : 'a;
      2. expected : 'a;
      }
      val map_diff : ('a -> 'b) -> 'a diff -> 'b diff

      map_diff f {expected;got} is {expected=f expected; got=f got}

      type 'a escape_kind =
      1. | Constructor of Path.t
      2. | Univ of Types.type_expr
      3. | Self
      4. | Module_type of Path.t
      5. | Equation of 'a
      6. | Constraint

      Scope escape related errors

      type 'a escape = {
      1. kind : 'a escape_kind;
      2. context : Types.type_expr option;
      }
      val map_escape : ('a -> 'b) -> 'a escape -> 'b escape
      val explain : 'a list -> (prev:'a option -> 'a -> 'b option) -> 'b option
      type unification = private
      1. | Unification

      Type indices

      type comparison = private
      1. | Comparison
      type fixed_row_case =
      1. | Cannot_be_closed
      2. | Cannot_add_tags of string list
      type 'variety variant =
      1. | Incompatible_types_for : string -> _ variant
      2. | No_tags : position * (Asttypes.label * Types.row_field) list -> _ variant
      3. | No_intersection : unification variant
      4. | Fixed_row : position * fixed_row_case * Types.fixed_explanation -> unification variant
      5. | Presence_not_guaranteed_for : position * string -> comparison variant
      6. | Openness : position -> comparison variant
      type 'variety obj =
      1. | Missing_field : position * string -> _ obj
      2. | Abstract_row : position -> _ obj
      3. | Self_cannot_be_closed : unification obj
      type ('a, 'variety) elt =
      1. | Diff : 'a diff -> ('a, _) elt
      2. | Variant : 'variety variant -> ('a, 'variety) elt
      3. | Obj : 'variety obj -> ('a, 'variety) elt
      4. | Escape : 'a escape -> ('a, _) elt
      5. | Incompatible_fields : {
        1. name : string;
        2. diff : Types.type_expr diff;
        } -> ('a, _) elt
      6. | Rec_occur : Types.type_expr * Types.type_expr -> ('a, _) elt
      type ('a, 'variety) t = ('a, 'variety) elt list
      type 'variety trace = (Types.type_expr, 'variety) t
      type 'variety error = (expanded_type, 'variety) t
      val map : ('a -> 'b) -> ('a, 'variety) t -> ('b, 'variety) t
      val incompatible_fields : - name:string -> - got:Types.type_expr -> - expected:Types.type_expr -> - (Types.type_expr, _) elt
      val swap_trace : ('a, 'variety) t -> ('a, 'variety) t

      The traces ('variety t) are the core error types. However, we bundle them up into three "top-level" error types, which are used elsewhere: unification_error, equality_error, and moregen_error. In the case of equality_error, this has to bundle in extra information; in general, it distinguishes the three types of errors and allows us to distinguish traces that are being built (or processed) from those that are complete and have become the final error. These error types have the invariants that their traces are nonempty; we ensure that through three smart constructors with matching names.

      type unification_error = private {
      1. trace : unification error;
      }
      type equality_error = private {
      1. trace : comparison error;
      2. subst : (Types.type_expr * Types.type_expr) list;
      }
      type moregen_error = private {
      1. trace : comparison error;
      }
      val unification_error : trace:unification error -> unification_error
      val equality_error : - trace:comparison error -> - subst:(Types.type_expr * Types.type_expr) list -> - equality_error
      val moregen_error : trace:comparison error -> moregen_error
      type comparison_error =
      1. | Equality_error of equality_error
      2. | Moregen_error of moregen_error

      Wraps up the two different kinds of comparison errors in one type

      val swap_unification_error : unification_error -> unification_error

      Lift swap_trace to unification_error

      module Subtype : sig ... end
      \ No newline at end of file + name:string -> + got:Types.type_expr -> + expected:Types.type_expr -> + (Types.type_expr, _) elt
    val swap_trace : ('a, 'variety) t -> ('a, 'variety) t

    The traces ('variety t) are the core error types. However, we bundle them up into three "top-level" error types, which are used elsewhere: unification_error, equality_error, and moregen_error. In the case of equality_error, this has to bundle in extra information; in general, it distinguishes the three types of errors and allows us to distinguish traces that are being built (or processed) from those that are complete and have become the final error. These error types have the invariants that their traces are nonempty; we ensure that through three smart constructors with matching names.

    type unification_error = private {
    1. trace : unification error;
    }
    type equality_error = private {
    1. trace : comparison error;
    2. subst : (Types.type_expr * Types.type_expr) list;
    }
    type moregen_error = private {
    1. trace : comparison error;
    }
    val unification_error : trace:unification error -> unification_error
    val equality_error : + trace:comparison error -> + subst:(Types.type_expr * Types.type_expr) list -> + equality_error
    val moregen_error : trace:comparison error -> moregen_error
    type comparison_error =
    1. | Equality_error of equality_error
    2. | Moregen_error of moregen_error

    Wraps up the two different kinds of comparison errors in one type

    val swap_unification_error : unification_error -> unification_error

    Lift swap_trace to unification_error

    module Subtype : sig ... end
    diff --git a/ocaml/Event/index.html b/ocaml/Event/index.html index 976d287..e92494f 100644 --- a/ocaml/Event/index.html +++ b/ocaml/Event/index.html @@ -1,2 +1,2 @@ -Event (ocaml.Event)

    Module Event

    First-class synchronous communication.

    This module implements synchronous inter-thread communications over channels. As in John Reppy's Concurrent ML system, the communication events are first-class values: they can be built and combined independently before being offered for communication.

    type 'a channel

    The type of communication channels carrying values of type 'a.

    val new_channel : unit -> 'a channel

    Return a new channel.

    type +'a event

    The type of communication events returning a result of type 'a.

    val send : 'a channel -> 'a -> unit event

    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

    val receive : 'a channel -> 'a event

    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

    val always : 'a -> 'a event

    always v returns an event that is always ready for synchronization. The result value of this event is v.

    val choose : 'a event list -> 'a event

    choose evl returns the event that is the alternative of all the events in the list evl.

    val wrap : 'a event -> ('a -> 'b) -> 'b event

    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

    val guard : (unit -> 'a event) -> 'a event

    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

    val sync : 'a event -> 'a

    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

    val select : 'a event list -> 'a

    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

    val poll : 'a event -> 'a option

    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

    \ No newline at end of file +Event (ocaml.Event)

    Module Event

    First-class synchronous communication.

    This module implements synchronous inter-thread communications over channels. As in John Reppy's Concurrent ML system, the communication events are first-class values: they can be built and combined independently before being offered for communication.

    type 'a channel

    The type of communication channels carrying values of type 'a.

    val new_channel : unit -> 'a channel

    Return a new channel.

    type +'a event

    The type of communication events returning a result of type 'a.

    val send : 'a channel -> 'a -> unit event

    send ch v returns the event consisting in sending the value v over the channel ch. The result value of this event is ().

    val receive : 'a channel -> 'a event

    receive ch returns the event consisting in receiving a value from the channel ch. The result value of this event is the value received.

    val always : 'a -> 'a event

    always v returns an event that is always ready for synchronization. The result value of this event is v.

    val choose : 'a event list -> 'a event

    choose evl returns the event that is the alternative of all the events in the list evl.

    val wrap : 'a event -> ('a -> 'b) -> 'b event

    wrap ev fn returns the event that performs the same communications as ev, then applies the post-processing function fn on the return value.

    val wrap_abort : 'a event -> (unit -> unit) -> 'a event

    wrap_abort ev fn returns the event that performs the same communications as ev, but if it is not selected the function fn is called after the synchronization.

    val guard : (unit -> 'a event) -> 'a event

    guard fn returns the event that, when synchronized, computes fn() and behaves as the resulting event. This enables computing events with side-effects at the time of the synchronization operation.

    val sync : 'a event -> 'a

    'Synchronize' on an event: offer all the communication possibilities specified in the event to the outside world, and block until one of the communications succeed. The result value of that communication is returned.

    val select : 'a event list -> 'a

    'Synchronize' on an alternative of events. select evl is shorthand for sync(choose evl).

    val poll : 'a event -> 'a option

    Non-blocking version of Event.sync: offer all the communication possibilities specified in the event to the outside world, and if one can take place immediately, perform it and return Some r where r is the result value of that communication. Otherwise, return None without blocking.

    diff --git a/ocaml/Export_id/Map/index.html b/ocaml/Export_id/Map/index.html index 173fac5..04ff4b8 100644 --- a/ocaml/Export_id/Map/index.html +++ b/ocaml/Export_id/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Export_id.Map)

    Module Export_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Export_id.Map)

    Module Export_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Export_id/Set/index.html b/ocaml/Export_id/Set/index.html index 5b690a0..08c81df 100644 --- a/ocaml/Export_id/Set/index.html +++ b/ocaml/Export_id/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Export_id.Set)

    Module Export_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Export_id.Set)

    Module Export_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Export_id/T/index.html b/ocaml/Export_id/T/index.html index 4458923..742a5d8 100644 --- a/ocaml/Export_id/T/index.html +++ b/ocaml/Export_id/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Export_id.T)

    Module Export_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Export_id.T)

    Module Export_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Export_id/Tbl/index.html b/ocaml/Export_id/Tbl/index.html index b25e7d4..e98026d 100644 --- a/ocaml/Export_id/Tbl/index.html +++ b/ocaml/Export_id/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Export_id.Tbl)

    Module Export_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Export_id.Tbl)

    Module Export_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Export_id/index.html b/ocaml/Export_id/index.html index b75e083..213d35e 100644 --- a/ocaml/Export_id/index.html +++ b/ocaml/Export_id/index.html @@ -1,2 +1,2 @@ -Export_id (ocaml.Export_id)

    Module Export_id

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : ?name:string -> Compilation_unit.t -> t
    val name : t -> string option
    val get_compilation_unit : t -> Compilation_unit.t
    \ No newline at end of file +Export_id (ocaml.Export_id)

    Module Export_id

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : ?name:string -> Compilation_unit.t -> t
    val name : t -> string option
    val get_compilation_unit : t -> Compilation_unit.t
    diff --git a/ocaml/Export_info/index.html b/ocaml/Export_info/index.html index c7ecbd0..b062ac4 100644 --- a/ocaml/Export_info/index.html +++ b/ocaml/Export_info/index.html @@ -1,34 +1,34 @@ -Export_info (ocaml.Export_info)

    Module Export_info

    Exported information (that is to say, information written into a .cmx file) about a compilation unit.

    type value_string_contents =
    1. | Contents of string
    2. | Unknown_or_mutable
    type value_string = {
    1. contents : value_string_contents;
    2. size : int;
    }
    type value_float_array_contents =
    1. | Contents of float option array
    2. | Unknown_or_mutable
    type value_float_array = {
    1. contents : value_float_array_contents;
    2. size : int;
    }
    type descr =
    1. | Value_block of Tag.t * approx array
    2. | Value_mutable_block of Tag.t * int
    3. | Value_int of int
    4. | Value_char of char
    5. | Value_float of float
    6. | Value_float_array of value_float_array
    7. | Value_boxed_int : 'a A.boxed_int * 'a -> descr
    8. | Value_string of value_string
    9. | Value_closure of value_closure
    10. | Value_set_of_closures of value_set_of_closures
    11. | Value_unknown_descr
    and value_closure = {
    1. closure_id : Closure_id.t;
    2. set_of_closures : value_set_of_closures;
    }
    and value_set_of_closures = {
    1. set_of_closures_id : Set_of_closures_id.t;
    2. bound_vars : approx Var_within_closure.Map.t;
    3. free_vars : Flambda.specialised_to Variable.Map.t;
    4. results : approx Closure_id.Map.t;
    5. aliased_symbol : Symbol.t option;
    }
    and approx =
    1. | Value_unknown
    2. | Value_id of Export_id.t
    3. | Value_symbol of Symbol.t
    type t = private {
    1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
      (*

      Code of exported functions indexed by set of closures IDs.

      *)
    2. values : descr Export_id.Map.t Compilation_unit.Map.t;
      (*

      Structure of exported values.

      *)
    3. symbol_id : Export_id.t Symbol.Map.t;
      (*

      Associates symbols and values.

      *)
    4. offset_fun : int Closure_id.Map.t;
      (*

      Positions of function pointers in their closures.

      *)
    5. offset_fv : int Var_within_closure.Map.t;
      (*

      Positions of value pointers in their closures.

      *)
    6. constant_closures : Closure_id.Set.t;
    7. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
    8. recursive : Variable.Set.t Set_of_closures_id.Map.t;
    }

    A structure that describes what a single compilation unit exports.

    type transient = private {
    1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
    2. values : descr Export_id.Map.t Compilation_unit.Map.t;
    3. symbol_id : Export_id.t Symbol.Map.t;
    4. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
    5. recursive : Variable.Set.t Set_of_closures_id.Map.t;
    6. relevant_local_closure_ids : Closure_id.Set.t;
    7. relevant_imported_closure_ids : Closure_id.Set.t;
    8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
    9. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
    }
    val empty : t

    Export information for a compilation unit that exports nothing.

    val opaque_transient : - compilation_unit:Compilation_unit.t -> - root_symbol:Symbol.t -> +Export_info (ocaml.Export_info)

    Module Export_info

    Exported information (that is to say, information written into a .cmx file) about a compilation unit.

    type value_string_contents =
    1. | Contents of string
    2. | Unknown_or_mutable
    type value_string = {
    1. contents : value_string_contents;
    2. size : int;
    }
    type value_float_array_contents =
    1. | Contents of float option array
    2. | Unknown_or_mutable
    type value_float_array = {
    1. contents : value_float_array_contents;
    2. size : int;
    }
    type descr =
    1. | Value_block of Tag.t * approx array
    2. | Value_mutable_block of Tag.t * int
    3. | Value_int of int
    4. | Value_char of char
    5. | Value_float of float
    6. | Value_float_array of value_float_array
    7. | Value_boxed_int : 'a A.boxed_int * 'a -> descr
    8. | Value_string of value_string
    9. | Value_closure of value_closure
    10. | Value_set_of_closures of value_set_of_closures
    11. | Value_unknown_descr
    and value_closure = {
    1. closure_id : Closure_id.t;
    2. set_of_closures : value_set_of_closures;
    }
    and value_set_of_closures = {
    1. set_of_closures_id : Set_of_closures_id.t;
    2. bound_vars : approx Var_within_closure.Map.t;
    3. free_vars : Flambda.specialised_to Variable.Map.t;
    4. results : approx Closure_id.Map.t;
    5. aliased_symbol : Symbol.t option;
    }
    and approx =
    1. | Value_unknown
    2. | Value_id of Export_id.t
    3. | Value_symbol of Symbol.t
    type t = private {
    1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
      (*

      Code of exported functions indexed by set of closures IDs.

      *)
    2. values : descr Export_id.Map.t Compilation_unit.Map.t;
      (*

      Structure of exported values.

      *)
    3. symbol_id : Export_id.t Symbol.Map.t;
      (*

      Associates symbols and values.

      *)
    4. offset_fun : int Closure_id.Map.t;
      (*

      Positions of function pointers in their closures.

      *)
    5. offset_fv : int Var_within_closure.Map.t;
      (*

      Positions of value pointers in their closures.

      *)
    6. constant_closures : Closure_id.Set.t;
    7. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
    8. recursive : Variable.Set.t Set_of_closures_id.Map.t;
    }

    A structure that describes what a single compilation unit exports.

    type transient = private {
    1. sets_of_closures : A.function_declarations Set_of_closures_id.Map.t;
    2. values : descr Export_id.Map.t Compilation_unit.Map.t;
    3. symbol_id : Export_id.t Symbol.Map.t;
    4. invariant_params : Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t;
    5. recursive : Variable.Set.t Set_of_closures_id.Map.t;
    6. relevant_local_closure_ids : Closure_id.Set.t;
    7. relevant_imported_closure_ids : Closure_id.Set.t;
    8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
    9. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
    }
    val empty : t

    Export information for a compilation unit that exports nothing.

    val opaque_transient : + compilation_unit:Compilation_unit.t -> + root_symbol:Symbol.t -> transient

    Create a new export information structure.

    val create_transient : - sets_of_closures:A.function_declarations Set_of_closures_id.Map.t -> - values:descr Export_id.Map.t Compilation_unit.Map.t -> - symbol_id:Export_id.t Symbol.Map.t -> - invariant_params:Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t -> - recursive:Variable.Set.t Set_of_closures_id.Map.t -> - relevant_local_closure_ids:Closure_id.Set.t -> - relevant_imported_closure_ids:Closure_id.Set.t -> - relevant_local_vars_within_closure:Var_within_closure.Set.t -> - relevant_imported_vars_within_closure:Var_within_closure.Set.t -> + sets_of_closures:A.function_declarations Set_of_closures_id.Map.t -> + values:descr Export_id.Map.t Compilation_unit.Map.t -> + symbol_id:Export_id.t Symbol.Map.t -> + invariant_params:Variable.Set.t Variable.Map.t Set_of_closures_id.Map.t -> + recursive:Variable.Set.t Set_of_closures_id.Map.t -> + relevant_local_closure_ids:Closure_id.Set.t -> + relevant_imported_closure_ids:Closure_id.Set.t -> + relevant_local_vars_within_closure:Var_within_closure.Set.t -> + relevant_imported_vars_within_closure:Var_within_closure.Set.t -> transient
    val t_of_transient : transient -> - program:Flambda.program -> - local_offset_fun:int Closure_id.Map.t -> - local_offset_fv:int Var_within_closure.Map.t -> - imported_offset_fun:int Closure_id.Map.t -> - imported_offset_fv:int Var_within_closure.Map.t -> - constant_closures:Closure_id.Set.t -> + program:Flambda.program -> + local_offset_fun:int Closure_id.Map.t -> + local_offset_fv:int Var_within_closure.Map.t -> + imported_offset_fun:int Closure_id.Map.t -> + imported_offset_fv:int Var_within_closure.Map.t -> + constant_closures:Closure_id.Set.t -> t

    Record information about the layout of closures and which sets of closures are constant. These are all worked out during the Flambda_to_clambda pass.

    val merge : t -> t -> t

    Union of export information. Verifies that there are no identifier clashes.

    val find_description : t -> Export_id.t -> descr

    Look up the description of an exported value given its export ID.

    Partition a mapping from export IDs by compilation unit.

    \ No newline at end of file + 'a Export_id.Map.t Compilation_unit.Map.t

    Partition a mapping from export IDs by compilation unit.

    diff --git a/ocaml/Export_info_for_pack/index.html b/ocaml/Export_info_for_pack/index.html index 4a8d5f2..0cd340c 100644 --- a/ocaml/Export_info_for_pack/index.html +++ b/ocaml/Export_info_for_pack/index.html @@ -1,6 +1,6 @@ -Export_info_for_pack (ocaml.Export_info_for_pack)

    Module Export_info_for_pack

    Transformations on export information that are only used for the building of packs.

    val import_for_pack : - pack_units:Compilation_unit.Set.t -> - pack:Compilation_unit.t -> +Export_info_for_pack (ocaml.Export_info_for_pack)

    Module Export_info_for_pack

    Transformations on export information that are only used for the building of packs.

    val import_for_pack : + pack_units:Compilation_unit.Set.t -> + pack:Compilation_unit.t -> Export_info.t -> - Export_info.t

    Transform the information from exported to be suitable to be reexported as the information for a pack named pack containing units pack_units. It mainly changes symbols of units pack_units to refer to pack instead.

    val clear_import_state : unit -> unit

    Drops the state after importing several units in the same pack.

    \ No newline at end of file + Export_info.t

    Transform the information from exported to be suitable to be reexported as the information for a pack named pack containing units pack_units. It mainly changes symbols of units pack_units to refer to pack instead.

    val clear_import_state : unit -> unit

    Drops the state after importing several units in the same pack.

    diff --git a/ocaml/Expunge/index.html b/ocaml/Expunge/index.html index 1159995..fac043d 100644 --- a/ocaml/Expunge/index.html +++ b/ocaml/Expunge/index.html @@ -1,2 +1,2 @@ -Expunge (ocaml.Expunge)

    Module Expunge

    val main : unit -> unit

    The entry point for expunge

    \ No newline at end of file +Expunge (ocaml.Expunge)

    Module Expunge

    val main : unit -> unit

    The entry point for expunge

    diff --git a/ocaml/Extract_projections/index.html b/ocaml/Extract_projections/index.html index b45bfc1..fb6c0fc 100644 --- a/ocaml/Extract_projections/index.html +++ b/ocaml/Extract_projections/index.html @@ -1,6 +1,6 @@ -Extract_projections (ocaml.Extract_projections)

    Module Extract_projections

    Identify projections from variables used in function bodies (free variables or specialised args, for example, according to which_variables below). Projections from variables that are also used boxed are not returned.

    val from_function_decl : - env:Inline_and_simplify_aux.Env.t -> - which_variables:Flambda.specialised_to Variable.Map.t -> - function_decl:Flambda.function_declaration -> - Projection.Set.t

    which_variables maps (existing) inner variables to (existing) outer variables in the manner of free_vars and specialised_args in Flambda.set_of_closures.

    The returned projections are projecting_from (cf. projection.mli) the "existing inner vars".

    \ No newline at end of file +Extract_projections (ocaml.Extract_projections)

    Module Extract_projections

    Identify projections from variables used in function bodies (free variables or specialised args, for example, according to which_variables below). Projections from variables that are also used boxed are not returned.

    val from_function_decl : + env:Inline_and_simplify_aux.Env.t -> + which_variables:Flambda.specialised_to Variable.Map.t -> + function_decl:Flambda.function_declaration -> + Projection.Set.t

    which_variables maps (existing) inner variables to (existing) outer variables in the manner of free_vars and specialised_args in Flambda.set_of_closures.

    The returned projections are projecting_from (cf. projection.mli) the "existing inner vars".

    diff --git a/ocaml/Find_recursive_functions/index.html b/ocaml/Find_recursive_functions/index.html index dca32da..cbfc6aa 100644 --- a/ocaml/Find_recursive_functions/index.html +++ b/ocaml/Find_recursive_functions/index.html @@ -1,7 +1,5 @@ -Find_recursive_functions (ocaml.Find_recursive_functions)

    Module Find_recursive_functions

    "Recursive functions" are those functions f that might call either:

    • themselves, or
    • another function that in turn might call f.

    For example in the following simultaneous definition of f g and h, f and g are recursive functions, but not h: let rec f x = g x - and g x = f x - and h x = g x

    val in_function_declarations : +Find_recursive_functions (ocaml.Find_recursive_functions)

    Module Find_recursive_functions

    "Recursive functions" are those functions f that might call either:

    • themselves, or
    • another function that in turn might call f.

    For example in the following simultaneous definition of f g and h, f and g are recursive functions, but not h: let rec f x = g x and g x = f x and h x = g x

    val in_function_declarations : Flambda.function_declarations -> - backend:(module Backend_intf.S) -> - Variable.Set.t

    Determine the recursive functions, if any, bound by the given set of function declarations. This is only intended to be used by Flambda.create_function_declarations.

    \ No newline at end of file + backend:(module Backend_intf.S) -> + Variable.Set.t

    Determine the recursive functions, if any, bound by the given set of function declarations. This is only intended to be used by Flambda.create_function_declarations.

    diff --git a/ocaml/Flambda/Constant_defining_value/Map/index.html b/ocaml/Flambda/Constant_defining_value/Map/index.html index a4ed960..69f7129 100644 --- a/ocaml/Flambda/Constant_defining_value/Map/index.html +++ b/ocaml/Flambda/Constant_defining_value/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Flambda.Constant_defining_value.Map)

    Module Constant_defining_value.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Flambda.Constant_defining_value.Map)

    Module Constant_defining_value.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Flambda/Constant_defining_value/Set/index.html b/ocaml/Flambda/Constant_defining_value/Set/index.html index e6cfd74..4b1f5c6 100644 --- a/ocaml/Flambda/Constant_defining_value/Set/index.html +++ b/ocaml/Flambda/Constant_defining_value/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Flambda.Constant_defining_value.Set)

    Module Constant_defining_value.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Flambda.Constant_defining_value.Set)

    Module Constant_defining_value.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Flambda/Constant_defining_value/T/index.html b/ocaml/Flambda/Constant_defining_value/T/index.html index 02e69aa..caba245 100644 --- a/ocaml/Flambda/Constant_defining_value/T/index.html +++ b/ocaml/Flambda/Constant_defining_value/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Flambda.Constant_defining_value.T)

    Module Constant_defining_value.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Flambda.Constant_defining_value.T)

    Module Constant_defining_value.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Flambda/Constant_defining_value/Tbl/index.html b/ocaml/Flambda/Constant_defining_value/Tbl/index.html index 79a4dca..0c81383 100644 --- a/ocaml/Flambda/Constant_defining_value/Tbl/index.html +++ b/ocaml/Flambda/Constant_defining_value/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Flambda.Constant_defining_value.Tbl)

    Module Constant_defining_value.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Flambda.Constant_defining_value.Tbl)

    Module Constant_defining_value.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Flambda/Constant_defining_value/index.html b/ocaml/Flambda/Constant_defining_value/index.html index 48e4a51..c408822 100644 --- a/ocaml/Flambda/Constant_defining_value/index.html +++ b/ocaml/Flambda/Constant_defining_value/index.html @@ -1,2 +1,2 @@ -Constant_defining_value (ocaml.Flambda.Constant_defining_value)

    Module Flambda.Constant_defining_value

    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Constant_defining_value (ocaml.Flambda.Constant_defining_value)

    Module Flambda.Constant_defining_value

    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Flambda/With_free_variables/index.html b/ocaml/Flambda/With_free_variables/index.html index 4a0eda6..9c73786 100644 --- a/ocaml/Flambda/With_free_variables/index.html +++ b/ocaml/Flambda/With_free_variables/index.html @@ -1,2 +1,2 @@ -With_free_variables (ocaml.Flambda.With_free_variables)

    Module Flambda.With_free_variables

    A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

    type 'a t
    val of_defining_expr_of_let : let_expr -> named t

    O(1) time.

    val of_body_of_let : let_expr -> expr t

    O(1) time.

    val of_expr : expr -> expr t

    Takes the time required to calculate the free variables of the given term (proportional to the size of the term, except that the calculation for Let is O(1)).

    val of_named : named -> named t
    val create_let_reusing_defining_expr : Variable.t -> named t -> expr -> expr

    Takes the time required to calculate the free variables of the given expr.

    val create_let_reusing_body : Variable.t -> named -> expr t -> expr

    Takes the time required to calculate the free variables of the given named.

    val create_let_reusing_both : Variable.t -> named t -> expr t -> expr

    O(1) time.

    val expr : expr t -> named t

    The equivalent of the Expr constructor.

    val contents : 'a t -> 'a
    val free_variables : _ t -> Variable.Set.t

    O(1) time.

    \ No newline at end of file +With_free_variables (ocaml.Flambda.With_free_variables)

    Module Flambda.With_free_variables

    A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

    type 'a t
    val of_defining_expr_of_let : let_expr -> named t

    O(1) time.

    val of_body_of_let : let_expr -> expr t

    O(1) time.

    val of_expr : expr -> expr t

    Takes the time required to calculate the free variables of the given term (proportional to the size of the term, except that the calculation for Let is O(1)).

    val of_named : named -> named t
    val create_let_reusing_defining_expr : Variable.t -> named t -> expr -> expr

    Takes the time required to calculate the free variables of the given expr.

    val create_let_reusing_body : Variable.t -> named -> expr t -> expr

    Takes the time required to calculate the free variables of the given named.

    val create_let_reusing_both : Variable.t -> named t -> expr t -> expr

    O(1) time.

    val expr : expr t -> named t

    The equivalent of the Expr constructor.

    val contents : 'a t -> 'a
    val free_variables : _ t -> Variable.Set.t

    O(1) time.

    diff --git a/ocaml/Flambda/index.html b/ocaml/Flambda/index.html index 40d52eb..fa4d65c 100644 --- a/ocaml/Flambda/index.html +++ b/ocaml/Flambda/index.html @@ -1,43 +1,29 @@ -Flambda (ocaml.Flambda)

    Module Flambda

    Intermediate language used for tree-based analysis and optimization.

    type call_kind =
    1. | Indirect
    2. | Direct of Closure_id.t

    Whether the callee in a function application is known at compile time.

    type const =
    1. | Int of int
    2. | Char of char
      (*

      Char is kept separate from Int to improve printing

      *)

    Simple constants. ("Structured constants" are rewritten to invocations of Pmakeblock so that they easily take part in optimizations.)

    type apply = {
    1. func : Variable.t;
    2. args : Variable.t list;
    3. kind : call_kind;
    4. dbg : Debuginfo.t;
    5. inline : Lambda.inline_attribute;
      (*

      Instructions from the source code as to whether the callee should be inlined.

      *)
    6. specialise : Lambda.specialise_attribute;
      (*

      Instructions from the source code as to whether the callee should be specialised.

      *)
    }

    The application of a function to a list of arguments.

    type assign = {
    1. being_assigned : Mutable_variable.t;
    2. new_value : Variable.t;
    }

    The update of a mutable variable. Mutable variables are distinct from immutable variables in Flambda.

    type send = {
    1. kind : Lambda.meth_kind;
    2. meth : Variable.t;
    3. obj : Variable.t;
    4. args : Variable.t list;
    5. dbg : Debuginfo.t;
    }

    The invocation of a method.

    type project_closure = Projection.project_closure

    For details on these types, see projection.mli.

    type move_within_set_of_closures = Projection.move_within_set_of_closures
    type project_var = Projection.project_var
    type specialised_to = {
    1. var : Variable.t;
      (*

      The "outer variable".

      *)
    2. projection : Projection.t option;
      (*

      The projecting_from value (see projection.mli) of any projection must be another free variable or specialised argument (depending on whether this record type is involved in free_vars or specialised_args respectively) in the same set of closures. As such, this field describes a relation of projections between either the free_vars or the specialised_args.

      *)
    }

    See free_vars and specialised_args, below.

    type t =
    1. | Var of Variable.t
    2. | Let of let_expr
    3. | Let_mutable of let_mutable
    4. | Let_rec of (Variable.t * named) list * t
      (*

      CR-someday lwhite: give Let_rec the same fields as Let.

      *)
    5. | Apply of apply
    6. | Send of send
    7. | Assign of assign
    8. | If_then_else of Variable.t * t * t
    9. | Switch of Variable.t * switch
    10. | String_switch of Variable.t * (string * t) list * t option
      (*

      Restrictions on Lambda.Lstringswitch also apply to String_switch.

      *)
    11. | Static_raise of Static_exception.t * Variable.t list
    12. | Static_catch of Static_exception.t * Variable.t list * t * t
    13. | Try_with of t * Variable.t * t
    14. | While of t * t
    15. | For of for_loop
    16. | Proved_unreachable

    Flambda terms are partitioned in a pseudo-ANF manner; many terms are required to be let-bound. This in particular ensures there is always a variable name for an expression that may be lifted out (for example if it is found to be constant). Note: All bound variables in Flambda terms must be distinct. Flambda_invariants verifies this.

    and named =
    1. | Symbol of Symbol.t
    2. | Const of const
    3. | Allocated_const of Allocated_const.t
    4. | Read_mutable of Mutable_variable.t
    5. | Read_symbol_field of Symbol.t * int
      (*

      During the lifting of let bindings to program constructions after closure conversion, we generate symbols and their corresponding definitions (which may or may not be constant), together with field accesses to such symbols. We would like it to be the case that such field accesses are simplified to the relevant component of the symbol concerned. (The rationale is to generate efficient code and share constants as expected: see e.g. tests/asmcomp/staticalloc.ml.) The components of the symbol would be identified by other symbols. This sort of access pattern is feasible because the top-level structure of symbols is statically allocated and fixed at compile time. It may seem that Prim (Pfield, ...) expressions could be used to perform the field accesses. However for simplicity, to avoid having to keep track of properties of individual fields of blocks, Inconstant_idents never deems a Prim (Pfield, ...) expression to be constant. This would in general prevent field accesses to symbols from being simplified in the way we would like, since Lift_constants would not assign new symbols (i.e. the things we would like to simplify to) to the various projections from the symbols in question. To circumvent this problem we use Read_symbol_field when generating projections from the top level of symbols. Owing to the properties of symbols described above, such expressions may be eligible for declaration as constant by Inconstant_idents (and thus themselves lifted to another symbol), without any further complication. Read_symbol_field may only be used when the definition of the symbol is in scope in the program. For external unresolved symbols, Pfield may still be used; it will be changed to Read_symbol_field by Inline_and_simplify when (and if) the symbol is imported.

      *)
    6. | Set_of_closures of set_of_closures
    7. | Project_closure of project_closure
    8. | Move_within_set_of_closures of move_within_set_of_closures
    9. | Project_var of project_var
    10. | Prim of Clambda_primitives.primitive * Variable.t list * Debuginfo.t
    11. | Expr of t
      (*

      ANF escape hatch.

      *)

    Values of type named will always be let-bound to a Variable.t.

    and let_expr = private {
    1. var : Variable.t;
    2. defining_expr : named;
    3. body : t;
    4. free_vars_of_defining_expr : Variable.Set.t;
      (*

      A cache of the free variables in the defining expression of the let.

      *)
    5. free_vars_of_body : Variable.Set.t;
      (*

      A cache of the free variables of the body of the let. This is an important optimization.

      *)
    }
    and let_mutable = {
    1. var : Mutable_variable.t;
    2. initial_value : Variable.t;
    3. contents_kind : Lambda.value_kind;
    4. body : t;
    }
    and set_of_closures = private {
    1. function_decls : function_declarations;
    2. free_vars : specialised_to Variable.Map.t;
      (*

      Mapping from all variables free in the body of the function_decls to variables in scope at the definition point of the set_of_closures. The domain of this map is sometimes known as the "variables bound by the closure".

      *)
    3. specialised_args : specialised_to Variable.Map.t;
      (*

      Parameters whose corresponding arguments are known to always alias a particular value. These are the only parameters that may, during Inline_and_simplify, have non-unknown approximations.

      An argument may only be specialised to a variable in the scope of the corresponding set of closures declaration. Usually, that variable itself also appears in the position of the specialised argument at all call sites of the function. However it may also be the case (for example in code generated as a result of Augment_specialised_args) that the various call sites of such a function have differing variables in the position of the specialised argument. This is permissible *so long as it is certain they all alias the same value*. Great care must be taken in transformations that result in this situation since there are no invariant checks for correctness.

      As an example, supposing all call sites of f are represented here: let x = ... in - let f a b c = ... in - let y = ... in - f x y 1; - f x y 1 the specialised arguments of f can (but does not necessarily) contain the association a -> x, but cannot contain b -> y because f is not in the scope of y. If f were the recursive function let rec f a b c = f a 1 2 in, a -> x would still be a valid specialised argument because all recursive calls maintain the invariant.

      This information is used for optimization purposes, if such a binding is known, it is possible to specialise the body of the function according to its parameter. This is usually introduced when specialising a recursive function, for instance. let rec map f = function - | [] -> [] - | h :: t -> f h :: map f t - let map_succ l = - let succ x = x + 1 in - map succ l map can be duplicated in map_succ to be specialised for the argument f. This will result in let map_succ l = - let succ x = x + 1 in - let rec map f = function - | [] -> [] - | h :: t -> f h :: map f t in - map succ l with map having f -> succ in its specialised_args field.

      Specialised argument information for arguments that are used must never be erased. This ensures that specialised arguments whose approximations describe closures maintain those approximations, which is essential to transport the closure freshening information to the point of use (e.g. a Project_var from such an argument).

      *)
    4. direct_call_surrogates : Variable.t Variable.Map.t;
      (*

      If direct_call_surrogates maps fun_var1 to fun_var2 then direct calls to fun_var1 should be redirected to fun_var2. This is used to reduce the overhead of transformations that introduce wrapper functions (which will be inlined at direct call sites, but will penalise indirect call sites). direct_call_surrogates may not be transitively closed.

      *)
    }

    The representation of a set of function declarations (possibly mutually recursive). Such a set encapsulates the declarations themselves, information about their defining environment, and information used specifically for optimization. Before a function can be applied it must be "projected" from a set of closures to yield a "closure". This is done using Project_closure (see above). Given a closure, not only can it be applied, but information about its defining environment can be retrieved (using Project_var, see above). At runtime, a set_of_closures corresponds to an OCaml value with tag Closure_tag (possibly with inline Infix_tag(s)). As an optimization, an operation (Move_within_set_of_closures) is provided (see above) which enables one closure within a set to be located given another closure in the same set. This avoids keeping a pointer to the whole set of closures alive when compiling, for example, mutually-recursive functions.

    and function_declarations = private {
    1. is_classic_mode : bool;
      (*

      Indicates whether this function_declarations was compiled with -Oclassic.

      *)
    2. set_of_closures_id : Set_of_closures_id.t;
      (*

      An identifier (unique across all Flambda trees currently in memory) of the set of closures associated with this set of function declarations.

      *)
    3. set_of_closures_origin : Set_of_closures_origin.t;
      (*

      An identifier of the original set of closures on which this set of function declarations is based. Used to prevent different specialisations of the same functions from being inlined/specialised within each other.

      *)
    4. funs : function_declaration Variable.Map.t;
      (*

      The function(s) defined by the set of function declarations. The keys of this map are often referred to in the code as "fun_var"s.

      *)
    }
    and function_declaration = private {
    1. closure_origin : Closure_origin.t;
    2. params : Parameter.t list;
    3. body : t;
    4. free_variables : Variable.Set.t;
      (*

      All variables free in the *body* of the function. For example, a variable that is bound as one of the function's parameters will still be included in this set. This field is present as an optimization.

      *)
    5. free_symbols : Symbol.Set.t;
      (*

      All symbols that occur in the function's body. (Symbols can never be bound in a function's body; the only thing that binds symbols is the program constructions below.)

      *)
    6. stub : bool;
      (*

      A stub function is a generated function used to prepare arguments or return values to allow indirect calls to functions with a special calling convention. For instance indirect calls to tuplified functions must go through a stub. Stubs will be unconditionally inlined.

      *)
    7. dbg : Debuginfo.t;
      (*

      Debug info for the function declaration.

      *)
    8. inline : Lambda.inline_attribute;
      (*

      Inlining requirements from the source code.

      *)
    9. specialise : Lambda.specialise_attribute;
      (*

      Specialising requirements from the source code.

      *)
    10. is_a_functor : bool;
      (*

      Whether the function is known definitively to be a functor.

      *)
    11. poll : Lambda.poll_attribute;
      (*

      Behaviour for polls

      *)
    }
    and switch = {
    1. numconsts : Numbers.Int.Set.t;
      (*

      Integer cases

      *)
    2. consts : (int * t) list;
      (*

      Integer cases

      *)
    3. numblocks : Numbers.Int.Set.t;
      (*

      Number of tag block cases

      *)
    4. blocks : (int * t) list;
      (*

      Tag block cases

      *)
    5. failaction : t option;
      (*

      Action to take if none matched

      *)
    }

    Equivalent to the similar type in Lambda.

    and for_loop = {
    1. bound_var : Variable.t;
    2. from_value : Variable.t;
    3. to_value : Variable.t;
    4. direction : Asttypes.direction_flag;
    5. body : t;
    }

    Equivalent to the similar type in Lambda.

    and constant_defining_value =
    1. | Allocated_const of Allocated_const.t
      (*

      A single constant. These are never "simple constants" (type const) but instead more complicated constructions.

      *)
    2. | Block of Tag.t * constant_defining_value_block_field list
      (*

      A pre-allocated block full of constants (either simple constants or references to other constants, see below).

      *)
    3. | Set_of_closures of set_of_closures
      (*

      A closed (and thus constant) set of closures. (That is to say, free_vars must be empty.)

      *)
    4. | Project_closure of Symbol.t * Closure_id.t
      (*

      Selection of one closure from a constant set of closures. Analogous to the equivalent operation on expressions.

      *)

    Like a subset of Flambda.named, except that instead of Variable.ts we have Symbol.ts, and everything is a constant (i.e. with a fixed value known at compile time). Values of this type describe constants that will be directly assigned to symbols in the object file (see below).

    and constant_defining_value_block_field =
    1. | Symbol of Symbol.t
    2. | Const of const
    module Constant_defining_value : +Flambda (ocaml.Flambda)

    Module Flambda

    Intermediate language used for tree-based analysis and optimization.

    type call_kind =
    1. | Indirect
    2. | Direct of Closure_id.t

    Whether the callee in a function application is known at compile time.

    type const =
    1. | Int of int
    2. | Char of char
      (*

      Char is kept separate from Int to improve printing

      *)

    Simple constants. ("Structured constants" are rewritten to invocations of Pmakeblock so that they easily take part in optimizations.)

    type apply = {
    1. func : Variable.t;
    2. args : Variable.t list;
    3. kind : call_kind;
    4. dbg : Debuginfo.t;
    5. inline : Lambda.inline_attribute;
      (*

      Instructions from the source code as to whether the callee should be inlined.

      *)
    6. specialise : Lambda.specialise_attribute;
      (*

      Instructions from the source code as to whether the callee should be specialised.

      *)
    }

    The application of a function to a list of arguments.

    type assign = {
    1. being_assigned : Mutable_variable.t;
    2. new_value : Variable.t;
    }

    The update of a mutable variable. Mutable variables are distinct from immutable variables in Flambda.

    type send = {
    1. kind : Lambda.meth_kind;
    2. meth : Variable.t;
    3. obj : Variable.t;
    4. args : Variable.t list;
    5. dbg : Debuginfo.t;
    }

    The invocation of a method.

    type project_closure = Projection.project_closure

    For details on these types, see projection.mli.

    type move_within_set_of_closures = Projection.move_within_set_of_closures
    type project_var = Projection.project_var
    type specialised_to = {
    1. var : Variable.t;
      (*

      The "outer variable".

      *)
    2. projection : Projection.t option;
      (*

      The projecting_from value (see projection.mli) of any projection must be another free variable or specialised argument (depending on whether this record type is involved in free_vars or specialised_args respectively) in the same set of closures. As such, this field describes a relation of projections between either the free_vars or the specialised_args.

      *)
    }

    See free_vars and specialised_args, below.

    type t =
    1. | Var of Variable.t
    2. | Let of let_expr
    3. | Let_mutable of let_mutable
    4. | Let_rec of (Variable.t * named) list * t
      (*

      CR-someday lwhite: give Let_rec the same fields as Let.

      *)
    5. | Apply of apply
    6. | Send of send
    7. | Assign of assign
    8. | If_then_else of Variable.t * t * t
    9. | Switch of Variable.t * switch
    10. | String_switch of Variable.t * (string * t) list * t option
      (*

      Restrictions on Lambda.Lstringswitch also apply to String_switch.

      *)
    11. | Static_raise of Static_exception.t * Variable.t list
    12. | Static_catch of Static_exception.t * Variable.t list * t * t
    13. | Try_with of t * Variable.t * t
    14. | While of t * t
    15. | For of for_loop
    16. | Proved_unreachable

    Flambda terms are partitioned in a pseudo-ANF manner; many terms are required to be let-bound. This in particular ensures there is always a variable name for an expression that may be lifted out (for example if it is found to be constant). Note: All bound variables in Flambda terms must be distinct. Flambda_invariants verifies this.

    and named =
    1. | Symbol of Symbol.t
    2. | Const of const
    3. | Allocated_const of Allocated_const.t
    4. | Read_mutable of Mutable_variable.t
    5. | Read_symbol_field of Symbol.t * int
      (*

      During the lifting of let bindings to program constructions after closure conversion, we generate symbols and their corresponding definitions (which may or may not be constant), together with field accesses to such symbols. We would like it to be the case that such field accesses are simplified to the relevant component of the symbol concerned. (The rationale is to generate efficient code and share constants as expected: see e.g. tests/asmcomp/staticalloc.ml.) The components of the symbol would be identified by other symbols. This sort of access pattern is feasible because the top-level structure of symbols is statically allocated and fixed at compile time. It may seem that Prim (Pfield, ...) expressions could be used to perform the field accesses. However for simplicity, to avoid having to keep track of properties of individual fields of blocks, Inconstant_idents never deems a Prim (Pfield, ...) expression to be constant. This would in general prevent field accesses to symbols from being simplified in the way we would like, since Lift_constants would not assign new symbols (i.e. the things we would like to simplify to) to the various projections from the symbols in question. To circumvent this problem we use Read_symbol_field when generating projections from the top level of symbols. Owing to the properties of symbols described above, such expressions may be eligible for declaration as constant by Inconstant_idents (and thus themselves lifted to another symbol), without any further complication. Read_symbol_field may only be used when the definition of the symbol is in scope in the program. For external unresolved symbols, Pfield may still be used; it will be changed to Read_symbol_field by Inline_and_simplify when (and if) the symbol is imported.

      *)
    6. | Set_of_closures of set_of_closures
    7. | Project_closure of project_closure
    8. | Move_within_set_of_closures of move_within_set_of_closures
    9. | Project_var of project_var
    10. | Prim of Clambda_primitives.primitive * Variable.t list * Debuginfo.t
    11. | Expr of t
      (*

      ANF escape hatch.

      *)

    Values of type named will always be let-bound to a Variable.t.

    and let_expr = private {
    1. var : Variable.t;
    2. defining_expr : named;
    3. body : t;
    4. free_vars_of_defining_expr : Variable.Set.t;
      (*

      A cache of the free variables in the defining expression of the let.

      *)
    5. free_vars_of_body : Variable.Set.t;
      (*

      A cache of the free variables of the body of the let. This is an important optimization.

      *)
    }
    and let_mutable = {
    1. var : Mutable_variable.t;
    2. initial_value : Variable.t;
    3. contents_kind : Lambda.value_kind;
    4. body : t;
    }
    and set_of_closures = private {
    1. function_decls : function_declarations;
    2. free_vars : specialised_to Variable.Map.t;
      (*

      Mapping from all variables free in the body of the function_decls to variables in scope at the definition point of the set_of_closures. The domain of this map is sometimes known as the "variables bound by the closure".

      *)
    3. specialised_args : specialised_to Variable.Map.t;
      (*

      Parameters whose corresponding arguments are known to always alias a particular value. These are the only parameters that may, during Inline_and_simplify, have non-unknown approximations.

      An argument may only be specialised to a variable in the scope of the corresponding set of closures declaration. Usually, that variable itself also appears in the position of the specialised argument at all call sites of the function. However it may also be the case (for example in code generated as a result of Augment_specialised_args) that the various call sites of such a function have differing variables in the position of the specialised argument. This is permissible *so long as it is certain they all alias the same value*. Great care must be taken in transformations that result in this situation since there are no invariant checks for correctness.

      As an example, supposing all call sites of f are represented here: let x = ... in let f a b c = ... in let y = ... in f x y 1; f x y 1 the specialised arguments of f can (but does not necessarily) contain the association a -> x, but cannot contain b -> y because f is not in the scope of y. If f were the recursive function let rec f a b c = f a 1 2 in, a -> x would still be a valid specialised argument because all recursive calls maintain the invariant.

      This information is used for optimization purposes, if such a binding is known, it is possible to specialise the body of the function according to its parameter. This is usually introduced when specialising a recursive function, for instance. let rec map f = function | [] -> [] | h :: t -> f h :: map f t let map_succ l = let succ x = x + 1 in map succ l map can be duplicated in map_succ to be specialised for the argument f. This will result in let map_succ l = let succ x = x + 1 in let rec map f = function | [] -> [] | h :: t -> f h :: map f t in map succ l with map having f -> succ in its specialised_args field.

      Specialised argument information for arguments that are used must never be erased. This ensures that specialised arguments whose approximations describe closures maintain those approximations, which is essential to transport the closure freshening information to the point of use (e.g. a Project_var from such an argument).

      *)
    4. direct_call_surrogates : Variable.t Variable.Map.t;
      (*

      If direct_call_surrogates maps fun_var1 to fun_var2 then direct calls to fun_var1 should be redirected to fun_var2. This is used to reduce the overhead of transformations that introduce wrapper functions (which will be inlined at direct call sites, but will penalise indirect call sites). direct_call_surrogates may not be transitively closed.

      *)
    }

    The representation of a set of function declarations (possibly mutually recursive). Such a set encapsulates the declarations themselves, information about their defining environment, and information used specifically for optimization. Before a function can be applied it must be "projected" from a set of closures to yield a "closure". This is done using Project_closure (see above). Given a closure, not only can it be applied, but information about its defining environment can be retrieved (using Project_var, see above). At runtime, a set_of_closures corresponds to an OCaml value with tag Closure_tag (possibly with inline Infix_tag(s)). As an optimization, an operation (Move_within_set_of_closures) is provided (see above) which enables one closure within a set to be located given another closure in the same set. This avoids keeping a pointer to the whole set of closures alive when compiling, for example, mutually-recursive functions.

    and function_declarations = private {
    1. is_classic_mode : bool;
      (*

      Indicates whether this function_declarations was compiled with -Oclassic.

      *)
    2. set_of_closures_id : Set_of_closures_id.t;
      (*

      An identifier (unique across all Flambda trees currently in memory) of the set of closures associated with this set of function declarations.

      *)
    3. set_of_closures_origin : Set_of_closures_origin.t;
      (*

      An identifier of the original set of closures on which this set of function declarations is based. Used to prevent different specialisations of the same functions from being inlined/specialised within each other.

      *)
    4. funs : function_declaration Variable.Map.t;
      (*

      The function(s) defined by the set of function declarations. The keys of this map are often referred to in the code as "fun_var"s.

      *)
    }
    and function_declaration = private {
    1. closure_origin : Closure_origin.t;
    2. params : Parameter.t list;
    3. body : t;
    4. free_variables : Variable.Set.t;
      (*

      All variables free in the *body* of the function. For example, a variable that is bound as one of the function's parameters will still be included in this set. This field is present as an optimization.

      *)
    5. free_symbols : Symbol.Set.t;
      (*

      All symbols that occur in the function's body. (Symbols can never be bound in a function's body; the only thing that binds symbols is the program constructions below.)

      *)
    6. stub : bool;
      (*

      A stub function is a generated function used to prepare arguments or return values to allow indirect calls to functions with a special calling convention. For instance indirect calls to tuplified functions must go through a stub. Stubs will be unconditionally inlined.

      *)
    7. dbg : Debuginfo.t;
      (*

      Debug info for the function declaration.

      *)
    8. inline : Lambda.inline_attribute;
      (*

      Inlining requirements from the source code.

      *)
    9. specialise : Lambda.specialise_attribute;
      (*

      Specialising requirements from the source code.

      *)
    10. is_a_functor : bool;
      (*

      Whether the function is known definitively to be a functor.

      *)
    11. poll : Lambda.poll_attribute;
      (*

      Behaviour for polls

      *)
    }
    and switch = {
    1. numconsts : Numbers.Int.Set.t;
      (*

      Integer cases

      *)
    2. consts : (int * t) list;
      (*

      Integer cases

      *)
    3. numblocks : Numbers.Int.Set.t;
      (*

      Number of tag block cases

      *)
    4. blocks : (int * t) list;
      (*

      Tag block cases

      *)
    5. failaction : t option;
      (*

      Action to take if none matched

      *)
    }

    Equivalent to the similar type in Lambda.

    and for_loop = {
    1. bound_var : Variable.t;
    2. from_value : Variable.t;
    3. to_value : Variable.t;
    4. direction : Asttypes.direction_flag;
    5. body : t;
    }

    Equivalent to the similar type in Lambda.

    and constant_defining_value =
    1. | Allocated_const of Allocated_const.t
      (*

      A single constant. These are never "simple constants" (type const) but instead more complicated constructions.

      *)
    2. | Block of Tag.t * constant_defining_value_block_field list
      (*

      A pre-allocated block full of constants (either simple constants or references to other constants, see below).

      *)
    3. | Set_of_closures of set_of_closures
      (*

      A closed (and thus constant) set of closures. (That is to say, free_vars must be empty.)

      *)
    4. | Project_closure of Symbol.t * Closure_id.t
      (*

      Selection of one closure from a constant set of closures. Analogous to the equivalent operation on expressions.

      *)

    Like a subset of Flambda.named, except that instead of Variable.ts we have Symbol.ts, and everything is a constant (i.e. with a fixed value known at compile time). Values of this type describe constants that will be directly assigned to symbols in the object file (see below).

    and constant_defining_value_block_field =
    1. | Symbol of Symbol.t
    2. | Const of const
    type expr = t
    type program_body =
    1. | Let_symbol of Symbol.t * constant_defining_value * program_body
      (*

      Define the given symbol to have the given constant value.

      *)
    2. | Let_rec_symbol of (Symbol.t * constant_defining_value) list * program_body
      (*

      As for Let_symbol, but recursive. This is needed to treat examples like this, where a constant set of closures is lifted to toplevel:

      let rec f x = f x

      After lifting this produces (in pseudo-Flambda):

      Let_rec_symbol set_of_closures_symbol = (Set_of_closures f x -> let applied_function = Symbol f_closure in Apply (applied_function, x) ) and f_closure = Project_closure (set_of_closures_symbol, f)

      Use of Let_rec_symbol, by virtue of the special handling in Inline_and_simplify.define_let_rec_symbol_approx, enables the approximation of the set of closures to be present in order to correctly simplify the Project_closure construction. (See Inline_and_simplify.simplify_project_closure for that part.)

      *)
    3. | Initialize_symbol of Symbol.t * Tag.t * t list * program_body
      (*

      Define the given symbol as a constant block of the given size and tag; but with a possibly non-constant initializer. The initializer will be executed at most once (from the entry point of the compilation unit).

      *)
    4. | Effect of t * program_body
      (*

      Cause the given expression, which may have a side effect, to be executed. The resulting value is discarded. Effect constructions are never re-ordered.

      *)
    5. | End of Symbol.t
      (*

      End accepts the root symbol: the only symbol that can never be eliminated.

      *)

    A "program" is the contents of one compilation unit. It describes the various values that are assigned to symbols (and in some cases fields of such symbols) in the object file. As such, it is closely related to the compilation of toplevel modules.

    type program = {
    1. imported_symbols : Symbol.Set.t;
    2. program_body : program_body;
    }
    val free_variables : - ?ignore_uses_as_callee:unit -> - ?ignore_uses_as_argument:unit -> - ?ignore_uses_in_project_var:unit -> + ?ignore_uses_as_callee:unit -> + ?ignore_uses_as_argument:unit -> + ?ignore_uses_in_project_var:unit -> t -> Variable.Set.t

    Compute the free variables of a term. (This is O(1) for Lets). If ignore_uses_as_callee, all free variables inside Apply expressions are ignored. Likewise ignore_uses_in_project_var for Project_var expressions.

    val free_variables_named : - ?ignore_uses_in_project_var:unit -> + ?ignore_uses_in_project_var:unit -> named -> Variable.Set.t

    Compute the free variables of a named expression.

    val used_variables : - ?ignore_uses_as_callee:unit -> - ?ignore_uses_as_argument:unit -> - ?ignore_uses_in_project_var:unit -> + ?ignore_uses_as_callee:unit -> + ?ignore_uses_as_argument:unit -> + ?ignore_uses_in_project_var:unit -> t -> Variable.Set.t

    Compute _all_ variables occurring inside an expression.

    val used_variables_named : - ?ignore_uses_in_project_var:unit -> + ?ignore_uses_in_project_var:unit -> named -> Variable.Set.t

    Compute _all_ variables occurring inside a named expression.

    val free_symbols : expr -> Symbol.Set.t
    val free_symbols_named : named -> Symbol.Set.t
    val free_symbols_program : program -> Symbol.Set.t
    val fold_lets_option : t -> - init:'a -> - for_defining_expr:('a -> Variable.t -> named -> 'a * Variable.t * named) -> - for_last_body:('a -> t -> t * 'b) -> - filter_defining_expr: + init:'a -> + for_defining_expr:('a -> Variable.t -> named -> 'a * Variable.t * named) -> + for_last_body:('a -> t -> t * 'b) -> + filter_defining_expr: ('b -> Variable.t -> named -> @@ -45,60 +31,60 @@ 'b * Variable.t * named option) -> t * 'b

    Used to avoid exceeding the stack limit when handling expressions with multiple consecutive nested Let-expressions. This saves rewriting large simplification functions in CPS. This function provides for the rewriting or elimination of expressions during the fold.

    val map_lets : t -> - for_defining_expr:(Variable.t -> named -> named) -> - for_last_body:(t -> t) -> - after_rebuild:(t -> t) -> + for_defining_expr:(Variable.t -> named -> named) -> + for_last_body:(t -> t) -> + after_rebuild:(t -> t) -> t

    Like fold_lets_option, but just a map.

    val iter_lets : t -> - for_defining_expr:(Variable.t -> named -> unit) -> - for_last_body:(t -> unit) -> - for_each_let:(t -> unit) -> - unit

    Like map_lets, but just an iterator.

    val create_let : Variable.t -> named -> t -> t

    Creates a Let expression. (This computes the free variables of the defining expression and the body.)

    val map_defining_expr_of_let : let_expr -> f:(named -> named) -> t

    Apply the specified function f to the defining expression of the given Let-expression, returning a new Let.

    module With_free_variables : sig ... end

    A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

    val create_function_declaration : - params:Parameter.t list -> - body:t -> - stub:bool -> - dbg:Debuginfo.t -> - inline:Lambda.inline_attribute -> - specialise:Lambda.specialise_attribute -> - is_a_functor:bool -> - closure_origin:Closure_origin.t -> - poll:Lambda.poll_attribute -> + for_defining_expr:(Variable.t -> named -> unit) -> + for_last_body:(t -> unit) -> + for_each_let:(t -> unit) -> + unit

    Like map_lets, but just an iterator.

    val create_let : Variable.t -> named -> t -> t

    Creates a Let expression. (This computes the free variables of the defining expression and the body.)

    val map_defining_expr_of_let : let_expr -> f:(named -> named) -> t

    Apply the specified function f to the defining expression of the given Let-expression, returning a new Let.

    module With_free_variables : sig ... end

    A module for the manipulation of terms where the recomputation of free variable sets is to be kept to a minimum.

    val create_function_declaration : + params:Parameter.t list -> + body:t -> + stub:bool -> + dbg:Debuginfo.t -> + inline:Lambda.inline_attribute -> + specialise:Lambda.specialise_attribute -> + is_a_functor:bool -> + closure_origin:Closure_origin.t -> + poll:Lambda.poll_attribute -> function_declaration

    Create a function declaration. This calculates the free variables and symbols occurring in the specified body.

    val update_function_declaration : function_declaration -> - params:Parameter.t list -> - body:t -> + params:Parameter.t list -> + body:t -> function_declaration

    Create a function declaration based on another function declaration

    val create_function_declarations : - is_classic_mode:bool -> - funs:function_declaration Variable.Map.t -> + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> function_declarations

    Create a set of function declarations given the individual declarations.

    val create_function_declarations_with_origin : - is_classic_mode:bool -> - funs:function_declaration Variable.Map.t -> - set_of_closures_origin:Set_of_closures_origin.t -> + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> + set_of_closures_origin:Set_of_closures_origin.t -> function_declarations

    Create a set of function declarations with a given set of closures origin.

    val update_body_of_function_declaration : function_declaration -> - body:expr -> + body:expr -> function_declaration

    Change only the code of a function declaration.

    val update_function_decl's_params_and_body : function_declaration -> - params:Parameter.t list -> - body:expr -> + params:Parameter.t list -> + body:expr -> function_declaration

    Change only the code and parameters of a function declaration.

    Create a set of function declarations based on another set of function declarations.

    val create_function_declarations_with_closures_origin : - is_classic_mode:bool -> - funs:function_declaration Variable.Map.t -> - set_of_closures_origin:Set_of_closures_origin.t -> + is_classic_mode:bool -> + funs:function_declaration Variable.Map.t -> + set_of_closures_origin:Set_of_closures_origin.t -> function_declarations
    val create_set_of_closures : - function_decls:function_declarations -> - free_vars:specialised_to Variable.Map.t -> - specialised_args:specialised_to Variable.Map.t -> - direct_call_surrogates:Variable.t Variable.Map.t -> + function_decls:function_declarations -> + free_vars:specialised_to Variable.Map.t -> + specialised_args:specialised_to Variable.Map.t -> + direct_call_surrogates:Variable.t Variable.Map.t -> set_of_closures

    Create a set of closures. Checks are made to ensure that free_vars and specialised_args are reasonable.

    Given a function declaration, find which of its parameters (if any) are used in the body.

    type maybe_named =
    1. | Is_expr of t
    2. | Is_named of named
    val iter_general : - toplevel:bool -> + toplevel:bool -> (t -> unit) -> (named -> unit) -> maybe_named -> @@ -117,4 +103,4 @@ unit
    val print_project_var : Stdlib.Format.formatter -> project_var -> unit
    val print_set_of_closures : Stdlib.Format.formatter -> set_of_closures -> unit
    val print_specialised_to : Stdlib.Format.formatter -> specialised_to -> unit
    val equal_call_kind : call_kind -> call_kind -> bool
    val equal_specialised_to : specialised_to -> specialised_to -> bool
    val compare_const : const -> const -> int
    val compare_project_var : project_var -> project_var -> int
    val compare_move_within_set_of_closures : move_within_set_of_closures -> move_within_set_of_closures -> - int
    val compare_project_closure : project_closure -> project_closure -> int
    \ No newline at end of file + int
    val compare_project_closure : project_closure -> project_closure -> int
    diff --git a/ocaml/Flambda_invariants/index.html b/ocaml/Flambda_invariants/index.html index 99ae471..85e7060 100644 --- a/ocaml/Flambda_invariants/index.html +++ b/ocaml/Flambda_invariants/index.html @@ -1,2 +1,2 @@ -Flambda_invariants (ocaml.Flambda_invariants)

    Module Flambda_invariants

    type flambda_kind =
    1. | Normal
    2. | Lifted
    val check_exn : ?kind:flambda_kind -> Flambda.program -> unit

    Checking of invariants on Flambda expressions. Raises an exception if a check fails.

    \ No newline at end of file +Flambda_invariants (ocaml.Flambda_invariants)

    Module Flambda_invariants

    type flambda_kind =
    1. | Normal
    2. | Lifted
    val check_exn : ?kind:flambda_kind -> Flambda.program -> unit

    Checking of invariants on Flambda expressions. Raises an exception if a check fails.

    diff --git a/ocaml/Flambda_iterators/index.html b/ocaml/Flambda_iterators/index.html index f4824d4..fe8a633 100644 --- a/ocaml/Flambda_iterators/index.html +++ b/ocaml/Flambda_iterators/index.html @@ -1,5 +1,5 @@ -Flambda_iterators (ocaml.Flambda_iterators)

    Module Flambda_iterators

    val apply_on_subexpressions : +Flambda_iterators (ocaml.Flambda_iterators)

    Module Flambda_iterators

    val apply_on_subexpressions : (Flambda.t -> unit) -> (Flambda.named -> unit) -> Flambda.t -> @@ -24,25 +24,25 @@ Flambda.t -> unit
    val iter_on_set_of_closures_of_program : Flambda.program -> - f:(constant:bool -> Flambda.set_of_closures -> unit) -> + f:(constant:bool -> Flambda.set_of_closures -> unit) -> unit
    val iter_all_immutable_let_and_let_rec_bindings : Flambda.t -> - f:(Variable.t -> Flambda.named -> unit) -> + f:(Variable.t -> Flambda.named -> unit) -> unit
    val iter_all_toplevel_immutable_let_and_let_rec_bindings : Flambda.t -> - f:(Variable.t -> Flambda.named -> unit) -> + f:(Variable.t -> Flambda.named -> unit) -> unit
    val iter_exprs_at_toplevel_of_program : Flambda.program -> - f:(Flambda.t -> unit) -> + f:(Flambda.t -> unit) -> unit
    val iter_named_of_program : Flambda.program -> - f:(Flambda.named -> unit) -> + f:(Flambda.named -> unit) -> unit
    val iter_constant_defining_values_on_program : Flambda.program -> - f:(Flambda.constant_defining_value -> unit) -> + f:(Flambda.constant_defining_value -> unit) -> unit
    val iter_apply_on_program : Flambda.program -> - f:(Flambda.apply -> unit) -> + f:(Flambda.apply -> unit) -> unit
    val map : (Flambda.t -> Flambda.t) -> (Flambda.named -> Flambda.named) -> @@ -54,42 +54,42 @@ Flambda.t
    val map_toplevel_expr : (Flambda.t -> Flambda.t) -> Flambda.t -> Flambda.t
    val map_toplevel_named : (Flambda.named -> Flambda.named) -> Flambda.t -> - Flambda.t
    val map_symbols : Flambda.t -> f:(Symbol.t -> Symbol.t) -> Flambda.t
    val map_symbols_on_set_of_closures : + Flambda.t
    val map_symbols : Flambda.t -> f:(Symbol.t -> Symbol.t) -> Flambda.t
    val map_symbols_on_set_of_closures : Flambda.set_of_closures -> - f:(Symbol.t -> Symbol.t) -> + f:(Symbol.t -> Symbol.t) -> Flambda.set_of_closures
    val map_toplevel_sets_of_closures : Flambda.t -> - f:(Flambda.set_of_closures -> Flambda.set_of_closures) -> - Flambda.t
    val map_apply : Flambda.t -> f:(Flambda.apply -> Flambda.apply) -> Flambda.t
    val map_function_bodies : + f:(Flambda.set_of_closures -> Flambda.set_of_closures) -> + Flambda.t
    val map_apply : Flambda.t -> f:(Flambda.apply -> Flambda.apply) -> Flambda.t
    val map_function_bodies : Flambda.set_of_closures -> - f:(Flambda.t -> Flambda.t) -> + f:(Flambda.t -> Flambda.t) -> Flambda.set_of_closures
    val map_project_var_to_expr_opt : Flambda.t -> - f:(Flambda.project_var -> Flambda.t option) -> + f:(Flambda.project_var -> Flambda.t option) -> Flambda.t
    val map_project_var_to_named_opt : Flambda.t -> - f:(Flambda.project_var -> Flambda.named option) -> + f:(Flambda.project_var -> Flambda.named option) -> Flambda.t
    val map_exprs_at_toplevel_of_program : Flambda.program -> - f:(Flambda.t -> Flambda.t) -> + f:(Flambda.t -> Flambda.t) -> Flambda.program
    val map_all_immutable_let_and_let_rec_bindings : Flambda.t -> - f:(Variable.t -> Flambda.named -> Flambda.named) -> + f:(Variable.t -> Flambda.named -> Flambda.named) -> Flambda.t
    val fold_function_decls_ignoring_stubs : Flambda.set_of_closures -> - init:'a -> - f: - (fun_var:Variable.t -> - function_decl:Flambda.function_declaration -> + init:'a -> + f: + (fun_var:Variable.t -> + function_decl:Flambda.function_declaration -> 'a -> 'a) -> - 'a
    \ No newline at end of file + 'a
    diff --git a/ocaml/Flambda_middle_end/index.html b/ocaml/Flambda_middle_end/index.html index 6901155..a1d727f 100644 --- a/ocaml/Flambda_middle_end/index.html +++ b/ocaml/Flambda_middle_end/index.html @@ -1,7 +1,7 @@ -Flambda_middle_end (ocaml.Flambda_middle_end)

    Module Flambda_middle_end

    Translate Lambda code to Flambda code, optimize it, and produce Clambda.

    val lambda_to_clambda : - backend:(module Backend_intf.S) -> - prefixname:string -> - ppf_dump:Stdlib.Format.formatter -> +Flambda_middle_end (ocaml.Flambda_middle_end)

    Module Flambda_middle_end

    Translate Lambda code to Flambda code, optimize it, and produce Clambda.

    val lambda_to_clambda : + backend:(module Backend_intf.S) -> + prefixname:string -> + ppf_dump:Stdlib.Format.formatter -> Lambda.program -> - Clambda.with_constants
    \ No newline at end of file + Clambda.with_constants
    diff --git a/ocaml/Flambda_to_clambda/index.html b/ocaml/Flambda_to_clambda/index.html index 5bf18f0..e063860 100644 --- a/ocaml/Flambda_to_clambda/index.html +++ b/ocaml/Flambda_to_clambda/index.html @@ -1,5 +1,5 @@ -Flambda_to_clambda (ocaml.Flambda_to_clambda)

    Module Flambda_to_clambda

    type result = {
    1. expr : Clambda.ulambda;
    2. preallocated_blocks : Clambda.preallocated_block list;
    3. structured_constants : Clambda.ustructured_constant Symbol.Map.t;
    4. exported : Export_info.t;
    }
    val convert : - ppf_dump:Stdlib.Format.formatter -> +Flambda_to_clambda (ocaml.Flambda_to_clambda)

    Module Flambda_to_clambda

    type result = {
    1. expr : Clambda.ulambda;
    2. preallocated_blocks : Clambda.preallocated_block list;
    3. structured_constants : Clambda.ustructured_constant Symbol.Map.t;
    4. exported : Export_info.t;
    }

    Convert an Flambda program, with associated proto-export information, to Clambda. This yields a Clambda expression together with augmented export information and details about required statically-allocated values (preallocated blocks, for Initialize_symbol, and structured constants).

    It is during this process that accesses to variables within closures are transformed to field accesses within closure values. For direct calls, the hidden closure parameter is added. Switch tables are also built.

    \ No newline at end of file + result

    Convert an Flambda program, with associated proto-export information, to Clambda. This yields a Clambda expression together with augmented export information and details about required statically-allocated values (preallocated blocks, for Initialize_symbol, and structured constants).

    It is during this process that accesses to variables within closures are transformed to field accesses within closure values. For direct calls, the hidden closure parameter is added. Switch tables are also built.

    diff --git a/ocaml/Flambda_utils/Switch_storer/index.html b/ocaml/Flambda_utils/Switch_storer/index.html index ddd5253..a80f1f0 100644 --- a/ocaml/Flambda_utils/Switch_storer/index.html +++ b/ocaml/Flambda_utils/Switch_storer/index.html @@ -1,2 +1,2 @@ -Switch_storer (ocaml.Flambda_utils.Switch_storer)

    Module Flambda_utils.Switch_storer

    For the compilation of switch statements.

    val mk_store : unit -> (Flambda.t, unit) Switch.t_store
    \ No newline at end of file +Switch_storer (ocaml.Flambda_utils.Switch_storer)

    Module Flambda_utils.Switch_storer

    For the compilation of switch statements.

    val mk_store : unit -> (Flambda.t, unit) Switch.t_store
    diff --git a/ocaml/Flambda_utils/index.html b/ocaml/Flambda_utils/index.html index e02db6e..60522bc 100644 --- a/ocaml/Flambda_utils/index.html +++ b/ocaml/Flambda_utils/index.html @@ -1,5 +1,5 @@ -Flambda_utils (ocaml.Flambda_utils)

    Module Flambda_utils

    Utility functions for the Flambda intermediate language.

    Access functions

    val find_declaration : +Flambda_utils (ocaml.Flambda_utils)

    Module Flambda_utils

    Utility functions for the Flambda intermediate language.

    Access functions

    find_declaration f decl raises Not_found if f is not in decl.

    val find_declaration_variable : @@ -12,10 +12,10 @@ Closure_id.t -> Flambda.function_declarations -> Variable.Set.t

    Variables "bound by a closure" are those variables free in the corresponding function's body that are neither:

    • bound as parameters of that function; nor
    • bound by the let binding that introduces the function declaration(s). In particular, if f, g and h are being introduced by a simultaneous, possibly mutually-recursive let binding then none of f, g or h are bound in any of the closures for f, g and h.
    val can_be_merged : Flambda.t -> Flambda.t -> bool

    If can_be_merged f1 f2 is true, it is safe to merge switch branches containing f1 and f2.

    val description_of_toplevel_node : Flambda.t -> string
    val make_closure_declaration : - is_classic_mode:bool -> - id:Variable.t -> - body:Flambda.t -> - params:Parameter.t list -> + is_classic_mode:bool -> + id:Variable.t -> + body:Flambda.t -> + params:Parameter.t list -> Flambda.t
    val toplevel_substitution : Variable.t Variable.Map.t -> Flambda.expr -> @@ -23,9 +23,9 @@ Variable.t Variable.Map.t -> Flambda.named -> Flambda.named
    val bind : - bindings:(Variable.t * Flambda.named) list -> - body:Flambda.t -> - Flambda.t

    bind [var1, expr1; ...; varN, exprN] body binds using Immutable Let expressions the given (var, expr) pairs around the body.

    val name_expr_from_var : var:Variable.t -> Flambda.named -> Flambda.t
    val initialize_symbols : + bindings:(Variable.t * Flambda.named) list -> + body:Flambda.t -> + Flambda.t

    bind [var1, expr1; ...; varN, exprN] body binds using Immutable Let expressions the given (var, expr) pairs around the body.

    val name_expr_from_var : var:Variable.t -> Flambda.named -> Flambda.t
    val initialize_symbols : Flambda.program -> (Symbol.t * Tag.t * Flambda.t list) list
    val imported_symbols : Flambda.program -> Symbol.Set.t
    val needed_import_symbols : Flambda.program -> Symbol.Set.t
    val introduce_needed_import_symbols : Flambda.program -> Flambda.program
    val root_symbol : Flambda.program -> Symbol.t
    val might_raise_static_exn : Flambda.named -> Static_exception.t -> bool

    Returns true iff the given term might raise the given static exception.

    Creates a map from closure IDs to set_of_closure IDs by iterating over all sets of closures in the given program.

    val all_lifted_constants : Flambda.program -> @@ -40,14 +40,14 @@ Flambda.t -> Flambda.t
    module Switch_storer : sig ... end

    For the compilation of switch statements.

    val fun_vars_referenced_in_decls : Flambda.function_declarations -> - closure_symbol:(Closure_id.t -> Symbol.t) -> + closure_symbol:(Closure_id.t -> Symbol.t) -> Variable.Set.t Variable.Map.t

    Within a set of function declarations there is a set of function bodies, each of which may (or may not) reference one of the other functions in the same set. Initially such intra-set references are by Vars (known as "fun_var"s) but if the function is lifted by Lift_constants then the references will be translated to Symbols. This means that optimization passes that need to identify whether a given "fun_var" (i.e. a key in the funs map in a value of type function_declarations) is used in one of the function bodies need to examine the free_symbols as well as the free_variables members of function_declarations. This function makes that process easier by computing all used "fun_var"s in the bodies of the given set of function declarations, including the cases where the references are Symbols. The returned value is a map from "fun_var"s to the "fun_var"s (if any) used in the body of the function associated with that "fun_var".

    val closures_required_by_entry_point : - entry_point:Closure_id.t -> - closure_symbol:(Closure_id.t -> Symbol.t) -> + entry_point:Closure_id.t -> + closure_symbol:(Closure_id.t -> Symbol.t) -> Flambda.function_declarations -> Variable.Set.t

    Computes the set of closure_id in the set of closures that are required used (transitively) the entry_point

    val all_functions_parameters : Flambda.function_declarations -> Variable.Set.t
    val contains_stub : Flambda.function_declarations -> bool
    val projection_to_named : Projection.t -> Flambda.named
    type specialised_to_same_as =
    1. | Not_specialised
    2. | Specialised_and_aliased_to of Variable.Set.t
    val parameters_specialised_to_the_same_variable : - function_decls:Flambda.function_declarations -> - specialised_args:Flambda.specialised_to Variable.Map.t -> - specialised_to_same_as list Variable.Map.t

    For each parameter in a given set of function declarations and the usual specialised-args mapping, determine which other parameters are specialised to the same variable as that parameter. The result is presented as a map from fun_vars to lists, corresponding componentwise to the usual params list in the corresponding function declaration.

    \ No newline at end of file + function_decls:Flambda.function_declarations -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + specialised_to_same_as list Variable.Map.t

    For each parameter in a given set of function declarations and the usual specialised-args mapping, determine which other parameters are specialised to the same variable as that parameter. The result is presented as a map from fun_vars to lists, corresponding componentwise to the usual params list in the corresponding function declaration.

    diff --git a/ocaml/Freshening/Project_var/index.html b/ocaml/Freshening/Project_var/index.html index 2ba6c6c..928d475 100644 --- a/ocaml/Freshening/Project_var/index.html +++ b/ocaml/Freshening/Project_var/index.html @@ -1,9 +1,5 @@ -Project_var (ocaml.Freshening.Project_var)

    Module Freshening.Project_var

    type t

    A table used for freshening of identifiers in Project_closure and Move_within_set_of_closures ("ids of closures"); and Project_var ("bound vars of closures") expressions.

    This information is propagated bottom up and populated when inlining a function containing a closure declaration.

    For instance, let f x = - let g y = ... x ... in - ... g.x ... (Project_var x) - ... g 1 ... (Apply (Project_closure g ...)) -

    If f is inlined, g is renamed. The approximation of g will carry this table such that later the access to the field x of g and selection of g in the closure can be substituted.

    val empty : t
    val compose : earlier:t -> later:t -> t

    Composition of two freshenings.

    val apply_closure_id : t -> Closure_id.t -> Closure_id.t

    Freshen a closure ID based on the given renaming. The same ID is returned if the renaming does not affect it. If dealing with approximations, you probably want to use Simple_value_approx.freshen_and_check_closure_id instead of this function.

    val apply_var_within_closure : +Project_var (ocaml.Freshening.Project_var)

    Module Freshening.Project_var

    type t

    A table used for freshening of identifiers in Project_closure and Move_within_set_of_closures ("ids of closures"); and Project_var ("bound vars of closures") expressions.

    This information is propagated bottom up and populated when inlining a function containing a closure declaration.

    For instance, let f x = let g y = ... x ... in ... g.x ... (Project_var x) ... g 1 ... (Apply (Project_closure g ...))

    If f is inlined, g is renamed. The approximation of g will carry this table such that later the access to the field x of g and selection of g in the closure can be substituted.

    val empty : t
    val compose : earlier:t -> later:t -> t

    Composition of two freshenings.

    val apply_closure_id : t -> Closure_id.t -> Closure_id.t

    Freshen a closure ID based on the given renaming. The same ID is returned if the renaming does not affect it. If dealing with approximations, you probably want to use Simple_value_approx.freshen_and_check_closure_id instead of this function.

    val apply_var_within_closure : t -> Var_within_closure.t -> - Var_within_closure.t

    Like apply_closure_id, but for variables within closures.

    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file + Var_within_closure.t

    Like apply_closure_id, but for variables within closures.

    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Freshening/index.html b/ocaml/Freshening/index.html index 069f0a9..2d2865a 100644 --- a/ocaml/Freshening/index.html +++ b/ocaml/Freshening/index.html @@ -1,22 +1,22 @@ -Freshening (ocaml.Freshening)

    Module Freshening

    Freshening of various identifiers.

    type t

    A table used for freshening variables and static exception identifiers.

    type subst = t
    val empty : t

    The freshening that does nothing. This is the unique inactive freshening.

    val is_empty : t -> bool
    val activate : t -> t

    Activate the freshening. Without activation, operations to request freshenings have no effect (cf. the documentation below for add_variable). As such, the inactive renaming is unique.

    val empty_preserving_activation_state : t -> t

    Given the inactive freshening, return the same; otherwise, return an empty active freshening.

    val add_variable : t -> Variable.t -> Variable.t * t

    add_variable t var If t is active: It returns a fresh variable new_var and adds var -> new_var to the freshening. If a renaming other_var -> var or symbol -> var was already present in t, it will also add other_var -> new_var and symbol -> new_var. If t is inactive, this is the identity.

    val add_variables' : t -> Variable.t list -> Variable.t list * t

    Like add_variable, but for multiple variables, each freshened separately.

    val add_variables : t -> (Variable.t * 'a) list -> (Variable.t * 'a) list * t

    Like add_variables', but passes through the second component of the input list unchanged.

    val add_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t * t

    Like add_variable, but for mutable variables.

    val add_static_exception : t -> Static_exception.t -> Static_exception.t * t

    As for add_variable, but for static exception identifiers.

    val apply_variable : t -> Variable.t -> Variable.t

    apply_variable t var applies the freshening t to var. If no renaming is specified in t for var it is returned unchanged.

    val apply_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t

    As for apply_variable, but for mutable variables.

    val apply_static_exception : t -> Static_exception.t -> Static_exception.t

    As for apply_variable, but for static exception identifiers.

    val rewrite_recursive_calls_with_symbols : +Freshening (ocaml.Freshening)

    Module Freshening

    Freshening of various identifiers.

    type t

    A table used for freshening variables and static exception identifiers.

    type subst = t
    val empty : t

    The freshening that does nothing. This is the unique inactive freshening.

    val is_empty : t -> bool
    val activate : t -> t

    Activate the freshening. Without activation, operations to request freshenings have no effect (cf. the documentation below for add_variable). As such, the inactive renaming is unique.

    val empty_preserving_activation_state : t -> t

    Given the inactive freshening, return the same; otherwise, return an empty active freshening.

    val add_variable : t -> Variable.t -> Variable.t * t

    add_variable t var If t is active: It returns a fresh variable new_var and adds var -> new_var to the freshening. If a renaming other_var -> var or symbol -> var was already present in t, it will also add other_var -> new_var and symbol -> new_var. If t is inactive, this is the identity.

    val add_variables' : t -> Variable.t list -> Variable.t list * t

    Like add_variable, but for multiple variables, each freshened separately.

    val add_variables : t -> (Variable.t * 'a) list -> (Variable.t * 'a) list * t

    Like add_variables', but passes through the second component of the input list unchanged.

    val add_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t * t

    Like add_variable, but for mutable variables.

    val add_static_exception : t -> Static_exception.t -> Static_exception.t * t

    As for add_variable, but for static exception identifiers.

    val apply_variable : t -> Variable.t -> Variable.t

    apply_variable t var applies the freshening t to var. If no renaming is specified in t for var it is returned unchanged.

    val apply_mutable_variable : t -> Mutable_variable.t -> Mutable_variable.t

    As for apply_variable, but for mutable variables.

    val apply_static_exception : t -> Static_exception.t -> Static_exception.t

    As for apply_variable, but for static exception identifiers.

    val rewrite_recursive_calls_with_symbols : t -> Flambda.function_declarations -> - make_closure_symbol:(Closure_id.t -> Symbol.t) -> + make_closure_symbol:(Closure_id.t -> Symbol.t) -> Flambda.function_declarations

    Replace recursive accesses to the closures in the set through Symbol by the corresponding Var. This is used to recover the recursive call when importing code from another compilation unit.

    If the renaming is inactive, this is the identity.

    module Project_var : sig ... end
    val apply_function_decls_and_free_vars : t -> (Flambda.specialised_to * 'a) Variable.Map.t -> Flambda.function_declarations -> - only_freshen_parameters:bool -> + only_freshen_parameters:bool -> (Flambda.specialised_to * 'a) Variable.Map.t * Flambda.function_declarations * t * Project_var.t
    val does_not_freshen : t -> Variable.t list -> bool
    val print : Stdlib.Format.formatter -> t -> unit
    val freshen_projection_relation : Flambda.specialised_to Variable.Map.t -> - freshening:t -> - closure_freshening:Project_var.t -> + freshening:t -> + closure_freshening:Project_var.t -> Flambda.specialised_to Variable.Map.t

    N.B. This does not freshen the domain of the supplied map, only the range.

    val freshen_projection_relation' : (Flambda.specialised_to * 'a) Variable.Map.t -> - freshening:t -> - closure_freshening:Project_var.t -> - (Flambda.specialised_to * 'a) Variable.Map.t
    \ No newline at end of file + freshening:t -> + closure_freshening:Project_var.t -> + (Flambda.specialised_to * 'a) Variable.Map.t
    diff --git a/ocaml/Genprintval/Make/argument-1-O/index.html b/ocaml/Genprintval/Make/argument-1-O/index.html index 2f8b50b..17e6cbe 100644 --- a/ocaml/Genprintval/Make/argument-1-O/index.html +++ b/ocaml/Genprintval/Make/argument-1-O/index.html @@ -1,2 +1,2 @@ -O (ocaml.Genprintval.Make.O)

    Parameter Make.O

    type t
    val repr : 'a -> t
    val obj : t -> 'a
    val is_block : t -> bool
    val tag : t -> int
    val size : t -> int
    val field : t -> int -> t
    val double_array_tag : int
    val double_field : t -> int -> float
    \ No newline at end of file +O (ocaml.Genprintval.Make.O)

    Parameter Make.O

    type t
    val repr : 'a -> t
    val obj : t -> 'a
    val is_block : t -> bool
    val tag : t -> int
    val size : t -> int
    val field : t -> int -> t
    val double_array_tag : int
    val double_field : t -> int -> float
    diff --git a/ocaml/Genprintval/Make/argument-2-_/index.html b/ocaml/Genprintval/Make/argument-2-_/index.html index 7dcd29f..ba76522 100644 --- a/ocaml/Genprintval/Make/argument-2-_/index.html +++ b/ocaml/Genprintval/Make/argument-2-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Genprintval.Make._)

    Parameter Make._

    type valu = O.t
    val eval_address : Env.address -> valu
    exception Error
    val same_value : valu -> valu -> bool
    \ No newline at end of file +_ (ocaml.Genprintval.Make._)

    Parameter Make._

    type valu = O.t
    val eval_address : Env.address -> valu
    exception Error
    val same_value : valu -> valu -> bool
    diff --git a/ocaml/Genprintval/Make/index.html b/ocaml/Genprintval/Make/index.html index ae9af00..464c74b 100644 --- a/ocaml/Genprintval/Make/index.html +++ b/ocaml/Genprintval/Make/index.html @@ -1,5 +1,5 @@ -Make (ocaml.Genprintval.Make)

    Module Genprintval.Make

    Parameters

    module O : OBJ
    module _ : EVALPATH with type valu = O.t

    Signature

    type t = O.t
    val install_printer : +Make (ocaml.Genprintval.Make)

    Module Genprintval.Make

    Parameters

    module O : OBJ
    module _ : EVALPATH with type valu = O.t

    Signature

    type t = O.t
    val install_printer : Path.t -> Types.type_expr -> (Stdlib.Format.formatter -> t -> unit) -> @@ -20,4 +20,4 @@ Env.t -> t -> Types.type_expr -> - Outcometree.out_value
    \ No newline at end of file + Outcometree.out_value
    diff --git a/ocaml/Genprintval/index.html b/ocaml/Genprintval/index.html index 4730d24..c24b1c1 100644 --- a/ocaml/Genprintval/index.html +++ b/ocaml/Genprintval/index.html @@ -1,2 +1,2 @@ -Genprintval (ocaml.Genprintval)

    Module Genprintval

    module type OBJ = sig ... end
    module type EVALPATH = sig ... end
    type ('a, 'b) gen_printer =
    1. | Zero of 'b
    2. | Succ of 'a -> ('a, 'b) gen_printer
    module type S = sig ... end
    module Make (O : OBJ) (_ : EVALPATH with type valu = O.t) : S with type t = O.t
    \ No newline at end of file +Genprintval (ocaml.Genprintval)

    Module Genprintval

    module type OBJ = sig ... end
    module type EVALPATH = sig ... end
    type ('a, 'b) gen_printer =
    1. | Zero of 'b
    2. | Succ of 'a -> ('a, 'b) gen_printer
    module type S = sig ... end
    module Make (O : OBJ) (_ : EVALPATH with type valu = O.t) : S with type t = O.t
    diff --git a/ocaml/Genprintval/module-type-EVALPATH/index.html b/ocaml/Genprintval/module-type-EVALPATH/index.html index 530a247..ccceb21 100644 --- a/ocaml/Genprintval/module-type-EVALPATH/index.html +++ b/ocaml/Genprintval/module-type-EVALPATH/index.html @@ -1,2 +1,2 @@ -EVALPATH (ocaml.Genprintval.EVALPATH)

    Module type Genprintval.EVALPATH

    type valu
    val eval_address : Env.address -> valu
    exception Error
    val same_value : valu -> valu -> bool
    \ No newline at end of file +EVALPATH (ocaml.Genprintval.EVALPATH)

    Module type Genprintval.EVALPATH

    type valu
    val eval_address : Env.address -> valu
    exception Error
    val same_value : valu -> valu -> bool
    diff --git a/ocaml/Genprintval/module-type-OBJ/index.html b/ocaml/Genprintval/module-type-OBJ/index.html index 4fb8cd7..58cdfaf 100644 --- a/ocaml/Genprintval/module-type-OBJ/index.html +++ b/ocaml/Genprintval/module-type-OBJ/index.html @@ -1,2 +1,2 @@ -OBJ (ocaml.Genprintval.OBJ)

    Module type Genprintval.OBJ

    type t
    val repr : 'a -> t
    val obj : t -> 'a
    val is_block : t -> bool
    val tag : t -> int
    val size : t -> int
    val field : t -> int -> t
    val double_array_tag : int
    val double_field : t -> int -> float
    \ No newline at end of file +OBJ (ocaml.Genprintval.OBJ)

    Module type Genprintval.OBJ

    type t
    val repr : 'a -> t
    val obj : t -> 'a
    val is_block : t -> bool
    val tag : t -> int
    val size : t -> int
    val field : t -> int -> t
    val double_array_tag : int
    val double_field : t -> int -> float
    diff --git a/ocaml/Genprintval/module-type-S/index.html b/ocaml/Genprintval/module-type-S/index.html index c9a3411..3ef8365 100644 --- a/ocaml/Genprintval/module-type-S/index.html +++ b/ocaml/Genprintval/module-type-S/index.html @@ -1,5 +1,5 @@ -S (ocaml.Genprintval.S)

    Module type Genprintval.S

    type t
    val install_printer : +S (ocaml.Genprintval.S)

    Module type Genprintval.S

    type t
    val install_printer : Path.t -> Types.type_expr -> (Stdlib.Format.formatter -> t -> unit) -> @@ -20,4 +20,4 @@ Env.t -> t -> Types.type_expr -> - Outcometree.out_value
    \ No newline at end of file + Outcometree.out_value
    diff --git a/ocaml/Id_types/Id/index.html b/ocaml/Id_types/Id/index.html index 0e67de3..2d48755 100644 --- a/ocaml/Id_types/Id/index.html +++ b/ocaml/Id_types/Id/index.html @@ -1,2 +1,2 @@ -Id (ocaml.Id_types.Id)

    Module Id_types.Id

    Parameters

    Signature

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    \ No newline at end of file +Id (ocaml.Id_types.Id)

    Module Id_types.Id

    Parameters

    Signature

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    diff --git a/ocaml/Id_types/UnitId/argument-1-_/index.html b/ocaml/Id_types/UnitId/argument-1-_/index.html index a93ee24..1001916 100644 --- a/ocaml/Id_types/UnitId/argument-1-_/index.html +++ b/ocaml/Id_types/UnitId/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Id_types.UnitId._)

    Parameter UnitId._

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    \ No newline at end of file +_ (ocaml.Id_types.UnitId._)

    Parameter UnitId._

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    diff --git a/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html b/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html index fda6533..ebf4d09 100644 --- a/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html +++ b/ocaml/Id_types/UnitId/argument-2-Compilation_unit/index.html @@ -1,2 +1,2 @@ -Compilation_unit (ocaml.Id_types.UnitId.Compilation_unit)

    Parameter UnitId.Compilation_unit

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Compilation_unit (ocaml.Id_types.UnitId.Compilation_unit)

    Parameter UnitId.Compilation_unit

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Id_types/UnitId/index.html b/ocaml/Id_types/UnitId/index.html index fefb277..0318292 100644 --- a/ocaml/Id_types/UnitId/index.html +++ b/ocaml/Id_types/UnitId/index.html @@ -1,2 +1,2 @@ -UnitId (ocaml.Id_types.UnitId)

    Module Id_types.UnitId

    Parameters

    module _ : Id

    Signature

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> Compilation_unit.t -> t
    val unit : t -> Compilation_unit.t
    \ No newline at end of file +UnitId (ocaml.Id_types.UnitId)

    Module Id_types.UnitId

    Parameters

    module _ : Id

    Signature

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> Compilation_unit.t -> t
    val unit : t -> Compilation_unit.t
    diff --git a/ocaml/Id_types/index.html b/ocaml/Id_types/index.html index 97e20c9..24439bc 100644 --- a/ocaml/Id_types/index.html +++ b/ocaml/Id_types/index.html @@ -1,5 +1,5 @@ -Id_types (ocaml.Id_types)

    Module Id_types

    module type BaseId = sig ... end

    Generic identifier type

    module type Id = sig ... end
    module type UnitId = sig ... end

    Fully qualified identifiers

    module Id () : Id
    module UnitId +Id_types (ocaml.Id_types)

    Module Id_types

    module type BaseId = sig ... end

    Generic identifier type

    module type Id = sig ... end
    module type UnitId = sig ... end

    Fully qualified identifiers

    module Id () : Id
    \ No newline at end of file + UnitId with module Compilation_unit := Compilation_unit
    diff --git a/ocaml/Id_types/module-type-BaseId/index.html b/ocaml/Id_types/module-type-BaseId/index.html index d044add..dc547cc 100644 --- a/ocaml/Id_types/module-type-BaseId/index.html +++ b/ocaml/Id_types/module-type-BaseId/index.html @@ -1,2 +1,2 @@ -BaseId (ocaml.Id_types.BaseId)

    Module type Id_types.BaseId

    Generic identifier type

    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +BaseId (ocaml.Id_types.BaseId)

    Module type Id_types.BaseId

    Generic identifier type

    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Id_types/module-type-Id/index.html b/ocaml/Id_types/module-type-Id/index.html index 864adaa..850e90a 100644 --- a/ocaml/Id_types/module-type-Id/index.html +++ b/ocaml/Id_types/module-type-Id/index.html @@ -1,2 +1,2 @@ -Id (ocaml.Id_types.Id)

    Module type Id_types.Id

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    \ No newline at end of file +Id (ocaml.Id_types.Id)

    Module type Id_types.Id

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> unit -> t
    diff --git a/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html b/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html index f4ecf79..f52768b 100644 --- a/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html +++ b/ocaml/Id_types/module-type-UnitId/Compilation_unit/index.html @@ -1,2 +1,2 @@ -Compilation_unit (ocaml.Id_types.UnitId.Compilation_unit)

    Module UnitId.Compilation_unit

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Compilation_unit (ocaml.Id_types.UnitId.Compilation_unit)

    Module UnitId.Compilation_unit

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Id_types/module-type-UnitId/index.html b/ocaml/Id_types/module-type-UnitId/index.html index 6866c1b..014fb26 100644 --- a/ocaml/Id_types/module-type-UnitId/index.html +++ b/ocaml/Id_types/module-type-UnitId/index.html @@ -1,2 +1,2 @@ -UnitId (ocaml.Id_types.UnitId)

    Module type Id_types.UnitId

    Fully qualified identifiers

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> Compilation_unit.t -> t
    val unit : t -> Compilation_unit.t
    \ No newline at end of file +UnitId (ocaml.Id_types.UnitId)

    Module type Id_types.UnitId

    Fully qualified identifiers

    include BaseId
    type t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val hash : t -> int
    val name : t -> string option
    val to_string : t -> string
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val create : ?name:string -> Compilation_unit.t -> t
    val unit : t -> Compilation_unit.t
    diff --git a/ocaml/Ident/Map/index.html b/ocaml/Ident/Map/index.html index 1d7bc1e..6eebbe6 100644 --- a/ocaml/Ident/Map/index.html +++ b/ocaml/Ident/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Ident.Map)

    Module Ident.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Ident.Map)

    Module Ident.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Ident/Set/index.html b/ocaml/Ident/Set/index.html index ed0ea3a..d33657c 100644 --- a/ocaml/Ident/Set/index.html +++ b/ocaml/Ident/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Ident.Set)

    Module Ident.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Ident.Set)

    Module Ident.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Ident/T/index.html b/ocaml/Ident/T/index.html index 8559647..be1ff98 100644 --- a/ocaml/Ident/T/index.html +++ b/ocaml/Ident/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Ident.T)

    Module Ident.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Ident.T)

    Module Ident.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Ident/Tbl/index.html b/ocaml/Ident/Tbl/index.html index 9f7f4da..209a9af 100644 --- a/ocaml/Ident/Tbl/index.html +++ b/ocaml/Ident/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Ident.Tbl)

    Module Ident.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Ident.Tbl)

    Module Ident.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Ident/index.html b/ocaml/Ident/index.html index 881a4d5..e783864 100644 --- a/ocaml/Ident/index.html +++ b/ocaml/Ident/index.html @@ -1,2 +1,2 @@ -Ident (ocaml.Ident)

    Module Ident

    type t
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val print_with_scope : Stdlib.Format.formatter -> t -> unit

    Same as print except that it will also add a "n" suffix if the scope of the argument is n.

    val create_scoped : scope:int -> string -> t
    val create_local : string -> t
    val create_persistent : string -> t
    val create_predef : string -> t
    val rename : t -> t

    Creates an identifier with the same name as the input, a fresh stamp, and no scope.

    • raises [Fatal_error]

      if called on a persistent / predef ident.

    val name : t -> string
    val unique_name : t -> string
    val unique_toplevel_name : t -> string
    val persistent : t -> bool
    val same : t -> t -> bool

    Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

    val compare : t -> t -> int
    val global : t -> bool
    val is_predef : t -> bool
    val scope : t -> int
    val lowest_scope : int
    val highest_scope : int
    val reinit : unit -> unit
    type 'a tbl

    'a tbl represents association tables from identifiers to values of type 'a.

    'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

    find_all returns the bindings for all idents of a given name, most recently introduced first.

    In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

    Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

    You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

    val empty : 'a tbl
    val add : t -> 'a -> 'a tbl -> 'a tbl
    val find_same : t -> 'a tbl -> 'a
    val find_name : string -> 'a tbl -> t * 'a
    val find_all : string -> 'a tbl -> (t * 'a) list
    val find_all_seq : string -> 'a tbl -> (t * 'a) Stdlib.Seq.t
    val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
    val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
    val iter : (t -> 'a -> unit) -> 'a tbl -> unit
    val remove : t -> 'a tbl -> 'a tbl
    val make_key_generator : unit -> t -> t
    \ No newline at end of file +Ident (ocaml.Ident)

    Module Ident

    type t
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val print_with_scope : Stdlib.Format.formatter -> t -> unit

    Same as print except that it will also add a "n" suffix if the scope of the argument is n.

    val create_scoped : scope:int -> string -> t
    val create_local : string -> t
    val create_persistent : string -> t
    val create_predef : string -> t
    val rename : t -> t

    Creates an identifier with the same name as the input, a fresh stamp, and no scope.

    • raises [Fatal_error]

      if called on a persistent / predef ident.

    val name : t -> string
    val unique_name : t -> string
    val unique_toplevel_name : t -> string
    val persistent : t -> bool
    val same : t -> t -> bool

    Compare identifiers by binding location. Two identifiers are the same either if they are both non-persistent and have been created by the same call to create_*, or if they are both persistent and have the same name.

    val compare : t -> t -> int
    val global : t -> bool
    val is_predef : t -> bool
    val scope : t -> int
    val lowest_scope : int
    val highest_scope : int
    val reinit : unit -> unit
    type 'a tbl

    'a tbl represents association tables from identifiers to values of type 'a.

    'a tbl plays the role of map, but bindings can be looked up from either the full Ident using find_same, or just its user-visible name using find_name. In general the two lookups may not return the same result, as an identifier may have been shadowed in the environment by a distinct identifier with the same name.

    find_all returns the bindings for all idents of a given name, most recently introduced first.

    In other words, 'a tbl corresponds to (Ident.t * 'a) list Map.Make(String) and the implementation is very close to that representation.

    Note in particular that searching among idents of the same name takes linear time, and that add simply extends the list without checking for duplicates. So it is not a good idea to implement union by repeated add calls, which may result in many duplicated identifiers and poor find_same performance. It is even possible to build overly large same-name lists such that non-recursive functions like find_all or fold_all blow the stack.

    You should probably use Map.Make(Ident) instead, unless you really need to query bindings by user-visible name, not just by unique identifiers.

    val empty : 'a tbl
    val add : t -> 'a -> 'a tbl -> 'a tbl
    val find_same : t -> 'a tbl -> 'a
    val find_name : string -> 'a tbl -> t * 'a
    val find_all : string -> 'a tbl -> (t * 'a) list
    val find_all_seq : string -> 'a tbl -> (t * 'a) Stdlib.Seq.t
    val fold_name : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
    val fold_all : (t -> 'a -> 'b -> 'b) -> 'a tbl -> 'b -> 'b
    val iter : (t -> 'a -> unit) -> 'a tbl -> unit
    val remove : t -> 'a tbl -> 'a tbl
    val make_key_generator : unit -> t -> t
    diff --git a/ocaml/Identifiable/Make/Map/index.html b/ocaml/Identifiable/Make/Map/index.html index 94803a1..c1a5e8b 100644 --- a/ocaml/Identifiable/Make/Map/index.html +++ b/ocaml/Identifiable/Make/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Identifiable.Make.Map)

    Module Make.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Identifiable.Make.Map)

    Module Make.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Identifiable/Make/Set/index.html b/ocaml/Identifiable/Make/Set/index.html index 923eb39..ab75fa9 100644 --- a/ocaml/Identifiable/Make/Set/index.html +++ b/ocaml/Identifiable/Make/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Identifiable.Make.Set)

    Module Make.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Identifiable.Make.Set)

    Module Make.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Identifiable/Make/T/index.html b/ocaml/Identifiable/Make/T/index.html index e3a107c..8561f9a 100644 --- a/ocaml/Identifiable/Make/T/index.html +++ b/ocaml/Identifiable/Make/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.Make.T)

    Module Make.T

    type t = T.t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Identifiable.Make.T)

    Module Make.T

    type t = T.t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/Make/Tbl/index.html b/ocaml/Identifiable/Make/Tbl/index.html index 84e6c9f..5df4def 100644 --- a/ocaml/Identifiable/Make/Tbl/index.html +++ b/ocaml/Identifiable/Make/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Identifiable.Make.Tbl)

    Module Make.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Identifiable.Make.Tbl)

    Module Make.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Identifiable/Make/argument-1-T/index.html b/ocaml/Identifiable/Make/argument-1-T/index.html index 5e199a2..0747159 100644 --- a/ocaml/Identifiable/Make/argument-1-T/index.html +++ b/ocaml/Identifiable/Make/argument-1-T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.Make.T)

    Parameter Make.T

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Identifiable.Make.T)

    Parameter Make.T

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/Make/index.html b/ocaml/Identifiable/Make/index.html index 7085927..d4f43b7 100644 --- a/ocaml/Identifiable/Make/index.html +++ b/ocaml/Identifiable/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Identifiable.Make)

    Module Identifiable.Make

    Parameters

    module T : Thing

    Signature

    module T : Thing with type t = T.t
    include Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Set with module T := T
    module Map : Map with module T := T
    module Tbl : Tbl with module T := T
    \ No newline at end of file +Make (ocaml.Identifiable.Make)

    Module Identifiable.Make

    Parameters

    module T : Thing

    Signature

    module T : Thing with type t = T.t
    include Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Set with module T := T
    module Map : Map with module T := T
    module Tbl : Tbl with module T := T
    diff --git a/ocaml/Identifiable/Pair/argument-1-A/index.html b/ocaml/Identifiable/Pair/argument-1-A/index.html index b1bbc7f..661ffdc 100644 --- a/ocaml/Identifiable/Pair/argument-1-A/index.html +++ b/ocaml/Identifiable/Pair/argument-1-A/index.html @@ -1,2 +1,2 @@ -A (ocaml.Identifiable.Pair.A)

    Parameter Pair.A

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +A (ocaml.Identifiable.Pair.A)

    Parameter Pair.A

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/Pair/argument-2-B/index.html b/ocaml/Identifiable/Pair/argument-2-B/index.html index 2bbe2b3..4e1d06b 100644 --- a/ocaml/Identifiable/Pair/argument-2-B/index.html +++ b/ocaml/Identifiable/Pair/argument-2-B/index.html @@ -1,2 +1,2 @@ -B (ocaml.Identifiable.Pair.B)

    Parameter Pair.B

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +B (ocaml.Identifiable.Pair.B)

    Parameter Pair.B

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/Pair/index.html b/ocaml/Identifiable/Pair/index.html index 41ea3ab..ffd7a17 100644 --- a/ocaml/Identifiable/Pair/index.html +++ b/ocaml/Identifiable/Pair/index.html @@ -1,2 +1,2 @@ -Pair (ocaml.Identifiable.Pair)

    Module Identifiable.Pair

    Parameters

    module A : Thing
    module B : Thing

    Signature

    type t = A.t * B.t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Pair (ocaml.Identifiable.Pair)

    Module Identifiable.Pair

    Parameters

    module A : Thing
    module B : Thing

    Signature

    type t = A.t * B.t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/index.html b/ocaml/Identifiable/index.html index a03c15d..5d4bbaf 100644 --- a/ocaml/Identifiable/index.html +++ b/ocaml/Identifiable/index.html @@ -1,2 +1,2 @@ -Identifiable (ocaml.Identifiable)

    Module Identifiable

    Uniform interface for common data structures over various things.

    Warning: this module is unstable and part of compiler-libs.

    module type Thing = sig ... end
    module Pair (A : Thing) (B : Thing) : Thing with type t = A.t * B.t
    module type Set = sig ... end
    module type Map = sig ... end
    module type Tbl = sig ... end
    module type S = sig ... end
    module Make (T : Thing) : S with type t := T.t
    \ No newline at end of file +Identifiable (ocaml.Identifiable)

    Module Identifiable

    Uniform interface for common data structures over various things.

    Warning: this module is unstable and part of compiler-libs.

    module type Thing = sig ... end
    module Pair (A : Thing) (B : Thing) : Thing with type t = A.t * B.t
    module type Set = sig ... end
    module type Map = sig ... end
    module type Tbl = sig ... end
    module type S = sig ... end
    module Make (T : Thing) : S with type t := T.t
    diff --git a/ocaml/Identifiable/module-type-Map/T/index.html b/ocaml/Identifiable/module-type-Map/T/index.html index 9f9f059..560996d 100644 --- a/ocaml/Identifiable/module-type-Map/T/index.html +++ b/ocaml/Identifiable/module-type-Map/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.Map.T)

    Module Map.T

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +T (ocaml.Identifiable.Map.T)

    Module Map.T

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Identifiable/module-type-Map/index.html b/ocaml/Identifiable/module-type-Map/index.html index 572ec12..b91f310 100644 --- a/ocaml/Identifiable/module-type-Map/index.html +++ b/ocaml/Identifiable/module-type-Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Identifiable.Map)

    Module type Identifiable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Identifiable.Map)

    Module type Identifiable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Identifiable/module-type-S/Map/index.html b/ocaml/Identifiable/module-type-S/Map/index.html index 2406894..dbab574 100644 --- a/ocaml/Identifiable/module-type-S/Map/index.html +++ b/ocaml/Identifiable/module-type-S/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Identifiable.S.Map)

    Module S.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Identifiable.S.Map)

    Module S.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Identifiable/module-type-S/Set/index.html b/ocaml/Identifiable/module-type-S/Set/index.html index 425407d..bd98c9a 100644 --- a/ocaml/Identifiable/module-type-S/Set/index.html +++ b/ocaml/Identifiable/module-type-S/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Identifiable.S.Set)

    Module S.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Identifiable.S.Set)

    Module S.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Identifiable/module-type-S/T/index.html b/ocaml/Identifiable/module-type-S/T/index.html index 954f6af..bfd2d79 100644 --- a/ocaml/Identifiable/module-type-S/T/index.html +++ b/ocaml/Identifiable/module-type-S/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.S.T)

    Module S.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Identifiable.S.T)

    Module S.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Identifiable/module-type-S/Tbl/index.html b/ocaml/Identifiable/module-type-S/Tbl/index.html index 7d7c146..6555da4 100644 --- a/ocaml/Identifiable/module-type-S/Tbl/index.html +++ b/ocaml/Identifiable/module-type-S/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Identifiable.S.Tbl)

    Module S.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Identifiable.S.Tbl)

    Module S.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Identifiable/module-type-S/index.html b/ocaml/Identifiable/module-type-S/index.html index 0549ecb..cd2201d 100644 --- a/ocaml/Identifiable/module-type-S/index.html +++ b/ocaml/Identifiable/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Identifiable.S)

    Module type Identifiable.S

    type t
    module T : Thing with type t = t
    include Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Set with module T := T
    module Map : Map with module T := T
    module Tbl : Tbl with module T := T
    \ No newline at end of file +S (ocaml.Identifiable.S)

    Module type Identifiable.S

    type t
    module T : Thing with type t = t
    include Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Set with module T := T
    module Map : Map with module T := T
    module Tbl : Tbl with module T := T
    diff --git a/ocaml/Identifiable/module-type-Set/T/index.html b/ocaml/Identifiable/module-type-Set/T/index.html index bb0fd6f..c011ac0 100644 --- a/ocaml/Identifiable/module-type-Set/T/index.html +++ b/ocaml/Identifiable/module-type-Set/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.Set.T)

    Module Set.T

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +T (ocaml.Identifiable.Set.T)

    Module Set.T

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Identifiable/module-type-Set/index.html b/ocaml/Identifiable/module-type-Set/index.html index 1d8432c..9ee9f76 100644 --- a/ocaml/Identifiable/module-type-Set/index.html +++ b/ocaml/Identifiable/module-type-Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Identifiable.Set)

    Module type Identifiable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Identifiable.Set)

    Module type Identifiable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Identifiable/module-type-Tbl/T/index.html b/ocaml/Identifiable/module-type-Tbl/T/index.html index 04b6938..4834a93 100644 --- a/ocaml/Identifiable/module-type-Tbl/T/index.html +++ b/ocaml/Identifiable/module-type-Tbl/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Identifiable.Tbl.T)

    Module Tbl.T

    type t
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +T (ocaml.Identifiable.Tbl.T)

    Module Tbl.T

    type t
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Identifiable/module-type-Tbl/index.html b/ocaml/Identifiable/module-type-Tbl/index.html index b8482ef..356e3a3 100644 --- a/ocaml/Identifiable/module-type-Tbl/index.html +++ b/ocaml/Identifiable/module-type-Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Identifiable.Tbl)

    Module type Identifiable.Tbl

    module T : sig ... end
    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Identifiable.Tbl)

    Module type Identifiable.Tbl

    module T : sig ... end
    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Identifiable/module-type-Thing/index.html b/ocaml/Identifiable/module-type-Thing/index.html index 553b4cd..d44c47b 100644 --- a/ocaml/Identifiable/module-type-Thing/index.html +++ b/ocaml/Identifiable/module-type-Thing/index.html @@ -1,2 +1,2 @@ -Thing (ocaml.Identifiable.Thing)

    Module type Identifiable.Thing

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Thing (ocaml.Identifiable.Thing)

    Module type Identifiable.Thing

    type t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Import_approx/index.html b/ocaml/Import_approx/index.html index e923917..26344a8 100644 --- a/ocaml/Import_approx/index.html +++ b/ocaml/Import_approx/index.html @@ -1,2 +1,2 @@ -Import_approx (ocaml.Import_approx)

    Module Import_approx

    Create simple value approximations from the export information in .cmx files.

    Given an approximation description, load .cmx files (possibly more than one) until the description is fully resolved. If a necessary .cmx file cannot be found, "unresolved" will be returned.

    val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

    Maps the description of the given approximation through really_import.

    val import_symbol : Symbol.t -> Simple_value_approx.t

    Read and convert the approximation of a given symbol from the relevant .cmx file. Unlike the "really_" functions, this does not continue to load .cmx files until the approximation is fully resolved.

    \ No newline at end of file +Import_approx (ocaml.Import_approx)

    Module Import_approx

    Create simple value approximations from the export information in .cmx files.

    Given an approximation description, load .cmx files (possibly more than one) until the description is fully resolved. If a necessary .cmx file cannot be found, "unresolved" will be returned.

    val really_import_approx : Simple_value_approx.t -> Simple_value_approx.t

    Maps the description of the given approximation through really_import.

    val import_symbol : Symbol.t -> Simple_value_approx.t

    Read and convert the approximation of a given symbol from the relevant .cmx file. Unlike the "really_" functions, this does not continue to load .cmx files until the approximation is fully resolved.

    diff --git a/ocaml/Includeclass/index.html b/ocaml/Includeclass/index.html index 14138ec..e037453 100644 --- a/ocaml/Includeclass/index.html +++ b/ocaml/Includeclass/index.html @@ -1,10 +1,10 @@ -Includeclass (ocaml.Includeclass)

    Module Includeclass

    val class_types : +Includeclass (ocaml.Includeclass)

    Module Includeclass

    \ No newline at end of file + unit
    diff --git a/ocaml/Includecore/index.html b/ocaml/Includecore/index.html index fbb147a..6b31174 100644 --- a/ocaml/Includecore/index.html +++ b/ocaml/Includecore/index.html @@ -1,5 +1,5 @@ -Includecore (ocaml.Includecore)

    Module Includecore

    type position = Errortrace.position =
    1. | First
    2. | Second
    type primitive_mismatch =
    1. | Name
    2. | Arity
    3. | No_alloc of position
    4. | Native_name
    5. | Result_repr
    6. | Argument_repr of int
    type value_mismatch =
    1. | Primitive_mismatch of primitive_mismatch
    2. | Not_a_primitive
    3. | Type of Errortrace.moregen_error
    exception Dont_match of value_mismatch
    type privacy_mismatch =
    1. | Private_type_abbreviation
    2. | Private_variant_type
    3. | Private_record_type
    4. | Private_extensible_variant
    5. | Private_row_type
    type type_kind =
    1. | Kind_abstract
    2. | Kind_record
    3. | Kind_variant
    4. | Kind_open
    type kind_mismatch = type_kind * type_kind
    type label_mismatch =
    1. | Type of Errortrace.equality_error
    2. | Mutability of position
    type record_change = +Includecore (ocaml.Includecore)

    Module Includecore

    type position = Errortrace.position =
    1. | First
    2. | Second
    type primitive_mismatch =
    1. | Name
    2. | Arity
    3. | No_alloc of position
    4. | Native_name
    5. | Result_repr
    6. | Argument_repr of int
    type value_mismatch =
    1. | Primitive_mismatch of primitive_mismatch
    2. | Not_a_primitive
    3. | Type of Errortrace.moregen_error
    exception Dont_match of value_mismatch
    type privacy_mismatch =
    1. | Private_type_abbreviation
    2. | Private_variant_type
    3. | Private_record_type
    4. | Private_extensible_variant
    5. | Private_row_type
    type type_kind =
    1. | Kind_abstract
    2. | Kind_record
    3. | Kind_variant
    4. | Kind_open
    type kind_mismatch = type_kind * type_kind
    type label_mismatch =
    1. | Type of Errortrace.equality_error
    2. | Mutability of position
    type record_mismatch =
    1. | Label_mismatch of record_change list
    2. | Unboxed_float_representation of position
    type constructor_mismatch =
    1. | Type of Errortrace.equality_error
    2. | Arity
    3. | Inline_record of record_change list
    4. | Kind of position
    5. | Explicit_return_type of position
    type extension_constructor_mismatch =
    1. | Constructor_privacy
    2. | Constructor_mismatch of Ident.t * Types.extension_constructor @@ -7,24 +7,24 @@ * constructor_mismatch
    type private_variant_mismatch =
    1. | Only_outer_closed
    2. | Missing of position * string
    3. | Presence of string
    4. | Incompatible_types_for of string
    5. | Types of Errortrace.equality_error
    type private_object_mismatch =
    1. | Missing of string
    2. | Types of Errortrace.equality_error
    type type_mismatch =
    1. | Arity
    2. | Privacy of privacy_mismatch
    3. | Kind of kind_mismatch
    4. | Constraint of Errortrace.equality_error
    5. | Manifest of Errortrace.equality_error
    6. | Private_variant of Types.type_expr * Types.type_expr * private_variant_mismatch
    7. | Private_object of Types.type_expr * Types.type_expr * private_object_mismatch
    8. | Variance
    9. | Record_mismatch of record_mismatch
    10. | Variant_mismatch of variant_change list
    11. | Unboxed_representation of position
    12. | Immediate of Type_immediacy.Violation.t
    val value_descriptions : - loc:Location.t -> + loc:Location.t -> Env.t -> string -> Types.value_description -> Types.value_description -> Typedtree.module_coercion
    val type_declarations : - ?equality:bool -> - loc:Location.t -> + ?equality:bool -> + loc:Location.t -> Env.t -> - mark:bool -> + mark:bool -> string -> Types.type_declaration -> Path.t -> Types.type_declaration -> type_mismatch option
    val extension_constructors : - loc:Location.t -> + loc:Location.t -> Env.t -> - mark:bool -> + mark:bool -> Ident.t -> Types.extension_constructor -> Types.extension_constructor -> @@ -48,4 +48,4 @@ Env.t -> Stdlib.Format.formatter -> extension_constructor_mismatch -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Includemod/Error/index.html b/ocaml/Includemod/Error/index.html index 4c14c3e..5129b96 100644 --- a/ocaml/Includemod/Error/index.html +++ b/ocaml/Includemod/Error/index.html @@ -1,5 +1,5 @@ -Error (ocaml.Includemod.Error)

    Module Includemod.Error

    type ('elt, 'explanation) diff = {
    1. got : 'elt;
    2. expected : 'elt;
    3. symptom : 'explanation;
    }
    type 'elt core_diff = ('elt, unit) diff
    type functor_arg_descr =
    1. | Anonymous
    2. | Named of Path.t
    3. | Unit
    4. | Empty_struct
      (*

      For backward compatibility's sake, an empty struct can be implicitly converted to an unit module.

      *)
    type core_sigitem_symptom =
    1. | Value_descriptions of (Types.value_description, Includecore.value_mismatch) +Error (ocaml.Includemod.Error)

      Module Includemod.Error

      type ('elt, 'explanation) diff = {
      1. got : 'elt;
      2. expected : 'elt;
      3. symptom : 'explanation;
      }
      type 'elt core_diff = ('elt, unit) diff
      type functor_arg_descr =
      1. | Anonymous
      2. | Named of Path.t
      3. | Unit
      4. | Empty_struct
        (*

        For backward compatibility's sake, an empty struct can be implicitly converted to an unit module.

        *)
      type core_sigitem_symptom =
      1. | Value_descriptions of (Types.value_description, Includecore.value_mismatch) diff
      2. | Type_declarations of (Types.type_declaration, Includecore.type_mismatch) diff
      3. | Extension_constructors of (Types.extension_constructor, Includecore.extension_constructor_mismatch) diff
      4. | Class_type_declarations of (Types.class_type_declaration, @@ -7,7 +7,7 @@ diff
      5. | Class_declarations of (Types.class_declaration, Ctype.class_match_failure list) diff
      type core_module_type_symptom =
      1. | Not_an_alias
      2. | Not_an_identifier
      3. | Incompatible_aliases
      4. | Abstract_module_type
      5. | Unbound_module_path of Path.t
      type module_type_symptom =
      1. | Mt_core of core_module_type_symptom
      2. | Signature of signature_symptom
      3. | Functor of functor_symptom
      4. | Invalid_module_alias of Path.t
      5. | After_alias_expansion of module_type_diff
      and module_type_diff = (Types.module_type, module_type_symptom) diff
      and functor_symptom =
      1. | Params of functor_params_diff
      2. | Result of module_type_diff
      and ('arg, 'path) functor_param_symptom =
      1. | Incompatible_params of 'arg * Types.functor_parameter
      2. | Mismatch of module_type_diff
      and arg_functor_param_symptom = (Types.functor_parameter, Ident.t) functor_param_symptom
      and functor_params_diff = - (Types.functor_parameter list * Types.module_type) core_diff
      and signature_symptom = {
      1. env : Env.t;
      2. missings : Types.signature_item list;
      3. incompatibles : (Ident.t * sigitem_symptom) list;
      4. oks : (int * Typedtree.module_coercion) list;
      5. leftovers : (Types.signature_item as 'it * 'it * int) list;
        (*

        signature items that could not be compared due to type divergence

        *)
      }
      and sigitem_symptom =
      1. | Core of core_sigitem_symptom
      2. | Module_type_declaration of (Types.modtype_declaration, + (Types.functor_parameter list * Types.module_type) core_diff
      and signature_symptom = {
      1. env : Env.t;
      2. missings : Types.signature_item list;
      3. incompatibles : (Ident.t * sigitem_symptom) list;
      4. oks : (int * Typedtree.module_coercion) list;
      5. leftovers : ((Types.signature_item as 'it) * 'it * int) list;
        (*

        signature items that could not be compared due to type divergence

        *)
      }
      and sigitem_symptom =
      1. | Core of core_sigitem_symptom
      2. | Module_type_declaration of (Types.modtype_declaration, module_type_declaration_symptom) diff
      3. | Module_type of module_type_diff
      and module_type_declaration_symptom =
      1. | Illegal_permutation of Typedtree.module_coercion
      2. | Not_greater_than of module_type_diff
      3. | Not_less_than of module_type_diff
      4. | Incomparable of {
        1. less_than : module_type_diff;
        2. greater_than : module_type_diff;
        }
      type all =
      1. | In_Compilation_unit of (string, signature_symptom) diff
      2. | In_Signature of signature_symptom
      3. | In_Module_type of module_type_diff
      4. | In_Module_type_substitution of Ident.t - * (Types.module_type, module_type_declaration_symptom) diff
      5. | In_Type_declaration of Ident.t * core_sigitem_symptom
      6. | In_Expansion of core_module_type_symptom
      \ No newline at end of file + * (Types.module_type, module_type_declaration_symptom) diff
    2. | In_Type_declaration of Ident.t * core_sigitem_symptom
    3. | In_Expansion of core_module_type_symptom
    diff --git a/ocaml/Includemod/FieldMap/index.html b/ocaml/Includemod/FieldMap/index.html index de02800..894ba33 100644 --- a/ocaml/Includemod/FieldMap/index.html +++ b/ocaml/Includemod/FieldMap/index.html @@ -1,8 +1,8 @@ -FieldMap (ocaml.Includemod.FieldMap)

    Module Includemod.FieldMap

    Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

    Maps

    type key = field_desc

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +FieldMap (ocaml.Includemod.FieldMap)

    Module Includemod.FieldMap

    Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

    Maps

    type key = field_desc

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Includemod/Functor_app_diff/Defs/index.html b/ocaml/Includemod/Functor_app_diff/Defs/index.html index 3f782e7..7bda4e4 100644 --- a/ocaml/Includemod/Functor_app_diff/Defs/index.html +++ b/ocaml/Includemod/Functor_app_diff/Defs/index.html @@ -1,2 +1,2 @@ -Defs (ocaml.Includemod.Functor_app_diff.Defs)

    Module Functor_app_diff.Defs

    \ No newline at end of file +Defs (ocaml.Includemod.Functor_app_diff.Defs)

    Module Functor_app_diff.Defs

    diff --git a/ocaml/Includemod/Functor_app_diff/index.html b/ocaml/Includemod/Functor_app_diff/index.html index d7ac0e2..80fc0df 100644 --- a/ocaml/Includemod/Functor_app_diff/index.html +++ b/ocaml/Includemod/Functor_app_diff/index.html @@ -1,6 +1,6 @@ -Functor_app_diff (ocaml.Includemod.Functor_app_diff)

    Module Includemod.Functor_app_diff

    module Defs : sig ... end
    val diff : +Functor_app_diff (ocaml.Includemod.Functor_app_diff)

    Module Includemod.Functor_app_diff

    module Defs : sig ... end
    \ No newline at end of file + f:Types.module_type -> + args:(Error.functor_arg_descr * Types.module_type) list -> + Diffing.Define(Defs).patch
    diff --git a/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html b/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html index 95ed8ef..07ba02c 100644 --- a/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html +++ b/ocaml/Includemod/Functor_inclusion_diff/Defs/index.html @@ -1,2 +1,2 @@ -Defs (ocaml.Includemod.Functor_inclusion_diff.Defs)

    Module Functor_inclusion_diff.Defs

    \ No newline at end of file +Defs (ocaml.Includemod.Functor_inclusion_diff.Defs)

    Module Functor_inclusion_diff.Defs

    diff --git a/ocaml/Includemod/Functor_inclusion_diff/index.html b/ocaml/Includemod/Functor_inclusion_diff/index.html index fdfa5de..48c5748 100644 --- a/ocaml/Includemod/Functor_inclusion_diff/index.html +++ b/ocaml/Includemod/Functor_inclusion_diff/index.html @@ -1,6 +1,6 @@ -Functor_inclusion_diff (ocaml.Includemod.Functor_inclusion_diff)

    Module Includemod.Functor_inclusion_diff

    module Defs : sig ... end
    val diff : +Functor_inclusion_diff (ocaml.Includemod.Functor_inclusion_diff)

    Module Includemod.Functor_inclusion_diff

    \ No newline at end of file + Diffing.Define(Defs).patch
    diff --git a/ocaml/Includemod/index.html b/ocaml/Includemod/index.html index 2422aac..2975a95 100644 --- a/ocaml/Includemod/index.html +++ b/ocaml/Includemod/index.html @@ -1,54 +1,54 @@ -Includemod (ocaml.Includemod)

    Module Includemod

    type mark =
    1. | Mark_both
      (*

      Mark definitions used from both arguments

      *)
    2. | Mark_positive
      (*

      Mark definitions used from the positive (first) argument

      *)
    3. | Mark_negative
      (*

      Mark definitions used from the negative (second) argument

      *)
    4. | Mark_neither
      (*

      Do not mark definitions used from either argument

      *)

    Type describing which arguments of an inclusion to consider as used for the usage warnings. Mark_both is the default.

    module Error : sig ... end
    type explanation = Env.t * Error.all
    type field_kind =
    1. | Field_value
    2. | Field_type
    3. | Field_exception
    4. | Field_typext
    5. | Field_module
    6. | Field_modtype
    7. | Field_class
    8. | Field_classtype
    type field_desc = {
    1. name : string;
    2. kind : field_kind;
    }
    val kind_of_field_desc : field_desc -> string
    val field_desc : field_kind -> Ident.t -> field_desc
    module FieldMap : Map.S with type key = field_desc

    Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

    val item_ident_name : Types.signature_item -> Ident.t * Location.t * field_desc
    val is_runtime_component : Types.signature_item -> bool
    val modtypes : - loc:Location.t -> +Includemod (ocaml.Includemod)

    Module Includemod

    type mark =
    1. | Mark_both
      (*

      Mark definitions used from both arguments

      *)
    2. | Mark_positive
      (*

      Mark definitions used from the positive (first) argument

      *)
    3. | Mark_negative
      (*

      Mark definitions used from the negative (second) argument

      *)
    4. | Mark_neither
      (*

      Do not mark definitions used from either argument

      *)

    Type describing which arguments of an inclusion to consider as used for the usage warnings. Mark_both is the default.

    module Error : sig ... end
    type explanation = Env.t * Error.all
    type field_kind =
    1. | Field_value
    2. | Field_type
    3. | Field_exception
    4. | Field_typext
    5. | Field_module
    6. | Field_modtype
    7. | Field_class
    8. | Field_classtype
    type field_desc = {
    1. name : string;
    2. kind : field_kind;
    }
    val kind_of_field_desc : field_desc -> string
    val field_desc : field_kind -> Ident.t -> field_desc
    module FieldMap : Map.S with type key = field_desc

    Map indexed by both field types and names. This avoids name clashes between different sorts of fields such as values and types.

    val item_ident_name : Types.signature_item -> Ident.t * Location.t * field_desc
    val is_runtime_component : Types.signature_item -> bool
    val modtypes : + loc:Location.t -> Env.t -> - mark:mark -> + mark:mark -> Types.module_type -> Types.module_type -> Typedtree.module_coercion
    val modtypes_with_shape : - shape:Shape.t -> - loc:Location.t -> + shape:Shape.t -> + loc:Location.t -> Env.t -> - mark:mark -> + mark:mark -> Types.module_type -> Types.module_type -> Typedtree.module_coercion * Shape.t
    val strengthened_module_decl : - loc:Location.t -> - aliasable:bool -> + loc:Location.t -> + aliasable:bool -> Env.t -> - mark:mark -> + mark:mark -> Types.module_declaration -> Path.t -> Types.module_declaration -> Typedtree.module_coercion
    val check_modtype_inclusion : - loc:Location.t -> + loc:Location.t -> Env.t -> Types.module_type -> Path.t -> Types.module_type -> explanation option

    check_modtype_inclusion ~loc env mty1 path1 mty2 checks that the functor application F(M) is well typed, where mty2 is the type of the argument of F and path1/mty1 is the path/unstrenghened type of M.

    val check_modtype_equiv : - loc:Location.t -> + loc:Location.t -> Env.t -> Ident.t -> Types.module_type -> Types.module_type -> unit
    val signatures : Env.t -> - mark:mark -> + mark:mark -> Types.signature -> Types.signature -> Typedtree.module_coercion
    val compunit : Env.t -> - mark:mark -> + mark:mark -> string -> Types.signature -> string -> Types.signature -> Shape.t -> Typedtree.module_coercion * Shape.t
    val type_declarations : - loc:Location.t -> + loc:Location.t -> Env.t -> - mark:mark -> + mark:mark -> Ident.t -> Types.type_declaration -> Types.type_declaration -> @@ -73,7 +73,7 @@ * Types.class_declaration * Types.class_declaration * Ctype.class_match_failure list
  • | Unbound_module_path of Path.t
  • | Invalid_module_alias of Path.t
  • type pos =
    1. | Module of Ident.t
    2. | Modtype of Ident.t
    3. | Arg of Types.functor_parameter
    4. | Body of Types.functor_parameter
    exception Error of explanation
    exception Apply_error of {
    1. loc : Location.t;
    2. env : Env.t;
    3. lid_app : Longident.t option;
    4. mty_f : Types.module_type;
    5. args : (Error.functor_arg_descr * Types.module_type) list;
    }
    val expand_module_alias : - strengthen:bool -> + strengthen:bool -> Env.t -> Path.t -> - Types.module_type
    module Functor_inclusion_diff : sig ... end
    module Functor_app_diff : sig ... end
    \ No newline at end of file + Types.module_type
    module Functor_inclusion_diff : sig ... end
    module Functor_app_diff : sig ... end
    diff --git a/ocaml/Includemod_errorprinter/index.html b/ocaml/Includemod_errorprinter/index.html index e0ef7a7..414637c 100644 --- a/ocaml/Includemod_errorprinter/index.html +++ b/ocaml/Includemod_errorprinter/index.html @@ -1,2 +1,2 @@ -Includemod_errorprinter (ocaml.Includemod_errorprinter)

    Module Includemod_errorprinter

    val register : unit -> unit
    \ No newline at end of file +Includemod_errorprinter (ocaml.Includemod_errorprinter)

    Module Includemod_errorprinter

    val register : unit -> unit
    diff --git a/ocaml/Inconstant_idents/index.html b/ocaml/Inconstant_idents/index.html index 3d4db43..aede1a8 100644 --- a/ocaml/Inconstant_idents/index.html +++ b/ocaml/Inconstant_idents/index.html @@ -1,6 +1,6 @@ -Inconstant_idents (ocaml.Inconstant_idents)

    Module Inconstant_idents

    type result
    val inconstants_on_program : - compilation_unit:Compilation_unit.t -> - backend:(module Backend_intf.S) -> +Inconstant_idents (ocaml.Inconstant_idents)

    Module Inconstant_idents

    type result
    val inconstants_on_program : + compilation_unit:Compilation_unit.t -> + backend:(module Backend_intf.S) -> Flambda.program -> - result

    inconstants_on_program finds those variables and set-of-closures identifiers that cannot be compiled to constants by Flambda_to_clambda.

    val variable : Variable.t -> result -> bool

    variable var res returns true if var is marked as inconstant in res.

    val closure : Set_of_closures_id.t -> result -> bool

    closure cl res returns true if cl is marked as inconstant in res.

    \ No newline at end of file + result

    inconstants_on_program finds those variables and set-of-closures identifiers that cannot be compiled to constants by Flambda_to_clambda.

    val variable : Variable.t -> result -> bool

    variable var res returns true if var is marked as inconstant in res.

    val closure : Set_of_closures_id.t -> result -> bool

    closure cl res returns true if cl is marked as inconstant in res.

    diff --git a/ocaml/Initialize_symbol_to_let_symbol/index.html b/ocaml/Initialize_symbol_to_let_symbol/index.html index d4b21c6..e2d1018 100644 --- a/ocaml/Initialize_symbol_to_let_symbol/index.html +++ b/ocaml/Initialize_symbol_to_let_symbol/index.html @@ -1,4 +1,4 @@ -Initialize_symbol_to_let_symbol (ocaml.Initialize_symbol_to_let_symbol)

    Module Initialize_symbol_to_let_symbol

    val constant_field : +Initialize_symbol_to_let_symbol (ocaml.Initialize_symbol_to_let_symbol)

    Module Initialize_symbol_to_let_symbol

    Transform Initialize_symbol with only constant fields to let_symbol construction.

    \ No newline at end of file + Flambda.constant_defining_value_block_field option

    Transform Initialize_symbol with only constant fields to let_symbol construction.

    diff --git a/ocaml/Inline_and_simplify/index.html b/ocaml/Inline_and_simplify/index.html index ebd9708..eaa1169 100644 --- a/ocaml/Inline_and_simplify/index.html +++ b/ocaml/Inline_and_simplify/index.html @@ -1,14 +1,14 @@ -Inline_and_simplify (ocaml.Inline_and_simplify)

    Module Inline_and_simplify

    val run : - never_inline:bool -> - backend:(module Backend_intf.S) -> - prefixname:string -> - round:int -> - ppf_dump:Stdlib.Format.formatter -> +Inline_and_simplify (ocaml.Inline_and_simplify)

    Module Inline_and_simplify

    val run : + never_inline:bool -> + backend:(module Backend_intf.S) -> + prefixname:string -> + round:int -> + ppf_dump:Stdlib.Format.formatter -> Flambda.program -> Flambda.program

    Simplification of Flambda programs combined with function inlining: for the most part a beta-reduction pass.

    Readers interested in the inlining strategy should read the Inlining_decision module first.

    val duplicate_function : - env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - fun_var:Variable.t -> - new_fun_var:Variable.t -> - Flambda.function_declaration * Flambda.specialised_to Variable.Map.t
    \ No newline at end of file + env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> + Flambda.function_declaration * Flambda.specialised_to Variable.Map.t
    diff --git a/ocaml/Inline_and_simplify_aux/Env/index.html b/ocaml/Inline_and_simplify_aux/Env/index.html index 99e8c3e..697a020 100644 --- a/ocaml/Inline_and_simplify_aux/Env/index.html +++ b/ocaml/Inline_and_simplify_aux/Env/index.html @@ -1,17 +1,17 @@ -Env (ocaml.Inline_and_simplify_aux.Env)

    Module Inline_and_simplify_aux.Env

    type t

    Environments follow the lexical scopes of the program.

    val create : - never_inline:bool -> - backend:(module Backend_intf.S) -> - round:int -> - ppf_dump:Stdlib.Format.formatter -> - t

    Create a new environment. If never_inline is true then the returned environment will prevent Inline_and_simplify from inlining. The backend parameter is used for passing information about the compiler backend being used. Newly-created environments have inactive Freshenings (see below) and do not initially hold any approximation information.

    val backend : t -> (module Backend_intf.S)

    Obtain the first-class module that gives information about the compiler backend being used for compilation.

    val really_import_approx : t -> Simple_value_approx.t -> Simple_value_approx.t

    Obtain the really_import_approx function from the backend module.

    val round : t -> int

    Which simplification round we are currently in.

    val ppf_dump : t -> Stdlib.Format.formatter

    Where to print intermediate asts and similar debug information

    val add : t -> Variable.t -> Simple_value_approx.t -> t

    Add the approximation of a variable---that is to say, some knowledge about the value(s) the variable may take on at runtime---to the environment.

    val add_outer_scope : t -> Variable.t -> Simple_value_approx.t -> t
    val add_mutable : t -> Mutable_variable.t -> Simple_value_approx.t -> t

    Like add, but for mutable variables.

    val find_exn : t -> Variable.t -> Simple_value_approx.t

    Find the approximation of a given variable, raising a fatal error if the environment does not know about the variable. Use find_opt instead if you need to catch the failure case.

    val find_mutable_exn : t -> Mutable_variable.t -> Simple_value_approx.t

    Like find_exn, but for mutable variables.

    type scope =
    1. | Current
    2. | Outer
    val find_with_scope_exn : t -> Variable.t -> scope * Simple_value_approx.t
    val find_opt : t -> Variable.t -> Simple_value_approx.t option

    Like find_exn, but intended for use where the "not present in environment" case is to be handled by the caller.

    val find_list_exn : t -> Variable.t list -> Simple_value_approx.t list

    Like find_exn, but for a list of variables.

    val does_not_bind : t -> Variable.t list -> bool
    val does_not_freshen : t -> Variable.t list -> bool
    val add_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
    val redefine_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
    val find_symbol_exn : t -> Symbol.t -> Simple_value_approx.t
    val find_symbol_opt : t -> Symbol.t -> Simple_value_approx.t option
    val find_symbol_fatal : t -> Symbol.t -> Simple_value_approx.t
    val find_or_load_symbol : t -> Symbol.t -> Simple_value_approx.t
    val add_projection : t -> projection:Projection.t -> bound_to:Variable.t -> t

    Note that the given bound_to holds the given projection.

    val find_projection : t -> projection:Projection.t -> Variable.t option

    Determine if the environment knows about a variable that is bound to the given projection.

    val mem : t -> Variable.t -> bool

    Whether the environment has an approximation for the given variable.

    val freshening : t -> Freshening.t

    Return the freshening that should be applied to variables when rewriting code (in Inline_and_simplify, etc.) using the given environment.

    val set_freshening : t -> Freshening.t -> t

    Set the freshening that should be used as per freshening, above.

    val activate_freshening : t -> t

    Causes every bound variable in code rewritten during inlining and simplification, using the given environment, to be freshened. This is used when descending into subexpressions substituted into existing expressions.

    val local : t -> t

    Erase all variable approximation information and freshening information from the given environment. However, the freshening activation state is preserved. This function is used when rewriting inside a function declaration, to avoid (due to a compiler bug) accidental use of variables from outer scopes that are not accessible.

    val inside_set_of_closures_declaration : Set_of_closures_origin.t -> t -> bool

    Determine whether the inliner is currently inside a function body from the given set of closures. This is used to detect whether a given function call refers to a function which exists somewhere on the current inlining stack.

    val at_toplevel : t -> bool

    Not inside a closure declaration. Toplevel code is the one evaluated when the compilation unit is loaded

    val is_inside_branch : t -> bool
    val branch_depth : t -> int
    val inside_branch : t -> t
    val increase_closure_depth : t -> t
    val set_never_inline : t -> t

    Mark that call sites contained within code rewritten using the given environment should never be replaced by inlined (or unrolled) versions of the callee(s).

    val set_never_inline_inside_closures : t -> t

    Equivalent to set_never_inline but only applies to code inside a set of closures.

    val unset_never_inline_inside_closures : t -> t

    Unset the restriction from set_never_inline_inside_closures

    val set_never_inline_outside_closures : t -> t

    Equivalent to set_never_inline but does not apply to code inside a set of closures.

    val unset_never_inline_outside_closures : t -> t

    Unset the restriction from set_never_inline_outside_closures

    val never_inline : t -> bool

    Return whether set_never_inline is currently in effect on the given environment.

    val inlining_level : t -> int
    val inlining_level_up : t -> t

    Mark that this environment is used to rewrite code for inlining. This is used by the inlining heuristics to decide whether to continue. Unconditionally inlined does not take this into account.

    val actively_unrolling : t -> Set_of_closures_origin.t -> int option

    Whether we are actively unrolling a given function.

    val start_actively_unrolling : t -> Set_of_closures_origin.t -> int -> t

    Start actively unrolling a given function n times.

    val continue_actively_unrolling : t -> Set_of_closures_origin.t -> t

    Unroll a function currently actively being unrolled.

    val unrolling_allowed : t -> Set_of_closures_origin.t -> bool

    Whether it is permissible to unroll a call to a recursive function in the given environment.

    val inside_unrolled_function : t -> Set_of_closures_origin.t -> t

    Whether the given environment is currently being used to rewrite the body of an unrolled recursive function.

    val inlining_allowed : t -> Closure_origin.t -> bool

    Whether it is permissible to inline a call to a function in the given environment.

    val inside_inlined_function : t -> Closure_origin.t -> t

    Whether the given environment is currently being used to rewrite the body of an inlined function.

    val note_entering_closure : +Env (ocaml.Inline_and_simplify_aux.Env)

    Module Inline_and_simplify_aux.Env

    type t

    Environments follow the lexical scopes of the program.

    val create : + never_inline:bool -> + backend:(module Backend_intf.S) -> + round:int -> + ppf_dump:Stdlib.Format.formatter -> + t

    Create a new environment. If never_inline is true then the returned environment will prevent Inline_and_simplify from inlining. The backend parameter is used for passing information about the compiler backend being used. Newly-created environments have inactive Freshenings (see below) and do not initially hold any approximation information.

    val backend : t -> (module Backend_intf.S)

    Obtain the first-class module that gives information about the compiler backend being used for compilation.

    val really_import_approx : t -> Simple_value_approx.t -> Simple_value_approx.t

    Obtain the really_import_approx function from the backend module.

    val round : t -> int

    Which simplification round we are currently in.

    val ppf_dump : t -> Stdlib.Format.formatter

    Where to print intermediate asts and similar debug information

    val add : t -> Variable.t -> Simple_value_approx.t -> t

    Add the approximation of a variable---that is to say, some knowledge about the value(s) the variable may take on at runtime---to the environment.

    val add_outer_scope : t -> Variable.t -> Simple_value_approx.t -> t
    val add_mutable : t -> Mutable_variable.t -> Simple_value_approx.t -> t

    Like add, but for mutable variables.

    val find_exn : t -> Variable.t -> Simple_value_approx.t

    Find the approximation of a given variable, raising a fatal error if the environment does not know about the variable. Use find_opt instead if you need to catch the failure case.

    val find_mutable_exn : t -> Mutable_variable.t -> Simple_value_approx.t

    Like find_exn, but for mutable variables.

    type scope =
    1. | Current
    2. | Outer
    val find_with_scope_exn : t -> Variable.t -> scope * Simple_value_approx.t
    val find_opt : t -> Variable.t -> Simple_value_approx.t option

    Like find_exn, but intended for use where the "not present in environment" case is to be handled by the caller.

    val find_list_exn : t -> Variable.t list -> Simple_value_approx.t list

    Like find_exn, but for a list of variables.

    val does_not_bind : t -> Variable.t list -> bool
    val does_not_freshen : t -> Variable.t list -> bool
    val add_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
    val redefine_symbol : t -> Symbol.t -> Simple_value_approx.t -> t
    val find_symbol_exn : t -> Symbol.t -> Simple_value_approx.t
    val find_symbol_opt : t -> Symbol.t -> Simple_value_approx.t option
    val find_symbol_fatal : t -> Symbol.t -> Simple_value_approx.t
    val find_or_load_symbol : t -> Symbol.t -> Simple_value_approx.t
    val add_projection : t -> projection:Projection.t -> bound_to:Variable.t -> t

    Note that the given bound_to holds the given projection.

    val find_projection : t -> projection:Projection.t -> Variable.t option

    Determine if the environment knows about a variable that is bound to the given projection.

    val mem : t -> Variable.t -> bool

    Whether the environment has an approximation for the given variable.

    val freshening : t -> Freshening.t

    Return the freshening that should be applied to variables when rewriting code (in Inline_and_simplify, etc.) using the given environment.

    val set_freshening : t -> Freshening.t -> t

    Set the freshening that should be used as per freshening, above.

    val activate_freshening : t -> t

    Causes every bound variable in code rewritten during inlining and simplification, using the given environment, to be freshened. This is used when descending into subexpressions substituted into existing expressions.

    val local : t -> t

    Erase all variable approximation information and freshening information from the given environment. However, the freshening activation state is preserved. This function is used when rewriting inside a function declaration, to avoid (due to a compiler bug) accidental use of variables from outer scopes that are not accessible.

    val inside_set_of_closures_declaration : Set_of_closures_origin.t -> t -> bool

    Determine whether the inliner is currently inside a function body from the given set of closures. This is used to detect whether a given function call refers to a function which exists somewhere on the current inlining stack.

    val at_toplevel : t -> bool

    Not inside a closure declaration. Toplevel code is the one evaluated when the compilation unit is loaded

    val is_inside_branch : t -> bool
    val branch_depth : t -> int
    val inside_branch : t -> t
    val increase_closure_depth : t -> t
    val set_never_inline : t -> t

    Mark that call sites contained within code rewritten using the given environment should never be replaced by inlined (or unrolled) versions of the callee(s).

    val set_never_inline_inside_closures : t -> t

    Equivalent to set_never_inline but only applies to code inside a set of closures.

    val unset_never_inline_inside_closures : t -> t

    Unset the restriction from set_never_inline_inside_closures

    val set_never_inline_outside_closures : t -> t

    Equivalent to set_never_inline but does not apply to code inside a set of closures.

    val unset_never_inline_outside_closures : t -> t

    Unset the restriction from set_never_inline_outside_closures

    val never_inline : t -> bool

    Return whether set_never_inline is currently in effect on the given environment.

    val inlining_level : t -> int
    val inlining_level_up : t -> t

    Mark that this environment is used to rewrite code for inlining. This is used by the inlining heuristics to decide whether to continue. Unconditionally inlined does not take this into account.

    val actively_unrolling : t -> Set_of_closures_origin.t -> int option

    Whether we are actively unrolling a given function.

    val start_actively_unrolling : t -> Set_of_closures_origin.t -> int -> t

    Start actively unrolling a given function n times.

    val continue_actively_unrolling : t -> Set_of_closures_origin.t -> t

    Unroll a function currently actively being unrolled.

    val unrolling_allowed : t -> Set_of_closures_origin.t -> bool

    Whether it is permissible to unroll a call to a recursive function in the given environment.

    val inside_unrolled_function : t -> Set_of_closures_origin.t -> t

    Whether the given environment is currently being used to rewrite the body of an unrolled recursive function.

    val inlining_allowed : t -> Closure_origin.t -> bool

    Whether it is permissible to inline a call to a function in the given environment.

    val inside_inlined_function : t -> Closure_origin.t -> t

    Whether the given environment is currently being used to rewrite the body of an inlined function.

    val note_entering_closure : t -> - closure_id:Closure_id.t -> - dbg:Debuginfo.t -> - t

    If collecting inlining statistics, record that the inliner is about to descend into closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

    val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t

    If collecting inlining statistics, record that the inliner is about to descend into a call to closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

    val note_entering_inlined : t -> t

    If collecting inlining statistics, record that the inliner is about to descend into an inlined function call. This requires that the inliner has already entered the call with note_entering_call.

    val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t

    If collecting inlining statistics, record that the inliner is about to descend into a specialised function definition. This requires that the inliner has already entered the call with note_entering_call.

    val enter_closure : + closure_id:Closure_id.t -> + dbg:Debuginfo.t -> + t

    If collecting inlining statistics, record that the inliner is about to descend into closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

    val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t

    If collecting inlining statistics, record that the inliner is about to descend into a call to closure_id. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.

    val note_entering_inlined : t -> t

    If collecting inlining statistics, record that the inliner is about to descend into an inlined function call. This requires that the inliner has already entered the call with note_entering_call.

    val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t

    If collecting inlining statistics, record that the inliner is about to descend into a specialised function definition. This requires that the inliner has already entered the call with note_entering_call.

    val enter_closure : t -> - closure_id:Closure_id.t -> - inline_inside:bool -> - dbg:Debuginfo.t -> - f:(t -> 'a) -> - 'a

    Update a given environment to record that the inliner is about to descend into closure_id and pass the resulting environment to f. If inline_inside is false then the environment passed to f will be marked as never_inline (see above).

    val record_decision : t -> Inlining_stats_types.Decision.t -> unit

    If collecting inlining statistics, record an inlining decision for the call at the top of the closure stack stored inside the given environment.

    val print : Stdlib.Format.formatter -> t -> unit

    Print a human-readable version of the given environment.

    val set_inline_debuginfo : t -> dbg:Debuginfo.t -> t

    The environment stores the call-site being inlined to produce precise location information. This function sets the current call-site being inlined.

    val add_inlined_debuginfo : t -> dbg:Debuginfo.t -> Debuginfo.t

    Appends the locations of inlined call-sites to the ~dbg argument

    \ No newline at end of file + closure_id:Closure_id.t -> + inline_inside:bool -> + dbg:Debuginfo.t -> + f:(t -> 'a) -> + 'a

    Update a given environment to record that the inliner is about to descend into closure_id and pass the resulting environment to f. If inline_inside is false then the environment passed to f will be marked as never_inline (see above).

    val record_decision : t -> Inlining_stats_types.Decision.t -> unit

    If collecting inlining statistics, record an inlining decision for the call at the top of the closure stack stored inside the given environment.

    val print : Stdlib.Format.formatter -> t -> unit

    Print a human-readable version of the given environment.

    val set_inline_debuginfo : t -> dbg:Debuginfo.t -> t

    The environment stores the call-site being inlined to produce precise location information. This function sets the current call-site being inlined.

    val add_inlined_debuginfo : t -> dbg:Debuginfo.t -> Debuginfo.t

    Appends the locations of inlined call-sites to the ~dbg argument

    diff --git a/ocaml/Inline_and_simplify_aux/Result/index.html b/ocaml/Inline_and_simplify_aux/Result/index.html index 98f43de..2916101 100644 --- a/ocaml/Inline_and_simplify_aux/Result/index.html +++ b/ocaml/Inline_and_simplify_aux/Result/index.html @@ -1,5 +1,5 @@ -Result (ocaml.Inline_and_simplify_aux.Result)

    Module Inline_and_simplify_aux.Result

    type t

    Result structures approximately follow the evaluation order of the program. They are returned by the simplification algorithm acting on an Flambda subexpression.

    val create : unit -> t
    val approx : t -> Simple_value_approx.t

    The approximation of the subexpression that has just been simplified.

    val set_approx : t -> Simple_value_approx.t -> t

    Set the approximation of the subexpression that has just been simplified. Typically used just before returning from a case of the simplification algorithm.

    val meet_approx : t -> Env.t -> Simple_value_approx.t -> t

    Set the approximation of the subexpression to the meet of the current return approximation and the provided one. Typically used just before returning from a branch case of the simplification algorithm.

    val used_static_exceptions : t -> Static_exception.Set.t

    All static exceptions for which use_staticfail has been called on the given result structure.

    val use_static_exception : t -> Static_exception.t -> t

    Mark that the given static exception has been used.

    val exit_scope_catch : t -> Static_exception.t -> t

    Mark that we are moving up out of the scope of a static-catch block that catches the given static exception identifier. This has the effect of removing the identifier from the used_staticfail set.

    val benefit : t -> Inlining_cost.Benefit.t

    The benefit to be gained by inlining the subexpression whose simplification yielded the given result structure.

    val map_benefit : +Result (ocaml.Inline_and_simplify_aux.Result)

    Module Inline_and_simplify_aux.Result

    type t

    Result structures approximately follow the evaluation order of the program. They are returned by the simplification algorithm acting on an Flambda subexpression.

    val create : unit -> t
    val approx : t -> Simple_value_approx.t

    The approximation of the subexpression that has just been simplified.

    val set_approx : t -> Simple_value_approx.t -> t

    Set the approximation of the subexpression that has just been simplified. Typically used just before returning from a case of the simplification algorithm.

    val meet_approx : t -> Env.t -> Simple_value_approx.t -> t

    Set the approximation of the subexpression to the meet of the current return approximation and the provided one. Typically used just before returning from a branch case of the simplification algorithm.

    val used_static_exceptions : t -> Static_exception.Set.t

    All static exceptions for which use_staticfail has been called on the given result structure.

    val use_static_exception : t -> Static_exception.t -> t

    Mark that the given static exception has been used.

    val exit_scope_catch : t -> Static_exception.t -> t

    Mark that we are moving up out of the scope of a static-catch block that catches the given static exception identifier. This has the effect of removing the identifier from the used_staticfail set.

    val benefit : t -> Inlining_cost.Benefit.t

    The benefit to be gained by inlining the subexpression whose simplification yielded the given result structure.

    val map_benefit : t -> (Inlining_cost.Benefit.t -> Inlining_cost.Benefit.t) -> - t

    Apply a transformation to the inlining benefit stored within the given result structure.

    val add_benefit : t -> Inlining_cost.Benefit.t -> t

    Add some benefit to the inlining benefit stored within the given result structure.

    val reset_benefit : t -> t

    Set the benefit of inlining the subexpression corresponding to the given result structure to zero.

    val set_inlining_threshold : t -> Inlining_cost.Threshold.t option -> t
    val add_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
    val sub_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
    val inlining_threshold : t -> Inlining_cost.Threshold.t option
    val seen_direct_application : t -> t
    val num_direct_applications : t -> int
    \ No newline at end of file + t

    Apply a transformation to the inlining benefit stored within the given result structure.

    val add_benefit : t -> Inlining_cost.Benefit.t -> t

    Add some benefit to the inlining benefit stored within the given result structure.

    val reset_benefit : t -> t

    Set the benefit of inlining the subexpression corresponding to the given result structure to zero.

    val set_inlining_threshold : t -> Inlining_cost.Threshold.t option -> t
    val add_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
    val sub_inlining_threshold : t -> Inlining_cost.Threshold.t -> t
    val inlining_threshold : t -> Inlining_cost.Threshold.t option
    val seen_direct_application : t -> t
    val num_direct_applications : t -> int
    diff --git a/ocaml/Inline_and_simplify_aux/index.html b/ocaml/Inline_and_simplify_aux/index.html index 8efa17b..bcbd9c6 100644 --- a/ocaml/Inline_and_simplify_aux/index.html +++ b/ocaml/Inline_and_simplify_aux/index.html @@ -1,26 +1,26 @@ -Inline_and_simplify_aux (ocaml.Inline_and_simplify_aux)

    Module Inline_and_simplify_aux

    Environments and result structures used during inlining and simplification. (See inline_and_simplify.ml.)

    module Env : sig ... end
    module Result : sig ... end
    val initial_inlining_threshold : round:int -> Inlining_cost.Threshold.t

    Command line argument -inline

    val initial_inlining_toplevel_threshold : - round:int -> +Inline_and_simplify_aux (ocaml.Inline_and_simplify_aux)

    Module Inline_and_simplify_aux

    Environments and result structures used during inlining and simplification. (See inline_and_simplify.ml.)

    module Env : sig ... end
    module Result : sig ... end
    val initial_inlining_threshold : round:int -> Inlining_cost.Threshold.t

    Command line argument -inline

    val initial_inlining_toplevel_threshold : + round:int -> Inlining_cost.Threshold.t

    Command line argument -inline-toplevel

    val prepare_to_simplify_set_of_closures : - env:Env.t -> - set_of_closures:Flambda.set_of_closures -> - function_decls:Flambda.function_declarations -> - freshen:bool -> - only_for_function_decl:Flambda.function_declaration option -> + env:Env.t -> + set_of_closures:Flambda.set_of_closures -> + function_decls:Flambda.function_declarations -> + freshen:bool -> + only_for_function_decl:Flambda.function_declaration option -> (Flambda.specialised_to * Simple_value_approx.t) Variable.Map.t * Flambda.specialised_to Variable.Map.t * Flambda.function_declarations * Simple_value_approx.t Variable.Map.t * Simple_value_approx.value_set_of_closures * Env.t
    val prepare_to_simplify_closure : - function_decl:Flambda.function_declaration -> - free_vars:(Flambda.specialised_to * Simple_value_approx.t) Variable.Map.t -> - specialised_args:Flambda.specialised_to Variable.Map.t -> - parameter_approximations:Simple_value_approx.t Variable.Map.t -> - set_of_closures_env:Env.t -> + function_decl:Flambda.function_declaration -> + free_vars:(Flambda.specialised_to * Simple_value_approx.t) Variable.Map.t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + parameter_approximations:Simple_value_approx.t Variable.Map.t -> + set_of_closures_env:Env.t -> Env.t
    val keep_body_check : - is_classic_mode:bool -> - recursive:Variable.Set.t Stdlib.Lazy.t -> + is_classic_mode:bool -> + recursive:Variable.Set.t Stdlib.Lazy.t -> Variable.t -> Flambda.function_declaration -> - bool
    \ No newline at end of file + bool
    diff --git a/ocaml/Inlining_cost/Benefit/index.html b/ocaml/Inlining_cost/Benefit/index.html index 3178c05..d244e9a 100644 --- a/ocaml/Inlining_cost/Benefit/index.html +++ b/ocaml/Inlining_cost/Benefit/index.html @@ -1,2 +1,2 @@ -Benefit (ocaml.Inlining_cost.Benefit)

    Module Inlining_cost.Benefit

    type t
    val zero : t
    val (+) : t -> t -> t
    val max : round:int -> t -> t -> t
    val remove_call : t -> t
    val remove_alloc : t -> t
    val remove_prim : t -> t
    val remove_prims : t -> int -> t
    val remove_branch : t -> t
    val direct_call_of_indirect : t -> t
    val requested_inline : t -> size_of:Flambda.t -> t
    val remove_code : Flambda.t -> t -> t
    val remove_code_named : Flambda.named -> t -> t
    val remove_projection : Projection.t -> t -> t
    val add_code : Flambda.t -> t -> t
    val add_code_named : Flambda.named -> t -> t
    val add_projection : Projection.t -> t -> t
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Benefit (ocaml.Inlining_cost.Benefit)

    Module Inlining_cost.Benefit

    type t
    val zero : t
    val (+) : t -> t -> t
    val max : round:int -> t -> t -> t
    val remove_call : t -> t
    val remove_alloc : t -> t
    val remove_prim : t -> t
    val remove_prims : t -> int -> t
    val remove_branch : t -> t
    val direct_call_of_indirect : t -> t
    val requested_inline : t -> size_of:Flambda.t -> t
    val remove_code : Flambda.t -> t -> t
    val remove_code_named : Flambda.named -> t -> t
    val remove_projection : Projection.t -> t -> t
    val add_code : Flambda.t -> t -> t
    val add_code_named : Flambda.named -> t -> t
    val add_projection : Projection.t -> t -> t
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Inlining_cost/Threshold/index.html b/ocaml/Inlining_cost/Threshold/index.html index c8befff..a52c885 100644 --- a/ocaml/Inlining_cost/Threshold/index.html +++ b/ocaml/Inlining_cost/Threshold/index.html @@ -1,2 +1,2 @@ -Threshold (ocaml.Inlining_cost.Threshold)

    Module Inlining_cost.Threshold

    type t =
    1. | Never_inline
    2. | Can_inline_if_no_larger_than of int

    The maximum size, in some abstract measure of space cost, that an Flambda expression may be in order to be inlined.

    val add : t -> t -> t
    val sub : t -> t -> t
    val min : t -> t -> t
    val equal : t -> t -> bool
    \ No newline at end of file +Threshold (ocaml.Inlining_cost.Threshold)

    Module Inlining_cost.Threshold

    type t =
    1. | Never_inline
    2. | Can_inline_if_no_larger_than of int

    The maximum size, in some abstract measure of space cost, that an Flambda expression may be in order to be inlined.

    val add : t -> t -> t
    val sub : t -> t -> t
    val min : t -> t -> t
    val equal : t -> t -> bool
    diff --git a/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html b/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html index ff6231a..bd21aab 100644 --- a/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html +++ b/ocaml/Inlining_cost/Whether_sufficient_benefit/index.html @@ -1,22 +1,22 @@ -Whether_sufficient_benefit (ocaml.Inlining_cost.Whether_sufficient_benefit)

    Module Inlining_cost.Whether_sufficient_benefit

    type t
    val create : - original:Flambda.t -> - toplevel:bool -> - branch_depth:int -> +Whether_sufficient_benefit (ocaml.Inlining_cost.Whether_sufficient_benefit)

    Module Inlining_cost.Whether_sufficient_benefit

    type t
    val create : + original:Flambda.t -> + toplevel:bool -> + branch_depth:int -> Flambda.t -> - benefit:Benefit.t -> - lifting:bool -> - round:int -> + benefit:Benefit.t -> + lifting:bool -> + round:int -> t
    val create_estimate : - original_size:int -> - toplevel:bool -> - branch_depth:int -> - new_size:int -> - benefit:Benefit.t -> - lifting:bool -> - round:int -> + original_size:int -> + toplevel:bool -> + branch_depth:int -> + new_size:int -> + benefit:Benefit.t -> + lifting:bool -> + round:int -> t
    val evaluate : t -> bool
    val to_string : t -> string
    val print_description : - subfunctions:bool -> + subfunctions:bool -> Stdlib.Format.formatter -> t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Inlining_cost/index.html b/ocaml/Inlining_cost/index.html index 166ffcc..4809935 100644 --- a/ocaml/Inlining_cost/index.html +++ b/ocaml/Inlining_cost/index.html @@ -1,7 +1,7 @@ -Inlining_cost (ocaml.Inlining_cost)

    Module Inlining_cost

    Measurement of the cost (including cost in space) of Flambda terms in the context of inlining.

    module Threshold : sig ... end
    val can_inline : Flambda.t -> Threshold.t -> bonus:int -> bool
    val can_try_inlining : +Inlining_cost (ocaml.Inlining_cost)

    Module Inlining_cost

    Measurement of the cost (including cost in space) of Flambda terms in the context of inlining.

    module Threshold : sig ... end
    val can_inline : Flambda.t -> Threshold.t -> bonus:int -> bool
    val can_try_inlining : Flambda.t -> Threshold.t -> - number_of_arguments:int -> - size_from_approximation:int option -> - Threshold.t
    module Benefit : sig ... end
    module Whether_sufficient_benefit : sig ... end
    val scale_inline_threshold_by : int
    val default_toplevel_multiplier : int
    val direct_call_size : int
    val maximum_interesting_size_of_function_body : int -> int

    If a function body exceeds this size, we can make a fast decision not to inline it (see Inlining_decision).

    val lambda_smaller' : Flambda.expr -> than:int -> int option

    Measure the given expression to determine whether its size is at or below the given threshold. None is returned if it is too big; otherwise Some is returned with the measured size.

    val lambda_size : Flambda.expr -> int
    \ No newline at end of file + number_of_arguments:int -> + size_from_approximation:int option -> + Threshold.t
    module Benefit : sig ... end
    module Whether_sufficient_benefit : sig ... end
    val scale_inline_threshold_by : int
    val default_toplevel_multiplier : int
    val direct_call_size : int
    val maximum_interesting_size_of_function_body : int -> int

    If a function body exceeds this size, we can make a fast decision not to inline it (see Inlining_decision).

    val lambda_smaller' : Flambda.expr -> than:int -> int option

    Measure the given expression to determine whether its size is at or below the given threshold. None is returned if it is too big; otherwise Some is returned with the measured size.

    val lambda_size : Flambda.expr -> int
    diff --git a/ocaml/Inlining_decision/index.html b/ocaml/Inlining_decision/index.html index 617ac53..47b9364 100644 --- a/ocaml/Inlining_decision/index.html +++ b/ocaml/Inlining_decision/index.html @@ -1,16 +1,16 @@ -Inlining_decision (ocaml.Inlining_decision)

    Module Inlining_decision

    See the Flambda manual chapter for an explanation in prose of the inlining decision procedure.

    val for_call_site : - env:Inline_and_simplify_aux.Env.t -> - r:Inline_and_simplify_aux.Result.t -> - function_decls:Simple_value_approx.function_declarations -> - lhs_of_application:Variable.t -> - closure_id_being_applied:Closure_id.t -> - function_decl:Simple_value_approx.function_declaration -> - value_set_of_closures:Simple_value_approx.value_set_of_closures -> - args:Variable.t list -> - args_approxs:Simple_value_approx.t list -> - dbg:Debuginfo.t -> - simplify:Inlining_decision_intf.simplify -> - inline_requested:Lambda.inline_attribute -> - specialise_requested:Lambda.specialise_attribute -> - Flambda.t * Inline_and_simplify_aux.Result.t

    Try to inline a full application of a known function, guided by various heuristics.

    val should_inline_inside_declaration : Flambda.function_declaration -> bool

    When a function declaration is encountered by for_call_site, the body may be subject to inlining immediately, thus changing the declaration. This function must return true for that to be able to happen.

    \ No newline at end of file +Inlining_decision (ocaml.Inlining_decision)

    Module Inlining_decision

    See the Flambda manual chapter for an explanation in prose of the inlining decision procedure.

    val for_call_site : + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + function_decls:Simple_value_approx.function_declarations -> + lhs_of_application:Variable.t -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + value_set_of_closures:Simple_value_approx.value_set_of_closures -> + args:Variable.t list -> + args_approxs:Simple_value_approx.t list -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> + inline_requested:Lambda.inline_attribute -> + specialise_requested:Lambda.specialise_attribute -> + Flambda.t * Inline_and_simplify_aux.Result.t

    Try to inline a full application of a known function, guided by various heuristics.

    val should_inline_inside_declaration : Flambda.function_declaration -> bool

    When a function declaration is encountered by for_call_site, the body may be subject to inlining immediately, thus changing the declaration. This function must return true for that to be able to happen.

    diff --git a/ocaml/Inlining_decision_intf/index.html b/ocaml/Inlining_decision_intf/index.html index e687ae1..4e527e6 100644 --- a/ocaml/Inlining_decision_intf/index.html +++ b/ocaml/Inlining_decision_intf/index.html @@ -1,25 +1,25 @@ -Inlining_decision_intf (ocaml.Inlining_decision_intf)

    Module Inlining_decision_intf

    type 'a by_copying_function_body = - env:Inline_and_simplify_aux.Env.t -> - r:Inline_and_simplify_aux.Result.t -> - clos:Flambda.function_declarations -> - lfunc:Flambda.t -> - fun_id:Closure_id.t -> - func:Flambda.function_declaration -> - args:Flambda.t list -> +Inlining_decision_intf (ocaml.Inlining_decision_intf)

    Module Inlining_decision_intf

    type 'a by_copying_function_declaration = - env:Inline_and_simplify_aux.Env.t -> - r:Inline_and_simplify_aux.Result.t -> - funct:Flambda.t -> - clos:Flambda.function_declarations -> - fun_id:Closure_id.t -> - func:Flambda.function_declaration -> - args_with_approxs:(Flambda.t list * Simple_value_approx.t list) -> - invariant_params:Variable.Set.t -> - specialised_args:Variable.Set.t -> - dbg:Debuginfo.t -> + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + funct:Flambda.t -> + clos:Flambda.function_declarations -> + fun_id:Closure_id.t -> + func:Flambda.function_declaration -> + args_with_approxs:(Flambda.t list * Simple_value_approx.t list) -> + invariant_params:Variable.Set.t -> + specialised_args:Variable.Set.t -> + dbg:Debuginfo.t -> (Flambda.t * Inline_and_simplify_aux.Result.t) option
    \ No newline at end of file + Flambda.t * Inline_and_simplify_aux.Result.t
    diff --git a/ocaml/Inlining_stats/Closure_stack/index.html b/ocaml/Inlining_stats/Closure_stack/index.html index 19a0c14..ba0e0dd 100644 --- a/ocaml/Inlining_stats/Closure_stack/index.html +++ b/ocaml/Inlining_stats/Closure_stack/index.html @@ -1,6 +1,6 @@ -Closure_stack (ocaml.Inlining_stats.Closure_stack)

    Module Inlining_stats.Closure_stack

    type t
    val create : unit -> t
    val note_entering_closure : +Closure_stack (ocaml.Inlining_stats.Closure_stack)

    Module Inlining_stats.Closure_stack

    type t
    val create : unit -> t
    val note_entering_closure : t -> - closure_id:Closure_id.t -> - dbg:Debuginfo.t -> - t
    val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t
    val note_entering_inlined : t -> t
    val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t
    \ No newline at end of file + closure_id:Closure_id.t -> + dbg:Debuginfo.t -> + t
    val note_entering_call : t -> closure_id:Closure_id.t -> dbg:Debuginfo.t -> t
    val note_entering_inlined : t -> t
    val note_entering_specialised : t -> closure_ids:Closure_id.Set.t -> t
    diff --git a/ocaml/Inlining_stats/index.html b/ocaml/Inlining_stats/index.html index db64b6e..482bef3 100644 --- a/ocaml/Inlining_stats/index.html +++ b/ocaml/Inlining_stats/index.html @@ -1,5 +1,5 @@ -Inlining_stats (ocaml.Inlining_stats)

    Module Inlining_stats

    module Closure_stack : sig ... end
    val record_decision : +Inlining_stats (ocaml.Inlining_stats)

    Module Inlining_stats

    module Closure_stack : sig ... end
    val record_decision : Inlining_stats_types.Decision.t -> - closure_stack:Closure_stack.t -> - unit
    val save_then_forget_decisions : output_prefix:string -> unit
    \ No newline at end of file + closure_stack:Closure_stack.t -> + unit
    val save_then_forget_decisions : output_prefix:string -> unit
    diff --git a/ocaml/Inlining_stats_types/Decision/index.html b/ocaml/Inlining_stats_types/Decision/index.html index 96e851f..7fb3376 100644 --- a/ocaml/Inlining_stats_types/Decision/index.html +++ b/ocaml/Inlining_stats_types/Decision/index.html @@ -1,2 +1,2 @@ -Decision (ocaml.Inlining_stats_types.Decision)

    Module Inlining_stats_types.Decision

    type t =
    1. | Prevented of Prevented.t
    2. | Specialised of Specialised.t
    3. | Inlined of Not_specialised.t * Inlined.t
    4. | Unchanged of Not_specialised.t * Not_inlined.t
    val summary : Stdlib.Format.formatter -> t -> unit
    val calculation : depth:int -> Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +Decision (ocaml.Inlining_stats_types.Decision)

    Module Inlining_stats_types.Decision

    type t =
    1. | Prevented of Prevented.t
    2. | Specialised of Specialised.t
    3. | Inlined of Not_specialised.t * Inlined.t
    4. | Unchanged of Not_specialised.t * Not_inlined.t
    val summary : Stdlib.Format.formatter -> t -> unit
    val calculation : depth:int -> Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Inlining_stats_types/Inlined/index.html b/ocaml/Inlining_stats_types/Inlined/index.html index 6ed1fbd..9487905 100644 --- a/ocaml/Inlining_stats_types/Inlined/index.html +++ b/ocaml/Inlining_stats_types/Inlined/index.html @@ -1,3 +1,3 @@ -Inlined (ocaml.Inlining_stats_types.Inlined)

    Module Inlining_stats_types.Inlined

    type t =
    1. | Classic_mode
    2. | Annotation
    3. | Decl_local_to_application
    4. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
    5. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t - * Inlining_cost.Whether_sufficient_benefit.t
    \ No newline at end of file +Inlined (ocaml.Inlining_stats_types.Inlined)

    Module Inlining_stats_types.Inlined

    type t =
    1. | Classic_mode
    2. | Annotation
    3. | Decl_local_to_application
    4. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
    5. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
    diff --git a/ocaml/Inlining_stats_types/Not_inlined/index.html b/ocaml/Inlining_stats_types/Not_inlined/index.html index 39121a6..a0472fc 100644 --- a/ocaml/Inlining_stats_types/Not_inlined/index.html +++ b/ocaml/Inlining_stats_types/Not_inlined/index.html @@ -1,3 +1,3 @@ -Not_inlined (ocaml.Inlining_stats_types.Not_inlined)

    Module Inlining_stats_types.Not_inlined

    type t =
    1. | Classic_mode
    2. | Above_threshold of int
    3. | Annotation
    4. | No_useful_approximations
    5. | Unrolling_depth_exceeded
    6. | Self_call
    7. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
    8. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t - * Inlining_cost.Whether_sufficient_benefit.t
    \ No newline at end of file +Not_inlined (ocaml.Inlining_stats_types.Not_inlined)

    Module Inlining_stats_types.Not_inlined

    type t =
    1. | Classic_mode
    2. | Above_threshold of int
    3. | Annotation
    4. | No_useful_approximations
    5. | Unrolling_depth_exceeded
    6. | Self_call
    7. | Without_subfunctions of Inlining_cost.Whether_sufficient_benefit.t
    8. | With_subfunctions of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
    diff --git a/ocaml/Inlining_stats_types/Not_specialised/index.html b/ocaml/Inlining_stats_types/Not_specialised/index.html index 62db1bf..1d3d268 100644 --- a/ocaml/Inlining_stats_types/Not_specialised/index.html +++ b/ocaml/Inlining_stats_types/Not_specialised/index.html @@ -1,3 +1,3 @@ -Not_specialised (ocaml.Inlining_stats_types.Not_specialised)

    Module Inlining_stats_types.Not_specialised

    type t =
    1. | Classic_mode
    2. | Above_threshold of int
    3. | Annotation
    4. | Not_recursive
    5. | Not_closed
    6. | No_invariant_parameters
    7. | No_useful_approximations
    8. | Self_call
    9. | Not_beneficial of Inlining_cost.Whether_sufficient_benefit.t - * Inlining_cost.Whether_sufficient_benefit.t
    \ No newline at end of file +Not_specialised (ocaml.Inlining_stats_types.Not_specialised)

    Module Inlining_stats_types.Not_specialised

    type t =
    1. | Classic_mode
    2. | Above_threshold of int
    3. | Annotation
    4. | Not_recursive
    5. | Not_closed
    6. | No_invariant_parameters
    7. | No_useful_approximations
    8. | Self_call
    9. | Not_beneficial of Inlining_cost.Whether_sufficient_benefit.t + * Inlining_cost.Whether_sufficient_benefit.t
    diff --git a/ocaml/Inlining_stats_types/Prevented/index.html b/ocaml/Inlining_stats_types/Prevented/index.html index d8f4b15..8b36d51 100644 --- a/ocaml/Inlining_stats_types/Prevented/index.html +++ b/ocaml/Inlining_stats_types/Prevented/index.html @@ -1,2 +1,2 @@ -Prevented (ocaml.Inlining_stats_types.Prevented)

    Module Inlining_stats_types.Prevented

    type t =
    1. | Function_prevented_from_inlining
    2. | Level_exceeded
    \ No newline at end of file +Prevented (ocaml.Inlining_stats_types.Prevented)

    Module Inlining_stats_types.Prevented

    type t =
    1. | Function_prevented_from_inlining
    2. | Level_exceeded
    diff --git a/ocaml/Inlining_stats_types/Specialised/index.html b/ocaml/Inlining_stats_types/Specialised/index.html index 0eae09e..5d46908 100644 --- a/ocaml/Inlining_stats_types/Specialised/index.html +++ b/ocaml/Inlining_stats_types/Specialised/index.html @@ -1,3 +1,3 @@ -Specialised (ocaml.Inlining_stats_types.Specialised)

    Module Inlining_stats_types.Specialised

    \ No newline at end of file +Specialised (ocaml.Inlining_stats_types.Specialised)

    Module Inlining_stats_types.Specialised

    diff --git a/ocaml/Inlining_stats_types/index.html b/ocaml/Inlining_stats_types/index.html index 0ad376d..ca07e37 100644 --- a/ocaml/Inlining_stats_types/index.html +++ b/ocaml/Inlining_stats_types/index.html @@ -1,2 +1,2 @@ -Inlining_stats_types (ocaml.Inlining_stats_types)

    Module Inlining_stats_types

    module Inlined : sig ... end
    module Not_inlined : sig ... end
    module Specialised : sig ... end
    module Not_specialised : sig ... end
    module Prevented : sig ... end
    module Decision : sig ... end
    \ No newline at end of file +Inlining_stats_types (ocaml.Inlining_stats_types)

    Module Inlining_stats_types

    module Inlined : sig ... end
    module Not_inlined : sig ... end
    module Specialised : sig ... end
    module Not_specialised : sig ... end
    module Prevented : sig ... end
    module Decision : sig ... end
    diff --git a/ocaml/Inlining_transforms/index.html b/ocaml/Inlining_transforms/index.html index 2f7e1c9..5543bd7 100644 --- a/ocaml/Inlining_transforms/index.html +++ b/ocaml/Inlining_transforms/index.html @@ -1,32 +1,31 @@ -Inlining_transforms (ocaml.Inlining_transforms)

    Module Inlining_transforms

    Source code transformations used during inlining.

    val inline_by_copying_function_body : - env:Inline_and_simplify_aux.Env.t -> - r:Inline_and_simplify_aux.Result.t -> - lhs_of_application:Variable.t -> - inline_requested:Lambda.inline_attribute -> - specialise_requested:Lambda.specialise_attribute -> - closure_id_being_applied:Closure_id.t -> - function_decl:Simple_value_approx.function_declaration -> - function_body:Simple_value_approx.function_body -> - fun_vars:Variable.Set.t -> - args:Variable.t list -> - dbg:Debuginfo.t -> - simplify:Inlining_decision_intf.simplify -> +Inlining_transforms (ocaml.Inlining_transforms)

    Module Inlining_transforms

    Source code transformations used during inlining.

    val inline_by_copying_function_body : + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + lhs_of_application:Variable.t -> + inline_requested:Lambda.inline_attribute -> + specialise_requested:Lambda.specialise_attribute -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + function_body:Simple_value_approx.function_body -> + fun_vars:Variable.Set.t -> + args:Variable.t list -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> Flambda.t * Inline_and_simplify_aux.Result.t

    Inline a function by substituting its body (which may be subject to further transformation) at a call site. The function's declaration is not copied.

    This transformation is used when:

    • inlining a call to a non-recursive function;
    • inlining a call, within a recursive or mutually-recursive function, to the same or another function being defined simultaneously ("unrolling"). The maximum depth of unrolling is bounded (see E.unrolling_allowed).

    In both cases, the body of the function is copied, within a sequence of lets that bind the function parameters, the variables "bound by the closure" (see flambda.mli), and any function identifiers introduced by the set of closures. These stages are delimited below by comments.

    As an example, suppose we are inlining the following function:

    let f x = x + y ... let p = f, f in (fst p) 42

    The call site (fst p) 42 will be transformed to:

    let clos_id = fst p in (* must eventually yield a closure *) let y = <access to y in clos_id> in let x' = 42 in let x = x' in x + y

    When unrolling a recursive function we rename the arguments to the recursive call in order to avoid clashes with existing bindings. For example, suppose we are inlining the following call to f, which lies within its own declaration:

    let rec f x y = f (fst x) (y + snd x)

    This will be transformed to:

    let rec f x y = let clos_id = f in (* not used this time, since f has no free vars *) let x' = fst x in let y' = y + snd x in f (fst x') (y' + snd x') (* body of f with parameters freshened *)

    val inline_by_copying_function_declaration : - env:Inline_and_simplify_aux.Env.t -> - r:Inline_and_simplify_aux.Result.t -> - function_decls:Simple_value_approx.function_declarations -> - lhs_of_application:Variable.t -> - inline_requested:Lambda.inline_attribute -> - closure_id_being_applied:Closure_id.t -> - function_decl:Simple_value_approx.function_declaration -> - args:Variable.t list -> - args_approxs:Simple_value_approx.t list -> - invariant_params:Variable.Set.t Variable.Map.t lazy_t -> - specialised_args:Flambda.specialised_to Variable.Map.t -> - free_vars:Flambda.specialised_to Variable.Map.t -> - direct_call_surrogates:Closure_id.t Closure_id.Map.t -> - dbg:Debuginfo.t -> - simplify:Inlining_decision_intf.simplify -> - (Flambda.t * Inline_and_simplify_aux.Result.t) option

    Inlining of recursive function(s) yields a copy of the functions' definitions (not just their bodies, unlike the non-recursive case) and a direct application of the new body. Note: the function really does need to be recursive (but possibly only via some mutual recursion) to end up in here; a simultaneous binding that is - non-recursive is not sufficient.

    \ No newline at end of file + env:Inline_and_simplify_aux.Env.t -> + r:Inline_and_simplify_aux.Result.t -> + function_decls:Simple_value_approx.function_declarations -> + lhs_of_application:Variable.t -> + inline_requested:Lambda.inline_attribute -> + closure_id_being_applied:Closure_id.t -> + function_decl:Simple_value_approx.function_declaration -> + args:Variable.t list -> + args_approxs:Simple_value_approx.t list -> + invariant_params:Variable.Set.t Variable.Map.t lazy_t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + free_vars:Flambda.specialised_to Variable.Map.t -> + direct_call_surrogates:Closure_id.t Closure_id.Map.t -> + dbg:Debuginfo.t -> + simplify:Inlining_decision_intf.simplify -> + (Flambda.t * Inline_and_simplify_aux.Result.t) option

    Inlining of recursive function(s) yields a copy of the functions' definitions (not just their bodies, unlike the non-recursive case) and a direct application of the new body. Note: the function really does need to be recursive (but possibly only via some mutual recursion) to end up in here; a simultaneous binding that is non-recursive is not sufficient.

    diff --git a/ocaml/Instruct/index.html b/ocaml/Instruct/index.html index 82de2e0..85fed5a 100644 --- a/ocaml/Instruct/index.html +++ b/ocaml/Instruct/index.html @@ -1,2 +1,2 @@ -Instruct (ocaml.Instruct)

    Module Instruct

    type compilation_env = {
    1. ce_stack : int Ident.tbl;
    2. ce_heap : int Ident.tbl;
    3. ce_rec : int Ident.tbl;
    }
    type debug_event = {
    1. mutable ev_pos : int;
    2. ev_module : string;
    3. ev_loc : Location.t;
    4. ev_kind : debug_event_kind;
    5. ev_defname : string;
    6. ev_info : debug_event_info;
    7. ev_typenv : Env.summary;
    8. ev_typsubst : Subst.t;
    9. ev_compenv : compilation_env;
    10. ev_stacksize : int;
    11. ev_repr : debug_event_repr;
    }
    and debug_event_kind =
    1. | Event_before
    2. | Event_after of Types.type_expr
    3. | Event_pseudo
    and debug_event_info =
    1. | Event_function
    2. | Event_return of int
    3. | Event_other
    and debug_event_repr =
    1. | Event_none
    2. | Event_parent of int ref
    3. | Event_child of int ref
    type label = int
    type instruction =
    1. | Klabel of label
    2. | Kacc of int
    3. | Kenvacc of int
    4. | Kpush
    5. | Kpop of int
    6. | Kassign of int
    7. | Kpush_retaddr of label
    8. | Kapply of int
    9. | Kappterm of int * int
    10. | Kreturn of int
    11. | Krestart
    12. | Kgrab of int
    13. | Kclosure of label * int
    14. | Kclosurerec of label list * int
    15. | Koffsetclosure of int
    16. | Kgetglobal of Ident.t
    17. | Ksetglobal of Ident.t
    18. | Kconst of Lambda.structured_constant
    19. | Kmakeblock of int * int
    20. | Kmakefloatblock of int
    21. | Kgetfield of int
    22. | Ksetfield of int
    23. | Kgetfloatfield of int
    24. | Ksetfloatfield of int
    25. | Kvectlength
    26. | Kgetvectitem
    27. | Ksetvectitem
    28. | Kgetstringchar
    29. | Kgetbyteschar
    30. | Ksetbyteschar
    31. | Kbranch of label
    32. | Kbranchif of label
    33. | Kbranchifnot of label
    34. | Kstrictbranchif of label
    35. | Kstrictbranchifnot of label
    36. | Kswitch of label array * label array
    37. | Kboolnot
    38. | Kpushtrap of label
    39. | Kpoptrap
    40. | Kraise of Lambda.raise_kind
    41. | Kcheck_signals
    42. | Kccall of string * int
    43. | Knegint
    44. | Kaddint
    45. | Ksubint
    46. | Kmulint
    47. | Kdivint
    48. | Kmodint
    49. | Kandint
    50. | Korint
    51. | Kxorint
    52. | Klslint
    53. | Klsrint
    54. | Kasrint
    55. | Kintcomp of Lambda.integer_comparison
    56. | Koffsetint of int
    57. | Koffsetref of int
    58. | Kisint
    59. | Kisout
    60. | Kgetmethod
    61. | Kgetpubmet of int
    62. | Kgetdynmet
    63. | Kevent of debug_event
    64. | Kperform
    65. | Kresume
    66. | Kresumeterm of int
    67. | Kreperformterm of int
    68. | Kstop
    val immed_min : int
    val immed_max : int
    \ No newline at end of file +Instruct (ocaml.Instruct)

    Module Instruct

    type compilation_env = {
    1. ce_stack : int Ident.tbl;
    2. ce_heap : int Ident.tbl;
    3. ce_rec : int Ident.tbl;
    }
    type debug_event = {
    1. mutable ev_pos : int;
    2. ev_module : string;
    3. ev_loc : Location.t;
    4. ev_kind : debug_event_kind;
    5. ev_defname : string;
    6. ev_info : debug_event_info;
    7. ev_typenv : Env.summary;
    8. ev_typsubst : Subst.t;
    9. ev_compenv : compilation_env;
    10. ev_stacksize : int;
    11. ev_repr : debug_event_repr;
    }
    and debug_event_kind =
    1. | Event_before
    2. | Event_after of Types.type_expr
    3. | Event_pseudo
    and debug_event_info =
    1. | Event_function
    2. | Event_return of int
    3. | Event_other
    and debug_event_repr =
    1. | Event_none
    2. | Event_parent of int ref
    3. | Event_child of int ref
    type label = int
    type instruction =
    1. | Klabel of label
    2. | Kacc of int
    3. | Kenvacc of int
    4. | Kpush
    5. | Kpop of int
    6. | Kassign of int
    7. | Kpush_retaddr of label
    8. | Kapply of int
    9. | Kappterm of int * int
    10. | Kreturn of int
    11. | Krestart
    12. | Kgrab of int
    13. | Kclosure of label * int
    14. | Kclosurerec of label list * int
    15. | Koffsetclosure of int
    16. | Kgetglobal of Ident.t
    17. | Ksetglobal of Ident.t
    18. | Kconst of Lambda.structured_constant
    19. | Kmakeblock of int * int
    20. | Kmakefloatblock of int
    21. | Kgetfield of int
    22. | Ksetfield of int
    23. | Kgetfloatfield of int
    24. | Ksetfloatfield of int
    25. | Kvectlength
    26. | Kgetvectitem
    27. | Ksetvectitem
    28. | Kgetstringchar
    29. | Kgetbyteschar
    30. | Ksetbyteschar
    31. | Kbranch of label
    32. | Kbranchif of label
    33. | Kbranchifnot of label
    34. | Kstrictbranchif of label
    35. | Kstrictbranchifnot of label
    36. | Kswitch of label array * label array
    37. | Kboolnot
    38. | Kpushtrap of label
    39. | Kpoptrap
    40. | Kraise of Lambda.raise_kind
    41. | Kcheck_signals
    42. | Kccall of string * int
    43. | Knegint
    44. | Kaddint
    45. | Ksubint
    46. | Kmulint
    47. | Kdivint
    48. | Kmodint
    49. | Kandint
    50. | Korint
    51. | Kxorint
    52. | Klslint
    53. | Klsrint
    54. | Kasrint
    55. | Kintcomp of Lambda.integer_comparison
    56. | Koffsetint of int
    57. | Koffsetref of int
    58. | Kisint
    59. | Kisout
    60. | Kgetmethod
    61. | Kgetpubmet of int
    62. | Kgetdynmet
    63. | Kevent of debug_event
    64. | Kperform
    65. | Kresume
    66. | Kresumeterm of int
    67. | Kreperformterm of int
    68. | Kstop
    val immed_min : int
    val immed_max : int
    diff --git a/ocaml/Int_replace_polymorphic_compare/index.html b/ocaml/Int_replace_polymorphic_compare/index.html index b9b03ff..90af050 100644 --- a/ocaml/Int_replace_polymorphic_compare/index.html +++ b/ocaml/Int_replace_polymorphic_compare/index.html @@ -1,2 +1,2 @@ -Int_replace_polymorphic_compare (ocaml.Int_replace_polymorphic_compare)

    Module Int_replace_polymorphic_compare

    val (=) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val compare : int -> int -> int
    \ No newline at end of file +Int_replace_polymorphic_compare (ocaml.Int_replace_polymorphic_compare)

    Module Int_replace_polymorphic_compare

    val (=) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val compare : int -> int -> int
    diff --git a/ocaml/Interf/index.html b/ocaml/Interf/index.html index f815003..871298d 100644 --- a/ocaml/Interf/index.html +++ b/ocaml/Interf/index.html @@ -1,2 +1,2 @@ -Interf (ocaml.Interf)

    Module Interf

    val build_graph : Mach.fundecl -> unit
    \ No newline at end of file +Interf (ocaml.Interf)

    Module Interf

    val build_graph : Mach.fundecl -> unit
    diff --git a/ocaml/Internal_variable_names/index.html b/ocaml/Internal_variable_names/index.html index 05945bd..122d9ff 100644 --- a/ocaml/Internal_variable_names/index.html +++ b/ocaml/Internal_variable_names/index.html @@ -1,2 +1,2 @@ -Internal_variable_names (ocaml.Internal_variable_names)

    Module Internal_variable_names

    type t = private string
    val apply_arg : t
    val apply_funct : t
    val block_symbol : t
    val block_symbol_get : t
    val block_symbol_get_field : t
    val closure : t
    val cond : t
    val cond_sequor : t
    val const_block : t
    val const_bool : t
    val const_boxed_int : t
    val const_char : t
    val const_false : t
    val const_float : t
    val const_int : t
    val const_one : t
    val const_ptr : t
    val const_ptr_one : t
    val const_ptr_zero : t
    val const_sequand : t
    val const_string : t
    val const_true : t
    val const_zero : t
    val denominator : t
    val division_by_zero : t
    val dummy : t
    val dup_func : t
    val dup_set_of_closures : t
    val const_float_array : t
    val fake_effect_symbol : t
    val for_from : t
    val for_to : t
    val from_closure : t
    val full_apply : t
    val get_symbol_field : t
    val const_immstring : t
    val const_int32 : t
    val const_int64 : t
    val ignore : t
    val is_zero : t
    val lifted_let_rec_block : t
    val meth : t
    val module_as_block : t
    val const_nativeint : t
    val new_value : t
    val numerator : t
    val obj : t
    val offsetted : t
    val partial_fun : t
    val pgetglobal : t
    val pointer : t
    val predef_exn : t
    val project_closure : t
    val raise : t
    val raise_arg : t
    val read_mutable : t
    val remove_unused_arguments : t
    val result : t
    val send_arg : t
    val sequence : t
    val set_of_closures : t
    val staticraise_arg : t
    val simplify_fv : t
    val string_switch : t
    val switch : t
    val symbol : t
    val symbol_field : t
    val symbol_field_block : t
    val the_dead_constant : t
    val toplevel_substitution_named : t
    val unbox_free_vars_of_closures : t
    val unit : t
    val zero : t
    val of_primitive : Lambda.primitive -> t
    val of_primitive_arg : Lambda.primitive -> t
    val anon_fn_with_loc : Lambda.scoped_location -> t
    \ No newline at end of file +Internal_variable_names (ocaml.Internal_variable_names)

    Module Internal_variable_names

    type t = private string
    val apply_arg : t
    val apply_funct : t
    val block_symbol : t
    val block_symbol_get : t
    val block_symbol_get_field : t
    val closure : t
    val cond : t
    val cond_sequor : t
    val const_block : t
    val const_bool : t
    val const_boxed_int : t
    val const_char : t
    val const_false : t
    val const_float : t
    val const_int : t
    val const_one : t
    val const_ptr : t
    val const_ptr_one : t
    val const_ptr_zero : t
    val const_sequand : t
    val const_string : t
    val const_true : t
    val const_zero : t
    val denominator : t
    val division_by_zero : t
    val dummy : t
    val dup_func : t
    val dup_set_of_closures : t
    val const_float_array : t
    val fake_effect_symbol : t
    val for_from : t
    val for_to : t
    val from_closure : t
    val full_apply : t
    val get_symbol_field : t
    val const_immstring : t
    val const_int32 : t
    val const_int64 : t
    val ignore : t
    val is_zero : t
    val lifted_let_rec_block : t
    val meth : t
    val module_as_block : t
    val const_nativeint : t
    val new_value : t
    val numerator : t
    val obj : t
    val offsetted : t
    val partial_fun : t
    val pgetglobal : t
    val pointer : t
    val predef_exn : t
    val project_closure : t
    val raise : t
    val raise_arg : t
    val read_mutable : t
    val remove_unused_arguments : t
    val result : t
    val send_arg : t
    val sequence : t
    val set_of_closures : t
    val staticraise_arg : t
    val simplify_fv : t
    val string_switch : t
    val switch : t
    val symbol : t
    val symbol_field : t
    val symbol_field_block : t
    val the_dead_constant : t
    val toplevel_substitution_named : t
    val unbox_free_vars_of_closures : t
    val unit : t
    val zero : t
    val of_primitive : Lambda.primitive -> t
    val of_primitive_arg : Lambda.primitive -> t
    val anon_fn_with_loc : Lambda.scoped_location -> t
    diff --git a/ocaml/Interval/index.html b/ocaml/Interval/index.html index 1a81785..643bc17 100644 --- a/ocaml/Interval/index.html +++ b/ocaml/Interval/index.html @@ -1,2 +1,2 @@ -Interval (ocaml.Interval)

    Module Interval

    type range = {
    1. mutable rbegin : int;
    2. mutable rend : int;
    }
    type t = {
    1. mutable reg : Reg.t;
    2. mutable ibegin : int;
    3. mutable iend : int;
    4. mutable ranges : range list;
    }
    type result = {
    1. intervals : t list;
    2. fixed_intervals : t list;
    }
    val overlap : t -> t -> bool
    val is_live : t -> int -> bool
    val remove_expired_ranges : t -> int -> unit
    val build_intervals : Mach.fundecl -> result
    \ No newline at end of file +Interval (ocaml.Interval)

    Module Interval

    type range = {
    1. mutable rbegin : int;
    2. mutable rend : int;
    }
    type t = {
    1. mutable reg : Reg.t;
    2. mutable ibegin : int;
    3. mutable iend : int;
    4. mutable ranges : range list;
    }
    type result = {
    1. intervals : t list;
    2. fixed_intervals : t list;
    }
    val overlap : t -> t -> bool
    val is_live : t -> int -> bool
    val remove_expired_ranges : t -> int -> unit
    val build_intervals : Mach.fundecl -> result
    diff --git a/ocaml/Invariant_params/index.html b/ocaml/Invariant_params/index.html index 61dabb3..e2a9793 100644 --- a/ocaml/Invariant_params/index.html +++ b/ocaml/Invariant_params/index.html @@ -1,11 +1,11 @@ -Invariant_params (ocaml.Invariant_params)

    Module Invariant_params

    val invariant_params_in_recursion : +Invariant_params (ocaml.Invariant_params)

    Module Invariant_params

    val invariant_params_in_recursion : Flambda.function_declarations -> - backend:(module Backend_intf.S) -> + backend:(module Backend_intf.S) -> Variable.Set.t Variable.Map.t
    val invariant_param_sources : Flambda.function_declarations -> - backend:(module Backend_intf.S) -> + backend:(module Backend_intf.S) -> Variable.Pair.Set.t Variable.Map.t
    val unused_arguments : Flambda.function_declarations -> - backend:(module Backend_intf.S) -> - Variable.Set.t
    \ No newline at end of file + backend:(module Backend_intf.S) -> + Variable.Set.t
    diff --git a/ocaml/Lambda/index.html b/ocaml/Lambda/index.html index 415235a..9b8b810 100644 --- a/ocaml/Lambda/index.html +++ b/ocaml/Lambda/index.html @@ -1,24 +1,24 @@ -Lambda (ocaml.Lambda)

    Module Lambda

    type compile_time_constant =
    1. | Big_endian
    2. | Word_size
    3. | Int_size
    4. | Max_wosize
    5. | Ostype_unix
    6. | Ostype_win32
    7. | Ostype_cygwin
    8. | Backend_type
    type immediate_or_pointer =
    1. | Immediate
    2. | Pointer
    type initialization_or_assignment =
    1. | Assignment
    2. | Heap_initialization
    3. | Root_initialization
    type is_safe =
    1. | Safe
    2. | Unsafe
    type primitive =
    1. | Pbytes_to_string
    2. | Pbytes_of_string
    3. | Pignore
    4. | Pgetglobal of Ident.t
    5. | Psetglobal of Ident.t
    6. | Pmakeblock of int * Asttypes.mutable_flag * block_shape
    7. | Pfield of int * immediate_or_pointer * Asttypes.mutable_flag
    8. | Pfield_computed
    9. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
    10. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
    11. | Pfloatfield of int
    12. | Psetfloatfield of int * initialization_or_assignment
    13. | Pduprecord of Types.record_representation * int
    14. | Prunstack
    15. | Pperform
    16. | Presume
    17. | Preperform
    18. | Pccall of Primitive.description
    19. | Praise of raise_kind
    20. | Psequand
    21. | Psequor
    22. | Pnot
    23. | Pnegint
    24. | Paddint
    25. | Psubint
    26. | Pmulint
    27. | Pdivint of is_safe
    28. | Pmodint of is_safe
    29. | Pandint
    30. | Porint
    31. | Pxorint
    32. | Plslint
    33. | Plsrint
    34. | Pasrint
    35. | Pintcomp of integer_comparison
    36. | Pcompare_ints
    37. | Pcompare_floats
    38. | Pcompare_bints of boxed_integer
    39. | Poffsetint of int
    40. | Poffsetref of int
    41. | Pintoffloat
    42. | Pfloatofint
    43. | Pnegfloat
    44. | Pabsfloat
    45. | Paddfloat
    46. | Psubfloat
    47. | Pmulfloat
    48. | Pdivfloat
    49. | Pfloatcomp of float_comparison
    50. | Pstringlength
    51. | Pstringrefu
    52. | Pstringrefs
    53. | Pbyteslength
    54. | Pbytesrefu
    55. | Pbytessetu
    56. | Pbytesrefs
    57. | Pbytessets
    58. | Pmakearray of array_kind * Asttypes.mutable_flag
    59. | Pduparray of array_kind * Asttypes.mutable_flag
      (*

      For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

      *)
    60. | Parraylength of array_kind
    61. | Parrayrefu of array_kind
    62. | Parraysetu of array_kind
    63. | Parrayrefs of array_kind
    64. | Parraysets of array_kind
    65. | Pisint
    66. | Pisout
    67. | Pbintofint of boxed_integer
    68. | Pintofbint of boxed_integer
    69. | Pcvtbint of boxed_integer * boxed_integer
    70. | Pnegbint of boxed_integer
    71. | Paddbint of boxed_integer
    72. | Psubbint of boxed_integer
    73. | Pmulbint of boxed_integer
    74. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    75. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    76. | Pandbint of boxed_integer
    77. | Porbint of boxed_integer
    78. | Pxorbint of boxed_integer
    79. | Plslbint of boxed_integer
    80. | Plsrbint of boxed_integer
    81. | Pasrbint of boxed_integer
    82. | Pbintcomp of boxed_integer * integer_comparison
    83. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    84. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    85. | Pbigarraydim of int
    86. | Pstring_load_16 of bool
    87. | Pstring_load_32 of bool
    88. | Pstring_load_64 of bool
    89. | Pbytes_load_16 of bool
    90. | Pbytes_load_32 of bool
    91. | Pbytes_load_64 of bool
    92. | Pbytes_set_16 of bool
    93. | Pbytes_set_32 of bool
    94. | Pbytes_set_64 of bool
    95. | Pbigstring_load_16 of bool
    96. | Pbigstring_load_32 of bool
    97. | Pbigstring_load_64 of bool
    98. | Pbigstring_set_16 of bool
    99. | Pbigstring_set_32 of bool
    100. | Pbigstring_set_64 of bool
    101. | Pctconst of compile_time_constant
    102. | Pbswap16
    103. | Pbbswap of boxed_integer
    104. | Pint_as_pointer
    105. | Patomic_load of {
      1. immediate_or_pointer : immediate_or_pointer;
      }
    106. | Patomic_exchange
    107. | Patomic_cas
    108. | Patomic_fetch_add
    109. | Popaque
    110. | Pdls_get
    and integer_comparison =
    1. | Ceq
    2. | Cne
    3. | Clt
    4. | Cgt
    5. | Cle
    6. | Cge
    and float_comparison =
    1. | CFeq
    2. | CFneq
    3. | CFlt
    4. | CFnlt
    5. | CFgt
    6. | CFngt
    7. | CFle
    8. | CFnle
    9. | CFge
    10. | CFnge
    and array_kind =
    1. | Pgenarray
    2. | Paddrarray
    3. | Pintarray
    4. | Pfloatarray
    and value_kind =
    1. | Pgenval
    2. | Pfloatval
    3. | Pboxedintval of boxed_integer
    4. | Pintval
    and block_shape = value_kind list option
    and boxed_integer = Primitive.boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    and bigarray_kind =
    1. | Pbigarray_unknown
    2. | Pbigarray_float32
    3. | Pbigarray_float64
    4. | Pbigarray_sint8
    5. | Pbigarray_uint8
    6. | Pbigarray_sint16
    7. | Pbigarray_uint16
    8. | Pbigarray_int32
    9. | Pbigarray_int64
    10. | Pbigarray_caml_int
    11. | Pbigarray_native_int
    12. | Pbigarray_complex32
    13. | Pbigarray_complex64
    and bigarray_layout =
    1. | Pbigarray_unknown_layout
    2. | Pbigarray_c_layout
    3. | Pbigarray_fortran_layout
    and raise_kind =
    1. | Raise_regular
    2. | Raise_reraise
    3. | Raise_notrace
    val equal_primitive : primitive -> primitive -> bool
    val equal_value_kind : value_kind -> value_kind -> bool
    val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
    type structured_constant =
    1. | Const_base of Asttypes.constant
    2. | Const_block of int * structured_constant list
    3. | Const_float_array of string list
    4. | Const_immstring of string
    type tailcall_attribute =
    1. | Tailcall_expectation of bool
    2. | Default_tailcall
    type inline_attribute =
    1. | Always_inline
    2. | Never_inline
    3. | Hint_inline
    4. | Unroll of int
    5. | Default_inline
    val equal_inline_attribute : inline_attribute -> inline_attribute -> bool
    type specialise_attribute =
    1. | Always_specialise
    2. | Never_specialise
    3. | Default_specialise
    val equal_specialise_attribute : +Lambda (ocaml.Lambda)

    Module Lambda

    type compile_time_constant =
    1. | Big_endian
    2. | Word_size
    3. | Int_size
    4. | Max_wosize
    5. | Ostype_unix
    6. | Ostype_win32
    7. | Ostype_cygwin
    8. | Backend_type
    type immediate_or_pointer =
    1. | Immediate
    2. | Pointer
    type initialization_or_assignment =
    1. | Assignment
    2. | Heap_initialization
    3. | Root_initialization
    type is_safe =
    1. | Safe
    2. | Unsafe
    type primitive =
    1. | Pbytes_to_string
    2. | Pbytes_of_string
    3. | Pignore
    4. | Pgetglobal of Ident.t
    5. | Psetglobal of Ident.t
    6. | Pmakeblock of int * Asttypes.mutable_flag * block_shape
    7. | Pfield of int * immediate_or_pointer * Asttypes.mutable_flag
    8. | Pfield_computed
    9. | Psetfield of int * immediate_or_pointer * initialization_or_assignment
    10. | Psetfield_computed of immediate_or_pointer * initialization_or_assignment
    11. | Pfloatfield of int
    12. | Psetfloatfield of int * initialization_or_assignment
    13. | Pduprecord of Types.record_representation * int
    14. | Prunstack
    15. | Pperform
    16. | Presume
    17. | Preperform
    18. | Pccall of Primitive.description
    19. | Praise of raise_kind
    20. | Psequand
    21. | Psequor
    22. | Pnot
    23. | Pnegint
    24. | Paddint
    25. | Psubint
    26. | Pmulint
    27. | Pdivint of is_safe
    28. | Pmodint of is_safe
    29. | Pandint
    30. | Porint
    31. | Pxorint
    32. | Plslint
    33. | Plsrint
    34. | Pasrint
    35. | Pintcomp of integer_comparison
    36. | Pcompare_ints
    37. | Pcompare_floats
    38. | Pcompare_bints of boxed_integer
    39. | Poffsetint of int
    40. | Poffsetref of int
    41. | Pintoffloat
    42. | Pfloatofint
    43. | Pnegfloat
    44. | Pabsfloat
    45. | Paddfloat
    46. | Psubfloat
    47. | Pmulfloat
    48. | Pdivfloat
    49. | Pfloatcomp of float_comparison
    50. | Pstringlength
    51. | Pstringrefu
    52. | Pstringrefs
    53. | Pbyteslength
    54. | Pbytesrefu
    55. | Pbytessetu
    56. | Pbytesrefs
    57. | Pbytessets
    58. | Pmakearray of array_kind * Asttypes.mutable_flag
    59. | Pduparray of array_kind * Asttypes.mutable_flag
      (*

      For Pduparray, the argument must be an immutable array. The arguments of Pduparray give the kind and mutability of the array being *produced* by the duplication.

      *)
    60. | Parraylength of array_kind
    61. | Parrayrefu of array_kind
    62. | Parraysetu of array_kind
    63. | Parrayrefs of array_kind
    64. | Parraysets of array_kind
    65. | Pisint
    66. | Pisout
    67. | Pbintofint of boxed_integer
    68. | Pintofbint of boxed_integer
    69. | Pcvtbint of boxed_integer * boxed_integer
    70. | Pnegbint of boxed_integer
    71. | Paddbint of boxed_integer
    72. | Psubbint of boxed_integer
    73. | Pmulbint of boxed_integer
    74. | Pdivbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    75. | Pmodbint of {
      1. size : boxed_integer;
      2. is_safe : is_safe;
      }
    76. | Pandbint of boxed_integer
    77. | Porbint of boxed_integer
    78. | Pxorbint of boxed_integer
    79. | Plslbint of boxed_integer
    80. | Plsrbint of boxed_integer
    81. | Pasrbint of boxed_integer
    82. | Pbintcomp of boxed_integer * integer_comparison
    83. | Pbigarrayref of bool * int * bigarray_kind * bigarray_layout
    84. | Pbigarrayset of bool * int * bigarray_kind * bigarray_layout
    85. | Pbigarraydim of int
    86. | Pstring_load_16 of bool
    87. | Pstring_load_32 of bool
    88. | Pstring_load_64 of bool
    89. | Pbytes_load_16 of bool
    90. | Pbytes_load_32 of bool
    91. | Pbytes_load_64 of bool
    92. | Pbytes_set_16 of bool
    93. | Pbytes_set_32 of bool
    94. | Pbytes_set_64 of bool
    95. | Pbigstring_load_16 of bool
    96. | Pbigstring_load_32 of bool
    97. | Pbigstring_load_64 of bool
    98. | Pbigstring_set_16 of bool
    99. | Pbigstring_set_32 of bool
    100. | Pbigstring_set_64 of bool
    101. | Pctconst of compile_time_constant
    102. | Pbswap16
    103. | Pbbswap of boxed_integer
    104. | Pint_as_pointer
    105. | Patomic_load of {
      1. immediate_or_pointer : immediate_or_pointer;
      }
    106. | Patomic_exchange
    107. | Patomic_cas
    108. | Patomic_fetch_add
    109. | Popaque
    110. | Pdls_get
    and integer_comparison =
    1. | Ceq
    2. | Cne
    3. | Clt
    4. | Cgt
    5. | Cle
    6. | Cge
    and float_comparison =
    1. | CFeq
    2. | CFneq
    3. | CFlt
    4. | CFnlt
    5. | CFgt
    6. | CFngt
    7. | CFle
    8. | CFnle
    9. | CFge
    10. | CFnge
    and array_kind =
    1. | Pgenarray
    2. | Paddrarray
    3. | Pintarray
    4. | Pfloatarray
    and value_kind =
    1. | Pgenval
    2. | Pfloatval
    3. | Pboxedintval of boxed_integer
    4. | Pintval
    and block_shape = value_kind list option
    and boxed_integer = Primitive.boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    and bigarray_kind =
    1. | Pbigarray_unknown
    2. | Pbigarray_float32
    3. | Pbigarray_float64
    4. | Pbigarray_sint8
    5. | Pbigarray_uint8
    6. | Pbigarray_sint16
    7. | Pbigarray_uint16
    8. | Pbigarray_int32
    9. | Pbigarray_int64
    10. | Pbigarray_caml_int
    11. | Pbigarray_native_int
    12. | Pbigarray_complex32
    13. | Pbigarray_complex64
    and bigarray_layout =
    1. | Pbigarray_unknown_layout
    2. | Pbigarray_c_layout
    3. | Pbigarray_fortran_layout
    and raise_kind =
    1. | Raise_regular
    2. | Raise_reraise
    3. | Raise_notrace
    val equal_primitive : primitive -> primitive -> bool
    val equal_value_kind : value_kind -> value_kind -> bool
    val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
    type structured_constant =
    1. | Const_base of Asttypes.constant
    2. | Const_block of int * structured_constant list
    3. | Const_float_array of string list
    4. | Const_immstring of string
    type tailcall_attribute =
    1. | Tailcall_expectation of bool
    2. | Default_tailcall
    type inline_attribute =
    1. | Always_inline
    2. | Never_inline
    3. | Hint_inline
    4. | Unroll of int
    5. | Default_inline
    val equal_inline_attribute : inline_attribute -> inline_attribute -> bool
    type specialise_attribute =
    1. | Always_specialise
    2. | Never_specialise
    3. | Default_specialise
    val equal_specialise_attribute : specialise_attribute -> specialise_attribute -> bool
    type local_attribute =
    1. | Always_local
    2. | Never_local
    3. | Default_local
    type poll_attribute =
    1. | Error_poll
    2. | Default_poll
    type function_kind =
    1. | Curried
    2. | Tupled
    type let_kind =
    1. | Strict
    2. | Alias
    3. | StrictOpt
    type meth_kind =
    1. | Self
    2. | Public
    3. | Cached
    val equal_meth_kind : meth_kind -> meth_kind -> bool
    type shared_code = (int * int) list
    type function_attribute = {
    1. inline : inline_attribute;
    2. specialise : specialise_attribute;
    3. local : local_attribute;
    4. poll : poll_attribute;
    5. is_a_functor : bool;
    6. stub : bool;
    7. tmc_candidate : bool;
    }
    type scoped_location = Debuginfo.Scoped_location.t
    type lambda =
    1. | Lvar of Ident.t
    2. | Lmutvar of Ident.t
    3. | Lconst of structured_constant
    4. | Lapply of lambda_apply
    5. | Lfunction of lfunction
    6. | Llet of let_kind * value_kind * Ident.t * lambda * lambda
    7. | Lmutlet of value_kind * Ident.t * lambda * lambda
    8. | Lletrec of (Ident.t * lambda) list * lambda
    9. | Lprim of primitive * lambda list * scoped_location
    10. | Lswitch of lambda * lambda_switch * scoped_location
    11. | Lstringswitch of lambda * (string * lambda) list * lambda option * scoped_location
    12. | Lstaticraise of int * lambda list
    13. | Lstaticcatch of lambda * int * (Ident.t * value_kind) list * lambda
    14. | Ltrywith of lambda * Ident.t * lambda
    15. | Lifthenelse of lambda * lambda * lambda
    16. | Lsequence of lambda * lambda
    17. | Lwhile of lambda * lambda
    18. | Lfor of Ident.t * lambda * lambda * Asttypes.direction_flag * lambda
    19. | Lassign of Ident.t * lambda
    20. | Lsend of meth_kind * lambda * lambda * lambda list * scoped_location
    21. | Levent of lambda * lambda_event
    22. | Lifused of Ident.t * lambda
    and lfunction = private {
    1. kind : function_kind;
    2. params : (Ident.t * value_kind) list;
    3. return : value_kind;
    4. body : lambda;
    5. attr : function_attribute;
    6. loc : scoped_location;
    }
    and lambda_apply = {
    1. ap_func : lambda;
    2. ap_args : lambda list;
    3. ap_loc : scoped_location;
    4. ap_tailcall : tailcall_attribute;
    5. ap_inlined : inline_attribute;
    6. ap_specialised : specialise_attribute;
    }
    and lambda_switch = {
    1. sw_numconsts : int;
    2. sw_consts : (int * lambda) list;
    3. sw_numblocks : int;
    4. sw_blocks : (int * lambda) list;
    5. sw_failaction : lambda option;
    }
    and lambda_event = {
    1. lev_loc : scoped_location;
    2. lev_kind : lambda_event_kind;
    3. lev_repr : int ref option;
    4. lev_env : Env.t;
    }
    and lambda_event_kind =
    1. | Lev_before
    2. | Lev_after of Types.type_expr
    3. | Lev_function
    4. | Lev_pseudo
    type program = {
    1. module_ident : Ident.t;
    2. main_module_block_size : int;
    3. required_globals : Ident.Set.t;
    4. code : lambda;
    }
    val make_key : lambda -> lambda option
    val const_unit : structured_constant
    val const_int : int -> structured_constant
    val lambda_unit : lambda
    val name_lambda : let_kind -> lambda -> (Ident.t -> lambda) -> lambda
    val name_lambda_list : lambda list -> (lambda list -> lambda) -> lambda
    val lfunction : - kind:function_kind -> - params:(Ident.t * value_kind) list -> - return:value_kind -> - body:lambda -> - attr:function_attribute -> - loc:scoped_location -> + kind:function_kind -> + params:(Ident.t * value_kind) list -> + return:value_kind -> + body:lambda -> + attr:function_attribute -> + loc:scoped_location -> lambda
    val iter_head_constructor : (lambda -> unit) -> lambda -> unit

    iter_head_constructor f lam apply f to only the first level of sub expressions of lam. It does not recursively traverse the expression.

    val shallow_iter : - tail:(lambda -> unit) -> - non_tail:(lambda -> unit) -> + tail:(lambda -> unit) -> + non_tail:(lambda -> unit) -> lambda -> - unit

    Same as iter_head_constructor, but use a different callback for sub-terms which are in tail position or not.

    val transl_prim : string -> string -> lambda

    Translate a value from a persistent module. For instance:

    transl_internal_value "CamlinternalLazy" "force"
    val free_variables : lambda -> Ident.Set.t
    val transl_module_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_value_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_extension_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_class_path : scoped_location -> Env.t -> Path.t -> lambda
    val make_sequence : ('a -> lambda) -> 'a list -> lambda
    val subst : + unit

    Same as iter_head_constructor, but use a different callback for sub-terms which are in tail position or not.

    val transl_prim : string -> string -> lambda

    Translate a value from a persistent module. For instance:

      transl_internal_value "CamlinternalLazy" "force"
    val free_variables : lambda -> Ident.Set.t
    val transl_module_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_value_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_extension_path : scoped_location -> Env.t -> Path.t -> lambda
    val transl_class_path : scoped_location -> Env.t -> Path.t -> lambda
    val make_sequence : ('a -> lambda) -> 'a list -> lambda
    val subst : (Ident.t -> Types.value_description -> Env.t -> Env.t) -> - ?freshen_bound_variables:bool -> + ?freshen_bound_variables:bool -> lambda Ident.Map.t -> lambda -> lambda

    subst update_env ?freshen_bound_variables s lt applies a substitution s to the lambda-term lt.

    Assumes that the image of the substitution is out of reach of the bound variables of the lambda-term (no capture).

    update_env is used to refresh the environment contained in debug events.

    freshen_bound_variables, which defaults to false, freshens the bound variables within lt.

    val rename : Ident.t Ident.Map.t -> lambda -> lambda

    A version of subst specialized for the case where we're just renaming idents.

    val duplicate : lambda -> lambda

    Duplicate a term, freshening all locally-bound identifiers.

    val map : (lambda -> lambda) -> lambda -> lambda

    Bottom-up rewriting, applying the function on each node from the leaves to the root.

    val shallow_map : (lambda -> lambda) -> lambda -> lambda

    Rewrite each immediate sub-term with the function.

    val bind : let_kind -> Ident.t -> lambda -> lambda -> lambda
    val bind_with_value_kind : @@ -28,9 +28,9 @@ lambda -> lambda
    val negate_integer_comparison : integer_comparison -> integer_comparison
    val swap_integer_comparison : integer_comparison -> integer_comparison
    val negate_float_comparison : float_comparison -> float_comparison
    val swap_float_comparison : float_comparison -> float_comparison
    val default_function_attribute : function_attribute
    val default_stub_attribute : function_attribute
    val function_is_curried : lfunction -> bool
    val find_exact_application : function_kind -> - arity:int -> + arity:int -> lambda list -> lambda list option
    val max_arity : unit -> int

    Maximal number of parameters for a function, or in other words, maximal length of the params list of a lfunction record. This is unlimited (max_int) for bytecode, but limited (currently to 126) for native code.

    val next_raise_count : unit -> int
    val staticfail : lambda
    val is_guarded : lambda -> bool
    val patch_guarded : lambda -> lambda -> lambda
    val raise_kind : raise_kind -> string
    val merge_inline_attributes : inline_attribute -> inline_attribute -> - inline_attribute option
    val reset : unit -> unit
    \ No newline at end of file + inline_attribute option
    val reset : unit -> unit
    diff --git a/ocaml/Lazy_backtrack/index.html b/ocaml/Lazy_backtrack/index.html index 7539e58..028ce2b 100644 --- a/ocaml/Lazy_backtrack/index.html +++ b/ocaml/Lazy_backtrack/index.html @@ -1,6 +1,6 @@ -Lazy_backtrack (ocaml.Lazy_backtrack)

    Module Lazy_backtrack

    type ('a, 'b) t
    type log
    val force : ('a -> 'b) -> ('a, 'b) t -> 'b
    val create : 'a -> ('a, 'b) t
    val get_arg : ('a, 'b) t -> 'a option
    val get_contents : ('a, 'b) t -> ('a, 'b) Stdlib.Either.t
    val create_forced : 'b -> ('a, 'b) t
    val create_failed : exn -> ('a, 'b) t
    val log : unit -> log
    val force_logged : +Lazy_backtrack (ocaml.Lazy_backtrack)

    Module Lazy_backtrack

    type ('a, 'b) t
    type log
    val force : ('a -> 'b) -> ('a, 'b) t -> 'b
    val create : 'a -> ('a, 'b) t
    val get_arg : ('a, 'b) t -> 'a option
    val get_contents : ('a, 'b) t -> ('a, 'b) Stdlib.Either.t
    val create_forced : 'b -> ('a, 'b) t
    val create_failed : exn -> ('a, 'b) t
    val log : unit -> log
    val force_logged : log -> ('a -> ('b, 'c) result) -> ('a, ('b, 'c) result) t -> - ('b, 'c) result
    val backtrack : log -> unit
    \ No newline at end of file + ('b, 'c) result
    val backtrack : log -> unit
    diff --git a/ocaml/Lexer/index.html b/ocaml/Lexer/index.html index be55b45..ca3cf88 100644 --- a/ocaml/Lexer/index.html +++ b/ocaml/Lexer/index.html @@ -1,7 +1,7 @@ -Lexer (ocaml.Lexer)

    Module Lexer

    The lexical analyzer

    Warning: this module is unstable and part of compiler-libs.

    val init : unit -> unit
    val skip_hash_bang : Stdlib.Lexing.lexbuf -> unit
    type error =
    1. | Illegal_character of char
    2. | Illegal_escape of string * string option
    3. | Reserved_sequence of string * string option
    4. | Unterminated_comment of Location.t
    5. | Unterminated_string
    6. | Unterminated_string_in_comment of Location.t * Location.t
    7. | Empty_character_literal
    8. | Keyword_as_label of string
    9. | Invalid_literal of string
    10. | Invalid_directive of string * string option
    exception Error of error * Location.t
    val in_comment : unit -> bool
    val in_string : unit -> bool
    val print_warnings : bool ref
    val handle_docstrings : bool ref
    val comments : unit -> (string * Location.t) list
    val token_with_comments : Stdlib.Lexing.lexbuf -> Parser.token
    val set_preprocessor : +Lexer (ocaml.Lexer)

    Module Lexer

    The lexical analyzer

    Warning: this module is unstable and part of compiler-libs.

    val init : unit -> unit
    val skip_hash_bang : Stdlib.Lexing.lexbuf -> unit
    type error =
    1. | Illegal_character of char
    2. | Illegal_escape of string * string option
    3. | Reserved_sequence of string * string option
    4. | Unterminated_comment of Location.t
    5. | Unterminated_string
    6. | Unterminated_string_in_comment of Location.t * Location.t
    7. | Empty_character_literal
    8. | Keyword_as_label of string
    9. | Invalid_literal of string
    10. | Invalid_directive of string * string option
    exception Error of error * Location.t
    val in_comment : unit -> bool
    val in_string : unit -> bool
    val print_warnings : bool ref
    val handle_docstrings : bool ref
    val comments : unit -> (string * Location.t) list
    val token_with_comments : Stdlib.Lexing.lexbuf -> Parser.token
    val set_preprocessor : (unit -> unit) -> ((Stdlib.Lexing.lexbuf -> Parser.token) -> Stdlib.Lexing.lexbuf -> Parser.token) -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Lift_code/index.html b/ocaml/Lift_code/index.html index 83cd54a..05d60c1 100644 --- a/ocaml/Lift_code/index.html +++ b/ocaml/Lift_code/index.html @@ -1,7 +1,7 @@ -Lift_code (ocaml.Lift_code)

    Module Lift_code

    val lift_lets : lifter

    Lift let bindings to attempt to increase the length of scopes, as an aid to further optimizations. For example: let c = let b = <expr> in b, b in fst c would be transformed to: let b = <expr> in let c = b, b in fst c which is then clearly just: <expr>

    val lift_lets_expr : Flambda.t -> toplevel:bool -> Flambda.t
    val lifting_helper : +Lift_code (ocaml.Lift_code)

    Module Lift_code

    val lift_lets : lifter

    Lift let bindings to attempt to increase the length of scopes, as an aid to further optimizations. For example: let c = let b = <expr> in b, b in fst c would be transformed to: let b = <expr> in let c = b, b in fst c which is then clearly just: <expr>

    val lift_lets_expr : Flambda.t -> toplevel:bool -> Flambda.t
    val lifting_helper : Flambda.t list -> - evaluation_order:[ `Left_to_right | `Right_to_left ] -> - create_body:(Variable.t list -> Flambda.t) -> - name:Internal_variable_names.t -> - Flambda.t
    \ No newline at end of file + evaluation_order:[ `Left_to_right | `Right_to_left ] -> + create_body:(Variable.t list -> Flambda.t) -> + name:Internal_variable_names.t -> + Flambda.t
    diff --git a/ocaml/Lift_constants/index.html b/ocaml/Lift_constants/index.html index cfde9f7..c610d58 100644 --- a/ocaml/Lift_constants/index.html +++ b/ocaml/Lift_constants/index.html @@ -1,5 +1,5 @@ -Lift_constants (ocaml.Lift_constants)

    Module Lift_constants

    The aim of this pass is to assign symbols to values known to be constant (in other words, whose values we know at compile time), with appropriate sharing of constants, and replace the occurrences of the constants with their corresponding symbols.

    This pass uses the results of two other passes, Inconstant_idents and Alias_analysis. The relationship between these two deserves some attention.

    Inconstant_idents is a "backwards" analysis that propagates implications about inconstantness of variables and set of closures IDs.

    Alias_analysis is a "forwards" analysis that is analogous to the propagation of Simple_value_approx.t values during Inline_and_simplify. It gives us information about relationships between values but not actually about their constantness.

    Combining these two into a single pass has been attempted previously, but was not thought to be successful; this experiment could be repeated in the future. (If "constant" is considered as "top" and "inconstant" is considered as "bottom", then Alias_analysis corresponds to a least fixed point and Inconstant_idents corresponds to a greatest fixed point.)

    At a high level, this pass operates as follows. Symbols are assigned to variables known to be constant and their defining expressions examined. Based on the results of Alias_analysis, we simplify the destructive elements within the defining expressions (specifically, projection of fields from blocks), to eventually yield Flambda.constant_defining_values that are entirely constructive. These will be bound to symbols in the resulting program.

    Another approach to this pass could be to only use the results of Inconstant_idents and then repeatedly lift constants and run Inline_and_simplify until a fixpoint. It was thought more robust to instead use Alias_analysis, where the fixpointing involves a less complicated function.

    We still run Inline_and_simplify once after this pass since the lifting of constants may enable more functions to become closed; the simplification pass provides an easy way of cleaning up (e.g. making sure free_vars maps in sets of closures are correct).

    val lift_constants : +Lift_constants (ocaml.Lift_constants)

    Module Lift_constants

    The aim of this pass is to assign symbols to values known to be constant (in other words, whose values we know at compile time), with appropriate sharing of constants, and replace the occurrences of the constants with their corresponding symbols.

    This pass uses the results of two other passes, Inconstant_idents and Alias_analysis. The relationship between these two deserves some attention.

    Inconstant_idents is a "backwards" analysis that propagates implications about inconstantness of variables and set of closures IDs.

    Alias_analysis is a "forwards" analysis that is analogous to the propagation of Simple_value_approx.t values during Inline_and_simplify. It gives us information about relationships between values but not actually about their constantness.

    Combining these two into a single pass has been attempted previously, but was not thought to be successful; this experiment could be repeated in the future. (If "constant" is considered as "top" and "inconstant" is considered as "bottom", then Alias_analysis corresponds to a least fixed point and Inconstant_idents corresponds to a greatest fixed point.)

    At a high level, this pass operates as follows. Symbols are assigned to variables known to be constant and their defining expressions examined. Based on the results of Alias_analysis, we simplify the destructive elements within the defining expressions (specifically, projection of fields from blocks), to eventually yield Flambda.constant_defining_values that are entirely constructive. These will be bound to symbols in the resulting program.

    Another approach to this pass could be to only use the results of Inconstant_idents and then repeatedly lift constants and run Inline_and_simplify until a fixpoint. It was thought more robust to instead use Alias_analysis, where the fixpointing involves a less complicated function.

    We still run Inline_and_simplify once after this pass since the lifting of constants may enable more functions to become closed; the simplification pass provides an easy way of cleaning up (e.g. making sure free_vars maps in sets of closures are correct).

    val lift_constants : Flambda.program -> - backend:(module Backend_intf.S) -> - Flambda.program
    \ No newline at end of file + backend:(module Backend_intf.S) -> + Flambda.program
    diff --git a/ocaml/Lift_let_to_initialize_symbol/index.html b/ocaml/Lift_let_to_initialize_symbol/index.html index 2c9efd1..591277f 100644 --- a/ocaml/Lift_let_to_initialize_symbol/index.html +++ b/ocaml/Lift_let_to_initialize_symbol/index.html @@ -1,5 +1,5 @@ -Lift_let_to_initialize_symbol (ocaml.Lift_let_to_initialize_symbol)

    Module Lift_let_to_initialize_symbol

    val lift : - backend:(module Backend_intf.S) -> +Lift_let_to_initialize_symbol (ocaml.Lift_let_to_initialize_symbol)

    Module Lift_let_to_initialize_symbol

    val lift : + backend:(module Backend_intf.S) -> Flambda.program -> - Flambda.program

    Lift toplevel Let-expressions to Flambda program constructions such that the results of evaluation of such expressions may be accessed directly, through symbols, rather than through closures. The Let-expressions typically come from the compilation of modules (using the bytecode strategy) in Translmod.

    This means of compilation supersedes the old "transl_store_" methodology for native code.

    An Initialize_symbol construction generated by this pass may be subsequently rewritten to Let_symbol if it is discovered that the initializer is in fact constant. (See Initialize_symbol_to_let_symbol.)

    The program constructions generated by this pass will be joined by others that arise from the lifting of constants (see Lift_constants).

    \ No newline at end of file + Flambda.program

    Lift toplevel Let-expressions to Flambda program constructions such that the results of evaluation of such expressions may be accessed directly, through symbols, rather than through closures. The Let-expressions typically come from the compilation of modules (using the bytecode strategy) in Translmod.

    This means of compilation supersedes the old "transl_store_" methodology for native code.

    An Initialize_symbol construction generated by this pass may be subsequently rewritten to Let_symbol if it is discovered that the initializer is in fact constant. (See Initialize_symbol_to_let_symbol.)

    The program constructions generated by this pass will be joined by others that arise from the lifting of constants (see Lift_constants).

    diff --git a/ocaml/Linear/index.html b/ocaml/Linear/index.html index 7982c93..07dbd37 100644 --- a/ocaml/Linear/index.html +++ b/ocaml/Linear/index.html @@ -1,7 +1,7 @@ -Linear (ocaml.Linear)

    Module Linear

    type label = Cmm.label
    type instruction = {
    1. mutable desc : instruction_desc;
    2. mutable next : instruction;
    3. arg : Reg.t array;
    4. res : Reg.t array;
    5. dbg : Debuginfo.t;
    6. live : Reg.Set.t;
    }
    and instruction_desc =
    1. | Lprologue
    2. | Lend
    3. | Lop of Mach.operation
    4. | Lreloadretaddr
    5. | Lreturn
    6. | Llabel of label
    7. | Lbranch of label
    8. | Lcondbranch of Mach.test * label
    9. | Lcondbranch3 of label option * label option * label option
    10. | Lswitch of label array
    11. | Lentertrap
    12. | Ladjust_trap_depth of {
      1. delta_traps : int;
      }
    13. | Lpushtrap of {
      1. lbl_handler : label;
      }
    14. | Lpoptrap
    15. | Lraise of Lambda.raise_kind
    val has_fallthrough : instruction_desc -> bool
    val end_instr : instruction
    val instr_cons : +Linear (ocaml.Linear)

    Module Linear

    type label = Cmm.label
    type instruction = {
    1. mutable desc : instruction_desc;
    2. mutable next : instruction;
    3. arg : Reg.t array;
    4. res : Reg.t array;
    5. dbg : Debuginfo.t;
    6. live : Reg.Set.t;
    }
    and instruction_desc =
    1. | Lprologue
    2. | Lend
    3. | Lop of Mach.operation
    4. | Lreloadretaddr
    5. | Lreturn
    6. | Llabel of label
    7. | Lbranch of label
    8. | Lcondbranch of Mach.test * label
    9. | Lcondbranch3 of label option * label option * label option
    10. | Lswitch of label array
    11. | Lentertrap
    12. | Ladjust_trap_depth of {
      1. delta_traps : int;
      }
    13. | Lpushtrap of {
      1. lbl_handler : label;
      }
    14. | Lpoptrap
    15. | Lraise of Lambda.raise_kind
    val has_fallthrough : instruction_desc -> bool
    val end_instr : instruction
    val instr_cons : instruction_desc -> Reg.t array -> Reg.t array -> instruction -> - instruction
    val invert_test : Mach.test -> Mach.test
    type fundecl = {
    1. fun_name : string;
    2. fun_args : Reg.Set.t;
    3. fun_body : instruction;
    4. fun_fast : bool;
    5. fun_dbg : Debuginfo.t;
    6. fun_tailrec_entry_point_label : label;
    7. fun_contains_calls : bool;
    8. fun_num_stack_slots : int array;
    9. fun_frame_required : bool;
    10. fun_prologue_required : bool;
    }
    \ No newline at end of file + instruction
    val invert_test : Mach.test -> Mach.test
    type fundecl = {
    1. fun_name : string;
    2. fun_args : Reg.Set.t;
    3. fun_body : instruction;
    4. fun_fast : bool;
    5. fun_dbg : Debuginfo.t;
    6. fun_tailrec_entry_point_label : label;
    7. fun_contains_calls : bool;
    8. fun_num_stack_slots : int array;
    9. fun_frame_required : bool;
    10. fun_prologue_required : bool;
    }
    diff --git a/ocaml/Linear_format/index.html b/ocaml/Linear_format/index.html index 646740e..6f97a39 100644 --- a/ocaml/Linear_format/index.html +++ b/ocaml/Linear_format/index.html @@ -1,2 +1,2 @@ -Linear_format (ocaml.Linear_format)

    Module Linear_format

    type linear_item_info =
    1. | Func of Linear.fundecl
    2. | Data of Cmm.data_item list
    type linear_unit_info = {
    1. mutable unit_name : string;
    2. mutable items : linear_item_info list;
    3. mutable for_pack : string option;
    }
    val save : string -> linear_unit_info -> unit
    val restore : string -> linear_unit_info * Stdlib.Digest.t
    \ No newline at end of file +Linear_format (ocaml.Linear_format)

    Module Linear_format

    type linear_item_info =
    1. | Func of Linear.fundecl
    2. | Data of Cmm.data_item list
    type linear_unit_info = {
    1. mutable unit_name : string;
    2. mutable items : linear_item_info list;
    3. mutable for_pack : string option;
    }
    val save : string -> linear_unit_info -> unit
    val restore : string -> linear_unit_info * Stdlib.Digest.t
    diff --git a/ocaml/Linearize/index.html b/ocaml/Linearize/index.html index 7205adb..3d6ecf6 100644 --- a/ocaml/Linearize/index.html +++ b/ocaml/Linearize/index.html @@ -1,2 +1,2 @@ -Linearize (ocaml.Linearize)

    Module Linearize

    val fundecl : Mach.fundecl -> Linear.fundecl
    \ No newline at end of file +Linearize (ocaml.Linearize)

    Module Linearize

    val fundecl : Mach.fundecl -> Linear.fundecl
    diff --git a/ocaml/Linkage_name/Map/index.html b/ocaml/Linkage_name/Map/index.html index c0be76c..ef2ef12 100644 --- a/ocaml/Linkage_name/Map/index.html +++ b/ocaml/Linkage_name/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Linkage_name.Map)

    Module Linkage_name.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Linkage_name.Map)

    Module Linkage_name.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Linkage_name/Set/index.html b/ocaml/Linkage_name/Set/index.html index c77c7a5..3874cff 100644 --- a/ocaml/Linkage_name/Set/index.html +++ b/ocaml/Linkage_name/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Linkage_name.Set)

    Module Linkage_name.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Linkage_name.Set)

    Module Linkage_name.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Linkage_name/T/index.html b/ocaml/Linkage_name/T/index.html index 93e11f3..aacfe06 100644 --- a/ocaml/Linkage_name/T/index.html +++ b/ocaml/Linkage_name/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Linkage_name.T)

    Module Linkage_name.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Linkage_name.T)

    Module Linkage_name.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Linkage_name/Tbl/index.html b/ocaml/Linkage_name/Tbl/index.html index 8a97242..309c9bd 100644 --- a/ocaml/Linkage_name/Tbl/index.html +++ b/ocaml/Linkage_name/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Linkage_name.Tbl)

    Module Linkage_name.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Linkage_name.Tbl)

    Module Linkage_name.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Linkage_name/index.html b/ocaml/Linkage_name/index.html index d0210a6..6351ce4 100644 --- a/ocaml/Linkage_name/index.html +++ b/ocaml/Linkage_name/index.html @@ -1,2 +1,2 @@ -Linkage_name (ocaml.Linkage_name)

    Module Linkage_name

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : string -> t
    val to_string : t -> string
    \ No newline at end of file +Linkage_name (ocaml.Linkage_name)

    Module Linkage_name

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : string -> t
    val to_string : t -> string
    diff --git a/ocaml/Linscan/index.html b/ocaml/Linscan/index.html index f594a09..094f219 100644 --- a/ocaml/Linscan/index.html +++ b/ocaml/Linscan/index.html @@ -1,2 +1,2 @@ -Linscan (ocaml.Linscan)

    Module Linscan

    val allocate_registers : Interval.result -> int array
    \ No newline at end of file +Linscan (ocaml.Linscan)

    Module Linscan

    val allocate_registers : Interval.result -> int array
    diff --git a/ocaml/Liveness/index.html b/ocaml/Liveness/index.html index 33639bd..4ec2e55 100644 --- a/ocaml/Liveness/index.html +++ b/ocaml/Liveness/index.html @@ -1,2 +1,2 @@ -Liveness (ocaml.Liveness)

    Module Liveness

    val fundecl : Mach.fundecl -> unit
    \ No newline at end of file +Liveness (ocaml.Liveness)

    Module Liveness

    val fundecl : Mach.fundecl -> unit
    diff --git a/ocaml/Load_path/Dir/index.html b/ocaml/Load_path/Dir/index.html index 2ff5e16..7d87248 100644 --- a/ocaml/Load_path/Dir/index.html +++ b/ocaml/Load_path/Dir/index.html @@ -1,2 +1,2 @@ -Dir (ocaml.Load_path.Dir)

    Module Load_path.Dir

    type t

    Represent one directory in the load path.

    val create : string -> t
    val path : t -> string
    val files : t -> string list

    All the files in that directory. This doesn't include files in sub-directories of this directory.

    val find : t -> string -> string option

    find dir fn returns the full path to fn in dir.

    val find_uncap : t -> string -> string option

    As find, but search also for uncapitalized name, i.e. if name is Foo.ml, either /path/Foo.ml or /path/foo.ml may be returned.

    \ No newline at end of file +Dir (ocaml.Load_path.Dir)

    Module Load_path.Dir

    type t

    Represent one directory in the load path.

    val create : string -> t
    val path : t -> string
    val files : t -> string list

    All the files in that directory. This doesn't include files in sub-directories of this directory.

    val find : t -> string -> string option

    find dir fn returns the full path to fn in dir.

    val find_uncap : t -> string -> string option

    As find, but search also for uncapitalized name, i.e. if name is Foo.ml, either /path/Foo.ml or /path/foo.ml may be returned.

    diff --git a/ocaml/Load_path/index.html b/ocaml/Load_path/index.html index 4460951..f73dad1 100644 --- a/ocaml/Load_path/index.html +++ b/ocaml/Load_path/index.html @@ -1,5 +1,5 @@ -Load_path (ocaml.Load_path)

    Module Load_path

    Management of include directories.

    This module offers a high level interface to locating files in the load path, which is constructed from -I command line flags and a few other parameters.

    It makes the assumption that the contents of include directories doesn't change during the execution of the compiler.

    val add_dir : string -> unit

    Add a directory to the end of the load path (i.e. at lowest priority.)

    val remove_dir : string -> unit

    Remove a directory from the load path

    val reset : unit -> unit

    Remove all directories

    module Dir : sig ... end
    type auto_include_callback = +Load_path (ocaml.Load_path)

    Module Load_path

    Management of include directories.

    This module offers a high level interface to locating files in the load path, which is constructed from -I command line flags and a few other parameters.

    It makes the assumption that the contents of include directories doesn't change during the execution of the compiler.

    val add_dir : string -> unit

    Add a directory to the end of the load path (i.e. at lowest priority.)

    val remove_dir : string -> unit

    Remove a directory from the load path

    val reset : unit -> unit

    Remove all directories

    module Dir : sig ... end
    type auto_include_callback = (Dir.t -> string -> string option) -> string -> - string

    The type of callback functions on for init ~auto_include

    val no_auto_include : auto_include_callback

    No automatic directory inclusion: misses in the load path raise Not_found as normal.

    val init : auto_include:auto_include_callback -> string list -> unit

    init l is the same as reset (); List.iter add_dir (List.rev l)

    val auto_include_otherlibs : (string -> unit) -> auto_include_callback

    auto_include_otherlibs alert is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after calling alert lib.

    val get_paths : unit -> string list

    Return the list of directories passed to add_dir so far.

    val find : string -> string

    Locate a file in the load path. Raise Not_found if the file cannot be found. This function is optimized for the case where the filename is a basename, i.e. doesn't contain a directory separator.

    val find_uncap : string -> string

    Same as find, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

    val add : Dir.t -> unit

    Old name for append_dir

    • deprecated
    val append_dir : Dir.t -> unit

    append_dir d adds d to the end of the load path (i.e. at lowest priority.

    val prepend_dir : Dir.t -> unit

    prepend_dir d adds d to the start of the load path (i.e. at highest priority.

    val get : unit -> Dir.t list

    Same as get_paths (), except that it returns a Dir.t list.

    \ No newline at end of file + string

    The type of callback functions on for init ~auto_include

    val no_auto_include : auto_include_callback

    No automatic directory inclusion: misses in the load path raise Not_found as normal.

    val init : auto_include:auto_include_callback -> string list -> unit

    init l is the same as reset (); List.iter add_dir (List.rev l)

    val auto_include_otherlibs : (string -> unit) -> auto_include_callback

    auto_include_otherlibs alert is a callback function to be passed to Load_path.init and automatically adds -I +lib to the load path after calling alert lib.

    val get_paths : unit -> string list

    Return the list of directories passed to add_dir so far.

    val find : string -> string

    Locate a file in the load path. Raise Not_found if the file cannot be found. This function is optimized for the case where the filename is a basename, i.e. doesn't contain a directory separator.

    val find_uncap : string -> string

    Same as find, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

    val add : Dir.t -> unit

    Old name for append_dir

    • deprecated
    val append_dir : Dir.t -> unit

    append_dir d adds d to the end of the load path (i.e. at lowest priority.

    val prepend_dir : Dir.t -> unit

    prepend_dir d adds d to the start of the load path (i.e. at highest priority.

    val get : unit -> Dir.t list

    Same as get_paths (), except that it returns a Dir.t list.

    diff --git a/ocaml/Local_store/index.html b/ocaml/Local_store/index.html index 464cd0d..36cbc49 100644 --- a/ocaml/Local_store/index.html +++ b/ocaml/Local_store/index.html @@ -1,2 +1,2 @@ -Local_store (ocaml.Local_store)

    Module Local_store

    This module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.

    It is used throughout the frontend (read: typechecker), to register all (well, hopefully) the global state. Thus making it easy for tools like Merlin to go back and forth typechecking different files.

    Creators

    val s_ref : 'a -> 'a ref

    Similar to Stdlib.ref, except the allocated reference is registered into the store.

    val s_table : ('a -> 'b) -> 'a -> 'b ref

    Used to register hash tables. Those also need to be placed into refs to be easily swapped out, but one can't just "snapshot" the initial value to create fresh instances, so instead an initializer is required.

    Use it like this:

    let my_table = s_table Hashtbl.create 42

    State management

    Note: all the following functions are currently unused inside the compiler codebase. Merlin is their only user at the moment.

    type store
    val fresh : unit -> store

    Returns a fresh instance of the store.

    The first time this function is called, it snapshots the value of all the registered references, later calls to fresh will return instances initialized to those values.

    val with_store : store -> (unit -> 'a) -> 'a

    with_store s f resets all the registered references to the value they have in s for the run of f. If f updates any of the registered refs, s is updated to remember those changes.

    val reset : unit -> unit

    Resets all the references to the initial snapshot (i.e. to the same values that new instances start with).

    val is_bound : unit -> bool

    Returns true when a store is active (i.e. when called from the callback passed to with_store), false otherwise.

    \ No newline at end of file +Local_store (ocaml.Local_store)

    Module Local_store

    This module provides some facilities for creating references (and hash tables) which can easily be snapshoted and restored to an arbitrary version.

    It is used throughout the frontend (read: typechecker), to register all (well, hopefully) the global state. Thus making it easy for tools like Merlin to go back and forth typechecking different files.

    Creators

    val s_ref : 'a -> 'a ref

    Similar to Stdlib.ref, except the allocated reference is registered into the store.

    val s_table : ('a -> 'b) -> 'a -> 'b ref

    Used to register hash tables. Those also need to be placed into refs to be easily swapped out, but one can't just "snapshot" the initial value to create fresh instances, so instead an initializer is required.

    Use it like this:

      let my_table = s_table Hashtbl.create 42

    State management

    Note: all the following functions are currently unused inside the compiler codebase. Merlin is their only user at the moment.

    type store
    val fresh : unit -> store

    Returns a fresh instance of the store.

    The first time this function is called, it snapshots the value of all the registered references, later calls to fresh will return instances initialized to those values.

    val with_store : store -> (unit -> 'a) -> 'a

    with_store s f resets all the registered references to the value they have in s for the run of f. If f updates any of the registered refs, s is updated to remember those changes.

    val reset : unit -> unit

    Resets all the references to the initial snapshot (i.e. to the same values that new instances start with).

    val is_bound : unit -> bool

    Returns true when a store is active (i.e. when called from the callback passed to with_store), false otherwise.

    diff --git a/ocaml/Location/index.html b/ocaml/Location/index.html index 07d3099..565839b 100644 --- a/ocaml/Location/index.html +++ b/ocaml/Location/index.html @@ -1,9 +1,9 @@ -Location (ocaml.Location)

    Module Location

    Source code locations (ranges of positions), used in parsetree.

    Warning: this module is unstable and part of compiler-libs.

    type t = Warnings.loc = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }

    Note on the use of Lexing.position in this module. If pos_fname = "", then use !input_name instead. If pos_lnum = -1, then pos_bol = 0. Use pos_cnum and re-parse the file to get the line and character numbers. Else all fields are correct.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    val is_none : t -> bool

    True for Location.none, false any other location

    val in_file : string -> t

    Return an empty ghost range located in a given file.

    val init : Stdlib.Lexing.lexbuf -> string -> unit

    Set the file name and line number of the lexbuf to be the start of the named file.

    val curr : Stdlib.Lexing.lexbuf -> t

    Get the location of the current token from the lexbuf.

    val symbol_rloc : unit -> t
    val symbol_gloc : unit -> t
    val rhs_loc : int -> t

    rhs_loc n returns the location of the symbol at position n, starting at 1, in the current parser rule.

    val rhs_interval : int -> int -> t
    val get_pos_info : Stdlib.Lexing.position -> string * int * int

    file, line, char

    type 'a loc = {
    1. txt : 'a;
    2. loc : t;
    }
    val mknoloc : 'a -> 'a loc
    val mkloc : 'a -> t -> 'a loc

    Input info

    val input_name : string ref
    val input_lexbuf : Stdlib.Lexing.lexbuf option ref
    val input_phrase_buffer : Stdlib.Buffer.t option ref

    Toplevel-specific functions

    val echo_eof : unit -> unit
    val separate_new_message : Stdlib.Format.formatter -> unit
    val reset : unit -> unit

    Rewriting path

    val rewrite_absolute_path : string -> string

    rewrite_absolute_path path rewrites path to honor the BUILD_PATH_PREFIX_MAP variable if it is set. It does not check whether path is absolute or not. The result is as follows:

    • If BUILD_PATH_PREFIX_MAP is not set, just return path.
    • otherwise, rewrite using the mapping (and if there are no matching prefixes that will just return path).

    See the BUILD_PATH_PREFIX_MAP spec

    val rewrite_find_first_existing : string -> string option

    rewrite_find_first_existing path uses a BUILD_PATH_PREFIX_MAP mapping and tries to find a source in mapping that maps to a result that exists in the file system. There are the following return values:

    • None, means either

      • BUILD_PATH_PREFIX_MAP is not set and path does not exists, or
      • no source prefixes of path in the mapping were found,
    • Some target, means target exists and either

      • BUILD_PATH_PREFIX_MAP is not set and target = path, or
      • target is the first file (in priority order) that path mapped to that exists in the file system.
    • Not_found raised, means some source prefixes in the map were found that matched path, but none of them existed in the file system. The caller should catch this and issue an appropriate error message.

    See the BUILD_PATH_PREFIX_MAP spec

    val rewrite_find_all_existing_dirs : string -> string list

    rewrite_find_all_existing_dirs dir accumulates a list of existing directories, dirs, that are the result of mapping a potentially abstract directory, dir, over all the mapping pairs in the BUILD_PATH_PREFIX_MAP environment variable, if any. The list dirs will be in priority order (head as highest priority).

    The possible results are:

    • [], means either

      • BUILD_PATH_PREFIX_MAP is not set and dir is not an existing directory, or
      • if set, then there were no matching prefixes of dir.
    • Some dirs, means dirs are the directories found. Either

      • BUILD_PATH_PREFIX_MAP is not set and dirs = [dir], or
      • it was set and dirs are the mapped existing directories.
    • Not_found raised, means some source prefixes in the map were found that matched dir, but none of mapping results were existing directories (possibly due to misconfiguration). The caller should catch this and issue an appropriate error message.

    See the BUILD_PATH_PREFIX_MAP spec

    val absolute_path : string -> string

    absolute_path path first makes an absolute path, s from path, prepending the current working directory if path was relative. Then s is rewritten using rewrite_absolute_path. Finally the result is normalized by eliminating instances of '.' or '..'.

    Printing locations

    val show_filename : string -> string

    In -absname mode, return the absolute path for this filename. Otherwise, returns the filename unchanged.

    val print_filename : Stdlib.Format.formatter -> string -> unit
    val print_loc : Stdlib.Format.formatter -> t -> unit
    val print_locs : Stdlib.Format.formatter -> t list -> unit

    Toplevel-specific location highlighting

    val highlight_terminfo : +Location (ocaml.Location)

    Module Location

    Source code locations (ranges of positions), used in parsetree.

    Warning: this module is unstable and part of compiler-libs.

    type t = Warnings.loc = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }

    Note on the use of Lexing.position in this module. If pos_fname = "", then use !input_name instead. If pos_lnum = -1, then pos_bol = 0. Use pos_cnum and re-parse the file to get the line and character numbers. Else all fields are correct.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    val is_none : t -> bool

    True for Location.none, false any other location

    val in_file : string -> t

    Return an empty ghost range located in a given file.

    val init : Stdlib.Lexing.lexbuf -> string -> unit

    Set the file name and line number of the lexbuf to be the start of the named file.

    val curr : Stdlib.Lexing.lexbuf -> t

    Get the location of the current token from the lexbuf.

    val symbol_rloc : unit -> t
    val symbol_gloc : unit -> t
    val rhs_loc : int -> t

    rhs_loc n returns the location of the symbol at position n, starting at 1, in the current parser rule.

    val rhs_interval : int -> int -> t
    val get_pos_info : Stdlib.Lexing.position -> string * int * int

    file, line, char

    type 'a loc = {
    1. txt : 'a;
    2. loc : t;
    }
    val mknoloc : 'a -> 'a loc
    val mkloc : 'a -> t -> 'a loc

    Input info

    val input_name : string ref
    val input_lexbuf : Stdlib.Lexing.lexbuf option ref
    val input_phrase_buffer : Stdlib.Buffer.t option ref

    Toplevel-specific functions

    val echo_eof : unit -> unit
    val separate_new_message : Stdlib.Format.formatter -> unit
    val reset : unit -> unit

    Rewriting path

    val rewrite_absolute_path : string -> string

    rewrite_absolute_path path rewrites path to honor the BUILD_PATH_PREFIX_MAP variable if it is set. It does not check whether path is absolute or not. The result is as follows:

    • If BUILD_PATH_PREFIX_MAP is not set, just return path.
    • otherwise, rewrite using the mapping (and if there are no matching prefixes that will just return path).

    See the BUILD_PATH_PREFIX_MAP spec

    val rewrite_find_first_existing : string -> string option

    rewrite_find_first_existing path uses a BUILD_PATH_PREFIX_MAP mapping and tries to find a source in mapping that maps to a result that exists in the file system. There are the following return values:

    • None, means either

      • BUILD_PATH_PREFIX_MAP is not set and path does not exists, or
      • no source prefixes of path in the mapping were found,
    • Some target, means target exists and either

      • BUILD_PATH_PREFIX_MAP is not set and target = path, or
      • target is the first file (in priority order) that path mapped to that exists in the file system.
    • Not_found raised, means some source prefixes in the map were found that matched path, but none of them existed in the file system. The caller should catch this and issue an appropriate error message.

    See the BUILD_PATH_PREFIX_MAP spec

    val rewrite_find_all_existing_dirs : string -> string list

    rewrite_find_all_existing_dirs dir accumulates a list of existing directories, dirs, that are the result of mapping a potentially abstract directory, dir, over all the mapping pairs in the BUILD_PATH_PREFIX_MAP environment variable, if any. The list dirs will be in priority order (head as highest priority).

    The possible results are:

    • [], means either

      • BUILD_PATH_PREFIX_MAP is not set and dir is not an existing directory, or
      • if set, then there were no matching prefixes of dir.
    • Some dirs, means dirs are the directories found. Either

      • BUILD_PATH_PREFIX_MAP is not set and dirs = [dir], or
      • it was set and dirs are the mapped existing directories.
    • Not_found raised, means some source prefixes in the map were found that matched dir, but none of mapping results were existing directories (possibly due to misconfiguration). The caller should catch this and issue an appropriate error message.

    See the BUILD_PATH_PREFIX_MAP spec

    val absolute_path : string -> string

    absolute_path path first makes an absolute path, s from path, prepending the current working directory if path was relative. Then s is rewritten using rewrite_absolute_path. Finally the result is normalized by eliminating instances of '.' or '..'.

    Printing locations

    val show_filename : string -> string

    In -absname mode, return the absolute path for this filename. Otherwise, returns the filename unchanged.

    val print_filename : Stdlib.Format.formatter -> string -> unit
    val print_loc : Stdlib.Format.formatter -> t -> unit
    val print_locs : Stdlib.Format.formatter -> t list -> unit

    Toplevel-specific location highlighting

    val highlight_terminfo : Stdlib.Lexing.lexbuf -> Stdlib.Format.formatter -> t list -> - unit

    Reporting errors and warnings

    The type of reports and report printers

    type msg = (Stdlib.Format.formatter -> unit) loc
    val msg : ?loc:t -> ('a, Stdlib.Format.formatter, unit, msg) format4 -> 'a
    type report_kind =
    1. | Report_error
    2. | Report_warning of string
    3. | Report_warning_as_error of string
    4. | Report_alert of string
    5. | Report_alert_as_error of string
    type report = {
    1. kind : report_kind;
    2. main : msg;
    3. sub : msg list;
    }
    type report_printer = {
    1. pp : report_printer -> Stdlib.Format.formatter -> report -> unit;
    2. pp_report_kind : report_printer -> + unit

    Reporting errors and warnings

    The type of reports and report printers

    type msg = (Stdlib.Format.formatter -> unit) loc
    val msg : ?loc:t -> ('a, Stdlib.Format.formatter, unit, msg) format4 -> 'a
    type report_kind =
    1. | Report_error
    2. | Report_warning of string
    3. | Report_warning_as_error of string
    4. | Report_alert of string
    5. | Report_alert_as_error of string
    type report = {
    1. kind : report_kind;
    2. main : msg;
    3. sub : msg list;
    }
    type report_printer = {
    1. pp : report_printer -> Stdlib.Format.formatter -> report -> unit;
    2. pp_report_kind : report_printer -> report -> Stdlib.Format.formatter -> report_kind -> @@ -23,20 +23,20 @@ report -> Stdlib.Format.formatter -> (Stdlib.Format.formatter -> unit) -> - unit;
    }

    A printer for reports, defined using open-recursion. The goal is to make it easy to define new printers by re-using code from existing ones.

    Report printers used in the compiler

    val batch_mode_printer : report_printer
    val terminfo_toplevel_printer : Stdlib.Lexing.lexbuf -> report_printer
    val best_toplevel_printer : unit -> report_printer

    Detects the terminal capabilities and selects an adequate printer

    Printing a report

    val print_report : Stdlib.Format.formatter -> report -> unit

    Display an error or warning report.

    val report_printer : (unit -> report_printer) ref

    Hook for redefining the printer of reports.

    The hook is a unit -> report_printer and not simply a report_printer: this is useful so that it can detect the type of the output (a file, a terminal, ...) and select a printer accordingly.

    val default_report_printer : unit -> report_printer

    Original report printer for use in hooks.

    Reporting warnings

    Converting a Warnings.t into a report

    val report_warning : t -> Warnings.t -> report option

    report_warning loc w produces a report for the given warning w, or None if the warning is not to be printed.

    val warning_reporter : (t -> Warnings.t -> report option) ref

    Hook for intercepting warnings.

    val default_warning_reporter : t -> Warnings.t -> report option

    Original warning reporter for use in hooks.

    Printing warnings

    val formatter_for_warnings : Stdlib.Format.formatter ref
    val print_warning : t -> Stdlib.Format.formatter -> Warnings.t -> unit

    Prints a warning. This is simply the composition of report_warning and print_report.

    val prerr_warning : t -> Warnings.t -> unit

    Same as print_warning, but uses !formatter_for_warnings as output formatter.

    Reporting alerts

    Converting an Alert.t into a report

    val report_alert : t -> Warnings.alert -> report option

    report_alert loc w produces a report for the given alert w, or None if the alert is not to be printed.

    val alert_reporter : (t -> Warnings.alert -> report option) ref

    Hook for intercepting alerts.

    val default_alert_reporter : t -> Warnings.alert -> report option

    Original alert reporter for use in hooks.

    Printing alerts

    val print_alert : t -> Stdlib.Format.formatter -> Warnings.alert -> unit

    Prints an alert. This is simply the composition of report_alert and print_report.

    val prerr_alert : t -> Warnings.alert -> unit

    Same as print_alert, but uses !formatter_for_warnings as output formatter.

    val deprecated : ?def:t -> ?use:t -> t -> string -> unit

    Prints a deprecation alert.

    val alert : ?def:t -> ?use:t -> kind:string -> t -> string -> unit

    Prints an arbitrary alert.

    val auto_include_alert : string -> unit

    Prints an alert that -I +lib has been automatically added to the load path

    val deprecated_script_alert : string -> unit

    deprecated_script_alert command prints an alert that command foo has been deprecated in favour of command ./foo

    Reporting errors

    type error = report

    An error is a report which report_kind must be Report_error.

    val error : ?loc:t -> ?sub:msg list -> string -> error
    val errorf : - ?loc:t -> - ?sub:msg list -> + unit;}

    A printer for reports, defined using open-recursion. The goal is to make it easy to define new printers by re-using code from existing ones.

    Report printers used in the compiler

    val batch_mode_printer : report_printer
    val terminfo_toplevel_printer : Stdlib.Lexing.lexbuf -> report_printer
    val best_toplevel_printer : unit -> report_printer

    Detects the terminal capabilities and selects an adequate printer

    Printing a report

    val print_report : Stdlib.Format.formatter -> report -> unit

    Display an error or warning report.

    val report_printer : (unit -> report_printer) ref

    Hook for redefining the printer of reports.

    The hook is a unit -> report_printer and not simply a report_printer: this is useful so that it can detect the type of the output (a file, a terminal, ...) and select a printer accordingly.

    val default_report_printer : unit -> report_printer

    Original report printer for use in hooks.

    Reporting warnings

    Converting a Warnings.t into a report

    val report_warning : t -> Warnings.t -> report option

    report_warning loc w produces a report for the given warning w, or None if the warning is not to be printed.

    val warning_reporter : (t -> Warnings.t -> report option) ref

    Hook for intercepting warnings.

    val default_warning_reporter : t -> Warnings.t -> report option

    Original warning reporter for use in hooks.

    Printing warnings

    val formatter_for_warnings : Stdlib.Format.formatter ref
    val print_warning : t -> Stdlib.Format.formatter -> Warnings.t -> unit

    Prints a warning. This is simply the composition of report_warning and print_report.

    val prerr_warning : t -> Warnings.t -> unit

    Same as print_warning, but uses !formatter_for_warnings as output formatter.

    Reporting alerts

    Converting an Alert.t into a report

    val report_alert : t -> Warnings.alert -> report option

    report_alert loc w produces a report for the given alert w, or None if the alert is not to be printed.

    val alert_reporter : (t -> Warnings.alert -> report option) ref

    Hook for intercepting alerts.

    val default_alert_reporter : t -> Warnings.alert -> report option

    Original alert reporter for use in hooks.

    Printing alerts

    val print_alert : t -> Stdlib.Format.formatter -> Warnings.alert -> unit

    Prints an alert. This is simply the composition of report_alert and print_report.

    val prerr_alert : t -> Warnings.alert -> unit

    Same as print_alert, but uses !formatter_for_warnings as output formatter.

    val deprecated : ?def:t -> ?use:t -> t -> string -> unit

    Prints a deprecation alert.

    val alert : ?def:t -> ?use:t -> kind:string -> t -> string -> unit

    Prints an arbitrary alert.

    val auto_include_alert : string -> unit

    Prints an alert that -I +lib has been automatically added to the load path

    val deprecated_script_alert : string -> unit

    deprecated_script_alert command prints an alert that command foo has been deprecated in favour of command ./foo

    Reporting errors

    type error = report

    An error is a report which report_kind must be Report_error.

    val error : ?loc:t -> ?sub:msg list -> string -> error
    val errorf : + ?loc:t -> + ?sub:msg list -> ('a, Stdlib.Format.formatter, unit, error) format4 -> 'a
    val error_of_printer : - ?loc:t -> - ?sub:msg list -> + ?loc:t -> + ?sub:msg list -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> error
    val error_of_printer_file : (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> error

    Automatically reporting errors for raised exceptions

    val register_error_of_exn : (exn -> error option) -> unit

    Each compiler module which defines a custom type of exception which can surface as a user-visible error should register a "printer" for this exception using register_error_of_exn. The result of the printer is an error value containing a location, a message, and optionally sub-messages (each of them being located as well).

    val error_of_exn : exn -> [ `Ok of error | `Already_displayed ] option
    exception Error of error

    Raising Error e signals an error e; the exception will be caught and the error will be printed.

    exception Already_displayed_error

    Raising Already_displayed_error signals an error which has already been printed. The exception will be caught, but nothing will be printed

    val raise_errorf : - ?loc:t -> - ?sub:msg list -> + ?loc:t -> + ?sub:msg list -> ('a, Stdlib.Format.formatter, unit, 'b) format4 -> - 'a
    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Reraise the exception if it is unknown.

    \ No newline at end of file + 'a
    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Reraise the exception if it is unknown.

    diff --git a/ocaml/Longident/index.html b/ocaml/Longident/index.html index c0d9d40..9a0cbe5 100644 --- a/ocaml/Longident/index.html +++ b/ocaml/Longident/index.html @@ -1,3 +1,3 @@ -Longident (ocaml.Longident)

    Module Longident

    Long identifiers, used in parsetree.

    Warning: this module is unstable and part of compiler-libs.

    To print a longident, see Pprintast.longident, using Format.asprintf to convert to a string.

    type t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t
    val flatten : t -> string list
    val unflatten : string list -> t option

    For a non-empty list l, unflatten l is Some lid where lid is the long identifier created by concatenating the elements of l with Ldot. unflatten [] is None.

    val last : t -> string
    val parse : string -> t

    This function is broken on identifiers that are not just "Word.Word.word"; for example, it returns incorrect results on infix operators and extended module paths.

    If you want to generate long identifiers that are a list of dot-separated identifiers, the function unflatten is safer and faster. unflatten is available since OCaml 4.06.0.

    If you want to parse any identifier correctly, use the long-identifiers functions from the Parse module, in particular Parse.longident. They are available since OCaml 4.11, and also provide proper input-location support.

    • deprecated this function may misparse its input, -use "Parse.longident" or "Longident.unflatten"
    \ No newline at end of file +Longident (ocaml.Longident)

    Module Longident

    Long identifiers, used in parsetree.

    Warning: this module is unstable and part of compiler-libs.

    To print a longident, see Pprintast.longident, using Format.asprintf to convert to a string.

    type t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t
    val flatten : t -> string list
    val unflatten : string list -> t option

    For a non-empty list l, unflatten l is Some lid where lid is the long identifier created by concatenating the elements of l with Ldot. unflatten [] is None.

    val last : t -> string
    val parse : string -> t

    This function is broken on identifiers that are not just "Word.Word.word"; for example, it returns incorrect results on infix operators and extended module paths.

    If you want to generate long identifiers that are a list of dot-separated identifiers, the function unflatten is safer and faster. unflatten is available since OCaml 4.06.0.

    If you want to parse any identifier correctly, use the long-identifiers functions from the Parse module, in particular Parse.longident. They are available since OCaml 4.11, and also provide proper input-location support.

    • deprecated this function may misparse its input, +use "Parse.longident" or "Longident.unflatten"
    diff --git a/ocaml/Mach/index.html b/ocaml/Mach/index.html index 63187b4..567eb2d 100644 --- a/ocaml/Mach/index.html +++ b/ocaml/Mach/index.html @@ -1,5 +1,5 @@ -Mach (ocaml.Mach)

    Module Mach

    type integer_comparison =
    1. | Isigned of Cmm.integer_comparison
    2. | Iunsigned of Cmm.integer_comparison
    type integer_operation =
    1. | Iadd
    2. | Isub
    3. | Imul
    4. | Imulh
    5. | Idiv
    6. | Imod
    7. | Iand
    8. | Ior
    9. | Ixor
    10. | Ilsl
    11. | Ilsr
    12. | Iasr
    13. | Icomp of integer_comparison
    14. | Icheckbound
    type float_comparison = Cmm.float_comparison
    type test =
    1. | Itruetest
    2. | Ifalsetest
    3. | Iinttest of integer_comparison
    4. | Iinttest_imm of integer_comparison * int
    5. | Ifloattest of float_comparison
    6. | Ioddtest
    7. | Ieventest
    type operation =
    1. | Imove
    2. | Ispill
    3. | Ireload
    4. | Iconst_int of nativeint
    5. | Iconst_float of int64
    6. | Iconst_symbol of string
    7. | Icall_ind
    8. | Icall_imm of {
      1. func : string;
      }
    9. | Itailcall_ind
    10. | Itailcall_imm of {
      1. func : string;
      }
    11. | Iextcall of {
      1. func : string;
      2. ty_res : Cmm.machtype;
      3. ty_args : Cmm.exttype list;
      4. alloc : bool;
      5. stack_ofs : int;
      }
    12. | Istackoffset of int
    13. | Iload of {
      1. memory_chunk : Cmm.memory_chunk;
      2. addressing_mode : Arch.addressing_mode;
      3. mutability : Asttypes.mutable_flag;
      4. is_atomic : bool;
      }
    14. | Istore of Cmm.memory_chunk * Arch.addressing_mode * bool
    15. | Ialloc of {
      1. bytes : int;
      2. dbginfo : Debuginfo.alloc_dbginfo;
      }
    16. | Iintop of integer_operation
    17. | Iintop_imm of integer_operation * int
    18. | Icompf of float_comparison
    19. | Inegf
    20. | Iabsf
    21. | Iaddf
    22. | Isubf
    23. | Imulf
    24. | Idivf
    25. | Ifloatofint
    26. | Iintoffloat
    27. | Iopaque
    28. | Ispecific of Arch.specific_operation
    29. | Ipoll of {
      1. return_label : Cmm.label option;
      }
    30. | Idls_get
    type instruction = {
    1. desc : instruction_desc;
    2. next : instruction;
    3. arg : Reg.t array;
    4. res : Reg.t array;
    5. dbg : Debuginfo.t;
    6. mutable live : Reg.Set.t;
    }
    and instruction_desc =
    1. | Iend
    2. | Iop of operation
    3. | Ireturn
    4. | Iifthenelse of test * instruction * instruction
    5. | Iswitch of int array * instruction array
    6. | Icatch of Cmm.rec_flag * (int * instruction) list * instruction
    7. | Iexit of int
    8. | Itrywith of instruction * instruction
    9. | Iraise of Lambda.raise_kind
    type fundecl = {
    1. fun_name : string;
    2. fun_args : Reg.t array;
    3. fun_body : instruction;
    4. fun_codegen_options : Cmm.codegen_option list;
    5. fun_dbg : Debuginfo.t;
    6. fun_poll : Lambda.poll_attribute;
    7. fun_num_stack_slots : int array;
    8. fun_contains_calls : bool;
    }
    val dummy_instr : instruction
    val end_instr : unit -> instruction
    val instr_cons : +Mach (ocaml.Mach)

    Module Mach

    type integer_comparison =
    1. | Isigned of Cmm.integer_comparison
    2. | Iunsigned of Cmm.integer_comparison
    type integer_operation =
    1. | Iadd
    2. | Isub
    3. | Imul
    4. | Imulh
    5. | Idiv
    6. | Imod
    7. | Iand
    8. | Ior
    9. | Ixor
    10. | Ilsl
    11. | Ilsr
    12. | Iasr
    13. | Icomp of integer_comparison
    14. | Icheckbound
    type float_comparison = Cmm.float_comparison
    type test =
    1. | Itruetest
    2. | Ifalsetest
    3. | Iinttest of integer_comparison
    4. | Iinttest_imm of integer_comparison * int
    5. | Ifloattest of float_comparison
    6. | Ioddtest
    7. | Ieventest
    type operation =
    1. | Imove
    2. | Ispill
    3. | Ireload
    4. | Iconst_int of nativeint
    5. | Iconst_float of int64
    6. | Iconst_symbol of string
    7. | Icall_ind
    8. | Icall_imm of {
      1. func : string;
      }
    9. | Itailcall_ind
    10. | Itailcall_imm of {
      1. func : string;
      }
    11. | Iextcall of {
      1. func : string;
      2. ty_res : Cmm.machtype;
      3. ty_args : Cmm.exttype list;
      4. alloc : bool;
      5. stack_ofs : int;
      }
    12. | Istackoffset of int
    13. | Iload of {
      1. memory_chunk : Cmm.memory_chunk;
      2. addressing_mode : Arch.addressing_mode;
      3. mutability : Asttypes.mutable_flag;
      4. is_atomic : bool;
      }
    14. | Istore of Cmm.memory_chunk * Arch.addressing_mode * bool
    15. | Ialloc of {
      1. bytes : int;
      2. dbginfo : Debuginfo.alloc_dbginfo;
      }
    16. | Iintop of integer_operation
    17. | Iintop_imm of integer_operation * int
    18. | Icompf of float_comparison
    19. | Inegf
    20. | Iabsf
    21. | Iaddf
    22. | Isubf
    23. | Imulf
    24. | Idivf
    25. | Ifloatofint
    26. | Iintoffloat
    27. | Iopaque
    28. | Ispecific of Arch.specific_operation
    29. | Ipoll of {
      1. return_label : Cmm.label option;
      }
    30. | Idls_get
    type instruction = {
    1. desc : instruction_desc;
    2. next : instruction;
    3. arg : Reg.t array;
    4. res : Reg.t array;
    5. dbg : Debuginfo.t;
    6. mutable live : Reg.Set.t;
    }
    and instruction_desc =
    1. | Iend
    2. | Iop of operation
    3. | Ireturn
    4. | Iifthenelse of test * instruction * instruction
    5. | Iswitch of int array * instruction array
    6. | Icatch of Cmm.rec_flag * (int * instruction) list * instruction
    7. | Iexit of int
    8. | Itrywith of instruction * instruction
    9. | Iraise of Lambda.raise_kind
    type fundecl = {
    1. fun_name : string;
    2. fun_args : Reg.t array;
    3. fun_body : instruction;
    4. fun_codegen_options : Cmm.codegen_option list;
    5. fun_dbg : Debuginfo.t;
    6. fun_poll : Lambda.poll_attribute;
    7. fun_num_stack_slots : int array;
    8. fun_contains_calls : bool;
    }
    val dummy_instr : instruction
    val end_instr : unit -> instruction
    val instr_cons : instruction_desc -> Reg.t array -> Reg.t array -> @@ -10,4 +10,4 @@ Reg.t array -> Debuginfo.t -> instruction -> - instruction
    val instr_iter : (instruction -> unit) -> instruction -> unit
    val operation_is_pure : operation -> bool

    Returns true if the given operation only produces a result in its destination registers, but has no side effects whatsoever: it doesn't raise exceptions, it doesn't modify already-allocated blocks, it doesn't adjust the stack frame, etc.

    val operation_can_raise : operation -> bool

    Returns true if the given operation can raise an exception.

    \ No newline at end of file + instruction
    val instr_iter : (instruction -> unit) -> instruction -> unit
    val operation_is_pure : operation -> bool

    Returns true if the given operation only produces a result in its destination registers, but has no side effects whatsoever: it doesn't raise exceptions, it doesn't modify already-allocated blocks, it doesn't adjust the stack frame, etc.

    val operation_can_raise : operation -> bool

    Returns true if the given operation can raise an exception.

    diff --git a/ocaml/Main/index.html b/ocaml/Main/index.html index cb346a0..1d208d9 100644 --- a/ocaml/Main/index.html +++ b/ocaml/Main/index.html @@ -1,2 +1,2 @@ -Main (ocaml.Main)

    Module Main

    \ No newline at end of file +Main (ocaml.Main)

    Module Main

    diff --git a/ocaml/Main_args/Default/Main/index.html b/ocaml/Main_args/Default/Main/index.html index 62fa544..7897217 100644 --- a/ocaml/Main_args/Default/Main/index.html +++ b/ocaml/Main_args/Default/Main/index.html @@ -1,2 +1,2 @@ -Main (ocaml.Main_args.Default.Main)

    Module Default.Main

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    \ No newline at end of file +Main (ocaml.Main_args.Default.Main)

    Module Default.Main

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    diff --git a/ocaml/Main_args/Default/Odoc_args/index.html b/ocaml/Main_args/Default/Odoc_args/index.html index accfa03..c2129ea 100644 --- a/ocaml/Main_args/Default/Odoc_args/index.html +++ b/ocaml/Main_args/Default/Odoc_args/index.html @@ -1,2 +1,2 @@ -Odoc_args (ocaml.Main_args.Default.Odoc_args)

    Module Default.Odoc_args

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    \ No newline at end of file +Odoc_args (ocaml.Main_args.Default.Odoc_args)

    Module Default.Odoc_args

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    diff --git a/ocaml/Main_args/Default/Optmain/index.html b/ocaml/Main_args/Default/Optmain/index.html index 29df9b4..8219adc 100644 --- a/ocaml/Main_args/Default/Optmain/index.html +++ b/ocaml/Main_args/Default/Optmain/index.html @@ -1,2 +1,2 @@ -Optmain (ocaml.Main_args.Default.Optmain)

    Module Default.Optmain

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    \ No newline at end of file +Optmain (ocaml.Main_args.Default.Optmain)

    Module Default.Optmain

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    diff --git a/ocaml/Main_args/Default/Opttopmain/index.html b/ocaml/Main_args/Default/Opttopmain/index.html index c2da02b..52ccb63 100644 --- a/ocaml/Main_args/Default/Opttopmain/index.html +++ b/ocaml/Main_args/Default/Opttopmain/index.html @@ -1,2 +1,2 @@ -Opttopmain (ocaml.Main_args.Default.Opttopmain)

    Module Default.Opttopmain

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    \ No newline at end of file +Opttopmain (ocaml.Main_args.Default.Opttopmain)

    Module Default.Opttopmain

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    diff --git a/ocaml/Main_args/Default/Topmain/index.html b/ocaml/Main_args/Default/Topmain/index.html index 76a2a29..5410761 100644 --- a/ocaml/Main_args/Default/Topmain/index.html +++ b/ocaml/Main_args/Default/Topmain/index.html @@ -1,2 +1,2 @@ -Topmain (ocaml.Main_args.Default.Topmain)

    Module Default.Topmain

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    \ No newline at end of file +Topmain (ocaml.Main_args.Default.Topmain)

    Module Default.Topmain

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    diff --git a/ocaml/Main_args/Default/index.html b/ocaml/Main_args/Default/index.html index c88e64c..6971ba8 100644 --- a/ocaml/Main_args/Default/index.html +++ b/ocaml/Main_args/Default/index.html @@ -1,2 +1,2 @@ -Default (ocaml.Main_args.Default)

    Module Main_args.Default

    \ No newline at end of file +Default (ocaml.Main_args.Default)

    Module Main_args.Default

    diff --git a/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html b/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html index 09c4a0d..be65ee7 100644 --- a/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html +++ b/ocaml/Main_args/Make_bytecomp_options/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Main_args.Make_bytecomp_options._)

    Parameter Make_bytecomp_options._

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    \ No newline at end of file +_ (ocaml.Main_args.Make_bytecomp_options._)

    Parameter Make_bytecomp_options._

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    diff --git a/ocaml/Main_args/Make_bytecomp_options/index.html b/ocaml/Main_args/Make_bytecomp_options/index.html index eff72f9..3df2f4e 100644 --- a/ocaml/Main_args/Make_bytecomp_options/index.html +++ b/ocaml/Main_args/Make_bytecomp_options/index.html @@ -1,2 +1,2 @@ -Make_bytecomp_options (ocaml.Main_args.Make_bytecomp_options)

    Module Main_args.Make_bytecomp_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Make_bytecomp_options (ocaml.Main_args.Make_bytecomp_options)

    Module Main_args.Make_bytecomp_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html b/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html index b91f68a..347ca00 100644 --- a/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html +++ b/ocaml/Main_args/Make_bytetop_options/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Main_args.Make_bytetop_options._)

    Parameter Make_bytetop_options._

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    \ No newline at end of file +_ (ocaml.Main_args.Make_bytetop_options._)

    Parameter Make_bytetop_options._

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    diff --git a/ocaml/Main_args/Make_bytetop_options/index.html b/ocaml/Main_args/Make_bytetop_options/index.html index b4d473b..15a5572 100644 --- a/ocaml/Main_args/Make_bytetop_options/index.html +++ b/ocaml/Main_args/Make_bytetop_options/index.html @@ -1,2 +1,2 @@ -Make_bytetop_options (ocaml.Main_args.Make_bytetop_options)

    Module Main_args.Make_bytetop_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Make_bytetop_options (ocaml.Main_args.Make_bytetop_options)

    Module Main_args.Make_bytetop_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html b/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html index ce5e076..f24e52f 100644 --- a/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html +++ b/ocaml/Main_args/Make_ocamldoc_options/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Main_args.Make_ocamldoc_options._)

    Parameter Make_ocamldoc_options._

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    \ No newline at end of file +_ (ocaml.Main_args.Make_ocamldoc_options._)

    Parameter Make_ocamldoc_options._

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    diff --git a/ocaml/Main_args/Make_ocamldoc_options/index.html b/ocaml/Main_args/Make_ocamldoc_options/index.html index e9ea8b4..de58e44 100644 --- a/ocaml/Main_args/Make_ocamldoc_options/index.html +++ b/ocaml/Main_args/Make_ocamldoc_options/index.html @@ -1,2 +1,2 @@ -Make_ocamldoc_options (ocaml.Main_args.Make_ocamldoc_options)

    Module Main_args.Make_ocamldoc_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Make_ocamldoc_options (ocaml.Main_args.Make_ocamldoc_options)

    Module Main_args.Make_ocamldoc_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html b/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html index 6370ea8..162163f 100644 --- a/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html +++ b/ocaml/Main_args/Make_optcomp_options/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Main_args.Make_optcomp_options._)

    Parameter Make_optcomp_options._

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    \ No newline at end of file +_ (ocaml.Main_args.Make_optcomp_options._)

    Parameter Make_optcomp_options._

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    diff --git a/ocaml/Main_args/Make_optcomp_options/index.html b/ocaml/Main_args/Make_optcomp_options/index.html index 5a1a5eb..c395587 100644 --- a/ocaml/Main_args/Make_optcomp_options/index.html +++ b/ocaml/Main_args/Make_optcomp_options/index.html @@ -1,2 +1,2 @@ -Make_optcomp_options (ocaml.Main_args.Make_optcomp_options)

    Module Main_args.Make_optcomp_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Make_optcomp_options (ocaml.Main_args.Make_optcomp_options)

    Module Main_args.Make_optcomp_options

    Parameters

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html b/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html index b15aa11..74f51e3 100644 --- a/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html +++ b/ocaml/Main_args/Make_opttop_options/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Main_args.Make_opttop_options._)

    Parameter Make_opttop_options._

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    \ No newline at end of file +_ (ocaml.Main_args.Make_opttop_options._)

    Parameter Make_opttop_options._

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    diff --git a/ocaml/Main_args/Make_opttop_options/index.html b/ocaml/Main_args/Make_opttop_options/index.html index 7784481..54376b9 100644 --- a/ocaml/Main_args/Make_opttop_options/index.html +++ b/ocaml/Main_args/Make_opttop_options/index.html @@ -1,2 +1,2 @@ -Make_opttop_options (ocaml.Main_args.Make_opttop_options)

    Module Main_args.Make_opttop_options

    Parameters

    module _ : Opttop_options

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Make_opttop_options (ocaml.Main_args.Make_opttop_options)

    Module Main_args.Make_opttop_options

    Parameters

    module _ : Opttop_options

    Signature

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/index.html b/ocaml/Main_args/index.html index a689c3b..36e6bfe 100644 --- a/ocaml/Main_args/index.html +++ b/ocaml/Main_args/index.html @@ -1,5 +1,5 @@ -Main_args (ocaml.Main_args)

    Module Main_args

    module type Common_options = sig ... end
    module type Core_options = sig ... end
    module type Compiler_options = sig ... end
    module type Toplevel_options = sig ... end
    module type Bytecomp_options = sig ... end
    module type Bytetop_options = sig ... end
    module type Optcommon_options = sig ... end
    module type Optcomp_options = sig ... end
    module type Opttop_options = sig ... end
    module type Ocamldoc_options = sig ... end
    module type Arg_list = sig ... end
    val options_with_command_line_syntax : +Main_args (ocaml.Main_args)

    Module Main_args

    module type Common_options = sig ... end
    module type Core_options = sig ... end
    module type Compiler_options = sig ... end
    module type Toplevel_options = sig ... end
    module type Bytecomp_options = sig ... end
    module type Bytetop_options = sig ... end
    module type Optcommon_options = sig ... end
    module type Optcomp_options = sig ... end
    module type Opttop_options = sig ... end
    module type Ocamldoc_options = sig ... end
    module type Arg_list = sig ... end
    val options_with_command_line_syntax : (string * Stdlib.Arg.spec * string) list -> string list ref -> - (string * Stdlib.Arg.spec * string) list

    options_with_command_line_syntax options r returns options2 that behaves like options, but additionally pushes command line argument on r (quoted by Filename.quote when necessary). This is meant for ocamlc,optp, which use this to forward most of their arguments to ocamlc,opt.

    module Default : sig ... end
    \ No newline at end of file + (string * Stdlib.Arg.spec * string) list

    options_with_command_line_syntax options r returns options2 that behaves like options, but additionally pushes command line argument on r (quoted by Filename.quote when necessary). This is meant for ocamlc,optp, which use this to forward most of their arguments to ocamlc,opt.

    module Default : sig ... end
    diff --git a/ocaml/Main_args/module-type-Arg_list/index.html b/ocaml/Main_args/module-type-Arg_list/index.html index 7bcd07b..7cdf95a 100644 --- a/ocaml/Main_args/module-type-Arg_list/index.html +++ b/ocaml/Main_args/module-type-Arg_list/index.html @@ -1,2 +1,2 @@ -Arg_list (ocaml.Main_args.Arg_list)

    Module type Main_args.Arg_list

    val list : (string * Stdlib.Arg.spec * string) list
    \ No newline at end of file +Arg_list (ocaml.Main_args.Arg_list)

    Module type Main_args.Arg_list

    val list : (string * Stdlib.Arg.spec * string) list
    diff --git a/ocaml/Main_args/module-type-Bytecomp_options/index.html b/ocaml/Main_args/module-type-Bytecomp_options/index.html index 790447b..96a1919 100644 --- a/ocaml/Main_args/module-type-Bytecomp_options/index.html +++ b/ocaml/Main_args/module-type-Bytecomp_options/index.html @@ -1,2 +1,2 @@ -Bytecomp_options (ocaml.Main_args.Bytecomp_options)

    Module type Main_args.Bytecomp_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    \ No newline at end of file +Bytecomp_options (ocaml.Main_args.Bytecomp_options)

    Module type Main_args.Bytecomp_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _compat_32 : unit -> unit
    val _custom : unit -> unit
    val _no_check_prims : unit -> unit
    val _dllib : string -> unit
    val _dllpath : string -> unit
    val _make_runtime : unit -> unit
    val _vmthread : unit -> unit
    val _use_runtime : string -> unit
    val _output_complete_exe : unit -> unit
    val _dinstr : unit -> unit
    val _dcamlprimc : unit -> unit
    val _use_prims : string -> unit
    diff --git a/ocaml/Main_args/module-type-Bytetop_options/index.html b/ocaml/Main_args/module-type-Bytetop_options/index.html index 69650b0..557ba82 100644 --- a/ocaml/Main_args/module-type-Bytetop_options/index.html +++ b/ocaml/Main_args/module-type-Bytetop_options/index.html @@ -1,2 +1,2 @@ -Bytetop_options (ocaml.Main_args.Bytetop_options)

    Module type Main_args.Bytetop_options

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    \ No newline at end of file +Bytetop_options (ocaml.Main_args.Bytetop_options)

    Module type Main_args.Bytetop_options

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    val _dinstr : unit -> unit
    diff --git a/ocaml/Main_args/module-type-Common_options/index.html b/ocaml/Main_args/module-type-Common_options/index.html index 3618b87..5ae9ef9 100644 --- a/ocaml/Main_args/module-type-Common_options/index.html +++ b/ocaml/Main_args/module-type-Common_options/index.html @@ -1,2 +1,2 @@ -Common_options (ocaml.Main_args.Common_options)

    Module type Main_args.Common_options

    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    \ No newline at end of file +Common_options (ocaml.Main_args.Common_options)

    Module type Main_args.Common_options

    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    diff --git a/ocaml/Main_args/module-type-Compiler_options/index.html b/ocaml/Main_args/module-type-Compiler_options/index.html index c69bf62..cf7796c 100644 --- a/ocaml/Main_args/module-type-Compiler_options/index.html +++ b/ocaml/Main_args/module-type-Compiler_options/index.html @@ -1,2 +1,2 @@ -Compiler_options (ocaml.Main_args.Compiler_options)

    Module type Main_args.Compiler_options

    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    \ No newline at end of file +Compiler_options (ocaml.Main_args.Compiler_options)

    Module type Main_args.Compiler_options

    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _pp : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    diff --git a/ocaml/Main_args/module-type-Core_options/index.html b/ocaml/Main_args/module-type-Core_options/index.html index c4d289f..85e3c98 100644 --- a/ocaml/Main_args/module-type-Core_options/index.html +++ b/ocaml/Main_args/module-type-Core_options/index.html @@ -1,2 +1,2 @@ -Core_options (ocaml.Main_args.Core_options)

    Module type Main_args.Core_options

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    \ No newline at end of file +Core_options (ocaml.Main_args.Core_options)

    Module type Main_args.Core_options

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    diff --git a/ocaml/Main_args/module-type-Ocamldoc_options/index.html b/ocaml/Main_args/module-type-Ocamldoc_options/index.html index cf83fb8..903ecda 100644 --- a/ocaml/Main_args/module-type-Ocamldoc_options/index.html +++ b/ocaml/Main_args/module-type-Ocamldoc_options/index.html @@ -1,2 +1,2 @@ -Ocamldoc_options (ocaml.Main_args.Ocamldoc_options)

    Module type Main_args.Ocamldoc_options

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    \ No newline at end of file +Ocamldoc_options (ocaml.Main_args.Ocamldoc_options)

    Module type Main_args.Ocamldoc_options

    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _pp : string -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _vmthread : unit -> unit
    diff --git a/ocaml/Main_args/module-type-Optcommon_options/index.html b/ocaml/Main_args/module-type-Optcommon_options/index.html index 3df333f..5f33576 100644 --- a/ocaml/Main_args/module-type-Optcommon_options/index.html +++ b/ocaml/Main_args/module-type-Optcommon_options/index.html @@ -1,2 +1,2 @@ -Optcommon_options (ocaml.Main_args.Optcommon_options)

    Module type Main_args.Optcommon_options

    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    \ No newline at end of file +Optcommon_options (ocaml.Main_args.Optcommon_options)

    Module type Main_args.Optcommon_options

    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    diff --git a/ocaml/Main_args/module-type-Optcomp_options/index.html b/ocaml/Main_args/module-type-Optcomp_options/index.html index 30cd55d..e4e57e3 100644 --- a/ocaml/Main_args/module-type-Optcomp_options/index.html +++ b/ocaml/Main_args/module-type-Optcomp_options/index.html @@ -1,2 +1,2 @@ -Optcomp_options (ocaml.Main_args.Optcomp_options)

    Module type Main_args.Optcomp_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    \ No newline at end of file +Optcomp_options (ocaml.Main_args.Optcomp_options)

    Module type Main_args.Optcomp_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    include Compiler_options
    val _a : unit -> unit
    val _annot : unit -> unit
    val _binannot : unit -> unit
    val _c : unit -> unit
    val _cc : string -> unit
    val _cclib : string -> unit
    val _ccopt : string -> unit
    val _cmi_file : string -> unit
    val _config : unit -> unit
    val _config_var : string -> unit
    val _for_pack : string -> unit
    val _g : unit -> unit
    val _no_g : unit -> unit
    val _stop_after : string -> unit
    val _i : unit -> unit
    val _impl : string -> unit
    val _intf : string -> unit
    val _intf_suffix : string -> unit
    val _keep_docs : unit -> unit
    val _no_keep_docs : unit -> unit
    val _keep_locs : unit -> unit
    val _no_keep_locs : unit -> unit
    val _linkall : unit -> unit
    val _o : string -> unit
    val _opaque : unit -> unit
    val _output_obj : unit -> unit
    val _output_complete_obj : unit -> unit
    val _pack : unit -> unit
    val _plugin : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _runtime_variant : string -> unit
    val _with_runtime : unit -> unit
    val _without_runtime : unit -> unit
    val _short_paths : unit -> unit
    val _thread : unit -> unit
    val _v : unit -> unit
    val _verbose : unit -> unit
    val _where : unit -> unit
    val _color : string -> unit
    val _error_style : string -> unit
    val _match_context_rows : int -> unit
    val _dtimings : unit -> unit
    val _dprofile : unit -> unit
    val _dump_into_file : unit -> unit
    val _dump_dir : string -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _p : unit -> unit
    val _pp : string -> unit
    val _S : unit -> unit
    val _shared : unit -> unit
    val _afl_instrument : unit -> unit
    val _afl_inst_ratio : int -> unit
    val _function_sections : unit -> unit
    val _save_ir_after : string -> unit
    diff --git a/ocaml/Main_args/module-type-Opttop_options/index.html b/ocaml/Main_args/module-type-Opttop_options/index.html index dade164..dfb650d 100644 --- a/ocaml/Main_args/module-type-Opttop_options/index.html +++ b/ocaml/Main_args/module-type-Opttop_options/index.html @@ -1,2 +1,2 @@ -Opttop_options (ocaml.Main_args.Opttop_options)

    Module type Main_args.Opttop_options

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    \ No newline at end of file +Opttop_options (ocaml.Main_args.Opttop_options)

    Module type Main_args.Opttop_options

    include Toplevel_options
    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    include Optcommon_options
    val _compact : unit -> unit
    val _inline : string -> unit
    val _inline_toplevel : string -> unit
    val _inlining_report : unit -> unit
    val _dump_pass : string -> unit
    val _inline_max_depth : string -> unit
    val _rounds : int -> unit
    val _inline_max_unroll : string -> unit
    val _classic_inlining : unit -> unit
    val _inline_call_cost : string -> unit
    val _inline_alloc_cost : string -> unit
    val _inline_prim_cost : string -> unit
    val _inline_branch_cost : string -> unit
    val _inline_indirect_cost : string -> unit
    val _inline_lifting_benefit : string -> unit
    val _unbox_closures : unit -> unit
    val _unbox_closures_factor : int -> unit
    val _inline_branch_factor : string -> unit
    val _remove_unused_arguments : unit -> unit
    val _no_unbox_free_vars_of_closures : unit -> unit
    val _no_unbox_specialised_args : unit -> unit
    val _o2 : unit -> unit
    val _o3 : unit -> unit
    val _insn_sched : unit -> unit
    val _no_insn_sched : unit -> unit
    val _linscan : unit -> unit
    val _no_float_const_prop : unit -> unit
    val _clambda_checks : unit -> unit
    val _dflambda : unit -> unit
    val _drawflambda : unit -> unit
    val _dflambda_invariants : unit -> unit
    val _dflambda_no_invariants : unit -> unit
    val _dflambda_let : int -> unit
    val _dflambda_verbose : unit -> unit
    val _drawclambda : unit -> unit
    val _dclambda : unit -> unit
    val _dcmm_invariants : unit -> unit
    val _dcmm : unit -> unit
    val _dsel : unit -> unit
    val _dcombine : unit -> unit
    val _dcse : unit -> unit
    val _dlive : unit -> unit
    val _dspill : unit -> unit
    val _dsplit : unit -> unit
    val _dinterf : unit -> unit
    val _dprefer : unit -> unit
    val _dalloc : unit -> unit
    val _dreload : unit -> unit
    val _dscheduling : unit -> unit
    val _dlinear : unit -> unit
    val _dinterval : unit -> unit
    val _dstartup : unit -> unit
    val _verbose : unit -> unit
    val _S : unit -> unit
    diff --git a/ocaml/Main_args/module-type-Toplevel_options/index.html b/ocaml/Main_args/module-type-Toplevel_options/index.html index ab9643c..3653a2c 100644 --- a/ocaml/Main_args/module-type-Toplevel_options/index.html +++ b/ocaml/Main_args/module-type-Toplevel_options/index.html @@ -1,2 +1,2 @@ -Toplevel_options (ocaml.Main_args.Toplevel_options)

    Module type Main_args.Toplevel_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    \ No newline at end of file +Toplevel_options (ocaml.Main_args.Toplevel_options)

    Module type Main_args.Toplevel_options

    include Core_options
    include Common_options
    val _absname : unit -> unit
    val _no_absname : unit -> unit
    val _alert : string -> unit
    val _I : string -> unit
    val _labels : unit -> unit
    val _alias_deps : unit -> unit
    val _no_alias_deps : unit -> unit
    val _app_funct : unit -> unit
    val _no_app_funct : unit -> unit
    val _noassert : unit -> unit
    val _nolabels : unit -> unit
    val _nostdlib : unit -> unit
    val _nocwd : unit -> unit
    val _open : string -> unit
    val _ppx : string -> unit
    val _principal : unit -> unit
    val _no_principal : unit -> unit
    val _rectypes : unit -> unit
    val _no_rectypes : unit -> unit
    val _safer_matching : unit -> unit
    val _short_paths : unit -> unit
    val _strict_sequence : unit -> unit
    val _no_strict_sequence : unit -> unit
    val _strict_formats : unit -> unit
    val _no_strict_formats : unit -> unit
    val _unboxed_types : unit -> unit
    val _no_unboxed_types : unit -> unit
    val _version : unit -> unit
    val _vnum : unit -> unit
    val _w : string -> unit
    val anonymous : string -> unit
    val _nopervasives : unit -> unit
    val _unsafe : unit -> unit
    val _warn_error : string -> unit
    val _warn_help : unit -> unit
    val _dno_unique_ids : unit -> unit
    val _dunique_ids : unit -> unit
    val _dno_locations : unit -> unit
    val _dlocations : unit -> unit
    val _dsource : unit -> unit
    val _dparsetree : unit -> unit
    val _dtypedtree : unit -> unit
    val _dshape : unit -> unit
    val _drawlambda : unit -> unit
    val _dlambda : unit -> unit
    val _init : string -> unit
    val _noinit : unit -> unit
    val _no_version : unit -> unit
    val _noprompt : unit -> unit
    val _nopromptcont : unit -> unit
    val _stdin : unit -> unit
    val _args : string -> string array
    val _args0 : string -> string array
    val _color : string -> unit
    val _error_style : string -> unit
    val _eval : string -> unit
    diff --git a/ocaml/Maindriver/index.html b/ocaml/Maindriver/index.html index d60bd60..9542a48 100644 --- a/ocaml/Maindriver/index.html +++ b/ocaml/Maindriver/index.html @@ -1,2 +1,2 @@ -Maindriver (ocaml.Maindriver)

    Module Maindriver

    val main : string array -> Stdlib.Format.formatter -> int
    \ No newline at end of file +Maindriver (ocaml.Maindriver)

    Module Maindriver

    val main : string array -> Stdlib.Format.formatter -> int
    diff --git a/ocaml/Makedepend/index.html b/ocaml/Makedepend/index.html index 364d764..4d48842 100644 --- a/ocaml/Makedepend/index.html +++ b/ocaml/Makedepend/index.html @@ -1,2 +1,2 @@ -Makedepend (ocaml.Makedepend)

    Module Makedepend

    val main : unit -> unit
    val main_from_option : unit -> unit
    \ No newline at end of file +Makedepend (ocaml.Makedepend)

    Module Makedepend

    val main : unit -> unit
    val main_from_option : unit -> unit
    diff --git a/ocaml/Matching/index.html b/ocaml/Matching/index.html index 4d0df1c..294f995 100644 --- a/ocaml/Matching/index.html +++ b/ocaml/Matching/index.html @@ -1,30 +1,30 @@ -Matching (ocaml.Matching)

    Module Matching

    val for_function : - scopes:Debuginfo.Scoped_location.scopes -> +Matching (ocaml.Matching)

    Module Matching

    \ No newline at end of file + Lambda.lambda
    diff --git a/ocaml/Meta/index.html b/ocaml/Meta/index.html index d5f2756..f812747 100644 --- a/ocaml/Meta/index.html +++ b/ocaml/Meta/index.html @@ -1,5 +1,5 @@ -Meta (ocaml.Meta)

    Module Meta

    val global_data : unit -> Stdlib.Obj.t array
    val realloc_global_data : int -> unit
    type closure = unit -> Stdlib.Obj.t
    type bytecode
    val reify_bytecode : +Meta (ocaml.Meta)

    Module Meta

    val global_data : unit -> Stdlib.Obj.t array
    val realloc_global_data : int -> unit
    type closure = unit -> Stdlib.Obj.t
    type bytecode
    val reify_bytecode : bytes array -> Instruct.debug_event list array -> string option -> @@ -7,4 +7,4 @@ Stdlib.Obj.raw_data -> Stdlib.Obj.t -> Stdlib.Obj.t -> - Stdlib.Obj.t
    val get_section_table : unit -> (string * Stdlib.Obj.t) list
    \ No newline at end of file + Stdlib.Obj.t
    val get_section_table : unit -> (string * Stdlib.Obj.t) list
    diff --git a/ocaml/Misc/Color/index.html b/ocaml/Misc/Color/index.html index e22c782..70d5731 100644 --- a/ocaml/Misc/Color/index.html +++ b/ocaml/Misc/Color/index.html @@ -1,2 +1,2 @@ -Color (ocaml.Misc.Color)

    Module Misc.Color

    type color =
    1. | Black
    2. | Red
    3. | Green
    4. | Yellow
    5. | Blue
    6. | Magenta
    7. | Cyan
    8. | White
    type style =
    1. | FG of color
    2. | BG of color
    3. | Bold
    4. | Reset
    type Stdlib.Format.stag +=
    1. | Style of style list
    val ansi_of_style_l : style list -> string
    type styles = {
    1. error : style list;
    2. warning : style list;
    3. loc : style list;
    4. hint : style list;
    }
    val default_styles : styles
    val get_styles : unit -> styles
    val set_styles : styles -> unit
    type setting =
    1. | Auto
    2. | Always
    3. | Never
    val default_setting : setting
    val setup : setting option -> unit
    val set_color_tag_handling : Stdlib.Format.formatter -> unit
    \ No newline at end of file +Color (ocaml.Misc.Color)

    Module Misc.Color

    type color =
    1. | Black
    2. | Red
    3. | Green
    4. | Yellow
    5. | Blue
    6. | Magenta
    7. | Cyan
    8. | White
    type style =
    1. | FG of color
    2. | BG of color
    3. | Bold
    4. | Reset
    type Stdlib.Format.stag +=
    1. | Style of style list
    val ansi_of_style_l : style list -> string
    type styles = {
    1. error : style list;
    2. warning : style list;
    3. loc : style list;
    4. hint : style list;
    }
    val default_styles : styles
    val get_styles : unit -> styles
    val set_styles : styles -> unit
    type setting =
    1. | Auto
    2. | Always
    3. | Never
    val default_setting : setting
    val setup : setting option -> unit
    val set_color_tag_handling : Stdlib.Format.formatter -> unit
    diff --git a/ocaml/Misc/Error_style/index.html b/ocaml/Misc/Error_style/index.html index 33d6949..4285bb9 100644 --- a/ocaml/Misc/Error_style/index.html +++ b/ocaml/Misc/Error_style/index.html @@ -1,2 +1,2 @@ -Error_style (ocaml.Misc.Error_style)

    Module Misc.Error_style

    type setting =
    1. | Contextual
    2. | Short
    val default_setting : setting
    \ No newline at end of file +Error_style (ocaml.Misc.Error_style)

    Module Misc.Error_style

    type setting =
    1. | Contextual
    2. | Short
    val default_setting : setting
    diff --git a/ocaml/Misc/Int_literal_converter/index.html b/ocaml/Misc/Int_literal_converter/index.html index 557e68e..6bb82c9 100644 --- a/ocaml/Misc/Int_literal_converter/index.html +++ b/ocaml/Misc/Int_literal_converter/index.html @@ -1,2 +1,2 @@ -Int_literal_converter (ocaml.Misc.Int_literal_converter)

    Module Misc.Int_literal_converter

    val int : string -> int

    Convert a string to an integer. Unlike Stdlib.int_of_string, this function accepts the string representation of max_int + 1 and returns min_int in this case.

    val int32 : string -> int32

    Likewise, at type int32

    val int64 : string -> int64

    Likewise, at type int64

    val nativeint : string -> nativeint

    Likewise, at type nativeint

    \ No newline at end of file +Int_literal_converter (ocaml.Misc.Int_literal_converter)

    Module Misc.Int_literal_converter

    val int : string -> int

    Convert a string to an integer. Unlike Stdlib.int_of_string, this function accepts the string representation of max_int + 1 and returns min_int in this case.

    val int32 : string -> int32

    Likewise, at type int32

    val int64 : string -> int64

    Likewise, at type int64

    val nativeint : string -> nativeint

    Likewise, at type nativeint

    diff --git a/ocaml/Misc/LongString/index.html b/ocaml/Misc/LongString/index.html index e8d2b90..7723886 100644 --- a/ocaml/Misc/LongString/index.html +++ b/ocaml/Misc/LongString/index.html @@ -1,2 +1,2 @@ -LongString (ocaml.Misc.LongString)

    Module Misc.LongString

    type t = bytes array
    val create : int -> t
    val length : t -> int
    val get : t -> int -> char
    val set : t -> int -> char -> unit
    val blit : t -> int -> t -> int -> int -> unit
    val blit_string : string -> int -> t -> int -> int -> unit
    val output : out_channel -> t -> int -> int -> unit
    val input_bytes_into : t -> in_channel -> int -> unit
    val input_bytes : in_channel -> int -> t
    \ No newline at end of file +LongString (ocaml.Misc.LongString)

    Module Misc.LongString

    type t = bytes array
    val create : int -> t
    val length : t -> int
    val get : t -> int -> char
    val set : t -> int -> char -> unit
    val blit : t -> int -> t -> int -> int -> unit
    val blit_string : string -> int -> t -> int -> int -> unit
    val output : out_channel -> t -> int -> int -> unit
    val input_bytes_into : t -> in_channel -> int -> unit
    val input_bytes : in_channel -> int -> t
    diff --git a/ocaml/Misc/Magic_number/index.html b/ocaml/Misc/Magic_number/index.html index e633dce..e85e712 100644 --- a/ocaml/Misc/Magic_number/index.html +++ b/ocaml/Misc/Magic_number/index.html @@ -1,17 +1,17 @@ -Magic_number (ocaml.Misc.Magic_number)

    Module Misc.Magic_number

    a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

    All magic numbers have the same byte length, magic_length, and this is important for users as it gives them the number of bytes to read to obtain the byte sequence that should be a magic number. Typical user code will look like:

    let ic = open_in_bin path in
    -let magic =
    -  try really_input_string ic Magic_number.magic_length
    -  with End_of_file -> ... in
    -match Magic_number.parse magic with
    -| Error parse_error -> ...
    -| Ok info -> ...

    A given compiler version expects one specific version for each kind of object file, and will fail if given an unsupported version. Because versions grow monotonically, you can compare the parsed version with the expected "current version" for a kind, to tell whether the wrong-magic object file comes from the past or from the future.

    An example of code block that expects the "currently supported version" of a given kind of magic numbers, here Cmxa, is as follows:

    let ic = open_in_bin path in
    -begin
    -  try Magic_number.(expect_current Cmxa (get_info ic)) with
    -  | Parse_error error -> ...
    -  | Unexpected error -> ...
    -end;
    -...

    Parse errors distinguish inputs that are Not_a_magic_number str, which are likely to come from the file being completely different, and Truncated str, raised by headers that are the (possibly empty) prefix of a valid magic number.

    Unexpected errors correspond to valid magic numbers that are not the one expected, either because it corresponds to a different kind, or to a newer or older version.

    The helper functions explain_parse_error and explain_unexpected_error will generate a textual explanation of each error, for use in error messages.

    • since 4.11
    type native_obj_config = {
    1. flambda : bool;
    }

    native object files have a format and magic number that depend on certain native-compiler configuration parameters. This configuration space is expressed by the native_obj_config type.

    val native_obj_config : native_obj_config

    the native object file configuration of the active/configured compiler.

    type version = int
    type kind =
    1. | Exec
    2. | Cmi
    3. | Cmo
    4. | Cma
    5. | Cmx of native_obj_config
    6. | Cmxa of native_obj_config
    7. | Cmxs
    8. | Cmt
    9. | Ast_impl
    10. | Ast_intf
    type info = {
    1. kind : kind;
    2. version : version;
      (*

      Note: some versions of the compiler use the same version suffix for all kinds, but others use different versions counters for different kinds. We may only assume that versions are growing monotonically (not necessarily always by one) between compiler versions.

      *)
    }
    type raw = string

    the type of raw magic numbers, such as "Caml1999A027" for the .cma files of OCaml 4.10

    Parsing magic numbers

    type parse_error =
    1. | Truncated of string
    2. | Not_a_magic_number of string
    val explain_parse_error : kind option -> parse_error -> string

    Produces an explanation for a parse error. If no kind is provided, we use an unspecific formulation suggesting that any compiler-produced object file would have been satisfying.

    val parse : raw -> (info, parse_error) result

    Parses a raw magic number

    val read_info : in_channel -> (info, parse_error) result

    Read a raw magic number from an input channel.

    If the data read str is not a valid magic number, it can be recovered from the Truncated str | Not_a_magic_number str payload of the Error parse_error case.

    If parsing succeeds with an Ok info result, we know that exactly magic_length bytes have been consumed from the input_channel.

    If you also wish to enforce that the magic number is at the current version, see read_current_info below.

    val magic_length : int

    all magic numbers take the same number of bytes

    Checking that magic numbers are current

    type 'a unexpected = {
    1. expected : 'a;
    2. actual : 'a;
    }
    type unexpected_error =
    1. | Kind of kind unexpected
    2. | Version of kind * version unexpected
    val check_current : kind -> info -> (unit, unexpected_error) result

    check_current kind info checks that the provided magic info is the current version of kind's magic header.

    val explain_unexpected_error : unexpected_error -> string

    Provides an explanation of the unexpected_error.

    type error =
    1. | Parse_error of parse_error
    2. | Unexpected_error of unexpected_error
    val read_current_info : - expected_kind:kind option -> +Magic_number (ocaml.Misc.Magic_number)

    Module Misc.Magic_number

    a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

    All magic numbers have the same byte length, magic_length, and this is important for users as it gives them the number of bytes to read to obtain the byte sequence that should be a magic number. Typical user code will look like:

      let ic = open_in_bin path in
    +  let magic =
    +    try really_input_string ic Magic_number.magic_length
    +    with End_of_file -> ... in
    +  match Magic_number.parse magic with
    +  | Error parse_error -> ...
    +  | Ok info -> ...

    A given compiler version expects one specific version for each kind of object file, and will fail if given an unsupported version. Because versions grow monotonically, you can compare the parsed version with the expected "current version" for a kind, to tell whether the wrong-magic object file comes from the past or from the future.

    An example of code block that expects the "currently supported version" of a given kind of magic numbers, here Cmxa, is as follows:

      let ic = open_in_bin path in
    +  begin
    +    try Magic_number.(expect_current Cmxa (get_info ic)) with
    +    | Parse_error error -> ...
    +    | Unexpected error -> ...
    +  end;
    +  ...

    Parse errors distinguish inputs that are Not_a_magic_number str, which are likely to come from the file being completely different, and Truncated str, raised by headers that are the (possibly empty) prefix of a valid magic number.

    Unexpected errors correspond to valid magic numbers that are not the one expected, either because it corresponds to a different kind, or to a newer or older version.

    The helper functions explain_parse_error and explain_unexpected_error will generate a textual explanation of each error, for use in error messages.

    • since 4.11
    type native_obj_config = {
    1. flambda : bool;
    }

    native object files have a format and magic number that depend on certain native-compiler configuration parameters. This configuration space is expressed by the native_obj_config type.

    val native_obj_config : native_obj_config

    the native object file configuration of the active/configured compiler.

    type version = int
    type kind =
    1. | Exec
    2. | Cmi
    3. | Cmo
    4. | Cma
    5. | Cmx of native_obj_config
    6. | Cmxa of native_obj_config
    7. | Cmxs
    8. | Cmt
    9. | Ast_impl
    10. | Ast_intf
    type info = {
    1. kind : kind;
    2. version : version;
      (*

      Note: some versions of the compiler use the same version suffix for all kinds, but others use different versions counters for different kinds. We may only assume that versions are growing monotonically (not necessarily always by one) between compiler versions.

      *)
    }
    type raw = string

    the type of raw magic numbers, such as "Caml1999A027" for the .cma files of OCaml 4.10

    Parsing magic numbers

    type parse_error =
    1. | Truncated of string
    2. | Not_a_magic_number of string
    val explain_parse_error : kind option -> parse_error -> string

    Produces an explanation for a parse error. If no kind is provided, we use an unspecific formulation suggesting that any compiler-produced object file would have been satisfying.

    val parse : raw -> (info, parse_error) result

    Parses a raw magic number

    val read_info : in_channel -> (info, parse_error) result

    Read a raw magic number from an input channel.

    If the data read str is not a valid magic number, it can be recovered from the Truncated str | Not_a_magic_number str payload of the Error parse_error case.

    If parsing succeeds with an Ok info result, we know that exactly magic_length bytes have been consumed from the input_channel.

    If you also wish to enforce that the magic number is at the current version, see read_current_info below.

    val magic_length : int

    all magic numbers take the same number of bytes

    Checking that magic numbers are current

    type 'a unexpected = {
    1. expected : 'a;
    2. actual : 'a;
    }
    type unexpected_error =
    1. | Kind of kind unexpected
    2. | Version of kind * version unexpected
    val check_current : kind -> info -> (unit, unexpected_error) result

    check_current kind info checks that the provided magic info is the current version of kind's magic header.

    val explain_unexpected_error : unexpected_error -> string

    Provides an explanation of the unexpected_error.

    type error =
    1. | Parse_error of parse_error
    2. | Unexpected_error of unexpected_error
    val read_current_info : + expected_kind:kind option -> in_channel -> - (info, error) result

    Read a magic number as read_info, and check that it is the current version as its kind. If the expected_kind argument is None, any kind is accepted.

    Information on magic numbers

    val string_of_kind : kind -> string

    a user-printable string for a kind, eg. "exec" or "cmo", to use in error messages.

    val human_name_of_kind : kind -> string

    a user-meaningful name for a kind, eg. "executable file" or "bytecode object file", to use in error messages.

    val current_raw : kind -> raw

    the current magic number of each kind

    val current_version : kind -> version

    the current version of each kind

    Raw representations

    Mainly for internal usage and testing.

    type raw_kind = string

    the type of raw magic numbers kinds, such as "Caml1999A" for .cma files

    val parse_kind : raw_kind -> kind option

    parse a raw kind into a kind

    val raw_kind : kind -> raw_kind

    the current raw representation of a kind.

    In some cases the raw representation of a kind has changed over compiler versions, so other files of the same kind may have different raw kinds. Note that all currently known cases are parsed correctly by parse_kind.

    val raw : info -> raw

    A valid raw representation of the magic number.

    Due to past and future changes in the string representation of magic numbers, we cannot guarantee that the raw strings returned for past and future versions actually match the expectations of those compilers. The representation is accurate for current versions, and it is correctly parsed back into the desired version by the parsing functions above.

    val all_kinds : kind list
    \ No newline at end of file + (info, error) result

    Read a magic number as read_info, and check that it is the current version as its kind. If the expected_kind argument is None, any kind is accepted.

    Information on magic numbers

    val string_of_kind : kind -> string

    a user-printable string for a kind, eg. "exec" or "cmo", to use in error messages.

    val human_name_of_kind : kind -> string

    a user-meaningful name for a kind, eg. "executable file" or "bytecode object file", to use in error messages.

    val current_raw : kind -> raw

    the current magic number of each kind

    val current_version : kind -> version

    the current version of each kind

    Raw representations

    Mainly for internal usage and testing.

    type raw_kind = string

    the type of raw magic numbers kinds, such as "Caml1999A" for .cma files

    val parse_kind : raw_kind -> kind option

    parse a raw kind into a kind

    val raw_kind : kind -> raw_kind

    the current raw representation of a kind.

    In some cases the raw representation of a kind has changed over compiler versions, so other files of the same kind may have different raw kinds. Note that all currently known cases are parsed correctly by parse_kind.

    val raw : info -> raw

    A valid raw representation of the magic number.

    Due to past and future changes in the string representation of magic numbers, we cannot guarantee that the raw strings returned for past and future versions actually match the expectations of those compilers. The representation is accurate for current versions, and it is correctly parsed back into the desired version by the parsing functions above.

    val all_kinds : kind list
    diff --git a/ocaml/Misc/Stdlib/Array/index.html b/ocaml/Misc/Stdlib/Array/index.html index 09e0380..b7b9edd 100644 --- a/ocaml/Misc/Stdlib/Array/index.html +++ b/ocaml/Misc/Stdlib/Array/index.html @@ -1,2 +1,2 @@ -Array (ocaml.Misc.Stdlib.Array)

    Module Stdlib.Array

    Extensions to the Array module

    val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as Array.exists2 from the standard library.

    val for_alli : (int -> 'a -> bool) -> 'a array -> bool

    Same as Array.for_all from the standard library, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val all_somes : 'a option array -> 'a array option
    \ No newline at end of file +Array (ocaml.Misc.Stdlib.Array)

    Module Stdlib.Array

    Extensions to the Array module

    val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as Array.exists2 from the standard library.

    val for_alli : (int -> 'a -> bool) -> 'a array -> bool

    Same as Array.for_all from the standard library, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val all_somes : 'a option array -> 'a array option
    diff --git a/ocaml/Misc/Stdlib/List/index.html b/ocaml/Misc/Stdlib/List/index.html index d8a5a2e..d4e149f 100644 --- a/ocaml/Misc/Stdlib/List/index.html +++ b/ocaml/Misc/Stdlib/List/index.html @@ -1,6 +1,6 @@ -List (ocaml.Misc.Stdlib.List)

    Module Stdlib.List

    Extensions to the List module

    type 'a t = 'a list
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    The lexicographic order supported by the provided order. There is no constraint on the relative lengths of the lists.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    Returns true if and only if the given lists have the same length and content with respect to the given equality function.

    val some_if_all_elements_are_some : 'a option t -> 'a t option

    If all elements of the given list are Some _ then Some xs is returned with the xs being the contents of those Somes, with order preserved. Otherwise return None.

    val map2_prefix : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t * 'b t

    let r1, r2 = map2_prefix f l1 l2 If l1 is of length n and l2 = h2 @ t2 with h2 of length n, r1 is List.map2 f l1 h1 and r2 is t2.

    val split_at : int -> 'a t -> 'a t * 'a t

    split_at n l returns the pair before, after where before is the n first elements of l and after the remaining ones. If l has less than n elements, raises Invalid_argument.

    val is_prefix : equal:('a -> 'a -> bool) -> 'a list -> of_:'a list -> bool

    Returns true if and only if the given list, with respect to the given equality function on list members, is a prefix of the list of_.

    type 'a longest_common_prefix_result = private {
    1. longest_common_prefix : 'a list;
    2. first_without_longest_common_prefix : 'a list;
    3. second_without_longest_common_prefix : 'a list;
    }
    val find_and_chop_longest_common_prefix : - equal:('a -> 'a -> bool) -> - first:'a list -> - second:'a list -> - 'a longest_common_prefix_result

    Returns the longest list that, with respect to the provided equality function, is a prefix of both of the given lists. The input lists, each with such longest common prefix removed, are also returned.

    \ No newline at end of file +List (ocaml.Misc.Stdlib.List)

    Module Stdlib.List

    Extensions to the List module

    type 'a t = 'a list
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    The lexicographic order supported by the provided order. There is no constraint on the relative lengths of the lists.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    Returns true if and only if the given lists have the same length and content with respect to the given equality function.

    val some_if_all_elements_are_some : 'a option t -> 'a t option

    If all elements of the given list are Some _ then Some xs is returned with the xs being the contents of those Somes, with order preserved. Otherwise return None.

    val map2_prefix : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t * 'b t

    let r1, r2 = map2_prefix f l1 l2 If l1 is of length n and l2 = h2 @ t2 with h2 of length n, r1 is List.map2 f l1 h1 and r2 is t2.

    val split_at : int -> 'a t -> 'a t * 'a t

    split_at n l returns the pair before, after where before is the n first elements of l and after the remaining ones. If l has less than n elements, raises Invalid_argument.

    val is_prefix : equal:('a -> 'a -> bool) -> 'a list -> of_:'a list -> bool

    Returns true if and only if the given list, with respect to the given equality function on list members, is a prefix of the list of_.

    type 'a longest_common_prefix_result = private {
    1. longest_common_prefix : 'a list;
    2. first_without_longest_common_prefix : 'a list;
    3. second_without_longest_common_prefix : 'a list;
    }
    val find_and_chop_longest_common_prefix : + equal:('a -> 'a -> bool) -> + first:'a list -> + second:'a list -> + 'a longest_common_prefix_result

    Returns the longest list that, with respect to the provided equality function, is a prefix of both of the given lists. The input lists, each with such longest common prefix removed, are also returned.

    diff --git a/ocaml/Misc/Stdlib/Option/index.html b/ocaml/Misc/Stdlib/Option/index.html index 0c95f8f..387d0f7 100644 --- a/ocaml/Misc/Stdlib/Option/index.html +++ b/ocaml/Misc/Stdlib/Option/index.html @@ -1,6 +1,6 @@ -Option (ocaml.Misc.Stdlib.Option)

    Module Stdlib.Option

    Extensions to the Option module

    type 'a t = 'a option
    val print : +Option (ocaml.Misc.Stdlib.Option)

    Module Stdlib.Option

    Extensions to the Option module

    type 'a t = 'a option
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Misc/Stdlib/String/Map/index.html b/ocaml/Misc/Stdlib/String/Map/index.html index 972a6d0..fdc6c65 100644 --- a/ocaml/Misc/Stdlib/String/Map/index.html +++ b/ocaml/Misc/Stdlib/String/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Misc.Stdlib.String.Map)

    Module String.Map

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Misc.Stdlib.String.Map)

    Module String.Map

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Misc/Stdlib/String/Set/index.html b/ocaml/Misc/Stdlib/String/Set/index.html index 867a5e9..2e46ab5 100644 --- a/ocaml/Misc/Stdlib/String/Set/index.html +++ b/ocaml/Misc/Stdlib/String/Set/index.html @@ -1,3 +1,2 @@ -Set (ocaml.Misc.Stdlib.String.Set)

    Module String.Set

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Set (ocaml.Misc.Stdlib.String.Set)

    Module String.Set

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Misc/Stdlib/String/Tbl/index.html b/ocaml/Misc/Stdlib/String/Tbl/index.html index 3fff6fb..f723eaa 100644 --- a/ocaml/Misc/Stdlib/String/Tbl/index.html +++ b/ocaml/Misc/Stdlib/String/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Misc.Stdlib.String.Tbl)

    Module String.Tbl

    type key = string
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +Tbl (ocaml.Misc.Stdlib.String.Tbl)

    Module String.Tbl

    type key = string
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Misc/Stdlib/String/index.html b/ocaml/Misc/Stdlib/String/index.html index 3699e14..d0aa416 100644 --- a/ocaml/Misc/Stdlib/String/index.html +++ b/ocaml/Misc/Stdlib/String/index.html @@ -1,3 +1,2 @@ -String (ocaml.Misc.Stdlib.String)

    Module Stdlib.String

    Extensions to the String module

    include module type of Stdlib.String

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> (int -> char) -> string

    init n f is a string of length n with index i holding the character f i (called in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : string -> int -> bytes -> int -> int -> unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : string -> string list -> string

    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> int -> int -> string

    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val split_on_char : char -> string -> string list

    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) - (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.04 (4.05 in StringLabels)

    Transforming

    val map : (char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : (int -> char -> char) -> string -> string

    mapi f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)

    Traversing

    val iter : (char -> unit) -> string -> unit

    iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : (int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Stdlib.Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    module Set : Set.S with type elt = string
    module Map : Map.S with type key = string
    module Tbl : Hashtbl.S with type key = string
    val print : Stdlib.Format.formatter -> t -> unit
    val for_all : (char -> bool) -> t -> bool
    \ No newline at end of file +String (ocaml.Misc.Stdlib.String)

    Module Stdlib.String

    Extensions to the String module

    include module type of Stdlib.String

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> (int -> char) -> string

    init n f is a string of length n with index i holding the character f i (called in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : string -> int -> bytes -> int -> int -> unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : string -> string list -> string

    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> int -> int -> string

    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val split_on_char : char -> string -> string list

    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.04 (4.05 in StringLabels)

    Transforming

    val map : (char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : (int -> char -> char) -> string -> string

    mapi f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)

    Traversing

    val iter : (char -> unit) -> string -> unit

    iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : (int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Stdlib.Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    module Set : Set.S with type elt = string
    module Map : Map.S with type key = string
    module Tbl : Hashtbl.S with type key = string
    val print : Stdlib.Format.formatter -> t -> unit
    val for_all : (char -> bool) -> t -> bool
    diff --git a/ocaml/Misc/Stdlib/index.html b/ocaml/Misc/Stdlib/index.html index 7b9596e..d3399c4 100644 --- a/ocaml/Misc/Stdlib/index.html +++ b/ocaml/Misc/Stdlib/index.html @@ -1,2 +1,2 @@ -Stdlib (ocaml.Misc.Stdlib)

    Module Misc.Stdlib

    module List : sig ... end
    module Option : sig ... end
    module Array : sig ... end
    module String : sig ... end
    val compare : 'a -> 'a -> int
    \ No newline at end of file +Stdlib (ocaml.Misc.Stdlib)

    Module Misc.Stdlib

    module List : sig ... end
    module Option : sig ... end
    module Array : sig ... end
    module String : sig ... end
    val compare : 'a -> 'a -> int
    diff --git a/ocaml/Misc/index.html b/ocaml/Misc/index.html index 9f99041..8313b11 100644 --- a/ocaml/Misc/index.html +++ b/ocaml/Misc/index.html @@ -1,37 +1,36 @@ -Misc (ocaml.Misc)

    Module Misc

    Miscellaneous useful types and functions

    Warning: this module is unstable and part of compiler-libs.

    Reporting fatal errors

    val fatal_error : string -> 'a

    Raise the Fatal_error exception with the given string.

    val fatal_errorf : ('a, Stdlib.Format.formatter, unit, 'b) format4 -> 'a

    Format the arguments according to the given format string and raise Fatal_error with the resulting string.

    exception Fatal_error

    Exceptions and finalization

    val try_finally : - ?always:(unit -> unit) -> - ?exceptionally:(unit -> unit) -> +Misc (ocaml.Misc)

    Module Misc

    Miscellaneous useful types and functions

    Warning: this module is unstable and part of compiler-libs.

    Reporting fatal errors

    val fatal_error : string -> 'a

    Raise the Fatal_error exception with the given string.

    val fatal_errorf : ('a, Stdlib.Format.formatter, unit, 'b) format4 -> 'a

    Format the arguments according to the given format string and raise Fatal_error with the resulting string.

    exception Fatal_error

    Exceptions and finalization

    val try_finally : + ?always:(unit -> unit) -> + ?exceptionally:(unit -> unit) -> (unit -> 'a) -> - 'a

    try_finally work ~always ~exceptionally is designed to run code in work that may fail with an exception, and has two kind of cleanup routines: always, that must be run after any execution of the function (typically, freeing system resources), and exceptionally, that should be run only if work or always failed with an exception (typically, undoing user-visible state changes that would only make sense if the function completes correctly). For example:

    let objfile = outputprefix ^ ".cmo" in
    -let oc = open_out_bin objfile in
    -Misc.try_finally
    -  (fun () ->
    -     bytecode
    -     ++ Timings.(accumulate_time (Generate sourcefile))
    -         (Emitcode.to_file oc modulename objfile);
    -     Warnings.check_fatal ())
    -  ~always:(fun () -> close_out oc)
    -  ~exceptionally:(fun _exn -> remove_file objfile);

    If exceptionally fail with an exception, it is propagated as usual.

    If always or exceptionally use exceptions internally for control-flow but do not raise, then try_finally is careful to preserve any exception backtrace coming from work or always for easier debugging.

    val reraise_preserving_backtrace : exn -> (unit -> unit) -> 'a

    reraise_preserving_backtrace e f is (f (); raise e) except that the current backtrace is preserved, even if f uses exceptions internally.

    List operations

    val map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b list

    map_end f l t is map f l @ t, just more efficient.

    val map_left_right : ('a -> 'b) -> 'a list -> 'b list

    Like List.map, with guaranteed left-to-right evaluation order

    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as List.for_all but for a binary predicate. In addition, this for_all2 never fails: given two lists with different lengths, it returns false.

    val replicate_list : 'a -> int -> 'a list

    replicate_list elem n is the list with n elements all identical to elem.

    val list_remove : 'a -> 'a list -> 'a list

    list_remove x l returns a copy of l with the first element equal to x removed.

    val split_last : 'a list -> 'a list * 'a

    Return the last element and the other elements of the given list.

    Hash table operations

    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

    Create a hashtable with the given initial size and fills it with the given bindings.

    Extensions to the standard library

    module Stdlib : sig ... end

    Operations on files and file paths

    val find_in_path : string list -> string -> string

    Search a file in a list of directories.

    val find_in_path_rel : string list -> string -> string

    Search a relative file in a list of directories.

    val find_in_path_uncap : string list -> string -> string

    Same, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

    val remove_file : string -> unit

    Delete the given file if it exists and is a regular file. Does nothing for other kinds of files. Never raises an error.

    val expand_directory : string -> string -> string

    expand_directory alt file eventually expands a + at the beginning of file into alt (an alternate root directory)

    val split_path_contents : ?sep:char -> string -> string list

    split_path_contents ?sep s interprets s as the value of a "PATH"-like variable and returns the corresponding list of directories. s is split using the platform-specific delimiter, or ~sep if it is passed.

    Returns the empty list if s is empty.

    val copy_file : in_channel -> out_channel -> unit

    copy_file ic oc reads the contents of file ic and copies them to oc. It stops when encountering EOF on ic.

    val copy_file_chunk : in_channel -> out_channel -> int -> unit

    copy_file_chunk ic oc n reads n bytes from ic and copies them to oc. It raises End_of_file when encountering EOF on ic.

    val string_of_file : in_channel -> string

    string_of_file ic reads the contents of file ic and copies them to a string. It stops when encountering EOF on ic.

    val output_to_file_via_temporary : - ?mode:open_flag list -> + 'a

    try_finally work ~always ~exceptionally is designed to run code in work that may fail with an exception, and has two kind of cleanup routines: always, that must be run after any execution of the function (typically, freeing system resources), and exceptionally, that should be run only if work or always failed with an exception (typically, undoing user-visible state changes that would only make sense if the function completes correctly). For example:

      let objfile = outputprefix ^ ".cmo" in
    +  let oc = open_out_bin objfile in
    +  Misc.try_finally
    +    (fun () ->
    +       bytecode
    +       ++ Timings.(accumulate_time (Generate sourcefile))
    +           (Emitcode.to_file oc modulename objfile);
    +       Warnings.check_fatal ())
    +    ~always:(fun () -> close_out oc)
    +    ~exceptionally:(fun _exn -> remove_file objfile);

    If exceptionally fail with an exception, it is propagated as usual.

    If always or exceptionally use exceptions internally for control-flow but do not raise, then try_finally is careful to preserve any exception backtrace coming from work or always for easier debugging.

    val reraise_preserving_backtrace : exn -> (unit -> unit) -> 'a

    reraise_preserving_backtrace e f is (f (); raise e) except that the current backtrace is preserved, even if f uses exceptions internally.

    List operations

    val map_end : ('a -> 'b) -> 'a list -> 'b list -> 'b list

    map_end f l t is map f l @ t, just more efficient.

    val map_left_right : ('a -> 'b) -> 'a list -> 'b list

    Like List.map, with guaranteed left-to-right evaluation order

    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as List.for_all but for a binary predicate. In addition, this for_all2 never fails: given two lists with different lengths, it returns false.

    val replicate_list : 'a -> int -> 'a list

    replicate_list elem n is the list with n elements all identical to elem.

    val list_remove : 'a -> 'a list -> 'a list

    list_remove x l returns a copy of l with the first element equal to x removed.

    val split_last : 'a list -> 'a list * 'a

    Return the last element and the other elements of the given list.

    Hash table operations

    val create_hashtable : int -> ('a * 'b) list -> ('a, 'b) Stdlib.Hashtbl.t

    Create a hashtable with the given initial size and fills it with the given bindings.

    Extensions to the standard library

    module Stdlib : sig ... end

    Operations on files and file paths

    val find_in_path : string list -> string -> string

    Search a file in a list of directories.

    val find_in_path_rel : string list -> string -> string

    Search a relative file in a list of directories.

    val find_in_path_uncap : string list -> string -> string

    Same, but search also for uncapitalized name, i.e. if name is Foo.ml, allow /path/Foo.ml and /path/foo.ml to match.

    val remove_file : string -> unit

    Delete the given file if it exists and is a regular file. Does nothing for other kinds of files. Never raises an error.

    val expand_directory : string -> string -> string

    expand_directory alt file eventually expands a + at the beginning of file into alt (an alternate root directory)

    val split_path_contents : ?sep:char -> string -> string list

    split_path_contents ?sep s interprets s as the value of a "PATH"-like variable and returns the corresponding list of directories. s is split using the platform-specific delimiter, or ~sep if it is passed.

    Returns the empty list if s is empty.

    val copy_file : in_channel -> out_channel -> unit

    copy_file ic oc reads the contents of file ic and copies them to oc. It stops when encountering EOF on ic.

    val copy_file_chunk : in_channel -> out_channel -> int -> unit

    copy_file_chunk ic oc n reads n bytes from ic and copies them to oc. It raises End_of_file when encountering EOF on ic.

    val string_of_file : in_channel -> string

    string_of_file ic reads the contents of file ic and copies them to a string. It stops when encountering EOF on ic.

    val output_to_file_via_temporary : + ?mode:open_flag list -> string -> (string -> out_channel -> 'a) -> - 'a

    Produce output in temporary file, then rename it (as atomically as possible) to the desired output file name. output_to_file_via_temporary filename fn opens a temporary file which is passed to fn (name + output channel). When fn returns, the channel is closed and the temporary file is renamed to filename.

    val protect_writing_to_file : filename:string -> f:(out_channel -> 'a) -> 'a

    Open the given filename for writing (in binary mode), pass the out_channel to the given function, then close the channel. If the function raises an exception then filename will be removed.

    val concat_null_terminated : string list -> string

    concat_null_terminated [x1;x2; ... xn] is x1 ^ "\000" ^ x2 ^ "\000" ^ ... ^ xn ^ "\000"

    val split_null_terminated : string -> string list

    split_null_terminated s is similar String.split_on_char '\000' but ignores the trailing separator, if any

    val chop_extensions : string -> string

    Return the given file name without its extensions. The extensions is the longest suffix starting with a period and not including a directory separator, .xyz.uvw for instance.

    Return the given name if it does not contain an extension.

    Integer operations

    val log2 : int -> int

    log2 n returns s such that n = 1 lsl s if n is a power of 2

    val align : int -> int -> int

    align n a rounds n upwards to a multiple of a (a power of 2).

    val no_overflow_add : int -> int -> bool

    no_overflow_add n1 n2 returns true if the computation of n1 + n2 does not overflow.

    val no_overflow_sub : int -> int -> bool

    no_overflow_sub n1 n2 returns true if the computation of n1 - n2 does not overflow.

    val no_overflow_mul : int -> int -> bool

    no_overflow_mul n1 n2 returns true if the computation of n1 * n2 does not overflow.

    val no_overflow_lsl : int -> int -> bool

    no_overflow_lsl n k returns true if the computation of n lsl k does not overflow.

    module Int_literal_converter : sig ... end
    val find_first_mono : (int -> bool) -> int

    find_first_mono p takes an integer predicate p : int -> bool that we assume: 1. is monotonic on natural numbers: if a <= b then p a implies p b, 2. is satisfied for some natural numbers in range 0; max_int (this is equivalent to: p max_int = true).

    find_first_mono p is the smallest natural number N that satisfies p, computed in O(log(N)) calls to p.

    Our implementation supports two cases where the preconditions on p are not respected:

    • If p is always false, we silently return max_int instead of looping or crashing.
    • If p is non-monotonic but eventually true, we return some satisfying value.

    String operations

    val search_substring : string -> string -> int -> int

    search_substring pat str start returns the position of the first occurrence of string pat in string str. Search starts at offset start in str. Raise Not_found if pat does not occur.

    val replace_substring : before:string -> after:string -> string -> string

    replace_substring ~before ~after str replaces all occurrences of before with after in str and returns the resulting string.

    val rev_split_words : string -> string list

    rev_split_words s splits s in blank-separated words, and returns the list of words in reverse order.

    val cut_at : string -> char -> string * string

    String.cut_at s c returns a pair containing the sub-string before the first occurrence of c in s, and the sub-string after the first occurrence of c in s. let (before, after) = String.cut_at s c in - before ^ String.make 1 c ^ after is the identity if s contains c.

    Raise Not_found if the character does not appear in the string

    • since 4.01
    val ordinal_suffix : int -> string

    ordinal_suffix n is the appropriate suffix to append to the numeral n as an ordinal number: 1 -> "st", 2 -> "nd", 3 -> "rd", 4 -> "th", and so on. Handles larger numbers (e.g., 42 -> "nd") and the numbers 11--13 (which all get "th") correctly.

    val normalise_eol : string -> string

    normalise_eol s returns a fresh copy of s with any '\r' characters removed. Intended for pre-processing text which will subsequently be printed on a channel which performs EOL transformations (i.e. Windows)

    val delete_eol_spaces : string -> string

    delete_eol_spaces s returns a fresh copy of s with any end of line spaces removed. Intended to normalize the output of the toplevel for tests.

    Operations on references

    type ref_and_value =
    1. | R : 'a ref * 'a -> ref_and_value
    val protect_refs : ref_and_value list -> (unit -> 'a) -> 'a

    protect_refs l f temporarily sets r to v for each R (r, v) in l while executing f. The previous contents of the references is restored even if f raises an exception, without altering the exception backtrace.

    val get_ref : 'a list ref -> 'a list

    get_ref lr returns the content of the list reference lr and reset its content to the empty list.

    val set_or_ignore : ('a -> 'b option) -> 'b option ref -> 'a -> unit

    set_or_ignore f opt x sets opt to f x if it returns Some _, or leaves it unmodified if it returns None.

    Operations on triples and quadruples

    val fst3 : ('a * 'b * 'c) -> 'a
    val snd3 : ('a * 'b * 'c) -> 'b
    val thd3 : ('a * 'b * 'c) -> 'c
    val fst4 : ('a * 'b * 'c * 'd) -> 'a
    val snd4 : ('a * 'b * 'c * 'd) -> 'b
    val thd4 : ('a * 'b * 'c * 'd) -> 'c
    val for4 : ('a * 'b * 'c * 'd) -> 'd

    Long strings

    ``Long strings'' are mutable arrays of characters that are not limited in length to Sys.max_string_length.

    module LongString : sig ... end

    Spell checking and ``did you mean'' suggestions

    val edit_distance : string -> string -> int -> int option

    edit_distance a b cutoff computes the edit distance between strings a and b. To help efficiency, it uses a cutoff: if the distance d is smaller than cutoff, it returns Some d, else None.

    The distance algorithm currently used is Damerau-Levenshtein: it computes the number of insertion, deletion, substitution of letters, or swapping of adjacent letters to go from one word to the other. The particular algorithm may change in the future.

    val spellcheck : string list -> string -> string list

    spellcheck env name takes a list of names env that exist in the current environment and an erroneous name, and returns a list of suggestions taken from env, that are close enough to name that it may be a typo for one of them.

    val did_you_mean : Stdlib.Format.formatter -> (unit -> string list) -> unit

    did_you_mean ppf get_choices hints that the user may have meant one of the option returned by calling get_choices. It does nothing if the returned list is empty.

    The unit -> ... thunking is meant to delay any potentially-slow computation (typically computing edit-distance with many things from the current environment) to when the hint message is to be printed. You should print an understandable error message before calling did_you_mean, so that users get a clear notification of the failure even if producing the hint is slow.

    Colored terminal output

    module Color : sig ... end
    module Error_style : sig ... end

    Formatted output

    val print_if : + 'a

    Produce output in temporary file, then rename it (as atomically as possible) to the desired output file name. output_to_file_via_temporary filename fn opens a temporary file which is passed to fn (name + output channel). When fn returns, the channel is closed and the temporary file is renamed to filename.

    val protect_writing_to_file : filename:string -> f:(out_channel -> 'a) -> 'a

    Open the given filename for writing (in binary mode), pass the out_channel to the given function, then close the channel. If the function raises an exception then filename will be removed.

    val concat_null_terminated : string list -> string

    concat_null_terminated [x1;x2; ... xn] is x1 ^ "\000" ^ x2 ^ "\000" ^ ... ^ xn ^ "\000"

    val split_null_terminated : string -> string list

    split_null_terminated s is similar String.split_on_char '\000' but ignores the trailing separator, if any

    val chop_extensions : string -> string

    Return the given file name without its extensions. The extensions is the longest suffix starting with a period and not including a directory separator, .xyz.uvw for instance.

    Return the given name if it does not contain an extension.

    Integer operations

    val log2 : int -> int

    log2 n returns s such that n = 1 lsl s if n is a power of 2

    val align : int -> int -> int

    align n a rounds n upwards to a multiple of a (a power of 2).

    val no_overflow_add : int -> int -> bool

    no_overflow_add n1 n2 returns true if the computation of n1 + n2 does not overflow.

    val no_overflow_sub : int -> int -> bool

    no_overflow_sub n1 n2 returns true if the computation of n1 - n2 does not overflow.

    val no_overflow_mul : int -> int -> bool

    no_overflow_mul n1 n2 returns true if the computation of n1 * n2 does not overflow.

    val no_overflow_lsl : int -> int -> bool

    no_overflow_lsl n k returns true if the computation of n lsl k does not overflow.

    module Int_literal_converter : sig ... end
    val find_first_mono : (int -> bool) -> int

    find_first_mono p takes an integer predicate p : int -> bool that we assume: 1. is monotonic on natural numbers: if a <= b then p a implies p b, 2. is satisfied for some natural numbers in range 0; max_int (this is equivalent to: p max_int = true).

    find_first_mono p is the smallest natural number N that satisfies p, computed in O(log(N)) calls to p.

    Our implementation supports two cases where the preconditions on p are not respected:

    • If p is always false, we silently return max_int instead of looping or crashing.
    • If p is non-monotonic but eventually true, we return some satisfying value.

    String operations

    val search_substring : string -> string -> int -> int

    search_substring pat str start returns the position of the first occurrence of string pat in string str. Search starts at offset start in str. Raise Not_found if pat does not occur.

    val replace_substring : before:string -> after:string -> string -> string

    replace_substring ~before ~after str replaces all occurrences of before with after in str and returns the resulting string.

    val rev_split_words : string -> string list

    rev_split_words s splits s in blank-separated words, and returns the list of words in reverse order.

    val cut_at : string -> char -> string * string

    String.cut_at s c returns a pair containing the sub-string before the first occurrence of c in s, and the sub-string after the first occurrence of c in s. let (before, after) = String.cut_at s c in before ^ String.make 1 c ^ after is the identity if s contains c.

    Raise Not_found if the character does not appear in the string

    • since 4.01
    val ordinal_suffix : int -> string

    ordinal_suffix n is the appropriate suffix to append to the numeral n as an ordinal number: 1 -> "st", 2 -> "nd", 3 -> "rd", 4 -> "th", and so on. Handles larger numbers (e.g., 42 -> "nd") and the numbers 11--13 (which all get "th") correctly.

    val normalise_eol : string -> string

    normalise_eol s returns a fresh copy of s with any '\r' characters removed. Intended for pre-processing text which will subsequently be printed on a channel which performs EOL transformations (i.e. Windows)

    val delete_eol_spaces : string -> string

    delete_eol_spaces s returns a fresh copy of s with any end of line spaces removed. Intended to normalize the output of the toplevel for tests.

    Operations on references

    type ref_and_value =
    1. | R : 'a ref * 'a -> ref_and_value
    val protect_refs : ref_and_value list -> (unit -> 'a) -> 'a

    protect_refs l f temporarily sets r to v for each R (r, v) in l while executing f. The previous contents of the references is restored even if f raises an exception, without altering the exception backtrace.

    val get_ref : 'a list ref -> 'a list

    get_ref lr returns the content of the list reference lr and reset its content to the empty list.

    val set_or_ignore : ('a -> 'b option) -> 'b option ref -> 'a -> unit

    set_or_ignore f opt x sets opt to f x if it returns Some _, or leaves it unmodified if it returns None.

    Operations on triples and quadruples

    val fst3 : ('a * 'b * 'c) -> 'a
    val snd3 : ('a * 'b * 'c) -> 'b
    val thd3 : ('a * 'b * 'c) -> 'c
    val fst4 : ('a * 'b * 'c * 'd) -> 'a
    val snd4 : ('a * 'b * 'c * 'd) -> 'b
    val thd4 : ('a * 'b * 'c * 'd) -> 'c
    val for4 : ('a * 'b * 'c * 'd) -> 'd

    Long strings

    ``Long strings'' are mutable arrays of characters that are not limited in length to Sys.max_string_length.

    module LongString : sig ... end

    Spell checking and ``did you mean'' suggestions

    val edit_distance : string -> string -> int -> int option

    edit_distance a b cutoff computes the edit distance between strings a and b. To help efficiency, it uses a cutoff: if the distance d is smaller than cutoff, it returns Some d, else None.

    The distance algorithm currently used is Damerau-Levenshtein: it computes the number of insertion, deletion, substitution of letters, or swapping of adjacent letters to go from one word to the other. The particular algorithm may change in the future.

    val spellcheck : string list -> string -> string list

    spellcheck env name takes a list of names env that exist in the current environment and an erroneous name, and returns a list of suggestions taken from env, that are close enough to name that it may be a typo for one of them.

    val did_you_mean : Stdlib.Format.formatter -> (unit -> string list) -> unit

    did_you_mean ppf get_choices hints that the user may have meant one of the option returned by calling get_choices. It does nothing if the returned list is empty.

    The unit -> ... thunking is meant to delay any potentially-slow computation (typically computing edit-distance with many things from the current environment) to when the hint message is to be printed. You should print an understandable error message before calling did_you_mean, so that users get a clear notification of the failure even if producing the hint is slow.

    Colored terminal output

    module Color : sig ... end
    module Error_style : sig ... end

    Formatted output

    val print_if : Stdlib.Format.formatter -> bool ref -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> 'a

    print_if ppf flag fmt x prints x with fmt on ppf if b is true.

    val pp_two_columns : - ?sep:string -> - ?max_lines:int -> + ?sep:string -> + ?max_lines:int -> Stdlib.Format.formatter -> (string * string) list -> unit

    pp_two_columns ?sep ?max_lines ppf l prints the lines in l as two columns separated by sep ("|" by default). max_lines can be used to indicate a maximum number of lines to print -- an ellipsis gets inserted at the middle if the input has too many lines.

    Example:

    pp_two_columns ~max_lines:3 Format.std_formatter [
    -      "abc", "hello";
    -      "def", "zzz";
    -      "a"  , "bllbl";
    -      "bb" , "dddddd";
    -    ]

    prints

        abc | hello
    -    ...
    -    bb  | dddddd
    val print_see_manual : Stdlib.Format.formatter -> int list -> unit

    See manual section

    Displaying configuration variables

    val show_config_and_exit : unit -> unit

    Display the values of all compiler configuration variables from module Config, then exit the program with code 0.

    val show_config_variable_and_exit : string -> unit

    Display the value of the given configuration variable, then exit the program with code 0.

    Handling of build maps

    Build maps cause the compiler to normalize file names embedded in object files, thus leading to more reproducible builds.

    val get_build_path_prefix_map : unit -> Build_path_prefix_map.map option

    Returns the map encoded in the BUILD_PATH_PREFIX_MAP environment variable.

    val debug_prefix_map_flags : unit -> string list

    Returns the list of --debug-prefix-map flags to be passed to the assembler, built from the BUILD_PATH_PREFIX_MAP environment variable.

    Handling of magic numbers

    module Magic_number : sig ... end

    a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

    Miscellaneous type aliases

    type filepath = string
    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type alerts = string Stdlib.String.Map.t
    \ No newline at end of file + "abc", "hello"; + "def", "zzz"; + "a" , "bllbl"; + "bb" , "dddddd"; +]

    prints

    abc | hello
    +...
    +bb  | dddddd
    val print_see_manual : Stdlib.Format.formatter -> int list -> unit

    See manual section

    Displaying configuration variables

    val show_config_and_exit : unit -> unit

    Display the values of all compiler configuration variables from module Config, then exit the program with code 0.

    val show_config_variable_and_exit : string -> unit

    Display the value of the given configuration variable, then exit the program with code 0.

    Handling of build maps

    Build maps cause the compiler to normalize file names embedded in object files, thus leading to more reproducible builds.

    val get_build_path_prefix_map : unit -> Build_path_prefix_map.map option

    Returns the map encoded in the BUILD_PATH_PREFIX_MAP environment variable.

    val debug_prefix_map_flags : unit -> string list

    Returns the list of --debug-prefix-map flags to be passed to the assembler, built from the BUILD_PATH_PREFIX_MAP environment variable.

    Handling of magic numbers

    module Magic_number : sig ... end

    a typical magic number is "Caml1999I011"; it is formed of an alphanumeric prefix, here Caml1990I, followed by a version, here 011. The prefix identifies the kind of the versioned data: here the I indicates that it is the magic number for .cmi files.

    Miscellaneous type aliases

    type filepath = string
    type modname = string
    type crcs = (modname * Stdlib.Digest.t option) list
    type alerts = string Stdlib.String.Map.t
    diff --git a/ocaml/Mtype/index.html b/ocaml/Mtype/index.html index 7de4f70..27fe69f 100644 --- a/ocaml/Mtype/index.html +++ b/ocaml/Mtype/index.html @@ -1,15 +1,15 @@ -Mtype (ocaml.Mtype)

    Module Mtype

    val scrape_for_functor_arg : Env.t -> Types.module_type -> Types.module_type
    val scrape_for_type_of : - remove_aliases:bool -> +Mtype (ocaml.Mtype)

    Module Mtype

    val scrape_for_functor_arg : Env.t -> Types.module_type -> Types.module_type
    val scrape_for_type_of : + remove_aliases:bool -> Env.t -> Types.module_type -> - Types.module_type
    val freshen : scope:int -> Types.module_type -> Types.module_type
    val strengthen : - aliasable:bool -> + Types.module_type
    val freshen : scope:int -> Types.module_type -> Types.module_type
    val strengthen : + aliasable:bool -> Env.t -> Types.module_type -> Path.t -> Types.module_type
    val strengthen_decl : - aliasable:bool -> + aliasable:bool -> Env.t -> Types.module_declaration -> Path.t -> @@ -26,4 +26,4 @@ Path.t -> Ident.t -> Types.type_declaration -> - Types.type_declaration
    val type_paths : Env.t -> Path.t -> Types.module_type -> Path.t list
    val contains_type : Env.t -> Types.module_type -> bool
    val lower_nongen : int -> Types.module_type -> unit
    \ No newline at end of file + Types.type_declaration
    val type_paths : Env.t -> Path.t -> Types.module_type -> Path.t list
    val contains_type : Env.t -> Types.module_type -> bool
    val lower_nongen : int -> Types.module_type -> unit
    diff --git a/ocaml/Mutable_variable/Map/index.html b/ocaml/Mutable_variable/Map/index.html index d7144d9..9a2a279 100644 --- a/ocaml/Mutable_variable/Map/index.html +++ b/ocaml/Mutable_variable/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Mutable_variable.Map)

    Module Mutable_variable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Mutable_variable.Map)

    Module Mutable_variable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Mutable_variable/Set/index.html b/ocaml/Mutable_variable/Set/index.html index 4036259..66001bf 100644 --- a/ocaml/Mutable_variable/Set/index.html +++ b/ocaml/Mutable_variable/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Mutable_variable.Set)

    Module Mutable_variable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Mutable_variable.Set)

    Module Mutable_variable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Mutable_variable/T/index.html b/ocaml/Mutable_variable/T/index.html index 91fd573..74a273d 100644 --- a/ocaml/Mutable_variable/T/index.html +++ b/ocaml/Mutable_variable/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Mutable_variable.T)

    Module Mutable_variable.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Mutable_variable.T)

    Module Mutable_variable.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Mutable_variable/Tbl/index.html b/ocaml/Mutable_variable/Tbl/index.html index a993bbe..8e241fb 100644 --- a/ocaml/Mutable_variable/Tbl/index.html +++ b/ocaml/Mutable_variable/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Mutable_variable.Tbl)

    Module Mutable_variable.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Mutable_variable.Tbl)

    Module Mutable_variable.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Mutable_variable/index.html b/ocaml/Mutable_variable/index.html index 3925f09..304420e 100644 --- a/ocaml/Mutable_variable/index.html +++ b/ocaml/Mutable_variable/index.html @@ -1,8 +1,8 @@ -Mutable_variable (ocaml.Mutable_variable)

    Module Mutable_variable

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : - ?current_compilation_unit:Compilation_unit.t -> +Mutable_variable (ocaml.Mutable_variable)

    Module Mutable_variable

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : + ?current_compilation_unit:Compilation_unit.t -> Internal_variable_names.t -> t
    val create_with_same_name_as_ident : Ident.t -> t
    val create_from_variable : - ?current_compilation_unit:Compilation_unit.t -> + ?current_compilation_unit:Compilation_unit.t -> Variable.t -> - t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val name : t -> string
    val unique_name : t -> string
    val print_list : Stdlib.Format.formatter -> t list -> unit
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val output_full : out_channel -> t -> unit
    \ No newline at end of file + t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val name : t -> string
    val unique_name : t -> string
    val print_list : Stdlib.Format.formatter -> t list -> unit
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val output_full : out_channel -> t -> unit
    diff --git a/ocaml/Numbers/Float/Map/index.html b/ocaml/Numbers/Float/Map/index.html index a76c5da..1e23d24 100644 --- a/ocaml/Numbers/Float/Map/index.html +++ b/ocaml/Numbers/Float/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Numbers.Float.Map)

    Module Float.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Numbers.Float.Map)

    Module Float.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Numbers/Float/Set/index.html b/ocaml/Numbers/Float/Set/index.html index 6a3d0aa..2811375 100644 --- a/ocaml/Numbers/Float/Set/index.html +++ b/ocaml/Numbers/Float/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Numbers.Float.Set)

    Module Float.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Numbers.Float.Set)

    Module Float.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Numbers/Float/T/index.html b/ocaml/Numbers/Float/T/index.html index 0e6b22a..457c28f 100644 --- a/ocaml/Numbers/Float/T/index.html +++ b/ocaml/Numbers/Float/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Numbers.Float.T)

    Module Float.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Numbers.Float.T)

    Module Float.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Numbers/Float/Tbl/index.html b/ocaml/Numbers/Float/Tbl/index.html index 3edd70c..dd6c4ac 100644 --- a/ocaml/Numbers/Float/Tbl/index.html +++ b/ocaml/Numbers/Float/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Numbers.Float.Tbl)

    Module Float.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Numbers.Float.Tbl)

    Module Float.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Numbers/Float/index.html b/ocaml/Numbers/Float/index.html index 8a1036f..2c160fe 100644 --- a/ocaml/Numbers/Float/index.html +++ b/ocaml/Numbers/Float/index.html @@ -1,2 +1,2 @@ -Float (ocaml.Numbers.Float)

    Module Numbers.Float

    type t = float
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Float (ocaml.Numbers.Float)

    Module Numbers.Float

    type t = float
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Numbers/Int/Map/index.html b/ocaml/Numbers/Int/Map/index.html index 7785312..cff5b88 100644 --- a/ocaml/Numbers/Int/Map/index.html +++ b/ocaml/Numbers/Int/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Numbers.Int.Map)

    Module Int.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Numbers.Int.Map)

    Module Int.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Numbers/Int/Set/index.html b/ocaml/Numbers/Int/Set/index.html index ac6d7e0..ff45b74 100644 --- a/ocaml/Numbers/Int/Set/index.html +++ b/ocaml/Numbers/Int/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Numbers.Int.Set)

    Module Int.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Numbers.Int.Set)

    Module Int.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Numbers/Int/T/index.html b/ocaml/Numbers/Int/T/index.html index 219472f..9f32c62 100644 --- a/ocaml/Numbers/Int/T/index.html +++ b/ocaml/Numbers/Int/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Numbers.Int.T)

    Module Int.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Numbers.Int.T)

    Module Int.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Numbers/Int/Tbl/index.html b/ocaml/Numbers/Int/Tbl/index.html index 63bb4c1..949c80c 100644 --- a/ocaml/Numbers/Int/Tbl/index.html +++ b/ocaml/Numbers/Int/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Numbers.Int.Tbl)

    Module Int.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Numbers.Int.Tbl)

    Module Int.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Numbers/Int/index.html b/ocaml/Numbers/Int/index.html index 6b64194..69daa07 100644 --- a/ocaml/Numbers/Int/index.html +++ b/ocaml/Numbers/Int/index.html @@ -1,2 +1,2 @@ -Int (ocaml.Numbers.Int)

    Module Numbers.Int

    include Identifiable.S with type t = int
    type t = int
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val zero_to_n : int -> Set.t

    zero_to_n n is the set of numbers {0, ..., n} (inclusive).

    val to_string : int -> string
    \ No newline at end of file +Int (ocaml.Numbers.Int)

    Module Numbers.Int

    include Identifiable.S with type t = int
    type t = int
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val zero_to_n : int -> Set.t

    zero_to_n n is the set of numbers {0, ..., n} (inclusive).

    val to_string : int -> string
    diff --git a/ocaml/Numbers/Int16/index.html b/ocaml/Numbers/Int16/index.html index 4e8ddd1..eebe1d7 100644 --- a/ocaml/Numbers/Int16/index.html +++ b/ocaml/Numbers/Int16/index.html @@ -1,2 +1,2 @@ -Int16 (ocaml.Numbers.Int16)

    Module Numbers.Int16

    type t
    val of_int_exn : int -> t
    val of_int64_exn : Stdlib.Int64.t -> t
    val to_int : t -> int
    \ No newline at end of file +Int16 (ocaml.Numbers.Int16)

    Module Numbers.Int16

    type t
    val of_int_exn : int -> t
    val of_int64_exn : Stdlib.Int64.t -> t
    val to_int : t -> int
    diff --git a/ocaml/Numbers/Int8/index.html b/ocaml/Numbers/Int8/index.html index b1a34bf..5bd6788 100644 --- a/ocaml/Numbers/Int8/index.html +++ b/ocaml/Numbers/Int8/index.html @@ -1,2 +1,2 @@ -Int8 (ocaml.Numbers.Int8)

    Module Numbers.Int8

    type t
    val zero : t
    val one : t
    val of_int_exn : int -> t
    val to_int : t -> int
    \ No newline at end of file +Int8 (ocaml.Numbers.Int8)

    Module Numbers.Int8

    type t
    val zero : t
    val one : t
    val of_int_exn : int -> t
    val to_int : t -> int
    diff --git a/ocaml/Numbers/index.html b/ocaml/Numbers/index.html index 85aee0c..1ec1273 100644 --- a/ocaml/Numbers/index.html +++ b/ocaml/Numbers/index.html @@ -1,2 +1,2 @@ -Numbers (ocaml.Numbers)

    Module Numbers

    Modules about numbers, some of which satisfy Identifiable.S.

    Warning: this module is unstable and part of compiler-libs.

    module Int : sig ... end
    module Int8 : sig ... end
    module Int16 : sig ... end
    module Float : Identifiable.S with type t = float
    \ No newline at end of file +Numbers (ocaml.Numbers)

    Module Numbers

    Modules about numbers, some of which satisfy Identifiable.S.

    Warning: this module is unstable and part of compiler-libs.

    module Int : sig ... end
    module Int8 : sig ... end
    module Int16 : sig ... end
    module Float : Identifiable.S with type t = float
    diff --git a/ocaml/Odoc/index.html b/ocaml/Odoc/index.html index d866b00..d79e9a6 100644 --- a/ocaml/Odoc/index.html +++ b/ocaml/Odoc/index.html @@ -1,2 +1,2 @@ -Odoc (ocaml.Odoc)

    Module Odoc

    \ No newline at end of file +Odoc (ocaml.Odoc)

    Module Odoc

    diff --git a/ocaml/Odoc_analyse/index.html b/ocaml/Odoc_analyse/index.html index ce98105..43a6be8 100644 --- a/ocaml/Odoc_analyse/index.html +++ b/ocaml/Odoc_analyse/index.html @@ -1,5 +1,5 @@ -Odoc_analyse (ocaml.Odoc_analyse)

    Module Odoc_analyse

    val analyse_files : - ?init:Odoc_module.t_module list -> +Odoc_analyse (ocaml.Odoc_analyse)

    Module Odoc_analyse

    val analyse_files : + ?init:Odoc_module.t_module list -> Odoc_global.source_file list -> - Odoc_module.t_module list
    val dump_modules : string -> Odoc_module.t_module list -> unit
    val load_modules : string -> Odoc_module.t_module list
    \ No newline at end of file + Odoc_module.t_module list
    val dump_modules : string -> Odoc_module.t_module list -> unit
    val load_modules : string -> Odoc_module.t_module list
    diff --git a/ocaml/Odoc_args/index.html b/ocaml/Odoc_args/index.html index 21efb7c..8381f25 100644 --- a/ocaml/Odoc_args/index.html +++ b/ocaml/Odoc_args/index.html @@ -1,2 +1,2 @@ -Odoc_args (ocaml.Odoc_args)

    Module Odoc_args

    val current_generator : Odoc_gen.generator option ref
    val set_generator : Odoc_gen.generator -> unit
    val extend_html_generator : (module Odoc_gen.Html_functor) -> unit
    val extend_latex_generator : (module Odoc_gen.Latex_functor) -> unit
    val extend_texi_generator : (module Odoc_gen.Texi_functor) -> unit
    val extend_man_generator : (module Odoc_gen.Man_functor) -> unit
    val extend_dot_generator : (module Odoc_gen.Dot_functor) -> unit
    val extend_base_generator : (module Odoc_gen.Base_functor) -> unit
    val add_option : (string * Stdlib.Arg.spec * string) -> unit
    val parse : unit -> unit
    \ No newline at end of file +Odoc_args (ocaml.Odoc_args)

    Module Odoc_args

    val current_generator : Odoc_gen.generator option ref
    val set_generator : Odoc_gen.generator -> unit
    val extend_html_generator : (module Odoc_gen.Html_functor) -> unit
    val extend_latex_generator : (module Odoc_gen.Latex_functor) -> unit
    val extend_texi_generator : (module Odoc_gen.Texi_functor) -> unit
    val extend_man_generator : (module Odoc_gen.Man_functor) -> unit
    val extend_dot_generator : (module Odoc_gen.Dot_functor) -> unit
    val extend_base_generator : (module Odoc_gen.Base_functor) -> unit
    val add_option : (string * Stdlib.Arg.spec * string) -> unit
    val parse : unit -> unit
    diff --git a/ocaml/Odoc_ast/Analyser/argument-1-_/index.html b/ocaml/Odoc_ast/Analyser/argument-1-_/index.html index fbc17f1..c6950fc 100644 --- a/ocaml/Odoc_ast/Analyser/argument-1-_/index.html +++ b/ocaml/Odoc_ast/Analyser/argument-1-_/index.html @@ -1,6 +1,6 @@ -_ (ocaml.Odoc_ast.Analyser._)

    Parameter Analyser._

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : +_ (ocaml.Odoc_ast.Analyser._)

    Parameter Analyser._

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : (Odoc_types.text -> 'a) -> string -> string -> - Odoc_types.info option * 'a list
    \ No newline at end of file + Odoc_types.info option * 'a list
    diff --git a/ocaml/Odoc_ast/Analyser/index.html b/ocaml/Odoc_ast/Analyser/index.html index 08370dc..7bd4b0a 100644 --- a/ocaml/Odoc_ast/Analyser/index.html +++ b/ocaml/Odoc_ast/Analyser/index.html @@ -1,7 +1,7 @@ -Analyser (ocaml.Odoc_ast.Analyser)

    Module Odoc_ast.Analyser

    Parameters

    Signature

    val analyse_typed_tree : +Analyser (ocaml.Odoc_ast.Analyser)

    Module Odoc_ast.Analyser

    Parameters

    Signature

    val analyse_typed_tree : string -> string -> Parsetree.structure -> typedtree -> - Odoc_module.t_module
    \ No newline at end of file + Odoc_module.t_module
    diff --git a/ocaml/Odoc_ast/Typedtree_search/index.html b/ocaml/Odoc_ast/Typedtree_search/index.html index 87d38b6..fada7a0 100644 --- a/ocaml/Odoc_ast/Typedtree_search/index.html +++ b/ocaml/Odoc_ast/Typedtree_search/index.html @@ -1,5 +1,5 @@ -Typedtree_search (ocaml.Odoc_ast.Typedtree_search)

    Module Odoc_ast.Typedtree_search

    type ele
    type tab_values = +Typedtree_search (ocaml.Odoc_ast.Typedtree_search)

    Module Odoc_ast.Typedtree_search

    type ele
    val tables : Typedtree.structure_item list -> tab * tab_values
    val search_module : tab -> string -> Typedtree.module_expr
    val search_module_type : tab -> string -> Typedtree.module_type_declaration
    val search_extension : tab -> string -> Typedtree.type_extension
    val search_type_declaration : tab -> string -> Typedtree.type_declaration
    val search_class_exp : tab -> string -> @@ -18,4 +18,4 @@ Types.type_expr
    val search_method_expression : Typedtree.class_structure -> string -> - Typedtree.expression
    \ No newline at end of file + Typedtree.expression
    diff --git a/ocaml/Odoc_ast/index.html b/ocaml/Odoc_ast/index.html index 24c76cb..70004d6 100644 --- a/ocaml/Odoc_ast/index.html +++ b/ocaml/Odoc_ast/index.html @@ -1,2 +1,2 @@ -Odoc_ast (ocaml.Odoc_ast)

    Module Odoc_ast

    module Analyser (_ : Odoc_sig.Info_retriever) : sig ... end
    \ No newline at end of file +Odoc_ast (ocaml.Odoc_ast)

    Module Odoc_ast

    module Analyser (_ : Odoc_sig.Info_retriever) : sig ... end
    diff --git a/ocaml/Odoc_class/index.html b/ocaml/Odoc_class/index.html index b01ed7f..fb2cf9f 100644 --- a/ocaml/Odoc_class/index.html +++ b/ocaml/Odoc_class/index.html @@ -1,11 +1,11 @@ -Odoc_class (ocaml.Odoc_class)

    Module Odoc_class

    module Name = Odoc_name
    type class_element =
    1. | Class_attribute of Odoc_value.t_attribute
    2. | Class_method of Odoc_value.t_method
    3. | Class_comment of Odoc_types.text
    type cct =
    1. | Cl of t_class
    2. | Cltype of t_class_type * Types.type_expr list
    and inherited_class = {
    1. ic_name : Name.t;
    2. mutable ic_class : cct option;
    3. ic_text : Odoc_types.text option;
    }
    and class_apply = {
    1. capp_name : Name.t;
    2. mutable capp_class : t_class option;
    3. capp_params : Types.type_expr list;
    4. capp_params_code : string list;
    }
    and class_constr = {
    1. cco_name : Name.t;
    2. mutable cco_class : cct option;
    3. cco_type_parameters : Types.type_expr list;
    }
    and class_kind =
    1. | Class_structure of inherited_class list * class_element list
    2. | Class_apply of class_apply
    3. | Class_constr of class_constr
    4. | Class_constraint of class_kind * class_type_kind
    and t_class = {
    1. cl_name : Name.t;
    2. mutable cl_info : Odoc_types.info option;
    3. cl_type : Types.class_type;
    4. cl_type_parameters : Types.type_expr list;
    5. cl_virtual : bool;
    6. mutable cl_kind : class_kind;
    7. mutable cl_parameters : Odoc_parameter.parameter list;
    8. mutable cl_loc : Odoc_types.location;
    }
    and class_type_alias = {
    1. cta_name : Name.t;
    2. mutable cta_class : cct option;
    3. cta_type_parameters : Types.type_expr list;
    }
    and class_type_kind =
    1. | Class_signature of inherited_class list * class_element list
    2. | Class_type of class_type_alias
    and t_class_type = {
    1. clt_name : Name.t;
    2. mutable clt_info : Odoc_types.info option;
    3. clt_type : Types.class_type;
    4. clt_type_parameters : Types.type_expr list;
    5. clt_virtual : bool;
    6. mutable clt_kind : class_type_kind;
    7. mutable clt_loc : Odoc_types.location;
    }
    val class_parameter_text_by_name : t_class -> string -> Odoc_types.text option
    val class_elements : ?trans:bool -> t_class -> class_element list
    val class_type_elements : ?trans:bool -> t_class_type -> class_element list
    val class_attributes : ?trans:bool -> t_class -> Odoc_value.t_attribute list
    val class_methods : ?trans:bool -> t_class -> Odoc_value.t_method list
    val class_comments : ?trans:bool -> t_class -> Odoc_types.text list
    val class_update_parameters_text : t_class -> unit
    val class_type_attributes : - ?trans:bool -> +Odoc_class (ocaml.Odoc_class)

    Module Odoc_class

    module Name = Odoc_name
    type class_element =
    1. | Class_attribute of Odoc_value.t_attribute
    2. | Class_method of Odoc_value.t_method
    3. | Class_comment of Odoc_types.text
    type cct =
    1. | Cl of t_class
    2. | Cltype of t_class_type * Types.type_expr list
    and inherited_class = {
    1. ic_name : Name.t;
    2. mutable ic_class : cct option;
    3. ic_text : Odoc_types.text option;
    }
    and class_apply = {
    1. capp_name : Name.t;
    2. mutable capp_class : t_class option;
    3. capp_params : Types.type_expr list;
    4. capp_params_code : string list;
    }
    and class_constr = {
    1. cco_name : Name.t;
    2. mutable cco_class : cct option;
    3. cco_type_parameters : Types.type_expr list;
    }
    and class_kind =
    1. | Class_structure of inherited_class list * class_element list
    2. | Class_apply of class_apply
    3. | Class_constr of class_constr
    4. | Class_constraint of class_kind * class_type_kind
    and t_class = {
    1. cl_name : Name.t;
    2. mutable cl_info : Odoc_types.info option;
    3. cl_type : Types.class_type;
    4. cl_type_parameters : Types.type_expr list;
    5. cl_virtual : bool;
    6. mutable cl_kind : class_kind;
    7. mutable cl_parameters : Odoc_parameter.parameter list;
    8. mutable cl_loc : Odoc_types.location;
    }
    and class_type_alias = {
    1. cta_name : Name.t;
    2. mutable cta_class : cct option;
    3. cta_type_parameters : Types.type_expr list;
    }
    and class_type_kind =
    1. | Class_signature of inherited_class list * class_element list
    2. | Class_type of class_type_alias
    and t_class_type = {
    1. clt_name : Name.t;
    2. mutable clt_info : Odoc_types.info option;
    3. clt_type : Types.class_type;
    4. clt_type_parameters : Types.type_expr list;
    5. clt_virtual : bool;
    6. mutable clt_kind : class_type_kind;
    7. mutable clt_loc : Odoc_types.location;
    }
    val class_parameter_text_by_name : t_class -> string -> Odoc_types.text option
    val class_elements : ?trans:bool -> t_class -> class_element list
    val class_type_elements : ?trans:bool -> t_class_type -> class_element list
    val class_attributes : ?trans:bool -> t_class -> Odoc_value.t_attribute list
    val class_methods : ?trans:bool -> t_class -> Odoc_value.t_method list
    val class_comments : ?trans:bool -> t_class -> Odoc_types.text list
    val class_update_parameters_text : t_class -> unit
    val class_type_attributes : + ?trans:bool -> t_class_type -> Odoc_value.t_attribute list
    val class_type_methods : - ?trans:bool -> + ?trans:bool -> t_class_type -> - Odoc_value.t_method list
    val class_type_comments : ?trans:bool -> t_class_type -> Odoc_types.text list
    val class_type_parameter_text_by_name : + Odoc_value.t_method list
    val class_type_comments : ?trans:bool -> t_class_type -> Odoc_types.text list
    val class_type_parameter_text_by_name : t_class_type -> string -> - Odoc_types.text option
    \ No newline at end of file + Odoc_types.text option
    diff --git a/ocaml/Odoc_comments/Basic_info_retriever/index.html b/ocaml/Odoc_comments/Basic_info_retriever/index.html index 7bef6c7..cf7ca01 100644 --- a/ocaml/Odoc_comments/Basic_info_retriever/index.html +++ b/ocaml/Odoc_comments/Basic_info_retriever/index.html @@ -1,6 +1,6 @@ -Basic_info_retriever (ocaml.Odoc_comments.Basic_info_retriever)

    Module Odoc_comments.Basic_info_retriever

    val blank_line_outside_simple : string -> string -> bool
    val all_special : string -> string -> int * Odoc_types.info list
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : +Basic_info_retriever (ocaml.Odoc_comments.Basic_info_retriever)

    Module Odoc_comments.Basic_info_retriever

    val blank_line_outside_simple : string -> string -> bool
    val all_special : string -> string -> int * Odoc_types.info list
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : (Odoc_types.text -> 'a) -> string -> string -> - Odoc_types.info option * 'a list
    \ No newline at end of file + Odoc_types.info option * 'a list
    diff --git a/ocaml/Odoc_comments/index.html b/ocaml/Odoc_comments/index.html index d816aca..0acc196 100644 --- a/ocaml/Odoc_comments/index.html +++ b/ocaml/Odoc_comments/index.html @@ -1,5 +1,5 @@ -Odoc_comments (ocaml.Odoc_comments)

    Module Odoc_comments

    val simple_blank : string
    module type Texter = sig ... end
    module Basic_info_retriever : sig ... end
    val info_of_string : string -> Odoc_types.info
    val info_of_comment_file : +Odoc_comments (ocaml.Odoc_comments)

    Module Odoc_comments

    val simple_blank : string
    module type Texter = sig ... end
    module Basic_info_retriever : sig ... end
    val info_of_string : string -> Odoc_types.info
    val info_of_comment_file : Odoc_module.t_module list -> string -> - Odoc_types.info
    \ No newline at end of file + Odoc_types.info
    diff --git a/ocaml/Odoc_comments/module-type-Texter/index.html b/ocaml/Odoc_comments/module-type-Texter/index.html index f37e68f..810e988 100644 --- a/ocaml/Odoc_comments/module-type-Texter/index.html +++ b/ocaml/Odoc_comments/module-type-Texter/index.html @@ -1,2 +1,2 @@ -Texter (ocaml.Odoc_comments.Texter)

    Module type Odoc_comments.Texter

    val text_of_string : string -> Odoc_types.text
    \ No newline at end of file +Texter (ocaml.Odoc_comments.Texter)

    Module type Odoc_comments.Texter

    val text_of_string : string -> Odoc_types.text
    diff --git a/ocaml/Odoc_comments_global/index.html b/ocaml/Odoc_comments_global/index.html index 44afd1f..79a8f22 100644 --- a/ocaml/Odoc_comments_global/index.html +++ b/ocaml/Odoc_comments_global/index.html @@ -1,2 +1,2 @@ -Odoc_comments_global (ocaml.Odoc_comments_global)

    Module Odoc_comments_global

    val nb_chars : int ref
    val authors : string list ref
    val version : string option ref
    val sees : string list ref
    val since : string option ref
    val before : (string * string) list ref
    val deprecated : string option ref
    val params : (string * string) list ref
    val raised_exceptions : (string * string) list ref
    val return_value : string option ref
    val customs : (string * string) list ref
    val init : unit -> unit
    \ No newline at end of file +Odoc_comments_global (ocaml.Odoc_comments_global)

    Module Odoc_comments_global

    val nb_chars : int ref
    val authors : string list ref
    val version : string option ref
    val sees : string list ref
    val since : string option ref
    val before : (string * string) list ref
    val deprecated : string option ref
    val params : (string * string) list ref
    val raised_exceptions : (string * string) list ref
    val return_value : string option ref
    val customs : (string * string) list ref
    val init : unit -> unit
    diff --git a/ocaml/Odoc_config/index.html b/ocaml/Odoc_config/index.html index 391fc5b..300ebdb 100644 --- a/ocaml/Odoc_config/index.html +++ b/ocaml/Odoc_config/index.html @@ -1,2 +1,2 @@ -Odoc_config (ocaml.Odoc_config)

    Module Odoc_config

    val custom_generators_path : string
    val print_warnings : bool ref
    \ No newline at end of file +Odoc_config (ocaml.Odoc_config)

    Module Odoc_config

    val custom_generators_path : string
    val print_warnings : bool ref
    diff --git a/ocaml/Odoc_cross/index.html b/ocaml/Odoc_cross/index.html index b9bcea5..2e1c673 100644 --- a/ocaml/Odoc_cross/index.html +++ b/ocaml/Odoc_cross/index.html @@ -1,6 +1,6 @@ -Odoc_cross (ocaml.Odoc_cross)

    Module Odoc_cross

    val associate : Odoc_module.t_module list -> unit
    val assoc_comments_info : +Odoc_cross (ocaml.Odoc_cross)

    Module Odoc_cross

    val associate : Odoc_module.t_module list -> unit
    val assoc_comments_info : string -> Odoc_module.t_module list -> Odoc_types.info -> - Odoc_types.info
    \ No newline at end of file + Odoc_types.info
    diff --git a/ocaml/Odoc_dag2html/index.html b/ocaml/Odoc_dag2html/index.html index 9e930b8..053e075 100644 --- a/ocaml/Odoc_dag2html/index.html +++ b/ocaml/Odoc_dag2html/index.html @@ -1,5 +1,5 @@ -Odoc_dag2html (ocaml.Odoc_dag2html)

    Module Odoc_dag2html

    type !'a dag = {
    1. mutable dag : 'a node array;
    }
    and !'a node = {
    1. mutable pare : idag list;
    2. valu : 'a;
    3. mutable chil : idag list;
    }
    and idag = int
    val html_of_dag : string dag -> string
    val create_class_dag : +Odoc_dag2html (ocaml.Odoc_dag2html)

    Module Odoc_dag2html

    type !'a dag = {
    1. mutable dag : 'a node array;
    }
    and !'a node = {
    1. mutable pare : idag list;
    2. valu : 'a;
    3. mutable chil : idag list;
    }
    and idag = int
    val html_of_dag : string dag -> string
    \ No newline at end of file + (Odoc_info.Name.t * Odoc_info.Class.cct option) dag
    diff --git a/ocaml/Odoc_dep/index.html b/ocaml/Odoc_dep/index.html index e50c688..5659d2b 100644 --- a/ocaml/Odoc_dep/index.html +++ b/ocaml/Odoc_dep/index.html @@ -1,5 +1,5 @@ -Odoc_dep (ocaml.Odoc_dep)

    Module Odoc_dep

    Top modules dependencies.

    val impl_dependencies : Parsetree.structure -> Misc.Stdlib.String.Set.elt list
    val intf_dependencies : Parsetree.signature -> Misc.Stdlib.String.Set.elt list
    val kernel_deps_of_modules : Odoc_module.t_module list -> unit
    val deps_of_types : - ?kernel:bool -> +Odoc_dep (ocaml.Odoc_dep)

    Module Odoc_dep

    Top modules dependencies.

    val impl_dependencies : Parsetree.structure -> Misc.Stdlib.String.Set.elt list
    val intf_dependencies : Parsetree.signature -> Misc.Stdlib.String.Set.elt list
    val kernel_deps_of_modules : Odoc_module.t_module list -> unit
    val deps_of_types : + ?kernel:bool -> Odoc_type.t_type list -> - (Odoc_type.t_type * Misc.Stdlib.String.Set.elt list) list
    \ No newline at end of file + (Odoc_type.t_type * Misc.Stdlib.String.Set.elt list) list
    diff --git a/ocaml/Odoc_dot/Generator/class-dot/index.html b/ocaml/Odoc_dot/Generator/class-dot/index.html index 17238a8..ef23e95 100644 --- a/ocaml/Odoc_dot/Generator/class-dot/index.html +++ b/ocaml/Odoc_dot/Generator/class-dot/index.html @@ -1,5 +1,5 @@ -dot (ocaml.Odoc_dot.Generator.dot)

    Class Generator.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> +dot (ocaml.Odoc_dot.Generator.dot)

    Class Generator.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Format.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/ocaml/Odoc_dot/Generator/index.html b/ocaml/Odoc_dot/Generator/index.html index 5792f60..4a90fd7 100644 --- a/ocaml/Odoc_dot/Generator/index.html +++ b/ocaml/Odoc_dot/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_dot.Generator)

    Module Odoc_dot.Generator

    class dot : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_dot.Generator)

    Module Odoc_dot.Generator

    class dot : object ... end
    diff --git a/ocaml/Odoc_dot/index.html b/ocaml/Odoc_dot/index.html index 57dd93b..b6c6a60 100644 --- a/ocaml/Odoc_dot/index.html +++ b/ocaml/Odoc_dot/index.html @@ -1,2 +1,2 @@ -Odoc_dot (ocaml.Odoc_dot)

    Module Odoc_dot

    Definition of a class which outputs a dot file showing top modules dependencies.

    val dot_include_all : bool ref
    val dot_types : bool ref
    val dot_reduce : bool ref
    val dot_colors : string list ref
    module Generator : sig ... end
    module type Dot_generator = sig ... end
    \ No newline at end of file +Odoc_dot (ocaml.Odoc_dot)

    Module Odoc_dot

    Definition of a class which outputs a dot file showing top modules dependencies.

    val dot_include_all : bool ref
    val dot_types : bool ref
    val dot_reduce : bool ref
    val dot_colors : string list ref
    module Generator : sig ... end
    module type Dot_generator = sig ... end
    diff --git a/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html b/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html index ef77a84..9156ef6 100644 --- a/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html +++ b/ocaml/Odoc_dot/module-type-Dot_generator/class-dot/index.html @@ -1,5 +1,5 @@ -dot (ocaml.Odoc_dot.Dot_generator.dot)

    Class Dot_generator.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> +dot (ocaml.Odoc_dot.Dot_generator.dot)

    Class Dot_generator.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Format.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/ocaml/Odoc_dot/module-type-Dot_generator/index.html b/ocaml/Odoc_dot/module-type-Dot_generator/index.html index ac072ed..62a1a67 100644 --- a/ocaml/Odoc_dot/module-type-Dot_generator/index.html +++ b/ocaml/Odoc_dot/module-type-Dot_generator/index.html @@ -1,2 +1,2 @@ -Dot_generator (ocaml.Odoc_dot.Dot_generator)

    Module type Odoc_dot.Dot_generator

    class dot : object ... end
    \ No newline at end of file +Dot_generator (ocaml.Odoc_dot.Dot_generator)

    Module type Odoc_dot.Dot_generator

    class dot : object ... end
    diff --git a/ocaml/Odoc_env/index.html b/ocaml/Odoc_env/index.html index c4c9f8d..f1a4cd4 100644 --- a/ocaml/Odoc_env/index.html +++ b/ocaml/Odoc_env/index.html @@ -1,2 +1,2 @@ -Odoc_env (ocaml.Odoc_env)

    Module Odoc_env

    type env
    val empty : env
    val add_signature : env -> string -> ?rel:string -> Types.signature -> env
    val add_extension : env -> Odoc_name.t -> env
    val add_type : env -> Odoc_name.t -> env
    val add_value : env -> Odoc_name.t -> env
    val add_module : env -> Odoc_name.t -> env
    val add_module_type : env -> Odoc_name.t -> env
    val add_class : env -> Odoc_name.t -> env
    val add_class_type : env -> Odoc_name.t -> env
    val full_module_name : env -> Odoc_name.t -> Odoc_name.t
    val full_module_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_module_or_module_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_value_name : env -> Odoc_name.t -> Odoc_name.t
    val full_extension_constructor_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_or_class_type_name : env -> Odoc_name.t -> Odoc_name.t
    val subst_type : env -> Types.type_expr -> Types.type_expr
    val subst_module_type : env -> Types.module_type -> Types.module_type
    val subst_class_type : env -> Types.class_type -> Types.class_type
    \ No newline at end of file +Odoc_env (ocaml.Odoc_env)

    Module Odoc_env

    type env
    val empty : env
    val add_signature : env -> string -> ?rel:string -> Types.signature -> env
    val add_extension : env -> Odoc_name.t -> env
    val add_type : env -> Odoc_name.t -> env
    val add_value : env -> Odoc_name.t -> env
    val add_module : env -> Odoc_name.t -> env
    val add_module_type : env -> Odoc_name.t -> env
    val add_class : env -> Odoc_name.t -> env
    val add_class_type : env -> Odoc_name.t -> env
    val full_module_name : env -> Odoc_name.t -> Odoc_name.t
    val full_module_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_module_or_module_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_value_name : env -> Odoc_name.t -> Odoc_name.t
    val full_extension_constructor_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_type_name : env -> Odoc_name.t -> Odoc_name.t
    val full_class_or_class_type_name : env -> Odoc_name.t -> Odoc_name.t
    val subst_type : env -> Types.type_expr -> Types.type_expr
    val subst_module_type : env -> Types.module_type -> Types.module_type
    val subst_class_type : env -> Types.class_type -> Types.class_type
    diff --git a/ocaml/Odoc_exception/index.html b/ocaml/Odoc_exception/index.html index 0d70f1f..a728213 100644 --- a/ocaml/Odoc_exception/index.html +++ b/ocaml/Odoc_exception/index.html @@ -1,2 +1,2 @@ -Odoc_exception (ocaml.Odoc_exception)

    Module Odoc_exception

    module Name = Odoc_name
    type exception_alias = {
    1. ea_name : Name.t;
    2. mutable ea_ex : t_exception option;
    }
    and t_exception = {
    1. ex_name : Name.t;
    2. mutable ex_info : Odoc_types.info option;
    3. ex_args : Odoc_type.constructor_args;
    4. ex_ret : Types.type_expr option;
    5. ex_alias : exception_alias option;
    6. mutable ex_loc : Odoc_types.location;
    7. mutable ex_code : string option;
    }
    \ No newline at end of file +Odoc_exception (ocaml.Odoc_exception)

    Module Odoc_exception

    module Name = Odoc_name
    type exception_alias = {
    1. ea_name : Name.t;
    2. mutable ea_ex : t_exception option;
    }
    and t_exception = {
    1. ex_name : Name.t;
    2. mutable ex_info : Odoc_types.info option;
    3. ex_args : Odoc_type.constructor_args;
    4. ex_ret : Types.type_expr option;
    5. ex_alias : exception_alias option;
    6. mutable ex_loc : Odoc_types.location;
    7. mutable ex_code : string option;
    }
    diff --git a/ocaml/Odoc_extension/index.html b/ocaml/Odoc_extension/index.html index 406eb3f..6fd8fe2 100644 --- a/ocaml/Odoc_extension/index.html +++ b/ocaml/Odoc_extension/index.html @@ -1,2 +1,2 @@ -Odoc_extension (ocaml.Odoc_extension)

    Module Odoc_extension

    Representation and manipulation of type extensions.

    module Name = Odoc_name
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type extension_alias = {
    1. xa_name : Name.t;
    2. mutable xa_xt : t_extension_constructor option;
    }
    and t_extension_constructor = {
    1. xt_name : Name.t;
    2. xt_args : Odoc_type.constructor_args;
    3. xt_ret : Types.type_expr option;
    4. xt_type_extension : t_type_extension;
    5. xt_alias : extension_alias option;
    6. mutable xt_loc : Odoc_types.location;
    7. mutable xt_text : Odoc_types.info option;
    }
    and t_type_extension = {
    1. mutable te_info : Odoc_types.info option;
    2. te_type_name : Name.t;
    3. te_type_parameters : Types.type_expr list;
    4. te_private : private_flag;
    5. mutable te_constructors : t_extension_constructor list;
    6. mutable te_loc : Odoc_types.location;
    7. mutable te_code : string option;
    }
    val extension_constructors : t_type_extension -> t_extension_constructor list
    \ No newline at end of file +Odoc_extension (ocaml.Odoc_extension)

    Module Odoc_extension

    Representation and manipulation of type extensions.

    module Name = Odoc_name
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type extension_alias = {
    1. xa_name : Name.t;
    2. mutable xa_xt : t_extension_constructor option;
    }
    and t_extension_constructor = {
    1. xt_name : Name.t;
    2. xt_args : Odoc_type.constructor_args;
    3. xt_ret : Types.type_expr option;
    4. xt_type_extension : t_type_extension;
    5. xt_alias : extension_alias option;
    6. mutable xt_loc : Odoc_types.location;
    7. mutable xt_text : Odoc_types.info option;
    }
    and t_type_extension = {
    1. mutable te_info : Odoc_types.info option;
    2. te_type_name : Name.t;
    3. te_type_parameters : Types.type_expr list;
    4. te_private : private_flag;
    5. mutable te_constructors : t_extension_constructor list;
    6. mutable te_loc : Odoc_types.location;
    7. mutable te_code : string option;
    }
    val extension_constructors : t_type_extension -> t_extension_constructor list
    diff --git a/ocaml/Odoc_gen/Base_generator/class-generator/index.html b/ocaml/Odoc_gen/Base_generator/class-generator/index.html index 41fb61c..d33c41b 100644 --- a/ocaml/Odoc_gen/Base_generator/class-generator/index.html +++ b/ocaml/Odoc_gen/Base_generator/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_gen.Base_generator.generator)

    Class Base_generator.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_gen.Base_generator.generator)

    Class Base_generator.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/ocaml/Odoc_gen/Base_generator/index.html b/ocaml/Odoc_gen/Base_generator/index.html index fd23609..0def53f 100644 --- a/ocaml/Odoc_gen/Base_generator/index.html +++ b/ocaml/Odoc_gen/Base_generator/index.html @@ -1,2 +1,2 @@ -Base_generator (ocaml.Odoc_gen.Base_generator)

    Module Odoc_gen.Base_generator

    \ No newline at end of file +Base_generator (ocaml.Odoc_gen.Base_generator)

    Module Odoc_gen.Base_generator

    diff --git a/ocaml/Odoc_gen/class-type-doc_generator/index.html b/ocaml/Odoc_gen/class-type-doc_generator/index.html index a01b6f0..fac9741 100644 --- a/ocaml/Odoc_gen/class-type-doc_generator/index.html +++ b/ocaml/Odoc_gen/class-type-doc_generator/index.html @@ -1,2 +1,2 @@ -doc_generator (ocaml.Odoc_gen.doc_generator)

    Class type Odoc_gen.doc_generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +doc_generator (ocaml.Odoc_gen.doc_generator)

    Class type Odoc_gen.doc_generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/ocaml/Odoc_gen/index.html b/ocaml/Odoc_gen/index.html index 7e7dc11..c64d13a 100644 --- a/ocaml/Odoc_gen/index.html +++ b/ocaml/Odoc_gen/index.html @@ -1,5 +1,5 @@ -Odoc_gen (ocaml.Odoc_gen)

    Module Odoc_gen

    class type doc_generator = object ... end
    module type Base = sig ... end
    module type Base_functor = functor (_ : Base) -> Base
    module type Html_functor = +Odoc_gen (ocaml.Odoc_gen)

    Module Odoc_gen

    class type doc_generator = object ... end
    module type Base = sig ... end
    module type Base_functor = functor (_ : Base) -> Base
    module type Latex_functor = functor (_ : Odoc_latex.Latex_generator) -> @@ -9,4 +9,4 @@ functor (_ : Odoc_man.Man_generator) -> Odoc_man.Man_generator
    type generator =
    1. | Html of (module Odoc_html.Html_generator)
    2. | Latex of (module Odoc_latex.Latex_generator)
    3. | Texi of (module Odoc_texi.Texi_generator)
    4. | Man of (module Odoc_man.Man_generator)
    5. | Dot of (module Odoc_dot.Dot_generator)
    6. | Base of (module Base)
    val get_minimal_generator : generator -> doc_generator
    \ No newline at end of file + Odoc_dot.Dot_generator
    type generator =
    1. | Html of (module Odoc_html.Html_generator)
    2. | Latex of (module Odoc_latex.Latex_generator)
    3. | Texi of (module Odoc_texi.Texi_generator)
    4. | Man of (module Odoc_man.Man_generator)
    5. | Dot of (module Odoc_dot.Dot_generator)
    6. | Base of (module Base)
    val get_minimal_generator : generator -> doc_generator
    diff --git a/ocaml/Odoc_gen/module-type-Base/class-generator/index.html b/ocaml/Odoc_gen/module-type-Base/class-generator/index.html index e00a71f..9db30b7 100644 --- a/ocaml/Odoc_gen/module-type-Base/class-generator/index.html +++ b/ocaml/Odoc_gen/module-type-Base/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_gen.Base.generator)

    Class Base.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_gen.Base.generator)

    Class Base.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/ocaml/Odoc_gen/module-type-Base/index.html b/ocaml/Odoc_gen/module-type-Base/index.html index 2733439..110a33a 100644 --- a/ocaml/Odoc_gen/module-type-Base/index.html +++ b/ocaml/Odoc_gen/module-type-Base/index.html @@ -1,2 +1,2 @@ -Base (ocaml.Odoc_gen.Base)

    Module type Odoc_gen.Base

    \ No newline at end of file +Base (ocaml.Odoc_gen.Base)

    Module type Odoc_gen.Base

    diff --git a/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html b/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html index 6900195..80c8e84 100644 --- a/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html +++ b/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_gen.Base_functor._.generator)

    Class _.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_gen.Base_functor._.generator)

    Class _.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html index d1070e7..aef9b20 100644 --- a/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Base_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Base_functor._)

    Parameter Base_functor._

    \ No newline at end of file +_ (ocaml.Odoc_gen.Base_functor._)

    Parameter Base_functor._

    diff --git a/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html b/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html index a9c1abc..6d392f4 100644 --- a/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html +++ b/ocaml/Odoc_gen/module-type-Base_functor/class-generator/index.html @@ -1,2 +1,2 @@ -generator (ocaml.Odoc_gen.Base_functor.generator)

    Class Base_functor.generator

    method generate : Odoc_module.t_module list -> unit
    \ No newline at end of file +generator (ocaml.Odoc_gen.Base_functor.generator)

    Class Base_functor.generator

    method generate : Odoc_module.t_module list -> unit
    diff --git a/ocaml/Odoc_gen/module-type-Base_functor/index.html b/ocaml/Odoc_gen/module-type-Base_functor/index.html index e5359d4..f96a448 100644 --- a/ocaml/Odoc_gen/module-type-Base_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Base_functor/index.html @@ -1,2 +1,2 @@ -Base_functor (ocaml.Odoc_gen.Base_functor)

    Module type Odoc_gen.Base_functor

    Parameters

    module _ : Base

    Signature

    \ No newline at end of file +Base_functor (ocaml.Odoc_gen.Base_functor)

    Module type Odoc_gen.Base_functor

    Parameters

    module _ : Base

    Signature

    diff --git a/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html b/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html index d08661e..4475ad4 100644 --- a/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html +++ b/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/class-dot/index.html @@ -1,5 +1,5 @@ -dot (ocaml.Odoc_gen.Dot_functor._.dot)

    Class _.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> +dot (ocaml.Odoc_gen.Dot_functor._.dot)

    Class _.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Format.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html index 0a64cc4..1209524 100644 --- a/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Dot_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Dot_functor._)

    Parameter Dot_functor._

    class dot : object ... end
    \ No newline at end of file +_ (ocaml.Odoc_gen.Dot_functor._)

    Parameter Dot_functor._

    class dot : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html b/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html index ab432f2..da0f466 100644 --- a/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html +++ b/ocaml/Odoc_gen/module-type-Dot_functor/class-dot/index.html @@ -1,5 +1,5 @@ -dot (ocaml.Odoc_gen.Dot_functor.dot)

    Class Dot_functor.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> +dot (ocaml.Odoc_gen.Dot_functor.dot)

    Class Dot_functor.dot

    val mutable colors : string list
    val mutable loc_colors : (Odoc_info.Name.t * string) list
    val mutable modules : Odoc_info.Module.t_module list
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method generate_for_type : Format.formatter -> (Odoc_info.Type.t_type * Odoc_info.Name.t list) -> @@ -8,4 +8,4 @@ unit
    method print_one_dep : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Name.t -> - unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    \ No newline at end of file + unit
    method print_type_atts : Format.formatter -> Odoc_info.Type.t_type -> unit
    diff --git a/ocaml/Odoc_gen/module-type-Dot_functor/index.html b/ocaml/Odoc_gen/module-type-Dot_functor/index.html index 031b833..28ba58b 100644 --- a/ocaml/Odoc_gen/module-type-Dot_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Dot_functor/index.html @@ -1,2 +1,2 @@ -Dot_functor (ocaml.Odoc_gen.Dot_functor)

    Module type Odoc_gen.Dot_functor

    Parameters

    Signature

    class dot : object ... end
    \ No newline at end of file +Dot_functor (ocaml.Odoc_gen.Dot_functor)

    Module type Odoc_gen.Dot_functor

    Parameters

    Signature

    class dot : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html b/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html index da9b0a3..ac31a6b 100644 --- a/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html +++ b/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/class-html/index.html @@ -1,9 +1,9 @@ -html (ocaml.Odoc_gen.Html_functor._.html)

    Class _.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_gen.Html_functor._.html)

    Class _.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    val mutable known_classes_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable style : string
    val mutable style_file : string
    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method character_encoding : Buffer.t -> unit
    method constructor : string -> string
    method generate_class_types_index : Odoc_info.Module.t_module list -> unit
    method generate_classes_index : Odoc_info.Module.t_module list -> unit
    method generate_elements : ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : ?strip_libname:bool -> + unit
    method generate_elements_index : ?strip_libname:bool -> 'a list -> ('a -> Odoc_info.Name.t) -> ('a -> Odoc_info.info option) -> @@ -40,35 +40,35 @@ Odoc_info.Name.t -> Odoc_info.ref_kind option -> Odoc_info.text option -> - unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> + unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> int -> string option -> Odoc_info.text -> unit
    method html_of_Verbatim : Buffer.t -> string -> unit
    method html_of_alerts : Buffer.t -> Odoc_info.alert list -> unit
    method html_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method html_of_author_list : Buffer.t -> string list -> unit
    method html_of_before : Buffer.t -> (string * Odoc_info.text) list -> unit
    method html_of_class : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class -> unit
    method html_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_class_element : Buffer.t -> Odoc_info.Class.class_element -> unit
    method html_of_class_kind : Buffer.t -> Odoc_info.Name.t -> - ?cl:Odoc_info.Class.t_class -> + ?cl:Odoc_info.Class.t_class -> Odoc_info.Class.class_kind -> unit
    method html_of_class_parameter_list : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Class.t_class -> unit
    method html_of_class_type : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class_type -> unit
    method html_of_class_type_param_expr_list : Buffer.t -> Odoc_info.Name.t -> Types.type_expr list -> - unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> + unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> Odoc_info.Name.t -> @@ -81,26 +81,26 @@ Odoc_parameter.parameter list -> unit
    method html_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method html_of_included_module : Buffer.t -> Odoc_info.Module.included_module -> - unit
    method html_of_info : ?cls:string -> - ?indent:bool -> + unit
    method html_of_info : ?cls:string -> + ?indent:bool -> Buffer.t -> Odoc_types.info option -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info option -> unit
    method html_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method html_of_modtype : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module_type -> unit
    method html_of_module : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module -> unit
    method html_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_module_element : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.module_element -> unit
    method html_of_module_kind : Buffer.t -> Odoc_info.Name.t -> - ?modu:Odoc_info.Module.t_module -> + ?modu:Odoc_info.Module.t_module -> Odoc_info.Module.module_kind -> unit
    method html_of_module_parameter : Buffer.t -> Odoc_info.Name.t -> @@ -112,13 +112,13 @@ Odoc_info.Name.t -> Odoc_info.Module.module_parameter -> unit
    method html_of_module_type : Buffer.t -> - ?code:string -> + ?code:string -> Odoc_info.Name.t -> Types.module_type -> unit
    method html_of_parameter_description : Buffer.t -> Odoc_info.Parameter.parameter -> @@ -127,14 +127,14 @@ Odoc_parameter.parameter list -> unit
    method html_of_raised_exceptions : Buffer.t -> (string * Odoc_info.text) list -> - unit
    method html_of_record : father:Odoc_info.Name.t -> - close_env:string -> + unit
    method html_of_record : father:Odoc_info.Name.t -> + close_env:string -> (Odoc_info.Type.record_field -> string) -> Buffer.t -> Odoc_info.Type.record_field list -> unit
    method html_of_return_opt : Buffer.t -> Odoc_info.text option -> unit
    method html_of_see : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) -> unit
    method html_of_sees : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) list -> - unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> + unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.type_expr -> unit
    method html_of_type_expr_param_list : Buffer.t -> @@ -146,7 +146,7 @@ unit
    method html_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method html_of_version_opt : Buffer.t -> string option -> unit
    method index : string
    method index_attributes : string
    method index_class_types : string
    method index_classes : string
    method index_exceptions : string
    method index_extensions : string
    method index_methods : string
    method index_module_types : string
    method index_modules : string
    method index_prefix : string
    method index_types : string
    method index_values : string
    method init_style : unit
    method inner_title : Odoc_info.Name.t -> string
    method keep_alpha_num : string -> string
    method keyword : string -> string
    method label_of_text : Odoc_info.text -> string
    method list_attributes : Odoc_info.Value.t_attribute list
    method list_class_types : Odoc_info.Class.t_class_type list
    method list_classes : Odoc_info.Class.t_class list
    method list_exceptions : Odoc_info.Exception.t_exception list
    method list_extensions : Odoc_info.Extension.t_extension_constructor list
    method list_methods : Odoc_info.Value.t_method list
    method list_module_types : Odoc_info.Module.t_module_type list
    method list_modules : Odoc_info.Module.t_module list
    method list_types : Odoc_info.Type.t_type list
    method list_values : Odoc_info.Value.t_value list
    method meta : Buffer.t -> unit
    method output_class_type : Odoc_info.Name.t -> string -> Types.class_type -> - unit
    method private output_code : ?with_pre:bool -> + unit
    method private output_code : ?with_pre:bool -> Odoc_info.Name.t -> string -> string -> @@ -154,13 +154,13 @@ string -> Types.module_type -> unit
    method prepare_header : Odoc_info.Module.t_module list -> unit
    method print_header : Buffer.t -> - ?nav: + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    method print_navbar : Buffer.t -> Odoc_info.Name.t option -> Odoc_info.Name.t option -> Odoc_info.Name.t -> - unit
    method title : string
    \ No newline at end of file + unit
    method title : string
    diff --git a/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html index b434b56..fcc053d 100644 --- a/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Html_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Html_functor._)

    Parameter Html_functor._

    class html : object ... end
    \ No newline at end of file +_ (ocaml.Odoc_gen.Html_functor._)

    Parameter Html_functor._

    class html : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html b/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html index aa423bc..d1415d9 100644 --- a/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html +++ b/ocaml/Odoc_gen/module-type-Html_functor/class-html/index.html @@ -1,9 +1,9 @@ -html (ocaml.Odoc_gen.Html_functor.html)

    Class Html_functor.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_gen.Html_functor.html)

    Class Html_functor.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    val mutable known_classes_names : Odoc_html.String.Set.t
    val mutable known_modules_names : Odoc_html.String.Set.t
    val mutable known_types_names : Odoc_html.String.Set.t
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable style : string
    val mutable style_file : string
    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method character_encoding : Buffer.t -> unit
    method constructor : string -> string
    method generate_class_types_index : Odoc_info.Module.t_module list -> unit
    method generate_classes_index : Odoc_info.Module.t_module list -> unit
    method generate_elements : ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : ?strip_libname:bool -> + unit
    method generate_elements_index : ?strip_libname:bool -> 'a list -> ('a -> Odoc_info.Name.t) -> ('a -> Odoc_info.info option) -> @@ -40,35 +40,35 @@ Odoc_info.Name.t -> Odoc_info.ref_kind option -> Odoc_info.text option -> - unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> + unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> int -> string option -> Odoc_info.text -> unit
    method html_of_Verbatim : Buffer.t -> string -> unit
    method html_of_alerts : Buffer.t -> Odoc_info.alert list -> unit
    method html_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method html_of_author_list : Buffer.t -> string list -> unit
    method html_of_before : Buffer.t -> (string * Odoc_info.text) list -> unit
    method html_of_class : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class -> unit
    method html_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_class_element : Buffer.t -> Odoc_info.Class.class_element -> unit
    method html_of_class_kind : Buffer.t -> Odoc_info.Name.t -> - ?cl:Odoc_info.Class.t_class -> + ?cl:Odoc_info.Class.t_class -> Odoc_info.Class.class_kind -> unit
    method html_of_class_parameter_list : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Class.t_class -> unit
    method html_of_class_type : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class_type -> unit
    method html_of_class_type_param_expr_list : Buffer.t -> Odoc_info.Name.t -> Types.type_expr list -> - unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> + unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> Odoc_info.Name.t -> @@ -81,26 +81,26 @@ Odoc_parameter.parameter list -> unit
    method html_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method html_of_included_module : Buffer.t -> Odoc_info.Module.included_module -> - unit
    method html_of_info : ?cls:string -> - ?indent:bool -> + unit
    method html_of_info : ?cls:string -> + ?indent:bool -> Buffer.t -> Odoc_types.info option -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info option -> unit
    method html_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method html_of_modtype : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module_type -> unit
    method html_of_module : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module -> unit
    method html_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_module_element : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.module_element -> unit
    method html_of_module_kind : Buffer.t -> Odoc_info.Name.t -> - ?modu:Odoc_info.Module.t_module -> + ?modu:Odoc_info.Module.t_module -> Odoc_info.Module.module_kind -> unit
    method html_of_module_parameter : Buffer.t -> Odoc_info.Name.t -> @@ -112,13 +112,13 @@ Odoc_info.Name.t -> Odoc_info.Module.module_parameter -> unit
    method html_of_module_type : Buffer.t -> - ?code:string -> + ?code:string -> Odoc_info.Name.t -> Types.module_type -> unit
    method html_of_parameter_description : Buffer.t -> Odoc_info.Parameter.parameter -> @@ -127,14 +127,14 @@ Odoc_parameter.parameter list -> unit
    method html_of_raised_exceptions : Buffer.t -> (string * Odoc_info.text) list -> - unit
    method html_of_record : father:Odoc_info.Name.t -> - close_env:string -> + unit
    method html_of_record : father:Odoc_info.Name.t -> + close_env:string -> (Odoc_info.Type.record_field -> string) -> Buffer.t -> Odoc_info.Type.record_field list -> unit
    method html_of_return_opt : Buffer.t -> Odoc_info.text option -> unit
    method html_of_see : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) -> unit
    method html_of_sees : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) list -> - unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> + unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.type_expr -> unit
    method html_of_type_expr_param_list : Buffer.t -> @@ -146,7 +146,7 @@ unit
    method html_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method html_of_version_opt : Buffer.t -> string option -> unit
    method index : string
    method index_attributes : string
    method index_class_types : string
    method index_classes : string
    method index_exceptions : string
    method index_extensions : string
    method index_methods : string
    method index_module_types : string
    method index_modules : string
    method index_prefix : string
    method index_types : string
    method index_values : string
    method init_style : unit
    method inner_title : Odoc_info.Name.t -> string
    method keep_alpha_num : string -> string
    method keyword : string -> string
    method label_of_text : Odoc_info.text -> string
    method list_attributes : Odoc_info.Value.t_attribute list
    method list_class_types : Odoc_info.Class.t_class_type list
    method list_classes : Odoc_info.Class.t_class list
    method list_exceptions : Odoc_info.Exception.t_exception list
    method list_extensions : Odoc_info.Extension.t_extension_constructor list
    method list_methods : Odoc_info.Value.t_method list
    method list_module_types : Odoc_info.Module.t_module_type list
    method list_modules : Odoc_info.Module.t_module list
    method list_types : Odoc_info.Type.t_type list
    method list_values : Odoc_info.Value.t_value list
    method meta : Buffer.t -> unit
    method output_class_type : Odoc_info.Name.t -> string -> Types.class_type -> - unit
    method private output_code : ?with_pre:bool -> + unit
    method private output_code : ?with_pre:bool -> Odoc_info.Name.t -> string -> string -> @@ -154,13 +154,13 @@ string -> Types.module_type -> unit
    method prepare_header : Odoc_info.Module.t_module list -> unit
    method print_header : Buffer.t -> - ?nav: + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    method print_navbar : Buffer.t -> Odoc_info.Name.t option -> Odoc_info.Name.t option -> Odoc_info.Name.t -> - unit
    method title : string
    \ No newline at end of file + unit
    method title : string
    diff --git a/ocaml/Odoc_gen/module-type-Html_functor/index.html b/ocaml/Odoc_gen/module-type-Html_functor/index.html index 596ea7d..293ef4b 100644 --- a/ocaml/Odoc_gen/module-type-Html_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Html_functor/index.html @@ -1,2 +1,2 @@ -Html_functor (ocaml.Odoc_gen.Html_functor)

    Module type Odoc_gen.Html_functor

    Parameters

    Signature

    class html : object ... end
    \ No newline at end of file +Html_functor (ocaml.Odoc_gen.Html_functor)

    Module type Odoc_gen.Html_functor

    Parameters

    Signature

    class html : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html b/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html index 75550b2..99d9919 100644 --- a/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html +++ b/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/class-latex/index.html @@ -1,7 +1,7 @@ -latex (ocaml.Odoc_gen.Latex_functor._.latex)

    Class _.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> +latex (ocaml.Odoc_gen.Latex_functor._.latex)

    Class _.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> Odoc_info.info option -> - Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> + Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> Odoc_info.text * Odoc_info.text
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_class_inheritance_info : Format.formatter -> Odoc_info.Class.t_class -> unit
    method generate_class_type_inheritance_info : Format.formatter -> @@ -10,7 +10,7 @@ Odoc_info.Module.t_module -> unit
    method generate_inheritance_info : Format.formatter -> Odoc_info.Class.inherited_class list -> - unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> + unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> Odoc_info.Class.t_class -> unit
    method latex_for_class_label : Format.formatter -> Odoc_info.Class.t_class -> @@ -33,8 +33,8 @@ Odoc_info.ref_kind option -> Odoc_info.text option -> unit
    method latex_of_Right : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Subscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Superscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Target : Format.formatter -> - target:string -> - code:string -> + target:string -> + code:string -> unit
    method latex_of_Title : Format.formatter -> int -> Odoc_info.Name.t option -> @@ -66,7 +66,7 @@ unit
    method latex_of_included_module : Format.formatter -> Odoc_info.Module.included_module -> unit
    method latex_of_info : Format.formatter -> - ?block:bool -> + ?block:bool -> Odoc_info.info option -> unit
    method latex_of_method : Format.formatter -> Odoc_info.Value.t_method -> unit
    method latex_of_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method latex_of_module_element : Format.formatter -> Odoc_info.Name.t -> @@ -93,21 +93,21 @@ unit
    method latex_of_type_params : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Type.t_type -> - unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> - string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> + string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> Odoc_info.text_element list
    method text_of_author_list : string list -> Odoc_info.text_element list
    method text_of_before : (string * Odoc_info.text) list -> Odoc_info.text_element list
    method text_of_class_kind : Odoc_info.Name.t -> Odoc_info.Class.class_kind -> @@ -118,12 +118,12 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -137,4 +137,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    diff --git a/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html index 883579f..5edf54d 100644 --- a/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Latex_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Latex_functor._)

    Parameter Latex_functor._

    class latex : object ... end
    \ No newline at end of file +_ (ocaml.Odoc_gen.Latex_functor._)

    Parameter Latex_functor._

    class latex : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html b/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html index 7ed5e59..aa57e1b 100644 --- a/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html +++ b/ocaml/Odoc_gen/module-type-Latex_functor/class-latex/index.html @@ -1,7 +1,7 @@ -latex (ocaml.Odoc_gen.Latex_functor.latex)

    Class Latex_functor.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> +latex (ocaml.Odoc_gen.Latex_functor.latex)

    Class Latex_functor.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> Odoc_info.info option -> - Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> + Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> Odoc_info.text * Odoc_info.text
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_class_inheritance_info : Format.formatter -> Odoc_info.Class.t_class -> unit
    method generate_class_type_inheritance_info : Format.formatter -> @@ -10,7 +10,7 @@ Odoc_info.Module.t_module -> unit
    method generate_inheritance_info : Format.formatter -> Odoc_info.Class.inherited_class list -> - unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> + unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> Odoc_info.Class.t_class -> unit
    method latex_for_class_label : Format.formatter -> Odoc_info.Class.t_class -> @@ -33,8 +33,8 @@ Odoc_info.ref_kind option -> Odoc_info.text option -> unit
    method latex_of_Right : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Subscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Superscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Target : Format.formatter -> - target:string -> - code:string -> + target:string -> + code:string -> unit
    method latex_of_Title : Format.formatter -> int -> Odoc_info.Name.t option -> @@ -66,7 +66,7 @@ unit
    method latex_of_included_module : Format.formatter -> Odoc_info.Module.included_module -> unit
    method latex_of_info : Format.formatter -> - ?block:bool -> + ?block:bool -> Odoc_info.info option -> unit
    method latex_of_method : Format.formatter -> Odoc_info.Value.t_method -> unit
    method latex_of_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method latex_of_module_element : Format.formatter -> Odoc_info.Name.t -> @@ -93,21 +93,21 @@ unit
    method latex_of_type_params : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Type.t_type -> - unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> - string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> + string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> Odoc_info.text_element list
    method text_of_author_list : string list -> Odoc_info.text_element list
    method text_of_before : (string * Odoc_info.text) list -> Odoc_info.text_element list
    method text_of_class_kind : Odoc_info.Name.t -> Odoc_info.Class.class_kind -> @@ -118,12 +118,12 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -137,4 +137,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    diff --git a/ocaml/Odoc_gen/module-type-Latex_functor/index.html b/ocaml/Odoc_gen/module-type-Latex_functor/index.html index 869a8db..e72eb26 100644 --- a/ocaml/Odoc_gen/module-type-Latex_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Latex_functor/index.html @@ -1,2 +1,2 @@ -Latex_functor (ocaml.Odoc_gen.Latex_functor)

    Module type Odoc_gen.Latex_functor

    Parameters

    Signature

    class latex : object ... end
    \ No newline at end of file +Latex_functor (ocaml.Odoc_gen.Latex_functor)

    Module type Odoc_gen.Latex_functor

    Parameters

    Signature

    class latex : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html b/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html index ad8af95..a5e76ce 100644 --- a/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html +++ b/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/class-man/index.html @@ -1,13 +1,13 @@ -man (ocaml.Odoc_gen.Man_functor._.man)

    Class _.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> +man (ocaml.Odoc_gen.Man_functor._.man)

    Class _.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> Odoc_info.Module.t_module list -> - Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> + Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.class_type -> unit
    method man_of_code : Buffer.t -> string -> unit
    method man_of_const : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Type.variant_constructor -> - unit
    method man_of_cstr_args : ?par:bool -> + unit
    method man_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> string -> @@ -15,7 +15,7 @@ unit
    method man_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method man_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method man_of_included_module : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.included_module -> - unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> + unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> Odoc_info.Name.t -> (Odoc_info.Module.module_parameter * Odoc_info.text option) list -> unit
    method man_of_module_type : Buffer.t -> @@ -43,4 +43,4 @@ unit
    method man_of_type_extension : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Extension.t_type_extension -> - unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    \ No newline at end of file + unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    diff --git a/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html index fb749aa..597c12b 100644 --- a/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Man_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Man_functor._)

    Parameter Man_functor._

    class man : object ... end
    \ No newline at end of file +_ (ocaml.Odoc_gen.Man_functor._)

    Parameter Man_functor._

    class man : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html b/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html index c350470..6a594cf 100644 --- a/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html +++ b/ocaml/Odoc_gen/module-type-Man_functor/class-man/index.html @@ -1,13 +1,13 @@ -man (ocaml.Odoc_gen.Man_functor.man)

    Class Man_functor.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> +man (ocaml.Odoc_gen.Man_functor.man)

    Class Man_functor.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> Odoc_info.Module.t_module list -> - Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> + Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.class_type -> unit
    method man_of_code : Buffer.t -> string -> unit
    method man_of_const : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Type.variant_constructor -> - unit
    method man_of_cstr_args : ?par:bool -> + unit
    method man_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> string -> @@ -15,7 +15,7 @@ unit
    method man_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method man_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method man_of_included_module : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.included_module -> - unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> + unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> Odoc_info.Name.t -> (Odoc_info.Module.module_parameter * Odoc_info.text option) list -> unit
    method man_of_module_type : Buffer.t -> @@ -43,4 +43,4 @@ unit
    method man_of_type_extension : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Extension.t_type_extension -> - unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    \ No newline at end of file + unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    diff --git a/ocaml/Odoc_gen/module-type-Man_functor/index.html b/ocaml/Odoc_gen/module-type-Man_functor/index.html index 6dcdf15..ee82dc0 100644 --- a/ocaml/Odoc_gen/module-type-Man_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Man_functor/index.html @@ -1,2 +1,2 @@ -Man_functor (ocaml.Odoc_gen.Man_functor)

    Module type Odoc_gen.Man_functor

    Parameters

    Signature

    class man : object ... end
    \ No newline at end of file +Man_functor (ocaml.Odoc_gen.Man_functor)

    Module type Odoc_gen.Man_functor

    Parameters

    Signature

    class man : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html b/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html index c5c8636..83c0bb0 100644 --- a/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html +++ b/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/class-texi/index.html @@ -1,5 +1,5 @@ -texi (ocaml.Odoc_gen.Texi_functor._.texi)

    Class _.texi

    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_gen.Texi_functor._.texi)

    Class _.texi

    val mutable indices_to_build : [ `Class | `Class_att | `Class_type | `Exception @@ -32,17 +32,17 @@ unit
    method generate_texi_header : out_channel -> string -> Odoc_info.Module.t_module list -> - unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> @@ -52,8 +52,8 @@ Types.type_expr option -> string
    method string_of_type_parameters : Odoc_info.Type.t_type -> string
    method texi_of_Block : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Bold : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Center : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Code : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_CodePre : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Emphasize : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Enum : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Italic : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Left : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_List : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Newline : Odoc_info.Name.t
    method texi_of_Raw : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Ref : Odoc_info.Name.t -> Odoc_info.ref_kind option -> - Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> - code:Odoc_info.Name.t -> + Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> + code:Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Title : int -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Verbatim : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_attribute : Odoc_info.Value.t_attribute -> string
    method texi_of_class : Odoc_info.Class.t_class -> string
    method texi_of_class_element : Odoc_info.Name.t -> Odoc_info.Class.class_element -> string
    method texi_of_class_type : Odoc_info.Class.t_class_type -> string
    method texi_of_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_exception : Odoc_info.Exception.t_exception -> string
    method texi_of_included_module : Odoc_info.Module.included_module -> string
    method texi_of_info : Odoc_info.info option -> string
    method texi_of_method : Odoc_info.Value.t_method -> string
    method texi_of_module : Odoc_info.Module.t_module -> string
    method texi_of_module_element : Odoc_info.Name.t -> @@ -73,14 +73,14 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_desc : Odoc_info.text option -> Odoc_info.text_element list
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> - Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -94,4 +94,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html b/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html index 15b9b83..305a09b 100644 --- a/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html +++ b/ocaml/Odoc_gen/module-type-Texi_functor/argument-1-_/index.html @@ -1,2 +1,2 @@ -_ (ocaml.Odoc_gen.Texi_functor._)

    Parameter Texi_functor._

    class texi : object ... end
    \ No newline at end of file +_ (ocaml.Odoc_gen.Texi_functor._)

    Parameter Texi_functor._

    class texi : object ... end
    diff --git a/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html b/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html index 7115fbd..cfede2e 100644 --- a/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html +++ b/ocaml/Odoc_gen/module-type-Texi_functor/class-texi/index.html @@ -1,5 +1,5 @@ -texi (ocaml.Odoc_gen.Texi_functor.texi)

    Class Texi_functor.texi

    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_gen.Texi_functor.texi)

    Class Texi_functor.texi

    val mutable indices_to_build : [ `Class | `Class_att | `Class_type | `Exception @@ -32,17 +32,17 @@ unit
    method generate_texi_header : out_channel -> string -> Odoc_info.Module.t_module list -> - unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> @@ -52,8 +52,8 @@ Types.type_expr option -> string
    method string_of_type_parameters : Odoc_info.Type.t_type -> string
    method texi_of_Block : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Bold : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Center : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Code : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_CodePre : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Emphasize : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Enum : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Italic : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Left : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_List : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Newline : Odoc_info.Name.t
    method texi_of_Raw : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Ref : Odoc_info.Name.t -> Odoc_info.ref_kind option -> - Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> - code:Odoc_info.Name.t -> + Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> + code:Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Title : int -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Verbatim : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_attribute : Odoc_info.Value.t_attribute -> string
    method texi_of_class : Odoc_info.Class.t_class -> string
    method texi_of_class_element : Odoc_info.Name.t -> Odoc_info.Class.class_element -> string
    method texi_of_class_type : Odoc_info.Class.t_class_type -> string
    method texi_of_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_exception : Odoc_info.Exception.t_exception -> string
    method texi_of_included_module : Odoc_info.Module.included_module -> string
    method texi_of_info : Odoc_info.info option -> string
    method texi_of_method : Odoc_info.Value.t_method -> string
    method texi_of_module : Odoc_info.Module.t_module -> string
    method texi_of_module_element : Odoc_info.Name.t -> @@ -73,14 +73,14 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_desc : Odoc_info.text option -> Odoc_info.text_element list
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> - Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -94,4 +94,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/ocaml/Odoc_gen/module-type-Texi_functor/index.html b/ocaml/Odoc_gen/module-type-Texi_functor/index.html index 9fdc1ed..99a76c2 100644 --- a/ocaml/Odoc_gen/module-type-Texi_functor/index.html +++ b/ocaml/Odoc_gen/module-type-Texi_functor/index.html @@ -1,2 +1,2 @@ -Texi_functor (ocaml.Odoc_gen.Texi_functor)

    Module type Odoc_gen.Texi_functor

    Parameters

    Signature

    class texi : object ... end
    \ No newline at end of file +Texi_functor (ocaml.Odoc_gen.Texi_functor)

    Module type Odoc_gen.Texi_functor

    Parameters

    Signature

    class texi : object ... end
    diff --git a/ocaml/Odoc_global/index.html b/ocaml/Odoc_global/index.html index 63da83e..18ff1e8 100644 --- a/ocaml/Odoc_global/index.html +++ b/ocaml/Odoc_global/index.html @@ -1,2 +1,2 @@ -Odoc_global (ocaml.Odoc_global)

    Module Odoc_global

    type source_file =
    1. | Impl_file of string
    2. | Intf_file of string
    3. | Text_file of string
    val include_dirs : string list ref
    val merge_options : Odoc_types.merge_option list ref
    val classic : bool ref
    val dump : string option ref
    val load : string list ref
    val sort_modules : bool ref
    val no_stop : bool ref
    val no_custom_tags : bool ref
    val remove_stars : bool ref
    val keep_code : bool ref
    val inverse_merge_ml_mli : bool ref
    val filter_with_module_constraints : bool ref
    val hidden_modules : string list ref
    val files : source_file list ref
    val errors : int ref
    val warn_error : bool ref
    val show_missed_crossref : bool ref
    val pwarning : string -> unit
    val out_file : string ref
    val verbose : bool ref
    val intro_file : string option ref
    val title : string option ref
    val target_dir : string ref
    val with_toc : bool ref
    val with_index : bool ref
    val with_header : bool ref
    val with_trailer : bool ref
    val initially_opened_module : string ref
    val library_namespace : string ref
    \ No newline at end of file +Odoc_global (ocaml.Odoc_global)

    Module Odoc_global

    type source_file =
    1. | Impl_file of string
    2. | Intf_file of string
    3. | Text_file of string
    val include_dirs : string list ref
    val merge_options : Odoc_types.merge_option list ref
    val classic : bool ref
    val dump : string option ref
    val load : string list ref
    val sort_modules : bool ref
    val no_stop : bool ref
    val no_custom_tags : bool ref
    val remove_stars : bool ref
    val keep_code : bool ref
    val inverse_merge_ml_mli : bool ref
    val filter_with_module_constraints : bool ref
    val hidden_modules : string list ref
    val files : source_file list ref
    val errors : int ref
    val warn_error : bool ref
    val show_missed_crossref : bool ref
    val pwarning : string -> unit
    val out_file : string ref
    val verbose : bool ref
    val intro_file : string option ref
    val title : string option ref
    val target_dir : string ref
    val with_toc : bool ref
    val with_index : bool ref
    val with_header : bool ref
    val with_trailer : bool ref
    val initially_opened_module : string ref
    val library_namespace : string ref
    diff --git a/ocaml/Odoc_html/Generator/class-html/index.html b/ocaml/Odoc_html/Generator/class-html/index.html index 0bbd9ae..dbb2ff7 100644 --- a/ocaml/Odoc_html/Generator/class-html/index.html +++ b/ocaml/Odoc_html/Generator/class-html/index.html @@ -1,9 +1,9 @@ -html (ocaml.Odoc_html.Generator.html)

    Class Generator.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_html.Generator.html)

    Class Generator.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    val mutable known_classes_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_types_names : String.Set.t
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable style : string
    val mutable style_file : string
    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method character_encoding : Buffer.t -> unit
    method constructor : string -> string
    method generate_class_types_index : Odoc_info.Module.t_module list -> unit
    method generate_classes_index : Odoc_info.Module.t_module list -> unit
    method generate_elements : ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : ?strip_libname:bool -> + unit
    method generate_elements_index : ?strip_libname:bool -> 'a list -> ('a -> Odoc_info.Name.t) -> ('a -> Odoc_info.info option) -> @@ -40,35 +40,35 @@ Odoc_info.Name.t -> Odoc_info.ref_kind option -> Odoc_info.text option -> - unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> + unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> int -> string option -> Odoc_info.text -> unit
    method html_of_Verbatim : Buffer.t -> string -> unit
    method html_of_alerts : Buffer.t -> Odoc_info.alert list -> unit
    method html_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method html_of_author_list : Buffer.t -> string list -> unit
    method html_of_before : Buffer.t -> (string * Odoc_info.text) list -> unit
    method html_of_class : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class -> unit
    method html_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_class_element : Buffer.t -> Odoc_info.Class.class_element -> unit
    method html_of_class_kind : Buffer.t -> Odoc_info.Name.t -> - ?cl:Odoc_info.Class.t_class -> + ?cl:Odoc_info.Class.t_class -> Odoc_info.Class.class_kind -> unit
    method html_of_class_parameter_list : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Class.t_class -> unit
    method html_of_class_type : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class_type -> unit
    method html_of_class_type_param_expr_list : Buffer.t -> Odoc_info.Name.t -> Types.type_expr list -> - unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> + unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> Odoc_info.Name.t -> @@ -81,26 +81,26 @@ Odoc_parameter.parameter list -> unit
    method html_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method html_of_included_module : Buffer.t -> Odoc_info.Module.included_module -> - unit
    method html_of_info : ?cls:string -> - ?indent:bool -> + unit
    method html_of_info : ?cls:string -> + ?indent:bool -> Buffer.t -> Odoc_types.info option -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info option -> unit
    method html_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method html_of_modtype : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module_type -> unit
    method html_of_module : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module -> unit
    method html_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_module_element : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.module_element -> unit
    method html_of_module_kind : Buffer.t -> Odoc_info.Name.t -> - ?modu:Odoc_info.Module.t_module -> + ?modu:Odoc_info.Module.t_module -> Odoc_info.Module.module_kind -> unit
    method html_of_module_parameter : Buffer.t -> Odoc_info.Name.t -> @@ -112,13 +112,13 @@ Odoc_info.Name.t -> Odoc_info.Module.module_parameter -> unit
    method html_of_module_type : Buffer.t -> - ?code:string -> + ?code:string -> Odoc_info.Name.t -> Types.module_type -> unit
    method html_of_parameter_description : Buffer.t -> Odoc_info.Parameter.parameter -> @@ -127,14 +127,14 @@ Odoc_parameter.parameter list -> unit
    method html_of_raised_exceptions : Buffer.t -> (string * Odoc_info.text) list -> - unit
    method html_of_record : father:Odoc_info.Name.t -> - close_env:string -> + unit
    method html_of_record : father:Odoc_info.Name.t -> + close_env:string -> (Odoc_info.Type.record_field -> string) -> Buffer.t -> Odoc_info.Type.record_field list -> unit
    method html_of_return_opt : Buffer.t -> Odoc_info.text option -> unit
    method html_of_see : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) -> unit
    method html_of_sees : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) list -> - unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> + unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.type_expr -> unit
    method html_of_type_expr_param_list : Buffer.t -> @@ -146,7 +146,7 @@ unit
    method html_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method html_of_version_opt : Buffer.t -> string option -> unit
    method index : string
    method index_attributes : string
    method index_class_types : string
    method index_classes : string
    method index_exceptions : string
    method index_extensions : string
    method index_methods : string
    method index_module_types : string
    method index_modules : string
    method index_prefix : string
    method index_types : string
    method index_values : string
    method init_style : unit
    method inner_title : Odoc_info.Name.t -> string
    method keep_alpha_num : string -> string
    method keyword : string -> string
    method label_of_text : Odoc_info.text -> string
    method list_attributes : Odoc_info.Value.t_attribute list
    method list_class_types : Odoc_info.Class.t_class_type list
    method list_classes : Odoc_info.Class.t_class list
    method list_exceptions : Odoc_info.Exception.t_exception list
    method list_extensions : Odoc_info.Extension.t_extension_constructor list
    method list_methods : Odoc_info.Value.t_method list
    method list_module_types : Odoc_info.Module.t_module_type list
    method list_modules : Odoc_info.Module.t_module list
    method list_types : Odoc_info.Type.t_type list
    method list_values : Odoc_info.Value.t_value list
    method meta : Buffer.t -> unit
    method output_class_type : Odoc_info.Name.t -> string -> Types.class_type -> - unit
    method private output_code : ?with_pre:bool -> + unit
    method private output_code : ?with_pre:bool -> Odoc_info.Name.t -> string -> string -> @@ -154,13 +154,13 @@ string -> Types.module_type -> unit
    method prepare_header : Odoc_info.Module.t_module list -> unit
    method print_header : Buffer.t -> - ?nav: + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    method print_navbar : Buffer.t -> Odoc_info.Name.t option -> Odoc_info.Name.t option -> Odoc_info.Name.t -> - unit
    method title : string
    \ No newline at end of file + unit
    method title : string
    diff --git a/ocaml/Odoc_html/Generator/index.html b/ocaml/Odoc_html/Generator/index.html index 82cb560..6fa1999 100644 --- a/ocaml/Odoc_html/Generator/index.html +++ b/ocaml/Odoc_html/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_html.Generator)

    Module Odoc_html.Generator

    class html : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_html.Generator)

    Module Odoc_html.Generator

    class html : object ... end
    diff --git a/ocaml/Odoc_html/Naming/index.html b/ocaml/Odoc_html/Naming/index.html index 80bdb56..2e6a4ce 100644 --- a/ocaml/Odoc_html/Naming/index.html +++ b/ocaml/Odoc_html/Naming/index.html @@ -1,5 +1,5 @@ -Naming (ocaml.Odoc_html.Naming)

    Module Odoc_html.Naming

    val mark_module : string
    val mark_module_type : string
    val mark_type : string
    val mark_type_elt : string
    val mark_function : string
    val mark_extension : string
    val mark_exception : string
    val mark_value : string
    val mark_attribute : string
    val mark_method : string
    val code_prefix : string
    val type_prefix : string
    val html_files : string -> string * string
    val target : string -> string -> string
    val complete_target : string -> Odoc_info.Name.t -> string
    val module_target : Odoc_info.Module.t_module -> string
    val module_type_target : Odoc_info.Module.t_module_type -> string
    val type_target : Odoc_info.Type.t_type -> string
    val const_target : +Naming (ocaml.Odoc_html.Naming)

    Module Odoc_html.Naming

    val mark_module : string
    val mark_module_type : string
    val mark_type : string
    val mark_type_elt : string
    val mark_function : string
    val mark_extension : string
    val mark_exception : string
    val mark_value : string
    val mark_attribute : string
    val mark_method : string
    val code_prefix : string
    val type_prefix : string
    val html_files : string -> string * string
    val target : string -> string -> string
    val complete_target : string -> Odoc_info.Name.t -> string
    val module_target : Odoc_info.Module.t_module -> string
    val module_type_target : Odoc_info.Module.t_module_type -> string
    val type_target : Odoc_info.Type.t_type -> string
    val recfield_target : @@ -14,4 +14,4 @@ Odoc_info.Type.object_field -> string
    val complete_type_target : Odoc_info.Type.t_type -> string
    val complete_recfield_target : Odoc_info.Name.t -> string
    val complete_const_target : Odoc_info.Name.t -> string
    val extension_target : Odoc_info.Extension.t_extension_constructor -> string
    val complete_extension_target : Odoc_info.Extension.t_extension_constructor -> - string
    val exception_target : Odoc_info.Exception.t_exception -> string
    val complete_exception_target : Odoc_info.Exception.t_exception -> string
    val value_target : Odoc_info.Value.t_value -> string
    val subst_infix_symbols : string -> string
    val complete_value_target : Odoc_info.Value.t_value -> string
    val file_code_value_complete_target : Odoc_info.Value.t_value -> string
    val attribute_target : Odoc_info.Value.t_attribute -> string
    val complete_attribute_target : Odoc_info.Value.t_attribute -> string
    val file_code_attribute_complete_target : Odoc_info.Value.t_attribute -> string
    val method_target : Odoc_info.Value.t_method -> string
    val complete_method_target : Odoc_info.Value.t_method -> string
    val file_code_method_complete_target : Odoc_info.Value.t_method -> string
    val label_target : string -> string
    val complete_label_target : Odoc_info.Name.t -> string
    val file_type_module_complete_target : string -> string
    val file_code_module_complete_target : string -> string
    val file_type_class_complete_target : string -> string
    \ No newline at end of file + string
    val exception_target : Odoc_info.Exception.t_exception -> string
    val complete_exception_target : Odoc_info.Exception.t_exception -> string
    val value_target : Odoc_info.Value.t_value -> string
    val subst_infix_symbols : string -> string
    val complete_value_target : Odoc_info.Value.t_value -> string
    val file_code_value_complete_target : Odoc_info.Value.t_value -> string
    val attribute_target : Odoc_info.Value.t_attribute -> string
    val complete_attribute_target : Odoc_info.Value.t_attribute -> string
    val file_code_attribute_complete_target : Odoc_info.Value.t_attribute -> string
    val method_target : Odoc_info.Value.t_method -> string
    val complete_method_target : Odoc_info.Value.t_method -> string
    val file_code_method_complete_target : Odoc_info.Value.t_method -> string
    val label_target : string -> string
    val complete_label_target : Odoc_info.Name.t -> string
    val file_type_module_complete_target : string -> string
    val file_code_module_complete_target : string -> string
    val file_type_class_complete_target : string -> string
    diff --git a/ocaml/Odoc_html/index.html b/ocaml/Odoc_html/index.html index 1f7a0b5..8bd8212 100644 --- a/ocaml/Odoc_html/index.html +++ b/ocaml/Odoc_html/index.html @@ -1,2 +1,2 @@ -Odoc_html (ocaml.Odoc_html)

    Module Odoc_html

    Generation of html documentation.

    module String = Misc.Stdlib.String
    val with_parameter_list : bool ref
    val css_style : string option ref
    val index_only : bool ref
    val colorize_code : bool ref
    val html_short_functors : bool ref
    val charset : string ref
    val show_navbar : bool ref
    module Naming : sig ... end
    module Generator : sig ... end
    module type Html_generator = sig ... end
    \ No newline at end of file +Odoc_html (ocaml.Odoc_html)

    Module Odoc_html

    Generation of html documentation.

    module String = Misc.Stdlib.String
    val with_parameter_list : bool ref
    val css_style : string option ref
    val index_only : bool ref
    val colorize_code : bool ref
    val html_short_functors : bool ref
    val charset : string ref
    val show_navbar : bool ref
    module Naming : sig ... end
    module Generator : sig ... end
    module type Html_generator = sig ... end
    diff --git a/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html b/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html index 0152191..78c966f 100644 --- a/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html +++ b/ocaml/Odoc_html/module-type-Html_generator/class-html/index.html @@ -1,9 +1,9 @@ -html (ocaml.Odoc_html.Html_generator.html)

    Class Html_generator.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> - ?nav: +html (ocaml.Odoc_html.Html_generator.html)

    Class Html_generator.html

    val mutable default_style_options : string list
    val mutable doctype : string
    val mutable header : Buffer.t -> + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    val mutable known_classes_names : String.Set.t
    val mutable known_modules_names : String.Set.t
    val mutable known_types_names : String.Set.t
    val mutable list_attributes : Odoc_info.Value.t_attribute list
    val mutable list_class_types : Odoc_info.Class.t_class_type list
    val mutable list_classes : Odoc_info.Class.t_class list
    val mutable list_exceptions : Odoc_info.Exception.t_exception list
    val mutable list_extensions : Odoc_info.Extension.t_extension_constructor list
    val mutable list_methods : Odoc_info.Value.t_method list
    val mutable list_module_types : Odoc_info.Module.t_module_type list
    val mutable list_modules : Odoc_info.Module.t_module list
    val mutable list_types : Odoc_info.Type.t_type list
    val mutable list_values : Odoc_info.Value.t_value list
    val mutable style : string
    val mutable style_file : string
    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method character_encoding : Buffer.t -> unit
    method constructor : string -> string
    method generate_class_types_index : Odoc_info.Module.t_module list -> unit
    method generate_classes_index : Odoc_info.Module.t_module list -> unit
    method generate_elements : ('a option -> 'a option -> 'a -> unit) -> 'a list -> - unit
    method generate_elements_index : ?strip_libname:bool -> + unit
    method generate_elements_index : ?strip_libname:bool -> 'a list -> ('a -> Odoc_info.Name.t) -> ('a -> Odoc_info.info option) -> @@ -40,35 +40,35 @@ Odoc_info.Name.t -> Odoc_info.ref_kind option -> Odoc_info.text option -> - unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> + unit
    method html_of_Right : Buffer.t -> Odoc_info.text -> unit
    method html_of_Subscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Superscript : Buffer.t -> Odoc_info.text -> unit
    method html_of_Target : Buffer.t -> target:string -> code:string -> unit
    method html_of_Title : Buffer.t -> int -> string option -> Odoc_info.text -> unit
    method html_of_Verbatim : Buffer.t -> string -> unit
    method html_of_alerts : Buffer.t -> Odoc_info.alert list -> unit
    method html_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method html_of_author_list : Buffer.t -> string list -> unit
    method html_of_before : Buffer.t -> (string * Odoc_info.text) list -> unit
    method html_of_class : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class -> unit
    method html_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_class_element : Buffer.t -> Odoc_info.Class.class_element -> unit
    method html_of_class_kind : Buffer.t -> Odoc_info.Name.t -> - ?cl:Odoc_info.Class.t_class -> + ?cl:Odoc_info.Class.t_class -> Odoc_info.Class.class_kind -> unit
    method html_of_class_parameter_list : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Class.t_class -> unit
    method html_of_class_type : Buffer.t -> - ?complete:bool -> - ?with_link:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Class.t_class_type -> unit
    method html_of_class_type_param_expr_list : Buffer.t -> Odoc_info.Name.t -> Types.type_expr list -> - unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> + unit
    method html_of_code : Buffer.t -> ?with_pre:bool -> string -> unit
    method html_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> Odoc_info.Name.t -> @@ -81,26 +81,26 @@ Odoc_parameter.parameter list -> unit
    method html_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method html_of_included_module : Buffer.t -> Odoc_info.Module.included_module -> - unit
    method html_of_info : ?cls:string -> - ?indent:bool -> + unit
    method html_of_info : ?cls:string -> + ?indent:bool -> Buffer.t -> Odoc_types.info option -> unit
    method html_of_info_first_sentence : Buffer.t -> Odoc_info.info option -> unit
    method html_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method html_of_modtype : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module_type -> unit
    method html_of_module : Buffer.t -> - ?info:bool -> - ?complete:bool -> - ?with_link:bool -> + ?info:bool -> + ?complete:bool -> + ?with_link:bool -> Odoc_info.Module.t_module -> unit
    method html_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method html_of_module_element : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.module_element -> unit
    method html_of_module_kind : Buffer.t -> Odoc_info.Name.t -> - ?modu:Odoc_info.Module.t_module -> + ?modu:Odoc_info.Module.t_module -> Odoc_info.Module.module_kind -> unit
    method html_of_module_parameter : Buffer.t -> Odoc_info.Name.t -> @@ -112,13 +112,13 @@ Odoc_info.Name.t -> Odoc_info.Module.module_parameter -> unit
    method html_of_module_type : Buffer.t -> - ?code:string -> + ?code:string -> Odoc_info.Name.t -> Types.module_type -> unit
    method html_of_parameter_description : Buffer.t -> Odoc_info.Parameter.parameter -> @@ -127,14 +127,14 @@ Odoc_parameter.parameter list -> unit
    method html_of_raised_exceptions : Buffer.t -> (string * Odoc_info.text) list -> - unit
    method html_of_record : father:Odoc_info.Name.t -> - close_env:string -> + unit
    method html_of_record : father:Odoc_info.Name.t -> + close_env:string -> (Odoc_info.Type.record_field -> string) -> Buffer.t -> Odoc_info.Type.record_field list -> unit
    method html_of_return_opt : Buffer.t -> Odoc_info.text option -> unit
    method html_of_see : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) -> unit
    method html_of_sees : Buffer.t -> (Odoc_info.see_ref * Odoc_info.text) list -> - unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> + unit
    method html_of_since_opt : Buffer.t -> string option -> unit
    method html_of_text : ?with_p:bool -> Buffer.t -> Odoc_info.text -> unit
    method html_of_text_element : Buffer.t -> Odoc_info.text_element -> unit
    method html_of_text_with_p : Buffer.t -> Odoc_info.text -> unit
    method html_of_type : Buffer.t -> Odoc_info.Type.t_type -> unit
    method html_of_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.type_expr -> unit
    method html_of_type_expr_param_list : Buffer.t -> @@ -146,7 +146,7 @@ unit
    method html_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method html_of_version_opt : Buffer.t -> string option -> unit
    method index : string
    method index_attributes : string
    method index_class_types : string
    method index_classes : string
    method index_exceptions : string
    method index_extensions : string
    method index_methods : string
    method index_module_types : string
    method index_modules : string
    method index_prefix : string
    method index_types : string
    method index_values : string
    method init_style : unit
    method inner_title : Odoc_info.Name.t -> string
    method keep_alpha_num : string -> string
    method keyword : string -> string
    method label_of_text : Odoc_info.text -> string
    method list_attributes : Odoc_info.Value.t_attribute list
    method list_class_types : Odoc_info.Class.t_class_type list
    method list_classes : Odoc_info.Class.t_class list
    method list_exceptions : Odoc_info.Exception.t_exception list
    method list_extensions : Odoc_info.Extension.t_extension_constructor list
    method list_methods : Odoc_info.Value.t_method list
    method list_module_types : Odoc_info.Module.t_module_type list
    method list_modules : Odoc_info.Module.t_module list
    method list_types : Odoc_info.Type.t_type list
    method list_values : Odoc_info.Value.t_value list
    method meta : Buffer.t -> unit
    method output_class_type : Odoc_info.Name.t -> string -> Types.class_type -> - unit
    method private output_code : ?with_pre:bool -> + unit
    method private output_code : ?with_pre:bool -> Odoc_info.Name.t -> string -> string -> @@ -154,13 +154,13 @@ string -> Types.module_type -> unit
    method prepare_header : Odoc_info.Module.t_module list -> unit
    method print_header : Buffer.t -> - ?nav: + ?nav: (Odoc_info.Name.t option * Odoc_info.Name.t option * Odoc_info.Name.t) option -> - ?comments:Odoc_info.text list -> + ?comments:Odoc_info.text list -> string -> unit
    method print_navbar : Buffer.t -> Odoc_info.Name.t option -> Odoc_info.Name.t option -> Odoc_info.Name.t -> - unit
    method title : string
    \ No newline at end of file + unit
    method title : string
    diff --git a/ocaml/Odoc_html/module-type-Html_generator/index.html b/ocaml/Odoc_html/module-type-Html_generator/index.html index 9a0d990..0c62350 100644 --- a/ocaml/Odoc_html/module-type-Html_generator/index.html +++ b/ocaml/Odoc_html/module-type-Html_generator/index.html @@ -1,2 +1,2 @@ -Html_generator (ocaml.Odoc_html.Html_generator)

    Module type Odoc_html.Html_generator

    class html : object ... end
    \ No newline at end of file +Html_generator (ocaml.Odoc_html.Html_generator)

    Module type Odoc_html.Html_generator

    class html : object ... end
    diff --git a/ocaml/Odoc_info/Class/index.html b/ocaml/Odoc_info/Class/index.html index b84118d..a462fd6 100644 --- a/ocaml/Odoc_info/Class/index.html +++ b/ocaml/Odoc_info/Class/index.html @@ -1,5 +1,5 @@ -Class (ocaml.Odoc_info.Class)

    Module Odoc_info.Class

    Representation and manipulation of classes and class types.

    Types

    type class_element = Odoc_class.class_element =
    1. | Class_attribute of Value.t_attribute
    2. | Class_method of Value.t_method
    3. | Class_comment of text

    To keep the order of elements in a class.

    type cct = Odoc_class.cct =
    1. | Cl of t_class
    2. | Cltype of t_class_type * Types.type_expr list
      (*

      Class type and type parameters.

      *)

    Used when we can reference a t_class or a t_class_type.

    and inherited_class = Odoc_class.inherited_class = {
    1. ic_name : Name.t;
      (*

      Complete name of the inherited class.

      *)
    2. mutable ic_class : cct option;
      (*

      The associated t_class or t_class_type.

      *)
    3. ic_text : text option;
      (*

      The inheritance description, if any.

      *)
    }
    and class_apply = Odoc_class.class_apply = {
    1. capp_name : Name.t;
      (*

      The complete name of the applied class.

      *)
    2. mutable capp_class : t_class option;
      (*

      The associated t_class if we found it.

      *)
    3. capp_params : Types.type_expr list;
      (*

      The type of expressions the class is applied to.

      *)
    4. capp_params_code : string list;
      (*

      The code of these expressions.

      *)
    }
    and class_constr = Odoc_class.class_constr = {
    1. cco_name : Name.t;
      (*

      The complete name of the applied class.

      *)
    2. mutable cco_class : cct option;
      (*

      The associated class or class type if we found it.

      *)
    3. cco_type_parameters : Types.type_expr list;
      (*

      The type parameters of the class, if needed.

      *)
    }
    and class_kind = Odoc_class.class_kind =
    1. | Class_structure of inherited_class list * class_element list
      (*

      An explicit class structure, used in implementation and interface.

      *)
    2. | Class_apply of class_apply
      (*

      Application/alias of a class, used in implementation only.

      *)
    3. | Class_constr of class_constr
      (*

      A class used to give the type of the defined class, instead of a structure, used in interface only. For example, it will be used with the name M1.M2....bar when the class foo is defined like this : class foo : int -> bar

      *)
    4. | Class_constraint of class_kind * class_type_kind
      (*

      A class definition with a constraint.

      *)
    and t_class = Odoc_class.t_class = {
    1. cl_name : Name.t;
      (*

      Complete name of the class.

      *)
    2. mutable cl_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. cl_type : Types.class_type;
      (*

      Type of the class.

      *)
    4. cl_type_parameters : Types.type_expr list;
      (*

      Type parameters.

      *)
    5. cl_virtual : bool;
      (*

      true when the class is virtual.

      *)
    6. mutable cl_kind : class_kind;
      (*

      The way the class is defined.

      *)
    7. mutable cl_parameters : Parameter.parameter list;
      (*

      The parameters of the class.

      *)
    8. mutable cl_loc : location;
    }

    Representation of a class.

    and class_type_alias = Odoc_class.class_type_alias = {
    1. cta_name : Name.t;
      (*

      Complete name of the target class type.

      *)
    2. mutable cta_class : cct option;
      (*

      The target t_class or t_class_type, if we found it.

      *)
    3. cta_type_parameters : Types.type_expr list;
      (*

      The type parameters. FIXME : use strings?

      *)
    }
    and class_type_kind = Odoc_class.class_type_kind =
    1. | Class_signature of inherited_class list * class_element list
    2. | Class_type of class_type_alias
      (*

      A class type eventually applied to type args.

      *)
    and t_class_type = Odoc_class.t_class_type = {
    1. clt_name : Name.t;
      (*

      Complete name of the type.

      *)
    2. mutable clt_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. clt_type : Types.class_type;
    4. clt_type_parameters : Types.type_expr list;
      (*

      Type parameters.

      *)
    5. clt_virtual : bool;
      (*

      true if the class type is virtual

      *)
    6. mutable clt_kind : class_type_kind;
      (*

      The way the class type is defined.

      *)
    7. mutable clt_loc : location;
    }

    Representation of a class type.

    Functions

    val class_elements : ?trans:bool -> t_class -> class_element list

    Access to the elements of a class.

    val class_attributes : ?trans:bool -> t_class -> Value.t_attribute list

    Access to the list of class attributes.

    val class_parameter_text_by_name : t_class -> string -> text option

    Access to the description associated to the given class parameter name.

    val class_methods : ?trans:bool -> t_class -> Value.t_method list

    Access to the methods of a class.

    val class_comments : ?trans:bool -> t_class -> text list

    Access to the comments of a class.

    val class_type_elements : ?trans:bool -> t_class_type -> class_element list

    Access to the elements of a class type.

    val class_type_attributes : - ?trans:bool -> +Class (ocaml.Odoc_info.Class)

    Module Odoc_info.Class

    Representation and manipulation of classes and class types.

    Types

    type class_element = Odoc_class.class_element =
    1. | Class_attribute of Value.t_attribute
    2. | Class_method of Value.t_method
    3. | Class_comment of text

    To keep the order of elements in a class.

    type cct = Odoc_class.cct =
    1. | Cl of t_class
    2. | Cltype of t_class_type * Types.type_expr list
      (*

      Class type and type parameters.

      *)

    Used when we can reference a t_class or a t_class_type.

    and inherited_class = Odoc_class.inherited_class = {
    1. ic_name : Name.t;
      (*

      Complete name of the inherited class.

      *)
    2. mutable ic_class : cct option;
      (*

      The associated t_class or t_class_type.

      *)
    3. ic_text : text option;
      (*

      The inheritance description, if any.

      *)
    }
    and class_apply = Odoc_class.class_apply = {
    1. capp_name : Name.t;
      (*

      The complete name of the applied class.

      *)
    2. mutable capp_class : t_class option;
      (*

      The associated t_class if we found it.

      *)
    3. capp_params : Types.type_expr list;
      (*

      The type of expressions the class is applied to.

      *)
    4. capp_params_code : string list;
      (*

      The code of these expressions.

      *)
    }
    and class_constr = Odoc_class.class_constr = {
    1. cco_name : Name.t;
      (*

      The complete name of the applied class.

      *)
    2. mutable cco_class : cct option;
      (*

      The associated class or class type if we found it.

      *)
    3. cco_type_parameters : Types.type_expr list;
      (*

      The type parameters of the class, if needed.

      *)
    }
    and class_kind = Odoc_class.class_kind =
    1. | Class_structure of inherited_class list * class_element list
      (*

      An explicit class structure, used in implementation and interface.

      *)
    2. | Class_apply of class_apply
      (*

      Application/alias of a class, used in implementation only.

      *)
    3. | Class_constr of class_constr
      (*

      A class used to give the type of the defined class, instead of a structure, used in interface only. For example, it will be used with the name M1.M2....bar when the class foo is defined like this : class foo : int -> bar

      *)
    4. | Class_constraint of class_kind * class_type_kind
      (*

      A class definition with a constraint.

      *)
    and t_class = Odoc_class.t_class = {
    1. cl_name : Name.t;
      (*

      Complete name of the class.

      *)
    2. mutable cl_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. cl_type : Types.class_type;
      (*

      Type of the class.

      *)
    4. cl_type_parameters : Types.type_expr list;
      (*

      Type parameters.

      *)
    5. cl_virtual : bool;
      (*

      true when the class is virtual.

      *)
    6. mutable cl_kind : class_kind;
      (*

      The way the class is defined.

      *)
    7. mutable cl_parameters : Parameter.parameter list;
      (*

      The parameters of the class.

      *)
    8. mutable cl_loc : location;
    }

    Representation of a class.

    and class_type_alias = Odoc_class.class_type_alias = {
    1. cta_name : Name.t;
      (*

      Complete name of the target class type.

      *)
    2. mutable cta_class : cct option;
      (*

      The target t_class or t_class_type, if we found it.

      *)
    3. cta_type_parameters : Types.type_expr list;
      (*

      The type parameters. FIXME : use strings?

      *)
    }
    and class_type_kind = Odoc_class.class_type_kind =
    1. | Class_signature of inherited_class list * class_element list
    2. | Class_type of class_type_alias
      (*

      A class type eventually applied to type args.

      *)
    and t_class_type = Odoc_class.t_class_type = {
    1. clt_name : Name.t;
      (*

      Complete name of the type.

      *)
    2. mutable clt_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. clt_type : Types.class_type;
    4. clt_type_parameters : Types.type_expr list;
      (*

      Type parameters.

      *)
    5. clt_virtual : bool;
      (*

      true if the class type is virtual

      *)
    6. mutable clt_kind : class_type_kind;
      (*

      The way the class type is defined.

      *)
    7. mutable clt_loc : location;
    }

    Representation of a class type.

    Functions

    val class_elements : ?trans:bool -> t_class -> class_element list

    Access to the elements of a class.

    val class_attributes : ?trans:bool -> t_class -> Value.t_attribute list

    Access to the list of class attributes.

    val class_parameter_text_by_name : t_class -> string -> text option

    Access to the description associated to the given class parameter name.

    val class_methods : ?trans:bool -> t_class -> Value.t_method list

    Access to the methods of a class.

    val class_comments : ?trans:bool -> t_class -> text list

    Access to the comments of a class.

    val class_type_elements : ?trans:bool -> t_class_type -> class_element list

    Access to the elements of a class type.

    val class_type_attributes : + ?trans:bool -> t_class_type -> - Value.t_attribute list

    Access to the list of class type attributes.

    val class_type_parameter_text_by_name : t_class_type -> string -> text option

    Access to the description associated to the given class type parameter name.

    val class_type_methods : ?trans:bool -> t_class_type -> Value.t_method list

    Access to the methods of a class type.

    val class_type_comments : ?trans:bool -> t_class_type -> text list

    Access to the comments of a class type.

    \ No newline at end of file + Value.t_attribute list

    Access to the list of class type attributes.

    val class_type_parameter_text_by_name : t_class_type -> string -> text option

    Access to the description associated to the given class type parameter name.

    val class_type_methods : ?trans:bool -> t_class_type -> Value.t_method list

    Access to the methods of a class type.

    val class_type_comments : ?trans:bool -> t_class_type -> text list

    Access to the comments of a class type.

    diff --git a/ocaml/Odoc_info/Dep/index.html b/ocaml/Odoc_info/Dep/index.html index 4ba2e3a..c91d792 100644 --- a/ocaml/Odoc_info/Dep/index.html +++ b/ocaml/Odoc_info/Dep/index.html @@ -1,5 +1,5 @@ -Dep (ocaml.Odoc_info.Dep)

    Module Odoc_info.Dep

    Computation of dependencies.

    val kernel_deps_of_modules : Module.t_module list -> unit

    Modify the module dependencies of the given list of modules, to get the minimum transitivity kernel.

    val deps_of_types : - ?kernel:bool -> +Dep (ocaml.Odoc_info.Dep)

    Module Odoc_info.Dep

    Computation of dependencies.

    val kernel_deps_of_modules : Module.t_module list -> unit

    Modify the module dependencies of the given list of modules, to get the minimum transitivity kernel.

    val deps_of_types : + ?kernel:bool -> Type.t_type list -> - (Type.t_type * Name.t list) list

    Return the list of dependencies between the given types, in the form of a list (type name, names of types it depends on).

    • parameter kernel

      indicates if we must keep only the transitivity kernel of the dependencies. Default is false.

    \ No newline at end of file + (Type.t_type * Name.t list) list

    Return the list of dependencies between the given types, in the form of a list (type name, names of types it depends on).

    • parameter kernel

      indicates if we must keep only the transitivity kernel of the dependencies. Default is false.

    diff --git a/ocaml/Odoc_info/Exception/index.html b/ocaml/Odoc_info/Exception/index.html index 1f66434..00c8987 100644 --- a/ocaml/Odoc_info/Exception/index.html +++ b/ocaml/Odoc_info/Exception/index.html @@ -1,2 +1,2 @@ -Exception (ocaml.Odoc_info.Exception)

    Module Odoc_info.Exception

    Representation and manipulation of exceptions.

    type exception_alias = Odoc_exception.exception_alias = {
    1. ea_name : Name.t;
      (*

      The complete name of the target exception.

      *)
    2. mutable ea_ex : t_exception option;
      (*

      The target exception, if we found it.

      *)
    }

    Used when the exception is a rebind of another exception, when we have exception Ex = Target_ex.

    and t_exception = Odoc_exception.t_exception = {
    1. ex_name : Name.t;
    2. mutable ex_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. ex_args : Odoc_type.constructor_args;
    4. ex_ret : Types.type_expr option;
      (*

      The optional return type of the exception.

      *)
    5. ex_alias : exception_alias option;
      (*

      None when the exception is not a rebind.

      *)
    6. mutable ex_loc : location;
    7. mutable ex_code : string option;
    }
    \ No newline at end of file +Exception (ocaml.Odoc_info.Exception)

    Module Odoc_info.Exception

    Representation and manipulation of exceptions.

    type exception_alias = Odoc_exception.exception_alias = {
    1. ea_name : Name.t;
      (*

      The complete name of the target exception.

      *)
    2. mutable ea_ex : t_exception option;
      (*

      The target exception, if we found it.

      *)
    }

    Used when the exception is a rebind of another exception, when we have exception Ex = Target_ex.

    and t_exception = Odoc_exception.t_exception = {
    1. ex_name : Name.t;
    2. mutable ex_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. ex_args : Odoc_type.constructor_args;
    4. ex_ret : Types.type_expr option;
      (*

      The optional return type of the exception.

      *)
    5. ex_alias : exception_alias option;
      (*

      None when the exception is not a rebind.

      *)
    6. mutable ex_loc : location;
    7. mutable ex_code : string option;
    }
    diff --git a/ocaml/Odoc_info/Extension/index.html b/ocaml/Odoc_info/Extension/index.html index b46ca96..953211f 100644 --- a/ocaml/Odoc_info/Extension/index.html +++ b/ocaml/Odoc_info/Extension/index.html @@ -1,2 +1,2 @@ -Extension (ocaml.Odoc_info.Extension)

    Module Odoc_info.Extension

    Representation and manipulation of extensions.

    type private_flag = Odoc_extension.private_flag =
    1. | Private
    2. | Public
    type extension_alias = Odoc_extension.extension_alias = {
    1. xa_name : Name.t;
      (*

      The complete name of the target extension.

      *)
    2. mutable xa_xt : t_extension_constructor option;
      (*

      The target extension, if we found it.

      *)
    }

    Used when the extension is a rebind of another extension, when we have extension Xt = Target_xt.

    and t_extension_constructor = Odoc_extension.t_extension_constructor = {
    1. xt_name : Name.t;
    2. xt_args : Odoc_type.constructor_args;
    3. xt_ret : Types.type_expr option;
      (*

      the optional return type of the extension

      *)
    4. xt_type_extension : t_type_extension;
      (*

      the type extension containing this constructor

      *)
    5. xt_alias : extension_alias option;
      (*

      None when the extension is not a rebind.

      *)
    6. mutable xt_loc : Odoc_types.location;
    7. mutable xt_text : Odoc_types.info option;
      (*

      optional user description

      *)
    }
    and t_type_extension = Odoc_extension.t_type_extension = {
    1. mutable te_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    2. te_type_name : Name.t;
      (*

      The type of the extension

      *)
    3. te_type_parameters : Types.type_expr list;
    4. te_private : private_flag;
    5. mutable te_constructors : t_extension_constructor list;
    6. mutable te_loc : location;
    7. mutable te_code : string option;
    }
    val extension_constructors : t_type_extension -> t_extension_constructor list

    Access to the extensions in a group.

    \ No newline at end of file +Extension (ocaml.Odoc_info.Extension)

    Module Odoc_info.Extension

    Representation and manipulation of extensions.

    type private_flag = Odoc_extension.private_flag =
    1. | Private
    2. | Public
    type extension_alias = Odoc_extension.extension_alias = {
    1. xa_name : Name.t;
      (*

      The complete name of the target extension.

      *)
    2. mutable xa_xt : t_extension_constructor option;
      (*

      The target extension, if we found it.

      *)
    }

    Used when the extension is a rebind of another extension, when we have extension Xt = Target_xt.

    and t_extension_constructor = Odoc_extension.t_extension_constructor = {
    1. xt_name : Name.t;
    2. xt_args : Odoc_type.constructor_args;
    3. xt_ret : Types.type_expr option;
      (*

      the optional return type of the extension

      *)
    4. xt_type_extension : t_type_extension;
      (*

      the type extension containing this constructor

      *)
    5. xt_alias : extension_alias option;
      (*

      None when the extension is not a rebind.

      *)
    6. mutable xt_loc : Odoc_types.location;
    7. mutable xt_text : Odoc_types.info option;
      (*

      optional user description

      *)
    }
    and t_type_extension = Odoc_extension.t_type_extension = {
    1. mutable te_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    2. te_type_name : Name.t;
      (*

      The type of the extension

      *)
    3. te_type_parameters : Types.type_expr list;
    4. te_private : private_flag;
    5. mutable te_constructors : t_extension_constructor list;
    6. mutable te_loc : location;
    7. mutable te_code : string option;
    }
    val extension_constructors : t_type_extension -> t_extension_constructor list

    Access to the extensions in a group.

    diff --git a/ocaml/Odoc_info/Global/index.html b/ocaml/Odoc_info/Global/index.html index 5573e69..e56d64c 100644 --- a/ocaml/Odoc_info/Global/index.html +++ b/ocaml/Odoc_info/Global/index.html @@ -1,2 +1,2 @@ -Global (ocaml.Odoc_info.Global)

    Module Odoc_info.Global

    val errors : int ref
    val warn_error : bool ref
    val out_file : string ref

    The file used by the generators outputting only one file.

    val verbose : bool ref

    Verbose mode or not.

    val target_dir : string ref

    The directory where files have to be generated.

    val title : string option ref

    The optional title to use in the generated documentation.

    val intro_file : string option ref

    The optional file whose content can be used as intro text.

    val with_toc : bool ref

    The flag which indicates if we must generate a table of contents.

    val with_index : bool ref

    The flag which indicates if we must generate an index.

    val with_header : bool ref

    The flag which indicates if we must generate a header.

    val with_trailer : bool ref

    The flag which indicates if we must generate a trailer.

    \ No newline at end of file +Global (ocaml.Odoc_info.Global)

    Module Odoc_info.Global

    val errors : int ref
    val warn_error : bool ref
    val out_file : string ref

    The file used by the generators outputting only one file.

    val verbose : bool ref

    Verbose mode or not.

    val target_dir : string ref

    The directory where files have to be generated.

    val title : string option ref

    The optional title to use in the generated documentation.

    val intro_file : string option ref

    The optional file whose content can be used as intro text.

    val with_toc : bool ref

    The flag which indicates if we must generate a table of contents.

    val with_index : bool ref

    The flag which indicates if we must generate an index.

    val with_header : bool ref

    The flag which indicates if we must generate a header.

    val with_trailer : bool ref

    The flag which indicates if we must generate a trailer.

    diff --git a/ocaml/Odoc_info/Module/index.html b/ocaml/Odoc_info/Module/index.html index 0602882..13fb8ef 100644 --- a/ocaml/Odoc_info/Module/index.html +++ b/ocaml/Odoc_info/Module/index.html @@ -1,29 +1,29 @@ -Module (ocaml.Odoc_info.Module)

    Module Odoc_info.Module

    Representation and manipulation of modules and module types.

    Types

    type module_element = Odoc_module.module_element =
    1. | Element_module of t_module
    2. | Element_module_type of t_module_type
    3. | Element_included_module of included_module
    4. | Element_class of Class.t_class
    5. | Element_class_type of Class.t_class_type
    6. | Element_value of Value.t_value
    7. | Element_type_extension of Extension.t_type_extension
    8. | Element_exception of Exception.t_exception
    9. | Element_type of Type.t_type
    10. | Element_module_comment of text

    To keep the order of elements in a module.

    and mmt = Odoc_module.mmt =
    1. | Mod of t_module
    2. | Modtype of t_module_type

    Used where we can reference t_module or t_module_type.

    and included_module = Odoc_module.included_module = {
    1. im_name : Name.t;
      (*

      Complete name of the included module.

      *)
    2. mutable im_module : mmt option;
      (*

      The included module or module type, if we found it.

      *)
    3. mutable im_info : Odoc_types.info option;
      (*

      comment associated with the include directive

      *)
    }
    and module_alias = Odoc_module.module_alias = {
    1. ma_name : Name.t;
      (*

      Complete name of the target module.

      *)
    2. mutable ma_module : mmt option;
      (*

      The real module or module type if we could associate it.

      *)
    }
    and module_parameter = Odoc_module.module_parameter = {
    1. mp_name : string;
      (*

      the name

      *)
    2. mp_type : Types.module_type option;
      (*

      the type

      *)
    3. mp_type_code : string;
      (*

      the original code

      *)
    4. mp_kind : module_type_kind;
      (*

      the way the parameter was built

      *)
    }
    and module_kind = Odoc_module.module_kind =
    1. | Module_struct of module_element list
      (*

      A complete module structure.

      *)
    2. | Module_alias of module_alias
      (*

      Complete name and corresponding module if we found it

      *)
    3. | Module_functor of module_parameter * module_kind
      (*

      A functor, with its parameter and the rest of its definition

      *)
    4. | Module_apply of module_kind * module_kind
      (*

      A module defined by application of a functor.

      *)
    5. | Module_apply_unit of module_kind
      (*

      A generative application of a functor.

      *)
    6. | Module_with of module_type_kind * string
      (*

      A module whose type is a with ... constraint. Should appear in interface files only.

      *)
    7. | Module_constraint of module_kind * module_type_kind
      (*

      A module constraint by a module type.

      *)
    8. | Module_typeof of string
      (*

      by now only the code of the module expression

      *)
    9. | Module_unpack of string * module_type_alias
      (*

      code of the expression and module type alias

      *)

    Different kinds of a module.

    and t_module = Odoc_module.t_module = {
    1. m_name : Name.t;
      (*

      Complete name of the module.

      *)
    2. mutable m_type : Types.module_type;
      (*

      The type of the module.

      *)
    3. mutable m_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    4. m_is_interface : bool;
      (*

      true for modules read from interface files

      *)
    5. m_file : string;
      (*

      The file the module is defined in.

      *)
    6. mutable m_kind : module_kind;
      (*

      The way the module is defined.

      *)
    7. mutable m_loc : location;
    8. mutable m_top_deps : Name.t list;
      (*

      The toplevels module names this module depends on.

      *)
    9. mutable m_code : string option;
      (*

      The whole code of the module

      *)
    10. mutable m_code_intf : string option;
      (*

      The whole code of the interface of the module

      *)
    11. m_text_only : bool;
      (*

      true if the module comes from a text file

      *)
    }

    Representation of a module.

    and module_type_alias = Odoc_module.module_type_alias = {
    1. mta_name : Name.t;
      (*

      Complete name of the target module type.

      *)
    2. mutable mta_module : t_module_type option;
      (*

      The real module type if we could associate it.

      *)
    }
    and module_type_kind = Odoc_module.module_type_kind =
    1. | Module_type_struct of module_element list
      (*

      A complete module signature.

      *)
    2. | Module_type_functor of module_parameter * module_type_kind
      (*

      A functor, with its parameter and the rest of its definition

      *)
    3. | Module_type_alias of module_type_alias
      (*

      Complete alias name and corresponding module type if we found it.

      *)
    4. | Module_type_with of module_type_kind * string
      (*

      The module type kind and the code of the with constraint.

      *)
    5. | Module_type_typeof of string
      (*

      by now only the code of the module expression

      *)

    Different kinds of module type.

    and t_module_type = Odoc_module.t_module_type = {
    1. mt_name : Name.t;
      (*

      Complete name of the module type.

      *)
    2. mutable mt_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. mutable mt_type : Types.module_type option;
      (*

      None means that the module type is abstract.

      *)
    4. mt_is_interface : bool;
      (*

      true for modules read from interface files.

      *)
    5. mt_file : string;
      (*

      The file the module type is defined in.

      *)
    6. mutable mt_kind : module_type_kind option;
      (*

      The way the module is defined. None means that module type is abstract. It is always None when the module type was extracted from the implementation file. That means module types are only analysed in interface files.

      *)
    7. mutable mt_loc : location;
    }

    Representation of a module type.

    Functions for modules

    val module_elements : ?trans:bool -> t_module -> module_element list

    Access to the elements of a module.

    val module_modules : ?trans:bool -> t_module -> t_module list

    Access to the submodules of a module.

    val module_module_types : ?trans:bool -> t_module -> t_module_type list

    Access to the module types of a module.

    val module_included_modules : ?trans:bool -> t_module -> included_module list

    Access to the included modules of a module.

    val module_type_extensions : - ?trans:bool -> +Module (ocaml.Odoc_info.Module)

    Module Odoc_info.Module

    Representation and manipulation of modules and module types.

    Types

    type module_element = Odoc_module.module_element =
    1. | Element_module of t_module
    2. | Element_module_type of t_module_type
    3. | Element_included_module of included_module
    4. | Element_class of Class.t_class
    5. | Element_class_type of Class.t_class_type
    6. | Element_value of Value.t_value
    7. | Element_type_extension of Extension.t_type_extension
    8. | Element_exception of Exception.t_exception
    9. | Element_type of Type.t_type
    10. | Element_module_comment of text

    To keep the order of elements in a module.

    and mmt = Odoc_module.mmt =
    1. | Mod of t_module
    2. | Modtype of t_module_type

    Used where we can reference t_module or t_module_type.

    and included_module = Odoc_module.included_module = {
    1. im_name : Name.t;
      (*

      Complete name of the included module.

      *)
    2. mutable im_module : mmt option;
      (*

      The included module or module type, if we found it.

      *)
    3. mutable im_info : Odoc_types.info option;
      (*

      comment associated with the include directive

      *)
    }
    and module_alias = Odoc_module.module_alias = {
    1. ma_name : Name.t;
      (*

      Complete name of the target module.

      *)
    2. mutable ma_module : mmt option;
      (*

      The real module or module type if we could associate it.

      *)
    }
    and module_parameter = Odoc_module.module_parameter = {
    1. mp_name : string;
      (*

      the name

      *)
    2. mp_type : Types.module_type option;
      (*

      the type

      *)
    3. mp_type_code : string;
      (*

      the original code

      *)
    4. mp_kind : module_type_kind;
      (*

      the way the parameter was built

      *)
    }
    and module_kind = Odoc_module.module_kind =
    1. | Module_struct of module_element list
      (*

      A complete module structure.

      *)
    2. | Module_alias of module_alias
      (*

      Complete name and corresponding module if we found it

      *)
    3. | Module_functor of module_parameter * module_kind
      (*

      A functor, with its parameter and the rest of its definition

      *)
    4. | Module_apply of module_kind * module_kind
      (*

      A module defined by application of a functor.

      *)
    5. | Module_apply_unit of module_kind
      (*

      A generative application of a functor.

      *)
    6. | Module_with of module_type_kind * string
      (*

      A module whose type is a with ... constraint. Should appear in interface files only.

      *)
    7. | Module_constraint of module_kind * module_type_kind
      (*

      A module constraint by a module type.

      *)
    8. | Module_typeof of string
      (*

      by now only the code of the module expression

      *)
    9. | Module_unpack of string * module_type_alias
      (*

      code of the expression and module type alias

      *)

    Different kinds of a module.

    and t_module = Odoc_module.t_module = {
    1. m_name : Name.t;
      (*

      Complete name of the module.

      *)
    2. mutable m_type : Types.module_type;
      (*

      The type of the module.

      *)
    3. mutable m_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    4. m_is_interface : bool;
      (*

      true for modules read from interface files

      *)
    5. m_file : string;
      (*

      The file the module is defined in.

      *)
    6. mutable m_kind : module_kind;
      (*

      The way the module is defined.

      *)
    7. mutable m_loc : location;
    8. mutable m_top_deps : Name.t list;
      (*

      The toplevels module names this module depends on.

      *)
    9. mutable m_code : string option;
      (*

      The whole code of the module

      *)
    10. mutable m_code_intf : string option;
      (*

      The whole code of the interface of the module

      *)
    11. m_text_only : bool;
      (*

      true if the module comes from a text file

      *)
    }

    Representation of a module.

    and module_type_alias = Odoc_module.module_type_alias = {
    1. mta_name : Name.t;
      (*

      Complete name of the target module type.

      *)
    2. mutable mta_module : t_module_type option;
      (*

      The real module type if we could associate it.

      *)
    }
    and module_type_kind = Odoc_module.module_type_kind =
    1. | Module_type_struct of module_element list
      (*

      A complete module signature.

      *)
    2. | Module_type_functor of module_parameter * module_type_kind
      (*

      A functor, with its parameter and the rest of its definition

      *)
    3. | Module_type_alias of module_type_alias
      (*

      Complete alias name and corresponding module type if we found it.

      *)
    4. | Module_type_with of module_type_kind * string
      (*

      The module type kind and the code of the with constraint.

      *)
    5. | Module_type_typeof of string
      (*

      by now only the code of the module expression

      *)

    Different kinds of module type.

    and t_module_type = Odoc_module.t_module_type = {
    1. mt_name : Name.t;
      (*

      Complete name of the module type.

      *)
    2. mutable mt_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. mutable mt_type : Types.module_type option;
      (*

      None means that the module type is abstract.

      *)
    4. mt_is_interface : bool;
      (*

      true for modules read from interface files.

      *)
    5. mt_file : string;
      (*

      The file the module type is defined in.

      *)
    6. mutable mt_kind : module_type_kind option;
      (*

      The way the module is defined. None means that module type is abstract. It is always None when the module type was extracted from the implementation file. That means module types are only analysed in interface files.

      *)
    7. mutable mt_loc : location;
    }

    Representation of a module type.

    Functions for modules

    val module_elements : ?trans:bool -> t_module -> module_element list

    Access to the elements of a module.

    val module_modules : ?trans:bool -> t_module -> t_module list

    Access to the submodules of a module.

    val module_module_types : ?trans:bool -> t_module -> t_module_type list

    Access to the module types of a module.

    val module_included_modules : ?trans:bool -> t_module -> included_module list

    Access to the included modules of a module.

    val module_type_extensions : + ?trans:bool -> t_module -> - Extension.t_type_extension list

    Access to the type extensions of a module.

    val module_exceptions : ?trans:bool -> t_module -> Exception.t_exception list

    Access to the exceptions of a module.

    val module_types : ?trans:bool -> t_module -> Type.t_type list

    Access to the types of a module.

    val module_values : ?trans:bool -> t_module -> Value.t_value list

    Access to the values of a module.

    val module_functions : ?trans:bool -> t_module -> Value.t_value list

    Access to functional values of a module.

    val module_simple_values : ?trans:bool -> t_module -> Value.t_value list

    Access to non-functional values of a module.

    val module_classes : ?trans:bool -> t_module -> Class.t_class list

    Access to the classes of a module.

    val module_class_types : ?trans:bool -> t_module -> Class.t_class_type list

    Access to the class types of a module.

    val module_all_classes : ?trans:bool -> t_module -> Class.t_class list

    The list of classes defined in this module and all its submodules and functors.

    val module_is_functor : t_module -> bool

    true if the module is functor.

    val module_parameters : - ?trans:bool -> + Extension.t_type_extension list

    Access to the type extensions of a module.

    val module_exceptions : ?trans:bool -> t_module -> Exception.t_exception list

    Access to the exceptions of a module.

    val module_types : ?trans:bool -> t_module -> Type.t_type list

    Access to the types of a module.

    val module_values : ?trans:bool -> t_module -> Value.t_value list

    Access to the values of a module.

    val module_functions : ?trans:bool -> t_module -> Value.t_value list

    Access to functional values of a module.

    val module_simple_values : ?trans:bool -> t_module -> Value.t_value list

    Access to non-functional values of a module.

    val module_classes : ?trans:bool -> t_module -> Class.t_class list

    Access to the classes of a module.

    val module_class_types : ?trans:bool -> t_module -> Class.t_class_type list

    Access to the class types of a module.

    val module_all_classes : ?trans:bool -> t_module -> Class.t_class list

    The list of classes defined in this module and all its submodules and functors.

    val module_is_functor : t_module -> bool

    true if the module is functor.

    val module_parameters : + ?trans:bool -> t_module -> - (module_parameter * text option) list

    The list of couples (module parameter, optional description).

    val module_comments : ?trans:bool -> t_module -> text list

    The list of module comments.

    Functions for module types

    val module_type_elements : ?trans:bool -> t_module_type -> module_element list

    Access to the elements of a module type.

    val module_type_modules : ?trans:bool -> t_module_type -> t_module list

    Access to the submodules of a module type.

    val module_type_module_types : - ?trans:bool -> + (module_parameter * text option) list

    The list of couples (module parameter, optional description).

    val module_comments : ?trans:bool -> t_module -> text list

    The list of module comments.

    Functions for module types

    val module_type_elements : ?trans:bool -> t_module_type -> module_element list

    Access to the elements of a module type.

    val module_type_modules : ?trans:bool -> t_module_type -> t_module list

    Access to the submodules of a module type.

    val module_type_module_types : + ?trans:bool -> t_module_type -> t_module_type list

    Access to the module types of a module type.

    val module_type_included_modules : - ?trans:bool -> + ?trans:bool -> t_module_type -> included_module list

    Access to the included modules of a module type.

    val module_type_exceptions : - ?trans:bool -> + ?trans:bool -> t_module_type -> - Exception.t_exception list

    Access to the exceptions of a module type.

    val module_type_types : ?trans:bool -> t_module_type -> Type.t_type list

    Access to the types of a module type.

    val module_type_values : ?trans:bool -> t_module_type -> Value.t_value list

    Access to the values of a module type.

    val module_type_functions : ?trans:bool -> t_module_type -> Value.t_value list

    Access to functional values of a module type.

    val module_type_simple_values : - ?trans:bool -> + Exception.t_exception list

    Access to the exceptions of a module type.

    val module_type_types : ?trans:bool -> t_module_type -> Type.t_type list

    Access to the types of a module type.

    val module_type_values : ?trans:bool -> t_module_type -> Value.t_value list

    Access to the values of a module type.

    val module_type_functions : ?trans:bool -> t_module_type -> Value.t_value list

    Access to functional values of a module type.

    val module_type_simple_values : + ?trans:bool -> t_module_type -> - Value.t_value list

    Access to non-functional values of a module type.

    val module_type_classes : ?trans:bool -> t_module_type -> Class.t_class list

    Access to the classes of a module type.

    val module_type_class_types : - ?trans:bool -> + Value.t_value list

    Access to non-functional values of a module type.

    val module_type_classes : ?trans:bool -> t_module_type -> Class.t_class list

    Access to the classes of a module type.

    val module_type_class_types : + ?trans:bool -> t_module_type -> Class.t_class_type list

    Access to the class types of a module type.

    val module_type_all_classes : - ?trans:bool -> + ?trans:bool -> t_module_type -> Class.t_class list

    The list of classes defined in this module type and all its submodules and functors.

    val module_type_is_functor : t_module_type -> bool

    true if the module type is functor.

    val module_type_parameters : - ?trans:bool -> + ?trans:bool -> t_module_type -> - (module_parameter * text option) list

    The list of couples (module parameter, optional description).

    val module_type_comments : ?trans:bool -> t_module_type -> text list

    The list of module comments.

    \ No newline at end of file + (module_parameter * text option) list

    The list of couples (module parameter, optional description).

    val module_type_comments : ?trans:bool -> t_module_type -> text list

    The list of module comments.

    diff --git a/ocaml/Odoc_info/Name/index.html b/ocaml/Odoc_info/Name/index.html index 0da7ee0..ef222a5 100644 --- a/ocaml/Odoc_info/Name/index.html +++ b/ocaml/Odoc_info/Name/index.html @@ -1,2 +1,2 @@ -Name (ocaml.Odoc_info.Name)

    Module Odoc_info.Name

    Representation of element names.

    type t = string
    val simple : t -> t

    Access to the simple name.

    val concat : t -> t -> t

    concat t1 t2 returns the concatenation of t1 and t2.

    val depth : t -> int

    Return the depth of the name, i.e. the number of levels to the root. Example : depth "Toto.Tutu.name" = 3.

    val get_relative : t -> t -> t

    Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 or else n2.

    val get_relative_opt : t -> t -> t

    Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 and n1<>"" or else n2.

    val father : t -> t

    Return the name of the 'father' (like dirname for a file name).

    \ No newline at end of file +Name (ocaml.Odoc_info.Name)

    Module Odoc_info.Name

    Representation of element names.

    type t = string
    val simple : t -> t

    Access to the simple name.

    val concat : t -> t -> t

    concat t1 t2 returns the concatenation of t1 and t2.

    val depth : t -> int

    Return the depth of the name, i.e. the number of levels to the root. Example : depth "Toto.Tutu.name" = 3.

    val get_relative : t -> t -> t

    Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 or else n2.

    val get_relative_opt : t -> t -> t

    Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 and n1<>"" or else n2.

    val father : t -> t

    Return the name of the 'father' (like dirname for a file name).

    diff --git a/ocaml/Odoc_info/Parameter/index.html b/ocaml/Odoc_info/Parameter/index.html index 3490e76..aea0f94 100644 --- a/ocaml/Odoc_info/Parameter/index.html +++ b/ocaml/Odoc_info/Parameter/index.html @@ -1,2 +1,2 @@ -Parameter (ocaml.Odoc_info.Parameter)

    Module Odoc_info.Parameter

    Representation and manipulation of method / function / class / module parameters.

    Types

    type simple_name = Odoc_parameter.simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : text option;
    }

    Representation of a simple parameter name

    type param_info = Odoc_parameter.param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr

    Representation of parameter names. We need it to represent parameter names in tuples. The value Tuple ([], t) stands for an anonymous parameter.

    type parameter = param_info

    A parameter is just a param_info.

    Functions

    val complete_name : parameter -> string

    Access to the name as a string. For tuples, parentheses and commas are added.

    Access to the complete type.

    val names : parameter -> string list

    Access to the list of names ; only one for a simple parameter, or a list for a tuple.

    val desc_by_name : parameter -> string -> text option

    Access to the description of a specific name.

    • raises Not_found

      if no description is associated to the given name.

    val type_by_name : parameter -> string -> Types.type_expr

    Access to the type of a specific name.

    • raises Not_found

      if no type is associated to the given name.

    \ No newline at end of file +Parameter (ocaml.Odoc_info.Parameter)

    Module Odoc_info.Parameter

    Representation and manipulation of method / function / class / module parameters.

    Types

    type simple_name = Odoc_parameter.simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : text option;
    }

    Representation of a simple parameter name

    type param_info = Odoc_parameter.param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr

    Representation of parameter names. We need it to represent parameter names in tuples. The value Tuple ([], t) stands for an anonymous parameter.

    type parameter = param_info

    A parameter is just a param_info.

    Functions

    val complete_name : parameter -> string

    Access to the name as a string. For tuples, parentheses and commas are added.

    Access to the complete type.

    val names : parameter -> string list

    Access to the list of names ; only one for a simple parameter, or a list for a tuple.

    val desc_by_name : parameter -> string -> text option

    Access to the description of a specific name.

    • raises Not_found

      if no description is associated to the given name.

    val type_by_name : parameter -> string -> Types.type_expr

    Access to the type of a specific name.

    • raises Not_found

      if no type is associated to the given name.

    diff --git a/ocaml/Odoc_info/Scan/class-scanner/index.html b/ocaml/Odoc_info/Scan/class-scanner/index.html index 5517d50..f327bc5 100644 --- a/ocaml/Odoc_info/Scan/class-scanner/index.html +++ b/ocaml/Odoc_info/Scan/class-scanner/index.html @@ -1,2 +1,2 @@ -scanner (ocaml.Odoc_info.Scan.scanner)

    Class Scan.scanner

    method scan_value : Value.t_value -> unit
    method scan_type_pre : Type.t_type -> bool
    method scan_type_const : Type.t_type -> Type.variant_constructor -> unit
    method scan_type_recfield : Type.t_type -> Type.record_field -> unit
    method scan_type : Type.t_type -> unit
    method scan_extension_constructor : Extension.t_extension_constructor -> unit
    method scan_exception : Exception.t_exception -> unit
    method scan_attribute : Value.t_attribute -> unit
    method scan_method : Value.t_method -> unit
    method scan_included_module : Module.included_module -> unit

    Scan of a type extension

    method scan_type_extension_pre : Extension.t_type_extension -> bool

    Override this method to perform controls on the extension's type, private and info. This method is called before scanning the extension's constructors.

    • returns

      true if the extension's constructors must be scanned.

    method scan_type_extension_constructors : Extension.t_type_extension -> unit

    This method scans the constructors of the given type extension.

    method scan_type_extension : Extension.t_type_extension -> unit

    Scan of a type extension. Should not be overridden. It calls scan_type_extension_pre and if scan_type_extension_pre returns true, then it calls scan_type_extension_constructors.

    Scan of a class.

    method scan_class_comment : text -> unit

    Scan of a comment inside a class.

    method scan_class_pre : Class.t_class -> bool

    Override this method to perform controls on the class comment and params. This method is called before scanning the class elements.

    • returns

      true if the class elements must be scanned.

    method scan_class_elements : Class.t_class -> unit

    This method scans the elements of the given class.

    method scan_class : Class.t_class -> unit

    Scan of a class. Should not be overridden. It calls scan_class_pre and if scan_class_pre returns true, then it calls scan_class_elements.

    Scan of a class type.

    method scan_class_type_comment : text -> unit

    Scan of a comment inside a class type.

    method scan_class_type_pre : Class.t_class_type -> bool

    Override this method to perform controls on the class type comment and form. This method is called before scanning the class type elements.

    • returns

      true if the class type elements must be scanned.

    method scan_class_type_elements : Class.t_class_type -> unit

    This method scans the elements of the given class type.

    method scan_class_type : Class.t_class_type -> unit

    Scan of a class type. Should not be overridden. It calls scan_class_type_pre and if scan_class_type_pre returns true, then it calls scan_class_type_elements.

    Scan of modules.

    method scan_module_comment : text -> unit

    Scan of a comment inside a module.

    method scan_module_pre : Module.t_module -> bool

    Override this method to perform controls on the module comment and form. This method is called before scanning the module elements.

    • returns

      true if the module elements must be scanned.

    method scan_module_elements : Module.t_module -> unit

    This method scans the elements of the given module.

    method scan_module : Module.t_module -> unit

    Scan of a module. Should not be overridden. It calls scan_module_pre and if scan_module_pre returns true, then it calls scan_module_elements.

    Scan of module types.

    method scan_module_type_comment : text -> unit

    Scan of a comment inside a module type.

    method scan_module_type_pre : Module.t_module_type -> bool

    Override this method to perform controls on the module type comment and form. This method is called before scanning the module type elements.

    • returns

      true if the module type elements must be scanned.

    method scan_module_type_elements : Module.t_module_type -> unit

    This method scans the elements of the given module type.

    method scan_module_type : Module.t_module_type -> unit

    Scan of a module type. Should not be overridden. It calls scan_module_type_pre and if scan_module_type_pre returns true, then it calls scan_module_type_elements.

    Main scanning method.

    method scan_module_list : Module.t_module list -> unit

    Scan a list of modules.

    \ No newline at end of file +scanner (ocaml.Odoc_info.Scan.scanner)

    Class Scan.scanner

    method scan_value : Value.t_value -> unit
    method scan_type_pre : Type.t_type -> bool
    method scan_type_const : Type.t_type -> Type.variant_constructor -> unit
    method scan_type_recfield : Type.t_type -> Type.record_field -> unit
    method scan_type : Type.t_type -> unit
    method scan_extension_constructor : Extension.t_extension_constructor -> unit
    method scan_exception : Exception.t_exception -> unit
    method scan_attribute : Value.t_attribute -> unit
    method scan_method : Value.t_method -> unit
    method scan_included_module : Module.included_module -> unit

    Scan of a type extension

    method scan_type_extension_pre : Extension.t_type_extension -> bool

    Override this method to perform controls on the extension's type, private and info. This method is called before scanning the extension's constructors.

    • returns

      true if the extension's constructors must be scanned.

    method scan_type_extension_constructors : Extension.t_type_extension -> unit

    This method scans the constructors of the given type extension.

    method scan_type_extension : Extension.t_type_extension -> unit

    Scan of a type extension. Should not be overridden. It calls scan_type_extension_pre and if scan_type_extension_pre returns true, then it calls scan_type_extension_constructors.

    Scan of a class.

    method scan_class_comment : text -> unit

    Scan of a comment inside a class.

    method scan_class_pre : Class.t_class -> bool

    Override this method to perform controls on the class comment and params. This method is called before scanning the class elements.

    • returns

      true if the class elements must be scanned.

    method scan_class_elements : Class.t_class -> unit

    This method scans the elements of the given class.

    method scan_class : Class.t_class -> unit

    Scan of a class. Should not be overridden. It calls scan_class_pre and if scan_class_pre returns true, then it calls scan_class_elements.

    Scan of a class type.

    method scan_class_type_comment : text -> unit

    Scan of a comment inside a class type.

    method scan_class_type_pre : Class.t_class_type -> bool

    Override this method to perform controls on the class type comment and form. This method is called before scanning the class type elements.

    • returns

      true if the class type elements must be scanned.

    method scan_class_type_elements : Class.t_class_type -> unit

    This method scans the elements of the given class type.

    method scan_class_type : Class.t_class_type -> unit

    Scan of a class type. Should not be overridden. It calls scan_class_type_pre and if scan_class_type_pre returns true, then it calls scan_class_type_elements.

    Scan of modules.

    method scan_module_comment : text -> unit

    Scan of a comment inside a module.

    method scan_module_pre : Module.t_module -> bool

    Override this method to perform controls on the module comment and form. This method is called before scanning the module elements.

    • returns

      true if the module elements must be scanned.

    method scan_module_elements : Module.t_module -> unit

    This method scans the elements of the given module.

    method scan_module : Module.t_module -> unit

    Scan of a module. Should not be overridden. It calls scan_module_pre and if scan_module_pre returns true, then it calls scan_module_elements.

    Scan of module types.

    method scan_module_type_comment : text -> unit

    Scan of a comment inside a module type.

    method scan_module_type_pre : Module.t_module_type -> bool

    Override this method to perform controls on the module type comment and form. This method is called before scanning the module type elements.

    • returns

      true if the module type elements must be scanned.

    method scan_module_type_elements : Module.t_module_type -> unit

    This method scans the elements of the given module type.

    method scan_module_type : Module.t_module_type -> unit

    Scan of a module type. Should not be overridden. It calls scan_module_type_pre and if scan_module_type_pre returns true, then it calls scan_module_type_elements.

    Main scanning method.

    method scan_module_list : Module.t_module list -> unit

    Scan a list of modules.

    diff --git a/ocaml/Odoc_info/Scan/index.html b/ocaml/Odoc_info/Scan/index.html index 584900a..c31a308 100644 --- a/ocaml/Odoc_info/Scan/index.html +++ b/ocaml/Odoc_info/Scan/index.html @@ -1,2 +1,2 @@ -Scan (ocaml.Odoc_info.Scan)

    Module Odoc_info.Scan

    Scanning of collected information

    class scanner : object ... end
    \ No newline at end of file +Scan (ocaml.Odoc_info.Scan)

    Module Odoc_info.Scan

    Scanning of collected information

    class scanner : object ... end
    diff --git a/ocaml/Odoc_info/Search/index.html b/ocaml/Odoc_info/Search/index.html index 3ea47de..421110e 100644 --- a/ocaml/Odoc_info/Search/index.html +++ b/ocaml/Odoc_info/Search/index.html @@ -1,2 +1,2 @@ -Search (ocaml.Odoc_info.Search)

    Module Odoc_info.Search

    Research in elements

    type result_element = Odoc_search.result_element =
    1. | Res_module of Module.t_module
    2. | Res_module_type of Module.t_module_type
    3. | Res_class of Class.t_class
    4. | Res_class_type of Class.t_class_type
    5. | Res_value of Value.t_value
    6. | Res_type of Type.t_type
    7. | Res_extension of Extension.t_extension_constructor
    8. | Res_exception of Exception.t_exception
    9. | Res_attribute of Value.t_attribute
    10. | Res_method of Value.t_method
    11. | Res_section of string * text
    12. | Res_recfield of Type.t_type * Type.record_field
    13. | Res_const of Type.t_type * Type.variant_constructor
    type search_result = result_element list

    The type representing a research result.

    val search_by_name : Module.t_module list -> Str.regexp -> search_result

    Research of the elements whose name matches the given regular expression.

    val values : Module.t_module list -> Value.t_value list

    A function to search all the values in a list of modules.

    A function to search all the extensions in a list of modules.

    val exceptions : Module.t_module list -> Exception.t_exception list

    A function to search all the exceptions in a list of modules.

    val types : Module.t_module list -> Type.t_type list

    A function to search all the types in a list of modules.

    val attributes : Module.t_module list -> Value.t_attribute list

    A function to search all the class attributes in a list of modules.

    val methods : Module.t_module list -> Value.t_method list

    A function to search all the class methods in a list of modules.

    val classes : Module.t_module list -> Class.t_class list

    A function to search all the classes in a list of modules.

    val class_types : Module.t_module list -> Class.t_class_type list

    A function to search all the class types in a list of modules.

    val modules : Module.t_module list -> Module.t_module list

    A function to search all the modules in a list of modules.

    val module_types : Module.t_module list -> Module.t_module_type list

    A function to search all the module types in a list of modules.

    \ No newline at end of file +Search (ocaml.Odoc_info.Search)

    Module Odoc_info.Search

    Research in elements

    type result_element = Odoc_search.result_element =
    1. | Res_module of Module.t_module
    2. | Res_module_type of Module.t_module_type
    3. | Res_class of Class.t_class
    4. | Res_class_type of Class.t_class_type
    5. | Res_value of Value.t_value
    6. | Res_type of Type.t_type
    7. | Res_extension of Extension.t_extension_constructor
    8. | Res_exception of Exception.t_exception
    9. | Res_attribute of Value.t_attribute
    10. | Res_method of Value.t_method
    11. | Res_section of string * text
    12. | Res_recfield of Type.t_type * Type.record_field
    13. | Res_const of Type.t_type * Type.variant_constructor
    type search_result = result_element list

    The type representing a research result.

    val search_by_name : Module.t_module list -> Str.regexp -> search_result

    Research of the elements whose name matches the given regular expression.

    val values : Module.t_module list -> Value.t_value list

    A function to search all the values in a list of modules.

    A function to search all the extensions in a list of modules.

    val exceptions : Module.t_module list -> Exception.t_exception list

    A function to search all the exceptions in a list of modules.

    val types : Module.t_module list -> Type.t_type list

    A function to search all the types in a list of modules.

    val attributes : Module.t_module list -> Value.t_attribute list

    A function to search all the class attributes in a list of modules.

    val methods : Module.t_module list -> Value.t_method list

    A function to search all the class methods in a list of modules.

    val classes : Module.t_module list -> Class.t_class list

    A function to search all the classes in a list of modules.

    val class_types : Module.t_module list -> Class.t_class_type list

    A function to search all the class types in a list of modules.

    val modules : Module.t_module list -> Module.t_module list

    A function to search all the modules in a list of modules.

    val module_types : Module.t_module list -> Module.t_module_type list

    A function to search all the module types in a list of modules.

    diff --git a/ocaml/Odoc_info/Type/index.html b/ocaml/Odoc_info/Type/index.html index aaa2ca0..80bdfb4 100644 --- a/ocaml/Odoc_info/Type/index.html +++ b/ocaml/Odoc_info/Type/index.html @@ -1,2 +1,2 @@ -Type (ocaml.Odoc_info.Type)

    Module Odoc_info.Type

    Representation and manipulation of types.

    type private_flag = Odoc_type.private_flag =
    1. | Private
    2. | Public
    type record_field = Odoc_type.record_field = {
    1. rf_name : string;
      (*

      Name of the field.

      *)
    2. rf_mutable : bool;
      (*

      true if mutable.

      *)
    3. rf_type : Types.type_expr;
      (*

      Type of the field.

      *)
    4. mutable rf_text : info option;
      (*

      Optional description in the associated comment.

      *)
    }

    Description of a record type field.

    type constructor_args = Odoc_type.constructor_args =
    1. | Cstr_record of record_field list
    2. | Cstr_tuple of Types.type_expr list

    Description of a variant type constructor.

    type variant_constructor = Odoc_type.variant_constructor = {
    1. vc_name : string;
      (*

      Name of the constructor.

      *)
    2. vc_args : constructor_args;
    3. vc_ret : Types.type_expr option;
    4. mutable vc_text : info option;
      (*

      Optional description in the associated comment.

      *)
    }
    type type_kind = Odoc_type.type_kind =
    1. | Type_abstract
      (*

      Type is abstract, for example type t.

      *)
    2. | Type_variant of variant_constructor list
      (*

      constructors

      *)
    3. | Type_record of record_field list
      (*

      fields

      *)
    4. | Type_open
      (*

      Type is open

      *)

    The various kinds of a type.

    type object_field = Odoc_type.object_field = {
    1. of_name : string;
    2. of_type : Types.type_expr;
    3. mutable of_text : Odoc_types.info option;
      (*

      optional user description

      *)
    }
    type type_manifest = Odoc_type.type_manifest =
    1. | Other of Types.type_expr
      (*

      Type manifest directly taken from Typedtree.

      *)
    2. | Object_type of object_field list
    type t_type = Odoc_type.t_type = {
    1. ty_name : Name.t;
      (*

      Complete name of the type.

      *)
    2. mutable ty_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. ty_parameters : (Types.type_expr * Types.Variance.t) list;
      (*

      type parameters: (type, variance)

      *)
    4. ty_kind : type_kind;
      (*

      Type kind.

      *)
    5. ty_private : private_flag;
      (*

      Private or public type.

      *)
    6. ty_manifest : type_manifest option;
    7. mutable ty_loc : location;
    8. mutable ty_code : string option;
    }

    Representation of a type.

    \ No newline at end of file +Type (ocaml.Odoc_info.Type)

    Module Odoc_info.Type

    Representation and manipulation of types.

    type private_flag = Odoc_type.private_flag =
    1. | Private
    2. | Public
    type record_field = Odoc_type.record_field = {
    1. rf_name : string;
      (*

      Name of the field.

      *)
    2. rf_mutable : bool;
      (*

      true if mutable.

      *)
    3. rf_type : Types.type_expr;
      (*

      Type of the field.

      *)
    4. mutable rf_text : info option;
      (*

      Optional description in the associated comment.

      *)
    }

    Description of a record type field.

    type constructor_args = Odoc_type.constructor_args =
    1. | Cstr_record of record_field list
    2. | Cstr_tuple of Types.type_expr list

    Description of a variant type constructor.

    type variant_constructor = Odoc_type.variant_constructor = {
    1. vc_name : string;
      (*

      Name of the constructor.

      *)
    2. vc_args : constructor_args;
    3. vc_ret : Types.type_expr option;
    4. mutable vc_text : info option;
      (*

      Optional description in the associated comment.

      *)
    }
    type type_kind = Odoc_type.type_kind =
    1. | Type_abstract
      (*

      Type is abstract, for example type t.

      *)
    2. | Type_variant of variant_constructor list
      (*

      constructors

      *)
    3. | Type_record of record_field list
      (*

      fields

      *)
    4. | Type_open
      (*

      Type is open

      *)

    The various kinds of a type.

    type object_field = Odoc_type.object_field = {
    1. of_name : string;
    2. of_type : Types.type_expr;
    3. mutable of_text : Odoc_types.info option;
      (*

      optional user description

      *)
    }
    type type_manifest = Odoc_type.type_manifest =
    1. | Other of Types.type_expr
      (*

      Type manifest directly taken from Typedtree.

      *)
    2. | Object_type of object_field list
    type t_type = Odoc_type.t_type = {
    1. ty_name : Name.t;
      (*

      Complete name of the type.

      *)
    2. mutable ty_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. ty_parameters : (Types.type_expr * Types.Variance.t) list;
      (*

      type parameters: (type, variance)

      *)
    4. ty_kind : type_kind;
      (*

      Type kind.

      *)
    5. ty_private : private_flag;
      (*

      Private or public type.

      *)
    6. ty_manifest : type_manifest option;
    7. mutable ty_loc : location;
    8. mutable ty_code : string option;
    }

    Representation of a type.

    diff --git a/ocaml/Odoc_info/Value/index.html b/ocaml/Odoc_info/Value/index.html index 0339a43..09af484 100644 --- a/ocaml/Odoc_info/Value/index.html +++ b/ocaml/Odoc_info/Value/index.html @@ -1,2 +1,2 @@ -Value (ocaml.Odoc_info.Value)

    Module Odoc_info.Value

    Representation and manipulation of values, class attributes and class methods.

    type t_value = Odoc_value.t_value = {
    1. val_name : Name.t;
      (*

      Complete name of the value.

      *)
    2. mutable val_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. val_type : Types.type_expr;
      (*

      Type of the value.

      *)
    4. val_recursive : bool;
      (*

      true if the value is recursive.

      *)
    5. mutable val_parameters : Odoc_parameter.parameter list;
      (*

      The parameters, if any.

      *)
    6. mutable val_code : string option;
      (*

      The code of the value, if we had the only the implementation file.

      *)
    7. mutable val_loc : location;
    }

    Representation of a value.

    type t_attribute = Odoc_value.t_attribute = {
    1. att_value : t_value;
      (*

      an attribute has almost all the same information as a value

      *)
    2. att_mutable : bool;
      (*

      true if the attribute is mutable.

      *)
    3. att_virtual : bool;
      (*

      true if the attribute is virtual.

      *)
    }

    Representation of a class attribute.

    type t_method = Odoc_value.t_method = {
    1. met_value : t_value;
      (*

      a method has almost all the same information as a value

      *)
    2. met_private : bool;
      (*

      true if the method is private.

      *)
    3. met_virtual : bool;
      (*

      true if the method is virtual.

      *)
    }

    Representation of a class method.

    val is_function : t_value -> bool

    Return true if the value is a function, i.e. it has a functional type.

    val value_parameter_text_by_name : t_value -> string -> text option

    Access to the description associated to the given parameter name.

    \ No newline at end of file +Value (ocaml.Odoc_info.Value)

    Module Odoc_info.Value

    Representation and manipulation of values, class attributes and class methods.

    type t_value = Odoc_value.t_value = {
    1. val_name : Name.t;
      (*

      Complete name of the value.

      *)
    2. mutable val_info : info option;
      (*

      Information found in the optional associated comment.

      *)
    3. val_type : Types.type_expr;
      (*

      Type of the value.

      *)
    4. val_recursive : bool;
      (*

      true if the value is recursive.

      *)
    5. mutable val_parameters : Odoc_parameter.parameter list;
      (*

      The parameters, if any.

      *)
    6. mutable val_code : string option;
      (*

      The code of the value, if we had the only the implementation file.

      *)
    7. mutable val_loc : location;
    }

    Representation of a value.

    type t_attribute = Odoc_value.t_attribute = {
    1. att_value : t_value;
      (*

      an attribute has almost all the same information as a value

      *)
    2. att_mutable : bool;
      (*

      true if the attribute is mutable.

      *)
    3. att_virtual : bool;
      (*

      true if the attribute is virtual.

      *)
    }

    Representation of a class attribute.

    type t_method = Odoc_value.t_method = {
    1. met_value : t_value;
      (*

      a method has almost all the same information as a value

      *)
    2. met_private : bool;
      (*

      true if the method is private.

      *)
    3. met_virtual : bool;
      (*

      true if the method is virtual.

      *)
    }

    Representation of a class method.

    val is_function : t_value -> bool

    Return true if the value is a function, i.e. it has a functional type.

    val value_parameter_text_by_name : t_value -> string -> text option

    Access to the description associated to the given parameter name.

    diff --git a/ocaml/Odoc_info/index.html b/ocaml/Odoc_info/index.html index 32b10e6..0e52290 100644 --- a/ocaml/Odoc_info/index.html +++ b/ocaml/Odoc_info/index.html @@ -1,14 +1,14 @@ -Odoc_info (ocaml.Odoc_info)

    Module Odoc_info

    Interface to the information collected in source files.

    type ref_kind = Odoc_types.ref_kind =
    1. | RK_module
    2. | RK_module_type
    3. | RK_class
    4. | RK_class_type
    5. | RK_value
    6. | RK_type
    7. | RK_extension
    8. | RK_exception
    9. | RK_attribute
    10. | RK_method
    11. | RK_section of text
    12. | RK_recfield
    13. | RK_const

    The different kinds of element references.

    and text_element = Odoc_types.text_element =
    1. | Raw of string
      (*

      Raw text.

      *)
    2. | Code of string
      (*

      The string is source code.

      *)
    3. | CodePre of string
      (*

      The string is pre-formatted source code.

      *)
    4. | Verbatim of string
      (*

      String 'as is'.

      *)
    5. | Bold of text
      (*

      Text in bold style.

      *)
    6. | Italic of text
      (*

      Text in italic.

      *)
    7. | Emphasize of text
      (*

      Emphasized text.

      *)
    8. | Center of text
      (*

      Centered text.

      *)
    9. | Left of text
      (*

      Left alignment.

      *)
    10. | Right of text
      (*

      Right alignment.

      *)
    11. | List of text list
      (*

      A list.

      *)
    12. | Enum of text list
      (*

      An enumerated list.

      *)
    13. | Newline
      (*

      To force a line break.

      *)
    14. | Block of text
      (*

      Like html's block quote.

      *)
    15. | Title of int * string option * text
      (*

      Style number, optional label, and text.

      *)
    16. | Latex of string
      (*

      A string for latex.

      *)
    17. | Ref of string * ref_kind option * text option
      (*

      A reference to an element. Complete name and kind. An optional text can be given to display this text instead of the element name.

      *)
    18. | Superscript of text
      (*

      Superscripts.

      *)
    19. | Subscript of text
      (*

      Subscripts.

      *)
    20. | Module_list of string list
      (*

      The table of the given modules with their abstract.

      *)
    21. | Index_list
      (*

      The links to the various indexes (values, types, ...)

      *)
    22. | Custom of string * text
      (*

      to extend {foo syntax

      *)
    23. | Target of string * string
      (*

      (target, code) : to specify code specific to a target format

      *)
    and text = text_element list

    A text is a list of text_element. The order matters.

    type see_ref = Odoc_types.see_ref =
    1. | See_url of string
    2. | See_file of string
    3. | See_doc of string

    The different forms of references in @see tags.

    exception Text_syntax of int * int * string

    Raised when parsing string to build a Odoc_info.text structure. (line, char, string)

    type see = see_ref * text

    The information in a @see tag.

    type param = string * text

    Parameter name and description.

    type raised_exception = string * text

    Raised exception name and description.

    type alert = Odoc_types.alert = {
    1. alert_name : string;
    2. alert_payload : string option;
    }
    type info = Odoc_types.info = {
    1. i_desc : text option;
      (*

      The description text.

      *)
    2. i_authors : string list;
      (*

      The list of authors in @author tags.

      *)
    3. i_version : string option;
      (*

      The string in the @version tag.

      *)
    4. i_sees : see list;
      (*

      The list of @see tags.

      *)
    5. i_since : string option;
      (*

      The string in the @since tag.

      *)
    6. i_before : (string * text) list;
      (*

      the version number and text in @before tag

      *)
    7. i_deprecated : text option;
      (*

      The description text of the @deprecated tag.

      *)
    8. i_params : param list;
      (*

      The list of parameter descriptions.

      *)
    9. i_raised_exceptions : raised_exception list;
      (*

      The list of raised exceptions.

      *)
    10. i_return_value : text option;
      (*

      The description text of the return value.

      *)
    11. i_custom : (string * text) list;
      (*

      A text associated to a custom @-tag.

      *)
    12. i_alerts : alert list;
      (*

      Alerts associated to the same item. Not from special comments.

      *)
    }

    Information in a special comment

    • before 3.12

      @before information was not present.

    type location = Odoc_types.location = {
    1. loc_impl : Location.t option;
      (*

      implementation location

      *)
    2. loc_inter : Location.t option;
      (*

      interface location

      *)
    }

    Location of elements in implementation and interface files.

    val dummy_loc : location

    A dummy location.

    module Name : sig ... end

    Representation of element names.

    module Parameter : sig ... end

    Representation and manipulation of method / function / class / module parameters.

    module Extension : sig ... end

    Representation and manipulation of extensions.

    module Exception : sig ... end

    Representation and manipulation of exceptions.

    module Type : sig ... end

    Representation and manipulation of types.

    module Value : sig ... end

    Representation and manipulation of values, class attributes and class methods.

    module Class : sig ... end

    Representation and manipulation of classes and class types.

    module Module : sig ... end

    Representation and manipulation of modules and module types.

    Getting strings from values

    val reset_type_names : unit -> unit

    This function is used to reset the names of type variables. It must be called when printing the whole type of a function, but not when printing the type of its parameters. Same for classes (call it) and methods and attributes (don't call it).

    val string_of_variance : Type.t_type -> Types.Variance.t -> string

    string_of_variance t variance returns the variance and injectivity annotation (e.g "+" for covariance, "-" for contravariance, "!-" for injectivity) if the type t is abstract.

    val string_of_type_expr : Types.type_expr -> string

    This function returns a string representing a Types.type_expr.

    val string_of_class_params : Class.t_class -> string
    • returns

      a string to display the parameters of the given class, in the same form as the compiler.

    val string_of_type_list : ?par:bool -> string -> Types.type_expr list -> string

    This function returns a string to represent the given list of types, with a given separator.

    val string_of_type_param_list : Type.t_type -> string

    This function returns a string to represent the list of type parameters for the given type.

    val string_of_type_extension_param_list : Extension.t_type_extension -> string

    This function returns a string to represent the list of type parameters for the given type extension.

    val string_of_class_type_param_list : Types.type_expr list -> string

    This function returns a string to represent the given list of type parameters of a class or class type, with a given separator.

    val string_of_module_type : - ?code:string -> - ?complete:bool -> +Odoc_info (ocaml.Odoc_info)

    Module Odoc_info

    Interface to the information collected in source files.

    type ref_kind = Odoc_types.ref_kind =
    1. | RK_module
    2. | RK_module_type
    3. | RK_class
    4. | RK_class_type
    5. | RK_value
    6. | RK_type
    7. | RK_extension
    8. | RK_exception
    9. | RK_attribute
    10. | RK_method
    11. | RK_section of text
    12. | RK_recfield
    13. | RK_const

    The different kinds of element references.

    and text_element = Odoc_types.text_element =
    1. | Raw of string
      (*

      Raw text.

      *)
    2. | Code of string
      (*

      The string is source code.

      *)
    3. | CodePre of string
      (*

      The string is pre-formatted source code.

      *)
    4. | Verbatim of string
      (*

      String 'as is'.

      *)
    5. | Bold of text
      (*

      Text in bold style.

      *)
    6. | Italic of text
      (*

      Text in italic.

      *)
    7. | Emphasize of text
      (*

      Emphasized text.

      *)
    8. | Center of text
      (*

      Centered text.

      *)
    9. | Left of text
      (*

      Left alignment.

      *)
    10. | Right of text
      (*

      Right alignment.

      *)
    11. | List of text list
      (*

      A list.

      *)
    12. | Enum of text list
      (*

      An enumerated list.

      *)
    13. | Newline
      (*

      To force a line break.

      *)
    14. | Block of text
      (*

      Like html's block quote.

      *)
    15. | Title of int * string option * text
      (*

      Style number, optional label, and text.

      *)
    16. | Latex of string
      (*

      A string for latex.

      *)
    17. | Ref of string * ref_kind option * text option
      (*

      A reference to an element. Complete name and kind. An optional text can be given to display this text instead of the element name.

      *)
    18. | Superscript of text
      (*

      Superscripts.

      *)
    19. | Subscript of text
      (*

      Subscripts.

      *)
    20. | Module_list of string list
      (*

      The table of the given modules with their abstract.

      *)
    21. | Index_list
      (*

      The links to the various indexes (values, types, ...)

      *)
    22. | Custom of string * text
      (*

      to extend {foo syntax

      *)
    23. | Target of string * string
      (*

      (target, code) : to specify code specific to a target format

      *)
    and text = text_element list

    A text is a list of text_element. The order matters.

    type see_ref = Odoc_types.see_ref =
    1. | See_url of string
    2. | See_file of string
    3. | See_doc of string

    The different forms of references in @see tags.

    exception Text_syntax of int * int * string

    Raised when parsing string to build a Odoc_info.text structure. (line, char, string)

    type see = see_ref * text

    The information in a @see tag.

    type param = string * text

    Parameter name and description.

    type raised_exception = string * text

    Raised exception name and description.

    type alert = Odoc_types.alert = {
    1. alert_name : string;
    2. alert_payload : string option;
    }
    type info = Odoc_types.info = {
    1. i_desc : text option;
      (*

      The description text.

      *)
    2. i_authors : string list;
      (*

      The list of authors in @author tags.

      *)
    3. i_version : string option;
      (*

      The string in the @version tag.

      *)
    4. i_sees : see list;
      (*

      The list of @see tags.

      *)
    5. i_since : string option;
      (*

      The string in the @since tag.

      *)
    6. i_before : (string * text) list;
      (*

      the version number and text in @before tag

      *)
    7. i_deprecated : text option;
      (*

      The description text of the @deprecated tag.

      *)
    8. i_params : param list;
      (*

      The list of parameter descriptions.

      *)
    9. i_raised_exceptions : raised_exception list;
      (*

      The list of raised exceptions.

      *)
    10. i_return_value : text option;
      (*

      The description text of the return value.

      *)
    11. i_custom : (string * text) list;
      (*

      A text associated to a custom @-tag.

      *)
    12. i_alerts : alert list;
      (*

      Alerts associated to the same item. Not from special comments.

      *)
    }

    Information in a special comment

    • before 3.12

      @before information was not present.

    type location = Odoc_types.location = {
    1. loc_impl : Location.t option;
      (*

      implementation location

      *)
    2. loc_inter : Location.t option;
      (*

      interface location

      *)
    }

    Location of elements in implementation and interface files.

    val dummy_loc : location

    A dummy location.

    module Name : sig ... end

    Representation of element names.

    module Parameter : sig ... end

    Representation and manipulation of method / function / class / module parameters.

    module Extension : sig ... end

    Representation and manipulation of extensions.

    module Exception : sig ... end

    Representation and manipulation of exceptions.

    module Type : sig ... end

    Representation and manipulation of types.

    module Value : sig ... end

    Representation and manipulation of values, class attributes and class methods.

    module Class : sig ... end

    Representation and manipulation of classes and class types.

    module Module : sig ... end

    Representation and manipulation of modules and module types.

    Getting strings from values

    val reset_type_names : unit -> unit

    This function is used to reset the names of type variables. It must be called when printing the whole type of a function, but not when printing the type of its parameters. Same for classes (call it) and methods and attributes (don't call it).

    val string_of_variance : Type.t_type -> Types.Variance.t -> string

    string_of_variance t variance returns the variance and injectivity annotation (e.g "+" for covariance, "-" for contravariance, "!-" for injectivity) if the type t is abstract.

    val string_of_type_expr : Types.type_expr -> string

    This function returns a string representing a Types.type_expr.

    val string_of_class_params : Class.t_class -> string
    • returns

      a string to display the parameters of the given class, in the same form as the compiler.

    val string_of_type_list : ?par:bool -> string -> Types.type_expr list -> string

    This function returns a string to represent the given list of types, with a given separator.

    val string_of_type_param_list : Type.t_type -> string

    This function returns a string to represent the list of type parameters for the given type.

    val string_of_type_extension_param_list : Extension.t_type_extension -> string

    This function returns a string to represent the list of type parameters for the given type extension.

    val string_of_class_type_param_list : Types.type_expr list -> string

    This function returns a string to represent the given list of type parameters of a class or class type, with a given separator.

    val string_of_module_type : + ?code:string -> + ?complete:bool -> Types.module_type -> - string

    This function returns a string representing a Types.module_type.

    • parameter complete

      indicates if we must print complete signatures or just sig end. Default is false.

    • parameter code

      if complete = false and the type contains something else than identificators and functors, then the given code is used.

    val string_of_class_type : ?complete:bool -> Types.class_type -> string

    This function returns a string representing a Types.class_type.

    • parameter complete

      indicates if we must print complete signatures or just object end. Default is false.

    val string_of_text : text -> string

    Get a string from a text.

    val string_of_info : info -> string

    Get a string from an info structure.

    val string_of_type : Type.t_type -> string
    • returns

      a string to describe the given type.

    val string_of_record : Type.record_field list -> string
    val string_of_type_extension : Extension.t_type_extension -> string
    • returns

      a string to describe the given type extension.

    val string_of_exception : Exception.t_exception -> string
    • returns

      a string to describe the given exception.

    val string_of_value : Value.t_value -> string
    • returns

      a string to describe the given value.

    val string_of_attribute : Value.t_attribute -> string
    • returns

      a string to describe the given attribute.

    val string_of_method : Value.t_method -> string
    • returns

      a string to describe the given method.

    Miscellaneous functions

    val first_sentence_of_text : text -> text

    Return the first sentence (until the first dot followed by a blank or the first blank line) of a text. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.

    val first_sentence_and_rest_of_text : text -> text * text

    Return the first sentence (until the first dot followed by a blank or the first blank line) of a text, and the remaining text after. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.

    val text_no_title_no_list : text -> text

    Return the given text without any title or list.

    val text_concat : Odoc_types.text -> Odoc_types.text list -> Odoc_types.text

    concat sep l concats the given list of text l, each separated with the text sep.

    val get_titles_in_text : text -> (int * string option * text) list

    Return the list of titles in a text. A title is a title level, an optional label and a text.

    val create_index_lists : 'a list -> ('a -> string) -> 'a list list

    Take a sorted list of elements, a function to get the name of an element and return the list of list of elements, where each list group elements beginning by the same letter. Since the original list is sorted, elements whose name does not begin with a letter should be in the first returned list.

    val remove_option : Types.type_expr -> Types.type_expr

    Take a type and remove the option top constructor. This is useful when printing labels, we then remove the top option constructor for optional labels.

    val is_optional : Asttypes.arg_label -> bool

    Return true if the given label is optional.

    val label_name : Asttypes.arg_label -> string

    Return the label name for the given label, i.e. removes the beginning '?' if present.

    val use_hidden_modules : Name.t -> Name.t

    Return the given name where the module name or part of it was removed, according to the list of modules which must be hidden (cf Odoc_args.hidden_modules)

    val verbose : string -> unit

    Print the given string if the verbose mode is activated.

    val warning : string -> unit

    Print a warning message to stderr. If warnings must be treated as errors, then the error counter is incremented.

    val print_warnings : bool ref

    A flag to indicate whether ocamldoc warnings must be printed or not.

    val errors : int ref

    Increment this counter when an error is encountered. The ocamldoc tool will print the number of errors encountered exit with code 1 if this number is greater than 0.

    val apply_opt : ('a -> 'b) -> 'a option -> 'b option

    Apply a function to an optional value.

    val apply_if_equal : ('a -> 'a) -> 'a -> 'a -> 'a

    Apply a function to a first value if it is not different from a second value. If the two values are different, return the second one.

    val text_of_string : string -> text

    text_of_string s returns the text structure from the given string.

    • raises Text_syntax

      if a syntax error is encountered.

    val text_string_of_text : text -> string

    text_string_of_text text returns the string representing the given text. This string can then be parsed again by Odoc_info.text_of_string.

    val info_of_string : string -> info

    info_of_string s parses the given string like a regular ocamldoc comment and return an Odoc_info.info structure.

    • returns

      an empty structure if there was a syntax error. TODO: change this

    val info_of_comment_file : Module.t_module list -> string -> info

    info_of_comment_file file parses the given file and return an Odoc_info.info structure. The content of the file must have the same syntax as the content of a special comment. The given module list is used for cross reference.

    • raises Failure

      if the file could not be opened or there is a syntax error.

    val remove_ending_newline : string -> string

    remove_ending_newline s returns s without the optional ending newline.

    Research in elements

    module Scan : sig ... end

    Scanning of collected information

    module Dep : sig ... end

    Computation of dependencies.

    Some global variables

    module Global : sig ... end
    val analyse_files : - ?merge_options:Odoc_types.merge_option list -> - ?include_dirs:string list -> - ?labels:bool -> - ?sort_modules:bool -> - ?no_stop:bool -> - ?init:Odoc_module.t_module list -> + string

    This function returns a string representing a Types.module_type.

    • parameter complete

      indicates if we must print complete signatures or just sig end. Default is false.

    • parameter code

      if complete = false and the type contains something else than identificators and functors, then the given code is used.

    val string_of_class_type : ?complete:bool -> Types.class_type -> string

    This function returns a string representing a Types.class_type.

    • parameter complete

      indicates if we must print complete signatures or just object end. Default is false.

    val string_of_text : text -> string

    Get a string from a text.

    val string_of_info : info -> string

    Get a string from an info structure.

    val string_of_type : Type.t_type -> string
    • returns

      a string to describe the given type.

    val string_of_record : Type.record_field list -> string
    val string_of_type_extension : Extension.t_type_extension -> string
    • returns

      a string to describe the given type extension.

    val string_of_exception : Exception.t_exception -> string
    • returns

      a string to describe the given exception.

    val string_of_value : Value.t_value -> string
    • returns

      a string to describe the given value.

    val string_of_attribute : Value.t_attribute -> string
    • returns

      a string to describe the given attribute.

    val string_of_method : Value.t_method -> string
    • returns

      a string to describe the given method.

    Miscellaneous functions

    val first_sentence_of_text : text -> text

    Return the first sentence (until the first dot followed by a blank or the first blank line) of a text. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.

    val first_sentence_and_rest_of_text : text -> text * text

    Return the first sentence (until the first dot followed by a blank or the first blank line) of a text, and the remaining text after. Don't stop in the middle of Code, CodePre, Verbatim, List, Enum, Latex, Link, Ref, Subscript or Superscript.

    val text_no_title_no_list : text -> text

    Return the given text without any title or list.

    val text_concat : Odoc_types.text -> Odoc_types.text list -> Odoc_types.text

    concat sep l concats the given list of text l, each separated with the text sep.

    val get_titles_in_text : text -> (int * string option * text) list

    Return the list of titles in a text. A title is a title level, an optional label and a text.

    val create_index_lists : 'a list -> ('a -> string) -> 'a list list

    Take a sorted list of elements, a function to get the name of an element and return the list of list of elements, where each list group elements beginning by the same letter. Since the original list is sorted, elements whose name does not begin with a letter should be in the first returned list.

    val remove_option : Types.type_expr -> Types.type_expr

    Take a type and remove the option top constructor. This is useful when printing labels, we then remove the top option constructor for optional labels.

    val is_optional : Asttypes.arg_label -> bool

    Return true if the given label is optional.

    val label_name : Asttypes.arg_label -> string

    Return the label name for the given label, i.e. removes the beginning '?' if present.

    val use_hidden_modules : Name.t -> Name.t

    Return the given name where the module name or part of it was removed, according to the list of modules which must be hidden (cf Odoc_args.hidden_modules)

    val verbose : string -> unit

    Print the given string if the verbose mode is activated.

    val warning : string -> unit

    Print a warning message to stderr. If warnings must be treated as errors, then the error counter is incremented.

    val print_warnings : bool ref

    A flag to indicate whether ocamldoc warnings must be printed or not.

    val errors : int ref

    Increment this counter when an error is encountered. The ocamldoc tool will print the number of errors encountered exit with code 1 if this number is greater than 0.

    val apply_opt : ('a -> 'b) -> 'a option -> 'b option

    Apply a function to an optional value.

    val apply_if_equal : ('a -> 'a) -> 'a -> 'a -> 'a

    Apply a function to a first value if it is not different from a second value. If the two values are different, return the second one.

    val text_of_string : string -> text

    text_of_string s returns the text structure from the given string.

    val text_string_of_text : text -> string

    text_string_of_text text returns the string representing the given text. This string can then be parsed again by Odoc_info.text_of_string.

    val info_of_string : string -> info

    info_of_string s parses the given string like a regular ocamldoc comment and return an Odoc_info.info structure.

    • returns

      an empty structure if there was a syntax error. TODO: change this

    val info_of_comment_file : Module.t_module list -> string -> info

    info_of_comment_file file parses the given file and return an Odoc_info.info structure. The content of the file must have the same syntax as the content of a special comment. The given module list is used for cross reference.

    • raises Failure

      if the file could not be opened or there is a syntax error.

    val remove_ending_newline : string -> string

    remove_ending_newline s returns s without the optional ending newline.

    Research in elements

    module Scan : sig ... end

    Scanning of collected information

    module Dep : sig ... end

    Computation of dependencies.

    Some global variables

    module Global : sig ... end
    val analyse_files : + ?merge_options:Odoc_types.merge_option list -> + ?include_dirs:string list -> + ?labels:bool -> + ?sort_modules:bool -> + ?no_stop:bool -> + ?init:Odoc_module.t_module list -> Odoc_global.source_file list -> - Module.t_module list

    Analysis of the given source files.

    • parameter init

      is the list of modules already known from a previous analysis.

    • returns

      the list of analysed top modules.

    val dump_modules : string -> Odoc_module.t_module list -> unit

    Dump of a list of modules into a file.

    • raises Failure

      if an error occurs.

    val load_modules : string -> Odoc_module.t_module list

    Load of a list of modules from a file.

    • raises Failure

      if an error occurs.

    \ No newline at end of file + Module.t_module list

    Analysis of the given source files.

    • parameter init

      is the list of modules already known from a previous analysis.

    • returns

      the list of analysed top modules.

    val dump_modules : string -> Odoc_module.t_module list -> unit

    Dump of a list of modules into a file.

    • raises Failure

      if an error occurs.

    val load_modules : string -> Odoc_module.t_module list

    Load of a list of modules from a file.

    • raises Failure

      if an error occurs.

    diff --git a/ocaml/Odoc_latex/Generator/class-latex/index.html b/ocaml/Odoc_latex/Generator/class-latex/index.html index 9947233..eee2bcb 100644 --- a/ocaml/Odoc_latex/Generator/class-latex/index.html +++ b/ocaml/Odoc_latex/Generator/class-latex/index.html @@ -1,7 +1,7 @@ -latex (ocaml.Odoc_latex.Generator.latex)

    Class Generator.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> +latex (ocaml.Odoc_latex.Generator.latex)

    Class Generator.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> Odoc_info.info option -> - Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> + Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> Odoc_info.text * Odoc_info.text
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_class_inheritance_info : Format.formatter -> Odoc_info.Class.t_class -> unit
    method generate_class_type_inheritance_info : Format.formatter -> @@ -10,7 +10,7 @@ Odoc_info.Module.t_module -> unit
    method generate_inheritance_info : Format.formatter -> Odoc_info.Class.inherited_class list -> - unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> + unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> Odoc_info.Class.t_class -> unit
    method latex_for_class_label : Format.formatter -> Odoc_info.Class.t_class -> @@ -33,8 +33,8 @@ Odoc_info.ref_kind option -> Odoc_info.text option -> unit
    method latex_of_Right : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Subscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Superscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Target : Format.formatter -> - target:string -> - code:string -> + target:string -> + code:string -> unit
    method latex_of_Title : Format.formatter -> int -> Odoc_info.Name.t option -> @@ -66,7 +66,7 @@ unit
    method latex_of_included_module : Format.formatter -> Odoc_info.Module.included_module -> unit
    method latex_of_info : Format.formatter -> - ?block:bool -> + ?block:bool -> Odoc_info.info option -> unit
    method latex_of_method : Format.formatter -> Odoc_info.Value.t_method -> unit
    method latex_of_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method latex_of_module_element : Format.formatter -> Odoc_info.Name.t -> @@ -93,21 +93,21 @@ unit
    method latex_of_type_params : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Type.t_type -> - unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> - string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> + string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> Odoc_info.text_element list
    method text_of_author_list : string list -> Odoc_info.text_element list
    method text_of_before : (string * Odoc_info.text) list -> Odoc_info.text_element list
    method text_of_class_kind : Odoc_info.Name.t -> Odoc_info.Class.class_kind -> @@ -118,12 +118,12 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -137,4 +137,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    diff --git a/ocaml/Odoc_latex/Generator/index.html b/ocaml/Odoc_latex/Generator/index.html index ffa272a..af80e32 100644 --- a/ocaml/Odoc_latex/Generator/index.html +++ b/ocaml/Odoc_latex/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_latex.Generator)

    Module Odoc_latex.Generator

    class latex : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_latex.Generator)

    Module Odoc_latex.Generator

    class latex : object ... end
    diff --git a/ocaml/Odoc_latex/index.html b/ocaml/Odoc_latex/index.html index 1524266..a5b046f 100644 --- a/ocaml/Odoc_latex/index.html +++ b/ocaml/Odoc_latex/index.html @@ -1,2 +1,2 @@ -Odoc_latex (ocaml.Odoc_latex)

    Module Odoc_latex

    Generation of LaTeX documentation.

    val separate_files : bool ref
    val latex_titles : (int * string) list ref
    val latex_value_prefix : string ref
    val latex_type_prefix : string ref
    val latex_type_elt_prefix : string ref
    val latex_extension_prefix : string ref
    val latex_exception_prefix : string ref
    val latex_module_prefix : string ref
    val latex_module_type_prefix : string ref
    val latex_class_prefix : string ref
    val latex_class_type_prefix : string ref
    val latex_attribute_prefix : string ref
    val latex_method_prefix : string ref
    module Generator : sig ... end
    module type Latex_generator = sig ... end
    \ No newline at end of file +Odoc_latex (ocaml.Odoc_latex)

    Module Odoc_latex

    Generation of LaTeX documentation.

    val separate_files : bool ref
    val latex_titles : (int * string) list ref
    val latex_value_prefix : string ref
    val latex_type_prefix : string ref
    val latex_type_elt_prefix : string ref
    val latex_extension_prefix : string ref
    val latex_exception_prefix : string ref
    val latex_module_prefix : string ref
    val latex_module_type_prefix : string ref
    val latex_class_prefix : string ref
    val latex_class_type_prefix : string ref
    val latex_attribute_prefix : string ref
    val latex_method_prefix : string ref
    module Generator : sig ... end
    module type Latex_generator = sig ... end
    diff --git a/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html b/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html index f3e51fd..94588e3 100644 --- a/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html +++ b/ocaml/Odoc_latex/module-type-Latex_generator/class-latex/index.html @@ -1,7 +1,7 @@ -latex (ocaml.Odoc_latex.Latex_generator.latex)

    Class Latex_generator.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> +latex (ocaml.Odoc_latex.Latex_generator.latex)

    Class Latex_generator.latex

    val subst_strings : (Str.regexp * string) list
    val subst_strings_code : (Str.regexp * string) list
    val subst_strings_simple : (Str.regexp * string) list
    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method attribute_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_label : ?no_:bool -> Odoc_info.Name.t -> string
    method class_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method const_label : ?no_:bool -> Odoc_info.Name.t -> string
    method entry_comment : (Format.formatter * (unit -> string)) -> Odoc_info.info option -> - Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> + Odoc_info.text_element list
    method escape : string -> string
    method escape_code : string -> string
    method escape_simple : string -> string
    method exception_label : ?no_:bool -> Odoc_info.Name.t -> string
    method extension_label : ?no_:bool -> Odoc_info.Name.t -> string
    method first_and_rest_of_info : Odoc_info.info option -> Odoc_info.text * Odoc_info.text
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_class_inheritance_info : Format.formatter -> Odoc_info.Class.t_class -> unit
    method generate_class_type_inheritance_info : Format.formatter -> @@ -10,7 +10,7 @@ Odoc_info.Module.t_module -> unit
    method generate_inheritance_info : Format.formatter -> Odoc_info.Class.inherited_class list -> - unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> + unit
    method generate_style_file : unit
    method label : ?no_:bool -> Odoc_info.Name.t -> string
    method latex_for_class_index : Format.formatter -> Odoc_info.Class.t_class -> unit
    method latex_for_class_label : Format.formatter -> Odoc_info.Class.t_class -> @@ -33,8 +33,8 @@ Odoc_info.ref_kind option -> Odoc_info.text option -> unit
    method latex_of_Right : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Subscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Superscript : Format.formatter -> Odoc_info.text -> unit
    method latex_of_Target : Format.formatter -> - target:string -> - code:string -> + target:string -> + code:string -> unit
    method latex_of_Title : Format.formatter -> int -> Odoc_info.Name.t option -> @@ -66,7 +66,7 @@ unit
    method latex_of_included_module : Format.formatter -> Odoc_info.Module.included_module -> unit
    method latex_of_info : Format.formatter -> - ?block:bool -> + ?block:bool -> Odoc_info.info option -> unit
    method latex_of_method : Format.formatter -> Odoc_info.Value.t_method -> unit
    method latex_of_module : Format.formatter -> Odoc_info.Module.t_module -> unit
    method latex_of_module_element : Format.formatter -> Odoc_info.Name.t -> @@ -93,21 +93,21 @@ unit
    method latex_of_type_params : Format.formatter -> Odoc_info.Name.t -> Odoc_info.Type.t_type -> - unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method latex_of_value : Format.formatter -> Odoc_info.Value.t_value -> unit
    method make_label : string -> string
    method make_ref : string -> string
    method method_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_label : ?no_:bool -> Odoc_info.Name.t -> string
    method module_type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> - string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> + string
    method recfield_label : ?no_:bool -> Odoc_info.Name.t -> string
    method relative_idents : Odoc_info.Name.t -> string -> string
    method relative_module_idents : Odoc_info.Name.t -> string -> string
    method section_style : int -> string -> string
    method subst : (Str.regexp * string) list -> string -> string
    method text_of_alerts : Odoc_info.alert list -> Odoc_info.text_element list
    method text_of_attribute : Odoc_info.Value.t_attribute -> Odoc_info.text_element list
    method text_of_author_list : string list -> Odoc_info.text_element list
    method text_of_before : (string * Odoc_info.text) list -> Odoc_info.text_element list
    method text_of_class_kind : Odoc_info.Name.t -> Odoc_info.Class.class_kind -> @@ -118,12 +118,12 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> Odoc_info.text
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -137,4 +137,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    method type_label : ?no_:bool -> Odoc_info.Name.t -> string
    method value_label : ?no_:bool -> Odoc_info.Name.t -> string
    diff --git a/ocaml/Odoc_latex/module-type-Latex_generator/index.html b/ocaml/Odoc_latex/module-type-Latex_generator/index.html index 3900415..ad8bf93 100644 --- a/ocaml/Odoc_latex/module-type-Latex_generator/index.html +++ b/ocaml/Odoc_latex/module-type-Latex_generator/index.html @@ -1,2 +1,2 @@ -Latex_generator (ocaml.Odoc_latex.Latex_generator)

    Module type Odoc_latex.Latex_generator

    class latex : object ... end
    \ No newline at end of file +Latex_generator (ocaml.Odoc_latex.Latex_generator)

    Module type Odoc_latex.Latex_generator

    class latex : object ... end
    diff --git a/ocaml/Odoc_latex_style/index.html b/ocaml/Odoc_latex_style/index.html index 0beb886..be1ff52 100644 --- a/ocaml/Odoc_latex_style/index.html +++ b/ocaml/Odoc_latex_style/index.html @@ -1,2 +1,2 @@ -Odoc_latex_style (ocaml.Odoc_latex_style)

    Module Odoc_latex_style

    The content of the LaTeX style to generate when generating LaTeX code.

    val content : string
    \ No newline at end of file +Odoc_latex_style (ocaml.Odoc_latex_style)

    Module Odoc_latex_style

    The content of the LaTeX style to generate when generating LaTeX code.

    val content : string
    diff --git a/ocaml/Odoc_lexer/index.html b/ocaml/Odoc_lexer/index.html index b75c102..e2b0f8c 100644 --- a/ocaml/Odoc_lexer/index.html +++ b/ocaml/Odoc_lexer/index.html @@ -1,2 +1,2 @@ -Odoc_lexer (ocaml.Odoc_lexer)

    Module Odoc_lexer

    val line_number : int ref
    val comments_level : int ref
    \ No newline at end of file +Odoc_lexer (ocaml.Odoc_lexer)

    Module Odoc_lexer

    val line_number : int ref
    val comments_level : int ref
    diff --git a/ocaml/Odoc_man/Generator/class-man/index.html b/ocaml/Odoc_man/Generator/class-man/index.html index 9b319ee..44af1be 100644 --- a/ocaml/Odoc_man/Generator/class-man/index.html +++ b/ocaml/Odoc_man/Generator/class-man/index.html @@ -1,13 +1,13 @@ -man (ocaml.Odoc_man.Generator.man)

    Class Generator.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> +man (ocaml.Odoc_man.Generator.man)

    Class Generator.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> Odoc_info.Module.t_module list -> - Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> + Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.class_type -> unit
    method man_of_code : Buffer.t -> string -> unit
    method man_of_const : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Type.variant_constructor -> - unit
    method man_of_cstr_args : ?par:bool -> + unit
    method man_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> string -> @@ -15,7 +15,7 @@ unit
    method man_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method man_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method man_of_included_module : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.included_module -> - unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> + unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> Odoc_info.Name.t -> (Odoc_info.Module.module_parameter * Odoc_info.text option) list -> unit
    method man_of_module_type : Buffer.t -> @@ -43,4 +43,4 @@ unit
    method man_of_type_extension : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Extension.t_type_extension -> - unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    \ No newline at end of file + unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    diff --git a/ocaml/Odoc_man/Generator/index.html b/ocaml/Odoc_man/Generator/index.html index c6692b8..8daf2bd 100644 --- a/ocaml/Odoc_man/Generator/index.html +++ b/ocaml/Odoc_man/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_man.Generator)

    Module Odoc_man.Generator

    class man : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_man.Generator)

    Module Odoc_man.Generator

    class man : object ... end
    diff --git a/ocaml/Odoc_man/index.html b/ocaml/Odoc_man/index.html index 7d5eaf1..4e2d4c6 100644 --- a/ocaml/Odoc_man/index.html +++ b/ocaml/Odoc_man/index.html @@ -1,2 +1,2 @@ -Odoc_man (ocaml.Odoc_man)

    Module Odoc_man

    The man pages generator.

    val man_suffix : string ref
    val man_section : string ref
    val man_mini : bool ref
    module Generator : sig ... end
    module type Man_generator = sig ... end
    \ No newline at end of file +Odoc_man (ocaml.Odoc_man)

    Module Odoc_man

    The man pages generator.

    val man_suffix : string ref
    val man_section : string ref
    val man_mini : bool ref
    module Generator : sig ... end
    module type Man_generator = sig ... end
    diff --git a/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html b/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html index e191355..e2c1d4d 100644 --- a/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html +++ b/ocaml/Odoc_man/module-type-Man_generator/class-man/index.html @@ -1,13 +1,13 @@ -man (ocaml.Odoc_man.Man_generator.man)

    Class Man_generator.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> +man (ocaml.Odoc_man.Man_generator.man)

    Class Man_generator.man

    val mutable tag_functions : (string * (Odoc_info.text -> string)) list
    method create_groups : bool -> Odoc_info.Module.t_module list -> - Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> + Odoc_info.Search.result_element list list
    method escape : string -> string
    method field_comment : Buffer.t -> Odoc_info.info option -> unit
    method file_name : Odoc_info.Name.t -> string
    method generate : Odoc_info.Module.t_module list -> unit
    method generate_for_class : Odoc_info.Class.t_class -> unit
    method generate_for_class_type : Odoc_info.Class.t_class_type -> unit
    method generate_for_group : Odoc_info.Search.result_element list -> unit
    method generate_for_module : Odoc_info.Module.t_module -> unit
    method generate_for_module_type : Odoc_info.Module.t_module_type -> unit
    method man_of_Target : Buffer.t -> target:string -> code:string -> unit
    method man_of_attribute : Buffer.t -> Odoc_info.Value.t_attribute -> unit
    method man_of_class : Buffer.t -> Odoc_info.Class.t_class -> unit
    method man_of_class_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_class_type : Buffer.t -> Odoc_info.Class.t_class_type -> unit
    method man_of_class_type_expr : Buffer.t -> Odoc_info.Name.t -> Types.class_type -> unit
    method man_of_code : Buffer.t -> string -> unit
    method man_of_const : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Type.variant_constructor -> - unit
    method man_of_cstr_args : ?par:bool -> + unit
    method man_of_cstr_args : ?par:bool -> Buffer.t -> Odoc_info.Name.t -> string -> @@ -15,7 +15,7 @@ unit
    method man_of_custom_text : Buffer.t -> string -> Odoc_info.text -> unit
    method man_of_exception : Buffer.t -> Odoc_info.Exception.t_exception -> unit
    method man_of_included_module : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Module.included_module -> - unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> + unit
    method man_of_info : ?margin:int -> Buffer.t -> Odoc_types.info option -> unit
    method man_of_method : Buffer.t -> Odoc_info.Value.t_method -> unit
    method man_of_modtype : Buffer.t -> Odoc_info.Module.t_module_type -> unit
    method man_of_module : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_body : Buffer.t -> Odoc_info.Module.t_module -> unit
    method man_of_module_comment : Buffer.t -> Odoc_info.text -> unit
    method man_of_module_parameter_list : Buffer.t -> Odoc_info.Name.t -> (Odoc_info.Module.module_parameter * Odoc_info.text option) list -> unit
    method man_of_module_type : Buffer.t -> @@ -43,4 +43,4 @@ unit
    method man_of_type_extension : Buffer.t -> Odoc_info.Name.t -> Odoc_info.Extension.t_type_extension -> - unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    \ No newline at end of file + unit
    method man_of_value : Buffer.t -> Odoc_info.Value.t_value -> unit
    method open_out : string -> out_channel
    method relative_idents : Odoc_info.Name.t -> Odoc_info.Name.t -> string
    method remove_newlines : string -> string
    method str_man_of_alerts : Odoc_info.alert list -> string list
    method str_man_of_author_list : string list -> string
    method str_man_of_before : (string * Odoc_info.text) list -> string
    method str_man_of_custom : (string * Odoc_info.text) list -> string list
    method str_man_of_raised_exceptions : (string * Odoc_info.text) list -> string
    method str_man_of_return_opt : Odoc_info.text option -> string
    method str_man_of_see : (Odoc_info.see_ref * Odoc_info.text) -> string
    method str_man_of_sees : (Odoc_info.see_ref * Odoc_info.text) list -> string
    method str_man_of_since_opt : string option -> string
    method str_man_of_text : Odoc_info.text -> string
    method str_man_of_version_opt : string option -> string
    diff --git a/ocaml/Odoc_man/module-type-Man_generator/index.html b/ocaml/Odoc_man/module-type-Man_generator/index.html index b7b0d72..c5398c5 100644 --- a/ocaml/Odoc_man/module-type-Man_generator/index.html +++ b/ocaml/Odoc_man/module-type-Man_generator/index.html @@ -1,2 +1,2 @@ -Man_generator (ocaml.Odoc_man.Man_generator)

    Module type Odoc_man.Man_generator

    class man : object ... end
    \ No newline at end of file +Man_generator (ocaml.Odoc_man.Man_generator)

    Module type Odoc_man.Man_generator

    class man : object ... end
    diff --git a/ocaml/Odoc_merge/index.html b/ocaml/Odoc_merge/index.html index 93e60e5..1813b7c 100644 --- a/ocaml/Odoc_merge/index.html +++ b/ocaml/Odoc_merge/index.html @@ -1,5 +1,5 @@ -Odoc_merge (ocaml.Odoc_merge)

    Module Odoc_merge

    val merge_before_tags : +Odoc_merge (ocaml.Odoc_merge)

    Module Odoc_merge

    val merge_before_tags : (string * Odoc_types.text) list -> (string * Odoc_types.text) list
    val merge_info_opt : Odoc_types.merge_option list -> @@ -8,4 +8,4 @@ Odoc_types.info option
    \ No newline at end of file + Odoc_module.t_module list
    diff --git a/ocaml/Odoc_messages/index.html b/ocaml/Odoc_messages/index.html index 588921f..c6e0cf2 100644 --- a/ocaml/Odoc_messages/index.html +++ b/ocaml/Odoc_messages/index.html @@ -1,2 +1,2 @@ -Odoc_messages (ocaml.Odoc_messages)

    Module Odoc_messages

    The messages of the application.

    val ok : string
    val software : string
    val config_version : string
    val magic : string
    val usage : string
    val options_are : string
    val latex_only : string
    val texi_only : string
    val latex_texi_only : string
    val html_only : string
    val html_latex_only : string
    val html_latex_texi_only : string
    val man_only : string
    val option_impl : string
    val option_intf : string
    val option_text : string
    val display_custom_generators_dir : string
    val add_load_dir : string
    val load_file : string
    val werr : string
    val show_missed_crossref : string
    val hide_warnings : string
    val target_dir : string
    val dump : string
    val load : string
    val css_style : string
    val index_only : string
    val colorize_code : string
    val html_short_functors : string
    val charset : string -> string
    val no_navbar : string
    val generate_html : string
    val generate_latex : string
    val generate_texinfo : string
    val generate_man : string
    val generate_dot : string
    val option_not_in_native_code : string -> string
    val default_out_file : string
    val out_file : string
    val dot_include_all : string
    val dot_types : string
    val default_dot_colors : string list list
    val dot_colors : string
    val dot_reduce : string
    val man_mini : string
    val default_man_section : string
    val man_section : string
    val default_man_suffix : string
    val man_suffix : string
    val option_title : string
    val option_intro : string
    val with_parameter_list : string
    val hide_modules : string
    val no_header : string
    val no_trailer : string
    val separate_files : string
    val latex_title : (int * string) list ref -> string
    val default_latex_value_prefix : string
    val latex_value_prefix : string
    val default_latex_type_prefix : string
    val latex_type_prefix : string
    val default_latex_type_elt_prefix : string
    val latex_type_elt_prefix : string
    val default_latex_extension_prefix : string
    val latex_extension_prefix : string
    val default_latex_exception_prefix : string
    val latex_exception_prefix : string
    val default_latex_module_prefix : string
    val latex_module_prefix : string
    val default_latex_module_type_prefix : string
    val latex_module_type_prefix : string
    val default_latex_class_prefix : string
    val latex_class_prefix : string
    val default_latex_class_type_prefix : string
    val latex_class_type_prefix : string
    val default_latex_attribute_prefix : string
    val latex_attribute_prefix : string
    val default_latex_method_prefix : string
    val latex_method_prefix : string
    val no_toc : string
    val sort_modules : string
    val no_stop : string
    val no_custom_tags : string
    val remove_stars : string
    val keep_code : string
    val inverse_merge_ml_mli : string
    val no_filter_with_module_constraints : string
    val merge_description : char * string
    val merge_author : char * string
    val merge_version : char * string
    val merge_see : char * string
    val merge_since : char * string
    val merge_before : char * string
    val merge_deprecated : char * string
    val merge_param : char * string
    val merge_raised_exception : char * string
    val merge_return_value : char * string
    val merge_custom : char * string
    val merge_all : char * string
    val no_index : string
    val esc_8bits : string
    val texinfo_title : (int * (string * string)) list ref -> string
    val info_section : string
    val info_entry : string
    val options_can_be : string
    val string_of_options_list : (char * string) list -> string
    val merge_options : string
    val initially_opened_module : string
    val library_namespace : string
    val help : string
    val warning : string
    val error_location : string -> int -> int -> string
    val bad_magic_number : string
    val not_a_module_name : string -> string
    val load_file_error : string -> string -> string
    val wrong_format : string -> string
    val errors_occured : int -> string
    val parse_error : string
    val text_parse_error : int -> int -> string -> string
    val file_not_found_in_paths : string list -> string -> string
    val tag_not_handled : string -> string
    val should_escape_at_sign : string
    val bad_tree : string
    val not_a_valid_tag : string -> string
    val fun_without_param : string -> string
    val method_without_param : string -> string
    val anonymous_parameters : string -> string
    val function_colon : string -> string
    val implicit_match_in_parameter : string
    val unknown_extension : string -> string
    val two_implementations : string -> string
    val two_interfaces : string -> string
    val too_many_module_objects : string -> string
    val extension_not_found_in_implementation : string -> string -> string
    val exception_not_found_in_implementation : string -> string -> string
    val type_not_found_in_implementation : string -> string -> string
    val module_not_found_in_implementation : string -> string -> string
    val value_not_found_in_implementation : string -> string -> string
    val class_not_found_in_implementation : string -> string -> string
    val attribute_not_found_in_implementation : string -> string -> string
    val method_not_found_in_implementation : string -> string -> string
    val different_types : string -> string
    val attribute_type_not_found : string -> string -> string
    val method_type_not_found : string -> string -> string
    val module_not_found : string -> string -> string
    val module_type_not_found : string -> string -> string
    val value_not_found : string -> string -> string
    val extension_not_found : string -> string -> string
    val exception_not_found : string -> string -> string
    val type_not_found : string -> string -> string
    val class_not_found : string -> string -> string
    val class_type_not_found : string -> string -> string
    val type_not_found_in_typedtree : string -> string
    val extension_not_found_in_typedtree : string -> string
    val exception_not_found_in_typedtree : string -> string
    val module_type_not_found_in_typedtree : string -> string
    val module_not_found_in_typedtree : string -> string
    val class_not_found_in_typedtree : string -> string
    val class_type_not_found_in_typedtree : string -> string
    val inherit_classexp_not_found_in_typedtree : int -> string
    val attribute_not_found_in_typedtree : string -> string
    val method_not_found_in_typedtree : string -> string
    val misplaced_comment : string -> int -> string
    val cross_module_not_found : string -> string
    val cross_module_type_not_found : string -> string
    val cross_module_or_module_type_not_found : string -> string
    val cross_class_not_found : string -> string
    val cross_class_type_not_found : string -> string
    val cross_class_or_class_type_not_found : string -> string
    val cross_extension_not_found : string -> string
    val cross_exception_not_found : string -> string
    val cross_element_not_found : string -> string
    val cross_method_not_found : string -> string
    val cross_attribute_not_found : string -> string
    val cross_section_not_found : string -> string
    val cross_value_not_found : string -> string
    val cross_type_not_found : string -> string
    val cross_recfield_not_found : string -> string
    val cross_const_not_found : string -> string
    val code_could_be_cross_reference : string -> string -> string
    val object_end : string
    val struct_end : string
    val sig_end : string
    val current_generator_is_not : string -> string
    val analysing : string -> string
    val merging : string
    val cross_referencing : string
    val generating_doc : string
    val loading : string -> string
    val file_generated : string -> string
    val file_exists_dont_generate : string -> string
    val modul : string
    val modules : string
    val functors : string
    val values : string
    val types : string
    val extensions : string
    val exceptions : string
    val record : string
    val variant : string
    val mutab : string
    val functions : string
    val parameters : string
    val abstract : string
    val functo : string
    val clas : string
    val classes : string
    val attributes : string
    val methods : string
    val authors : string
    val version : string
    val since : string
    val before : string
    val deprecated : string
    val alert : string
    val raises : string
    val returns : string
    val inherits : string
    val inheritance : string
    val privat : string
    val module_type : string
    val class_type : string
    val description : string
    val interface : string
    val type_parameters : string
    val class_types : string
    val module_types : string
    val see_also : string
    val documentation : string
    val index_of : string
    val top : string
    val index_of_values : string
    val index_of_extensions : string
    val index_of_exceptions : string
    val index_of_types : string
    val index_of_attributes : string
    val index_of_methods : string
    val index_of_classes : string
    val index_of_class_types : string
    val index_of_modules : string
    val index_of_module_types : string
    val previous : string
    val next : string
    val up : string
    \ No newline at end of file +Odoc_messages (ocaml.Odoc_messages)

    Module Odoc_messages

    The messages of the application.

    val ok : string
    val software : string
    val config_version : string
    val magic : string
    val usage : string
    val options_are : string
    val latex_only : string
    val texi_only : string
    val latex_texi_only : string
    val html_only : string
    val html_latex_only : string
    val html_latex_texi_only : string
    val man_only : string
    val option_impl : string
    val option_intf : string
    val option_text : string
    val display_custom_generators_dir : string
    val add_load_dir : string
    val load_file : string
    val werr : string
    val show_missed_crossref : string
    val hide_warnings : string
    val target_dir : string
    val dump : string
    val load : string
    val css_style : string
    val index_only : string
    val colorize_code : string
    val html_short_functors : string
    val charset : string -> string
    val no_navbar : string
    val generate_html : string
    val generate_latex : string
    val generate_texinfo : string
    val generate_man : string
    val generate_dot : string
    val option_not_in_native_code : string -> string
    val default_out_file : string
    val out_file : string
    val dot_include_all : string
    val dot_types : string
    val default_dot_colors : string list list
    val dot_colors : string
    val dot_reduce : string
    val man_mini : string
    val default_man_section : string
    val man_section : string
    val default_man_suffix : string
    val man_suffix : string
    val option_title : string
    val option_intro : string
    val with_parameter_list : string
    val hide_modules : string
    val no_header : string
    val no_trailer : string
    val separate_files : string
    val latex_title : (int * string) list ref -> string
    val default_latex_value_prefix : string
    val latex_value_prefix : string
    val default_latex_type_prefix : string
    val latex_type_prefix : string
    val default_latex_type_elt_prefix : string
    val latex_type_elt_prefix : string
    val default_latex_extension_prefix : string
    val latex_extension_prefix : string
    val default_latex_exception_prefix : string
    val latex_exception_prefix : string
    val default_latex_module_prefix : string
    val latex_module_prefix : string
    val default_latex_module_type_prefix : string
    val latex_module_type_prefix : string
    val default_latex_class_prefix : string
    val latex_class_prefix : string
    val default_latex_class_type_prefix : string
    val latex_class_type_prefix : string
    val default_latex_attribute_prefix : string
    val latex_attribute_prefix : string
    val default_latex_method_prefix : string
    val latex_method_prefix : string
    val no_toc : string
    val sort_modules : string
    val no_stop : string
    val no_custom_tags : string
    val remove_stars : string
    val keep_code : string
    val inverse_merge_ml_mli : string
    val no_filter_with_module_constraints : string
    val merge_description : char * string
    val merge_author : char * string
    val merge_version : char * string
    val merge_see : char * string
    val merge_since : char * string
    val merge_before : char * string
    val merge_deprecated : char * string
    val merge_param : char * string
    val merge_raised_exception : char * string
    val merge_return_value : char * string
    val merge_custom : char * string
    val merge_all : char * string
    val no_index : string
    val esc_8bits : string
    val texinfo_title : (int * (string * string)) list ref -> string
    val info_section : string
    val info_entry : string
    val options_can_be : string
    val string_of_options_list : (char * string) list -> string
    val merge_options : string
    val initially_opened_module : string
    val library_namespace : string
    val help : string
    val warning : string
    val error_location : string -> int -> int -> string
    val bad_magic_number : string
    val not_a_module_name : string -> string
    val load_file_error : string -> string -> string
    val wrong_format : string -> string
    val errors_occured : int -> string
    val parse_error : string
    val text_parse_error : int -> int -> string -> string
    val file_not_found_in_paths : string list -> string -> string
    val tag_not_handled : string -> string
    val should_escape_at_sign : string
    val bad_tree : string
    val not_a_valid_tag : string -> string
    val fun_without_param : string -> string
    val method_without_param : string -> string
    val anonymous_parameters : string -> string
    val function_colon : string -> string
    val implicit_match_in_parameter : string
    val unknown_extension : string -> string
    val two_implementations : string -> string
    val two_interfaces : string -> string
    val too_many_module_objects : string -> string
    val extension_not_found_in_implementation : string -> string -> string
    val exception_not_found_in_implementation : string -> string -> string
    val type_not_found_in_implementation : string -> string -> string
    val module_not_found_in_implementation : string -> string -> string
    val value_not_found_in_implementation : string -> string -> string
    val class_not_found_in_implementation : string -> string -> string
    val attribute_not_found_in_implementation : string -> string -> string
    val method_not_found_in_implementation : string -> string -> string
    val different_types : string -> string
    val attribute_type_not_found : string -> string -> string
    val method_type_not_found : string -> string -> string
    val module_not_found : string -> string -> string
    val module_type_not_found : string -> string -> string
    val value_not_found : string -> string -> string
    val extension_not_found : string -> string -> string
    val exception_not_found : string -> string -> string
    val type_not_found : string -> string -> string
    val class_not_found : string -> string -> string
    val class_type_not_found : string -> string -> string
    val type_not_found_in_typedtree : string -> string
    val extension_not_found_in_typedtree : string -> string
    val exception_not_found_in_typedtree : string -> string
    val module_type_not_found_in_typedtree : string -> string
    val module_not_found_in_typedtree : string -> string
    val class_not_found_in_typedtree : string -> string
    val class_type_not_found_in_typedtree : string -> string
    val inherit_classexp_not_found_in_typedtree : int -> string
    val attribute_not_found_in_typedtree : string -> string
    val method_not_found_in_typedtree : string -> string
    val misplaced_comment : string -> int -> string
    val cross_module_not_found : string -> string
    val cross_module_type_not_found : string -> string
    val cross_module_or_module_type_not_found : string -> string
    val cross_class_not_found : string -> string
    val cross_class_type_not_found : string -> string
    val cross_class_or_class_type_not_found : string -> string
    val cross_extension_not_found : string -> string
    val cross_exception_not_found : string -> string
    val cross_element_not_found : string -> string
    val cross_method_not_found : string -> string
    val cross_attribute_not_found : string -> string
    val cross_section_not_found : string -> string
    val cross_value_not_found : string -> string
    val cross_type_not_found : string -> string
    val cross_recfield_not_found : string -> string
    val cross_const_not_found : string -> string
    val code_could_be_cross_reference : string -> string -> string
    val object_end : string
    val struct_end : string
    val sig_end : string
    val current_generator_is_not : string -> string
    val analysing : string -> string
    val merging : string
    val cross_referencing : string
    val generating_doc : string
    val loading : string -> string
    val file_generated : string -> string
    val file_exists_dont_generate : string -> string
    val modul : string
    val modules : string
    val functors : string
    val values : string
    val types : string
    val extensions : string
    val exceptions : string
    val record : string
    val variant : string
    val mutab : string
    val functions : string
    val parameters : string
    val abstract : string
    val functo : string
    val clas : string
    val classes : string
    val attributes : string
    val methods : string
    val authors : string
    val version : string
    val since : string
    val before : string
    val deprecated : string
    val alert : string
    val raises : string
    val returns : string
    val inherits : string
    val inheritance : string
    val privat : string
    val module_type : string
    val class_type : string
    val description : string
    val interface : string
    val type_parameters : string
    val class_types : string
    val module_types : string
    val see_also : string
    val documentation : string
    val index_of : string
    val top : string
    val index_of_values : string
    val index_of_extensions : string
    val index_of_exceptions : string
    val index_of_types : string
    val index_of_attributes : string
    val index_of_methods : string
    val index_of_classes : string
    val index_of_class_types : string
    val index_of_modules : string
    val index_of_module_types : string
    val previous : string
    val next : string
    val up : string
    diff --git a/ocaml/Odoc_misc/index.html b/ocaml/Odoc_misc/index.html index 1d770d7..266b9cb 100644 --- a/ocaml/Odoc_misc/index.html +++ b/ocaml/Odoc_misc/index.html @@ -1,6 +1,6 @@ -Odoc_misc (ocaml.Odoc_misc)

    Module Odoc_misc

    val no_blanks : string -> string
    val input_file_as_string : string -> string
    val split_with_blanks : string -> string list
    val string_of_longident : Longident.t -> string
    val string_of_text : Odoc_types.text -> string
    val string_of_author_list : string list -> string
    val string_of_version_opt : string option -> string
    val string_of_since_opt : string option -> string
    val string_of_raised_exceptions : (string * Odoc_types.text) list -> string
    val string_of_see : (Odoc_types.see_ref * Odoc_types.text) -> string
    val string_of_sees : (Odoc_types.see_ref * Odoc_types.text) list -> string
    val string_of_return_opt : Odoc_types.text option -> string
    val string_of_info : Odoc_types.info -> string
    val apply_opt : ('a -> 'b) -> 'a option -> 'b option
    val string_of_date : ?absolute:bool -> ?hour:bool -> float -> string
    val current_date : string
    val first_sentence_of_text : Odoc_types.text -> Odoc_types.text
    val first_sentence_and_rest_of_text : +Odoc_misc (ocaml.Odoc_misc)

    Module Odoc_misc

    val no_blanks : string -> string
    val input_file_as_string : string -> string
    val split_with_blanks : string -> string list
    val string_of_longident : Longident.t -> string
    val string_of_text : Odoc_types.text -> string
    val string_of_author_list : string list -> string
    val string_of_version_opt : string option -> string
    val string_of_since_opt : string option -> string
    val string_of_raised_exceptions : (string * Odoc_types.text) list -> string
    val string_of_see : (Odoc_types.see_ref * Odoc_types.text) -> string
    val string_of_sees : (Odoc_types.see_ref * Odoc_types.text) list -> string
    val string_of_return_opt : Odoc_types.text option -> string
    val string_of_info : Odoc_types.info -> string
    val apply_opt : ('a -> 'b) -> 'a option -> 'b option
    val string_of_date : ?absolute:bool -> ?hour:bool -> float -> string
    val current_date : string
    val first_sentence_of_text : Odoc_types.text -> Odoc_types.text
    val first_sentence_and_rest_of_text : Odoc_types.text -> Odoc_types.text * Odoc_types.text
    val text_no_title_no_list : Odoc_types.text -> Odoc_types.text
    val text_concat : Odoc_types.text -> Odoc_types.text list -> Odoc_types.text
    val get_titles_in_text : Odoc_types.text -> - (int * string option * Odoc_types.text) list
    val create_index_lists : 'a list -> ('a -> string) -> 'a list list
    val remove_duplicates : ('a -> 'a -> int) -> 'a list -> 'a list
    val remove_ending_newline : string -> string
    val search_string_backward : pat:string -> s:string -> int
    val remove_option : Types.type_expr -> Types.type_expr
    val is_optional : Asttypes.arg_label -> bool
    val label_name : Asttypes.arg_label -> string
    \ No newline at end of file + (int * string option * Odoc_types.text) list
    val create_index_lists : 'a list -> ('a -> string) -> 'a list list
    val remove_duplicates : ('a -> 'a -> int) -> 'a list -> 'a list
    val remove_ending_newline : string -> string
    val search_string_backward : pat:string -> s:string -> int
    val remove_option : Types.type_expr -> Types.type_expr
    val is_optional : Asttypes.arg_label -> bool
    val label_name : Asttypes.arg_label -> string
    diff --git a/ocaml/Odoc_module/index.html b/ocaml/Odoc_module/index.html index ec26ff6..65459af 100644 --- a/ocaml/Odoc_module/index.html +++ b/ocaml/Odoc_module/index.html @@ -1,49 +1,49 @@ -Odoc_module (ocaml.Odoc_module)

    Module Odoc_module

    module String = Misc.Stdlib.String
    module Name = Odoc_name
    type module_element =
    1. | Element_module of t_module
    2. | Element_module_type of t_module_type
    3. | Element_included_module of included_module
    4. | Element_class of Odoc_class.t_class
    5. | Element_class_type of Odoc_class.t_class_type
    6. | Element_value of Odoc_value.t_value
    7. | Element_type_extension of Odoc_extension.t_type_extension
    8. | Element_exception of Odoc_exception.t_exception
    9. | Element_type of Odoc_type.t_type
    10. | Element_module_comment of Odoc_types.text
    and mmt =
    1. | Mod of t_module
    2. | Modtype of t_module_type
    and included_module = {
    1. im_name : Name.t;
    2. mutable im_module : mmt option;
    3. mutable im_info : Odoc_types.info option;
    }
    and module_alias = {
    1. ma_name : Name.t;
    2. mutable ma_module : mmt option;
    }
    and module_parameter = {
    1. mp_name : string;
    2. mp_type : Types.module_type option;
    3. mp_type_code : string;
    4. mp_kind : module_type_kind;
    }
    and module_kind =
    1. | Module_struct of module_element list
    2. | Module_alias of module_alias
    3. | Module_functor of module_parameter * module_kind
    4. | Module_apply of module_kind * module_kind
    5. | Module_apply_unit of module_kind
    6. | Module_with of module_type_kind * string
    7. | Module_constraint of module_kind * module_type_kind
    8. | Module_typeof of string
    9. | Module_unpack of string * module_type_alias
    and t_module = {
    1. m_name : Name.t;
    2. mutable m_type : Types.module_type;
    3. mutable m_info : Odoc_types.info option;
    4. m_is_interface : bool;
    5. m_file : string;
    6. mutable m_kind : module_kind;
    7. mutable m_loc : Odoc_types.location;
    8. mutable m_top_deps : Name.t list;
    9. mutable m_code : string option;
    10. mutable m_code_intf : string option;
    11. m_text_only : bool;
    }
    and module_type_alias = {
    1. mta_name : Name.t;
    2. mutable mta_module : t_module_type option;
    }
    and module_type_kind =
    1. | Module_type_struct of module_element list
    2. | Module_type_functor of module_parameter * module_type_kind
    3. | Module_type_alias of module_type_alias
    4. | Module_type_with of module_type_kind * string
    5. | Module_type_typeof of string
    and t_module_type = {
    1. mt_name : Name.t;
    2. mutable mt_info : Odoc_types.info option;
    3. mutable mt_type : Types.module_type option;
    4. mt_is_interface : bool;
    5. mt_file : string;
    6. mutable mt_kind : module_type_kind option;
    7. mutable mt_loc : Odoc_types.location;
    }
    val values : module_element list -> Odoc_value.t_value list
    val types : module_element list -> Odoc_type.t_type list
    val type_extensions : +Odoc_module (ocaml.Odoc_module)

    Module Odoc_module

    module String = Misc.Stdlib.String
    module Name = Odoc_name
    type module_element =
    1. | Element_module of t_module
    2. | Element_module_type of t_module_type
    3. | Element_included_module of included_module
    4. | Element_class of Odoc_class.t_class
    5. | Element_class_type of Odoc_class.t_class_type
    6. | Element_value of Odoc_value.t_value
    7. | Element_type_extension of Odoc_extension.t_type_extension
    8. | Element_exception of Odoc_exception.t_exception
    9. | Element_type of Odoc_type.t_type
    10. | Element_module_comment of Odoc_types.text
    and mmt =
    1. | Mod of t_module
    2. | Modtype of t_module_type
    and included_module = {
    1. im_name : Name.t;
    2. mutable im_module : mmt option;
    3. mutable im_info : Odoc_types.info option;
    }
    and module_alias = {
    1. ma_name : Name.t;
    2. mutable ma_module : mmt option;
    }
    and module_parameter = {
    1. mp_name : string;
    2. mp_type : Types.module_type option;
    3. mp_type_code : string;
    4. mp_kind : module_type_kind;
    }
    and module_kind =
    1. | Module_struct of module_element list
    2. | Module_alias of module_alias
    3. | Module_functor of module_parameter * module_kind
    4. | Module_apply of module_kind * module_kind
    5. | Module_apply_unit of module_kind
    6. | Module_with of module_type_kind * string
    7. | Module_constraint of module_kind * module_type_kind
    8. | Module_typeof of string
    9. | Module_unpack of string * module_type_alias
    and t_module = {
    1. m_name : Name.t;
    2. mutable m_type : Types.module_type;
    3. mutable m_info : Odoc_types.info option;
    4. m_is_interface : bool;
    5. m_file : string;
    6. mutable m_kind : module_kind;
    7. mutable m_loc : Odoc_types.location;
    8. mutable m_top_deps : Name.t list;
    9. mutable m_code : string option;
    10. mutable m_code_intf : string option;
    11. m_text_only : bool;
    }
    and module_type_alias = {
    1. mta_name : Name.t;
    2. mutable mta_module : t_module_type option;
    }
    and module_type_kind =
    1. | Module_type_struct of module_element list
    2. | Module_type_functor of module_parameter * module_type_kind
    3. | Module_type_alias of module_type_alias
    4. | Module_type_with of module_type_kind * string
    5. | Module_type_typeof of string
    and t_module_type = {
    1. mt_name : Name.t;
    2. mutable mt_info : Odoc_types.info option;
    3. mutable mt_type : Types.module_type option;
    4. mt_is_interface : bool;
    5. mt_file : string;
    6. mutable mt_kind : module_type_kind option;
    7. mutable mt_loc : Odoc_types.location;
    }
    val values : module_element list -> Odoc_value.t_value list
    val types : module_element list -> Odoc_type.t_type list
    val type_extensions : module_element list -> - Odoc_extension.t_type_extension list
    val exceptions : module_element list -> Odoc_exception.t_exception list
    val classes : module_element list -> Odoc_class.t_class list
    val class_types : module_element list -> Odoc_class.t_class_type list
    val modules : module_element list -> t_module list
    val mod_types : module_element list -> t_module_type list
    val comments : module_element list -> Odoc_types.text list
    val included_modules : module_element list -> included_module list
    val module_type_elements : ?trans:bool -> t_module_type -> module_element list
    val module_elements : ?trans:bool -> t_module -> module_element list
    val module_values : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_functions : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_simple_values : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_types : ?trans:bool -> t_module -> Odoc_type.t_type list
    val module_type_extensions : - ?trans:bool -> + Odoc_extension.t_type_extension list
    val exceptions : module_element list -> Odoc_exception.t_exception list
    val classes : module_element list -> Odoc_class.t_class list
    val class_types : module_element list -> Odoc_class.t_class_type list
    val modules : module_element list -> t_module list
    val mod_types : module_element list -> t_module_type list
    val comments : module_element list -> Odoc_types.text list
    val included_modules : module_element list -> included_module list
    val module_type_elements : ?trans:bool -> t_module_type -> module_element list
    val module_elements : ?trans:bool -> t_module -> module_element list
    val module_values : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_functions : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_simple_values : ?trans:bool -> t_module -> Odoc_value.t_value list
    val module_types : ?trans:bool -> t_module -> Odoc_type.t_type list
    val module_type_extensions : + ?trans:bool -> t_module -> Odoc_extension.t_type_extension list
    val module_exceptions : - ?trans:bool -> + ?trans:bool -> t_module -> - Odoc_exception.t_exception list
    val module_classes : ?trans:bool -> t_module -> Odoc_class.t_class list
    val module_class_types : - ?trans:bool -> + Odoc_exception.t_exception list
    val module_classes : ?trans:bool -> t_module -> Odoc_class.t_class list
    val module_class_types : + ?trans:bool -> t_module -> - Odoc_class.t_class_type list
    val module_modules : ?trans:bool -> t_module -> t_module list
    val module_module_types : ?trans:bool -> t_module -> t_module_type list
    val module_included_modules : ?trans:bool -> t_module -> included_module list
    val module_comments : ?trans:bool -> t_module -> Odoc_types.text list
    val module_type_parameters : - ?trans:bool -> + Odoc_class.t_class_type list
    val module_modules : ?trans:bool -> t_module -> t_module list
    val module_module_types : ?trans:bool -> t_module -> t_module_type list
    val module_included_modules : ?trans:bool -> t_module -> included_module list
    val module_comments : ?trans:bool -> t_module -> Odoc_types.text list
    val module_type_parameters : + ?trans:bool -> t_module_type -> (module_parameter * Odoc_types.text option) list
    val module_parameters : - ?trans:bool -> + ?trans:bool -> t_module -> - (module_parameter * Odoc_types.text option) list
    val module_all_submodules : ?trans:bool -> t_module -> t_module list
    val module_type_is_functor : t_module_type -> bool
    val module_is_functor : t_module -> bool
    val module_type_values : - ?trans:bool -> + (module_parameter * Odoc_types.text option) list
    val module_all_submodules : ?trans:bool -> t_module -> t_module list
    val module_type_is_functor : t_module_type -> bool
    val module_is_functor : t_module -> bool
    val module_type_values : + ?trans:bool -> t_module_type -> - Odoc_value.t_value list
    val module_type_types : ?trans:bool -> t_module_type -> Odoc_type.t_type list
    val module_type_type_extensions : - ?trans:bool -> + Odoc_value.t_value list
    val module_type_types : ?trans:bool -> t_module_type -> Odoc_type.t_type list
    val module_type_type_extensions : + ?trans:bool -> t_module_type -> Odoc_extension.t_type_extension list
    val module_type_exceptions : - ?trans:bool -> + ?trans:bool -> t_module_type -> Odoc_exception.t_exception list
    val module_type_classes : - ?trans:bool -> + ?trans:bool -> t_module_type -> Odoc_class.t_class list
    val module_type_class_types : - ?trans:bool -> + ?trans:bool -> t_module_type -> - Odoc_class.t_class_type list
    val module_type_modules : ?trans:bool -> t_module_type -> t_module list
    val module_type_module_types : - ?trans:bool -> + Odoc_class.t_class_type list
    val module_type_modules : ?trans:bool -> t_module_type -> t_module list
    val module_type_module_types : + ?trans:bool -> t_module_type -> t_module_type list
    val module_type_included_modules : - ?trans:bool -> + ?trans:bool -> t_module_type -> - included_module list
    val module_type_comments : ?trans:bool -> t_module_type -> Odoc_types.text list
    val module_type_functions : - ?trans:bool -> + included_module list
    val module_type_comments : ?trans:bool -> t_module_type -> Odoc_types.text list
    val module_type_functions : + ?trans:bool -> t_module_type -> Odoc_value.t_value list
    val module_type_simple_values : - ?trans:bool -> + ?trans:bool -> t_module_type -> - Odoc_value.t_value list
    val module_all_classes : ?trans:bool -> t_module -> Odoc_class.t_class list
    val module_type_all_classes : - ?trans:bool -> + Odoc_value.t_value list
    val module_all_classes : ?trans:bool -> t_module -> Odoc_class.t_class list
    val module_type_all_classes : + ?trans:bool -> t_module_type -> - Odoc_class.t_class list
    \ No newline at end of file + Odoc_class.t_class list
    diff --git a/ocaml/Odoc_name/Map/index.html b/ocaml/Odoc_name/Map/index.html index d81e8e7..17324fc 100644 --- a/ocaml/Odoc_name/Map/index.html +++ b/ocaml/Odoc_name/Map/index.html @@ -1,6 +1,6 @@ -Map (ocaml.Odoc_name.Map)

    Module Odoc_name.Map

    type key = t
    type !+'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : +Map (ocaml.Odoc_name.Map)

    Module Odoc_name.Map

    type key = t
    type !+'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_opt : key -> 'a t -> 'a option
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    \ No newline at end of file + 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_opt : key -> 'a t -> 'a option
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    diff --git a/ocaml/Odoc_name/index.html b/ocaml/Odoc_name/index.html index 0df9a2b..a66e6f8 100644 --- a/ocaml/Odoc_name/index.html +++ b/ocaml/Odoc_name/index.html @@ -1,2 +1,2 @@ -Odoc_name (ocaml.Odoc_name)

    Module Odoc_name

    type t = string
    val parens_if_infix : t -> t
    val simple : t -> t
    val father : t -> t
    val concat : t -> t -> t
    val normalize_name : t -> t
    val head : t -> t
    val depth : t -> int
    val prefix : t -> t -> bool
    val alias_unprefix : t -> t -> t
    val get_relative : t -> t -> t
    val get_relative_opt : t -> t -> t
    val get_relative_raw : t -> t -> t
    val hide_given_modules : t list -> t -> t
    val qualified : t -> bool
    val from_ident : Ident.t -> t
    val from_path : Path.t -> t
    val to_path : t -> Path.t
    val from_longident : Longident.t -> t
    module Map : sig ... end
    \ No newline at end of file +Odoc_name (ocaml.Odoc_name)

    Module Odoc_name

    type t = string
    val parens_if_infix : t -> t
    val simple : t -> t
    val father : t -> t
    val concat : t -> t -> t
    val normalize_name : t -> t
    val head : t -> t
    val depth : t -> int
    val prefix : t -> t -> bool
    val alias_unprefix : t -> t -> t
    val get_relative : t -> t -> t
    val get_relative_opt : t -> t -> t
    val get_relative_raw : t -> t -> t
    val hide_given_modules : t list -> t -> t
    val qualified : t -> bool
    val from_ident : Ident.t -> t
    val from_path : Path.t -> t
    val to_path : t -> Path.t
    val from_longident : Longident.t -> t
    module Map : sig ... end
    diff --git a/ocaml/Odoc_ocamlhtml/index.html b/ocaml/Odoc_ocamlhtml/index.html index 2dcc9cb..52b5d90 100644 --- a/ocaml/Odoc_ocamlhtml/index.html +++ b/ocaml/Odoc_ocamlhtml/index.html @@ -1,2 +1,2 @@ -Odoc_ocamlhtml (ocaml.Odoc_ocamlhtml)

    Module Odoc_ocamlhtml

    Generation of html code to display OCaml code.

    val escape_base : string -> string
    val html_of_comment : (string -> string) ref
    val code_class : string
    val html_of_code : Stdlib.Buffer.t -> ?with_pre:bool -> string -> unit
    \ No newline at end of file +Odoc_ocamlhtml (ocaml.Odoc_ocamlhtml)

    Module Odoc_ocamlhtml

    Generation of html code to display OCaml code.

    val escape_base : string -> string
    val html_of_comment : (string -> string) ref
    val code_class : string
    val html_of_code : Stdlib.Buffer.t -> ?with_pre:bool -> string -> unit
    diff --git a/ocaml/Odoc_parameter/index.html b/ocaml/Odoc_parameter/index.html index 7126e67..211255e 100644 --- a/ocaml/Odoc_parameter/index.html +++ b/ocaml/Odoc_parameter/index.html @@ -1,8 +1,8 @@ -Odoc_parameter (ocaml.Odoc_parameter)

    Module Odoc_parameter

    Representation and manipulation of method / function / class parameters.

    Types

    type simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : Odoc_types.text option;
    }

    Representation of a simple parameter name

    type param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr
      (*

      Representation of parameter names. We need it to represent parameter names in tuples. The value Tuple ([], t) stands for an anonymous parameter.

      *)
    type parameter = param_info

    A parameter is just a param_info.

    Functions

    val complete_name : parameter -> string

    access to the name as a string. For tuples, parentheses and commas are added.

    access to the complete type

    val update_parameter_text : +Odoc_parameter (ocaml.Odoc_parameter)

    Module Odoc_parameter

    Representation and manipulation of method / function / class parameters.

    Types

    type simple_name = {
    1. sn_name : string;
    2. sn_type : Types.type_expr;
    3. mutable sn_text : Odoc_types.text option;
    }

    Representation of a simple parameter name

    type param_info =
    1. | Simple_name of simple_name
    2. | Tuple of param_info list * Types.type_expr
      (*

      Representation of parameter names. We need it to represent parameter names in tuples. The value Tuple ([], t) stands for an anonymous parameter.

      *)
    type parameter = param_info

    A parameter is just a param_info.

    Functions

    val complete_name : parameter -> string

    access to the name as a string. For tuples, parentheses and commas are added.

    access to the complete type

    val update_parameter_text : (string -> Odoc_types.text option) -> parameter -> - unit

    Update the text of a parameter using a function returning the optional text associated to a parameter name.

    val desc_by_name : parameter -> string -> Odoc_types.text option

    access to the description of a specific name.

    • raises Not_found

      if no description is associated to the given name.

    val names : parameter -> string list

    access to the list of names ; only one for a simple parameter, or a list for tuples.

    val type_by_name : parameter -> string -> Types.type_expr

    access to the type of a specific name.

    • raises Not_found

      if no type is associated to the given name.

    val desc_from_info_opt : + unit

    Update the text of a parameter using a function returning the optional text associated to a parameter name.

    val desc_by_name : parameter -> string -> Odoc_types.text option

    access to the description of a specific name.

    • raises Not_found

      if no description is associated to the given name.

    val names : parameter -> string list

    access to the list of names ; only one for a simple parameter, or a list for tuples.

    val type_by_name : parameter -> string -> Types.type_expr

    access to the type of a specific name.

    • raises Not_found

      if no type is associated to the given name.

    val desc_from_info_opt : Odoc_types.info option -> string -> - Odoc_types.text option

    access to the optional description of a parameter name from an optional info structure.

    \ No newline at end of file + Odoc_types.text option

    access to the optional description of a parameter name from an optional info structure.

    diff --git a/ocaml/Odoc_parser/index.html b/ocaml/Odoc_parser/index.html index 063aaba..7420d70 100644 --- a/ocaml/Odoc_parser/index.html +++ b/ocaml/Odoc_parser/index.html @@ -1,5 +1,5 @@ -Odoc_parser (ocaml.Odoc_parser)

    Module Odoc_parser

    type token =
    1. | Description of string * string option
    2. | See_url of string
    3. | See_file of string
    4. | See_doc of string
    5. | T_PARAM
    6. | T_AUTHOR
    7. | T_VERSION
    8. | T_SEE
    9. | T_SINCE
    10. | T_BEFORE
    11. | T_DEPRECATED
    12. | T_RAISES
    13. | T_RETURN
    14. | T_CUSTOM of string
    15. | EOF
    16. | Desc of string
    val main : +Odoc_parser (ocaml.Odoc_parser)

    Module Odoc_parser

    type token =
    1. | Description of string * string option
    2. | See_url of string
    3. | See_file of string
    4. | See_doc of string
    5. | T_PARAM
    6. | T_AUTHOR
    7. | T_VERSION
    8. | T_SEE
    9. | T_SINCE
    10. | T_BEFORE
    11. | T_DEPRECATED
    12. | T_RAISES
    13. | T_RETURN
    14. | T_CUSTOM of string
    15. | EOF
    16. | Desc of string
    val main : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> (string * string option) option
    val info_part2 : @@ -8,4 +8,4 @@ unit
    \ No newline at end of file + Odoc_types.see_ref * string
    diff --git a/ocaml/Odoc_print/index.html b/ocaml/Odoc_print/index.html index bbf921e..e9b5a88 100644 --- a/ocaml/Odoc_print/index.html +++ b/ocaml/Odoc_print/index.html @@ -1,6 +1,6 @@ -Odoc_print (ocaml.Odoc_print)

    Module Odoc_print

    val string_of_type_expr : Types.type_expr -> string
    val string_of_module_type : - ?code:string -> - ?complete:bool -> +Odoc_print (ocaml.Odoc_print)

    Module Odoc_print

    val string_of_type_expr : Types.type_expr -> string
    val string_of_module_type : + ?code:string -> + ?complete:bool -> Types.module_type -> - string
    val string_of_class_type : ?complete:bool -> Types.class_type -> string
    \ No newline at end of file + string
    val string_of_class_type : ?complete:bool -> Types.class_type -> string
    diff --git a/ocaml/Odoc_scan/class-scanner/index.html b/ocaml/Odoc_scan/class-scanner/index.html index 598697f..d265632 100644 --- a/ocaml/Odoc_scan/class-scanner/index.html +++ b/ocaml/Odoc_scan/class-scanner/index.html @@ -1,6 +1,6 @@ -scanner (ocaml.Odoc_scan.scanner)

    Class Odoc_scan.scanner

    method scan_attribute : Odoc_value.t_attribute -> unit
    method scan_class : Odoc_class.t_class -> unit
    method scan_class_comment : Odoc_types.text -> unit
    method scan_class_elements : Odoc_class.t_class -> unit
    method scan_class_pre : Odoc_class.t_class -> bool
    method scan_class_type : Odoc_class.t_class_type -> unit
    method scan_class_type_comment : Odoc_types.text -> unit
    method scan_class_type_elements : Odoc_class.t_class_type -> unit
    method scan_class_type_pre : Odoc_class.t_class_type -> bool
    method scan_exception : Odoc_exception.t_exception -> unit
    method scan_extension_constructor : Odoc_extension.t_extension_constructor -> +scanner (ocaml.Odoc_scan.scanner)

    Class Odoc_scan.scanner

    method scan_attribute : Odoc_value.t_attribute -> unit
    method scan_class : Odoc_class.t_class -> unit
    method scan_class_comment : Odoc_types.text -> unit
    method scan_class_elements : Odoc_class.t_class -> unit
    method scan_class_pre : Odoc_class.t_class -> bool
    method scan_class_type : Odoc_class.t_class_type -> unit
    method scan_class_type_comment : Odoc_types.text -> unit
    method scan_class_type_elements : Odoc_class.t_class_type -> unit
    method scan_class_type_pre : Odoc_class.t_class_type -> bool
    method scan_exception : Odoc_exception.t_exception -> unit
    method scan_extension_constructor : Odoc_extension.t_extension_constructor -> unit
    method scan_included_module : Odoc_module.included_module -> unit
    method scan_method : Odoc_value.t_method -> unit
    method scan_module : Odoc_module.t_module -> unit
    method scan_module_comment : Odoc_types.text -> unit
    method scan_module_elements : Odoc_module.t_module -> unit
    method scan_module_list : Odoc_module.t_module list -> unit
    method scan_module_pre : Odoc_module.t_module -> bool
    method scan_module_type : Odoc_module.t_module_type -> unit
    method scan_module_type_comment : Odoc_types.text -> unit
    method scan_module_type_elements : Odoc_module.t_module_type -> unit
    method scan_module_type_pre : Odoc_module.t_module_type -> bool
    method scan_type : Odoc_type.t_type -> unit
    method scan_type_const : Odoc_type.t_type -> Odoc_type.variant_constructor -> unit
    method scan_type_extension : Odoc_extension.t_type_extension -> unit
    method scan_type_extension_constructors : Odoc_extension.t_type_extension -> - unit
    method scan_type_extension_pre : Odoc_extension.t_type_extension -> bool
    method scan_type_pre : Odoc_type.t_type -> bool
    method scan_type_recfield : Odoc_type.t_type -> Odoc_type.record_field -> unit
    method scan_value : Odoc_value.t_value -> unit
    \ No newline at end of file + unit
    method scan_type_extension_pre : Odoc_extension.t_type_extension -> bool
    method scan_type_pre : Odoc_type.t_type -> bool
    method scan_type_recfield : Odoc_type.t_type -> Odoc_type.record_field -> unit
    method scan_value : Odoc_value.t_value -> unit
    diff --git a/ocaml/Odoc_scan/index.html b/ocaml/Odoc_scan/index.html index b12159f..eac5a8c 100644 --- a/ocaml/Odoc_scan/index.html +++ b/ocaml/Odoc_scan/index.html @@ -1,2 +1,2 @@ -Odoc_scan (ocaml.Odoc_scan)

    Module Odoc_scan

    class scanner : object ... end
    \ No newline at end of file +Odoc_scan (ocaml.Odoc_scan)

    Module Odoc_scan

    class scanner : object ... end
    diff --git a/ocaml/Odoc_search/P_name/index.html b/ocaml/Odoc_search/P_name/index.html index 64d21a8..cb5f913 100644 --- a/ocaml/Odoc_search/P_name/index.html +++ b/ocaml/Odoc_search/P_name/index.html @@ -1,5 +1,5 @@ -P_name (ocaml.Odoc_search.P_name)

    Module Odoc_search.P_name

    type t = Str.regexp
    val (=~) : string -> Str.regexp -> bool
    val p_module : Odoc_module.t_module -> Str.regexp -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> Str.regexp -> bool * bool
    val p_class : Odoc_class.t_class -> Str.regexp -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> Str.regexp -> bool * bool
    val p_value : Odoc_value.t_value -> Str.regexp -> bool
    val p_recfield : +P_name (ocaml.Odoc_search.P_name)

    Module Odoc_search.P_name

    type t = Str.regexp
    val (=~) : string -> Str.regexp -> bool
    val p_module : Odoc_module.t_module -> Str.regexp -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> Str.regexp -> bool * bool
    val p_class : Odoc_class.t_class -> Str.regexp -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> Str.regexp -> bool * bool
    val p_value : Odoc_value.t_value -> Str.regexp -> bool
    val p_type : Odoc_type.t_type -> Str.regexp -> bool * bool
    val p_exception : Odoc_exception.t_exception -> Str.regexp -> bool
    val p_attribute : Odoc_value.t_attribute -> Str.regexp -> bool
    val p_method : Odoc_value.t_method -> Str.regexp -> bool
    \ No newline at end of file + bool
    val p_type : Odoc_type.t_type -> Str.regexp -> bool * bool
    val p_exception : Odoc_exception.t_exception -> Str.regexp -> bool
    val p_attribute : Odoc_value.t_attribute -> Str.regexp -> bool
    val p_method : Odoc_value.t_method -> Str.regexp -> bool
    diff --git a/ocaml/Odoc_search/Search/argument-1-P/index.html b/ocaml/Odoc_search/Search/argument-1-P/index.html index e8fdaad..32d1115 100644 --- a/ocaml/Odoc_search/Search/argument-1-P/index.html +++ b/ocaml/Odoc_search/Search/argument-1-P/index.html @@ -1,2 +1,2 @@ -P (ocaml.Odoc_search.Search.P)

    Parameter Search.P

    type t
    val p_module : Odoc_module.t_module -> t -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> t -> bool * bool
    val p_class : Odoc_class.t_class -> t -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> t -> bool * bool
    val p_value : Odoc_value.t_value -> t -> bool
    val p_recfield : Odoc_type.t_type -> Odoc_type.record_field -> t -> bool
    val p_type : Odoc_type.t_type -> t -> bool * bool
    val p_extension : Odoc_extension.t_extension_constructor -> t -> bool
    val p_exception : Odoc_exception.t_exception -> t -> bool
    val p_attribute : Odoc_value.t_attribute -> t -> bool
    val p_method : Odoc_value.t_method -> t -> bool
    val p_section : string -> t -> bool
    \ No newline at end of file +P (ocaml.Odoc_search.Search.P)

    Parameter Search.P

    type t
    val p_module : Odoc_module.t_module -> t -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> t -> bool * bool
    val p_class : Odoc_class.t_class -> t -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> t -> bool * bool
    val p_value : Odoc_value.t_value -> t -> bool
    val p_recfield : Odoc_type.t_type -> Odoc_type.record_field -> t -> bool
    val p_type : Odoc_type.t_type -> t -> bool * bool
    val p_extension : Odoc_extension.t_extension_constructor -> t -> bool
    val p_exception : Odoc_exception.t_exception -> t -> bool
    val p_attribute : Odoc_value.t_attribute -> t -> bool
    val p_method : Odoc_value.t_method -> t -> bool
    val p_section : string -> t -> bool
    diff --git a/ocaml/Odoc_search/Search/index.html b/ocaml/Odoc_search/Search/index.html index 9357dc2..1cf6f6d 100644 --- a/ocaml/Odoc_search/Search/index.html +++ b/ocaml/Odoc_search/Search/index.html @@ -1,5 +1,5 @@ -Search (ocaml.Odoc_search.Search)

    Module Odoc_search.Search

    Parameters

    module P : Predicates

    Signature

    val search_section : Odoc_types.text -> string -> P.t -> result_element list
    val search_value : Odoc_value.t_value -> P.t -> result_element list
    val search_recfield : +Search (ocaml.Odoc_search.Search)

    Module Odoc_search.Search

    Parameters

    module P : Predicates

    Signature

    val search_section : Odoc_types.text -> string -> P.t -> result_element list
    val search_value : Odoc_value.t_value -> P.t -> result_element list
    val search_recfield : Odoc_type.t_type -> Odoc_type.record_field -> P.t -> @@ -16,4 +16,4 @@ result_element list
    val search_exception : Odoc_exception.t_exception -> P.t -> result_element list
    val search_attribute : Odoc_value.t_attribute -> P.t -> result_element list
    val search_method : Odoc_value.t_method -> P.t -> result_element list
    val search_class : Odoc_class.t_class -> P.t -> result_element list
    val search_class_type : Odoc_class.t_class_type -> P.t -> result_element list
    val search_module_type : Odoc_module.t_module_type -> P.t -> - result_element list
    val search_module : Odoc_module.t_module -> P.t -> result_element list
    \ No newline at end of file + result_element list
    val search_module : Odoc_module.t_module -> P.t -> result_element list
    diff --git a/ocaml/Odoc_search/Search_by_name/index.html b/ocaml/Odoc_search/Search_by_name/index.html index 826e2c1..a043fef 100644 --- a/ocaml/Odoc_search/Search_by_name/index.html +++ b/ocaml/Odoc_search/Search_by_name/index.html @@ -1,5 +1,5 @@ -Search_by_name (ocaml.Odoc_search.Search_by_name)

    Module Odoc_search.Search_by_name

    val search_section : +Search_by_name (ocaml.Odoc_search.Search_by_name)

    Module Odoc_search.Search_by_name

    val search_section : Odoc_types.text -> string -> P_name.t -> @@ -29,4 +29,4 @@ result_element list
    val search_module_type : Odoc_module.t_module_type -> P_name.t -> - result_element list
    val search_module : Odoc_module.t_module -> P_name.t -> result_element list
    \ No newline at end of file + result_element list
    val search_module : Odoc_module.t_module -> P_name.t -> result_element list
    diff --git a/ocaml/Odoc_search/index.html b/ocaml/Odoc_search/index.html index 939bff5..fffd6de 100644 --- a/ocaml/Odoc_search/index.html +++ b/ocaml/Odoc_search/index.html @@ -1,4 +1,4 @@ -Odoc_search (ocaml.Odoc_search)

    Module Odoc_search

    type result_element =
    1. | Res_module of Odoc_module.t_module
    2. | Res_module_type of Odoc_module.t_module_type
    3. | Res_class of Odoc_class.t_class
    4. | Res_class_type of Odoc_class.t_class_type
    5. | Res_value of Odoc_value.t_value
    6. | Res_type of Odoc_type.t_type
    7. | Res_extension of Odoc_extension.t_extension_constructor
    8. | Res_exception of Odoc_exception.t_exception
    9. | Res_attribute of Odoc_value.t_attribute
    10. | Res_method of Odoc_value.t_method
    11. | Res_section of string * Odoc_types.text
    12. | Res_recfield of Odoc_type.t_type * Odoc_type.record_field
    13. | Res_const of Odoc_type.t_type * Odoc_type.variant_constructor
    type result = result_element list
    module type Predicates = sig ... end
    module P_name : sig ... end
    module Search_by_name : sig ... end
    val values : Odoc_module.t_module list -> Odoc_value.t_value list
    val extensions : +Odoc_search (ocaml.Odoc_search)

    Module Odoc_search

    type result_element =
    1. | Res_module of Odoc_module.t_module
    2. | Res_module_type of Odoc_module.t_module_type
    3. | Res_class of Odoc_class.t_class
    4. | Res_class_type of Odoc_class.t_class_type
    5. | Res_value of Odoc_value.t_value
    6. | Res_type of Odoc_type.t_type
    7. | Res_extension of Odoc_extension.t_extension_constructor
    8. | Res_exception of Odoc_exception.t_exception
    9. | Res_attribute of Odoc_value.t_attribute
    10. | Res_method of Odoc_value.t_method
    11. | Res_section of string * Odoc_types.text
    12. | Res_recfield of Odoc_type.t_type * Odoc_type.record_field
    13. | Res_const of Odoc_type.t_type * Odoc_type.variant_constructor
    type result = result_element list
    module type Predicates = sig ... end
    module P_name : sig ... end
    module Search_by_name : sig ... end
    val values : Odoc_module.t_module list -> Odoc_value.t_value list
    val exceptions : Odoc_module.t_module list -> Odoc_exception.t_exception list
    val types : Odoc_module.t_module list -> Odoc_type.t_type list
    val attributes : Odoc_module.t_module list -> Odoc_value.t_attribute list
    val methods : Odoc_module.t_module list -> Odoc_value.t_method list
    val classes : Odoc_module.t_module list -> Odoc_class.t_class list
    val class_types : Odoc_module.t_module list -> Odoc_class.t_class_type list
    val modules : Odoc_module.t_module list -> Odoc_module.t_module list
    val module_types : Odoc_module.t_module list -> Odoc_module.t_module_type list
    val type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val value_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val module_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val module_type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val class_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val class_type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val extension_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val exception_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val attribute_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val method_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val find_section : Odoc_module.t_module list -> Str.regexp -> Odoc_types.text
    \ No newline at end of file + Odoc_extension.t_extension_constructor list
    val exceptions : Odoc_module.t_module list -> Odoc_exception.t_exception list
    val types : Odoc_module.t_module list -> Odoc_type.t_type list
    val attributes : Odoc_module.t_module list -> Odoc_value.t_attribute list
    val methods : Odoc_module.t_module list -> Odoc_value.t_method list
    val classes : Odoc_module.t_module list -> Odoc_class.t_class list
    val class_types : Odoc_module.t_module list -> Odoc_class.t_class_type list
    val modules : Odoc_module.t_module list -> Odoc_module.t_module list
    val module_types : Odoc_module.t_module list -> Odoc_module.t_module_type list
    val type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val value_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val module_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val module_type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val class_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val class_type_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val extension_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val exception_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val attribute_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val method_exists : Odoc_module.t_module list -> Str.regexp -> bool
    val find_section : Odoc_module.t_module list -> Str.regexp -> Odoc_types.text
    diff --git a/ocaml/Odoc_search/module-type-Predicates/index.html b/ocaml/Odoc_search/module-type-Predicates/index.html index 4ab3112..f32cbdf 100644 --- a/ocaml/Odoc_search/module-type-Predicates/index.html +++ b/ocaml/Odoc_search/module-type-Predicates/index.html @@ -1,2 +1,2 @@ -Predicates (ocaml.Odoc_search.Predicates)

    Module type Odoc_search.Predicates

    type t
    val p_module : Odoc_module.t_module -> t -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> t -> bool * bool
    val p_class : Odoc_class.t_class -> t -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> t -> bool * bool
    val p_value : Odoc_value.t_value -> t -> bool
    val p_recfield : Odoc_type.t_type -> Odoc_type.record_field -> t -> bool
    val p_type : Odoc_type.t_type -> t -> bool * bool
    val p_extension : Odoc_extension.t_extension_constructor -> t -> bool
    val p_exception : Odoc_exception.t_exception -> t -> bool
    val p_attribute : Odoc_value.t_attribute -> t -> bool
    val p_method : Odoc_value.t_method -> t -> bool
    val p_section : string -> t -> bool
    \ No newline at end of file +Predicates (ocaml.Odoc_search.Predicates)

    Module type Odoc_search.Predicates

    type t
    val p_module : Odoc_module.t_module -> t -> bool * bool
    val p_module_type : Odoc_module.t_module_type -> t -> bool * bool
    val p_class : Odoc_class.t_class -> t -> bool * bool
    val p_class_type : Odoc_class.t_class_type -> t -> bool * bool
    val p_value : Odoc_value.t_value -> t -> bool
    val p_recfield : Odoc_type.t_type -> Odoc_type.record_field -> t -> bool
    val p_type : Odoc_type.t_type -> t -> bool * bool
    val p_extension : Odoc_extension.t_extension_constructor -> t -> bool
    val p_exception : Odoc_exception.t_exception -> t -> bool
    val p_attribute : Odoc_value.t_attribute -> t -> bool
    val p_method : Odoc_value.t_method -> t -> bool
    val p_section : string -> t -> bool
    diff --git a/ocaml/Odoc_see_lexer/index.html b/ocaml/Odoc_see_lexer/index.html index 53eb75a..0b825ae 100644 --- a/ocaml/Odoc_see_lexer/index.html +++ b/ocaml/Odoc_see_lexer/index.html @@ -1,2 +1,2 @@ -Odoc_see_lexer (ocaml.Odoc_see_lexer)

    Module Odoc_see_lexer

    \ No newline at end of file +Odoc_see_lexer (ocaml.Odoc_see_lexer)

    Module Odoc_see_lexer

    diff --git a/ocaml/Odoc_sig/Analyser/argument-1-_/index.html b/ocaml/Odoc_sig/Analyser/argument-1-_/index.html index 218342a..0bea185 100644 --- a/ocaml/Odoc_sig/Analyser/argument-1-_/index.html +++ b/ocaml/Odoc_sig/Analyser/argument-1-_/index.html @@ -1,6 +1,6 @@ -_ (ocaml.Odoc_sig.Analyser._)

    Parameter Analyser._

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : +_ (ocaml.Odoc_sig.Analyser._)

    Parameter Analyser._

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : (Odoc_types.text -> 'a) -> string -> string -> - Odoc_types.info option * 'a list
    \ No newline at end of file + Odoc_types.info option * 'a list
    diff --git a/ocaml/Odoc_sig/Analyser/index.html b/ocaml/Odoc_sig/Analyser/index.html index 11a47fc..73b6ad3 100644 --- a/ocaml/Odoc_sig/Analyser/index.html +++ b/ocaml/Odoc_sig/Analyser/index.html @@ -1,5 +1,5 @@ -Analyser (ocaml.Odoc_sig.Analyser)

    Module Odoc_sig.Analyser

    Parameters

    module _ : Info_retriever

    Signature

    val file : string ref
    val file_name : string ref
    val get_string_of_file : int -> int -> string
    val prepare_file : string -> string -> unit
    val preamble : +Analyser (ocaml.Odoc_sig.Analyser)

    Module Odoc_sig.Analyser

    Parameters

    module _ : Info_retriever

    Signature

    val file : string ref
    val file_name : string ref
    val get_string_of_file : int -> int -> string
    val prepare_file : string -> string -> unit
    val preamble : string -> string -> ('a -> Location.t) -> @@ -30,7 +30,7 @@ Odoc_types.info option -> Odoc_types.info option -> Odoc_types.info option
    val analyse_module_type_kind : - ?erased: + ?erased: [ `Constrained of Parsetree.with_constraint list | `Removed ] Odoc_name.Map.t -> Odoc_env.env -> @@ -48,4 +48,4 @@ string -> Parsetree.signature -> Types.signature -> - Odoc_module.t_module
    \ No newline at end of file + Odoc_module.t_module
    diff --git a/ocaml/Odoc_sig/Signature_search/index.html b/ocaml/Odoc_sig/Signature_search/index.html index a4364f2..8894276 100644 --- a/ocaml/Odoc_sig/Signature_search/index.html +++ b/ocaml/Odoc_sig/Signature_search/index.html @@ -1,5 +1,5 @@ -Signature_search (ocaml.Odoc_sig.Signature_search)

    Module Odoc_sig.Signature_search

    type ele
    val table : Types.signature -> tab
    val search_value : tab -> string -> Types.type_expr
    val search_extension : tab -> string -> Types.extension_constructor
    val search_type : tab -> string -> Types.type_declaration
    val search_class : tab -> string -> Types.class_declaration
    val search_class_type : tab -> string -> Types.class_type_declaration
    val search_module : tab -> string -> Types.module_type
    val search_module_type : tab -> string -> Types.module_type option
    val search_attribute_type : +Signature_search (ocaml.Odoc_sig.Signature_search)

    Module Odoc_sig.Signature_search

    type ele
    val table : Types.signature -> tab
    val search_value : tab -> string -> Types.type_expr
    val search_extension : tab -> string -> Types.extension_constructor
    val search_type : tab -> string -> Types.type_declaration
    val search_class : tab -> string -> Types.class_declaration
    val search_class_type : tab -> string -> Types.class_type_declaration
    val search_module : tab -> string -> Types.module_type
    val search_module_type : tab -> string -> Types.module_type option
    val search_attribute_type : Types.Vars.key -> Types.class_signature -> - Types.type_expr
    val search_method_type : string -> Types.class_signature -> Types.type_expr
    \ No newline at end of file + Types.type_expr
    val search_method_type : string -> Types.class_signature -> Types.type_expr
    diff --git a/ocaml/Odoc_sig/index.html b/ocaml/Odoc_sig/index.html index ab31bb8..856e5e2 100644 --- a/ocaml/Odoc_sig/index.html +++ b/ocaml/Odoc_sig/index.html @@ -1,5 +1,5 @@ -Odoc_sig (ocaml.Odoc_sig)

    Module Odoc_sig

    module type Info_retriever = sig ... end
    val analyze_alerts : +Odoc_sig (ocaml.Odoc_sig)

    Module Odoc_sig

    module type Info_retriever = sig ... end
    val analyze_alerts : Odoc_types.info option -> Parsetree.attributes -> - Odoc_types.info option
    module Analyser (_ : Info_retriever) : sig ... end
    \ No newline at end of file + Odoc_types.info option
    module Analyser (_ : Info_retriever) : sig ... end
    diff --git a/ocaml/Odoc_sig/module-type-Info_retriever/index.html b/ocaml/Odoc_sig/module-type-Info_retriever/index.html index e2716c2..0be40ba 100644 --- a/ocaml/Odoc_sig/module-type-Info_retriever/index.html +++ b/ocaml/Odoc_sig/module-type-Info_retriever/index.html @@ -1,6 +1,6 @@ -Info_retriever (ocaml.Odoc_sig.Info_retriever)

    Module type Odoc_sig.Info_retriever

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : +Info_retriever (ocaml.Odoc_sig.Info_retriever)

    Module type Odoc_sig.Info_retriever

    val all_special : string -> string -> int * Odoc_types.info list
    val blank_line_outside_simple : string -> string -> bool
    val just_after_special : string -> string -> int * Odoc_types.info option
    val first_special : string -> string -> int * Odoc_types.info option
    val get_comments : (Odoc_types.text -> 'a) -> string -> string -> - Odoc_types.info option * 'a list
    \ No newline at end of file + Odoc_types.info option * 'a list
    diff --git a/ocaml/Odoc_str/index.html b/ocaml/Odoc_str/index.html index 1f30737..aecf81d 100644 --- a/ocaml/Odoc_str/index.html +++ b/ocaml/Odoc_str/index.html @@ -1,4 +1,4 @@ -Odoc_str (ocaml.Odoc_str)

    Module Odoc_str

    val string_of_variance : Odoc_type.t_type -> Types.Variance.t -> string
    val string_of_type_list : ?par:bool -> string -> Types.type_expr list -> string
    val string_of_type_param_list : Odoc_type.t_type -> string
    val string_of_type_extension_param_list : +Odoc_str (ocaml.Odoc_str)

    Module Odoc_str

    val string_of_variance : Odoc_type.t_type -> Types.Variance.t -> string
    val string_of_type_list : ?par:bool -> string -> Types.type_expr list -> string
    val string_of_type_param_list : Odoc_type.t_type -> string
    val string_of_type_extension_param_list : Odoc_extension.t_type_extension -> - string
    val string_of_class_type_param_list : Types.type_expr list -> string
    val string_of_type : Odoc_type.t_type -> string
    val string_of_record : Odoc_type.record_field list -> string
    val string_of_class_params : Odoc_class.t_class -> string
    val string_of_type_extension : Odoc_extension.t_type_extension -> string
    val string_of_exception : Odoc_exception.t_exception -> string
    val string_of_value : Odoc_value.t_value -> string
    val string_of_attribute : Odoc_value.t_attribute -> string
    val string_of_method : Odoc_value.t_method -> string
    \ No newline at end of file + string
    val string_of_class_type_param_list : Types.type_expr list -> string
    val string_of_type : Odoc_type.t_type -> string
    val string_of_record : Odoc_type.record_field list -> string
    val string_of_class_params : Odoc_class.t_class -> string
    val string_of_type_extension : Odoc_extension.t_type_extension -> string
    val string_of_exception : Odoc_exception.t_exception -> string
    val string_of_value : Odoc_value.t_value -> string
    val string_of_attribute : Odoc_value.t_attribute -> string
    val string_of_method : Odoc_value.t_method -> string
    diff --git a/ocaml/Odoc_test/index.html b/ocaml/Odoc_test/index.html index 85d9864..b598058 100644 --- a/ocaml/Odoc_test/index.html +++ b/ocaml/Odoc_test/index.html @@ -1,2 +1,2 @@ -Odoc_test (ocaml.Odoc_test)

    Module Odoc_test

    \ No newline at end of file +Odoc_test (ocaml.Odoc_test)

    Module Odoc_test

    diff --git a/ocaml/Odoc_texi/Generator/class-texi/index.html b/ocaml/Odoc_texi/Generator/class-texi/index.html index e54392b..a670c8b 100644 --- a/ocaml/Odoc_texi/Generator/class-texi/index.html +++ b/ocaml/Odoc_texi/Generator/class-texi/index.html @@ -1,5 +1,5 @@ -texi (ocaml.Odoc_texi.Generator.texi)

    Class Generator.texi

    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_texi.Generator.texi)

    Class Generator.texi

    val mutable indices_to_build : [ `Class | `Class_att | `Class_type | `Exception @@ -32,17 +32,17 @@ unit
    method generate_texi_header : out_channel -> string -> Odoc_info.Module.t_module list -> - unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> @@ -52,8 +52,8 @@ Types.type_expr option -> string
    method string_of_type_parameters : Odoc_info.Type.t_type -> string
    method texi_of_Block : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Bold : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Center : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Code : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_CodePre : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Emphasize : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Enum : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Italic : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Left : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_List : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Newline : Odoc_info.Name.t
    method texi_of_Raw : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Ref : Odoc_info.Name.t -> Odoc_info.ref_kind option -> - Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> - code:Odoc_info.Name.t -> + Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> + code:Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Title : int -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Verbatim : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_attribute : Odoc_info.Value.t_attribute -> string
    method texi_of_class : Odoc_info.Class.t_class -> string
    method texi_of_class_element : Odoc_info.Name.t -> Odoc_info.Class.class_element -> string
    method texi_of_class_type : Odoc_info.Class.t_class_type -> string
    method texi_of_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_exception : Odoc_info.Exception.t_exception -> string
    method texi_of_included_module : Odoc_info.Module.included_module -> string
    method texi_of_info : Odoc_info.info option -> string
    method texi_of_method : Odoc_info.Value.t_method -> string
    method texi_of_module : Odoc_info.Module.t_module -> string
    method texi_of_module_element : Odoc_info.Name.t -> @@ -73,14 +73,14 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_desc : Odoc_info.text option -> Odoc_info.text_element list
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> - Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -94,4 +94,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/ocaml/Odoc_texi/Generator/index.html b/ocaml/Odoc_texi/Generator/index.html index 122700b..a8c6359 100644 --- a/ocaml/Odoc_texi/Generator/index.html +++ b/ocaml/Odoc_texi/Generator/index.html @@ -1,2 +1,2 @@ -Generator (ocaml.Odoc_texi.Generator)

    Module Odoc_texi.Generator

    class texi : object ... end
    \ No newline at end of file +Generator (ocaml.Odoc_texi.Generator)

    Module Odoc_texi.Generator

    class texi : object ... end
    diff --git a/ocaml/Odoc_texi/index.html b/ocaml/Odoc_texi/index.html index d7697fb..5e09188 100644 --- a/ocaml/Odoc_texi/index.html +++ b/ocaml/Odoc_texi/index.html @@ -1,2 +1,2 @@ -Odoc_texi (ocaml.Odoc_texi)

    Module Odoc_texi

    Generation of Texinfo documentation.

    val esc_8bits : bool ref
    val info_section : string ref
    val info_entry : string list ref
    val titles_and_headings : (int * (string * string)) list ref
    type subparts = [
    1. | `Class of Odoc_info.Class.t_class
    2. | `Class_type of Odoc_info.Class.t_class_type
    3. | `Module of Odoc_info.Module.t_module
    4. | `Module_type of Odoc_info.Module.t_module_type
    ]
    type indices = [
    1. | `Class
    2. | `Class_att
    3. | `Class_type
    4. | `Exception
    5. | `Extension
    6. | `Method
    7. | `Module
    8. | `Module_type
    9. | `Type
    10. | `Value
    ]
    module Generator : sig ... end
    module type Texi_generator = sig ... end
    \ No newline at end of file +Odoc_texi (ocaml.Odoc_texi)

    Module Odoc_texi

    Generation of Texinfo documentation.

    val esc_8bits : bool ref
    val info_section : string ref
    val info_entry : string list ref
    val titles_and_headings : (int * (string * string)) list ref
    type subparts = [
    1. | `Class of Odoc_info.Class.t_class
    2. | `Class_type of Odoc_info.Class.t_class_type
    3. | `Module of Odoc_info.Module.t_module
    4. | `Module_type of Odoc_info.Module.t_module_type
    ]
    type indices = [
    1. | `Class
    2. | `Class_att
    3. | `Class_type
    4. | `Exception
    5. | `Extension
    6. | `Method
    7. | `Module
    8. | `Module_type
    9. | `Type
    10. | `Value
    ]
    module Generator : sig ... end
    module type Texi_generator = sig ... end
    diff --git a/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html b/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html index 259e93c..0e75c98 100644 --- a/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html +++ b/ocaml/Odoc_texi/module-type-Texi_generator/class-texi/index.html @@ -1,5 +1,5 @@ -texi (ocaml.Odoc_texi.Texi_generator.texi)

    Class Texi_generator.texi

    val mutable indices_to_build : [ `Class +texi (ocaml.Odoc_texi.Texi_generator.texi)

    Class Texi_generator.texi

    val mutable indices_to_build : [ `Class | `Class_att | `Class_type | `Exception @@ -32,17 +32,17 @@ unit
    method generate_texi_header : out_channel -> string -> Odoc_info.Module.t_module list -> - unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> + unit
    method generate_texi_trailer : out_channel -> unit
    method heading : int -> Odoc_info.text -> string
    method label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> @@ -52,8 +52,8 @@ Types.type_expr option -> string
    method string_of_type_parameters : Odoc_info.Type.t_type -> string
    method texi_of_Block : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Bold : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Center : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Code : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_CodePre : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Emphasize : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Enum : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Italic : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Left : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_List : Odoc_info.text list -> Odoc_info.Name.t
    method texi_of_Newline : Odoc_info.Name.t
    method texi_of_Raw : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Ref : Odoc_info.Name.t -> Odoc_info.ref_kind option -> - Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> - code:Odoc_info.Name.t -> + Odoc_info.Name.t
    method texi_of_Right : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Subscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Superscript : Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Target : target:string -> + code:Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_Title : int -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_Verbatim : Odoc_info.Name.t -> Odoc_info.Name.t
    method texi_of_attribute : Odoc_info.Value.t_attribute -> string
    method texi_of_class : Odoc_info.Class.t_class -> string
    method texi_of_class_element : Odoc_info.Name.t -> Odoc_info.Class.class_element -> string
    method texi_of_class_type : Odoc_info.Class.t_class_type -> string
    method texi_of_custom_text : string -> Odoc_info.text -> Odoc_info.Name.t
    method texi_of_exception : Odoc_info.Exception.t_exception -> string
    method texi_of_included_module : Odoc_info.Module.included_module -> string
    method texi_of_info : Odoc_info.info option -> string
    method texi_of_method : Odoc_info.Value.t_method -> string
    method texi_of_module : Odoc_info.Module.t_module -> string
    method texi_of_module_element : Odoc_info.Name.t -> @@ -73,14 +73,14 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_desc : Odoc_info.text option -> Odoc_info.text_element list
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> - Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -94,4 +94,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/ocaml/Odoc_texi/module-type-Texi_generator/index.html b/ocaml/Odoc_texi/module-type-Texi_generator/index.html index 97585c5..2f05036 100644 --- a/ocaml/Odoc_texi/module-type-Texi_generator/index.html +++ b/ocaml/Odoc_texi/module-type-Texi_generator/index.html @@ -1,2 +1,2 @@ -Texi_generator (ocaml.Odoc_texi.Texi_generator)

    Module type Odoc_texi.Texi_generator

    class texi : object ... end
    \ No newline at end of file +Texi_generator (ocaml.Odoc_texi.Texi_generator)

    Module type Odoc_texi.Texi_generator

    class texi : object ... end
    diff --git a/ocaml/Odoc_text/Texter/index.html b/ocaml/Odoc_text/Texter/index.html index 2dc1fcd..f85e3b3 100644 --- a/ocaml/Odoc_text/Texter/index.html +++ b/ocaml/Odoc_text/Texter/index.html @@ -1,2 +1,2 @@ -Texter (ocaml.Odoc_text.Texter)

    Module Odoc_text.Texter

    val text_of_string : string -> Odoc_types.text
    val string_of_text : Odoc_types.text -> string
    \ No newline at end of file +Texter (ocaml.Odoc_text.Texter)

    Module Odoc_text.Texter

    val text_of_string : string -> Odoc_types.text
    val string_of_text : Odoc_types.text -> string
    diff --git a/ocaml/Odoc_text/index.html b/ocaml/Odoc_text/index.html index c66b997..fb58f53 100644 --- a/ocaml/Odoc_text/index.html +++ b/ocaml/Odoc_text/index.html @@ -1,2 +1,2 @@ -Odoc_text (ocaml.Odoc_text)

    Module Odoc_text

    exception Text_syntax of int * int * string
    module Texter : sig ... end
    \ No newline at end of file +Odoc_text (ocaml.Odoc_text)

    Module Odoc_text

    exception Text_syntax of int * int * string
    module Texter : sig ... end
    diff --git a/ocaml/Odoc_text_lexer/index.html b/ocaml/Odoc_text_lexer/index.html index 8df7e48..3a5dda4 100644 --- a/ocaml/Odoc_text_lexer/index.html +++ b/ocaml/Odoc_text_lexer/index.html @@ -1,2 +1,2 @@ -Odoc_text_lexer (ocaml.Odoc_text_lexer)

    Module Odoc_text_lexer

    The lexer for string to build text structures.

    val line_number : int ref
    val char_number : int ref
    val init : unit -> unit
    \ No newline at end of file +Odoc_text_lexer (ocaml.Odoc_text_lexer)

    Module Odoc_text_lexer

    The lexer for string to build text structures.

    val line_number : int ref
    val char_number : int ref
    val init : unit -> unit
    diff --git a/ocaml/Odoc_text_parser/index.html b/ocaml/Odoc_text_parser/index.html index 76389ed..e624836 100644 --- a/ocaml/Odoc_text_parser/index.html +++ b/ocaml/Odoc_text_parser/index.html @@ -1,8 +1,8 @@ -Odoc_text_parser (ocaml.Odoc_text_parser)

    Module Odoc_text_parser

    type token =
    1. | END
    2. | Title of int * string option
    3. | BOLD
    4. | EMP
    5. | CENTER
    6. | LEFT
    7. | RIGHT
    8. | ITALIC
    9. | CUSTOM of string
    10. | LIST
    11. | ENUM
    12. | ITEM
    13. | CODE
    14. | END_CODE
    15. | CODE_PRE
    16. | END_CODE_PRE
    17. | VERB
    18. | END_VERB
    19. | LATEX
    20. | Target of string
    21. | END_TARGET
    22. | LBRACE
    23. | ELE_REF
    24. | VAL_REF
    25. | TYP_REF
    26. | EXT_REF
    27. | EXC_REF
    28. | MOD_REF
    29. | MODT_REF
    30. | CLA_REF
    31. | CLT_REF
    32. | ATT_REF
    33. | MET_REF
    34. | SEC_REF
    35. | RECF_REF
    36. | CONST_REF
    37. | MOD_LIST_REF
    38. | INDEX_LIST
    39. | SUPERSCRIPT
    40. | SUBSCRIPT
    41. | BEGIN_SHORTCUT_LIST_ITEM
    42. | BEGIN_SHORTCUT_ENUM_ITEM
    43. | SHORTCUT_LIST_ITEM
    44. | SHORTCUT_ENUM_ITEM
    45. | END_SHORTCUT_LIST
    46. | BLANK_LINE
    47. | EOF
    48. | Char of string
    val main : +Odoc_text_parser (ocaml.Odoc_text_parser)

    Module Odoc_text_parser

    type token =
    1. | END
    2. | Title of int * string option
    3. | BOLD
    4. | EMP
    5. | CENTER
    6. | LEFT
    7. | RIGHT
    8. | ITALIC
    9. | CUSTOM of string
    10. | LIST
    11. | ENUM
    12. | ITEM
    13. | CODE
    14. | END_CODE
    15. | CODE_PRE
    16. | END_CODE_PRE
    17. | VERB
    18. | END_VERB
    19. | LATEX
    20. | Target of string
    21. | END_TARGET
    22. | LBRACE
    23. | ELE_REF
    24. | VAL_REF
    25. | TYP_REF
    26. | EXT_REF
    27. | EXC_REF
    28. | MOD_REF
    29. | MODT_REF
    30. | CLA_REF
    31. | CLT_REF
    32. | ATT_REF
    33. | MET_REF
    34. | SEC_REF
    35. | RECF_REF
    36. | CONST_REF
    37. | MOD_LIST_REF
    38. | INDEX_LIST
    39. | SUPERSCRIPT
    40. | SUBSCRIPT
    41. | BEGIN_SHORTCUT_LIST_ITEM
    42. | BEGIN_SHORTCUT_ENUM_ITEM
    43. | SHORTCUT_LIST_ITEM
    44. | SHORTCUT_ENUM_ITEM
    45. | END_SHORTCUT_LIST
    46. | BLANK_LINE
    47. | EOF
    48. | Char of string
    val located_element_list : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - (int * int * Odoc_types.text_element) list
    \ No newline at end of file + (int * int * Odoc_types.text_element) list
    diff --git a/ocaml/Odoc_to_text/class-to_text/index.html b/ocaml/Odoc_to_text/class-to_text/index.html index 6b9362e..c2ea032 100644 --- a/ocaml/Odoc_to_text/class-to_text/index.html +++ b/ocaml/Odoc_to_text/class-to_text/index.html @@ -1,15 +1,15 @@ -to_text (ocaml.Odoc_to_text.to_text)

    Class Odoc_to_text.to_text

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method virtual label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> +to_text (ocaml.Odoc_to_text.to_text)

    Class Odoc_to_text.to_text

    val mutable tag_functions : (string * (Odoc_info.text -> Odoc_info.text)) list
    method virtual label : ?no_:bool -> string -> string
    method normal_class_params : Odoc_info.Name.t -> Odoc_info.Class.t_class -> string
    method normal_class_type : Odoc_info.Name.t -> Types.class_type -> string
    method normal_class_type_param_list : Odoc_info.Name.t -> Types.type_expr list -> - string
    method normal_cstr_args : ?par:bool -> + string
    method normal_cstr_args : ?par:bool -> Odoc_info.Name.t -> Odoc_info.Type.constructor_args -> - string
    method normal_module_type : ?code:string -> + string
    method normal_module_type : ?code:string -> Odoc_info.Name.t -> Types.module_type -> - string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> + string
    method normal_type : Odoc_info.Name.t -> Types.type_expr -> string
    method normal_type_list : ?par:bool -> Odoc_info.Name.t -> string -> Types.type_expr list -> @@ -24,14 +24,14 @@ Odoc_info.text_element list
    method text_of_class_type_param_expr_list : Odoc_info.Name.t -> Types.type_expr list -> Odoc_info.text_element list
    method text_of_custom : (string * Odoc_info.text) list -> Odoc_info.text
    method text_of_exception : Odoc_info.Exception.t_exception -> - Odoc_info.text_element list
    method text_of_info : ?block:bool -> + Odoc_info.text_element list
    method text_of_info : ?block:bool -> Odoc_info.info option -> - Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_method : Odoc_info.Value.t_method -> Odoc_info.text_element list
    method text_of_module_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_kind -> Odoc_info.text_element list
    method text_of_module_parameter_list : (Odoc_info.Module.module_parameter * Odoc_info.text_element list option) list -> - Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> + Odoc_info.text_element list
    method text_of_module_type : Types.module_type -> Odoc_info.text_element list
    method text_of_module_type_kind : ?with_def_syntax:bool -> Odoc_info.Module.module_type_kind -> Odoc_info.text_element list
    method text_of_parameter_description : Odoc_info.Parameter.parameter -> Odoc_info.text
    method text_of_parameter_list : Odoc_info.Name.t -> @@ -45,4 +45,4 @@ Odoc_info.text_element list
    method text_of_type_expr_list : Odoc_info.Name.t -> string -> Types.type_expr list -> - Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    \ No newline at end of file + Odoc_info.text_element list
    method text_of_value : Odoc_info.Value.t_value -> Odoc_info.text_element list
    method text_of_version_opt : string option -> Odoc_info.text_element list
    diff --git a/ocaml/Odoc_to_text/index.html b/ocaml/Odoc_to_text/index.html index 1879d23..47eebbc 100644 --- a/ocaml/Odoc_to_text/index.html +++ b/ocaml/Odoc_to_text/index.html @@ -1,2 +1,2 @@ -Odoc_to_text (ocaml.Odoc_to_text)

    Module Odoc_to_text

    Text generation.

    class virtual to_text : object ... end
    \ No newline at end of file +Odoc_to_text (ocaml.Odoc_to_text)

    Module Odoc_to_text

    Text generation.

    class virtual to_text : object ... end
    diff --git a/ocaml/Odoc_type/index.html b/ocaml/Odoc_type/index.html index 693e841..ca6a853 100644 --- a/ocaml/Odoc_type/index.html +++ b/ocaml/Odoc_type/index.html @@ -1,2 +1,2 @@ -Odoc_type (ocaml.Odoc_type)

    Module Odoc_type

    Representation and manipulation of a type, but not class nor module type.

    This module has an implementation although it declares only types. This is because other modules use the let module construct or access it so it is needed as a real module.

    module Name = Odoc_name
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type record_field = {
    1. rf_name : string;
    2. rf_mutable : bool;
    3. rf_type : Types.type_expr;
    4. mutable rf_text : Odoc_types.info option;
    }

    Description of a record type field.

    type constructor_args =
    1. | Cstr_record of record_field list
    2. | Cstr_tuple of Types.type_expr list
    type variant_constructor = {
    1. vc_name : string;
    2. vc_args : constructor_args;
    3. vc_ret : Types.type_expr option;
    4. mutable vc_text : Odoc_types.info option;
    }

    Description of a variant type constructor.

    type type_kind =
    1. | Type_abstract
    2. | Type_variant of variant_constructor list
    3. | Type_record of record_field list
    4. | Type_open
      (*

      The various kinds of type.

      *)
    type object_field = {
    1. of_name : string;
    2. of_type : Types.type_expr;
    3. mutable of_text : Odoc_types.info option;
    }
    type type_manifest =
    1. | Other of Types.type_expr
    2. | Object_type of object_field list
    type t_type = {
    1. ty_name : Name.t;
    2. mutable ty_info : Odoc_types.info option;
    3. ty_parameters : (Types.type_expr * Types.Variance.t) list;
    4. ty_kind : type_kind;
    5. ty_private : private_flag;
    6. ty_manifest : type_manifest option;
    7. mutable ty_loc : Odoc_types.location;
    8. mutable ty_code : string option;
    }

    Representation of a type.

    \ No newline at end of file +Odoc_type (ocaml.Odoc_type)

    Module Odoc_type

    Representation and manipulation of a type, but not class nor module type.

    This module has an implementation although it declares only types. This is because other modules use the let module construct or access it so it is needed as a real module.

    module Name = Odoc_name
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type record_field = {
    1. rf_name : string;
    2. rf_mutable : bool;
    3. rf_type : Types.type_expr;
    4. mutable rf_text : Odoc_types.info option;
    }

    Description of a record type field.

    type constructor_args =
    1. | Cstr_record of record_field list
    2. | Cstr_tuple of Types.type_expr list
    type variant_constructor = {
    1. vc_name : string;
    2. vc_args : constructor_args;
    3. vc_ret : Types.type_expr option;
    4. mutable vc_text : Odoc_types.info option;
    }

    Description of a variant type constructor.

    type type_kind =
    1. | Type_abstract
    2. | Type_variant of variant_constructor list
    3. | Type_record of record_field list
    4. | Type_open
      (*

      The various kinds of type.

      *)
    type object_field = {
    1. of_name : string;
    2. of_type : Types.type_expr;
    3. mutable of_text : Odoc_types.info option;
    }
    type type_manifest =
    1. | Other of Types.type_expr
    2. | Object_type of object_field list
    type t_type = {
    1. ty_name : Name.t;
    2. mutable ty_info : Odoc_types.info option;
    3. ty_parameters : (Types.type_expr * Types.Variance.t) list;
    4. ty_kind : type_kind;
    5. ty_private : private_flag;
    6. ty_manifest : type_manifest option;
    7. mutable ty_loc : Odoc_types.location;
    8. mutable ty_code : string option;
    }

    Representation of a type.

    diff --git a/ocaml/Odoc_types/index.html b/ocaml/Odoc_types/index.html index 5847fa1..af3ba35 100644 --- a/ocaml/Odoc_types/index.html +++ b/ocaml/Odoc_types/index.html @@ -1,2 +1,2 @@ -Odoc_types (ocaml.Odoc_types)

    Module Odoc_types

    type ref_kind =
    1. | RK_module
    2. | RK_module_type
    3. | RK_class
    4. | RK_class_type
    5. | RK_value
    6. | RK_type
    7. | RK_extension
    8. | RK_exception
    9. | RK_attribute
    10. | RK_method
    11. | RK_section of text
    12. | RK_recfield
    13. | RK_const
    and text_element =
    1. | Raw of string
    2. | Code of string
    3. | CodePre of string
    4. | Verbatim of string
    5. | Bold of text
    6. | Italic of text
    7. | Emphasize of text
    8. | Center of text
    9. | Left of text
    10. | Right of text
    11. | List of text list
    12. | Enum of text list
    13. | Newline
    14. | Block of text
    15. | Title of int * string option * text
    16. | Latex of string
    17. | Ref of string * ref_kind option * text option
    18. | Superscript of text
    19. | Subscript of text
    20. | Module_list of string list
    21. | Index_list
    22. | Custom of string * text
    23. | Target of string * string
    and text = text_element list
    type see_ref =
    1. | See_url of string
    2. | See_file of string
    3. | See_doc of string
    type see = see_ref * text
    type param = string * text
    type raised_exception = string * text
    type alert = {
    1. alert_name : string;
    2. alert_payload : string option;
    }
    type info = {
    1. i_desc : text option;
    2. i_authors : string list;
    3. i_version : string option;
    4. i_sees : see list;
    5. i_since : string option;
    6. i_before : (string * text) list;
    7. i_deprecated : text option;
    8. i_params : param list;
    9. i_raised_exceptions : raised_exception list;
    10. i_return_value : text option;
    11. i_custom : (string * text) list;
    12. i_alerts : alert list;
    }
    val dummy_info : info
    type location = {
    1. loc_impl : Location.t option;
    2. loc_inter : Location.t option;
    }
    val dummy_loc : location
    type merge_option =
    1. | Merge_description
    2. | Merge_author
    3. | Merge_version
    4. | Merge_see
    5. | Merge_since
    6. | Merge_before
    7. | Merge_deprecated
    8. | Merge_param
    9. | Merge_raised_exception
    10. | Merge_return_value
    11. | Merge_custom
    val all_merge_options : merge_option list
    type magic
    val magic : magic
    type 'a dump
    val make_dump : 'a -> 'a dump
    val open_dump : 'a dump -> 'a
    \ No newline at end of file +Odoc_types (ocaml.Odoc_types)

    Module Odoc_types

    type ref_kind =
    1. | RK_module
    2. | RK_module_type
    3. | RK_class
    4. | RK_class_type
    5. | RK_value
    6. | RK_type
    7. | RK_extension
    8. | RK_exception
    9. | RK_attribute
    10. | RK_method
    11. | RK_section of text
    12. | RK_recfield
    13. | RK_const
    and text_element =
    1. | Raw of string
    2. | Code of string
    3. | CodePre of string
    4. | Verbatim of string
    5. | Bold of text
    6. | Italic of text
    7. | Emphasize of text
    8. | Center of text
    9. | Left of text
    10. | Right of text
    11. | List of text list
    12. | Enum of text list
    13. | Newline
    14. | Block of text
    15. | Title of int * string option * text
    16. | Latex of string
    17. | Ref of string * ref_kind option * text option
    18. | Superscript of text
    19. | Subscript of text
    20. | Module_list of string list
    21. | Index_list
    22. | Custom of string * text
    23. | Target of string * string
    and text = text_element list
    type see_ref =
    1. | See_url of string
    2. | See_file of string
    3. | See_doc of string
    type see = see_ref * text
    type param = string * text
    type raised_exception = string * text
    type alert = {
    1. alert_name : string;
    2. alert_payload : string option;
    }
    type info = {
    1. i_desc : text option;
    2. i_authors : string list;
    3. i_version : string option;
    4. i_sees : see list;
    5. i_since : string option;
    6. i_before : (string * text) list;
    7. i_deprecated : text option;
    8. i_params : param list;
    9. i_raised_exceptions : raised_exception list;
    10. i_return_value : text option;
    11. i_custom : (string * text) list;
    12. i_alerts : alert list;
    }
    val dummy_info : info
    type location = {
    1. loc_impl : Location.t option;
    2. loc_inter : Location.t option;
    }
    val dummy_loc : location
    type merge_option =
    1. | Merge_description
    2. | Merge_author
    3. | Merge_version
    4. | Merge_see
    5. | Merge_since
    6. | Merge_before
    7. | Merge_deprecated
    8. | Merge_param
    9. | Merge_raised_exception
    10. | Merge_return_value
    11. | Merge_custom
    val all_merge_options : merge_option list
    type magic
    val magic : magic
    type 'a dump
    val make_dump : 'a -> 'a dump
    val open_dump : 'a dump -> 'a
    diff --git a/ocaml/Odoc_value/index.html b/ocaml/Odoc_value/index.html index 3e30589..28eee69 100644 --- a/ocaml/Odoc_value/index.html +++ b/ocaml/Odoc_value/index.html @@ -1,2 +1,2 @@ -Odoc_value (ocaml.Odoc_value)

    Module Odoc_value

    Representation and manipulation of values, class attributes and class methods.

    module Name = Odoc_name

    Types

    type t_value = {
    1. val_name : Name.t;
    2. mutable val_info : Odoc_types.info option;
    3. val_type : Types.type_expr;
    4. val_recursive : bool;
    5. mutable val_parameters : Odoc_parameter.parameter list;
    6. mutable val_code : string option;
    7. mutable val_loc : Odoc_types.location;
    }

    Representation of a value.

    type t_attribute = {
    1. att_value : t_value;
    2. att_mutable : bool;
    3. att_virtual : bool;
    }

    Representation of a class attribute.

    type t_method = {
    1. met_value : t_value;
    2. met_private : bool;
    3. met_virtual : bool;
    }

    Representation of a class method.

    Functions

    val value_parameter_text_by_name : t_value -> string -> Odoc_types.text option

    Returns the text associated to the given parameter name in the given value, or None.

    val update_value_parameters_text : t_value -> unit

    Update the parameters text of a t_value, according to the val_info field.

    val dummy_parameter_list : Types.type_expr -> Odoc_parameter.param_info list

    Create a list of parameters with dummy names "??" from a type list. Used when we want to merge the parameters of a value, from the .ml and the .mli file. In the .mli file we don't have parameter names so there is nothing to merge. With this dummy list we can merge the parameter names from the .ml and the type from the .mli file.

    val is_function : t_value -> bool

    Return true if the value is a function, i.e. has a functional type.

    \ No newline at end of file +Odoc_value (ocaml.Odoc_value)

    Module Odoc_value

    Representation and manipulation of values, class attributes and class methods.

    module Name = Odoc_name

    Types

    type t_value = {
    1. val_name : Name.t;
    2. mutable val_info : Odoc_types.info option;
    3. val_type : Types.type_expr;
    4. val_recursive : bool;
    5. mutable val_parameters : Odoc_parameter.parameter list;
    6. mutable val_code : string option;
    7. mutable val_loc : Odoc_types.location;
    }

    Representation of a value.

    type t_attribute = {
    1. att_value : t_value;
    2. att_mutable : bool;
    3. att_virtual : bool;
    }

    Representation of a class attribute.

    type t_method = {
    1. met_value : t_value;
    2. met_private : bool;
    3. met_virtual : bool;
    }

    Representation of a class method.

    Functions

    val value_parameter_text_by_name : t_value -> string -> Odoc_types.text option

    Returns the text associated to the given parameter name in the given value, or None.

    val update_value_parameters_text : t_value -> unit

    Update the parameters text of a t_value, according to the val_info field.

    val dummy_parameter_list : Types.type_expr -> Odoc_parameter.param_info list

    Create a list of parameters with dummy names "??" from a type list. Used when we want to merge the parameters of a value, from the .ml and the .mli file. In the .mli file we don't have parameter names so there is nothing to merge. With this dummy list we can merge the parameter names from the .ml and the type from the .mli file.

    val is_function : t_value -> bool

    Return true if the value is a function, i.e. has a functional type.

    diff --git a/ocaml/Opcodes/index.html b/ocaml/Opcodes/index.html index 2460c83..209cdc4 100644 --- a/ocaml/Opcodes/index.html +++ b/ocaml/Opcodes/index.html @@ -1,2 +1,2 @@ -Opcodes (ocaml.Opcodes)

    Module Opcodes

    val opACC0 : int
    val opACC1 : int
    val opACC2 : int
    val opACC3 : int
    val opACC4 : int
    val opACC5 : int
    val opACC6 : int
    val opACC7 : int
    val opACC : int
    val opPUSH : int
    val opPUSHACC0 : int
    val opPUSHACC1 : int
    val opPUSHACC2 : int
    val opPUSHACC3 : int
    val opPUSHACC4 : int
    val opPUSHACC5 : int
    val opPUSHACC6 : int
    val opPUSHACC7 : int
    val opPUSHACC : int
    val opPOP : int
    val opASSIGN : int
    val opENVACC1 : int
    val opENVACC2 : int
    val opENVACC3 : int
    val opENVACC4 : int
    val opENVACC : int
    val opPUSHENVACC1 : int
    val opPUSHENVACC2 : int
    val opPUSHENVACC3 : int
    val opPUSHENVACC4 : int
    val opPUSHENVACC : int
    val opPUSH_RETADDR : int
    val opAPPLY : int
    val opAPPLY1 : int
    val opAPPLY2 : int
    val opAPPLY3 : int
    val opAPPTERM : int
    val opAPPTERM1 : int
    val opAPPTERM2 : int
    val opAPPTERM3 : int
    val opRETURN : int
    val opRESTART : int
    val opGRAB : int
    val opCLOSURE : int
    val opCLOSUREREC : int
    val opOFFSETCLOSUREM3 : int
    val opOFFSETCLOSURE0 : int
    val opOFFSETCLOSURE3 : int
    val opOFFSETCLOSURE : int
    val opPUSHOFFSETCLOSUREM3 : int
    val opPUSHOFFSETCLOSURE0 : int
    val opPUSHOFFSETCLOSURE3 : int
    val opPUSHOFFSETCLOSURE : int
    val opGETGLOBAL : int
    val opPUSHGETGLOBAL : int
    val opGETGLOBALFIELD : int
    val opPUSHGETGLOBALFIELD : int
    val opSETGLOBAL : int
    val opATOM0 : int
    val opATOM : int
    val opPUSHATOM0 : int
    val opPUSHATOM : int
    val opMAKEBLOCK : int
    val opMAKEBLOCK1 : int
    val opMAKEBLOCK2 : int
    val opMAKEBLOCK3 : int
    val opMAKEFLOATBLOCK : int
    val opGETFIELD0 : int
    val opGETFIELD1 : int
    val opGETFIELD2 : int
    val opGETFIELD3 : int
    val opGETFIELD : int
    val opGETFLOATFIELD : int
    val opSETFIELD0 : int
    val opSETFIELD1 : int
    val opSETFIELD2 : int
    val opSETFIELD3 : int
    val opSETFIELD : int
    val opSETFLOATFIELD : int
    val opVECTLENGTH : int
    val opGETVECTITEM : int
    val opSETVECTITEM : int
    val opGETBYTESCHAR : int
    val opSETBYTESCHAR : int
    val opBRANCH : int
    val opBRANCHIF : int
    val opBRANCHIFNOT : int
    val opSWITCH : int
    val opBOOLNOT : int
    val opPUSHTRAP : int
    val opPOPTRAP : int
    val opRAISE : int
    val opCHECK_SIGNALS : int
    val opC_CALL1 : int
    val opC_CALL2 : int
    val opC_CALL3 : int
    val opC_CALL4 : int
    val opC_CALL5 : int
    val opC_CALLN : int
    val opCONST0 : int
    val opCONST1 : int
    val opCONST2 : int
    val opCONST3 : int
    val opCONSTINT : int
    val opPUSHCONST0 : int
    val opPUSHCONST1 : int
    val opPUSHCONST2 : int
    val opPUSHCONST3 : int
    val opPUSHCONSTINT : int
    val opNEGINT : int
    val opADDINT : int
    val opSUBINT : int
    val opMULINT : int
    val opDIVINT : int
    val opMODINT : int
    val opANDINT : int
    val opORINT : int
    val opXORINT : int
    val opLSLINT : int
    val opLSRINT : int
    val opASRINT : int
    val opEQ : int
    val opNEQ : int
    val opLTINT : int
    val opLEINT : int
    val opGTINT : int
    val opGEINT : int
    val opOFFSETINT : int
    val opOFFSETREF : int
    val opISINT : int
    val opGETMETHOD : int
    val opBEQ : int
    val opBNEQ : int
    val opBLTINT : int
    val opBLEINT : int
    val opBGTINT : int
    val opBGEINT : int
    val opULTINT : int
    val opUGEINT : int
    val opBULTINT : int
    val opBUGEINT : int
    val opGETPUBMET : int
    val opGETDYNMET : int
    val opSTOP : int
    val opEVENT : int
    val opBREAK : int
    val opRERAISE : int
    val opRAISE_NOTRACE : int
    val opGETSTRINGCHAR : int
    val opPERFORM : int
    val opRESUME : int
    val opRESUMETERM : int
    val opREPERFORMTERM : int
    \ No newline at end of file +Opcodes (ocaml.Opcodes)

    Module Opcodes

    val opACC0 : int
    val opACC1 : int
    val opACC2 : int
    val opACC3 : int
    val opACC4 : int
    val opACC5 : int
    val opACC6 : int
    val opACC7 : int
    val opACC : int
    val opPUSH : int
    val opPUSHACC0 : int
    val opPUSHACC1 : int
    val opPUSHACC2 : int
    val opPUSHACC3 : int
    val opPUSHACC4 : int
    val opPUSHACC5 : int
    val opPUSHACC6 : int
    val opPUSHACC7 : int
    val opPUSHACC : int
    val opPOP : int
    val opASSIGN : int
    val opENVACC1 : int
    val opENVACC2 : int
    val opENVACC3 : int
    val opENVACC4 : int
    val opENVACC : int
    val opPUSHENVACC1 : int
    val opPUSHENVACC2 : int
    val opPUSHENVACC3 : int
    val opPUSHENVACC4 : int
    val opPUSHENVACC : int
    val opPUSH_RETADDR : int
    val opAPPLY : int
    val opAPPLY1 : int
    val opAPPLY2 : int
    val opAPPLY3 : int
    val opAPPTERM : int
    val opAPPTERM1 : int
    val opAPPTERM2 : int
    val opAPPTERM3 : int
    val opRETURN : int
    val opRESTART : int
    val opGRAB : int
    val opCLOSURE : int
    val opCLOSUREREC : int
    val opOFFSETCLOSUREM3 : int
    val opOFFSETCLOSURE0 : int
    val opOFFSETCLOSURE3 : int
    val opOFFSETCLOSURE : int
    val opPUSHOFFSETCLOSUREM3 : int
    val opPUSHOFFSETCLOSURE0 : int
    val opPUSHOFFSETCLOSURE3 : int
    val opPUSHOFFSETCLOSURE : int
    val opGETGLOBAL : int
    val opPUSHGETGLOBAL : int
    val opGETGLOBALFIELD : int
    val opPUSHGETGLOBALFIELD : int
    val opSETGLOBAL : int
    val opATOM0 : int
    val opATOM : int
    val opPUSHATOM0 : int
    val opPUSHATOM : int
    val opMAKEBLOCK : int
    val opMAKEBLOCK1 : int
    val opMAKEBLOCK2 : int
    val opMAKEBLOCK3 : int
    val opMAKEFLOATBLOCK : int
    val opGETFIELD0 : int
    val opGETFIELD1 : int
    val opGETFIELD2 : int
    val opGETFIELD3 : int
    val opGETFIELD : int
    val opGETFLOATFIELD : int
    val opSETFIELD0 : int
    val opSETFIELD1 : int
    val opSETFIELD2 : int
    val opSETFIELD3 : int
    val opSETFIELD : int
    val opSETFLOATFIELD : int
    val opVECTLENGTH : int
    val opGETVECTITEM : int
    val opSETVECTITEM : int
    val opGETBYTESCHAR : int
    val opSETBYTESCHAR : int
    val opBRANCH : int
    val opBRANCHIF : int
    val opBRANCHIFNOT : int
    val opSWITCH : int
    val opBOOLNOT : int
    val opPUSHTRAP : int
    val opPOPTRAP : int
    val opRAISE : int
    val opCHECK_SIGNALS : int
    val opC_CALL1 : int
    val opC_CALL2 : int
    val opC_CALL3 : int
    val opC_CALL4 : int
    val opC_CALL5 : int
    val opC_CALLN : int
    val opCONST0 : int
    val opCONST1 : int
    val opCONST2 : int
    val opCONST3 : int
    val opCONSTINT : int
    val opPUSHCONST0 : int
    val opPUSHCONST1 : int
    val opPUSHCONST2 : int
    val opPUSHCONST3 : int
    val opPUSHCONSTINT : int
    val opNEGINT : int
    val opADDINT : int
    val opSUBINT : int
    val opMULINT : int
    val opDIVINT : int
    val opMODINT : int
    val opANDINT : int
    val opORINT : int
    val opXORINT : int
    val opLSLINT : int
    val opLSRINT : int
    val opASRINT : int
    val opEQ : int
    val opNEQ : int
    val opLTINT : int
    val opLEINT : int
    val opGTINT : int
    val opGEINT : int
    val opOFFSETINT : int
    val opOFFSETREF : int
    val opISINT : int
    val opGETMETHOD : int
    val opBEQ : int
    val opBNEQ : int
    val opBLTINT : int
    val opBLEINT : int
    val opBGTINT : int
    val opBGEINT : int
    val opULTINT : int
    val opUGEINT : int
    val opBULTINT : int
    val opBUGEINT : int
    val opGETPUBMET : int
    val opGETDYNMET : int
    val opSTOP : int
    val opEVENT : int
    val opBREAK : int
    val opRERAISE : int
    val opRAISE_NOTRACE : int
    val opGETSTRINGCHAR : int
    val opPERFORM : int
    val opRESUME : int
    val opRESUMETERM : int
    val opREPERFORMTERM : int
    diff --git a/ocaml/Oprint/index.html b/ocaml/Oprint/index.html index fd2f81c..dee0e60 100644 --- a/ocaml/Oprint/index.html +++ b/ocaml/Oprint/index.html @@ -1,5 +1,5 @@ -Oprint (ocaml.Oprint)

    Module Oprint

    val out_label : +Oprint (ocaml.Oprint)

    Module Oprint

    val out_label : (Stdlib.Format.formatter -> (string * bool * Outcometree.out_type) -> unit) @@ -15,4 +15,4 @@ unit) ref
    val out_type_extension : (Stdlib.Format.formatter -> Outcometree.out_type_extension -> unit) ref
    val out_phrase : - (Stdlib.Format.formatter -> Outcometree.out_phrase -> unit) ref
    val parenthesized_ident : string -> bool
    \ No newline at end of file + (Stdlib.Format.formatter -> Outcometree.out_phrase -> unit) ref
    val parenthesized_ident : string -> bool
    diff --git a/ocaml/Optcompile/index.html b/ocaml/Optcompile/index.html index ec1bc82..5ace1af 100644 --- a/ocaml/Optcompile/index.html +++ b/ocaml/Optcompile/index.html @@ -1,9 +1,9 @@ -Optcompile (ocaml.Optcompile)

    Module Optcompile

    Native compilation for .ml and .mli files.

    val interface : source_file:string -> output_prefix:string -> unit
    val implementation : - backend:(module Backend_intf.S) -> - start_from:Clflags.Compiler_pass.t -> - source_file:string -> - output_prefix:string -> +Optcompile (ocaml.Optcompile)

    Module Optcompile

    Native compilation for .ml and .mli files.

    val interface : source_file:string -> output_prefix:string -> unit
    val implementation : + backend:(module Backend_intf.S) -> + start_from:Clflags.Compiler_pass.t -> + source_file:string -> + output_prefix:string -> unit

    Internal functions

    *

    val clambda : Compile_common.info -> (module Backend_intf.S) -> @@ -12,4 +12,4 @@ Compile_common.info -> (module Backend_intf.S) -> Typedtree.implementation -> - unit

    flambda info backend typed applies the Flambda compilation pipeline to the given typechecked implementation and outputs the resulting files.

    \ No newline at end of file + unit

    flambda info backend typed applies the Flambda compilation pipeline to the given typechecked implementation and outputs the resulting files.

    diff --git a/ocaml/Opterrors/index.html b/ocaml/Opterrors/index.html index a9e3234..3edd2ab 100644 --- a/ocaml/Opterrors/index.html +++ b/ocaml/Opterrors/index.html @@ -1,2 +1,2 @@ -Opterrors (ocaml.Opterrors)

    Module Opterrors

    val report_error : Stdlib.Format.formatter -> exn -> unit
    \ No newline at end of file +Opterrors (ocaml.Opterrors)

    Module Opterrors

    val report_error : Stdlib.Format.formatter -> exn -> unit
    diff --git a/ocaml/Optmain/index.html b/ocaml/Optmain/index.html index 7c1308f..868ba25 100644 --- a/ocaml/Optmain/index.html +++ b/ocaml/Optmain/index.html @@ -1,2 +1,2 @@ -Optmain (ocaml.Optmain)

    Module Optmain

    \ No newline at end of file +Optmain (ocaml.Optmain)

    Module Optmain

    diff --git a/ocaml/Optmaindriver/index.html b/ocaml/Optmaindriver/index.html index cf44bd3..d8debf7 100644 --- a/ocaml/Optmaindriver/index.html +++ b/ocaml/Optmaindriver/index.html @@ -1,2 +1,2 @@ -Optmaindriver (ocaml.Optmaindriver)

    Module Optmaindriver

    val main : string array -> Stdlib.Format.formatter -> int
    \ No newline at end of file +Optmaindriver (ocaml.Optmaindriver)

    Module Optmaindriver

    val main : string array -> Stdlib.Format.formatter -> int
    diff --git a/ocaml/Outcometree/index.html b/ocaml/Outcometree/index.html index cdd5b2f..ccd3a25 100644 --- a/ocaml/Outcometree/index.html +++ b/ocaml/Outcometree/index.html @@ -1,5 +1,5 @@ -Outcometree (ocaml.Outcometree)

    Module Outcometree

    type out_name = {
    1. mutable printed_name : string;
    }

    An out_name is a string representation of an identifier which can be rewritten on the fly to avoid name collisions

    type out_ident =
    1. | Oide_apply of out_ident * out_ident
    2. | Oide_dot of out_ident * string
    3. | Oide_ident of out_name
    type out_string =
    1. | Ostr_string
    2. | Ostr_bytes
    type out_attribute = {
    1. oattr_name : string;
    }
    type out_value =
    1. | Oval_array of out_value list
    2. | Oval_char of char
    3. | Oval_constr of out_ident * out_value list
    4. | Oval_ellipsis
    5. | Oval_float of float
    6. | Oval_int of int
    7. | Oval_int32 of int32
    8. | Oval_int64 of int64
    9. | Oval_nativeint of nativeint
    10. | Oval_list of out_value list
    11. | Oval_printer of Stdlib.Format.formatter -> unit
    12. | Oval_record of (out_ident * out_value) list
    13. | Oval_string of string * int * out_string
    14. | Oval_stuff of string
    15. | Oval_tuple of out_value list
    16. | Oval_variant of string * out_value option
    type out_type_param = string * (Asttypes.variance * Asttypes.injectivity)
    type out_type =
    1. | Otyp_abstract
    2. | Otyp_open
    3. | Otyp_alias of {
      1. non_gen : bool;
      2. aliased : out_type;
      3. alias : string;
      }
    4. | Otyp_arrow of string * out_type * out_type
    5. | Otyp_class of out_ident * out_type list
    6. | Otyp_constr of out_ident * out_type list
    7. | Otyp_manifest of out_type * out_type
    8. | Otyp_object of {
      1. fields : (string * out_type) list;
      2. open_row : bool;
      }
    9. | Otyp_record of (string * bool * out_type) list
    10. | Otyp_stuff of string
    11. | Otyp_sum of out_constructor list
    12. | Otyp_tuple of out_type list
    13. | Otyp_var of bool * string
    14. | Otyp_variant of out_variant * bool * string list option
    15. | Otyp_poly of string list * out_type
    16. | Otyp_module of out_ident * (string * out_type) list
    17. | Otyp_attribute of out_type * out_attribute
    and out_constructor = {
    1. ocstr_name : string;
    2. ocstr_args : out_type list;
    3. ocstr_return_type : out_type option;
    }
    and out_variant =
    1. | Ovar_fields of (string * bool * out_type list) list
    2. | Ovar_typ of out_type
    type out_class_type =
    1. | Octy_constr of out_ident * out_type list
    2. | Octy_arrow of string * out_type * out_class_type
    3. | Octy_signature of out_type option * out_class_sig_item list
    and out_class_sig_item =
    1. | Ocsg_constraint of out_type * out_type
    2. | Ocsg_method of string * bool * bool * out_type
    3. | Ocsg_value of string * bool * bool * out_type
    type out_module_type =
    1. | Omty_abstract
    2. | Omty_functor of (string option * out_module_type) option * out_module_type
    3. | Omty_ident of out_ident
    4. | Omty_signature of out_sig_item list
    5. | Omty_alias of out_ident
    and out_sig_item =
    1. | Osig_class of bool +Outcometree (ocaml.Outcometree)

      Module Outcometree

      type out_name = {
      1. mutable printed_name : string;
      }

      An out_name is a string representation of an identifier which can be rewritten on the fly to avoid name collisions

      type out_ident =
      1. | Oide_apply of out_ident * out_ident
      2. | Oide_dot of out_ident * string
      3. | Oide_ident of out_name
      type out_string =
      1. | Ostr_string
      2. | Ostr_bytes
      type out_attribute = {
      1. oattr_name : string;
      }
      type out_value =
      1. | Oval_array of out_value list
      2. | Oval_char of char
      3. | Oval_constr of out_ident * out_value list
      4. | Oval_ellipsis
      5. | Oval_float of float
      6. | Oval_int of int
      7. | Oval_int32 of int32
      8. | Oval_int64 of int64
      9. | Oval_nativeint of nativeint
      10. | Oval_list of out_value list
      11. | Oval_printer of Stdlib.Format.formatter -> unit
      12. | Oval_record of (out_ident * out_value) list
      13. | Oval_string of string * int * out_string
      14. | Oval_stuff of string
      15. | Oval_tuple of out_value list
      16. | Oval_variant of string * out_value option
      type out_type_param = string * (Asttypes.variance * Asttypes.injectivity)
      type out_type =
      1. | Otyp_abstract
      2. | Otyp_open
      3. | Otyp_alias of {
        1. non_gen : bool;
        2. aliased : out_type;
        3. alias : string;
        }
      4. | Otyp_arrow of string * out_type * out_type
      5. | Otyp_class of out_ident * out_type list
      6. | Otyp_constr of out_ident * out_type list
      7. | Otyp_manifest of out_type * out_type
      8. | Otyp_object of {
        1. fields : (string * out_type) list;
        2. open_row : bool;
        }
      9. | Otyp_record of (string * bool * out_type) list
      10. | Otyp_stuff of string
      11. | Otyp_sum of out_constructor list
      12. | Otyp_tuple of out_type list
      13. | Otyp_var of bool * string
      14. | Otyp_variant of out_variant * bool * string list option
      15. | Otyp_poly of string list * out_type
      16. | Otyp_module of out_ident * (string * out_type) list
      17. | Otyp_attribute of out_type * out_attribute
      and out_constructor = {
      1. ocstr_name : string;
      2. ocstr_args : out_type list;
      3. ocstr_return_type : out_type option;
      }
      and out_variant =
      1. | Ovar_fields of (string * bool * out_type list) list
      2. | Ovar_typ of out_type
      type out_class_type =
      1. | Octy_constr of out_ident * out_type list
      2. | Octy_arrow of string * out_type * out_class_type
      3. | Octy_signature of out_type option * out_class_sig_item list
      and out_class_sig_item =
      1. | Ocsg_constraint of out_type * out_type
      2. | Ocsg_method of string * bool * bool * out_type
      3. | Ocsg_value of string * bool * bool * out_type
      type out_module_type =
      1. | Omty_abstract
      2. | Omty_functor of (string option * out_module_type) option * out_module_type
      3. | Omty_ident of out_ident
      4. | Omty_signature of out_sig_item list
      5. | Omty_alias of out_ident
      and out_sig_item =
      1. | Osig_class of bool * string * out_type_param list * out_class_type @@ -7,4 +7,4 @@ * string * out_type_param list * out_class_type - * out_rec_status
      2. | Osig_typext of out_extension_constructor * out_ext_status
      3. | Osig_modtype of string * out_module_type
      4. | Osig_module of string * out_module_type * out_rec_status
      5. | Osig_type of out_type_decl * out_rec_status
      6. | Osig_value of out_val_decl
      7. | Osig_ellipsis
      and out_type_decl = {
      1. otype_name : string;
      2. otype_params : out_type_param list;
      3. otype_type : out_type;
      4. otype_private : Asttypes.private_flag;
      5. otype_immediate : Type_immediacy.t;
      6. otype_unboxed : bool;
      7. otype_cstrs : (out_type * out_type) list;
      }
      and out_extension_constructor = {
      1. oext_name : string;
      2. oext_type_name : string;
      3. oext_type_params : string list;
      4. oext_args : out_type list;
      5. oext_ret_type : out_type option;
      6. oext_private : Asttypes.private_flag;
      }
      and out_type_extension = {
      1. otyext_name : string;
      2. otyext_params : string list;
      3. otyext_constructors : out_constructor list;
      4. otyext_private : Asttypes.private_flag;
      }
      and out_val_decl = {
      1. oval_name : string;
      2. oval_type : out_type;
      3. oval_prims : string list;
      4. oval_attributes : out_attribute list;
      }
      and out_rec_status =
      1. | Orec_not
      2. | Orec_first
      3. | Orec_next
      and out_ext_status =
      1. | Oext_first
      2. | Oext_next
      3. | Oext_exception
      type out_phrase =
      1. | Ophr_eval of out_value * out_type
      2. | Ophr_signature of (out_sig_item * out_value option) list
      3. | Ophr_exception of exn * out_value
      \ No newline at end of file + * out_rec_status
    2. | Osig_typext of out_extension_constructor * out_ext_status
    3. | Osig_modtype of string * out_module_type
    4. | Osig_module of string * out_module_type * out_rec_status
    5. | Osig_type of out_type_decl * out_rec_status
    6. | Osig_value of out_val_decl
    7. | Osig_ellipsis
    and out_type_decl = {
    1. otype_name : string;
    2. otype_params : out_type_param list;
    3. otype_type : out_type;
    4. otype_private : Asttypes.private_flag;
    5. otype_immediate : Type_immediacy.t;
    6. otype_unboxed : bool;
    7. otype_cstrs : (out_type * out_type) list;
    }
    and out_extension_constructor = {
    1. oext_name : string;
    2. oext_type_name : string;
    3. oext_type_params : string list;
    4. oext_args : out_type list;
    5. oext_ret_type : out_type option;
    6. oext_private : Asttypes.private_flag;
    }
    and out_type_extension = {
    1. otyext_name : string;
    2. otyext_params : string list;
    3. otyext_constructors : out_constructor list;
    4. otyext_private : Asttypes.private_flag;
    }
    and out_val_decl = {
    1. oval_name : string;
    2. oval_type : out_type;
    3. oval_prims : string list;
    4. oval_attributes : out_attribute list;
    }
    and out_rec_status =
    1. | Orec_not
    2. | Orec_first
    3. | Orec_next
    and out_ext_status =
    1. | Oext_first
    2. | Oext_next
    3. | Oext_exception
    type out_phrase =
    1. | Ophr_eval of out_value * out_type
    2. | Ophr_signature of (out_sig_item * out_value option) list
    3. | Ophr_exception of exn * out_value
    diff --git a/ocaml/Parameter/List/index.html b/ocaml/Parameter/List/index.html index d45aa8a..d9a35e2 100644 --- a/ocaml/Parameter/List/index.html +++ b/ocaml/Parameter/List/index.html @@ -1,2 +1,2 @@ -List (ocaml.Parameter.List)

    Module Parameter.List

    val vars : t list -> Variable.t list

    extract variables from a list of parameters, preserving the order

    \ No newline at end of file +List (ocaml.Parameter.List)

    Module Parameter.List

    val vars : t list -> Variable.t list

    extract variables from a list of parameters, preserving the order

    diff --git a/ocaml/Parameter/Map/index.html b/ocaml/Parameter/Map/index.html index ca0af19..e7279a7 100644 --- a/ocaml/Parameter/Map/index.html +++ b/ocaml/Parameter/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Parameter.Map)

    Module Parameter.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Parameter.Map)

    Module Parameter.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Parameter/Set/index.html b/ocaml/Parameter/Set/index.html index 9ed2027..834ae8c 100644 --- a/ocaml/Parameter/Set/index.html +++ b/ocaml/Parameter/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Parameter.Set)

    Module Parameter.Set

    include Identifiable.Set with module T := T
    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    val vars : parameter list -> Variable.Set.t
    \ No newline at end of file +Set (ocaml.Parameter.Set)

    Module Parameter.Set

    include Identifiable.Set with module T := T
    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    val vars : parameter list -> Variable.Set.t
    diff --git a/ocaml/Parameter/T/index.html b/ocaml/Parameter/T/index.html index 00da65a..6c608b9 100644 --- a/ocaml/Parameter/T/index.html +++ b/ocaml/Parameter/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Parameter.T)

    Module Parameter.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Parameter.T)

    Module Parameter.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Parameter/Tbl/index.html b/ocaml/Parameter/Tbl/index.html index 69ddeee..794768c 100644 --- a/ocaml/Parameter/Tbl/index.html +++ b/ocaml/Parameter/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Parameter.Tbl)

    Module Parameter.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Parameter.Tbl)

    Module Parameter.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Parameter/index.html b/ocaml/Parameter/index.html index 15a0149..816a1c7 100644 --- a/ocaml/Parameter/index.html +++ b/ocaml/Parameter/index.html @@ -1,2 +1,2 @@ -Parameter (ocaml.Parameter)

    Module Parameter

    Parameter.t carries a unique Variable.t used as function parameter. It can also carry annotations about the usage of the variable.

    type t
    type parameter = t
    val wrap : Variable.t -> t

    Make a parameter from a variable with default attributes

    val var : t -> Variable.t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t

    Rename the inner variable of the parameter

    val map_var : (Variable.t -> Variable.t) -> t -> t
    module T : Identifiable.Thing with type t = t
    module Set : sig ... end
    include Identifiable.S with type t := t and module T := T and module Set := Set
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    module List : sig ... end
    \ No newline at end of file +Parameter (ocaml.Parameter)

    Module Parameter

    Parameter.t carries a unique Variable.t used as function parameter. It can also carry annotations about the usage of the variable.

    type t
    type parameter = t
    val wrap : Variable.t -> t

    Make a parameter from a variable with default attributes

    val var : t -> Variable.t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t

    Rename the inner variable of the parameter

    val map_var : (Variable.t -> Variable.t) -> t -> t
    module T : Identifiable.Thing with type t = t
    module Set : sig ... end
    include Identifiable.S with type t := t and module T := T and module Set := Set
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    module List : sig ... end
    diff --git a/ocaml/Parmatch/Compat/argument-1-_/index.html b/ocaml/Parmatch/Compat/argument-1-_/index.html index 8dab7ca..af865f2 100644 --- a/ocaml/Parmatch/Compat/argument-1-_/index.html +++ b/ocaml/Parmatch/Compat/argument-1-_/index.html @@ -1,5 +1,5 @@ -_ (ocaml.Parmatch.Compat._)

    Parameter Compat._

    val equal : +_ (ocaml.Parmatch.Compat._)

    Parameter Compat._

    \ No newline at end of file + bool
    diff --git a/ocaml/Parmatch/Compat/index.html b/ocaml/Parmatch/Compat/index.html index 3544818..395df91 100644 --- a/ocaml/Parmatch/Compat/index.html +++ b/ocaml/Parmatch/Compat/index.html @@ -1,2 +1,2 @@ -Compat (ocaml.Parmatch.Compat)

    Module Parmatch.Compat

    Exported compatibility functor, abstracted over constructor equality

    Parameters

    module _ : sig ... end

    Signature

    val compat : Typedtree.pattern -> Typedtree.pattern -> bool
    val compats : Typedtree.pattern list -> Typedtree.pattern list -> bool
    \ No newline at end of file +Compat (ocaml.Parmatch.Compat)

    Module Parmatch.Compat

    Exported compatibility functor, abstracted over constructor equality

    Parameters

    module _ : sig ... end

    Signature

    val compat : Typedtree.pattern -> Typedtree.pattern -> bool
    val compats : Typedtree.pattern list -> Typedtree.pattern list -> bool
    diff --git a/ocaml/Parmatch/index.html b/ocaml/Parmatch/index.html index 4606648..d97080d 100644 --- a/ocaml/Parmatch/index.html +++ b/ocaml/Parmatch/index.html @@ -1,5 +1,5 @@ -Parmatch (ocaml.Parmatch)

    Module Parmatch

    Detection of partial matches and unused match cases.

    val const_compare : Asttypes.constant -> Asttypes.constant -> int

    const_compare c1 c2 compares the actual values represented by c1 and c2, while simply using Stdlib.compare would compare the representations.

    cf. MPR#5758

    val le_pat : Typedtree.pattern -> Typedtree.pattern -> bool

    le_pat p q means: forall V, V matches q implies V matches p

    val le_pats : Typedtree.pattern list -> Typedtree.pattern list -> bool

    le_pats (p1 .. pm) (q1 .. qn) means: forall i <= m, le_pat pi qi

    module Compat (_ : sig ... end) : sig ... end

    Exported compatibility functor, abstracted over constructor equality

    exception Empty

    lub p q is a pattern that matches all values matched by p and q. May raise Empty, when p and q are not compatible.

    val lubs : +Parmatch (ocaml.Parmatch)

    Module Parmatch

    Detection of partial matches and unused match cases.

    val const_compare : Asttypes.constant -> Asttypes.constant -> int

    const_compare c1 c2 compares the actual values represented by c1 and c2, while simply using Stdlib.compare would compare the representations.

    cf. MPR#5758

    val le_pat : Typedtree.pattern -> Typedtree.pattern -> bool

    le_pat p q means: forall V, V matches q implies V matches p

    val le_pats : Typedtree.pattern list -> Typedtree.pattern list -> bool

    le_pats (p1 .. pm) (q1 .. qn) means: forall i <= m, le_pat pi qi

    module Compat (_ : sig ... end) : sig ... end

    Exported compatibility functor, abstracted over constructor equality

    exception Empty

    lub p q is a pattern that matches all values matched by p and q. May raise Empty, when p and q are not compatible.

    val lubs : Typedtree.pattern list -> Typedtree.pattern list -> Typedtree.pattern list

    lubs [p1; ...; pn] [q1; ...; qk], where n < k, is [lub p1 q1; ...; lub pk qk].

    val get_mins : ('a -> 'a -> bool) -> 'a list -> 'a list
    val set_args : @@ -24,4 +24,4 @@ Typedtree.partial

    check_partial pred loc caselist and check_unused refute pred caselist are called with a function pred which will be given counter-example candidates: they may be partially ill-typed, and have to be type-checked to extract a valid counter-example. pred returns a valid counter-example or None. refute indicates that check_unused was called on a refutation clause.

    val check_unused : (bool -> Typedtree.pattern -> Typedtree.pattern option) -> Typedtree.value Typedtree.case list -> - unit
    val irrefutable : Typedtree.pattern -> bool
    val inactive : partial:Typedtree.partial -> Typedtree.pattern -> bool

    An inactive pattern is a pattern, matching against which can be duplicated, erased or delayed without change in observable behavior of the program. Patterns containing (lazy _) subpatterns or reads of mutable fields are active.

    val check_ambiguous_bindings : Typedtree.value Typedtree.case list -> unit
    val some_private_tag : Asttypes.label
    \ No newline at end of file + unit
    val irrefutable : Typedtree.pattern -> bool
    val inactive : partial:Typedtree.partial -> Typedtree.pattern -> bool

    An inactive pattern is a pattern, matching against which can be duplicated, erased or delayed without change in observable behavior of the program. Patterns containing (lazy _) subpatterns or reads of mutable fields are active.

    val check_ambiguous_bindings : Typedtree.value Typedtree.case list -> unit
    val some_private_tag : Asttypes.label
    diff --git a/ocaml/Parse/index.html b/ocaml/Parse/index.html index b20d991..556d046 100644 --- a/ocaml/Parse/index.html +++ b/ocaml/Parse/index.html @@ -1,2 +1,2 @@ -Parse (ocaml.Parse)

    Module Parse

    Entry points in the parser

    Warning: this module is unstable and part of compiler-libs.

    The functions below can be used to parse Longident safely.

    The function longident is guaranteed to parse all subclasses of Longident.t used in OCaml: values, constructors, simple or extended module paths, and types or module types.

    However, this function accepts inputs which are not accepted by the compiler, because they combine functor applications and infix operators. In valid OCaml syntax, only value-level identifiers may end with infix operators Foo.( + ). Moreover, in value-level identifiers the module path Foo must be simple (M.N rather than F(X)): functor applications may only appear in type-level identifiers. As a consequence, a path such as F(X).( + ) is not a valid OCaml identifier; but it is accepted by this function.

    The next functions are specialized to a subclass of Longident.t

    This function parses a syntactically valid path for a value. For instance, x, M.x, and (+.) are valid. Contrarily, M.A, F(X).x, and true are rejected.

    Longident for OCaml's value cannot contain functor application. The last component of the Longident.t is not capitalized, but can be an operator A.Path.To.(.%.%.(;..)<-)

    val constr_ident : Stdlib.Lexing.lexbuf -> Longident.t

    This function parses a syntactically valid path for a variant constructor. For instance, A, M.A and M.(::) are valid, but both M.a and F(X).A are rejected.

    Longident for OCaml's variant constructors cannot contain functor application. The last component of the Longident.t is capitalized, or it may be one the special constructors: true,false,(),[],(::). Among those special constructors, only (::) can be prefixed by a module path (A.B.C.(::)).

    val simple_module_path : Stdlib.Lexing.lexbuf -> Longident.t

    This function parses a syntactically valid path for a module. For instance, A, and M.A are valid, but both M.a and F(X).A are rejected.

    Longident for OCaml's module cannot contain functor application. The last component of the Longident.t is capitalized.

    val extended_module_path : Stdlib.Lexing.lexbuf -> Longident.t

    This function parse syntactically valid path for an extended module. For instance, A.B and F(A).B are valid. Contrarily, (.%()) or [] are both rejected.

    The last component of the Longident.t is capitalized.

    val type_ident : Stdlib.Lexing.lexbuf -> Longident.t

    This function parse syntactically valid path for a type or a module type. For instance, A, t, M.t and F(X).t are valid. Contrarily, (.%()) or [] are both rejected.

    In path for type and module types, only operators and special constructors are rejected.

    \ No newline at end of file +Parse (ocaml.Parse)

    Module Parse

    Entry points in the parser

    Warning: this module is unstable and part of compiler-libs.

    The functions below can be used to parse Longident safely.

    The function longident is guaranteed to parse all subclasses of Longident.t used in OCaml: values, constructors, simple or extended module paths, and types or module types.

    However, this function accepts inputs which are not accepted by the compiler, because they combine functor applications and infix operators. In valid OCaml syntax, only value-level identifiers may end with infix operators Foo.( + ). Moreover, in value-level identifiers the module path Foo must be simple (M.N rather than F(X)): functor applications may only appear in type-level identifiers. As a consequence, a path such as F(X).( + ) is not a valid OCaml identifier; but it is accepted by this function.

    The next functions are specialized to a subclass of Longident.t

    This function parses a syntactically valid path for a value. For instance, x, M.x, and (+.) are valid. Contrarily, M.A, F(X).x, and true are rejected.

    Longident for OCaml's value cannot contain functor application. The last component of the Longident.t is not capitalized, but can be an operator A.Path.To.(.%.%.(;..)<-)

    val constr_ident : Stdlib.Lexing.lexbuf -> Longident.t

    This function parses a syntactically valid path for a variant constructor. For instance, A, M.A and M.(::) are valid, but both M.a and F(X).A are rejected.

    Longident for OCaml's variant constructors cannot contain functor application. The last component of the Longident.t is capitalized, or it may be one the special constructors: true,false,(),[],(::). Among those special constructors, only (::) can be prefixed by a module path (A.B.C.(::)).

    val simple_module_path : Stdlib.Lexing.lexbuf -> Longident.t

    This function parses a syntactically valid path for a module. For instance, A, and M.A are valid, but both M.a and F(X).A are rejected.

    Longident for OCaml's module cannot contain functor application. The last component of the Longident.t is capitalized.

    val extended_module_path : Stdlib.Lexing.lexbuf -> Longident.t

    This function parse syntactically valid path for an extended module. For instance, A.B and F(A).B are valid. Contrarily, (.%()) or [] are both rejected.

    The last component of the Longident.t is capitalized.

    val type_ident : Stdlib.Lexing.lexbuf -> Longident.t

    This function parse syntactically valid path for a type or a module type. For instance, A, t, M.t and F(X).t are valid. Contrarily, (.%()) or [] are both rejected.

    In path for type and module types, only operators and special constructors are rejected.

    diff --git a/ocaml/Parser/Incremental/index.html b/ocaml/Parser/Incremental/index.html index 28185ac..965a9fb 100644 --- a/ocaml/Parser/Incremental/index.html +++ b/ocaml/Parser/Incremental/index.html @@ -1,5 +1,5 @@ -Incremental (ocaml.Parser.Incremental)

    Module Parser.Incremental

    val use_file : +Incremental (ocaml.Parser.Incremental)

    Module Parser.Incremental

    \ No newline at end of file + Parsetree.structure MenhirInterpreter.checkpoint
    diff --git a/ocaml/Parser/MenhirInterpreter/index.html b/ocaml/Parser/MenhirInterpreter/index.html index 5663c42..4a7c180 100644 --- a/ocaml/Parser/MenhirInterpreter/index.html +++ b/ocaml/Parser/MenhirInterpreter/index.html @@ -1,18 +1,18 @@ -MenhirInterpreter (ocaml.Parser.MenhirInterpreter)

    Module Parser.MenhirInterpreter

    include CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE +MenhirInterpreter (ocaml.Parser.MenhirInterpreter)

    Module Parser.MenhirInterpreter

    include CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE with type token = token
    type token = token
    type production
    type 'a env
    type 'a checkpoint = private
    1. | InputNeeded of 'a env
    2. | Shifting of 'a env * 'a env * bool
    3. | AboutToReduce of 'a env * production
    4. | HandlingError of 'a env
    5. | Accepted of 'a
    6. | Rejected
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    type supplier = + 'a checkpoint
    type strategy = [
    1. | `Legacy
    2. | `Simplified
    ]
    val resume : ?strategy:strategy -> 'a checkpoint -> 'a checkpoint
    val lexer_lexbuf_to_supplier : (Stdlib.Lexing.lexbuf -> token) -> Stdlib.Lexing.lexbuf -> - supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : + supplier
    val loop : ?strategy:strategy -> supplier -> 'a checkpoint -> 'a
    val loop_handle : ('a -> 'answer) -> ('a checkpoint -> 'answer) -> supplier -> @@ -32,4 +32,4 @@ * CamlinternalMenhirLib.IncrementalEngine.position -> element
    val stack : 'a env -> stack
    val top : 'a env -> element option
    val pop_many : int -> 'a env -> 'a env option
    val get : int -> 'a env -> element option
    val current_state_number : 'a env -> int
    val equal : 'a env -> 'a env -> bool
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    \ No newline at end of file + * CamlinternalMenhirLib.IncrementalEngine.position
    val env_has_default_reduction : 'a env -> bool
    val state_has_default_reduction : _ lr1state -> bool
    val pop : 'a env -> 'a env option
    val force_reduction : production -> 'a env -> 'a env
    val input_needed : 'a env -> 'a checkpoint
    diff --git a/ocaml/Parser/index.html b/ocaml/Parser/index.html index 89c21d5..d84b6a7 100644 --- a/ocaml/Parser/index.html +++ b/ocaml/Parser/index.html @@ -1,5 +1,5 @@ -Parser (ocaml.Parser)

    Module Parser

    type token =
    1. | WITH
    2. | WHILE
    3. | WHEN
    4. | VIRTUAL
    5. | VAL
    6. | UNDERSCORE
    7. | UIDENT of string
    8. | TYPE
    9. | TRY
    10. | TRUE
    11. | TO
    12. | TILDE
    13. | THEN
    14. | STRUCT
    15. | STRING of string * Location.t * string option
    16. | STAR
    17. | SIG
    18. | SEMISEMI
    19. | SEMI
    20. | RPAREN
    21. | REC
    22. | RBRACKET
    23. | RBRACE
    24. | QUOTED_STRING_ITEM of string * Location.t * string * Location.t * string option
    25. | QUOTED_STRING_EXPR of string * Location.t * string * Location.t * string option
    26. | QUOTE
    27. | QUESTION
    28. | PRIVATE
    29. | PREFIXOP of string
    30. | PLUSEQ
    31. | PLUSDOT
    32. | PLUS
    33. | PERCENT
    34. | OR
    35. | OPTLABEL of string
    36. | OPEN
    37. | OF
    38. | OBJECT
    39. | NONREC
    40. | NEW
    41. | MUTABLE
    42. | MODULE
    43. | MINUSGREATER
    44. | MINUSDOT
    45. | MINUS
    46. | METHOD
    47. | MATCH
    48. | LPAREN
    49. | LIDENT of string
    50. | LETOP of string
    51. | LET
    52. | LESSMINUS
    53. | LESS
    54. | LBRACKETPERCENTPERCENT
    55. | LBRACKETPERCENT
    56. | LBRACKETLESS
    57. | LBRACKETGREATER
    58. | LBRACKETBAR
    59. | LBRACKETATATAT
    60. | LBRACKETATAT
    61. | LBRACKETAT
    62. | LBRACKET
    63. | LBRACELESS
    64. | LBRACE
    65. | LAZY
    66. | LABEL of string
    67. | INT of string * char option
    68. | INITIALIZER
    69. | INHERIT
    70. | INFIXOP4 of string
    71. | INFIXOP3 of string
    72. | INFIXOP2 of string
    73. | INFIXOP1 of string
    74. | INFIXOP0 of string
    75. | INCLUDE
    76. | IN
    77. | IF
    78. | HASHOP of string
    79. | HASH
    80. | GREATERRBRACKET
    81. | GREATERRBRACE
    82. | GREATER
    83. | FUNCTOR
    84. | FUNCTION
    85. | FUN
    86. | FOR
    87. | FLOAT of string * char option
    88. | FALSE
    89. | EXTERNAL
    90. | EXCEPTION
    91. | EQUAL
    92. | EOL
    93. | EOF
    94. | END
    95. | ELSE
    96. | DOWNTO
    97. | DOTOP of string
    98. | DOTDOT
    99. | DOT
    100. | DONE
    101. | DOCSTRING of Docstrings.docstring
    102. | DO
    103. | CONSTRAINT
    104. | COMMENT of string * Location.t
    105. | COMMA
    106. | COLONGREATER
    107. | COLONEQUAL
    108. | COLONCOLON
    109. | COLON
    110. | CLASS
    111. | CHAR of char
    112. | BEGIN
    113. | BARRBRACKET
    114. | BARBAR
    115. | BAR
    116. | BANG
    117. | BACKQUOTE
    118. | ASSERT
    119. | AS
    120. | ANDOP of string
    121. | AND
    122. | AMPERSAND
    123. | AMPERAMPER
    exception Error
    val use_file : +Parser (ocaml.Parser)

    Module Parser

    type token =
    1. | WITH
    2. | WHILE
    3. | WHEN
    4. | VIRTUAL
    5. | VAL
    6. | UNDERSCORE
    7. | UIDENT of string
    8. | TYPE
    9. | TRY
    10. | TRUE
    11. | TO
    12. | TILDE
    13. | THEN
    14. | STRUCT
    15. | STRING of string * Location.t * string option
    16. | STAR
    17. | SIG
    18. | SEMISEMI
    19. | SEMI
    20. | RPAREN
    21. | REC
    22. | RBRACKET
    23. | RBRACE
    24. | QUOTED_STRING_ITEM of string * Location.t * string * Location.t * string option
    25. | QUOTED_STRING_EXPR of string * Location.t * string * Location.t * string option
    26. | QUOTE
    27. | QUESTION
    28. | PRIVATE
    29. | PREFIXOP of string
    30. | PLUSEQ
    31. | PLUSDOT
    32. | PLUS
    33. | PERCENT
    34. | OR
    35. | OPTLABEL of string
    36. | OPEN
    37. | OF
    38. | OBJECT
    39. | NONREC
    40. | NEW
    41. | MUTABLE
    42. | MODULE
    43. | MINUSGREATER
    44. | MINUSDOT
    45. | MINUS
    46. | METHOD
    47. | MATCH
    48. | LPAREN
    49. | LIDENT of string
    50. | LETOP of string
    51. | LET
    52. | LESSMINUS
    53. | LESS
    54. | LBRACKETPERCENTPERCENT
    55. | LBRACKETPERCENT
    56. | LBRACKETLESS
    57. | LBRACKETGREATER
    58. | LBRACKETBAR
    59. | LBRACKETATATAT
    60. | LBRACKETATAT
    61. | LBRACKETAT
    62. | LBRACKET
    63. | LBRACELESS
    64. | LBRACE
    65. | LAZY
    66. | LABEL of string
    67. | INT of string * char option
    68. | INITIALIZER
    69. | INHERIT
    70. | INFIXOP4 of string
    71. | INFIXOP3 of string
    72. | INFIXOP2 of string
    73. | INFIXOP1 of string
    74. | INFIXOP0 of string
    75. | INCLUDE
    76. | IN
    77. | IF
    78. | HASHOP of string
    79. | HASH
    80. | GREATERRBRACKET
    81. | GREATERRBRACE
    82. | GREATER
    83. | FUNCTOR
    84. | FUNCTION
    85. | FUN
    86. | FOR
    87. | FLOAT of string * char option
    88. | FALSE
    89. | EXTERNAL
    90. | EXCEPTION
    91. | EQUAL
    92. | EOL
    93. | EOF
    94. | END
    95. | ELSE
    96. | DOWNTO
    97. | DOTOP of string
    98. | DOTDOT
    99. | DOT
    100. | DONE
    101. | DOCSTRING of Docstrings.docstring
    102. | DO
    103. | CONSTRAINT
    104. | COMMENT of string * Location.t
    105. | COMMA
    106. | COLONGREATER
    107. | COLONEQUAL
    108. | COLONCOLON
    109. | COLON
    110. | CLASS
    111. | CHAR of char
    112. | BEGIN
    113. | BARRBRACKET
    114. | BARBAR
    115. | BAR
    116. | BANG
    117. | BACKQUOTE
    118. | ASSERT
    119. | AS
    120. | ANDOP of string
    121. | AND
    122. | AMPERSAND
    123. | AMPERAMPER
    exception Error
    val toplevel_phrase : @@ -44,4 +44,4 @@ Parsetree.signature
    module MenhirInterpreter : sig ... end
    module Incremental : sig ... end
    \ No newline at end of file + Parsetree.structure
    module MenhirInterpreter : sig ... end
    module Incremental : sig ... end
    diff --git a/ocaml/Parsetree/index.html b/ocaml/Parsetree/index.html index 82e8c9c..60cf6b4 100644 --- a/ocaml/Parsetree/index.html +++ b/ocaml/Parsetree/index.html @@ -1,22 +1,22 @@ -Parsetree (ocaml.Parsetree)

    Module Parsetree

    Abstract syntax tree produced by parsing

    Warning: this module is unstable and part of compiler-libs.

    type constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ocaml.Parsetree)

      Module Parsetree

      Abstract syntax tree produced by parsing

      Warning: this module is unstable and part of compiler-libs.

      type constant =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag - * Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

          let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

        let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc =
    1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }
    and object_field_desc =
    1. | Otag of Asttypes.label Asttypes.loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Asttypes.loc - * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern + * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    20. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    21. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    22. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    23. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    24. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    25. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    26. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    27. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    28. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    29. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    30. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    23. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    2. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    3. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    4. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    5. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    6. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    7. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    8. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    9. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    10. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    11. | Pexp_lazy of expression
      (*

      lazy E

      *)
    12. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    13. | Pexp_object of class_structure
      (*

      object ... end

      *)
    14. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    15. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    16. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    17. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    18. | Pexp_extension of extension
      (*

      [%id]

      *)
    19. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of Asttypes.label Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      (**)
    5. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    6. | Pcf_initializer of expression
      (*

      initializer E

      *)
    7. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    8. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
      (*
      • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
      • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
      • Pvc_coercion { ground=None; coercion } represents let x :> typ
      • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }

    let pat : type_constraint = exp

    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * class_field_kind
    (**)
  • | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  • | Pcf_initializer of expression
    (*

    initializer E

    *)
  • | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  • | Pcf_extension of extension
    (*

    [%%id]

    *)
  • and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
      (*
      • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
      • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
      • Pvc_coercion { ground=None; coercion } represents let x :> typ
      • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }

    let pat : type_constraint = exp

    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ocaml/Pass_wrapper/index.html b/ocaml/Pass_wrapper/index.html index 5c28bd5..cba4d9e 100644 --- a/ocaml/Pass_wrapper/index.html +++ b/ocaml/Pass_wrapper/index.html @@ -1,9 +1,9 @@ -Pass_wrapper (ocaml.Pass_wrapper)

    Module Pass_wrapper

    val register : pass_name:string -> unit
    val with_dump : - ppf_dump:Stdlib.Format.formatter -> - pass_name:string -> - f:(unit -> 'b option) -> - input:'a -> - print_input:(Stdlib.Format.formatter -> 'a -> unit) -> - print_output:(Stdlib.Format.formatter -> 'b -> unit) -> - 'b option
    \ No newline at end of file +Pass_wrapper (ocaml.Pass_wrapper)

    Module Pass_wrapper

    val register : pass_name:string -> unit
    val with_dump : + ppf_dump:Stdlib.Format.formatter -> + pass_name:string -> + f:(unit -> 'b option) -> + input:'a -> + print_input:(Stdlib.Format.formatter -> 'a -> unit) -> + print_output:(Stdlib.Format.formatter -> 'b -> unit) -> + 'b option
    diff --git a/ocaml/Path/Map/index.html b/ocaml/Path/Map/index.html index ca63d39..8110249 100644 --- a/ocaml/Path/Map/index.html +++ b/ocaml/Path/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Path.Map)

    Module Path.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Path.Map)

    Module Path.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Path/Set/index.html b/ocaml/Path/Set/index.html index e16ac38..ea20a7b 100644 --- a/ocaml/Path/Set/index.html +++ b/ocaml/Path/Set/index.html @@ -1,3 +1,2 @@ -Set (ocaml.Path.Set)

    Module Path.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Set (ocaml.Path.Set)

    Module Path.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Path/index.html b/ocaml/Path/index.html index 624fefa..e8e1aee 100644 --- a/ocaml/Path/index.html +++ b/ocaml/Path/index.html @@ -1,2 +1,2 @@ -Path (ocaml.Path)

    Module Path

    type t =
    1. | Pident of Ident.t
      (*

      Examples: x, List, int

      *)
    2. | Pdot of t * string
      (*

      Examples: List.map, Float.Array

      *)
    3. | Papply of t * t
      (*

      Examples: Set.Make(Int), Map.Make(Set.Make(Int))

      *)
    4. | Pextra_ty of t * extra_ty
      (*

      Pextra_ty (p, extra) are additional paths of types introduced by specific OCaml constructs. See below.

      *)
    and extra_ty =
    1. | Pcstr_ty of string
      (*

      Pextra_ty (p, Pcstr_ty c) is the type of the inline record for constructor c inside type p.

      For example, in

      type 'a t = Nil | Cons of {hd : 'a; tl : 'a t}

      The inline record type {hd : 'a; tl : 'a t} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `t`, Pcstr_ty "Cons").

      *)
    2. | Pext_ty
      (*

      Pextra_ty (p, Pext_ty) is the type of the inline record for the extension constructor p.

      For example, in

      type exn += Error of {loc : loc; msg : string}

      The inline record type {loc : loc; msg : string} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `Error`, Pext_ty).

      *)
    val same : t -> t -> bool
    val compare : t -> t -> int
    val compare_extra : extra_ty -> extra_ty -> int
    val find_free_opt : Ident.t list -> t -> Ident.t option
    val exists_free : Ident.t list -> t -> bool
    val scope : t -> int
    val flatten : t -> [ `Contains_apply | `Ok of Ident.t * string list ]
    val name : ?paren:(string -> bool) -> t -> string
    val head : t -> Ident.t
    val print : Stdlib.Format.formatter -> t -> unit
    val heads : t -> Ident.t list
    val last : t -> string
    val is_constructor_typath : t -> bool
    module Map : Map.S with type key = t
    module Set : Set.S with type elt = t
    \ No newline at end of file +Path (ocaml.Path)

    Module Path

    type t =
    1. | Pident of Ident.t
      (*

      Examples: x, List, int

      *)
    2. | Pdot of t * string
      (*

      Examples: List.map, Float.Array

      *)
    3. | Papply of t * t
      (*

      Examples: Set.Make(Int), Map.Make(Set.Make(Int))

      *)
    4. | Pextra_ty of t * extra_ty
      (*

      Pextra_ty (p, extra) are additional paths of types introduced by specific OCaml constructs. See below.

      *)
    and extra_ty =
    1. | Pcstr_ty of string
      (*

      Pextra_ty (p, Pcstr_ty c) is the type of the inline record for constructor c inside type p.

      For example, in

        type 'a t = Nil | Cons of {hd : 'a; tl : 'a t}

      The inline record type {hd : 'a; tl : 'a t} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `t`, Pcstr_ty "Cons").

      *)
    2. | Pext_ty
      (*

      Pextra_ty (p, Pext_ty) is the type of the inline record for the extension constructor p.

      For example, in

        type exn += Error of {loc : loc; msg : string}

      The inline record type {loc : loc; msg : string} cannot be named by the user in the surface syntax, but internally it has the path Pextra_ty (Pident `Error`, Pext_ty).

      *)
    val same : t -> t -> bool
    val compare : t -> t -> int
    val compare_extra : extra_ty -> extra_ty -> int
    val find_free_opt : Ident.t list -> t -> Ident.t option
    val exists_free : Ident.t list -> t -> bool
    val scope : t -> int
    val flatten : t -> [ `Contains_apply | `Ok of Ident.t * string list ]
    val name : ?paren:(string -> bool) -> t -> string
    val head : t -> Ident.t
    val print : Stdlib.Format.formatter -> t -> unit
    val heads : t -> Ident.t list
    val last : t -> string
    val is_constructor_typath : t -> bool
    module Map : Map.S with type key = t
    module Set : Set.S with type elt = t
    diff --git a/ocaml/Patterns/General/index.html b/ocaml/Patterns/General/index.html index 6ce2261..4d8b7d2 100644 --- a/ocaml/Patterns/General/index.html +++ b/ocaml/Patterns/General/index.html @@ -1,2 +1,2 @@ -General (ocaml.Patterns.General)

    Module Patterns.General

    type view = [
    1. | Half_simple.view
    2. | `Var of Ident.t * string Asttypes.loc
    3. | `Alias of Typedtree.pattern * Ident.t * string Asttypes.loc
    ]
    val strip_vars : pattern -> Half_simple.pattern
    \ No newline at end of file +General (ocaml.Patterns.General)

    Module Patterns.General

    type view = [
    1. | Half_simple.view
    2. | `Var of Ident.t * string Asttypes.loc
    3. | `Alias of Typedtree.pattern * Ident.t * string Asttypes.loc
    ]
    val strip_vars : pattern -> Half_simple.pattern
    diff --git a/ocaml/Patterns/Half_simple/index.html b/ocaml/Patterns/Half_simple/index.html index e2c8ec6..cc5d469 100644 --- a/ocaml/Patterns/Half_simple/index.html +++ b/ocaml/Patterns/Half_simple/index.html @@ -1,2 +1,2 @@ -Half_simple (ocaml.Patterns.Half_simple)

    Module Patterns.Half_simple

    \ No newline at end of file +Half_simple (ocaml.Patterns.Half_simple)

    Module Patterns.Half_simple

    diff --git a/ocaml/Patterns/Head/index.html b/ocaml/Patterns/Head/index.html index 189c675..cdaad76 100644 --- a/ocaml/Patterns/Head/index.html +++ b/ocaml/Patterns/Head/index.html @@ -1,2 +1,2 @@ -Head (ocaml.Patterns.Head)

    Module Patterns.Head

    type desc =
    1. | Any
    2. | Construct of Types.constructor_description
    3. | Constant of Asttypes.constant
    4. | Tuple of int
    5. | Record of Types.label_description list
    6. | Variant of {
      1. tag : Asttypes.label;
      2. has_arg : bool;
      3. cstr_row : Types.row_desc ref;
      4. type_row : unit -> Types.row_desc;
      }
    7. | Array of int
    8. | Lazy
    val arity : t -> int
    val deconstruct : Simple.pattern -> t * Typedtree.pattern list

    deconstruct p returns the head of p and the list of sub patterns.

    • raises [Invalid_arg

      _] if p is an or- or an exception-pattern.

    val to_omega_pattern : t -> Typedtree.pattern

    reconstructs a pattern, putting wildcards as sub-patterns.

    val omega : t
    \ No newline at end of file +Head (ocaml.Patterns.Head)

    Module Patterns.Head

    type desc =
    1. | Any
    2. | Construct of Types.constructor_description
    3. | Constant of Asttypes.constant
    4. | Tuple of int
    5. | Record of Types.label_description list
    6. | Variant of {
      1. tag : Asttypes.label;
      2. has_arg : bool;
      3. cstr_row : Types.row_desc ref;
      4. type_row : unit -> Types.row_desc;
      }
    7. | Array of int
    8. | Lazy
    val arity : t -> int
    val deconstruct : Simple.pattern -> t * Typedtree.pattern list

    deconstruct p returns the head of p and the list of sub patterns.

    • raises [Invalid_arg

      _] if p is an or- or an exception-pattern.

    val to_omega_pattern : t -> Typedtree.pattern

    reconstructs a pattern, putting wildcards as sub-patterns.

    val omega : t
    diff --git a/ocaml/Patterns/Non_empty_row/index.html b/ocaml/Patterns/Non_empty_row/index.html index 07776dd..a62c47e 100644 --- a/ocaml/Patterns/Non_empty_row/index.html +++ b/ocaml/Patterns/Non_empty_row/index.html @@ -1,2 +1,2 @@ -Non_empty_row (ocaml.Patterns.Non_empty_row)

    Module Patterns.Non_empty_row

    type 'a t = 'a * Typedtree.pattern list
    val of_initial : Typedtree.pattern list -> Typedtree.pattern t

    'assert false' on empty rows

    val map_first : ('a -> 'b) -> 'a t -> 'b t
    \ No newline at end of file +Non_empty_row (ocaml.Patterns.Non_empty_row)

    Module Patterns.Non_empty_row

    type 'a t = 'a * Typedtree.pattern list
    val of_initial : Typedtree.pattern list -> Typedtree.pattern t

    'assert false' on empty rows

    val map_first : ('a -> 'b) -> 'a t -> 'b t
    diff --git a/ocaml/Patterns/Simple/index.html b/ocaml/Patterns/Simple/index.html index d38aad8..fb5b9c4 100644 --- a/ocaml/Patterns/Simple/index.html +++ b/ocaml/Patterns/Simple/index.html @@ -1,7 +1,7 @@ -Simple (ocaml.Patterns.Simple)

    Module Patterns.Simple

    type view = [
    1. | `Any
    2. | `Constant of Asttypes.constant
    3. | `Tuple of Typedtree.pattern list
    4. | `Construct of +Simple (ocaml.Patterns.Simple)

      Module Patterns.Simple

      \ No newline at end of file + * Asttypes.closed_flag
    5. | `Array of Typedtree.pattern list
    6. | `Lazy of Typedtree.pattern
    ]
    val omega : [> view ] Typedtree.pattern_data
    diff --git a/ocaml/Patterns/index.html b/ocaml/Patterns/index.html index 950e681..45d6e3d 100644 --- a/ocaml/Patterns/index.html +++ b/ocaml/Patterns/index.html @@ -1,2 +1,2 @@ -Patterns (ocaml.Patterns)

    Module Patterns

    val omega : Typedtree.pattern

    aka. "Tpat_any" or "_"

    val omegas : int -> Typedtree.pattern list

    List.init (fun _ -> omega)

    val omega_list : 'a list -> Typedtree.pattern list

    List.map (fun _ -> omega)

    module Non_empty_row : sig ... end
    module Simple : sig ... end
    module Half_simple : sig ... end
    module General : sig ... end
    module Head : sig ... end
    \ No newline at end of file +Patterns (ocaml.Patterns)

    Module Patterns

    val omega : Typedtree.pattern

    aka. "Tpat_any" or "_"

    val omegas : int -> Typedtree.pattern list

    List.init (fun _ -> omega)

    val omega_list : 'a list -> Typedtree.pattern list

    List.map (fun _ -> omega)

    module Non_empty_row : sig ... end
    module Simple : sig ... end
    module Half_simple : sig ... end
    module General : sig ... end
    module Head : sig ... end
    diff --git a/ocaml/Persistent_env/Consistbl/index.html b/ocaml/Persistent_env/Consistbl/index.html index 3ef112f..dbf99d9 100644 --- a/ocaml/Persistent_env/Consistbl/index.html +++ b/ocaml/Persistent_env/Consistbl/index.html @@ -1,5 +1,5 @@ -Consistbl (ocaml.Persistent_env.Consistbl)

    Module Persistent_env.Consistbl

    val create : unit -> t
    val clear : t -> unit
    val check : +Consistbl (ocaml.Persistent_env.Consistbl)

    Module Persistent_env.Consistbl

    val create : unit -> t
    val clear : t -> unit
    val check : t -> Misc.Stdlib.String.t -> Stdlib.Digest.t -> @@ -15,4 +15,4 @@ (Misc.Stdlib.String.t * Stdlib.Digest.t option) list
    val filter : (Misc.Stdlib.String.t -> bool) -> t -> unit
    exception Inconsistency of {
    1. unit_name : Misc.Stdlib.String.t;
    2. inconsistent_source : string;
    3. original_source : string;
    }
    exception Not_available of Misc.Stdlib.String.t
    \ No newline at end of file + Stdlib.Digest.t option Misc.Stdlib.String.Map.t
    val filter : (Misc.Stdlib.String.t -> bool) -> t -> unit
    exception Inconsistency of {
    1. unit_name : Misc.Stdlib.String.t;
    2. inconsistent_source : string;
    3. original_source : string;
    }
    exception Not_available of Misc.Stdlib.String.t
    diff --git a/ocaml/Persistent_env/Persistent_signature/index.html b/ocaml/Persistent_env/Persistent_signature/index.html index 11ff51e..0a24cb9 100644 --- a/ocaml/Persistent_env/Persistent_signature/index.html +++ b/ocaml/Persistent_env/Persistent_signature/index.html @@ -1,2 +1,2 @@ -Persistent_signature (ocaml.Persistent_env.Persistent_signature)

    Module Persistent_env.Persistent_signature

    type t = {
    1. filename : string;
      (*

      Name of the file containing the signature.

      *)
    2. cmi : Cmi_format.cmi_infos;
    }
    val load : (unit_name:string -> t option) ref

    Function used to load a persistent signature. The default is to look for the .cmi file in the load path. This function can be overridden to load it from memory, for instance to build a self-contained toplevel.

    \ No newline at end of file +Persistent_signature (ocaml.Persistent_env.Persistent_signature)

    Module Persistent_env.Persistent_signature

    type t = {
    1. filename : string;
      (*

      Name of the file containing the signature.

      *)
    2. cmi : Cmi_format.cmi_infos;
    }
    val load : (unit_name:string -> t option) ref

    Function used to load a persistent signature. The default is to look for the .cmi file in the load path. This function can be overridden to load it from memory, for instance to build a self-contained toplevel.

    diff --git a/ocaml/Persistent_env/index.html b/ocaml/Persistent_env/index.html index e33453b..86b0c40 100644 --- a/ocaml/Persistent_env/index.html +++ b/ocaml/Persistent_env/index.html @@ -1,5 +1,5 @@ -Persistent_env (ocaml.Persistent_env)

    Module Persistent_env

    module Consistbl : +Persistent_env (ocaml.Persistent_env)

    Module Persistent_env

    module Consistbl : module type of struct include Consistbl.Make(Misc.Stdlib.String) end
    type error =
    1. | Illegal_renaming of Misc.modname * Misc.modname * Misc.filepath
    2. | Inconsistent_import of Misc.modname * Misc.filepath * Misc.filepath
    3. | Need_recursive_types of Misc.modname
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    module Persistent_signature : sig ... end
    type can_load_cmis =
    1. | Can_load_cmis
    2. | Cannot_load_cmis of Lazy_backtrack.log
    type 'a t
    val empty : unit -> 'a t
    val clear : 'a t -> unit
    val clear_missing : 'a t -> unit
    val fold : 'a t -> (Misc.modname -> 'a -> 'b -> 'b) -> 'b -> 'b
    val read : 'a t -> (Persistent_signature.t -> 'a) -> @@ -8,15 +8,15 @@ 'a
    val find : 'a t -> (Persistent_signature.t -> 'a) -> Misc.modname -> 'a
    val find_in_cache : 'a t -> Misc.modname -> 'a option
    val check : 'a t -> (Persistent_signature.t -> 'a) -> - loc:Location.t -> + loc:Location.t -> Misc.modname -> unit
    val looked_up : 'a t -> Misc.modname -> bool
    val is_imported : 'a t -> Misc.modname -> bool
    val is_imported_opaque : 'a t -> Misc.modname -> bool
    val register_import_as_opaque : 'a t -> Misc.modname -> unit
    val save_cmi : 'a t -> Persistent_signature.t -> 'a -> unit
    val can_load_cmis : 'a t -> can_load_cmis
    val set_can_load_cmis : 'a t -> can_load_cmis -> unit
    val without_cmis : 'a t -> ('b -> 'c) -> 'b -> 'c
    val import_crcs : 'a t -> source:Misc.filepath -> Misc.crcs -> unit
    val imports : 'a t -> Misc.crcs
    val crc_of_unit : + Cmi_format.cmi_infos
    val save_cmi : 'a t -> Persistent_signature.t -> 'a -> unit
    val can_load_cmis : 'a t -> can_load_cmis
    val set_can_load_cmis : 'a t -> can_load_cmis -> unit
    val without_cmis : 'a t -> ('b -> 'c) -> 'b -> 'c
    val import_crcs : 'a t -> source:Misc.filepath -> Misc.crcs -> unit
    val imports : 'a t -> Misc.crcs
    val crc_of_unit : 'a t -> (Persistent_signature.t -> 'a) -> Misc.modname -> - Stdlib.Digest.t
    val add_delayed_check_forward : ((unit -> unit) -> unit) ref
    \ No newline at end of file + Stdlib.Digest.t
    val add_delayed_check_forward : ((unit -> unit) -> unit) ref
    diff --git a/ocaml/Polling/index.html b/ocaml/Polling/index.html index b51abd4..747885e 100644 --- a/ocaml/Polling/index.html +++ b/ocaml/Polling/index.html @@ -1,9 +1,9 @@ -Polling (ocaml.Polling)

    Module Polling

    Analyses related to the insertion of Ipoll operations.

    val instrument_fundecl : - future_funcnames:Misc.Stdlib.String.Set.t -> +Polling (ocaml.Polling)

    Module Polling

    Analyses related to the insertion of Ipoll operations.

    val instrument_fundecl : + future_funcnames:Misc.Stdlib.String.Set.t -> Mach.fundecl -> Mach.fundecl
    val requires_prologue_poll : - future_funcnames:Misc.Stdlib.String.Set.t -> - fun_name:string -> + future_funcnames:Misc.Stdlib.String.Set.t -> + fun_name:string -> Mach.instruction -> - bool
    \ No newline at end of file + bool
    diff --git a/ocaml/Pparse/index.html b/ocaml/Pparse/index.html index 7c45200..71ed2eb 100644 --- a/ocaml/Pparse/index.html +++ b/ocaml/Pparse/index.html @@ -1,20 +1,20 @@ -Pparse (ocaml.Pparse)

    Module Pparse

    Driver for the parser and external preprocessors.

    Warning: this module is unstable and part of compiler-libs.

    type error =
    1. | CannotRun of string
    2. | WrongMagic of string
    exception Error of error
    val preprocess : string -> string
    val remove_preprocessed : string -> unit
    type 'a ast_kind =
    1. | Structure : Parsetree.structure ast_kind
    2. | Signature : Parsetree.signature ast_kind
    val read_ast : 'a ast_kind -> string -> 'a
    val write_ast : 'a ast_kind -> string -> 'a -> unit
    val file : - tool_name:string -> +Pparse (ocaml.Pparse)

    Module Pparse

    Driver for the parser and external preprocessors.

    Warning: this module is unstable and part of compiler-libs.

    type error =
    1. | CannotRun of string
    2. | WrongMagic of string
    exception Error of error
    val preprocess : string -> string
    val remove_preprocessed : string -> unit
    type 'a ast_kind =
    1. | Structure : Parsetree.structure ast_kind
    2. | Signature : Parsetree.signature ast_kind
    val read_ast : 'a ast_kind -> string -> 'a
    val write_ast : 'a ast_kind -> string -> 'a -> unit
    val file : + tool_name:string -> string -> (Stdlib.Lexing.lexbuf -> 'a) -> 'a ast_kind -> 'a
    val apply_rewriters : - ?restore:bool -> - tool_name:string -> + ?restore:bool -> + tool_name:string -> 'a ast_kind -> 'a -> 'a

    If restore = true (the default), cookies set by external rewriters will be kept for later calls.

    val apply_rewriters_str : - ?restore:bool -> - tool_name:string -> + ?restore:bool -> + tool_name:string -> Parsetree.structure -> Parsetree.structure
    val apply_rewriters_sig : - ?restore:bool -> - tool_name:string -> + ?restore:bool -> + tool_name:string -> Parsetree.signature -> - Parsetree.signature
    val report_error : Stdlib.Format.formatter -> error -> unit
    val parse_implementation : tool_name:string -> string -> Parsetree.structure
    val parse_interface : tool_name:string -> string -> Parsetree.signature
    val call_external_preprocessor : string -> string -> string
    val open_and_check_magic : string -> string -> in_channel * bool
    \ No newline at end of file + Parsetree.signature
    val report_error : Stdlib.Format.formatter -> error -> unit
    val parse_implementation : tool_name:string -> string -> Parsetree.structure
    val parse_interface : tool_name:string -> string -> Parsetree.signature
    val call_external_preprocessor : string -> string -> string
    val open_and_check_magic : string -> string -> in_channel * bool
    diff --git a/ocaml/Pprintast/index.html b/ocaml/Pprintast/index.html index afe6fba..b4a9d2f 100644 --- a/ocaml/Pprintast/index.html +++ b/ocaml/Pprintast/index.html @@ -1,5 +1,5 @@ -Pprintast (ocaml.Pprintast)

    Module Pprintast

    Pretty-printers for Parsetree

    Warning: this module is unstable and part of compiler-libs.

    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val expression : Stdlib.Format.formatter -> Parsetree.expression -> unit
    val string_of_expression : Parsetree.expression -> string
    val core_type : Stdlib.Format.formatter -> Parsetree.core_type -> unit
    val signature : Stdlib.Format.formatter -> Parsetree.signature -> unit
    val structure : Stdlib.Format.formatter -> Parsetree.structure -> unit
    val string_of_structure : Parsetree.structure -> string
    val module_expr : Stdlib.Format.formatter -> Parsetree.module_expr -> unit
    val toplevel_phrase : +Pprintast (ocaml.Pprintast)

    Module Pprintast

    Pretty-printers for Parsetree

    Warning: this module is unstable and part of compiler-libs.

    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val expression : Stdlib.Format.formatter -> Parsetree.expression -> unit
    val string_of_expression : Parsetree.expression -> string
    val core_type : Stdlib.Format.formatter -> Parsetree.core_type -> unit
    val signature : Stdlib.Format.formatter -> Parsetree.signature -> unit
    val structure : Stdlib.Format.formatter -> Parsetree.structure -> unit
    val string_of_structure : Parsetree.structure -> string
    val module_expr : Stdlib.Format.formatter -> Parsetree.module_expr -> unit
    val toplevel_phrase : Stdlib.Format.formatter -> Parsetree.toplevel_phrase -> unit
    val class_field : Stdlib.Format.formatter -> Parsetree.class_field -> unit
    val class_type_field : @@ -11,4 +11,4 @@ unit
    val signature_item : Stdlib.Format.formatter -> Parsetree.signature_item -> - unit
    val tyvar : Stdlib.Format.formatter -> string -> unit

    Print a type variable name, taking care of the special treatment required for the single quote character in second position.

    \ No newline at end of file + unit
    val tyvar : Stdlib.Format.formatter -> string -> unit

    Print a type variable name, taking care of the special treatment required for the single quote character in second position.

    diff --git a/ocaml/Predef/index.html b/ocaml/Predef/index.html index 1ce46d6..361cc68 100644 --- a/ocaml/Predef/index.html +++ b/ocaml/Predef/index.html @@ -1,6 +1,6 @@ -Predef (ocaml.Predef)

    Module Predef

    val type_int : Types.type_expr
    val type_char : Types.type_expr
    val type_string : Types.type_expr
    val type_bytes : Types.type_expr
    val type_float : Types.type_expr
    val type_bool : Types.type_expr
    val type_unit : Types.type_expr
    val type_exn : Types.type_expr
    val type_array : Types.type_expr -> Types.type_expr
    val type_list : Types.type_expr -> Types.type_expr
    val type_option : Types.type_expr -> Types.type_expr
    val type_nativeint : Types.type_expr
    val type_int32 : Types.type_expr
    val type_int64 : Types.type_expr
    val type_lazy_t : Types.type_expr -> Types.type_expr
    val type_extension_constructor : Types.type_expr
    val type_floatarray : Types.type_expr
    val path_int : Path.t
    val path_char : Path.t
    val path_string : Path.t
    val path_bytes : Path.t
    val path_float : Path.t
    val path_bool : Path.t
    val path_unit : Path.t
    val path_exn : Path.t
    val path_array : Path.t
    val path_list : Path.t
    val path_option : Path.t
    val path_nativeint : Path.t
    val path_int32 : Path.t
    val path_int64 : Path.t
    val path_lazy_t : Path.t
    val path_extension_constructor : Path.t
    val path_floatarray : Path.t
    val path_match_failure : Path.t
    val path_assert_failure : Path.t
    val path_undefined_recursive_module : Path.t
    val ident_false : Ident.t
    val ident_true : Ident.t
    val ident_void : Ident.t
    val ident_nil : Ident.t
    val ident_cons : Ident.t
    val ident_none : Ident.t
    val ident_some : Ident.t
    val build_initial_env : +Predef (ocaml.Predef)

    Module Predef

    val type_int : Types.type_expr
    val type_char : Types.type_expr
    val type_string : Types.type_expr
    val type_bytes : Types.type_expr
    val type_float : Types.type_expr
    val type_bool : Types.type_expr
    val type_unit : Types.type_expr
    val type_exn : Types.type_expr
    val type_array : Types.type_expr -> Types.type_expr
    val type_list : Types.type_expr -> Types.type_expr
    val type_option : Types.type_expr -> Types.type_expr
    val type_nativeint : Types.type_expr
    val type_int32 : Types.type_expr
    val type_int64 : Types.type_expr
    val type_lazy_t : Types.type_expr -> Types.type_expr
    val type_extension_constructor : Types.type_expr
    val type_floatarray : Types.type_expr
    val path_int : Path.t
    val path_char : Path.t
    val path_string : Path.t
    val path_bytes : Path.t
    val path_float : Path.t
    val path_bool : Path.t
    val path_unit : Path.t
    val path_exn : Path.t
    val path_array : Path.t
    val path_list : Path.t
    val path_option : Path.t
    val path_nativeint : Path.t
    val path_int32 : Path.t
    val path_int64 : Path.t
    val path_lazy_t : Path.t
    val path_extension_constructor : Path.t
    val path_floatarray : Path.t
    val path_match_failure : Path.t
    val path_assert_failure : Path.t
    val path_undefined_recursive_module : Path.t
    val ident_false : Ident.t
    val ident_true : Ident.t
    val ident_void : Ident.t
    val ident_nil : Ident.t
    val ident_cons : Ident.t
    val ident_none : Ident.t
    val ident_some : Ident.t
    val build_initial_env : (Ident.t -> Types.type_declaration -> 'a -> 'a) -> (Ident.t -> Types.extension_constructor -> 'a -> 'a) -> 'a -> - 'a
    val builtin_values : (string * Ident.t) list
    val builtin_idents : (string * Ident.t) list
    val ident_division_by_zero : Ident.t

    All predefined exceptions, exposed as Ident.t for flambda (for building value approximations). The Ident.t for division by zero is also exported explicitly so flambda can generate code to raise it.

    val all_predef_exns : Ident.t list
    \ No newline at end of file + 'a
    val builtin_values : (string * Ident.t) list
    val builtin_idents : (string * Ident.t) list
    val ident_division_by_zero : Ident.t

    All predefined exceptions, exposed as Ident.t for flambda (for building value approximations). The Ident.t for division by zero is also exported explicitly so flambda can generate code to raise it.

    val all_predef_exns : Ident.t list
    diff --git a/ocaml/Primitive/index.html b/ocaml/Primitive/index.html index 14715e1..5eeff5c 100644 --- a/ocaml/Primitive/index.html +++ b/ocaml/Primitive/index.html @@ -1,12 +1,12 @@ -Primitive (ocaml.Primitive)

    Module Primitive

    type boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    type native_repr =
    1. | Same_as_ocaml_repr
    2. | Unboxed_float
    3. | Unboxed_integer of boxed_integer
    4. | Untagged_int
    type description = private {
    1. prim_name : string;
    2. prim_arity : int;
    3. prim_alloc : bool;
    4. prim_native_name : string;
    5. prim_native_repr_args : native_repr list;
    6. prim_native_repr_res : native_repr;
    }
    val simple : name:string -> arity:int -> alloc:bool -> description
    val make : - name:string -> - alloc:bool -> - native_name:string -> - native_repr_args:native_repr list -> - native_repr_res:native_repr -> +Primitive (ocaml.Primitive)

    Module Primitive

    type boxed_integer =
    1. | Pnativeint
    2. | Pint32
    3. | Pint64
    type native_repr =
    1. | Same_as_ocaml_repr
    2. | Unboxed_float
    3. | Unboxed_integer of boxed_integer
    4. | Untagged_int
    type description = private {
    1. prim_name : string;
    2. prim_arity : int;
    3. prim_alloc : bool;
    4. prim_native_name : string;
    5. prim_native_repr_args : native_repr list;
    6. prim_native_repr_res : native_repr;
    }
    val simple : name:string -> arity:int -> alloc:bool -> description
    val make : + name:string -> + alloc:bool -> + native_name:string -> + native_repr_args:native_repr list -> + native_repr_res:native_repr -> description
    val parse_declaration : Parsetree.value_description -> - native_repr_args:native_repr list -> - native_repr_res:native_repr -> - description
    val native_name : description -> string
    val byte_name : description -> string
    val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
    val equal_native_repr : native_repr -> native_repr -> bool
    val native_name_is_external : description -> bool

    native_name_is_externa returns true iff the native_name for the given primitive identifies that the primitive is not implemented in the compiler itself.

    type error =
    1. | Old_style_float_with_native_repr_attribute
    2. | Old_style_noalloc_with_noalloc_attribute
    3. | No_native_primitive_with_repr_attribute
    exception Error of Location.t * error
    \ No newline at end of file + native_repr_args:native_repr list -> + native_repr_res:native_repr -> + description
    val native_name : description -> string
    val byte_name : description -> string
    val equal_boxed_integer : boxed_integer -> boxed_integer -> bool
    val equal_native_repr : native_repr -> native_repr -> bool
    val native_name_is_external : description -> bool

    native_name_is_externa returns true iff the native_name for the given primitive identifies that the primitive is not implemented in the compiler itself.

    type error =
    1. | Old_style_float_with_native_repr_attribute
    2. | Old_style_noalloc_with_noalloc_attribute
    3. | No_native_primitive_with_repr_attribute
    exception Error of Location.t * error
    diff --git a/ocaml/Printast/index.html b/ocaml/Printast/index.html index fedc140..6269339 100644 --- a/ocaml/Printast/index.html +++ b/ocaml/Printast/index.html @@ -1,8 +1,8 @@ -Printast (ocaml.Printast)

    Module Printast

    Raw printer for Parsetree

    Warning: this module is unstable and part of compiler-libs.

    val interface : +Printast (ocaml.Printast)

    Module Printast

    Raw printer for Parsetree

    Warning: this module is unstable and part of compiler-libs.

    val interface : Stdlib.Format.formatter -> Parsetree.signature_item list -> unit
    val implementation : Stdlib.Format.formatter -> Parsetree.structure_item list -> - unit
    val expression : int -> Stdlib.Format.formatter -> Parsetree.expression -> unit
    val structure : int -> Stdlib.Format.formatter -> Parsetree.structure -> unit
    val payload : int -> Stdlib.Format.formatter -> Parsetree.payload -> unit
    \ No newline at end of file + unit
    val expression : int -> Stdlib.Format.formatter -> Parsetree.expression -> unit
    val structure : int -> Stdlib.Format.formatter -> Parsetree.structure -> unit
    val payload : int -> Stdlib.Format.formatter -> Parsetree.payload -> unit
    diff --git a/ocaml/Printclambda/index.html b/ocaml/Printclambda/index.html index ccb42a9..77f3a3f 100644 --- a/ocaml/Printclambda/index.html +++ b/ocaml/Printclambda/index.html @@ -1,8 +1,8 @@ -Printclambda (ocaml.Printclambda)

    Module Printclambda

    val clambda : Stdlib.Format.formatter -> Clambda.ulambda -> unit
    val structured_constant : +Printclambda (ocaml.Printclambda)

    Module Printclambda

    val clambda : Stdlib.Format.formatter -> Clambda.ulambda -> unit
    val structured_constant : Stdlib.Format.formatter -> Clambda.ustructured_constant -> unit
    val phantom_defining_expr_opt : Stdlib.Format.formatter -> Clambda.uphantom_defining_expr option -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Printclambda_primitives/index.html b/ocaml/Printclambda_primitives/index.html index 290138e..c07dfd0 100644 --- a/ocaml/Printclambda_primitives/index.html +++ b/ocaml/Printclambda_primitives/index.html @@ -1,2 +1,2 @@ -Printclambda_primitives (ocaml.Printclambda_primitives)

    Module Printclambda_primitives

    \ No newline at end of file +Printclambda_primitives (ocaml.Printclambda_primitives)

    Module Printclambda_primitives

    diff --git a/ocaml/Printcmm/index.html b/ocaml/Printcmm/index.html index ec951fc..0ada947 100644 --- a/ocaml/Printcmm/index.html +++ b/ocaml/Printcmm/index.html @@ -1,8 +1,8 @@ -Printcmm (ocaml.Printcmm)

    Module Printcmm

    val rec_flag : Stdlib.Format.formatter -> Cmm.rec_flag -> unit
    val machtype_component : +Printcmm (ocaml.Printcmm)

    Module Printcmm

    val rec_flag : Stdlib.Format.formatter -> Cmm.rec_flag -> unit
    val machtype_component : Stdlib.Format.formatter -> Cmm.machtype_component -> unit
    val machtype : Stdlib.Format.formatter -> Cmm.machtype -> unit
    val exttype : Stdlib.Format.formatter -> Cmm.exttype -> unit
    val extcall_signature : Stdlib.Format.formatter -> (Cmm.machtype * Cmm.exttype list) -> - unit
    val integer_comparison : Cmm.integer_comparison -> string
    val float_comparison : Cmm.float_comparison -> string
    val chunk : Cmm.memory_chunk -> string
    val operation : Debuginfo.t -> Cmm.operation -> string
    val expression : Stdlib.Format.formatter -> Cmm.expression -> unit
    val fundecl : Stdlib.Format.formatter -> Cmm.fundecl -> unit
    val data : Stdlib.Format.formatter -> Cmm.data_item list -> unit
    val phrase : Stdlib.Format.formatter -> Cmm.phrase -> unit
    \ No newline at end of file + unit
    val integer_comparison : Cmm.integer_comparison -> string
    val float_comparison : Cmm.float_comparison -> string
    val chunk : Cmm.memory_chunk -> string
    val operation : Debuginfo.t -> Cmm.operation -> string
    val expression : Stdlib.Format.formatter -> Cmm.expression -> unit
    val fundecl : Stdlib.Format.formatter -> Cmm.fundecl -> unit
    val data : Stdlib.Format.formatter -> Cmm.data_item list -> unit
    val phrase : Stdlib.Format.formatter -> Cmm.phrase -> unit
    diff --git a/ocaml/Printinstr/index.html b/ocaml/Printinstr/index.html index 51aac22..c6fd33b 100644 --- a/ocaml/Printinstr/index.html +++ b/ocaml/Printinstr/index.html @@ -1,2 +1,2 @@ -Printinstr (ocaml.Printinstr)

    Module Printinstr

    val instruction : Stdlib.Format.formatter -> Instruct.instruction -> unit
    val instrlist : Stdlib.Format.formatter -> Instruct.instruction list -> unit
    \ No newline at end of file +Printinstr (ocaml.Printinstr)

    Module Printinstr

    val instruction : Stdlib.Format.formatter -> Instruct.instruction -> unit
    val instrlist : Stdlib.Format.formatter -> Instruct.instruction list -> unit
    diff --git a/ocaml/Printlambda/index.html b/ocaml/Printlambda/index.html index 8009815..21bfa80 100644 --- a/ocaml/Printlambda/index.html +++ b/ocaml/Printlambda/index.html @@ -1,5 +1,5 @@ -Printlambda (ocaml.Printlambda)

    Module Printlambda

    val integer_comparison : +Printlambda (ocaml.Printlambda)

    Module Printlambda

    val integer_comparison : Stdlib.Format.formatter -> Lambda.integer_comparison -> unit
    val float_comparison : @@ -17,4 +17,4 @@ Lambda.bigarray_kind -> Stdlib.Format.formatter -> Lambda.bigarray_layout -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Printlinear/index.html b/ocaml/Printlinear/index.html index d3f34e9..9e631cb 100644 --- a/ocaml/Printlinear/index.html +++ b/ocaml/Printlinear/index.html @@ -1,2 +1,2 @@ -Printlinear (ocaml.Printlinear)

    Module Printlinear

    \ No newline at end of file +Printlinear (ocaml.Printlinear)

    Module Printlinear

    diff --git a/ocaml/Printmach/index.html b/ocaml/Printmach/index.html index d1c3308..8b4a342 100644 --- a/ocaml/Printmach/index.html +++ b/ocaml/Printmach/index.html @@ -1,7 +1,7 @@ -Printmach (ocaml.Printmach)

    Module Printmach

    val reg : Stdlib.Format.formatter -> Reg.t -> unit
    val regs : Stdlib.Format.formatter -> Reg.t array -> unit
    val regset : Stdlib.Format.formatter -> Reg.Set.t -> unit
    val regsetaddr : Stdlib.Format.formatter -> Reg.Set.t -> unit
    val operation : +Printmach (ocaml.Printmach)

    Module Printmach

    val reg : Stdlib.Format.formatter -> Reg.t -> unit
    val regs : Stdlib.Format.formatter -> Reg.t array -> unit
    val regset : Stdlib.Format.formatter -> Reg.Set.t -> unit
    val regsetaddr : Stdlib.Format.formatter -> Reg.Set.t -> unit
    val operation : Mach.operation -> Reg.t array -> Stdlib.Format.formatter -> Reg.t array -> - unit
    val test : Mach.test -> Stdlib.Format.formatter -> Reg.t array -> unit
    val fundecl : Stdlib.Format.formatter -> Mach.fundecl -> unit
    val phase : string -> Stdlib.Format.formatter -> Mach.fundecl -> unit
    val interferences : Stdlib.Format.formatter -> unit -> unit
    val intervals : Stdlib.Format.formatter -> Interval.result -> unit
    val preferences : Stdlib.Format.formatter -> unit -> unit
    \ No newline at end of file + unit
    val test : Mach.test -> Stdlib.Format.formatter -> Reg.t array -> unit
    val fundecl : Stdlib.Format.formatter -> Mach.fundecl -> unit
    val phase : string -> Stdlib.Format.formatter -> Mach.fundecl -> unit
    val interferences : Stdlib.Format.formatter -> unit -> unit
    val intervals : Stdlib.Format.formatter -> Interval.result -> unit
    val preferences : Stdlib.Format.formatter -> unit -> unit
    diff --git a/ocaml/Printpat/index.html b/ocaml/Printpat/index.html index e7ab455..7db13b4 100644 --- a/ocaml/Printpat/index.html +++ b/ocaml/Printpat/index.html @@ -1,5 +1,5 @@ -Printpat (ocaml.Printpat)

    Module Printpat

    val pretty_const : Asttypes.constant -> string
    val top_pretty : +Printpat (ocaml.Printpat)

    Module Printpat

    val pretty_const : Asttypes.constant -> string
    val top_pretty : Stdlib.Format.formatter -> 'k Typedtree.general_pattern -> unit
    val pretty_pat : 'k Typedtree.general_pattern -> unit
    val pretty_line : @@ -8,4 +8,4 @@ unit
    val pretty_matrix : Stdlib.Format.formatter -> 'k Typedtree.general_pattern list list -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Printtyp/Conflicts/index.html b/ocaml/Printtyp/Conflicts/index.html index 127dda1..908c217 100644 --- a/ocaml/Printtyp/Conflicts/index.html +++ b/ocaml/Printtyp/Conflicts/index.html @@ -1,5 +1,5 @@ -Conflicts (ocaml.Printtyp.Conflicts)

    Module Printtyp.Conflicts

    The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

    val exists : unit -> bool

    exists() returns true if the current naming context renamed an identifier to avoid a name collision

    type explanation = {
    1. kind : Shape.Sig_component_kind.t;
    2. name : string;
    3. root_name : string;
    4. location : Location.t;
    }
    val list_explanations : unit -> explanation list

    list_explanations() return the list of conflict explanations collected up to this point, and reset the list of collected explanations

    val print_located_explanations : +Conflicts (ocaml.Printtyp.Conflicts)

    Module Printtyp.Conflicts

    The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

    val exists : unit -> bool

    exists() returns true if the current naming context renamed an identifier to avoid a name collision

    type explanation = {
    1. kind : Shape.Sig_component_kind.t;
    2. name : string;
    3. root_name : string;
    4. location : Location.t;
    }
    val list_explanations : unit -> explanation list

    list_explanations() return the list of conflict explanations collected up to this point, and reset the list of collected explanations

    val print_located_explanations : Stdlib.Format.formatter -> explanation list -> - unit
    val print_explanations : Stdlib.Format.formatter -> unit

    Print all conflict explanations collected up to this point

    val reset : unit -> unit
    \ No newline at end of file + unit
    val print_explanations : Stdlib.Format.formatter -> unit

    Print all conflict explanations collected up to this point

    val reset : unit -> unit
    diff --git a/ocaml/Printtyp/Naming_context/index.html b/ocaml/Printtyp/Naming_context/index.html index 4aa6531..d93b82f 100644 --- a/ocaml/Printtyp/Naming_context/index.html +++ b/ocaml/Printtyp/Naming_context/index.html @@ -1,2 +1,2 @@ -Naming_context (ocaml.Printtyp.Naming_context)

    Module Printtyp.Naming_context

    val enable : bool -> unit

    When contextual names are enabled, the mapping between identifiers and names is ensured to be one-to-one.

    \ No newline at end of file +Naming_context (ocaml.Printtyp.Naming_context)

    Module Printtyp.Naming_context

    val enable : bool -> unit

    When contextual names are enabled, the mapping between identifiers and names is ensured to be one-to-one.

    diff --git a/ocaml/Printtyp/Out_name/index.html b/ocaml/Printtyp/Out_name/index.html index 760d8ea..98f42c5 100644 --- a/ocaml/Printtyp/Out_name/index.html +++ b/ocaml/Printtyp/Out_name/index.html @@ -1,2 +1,2 @@ -Out_name (ocaml.Printtyp.Out_name)

    Module Printtyp.Out_name

    val create : string -> Outcometree.out_name
    val print : Outcometree.out_name -> string
    \ No newline at end of file +Out_name (ocaml.Printtyp.Out_name)

    Module Printtyp.Out_name

    val create : string -> Outcometree.out_name
    val print : Outcometree.out_name -> string
    diff --git a/ocaml/Printtyp/Subtype/index.html b/ocaml/Printtyp/Subtype/index.html index 8f6d203..40084b3 100644 --- a/ocaml/Printtyp/Subtype/index.html +++ b/ocaml/Printtyp/Subtype/index.html @@ -1,7 +1,7 @@ -Subtype (ocaml.Printtyp.Subtype)

    Module Printtyp.Subtype

    val report_error : +Subtype (ocaml.Printtyp.Subtype)

    Module Printtyp.Subtype

    val report_error : Stdlib.Format.formatter -> Env.t -> Errortrace.Subtype.error -> string -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Printtyp/index.html b/ocaml/Printtyp/index.html index 5100c44..87e465b 100644 --- a/ocaml/Printtyp/index.html +++ b/ocaml/Printtyp/index.html @@ -1,5 +1,5 @@ -Printtyp (ocaml.Printtyp)

    Module Printtyp

    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val ident : Stdlib.Format.formatter -> Ident.t -> unit
    val namespaced_ident : Shape.Sig_component_kind.t -> Ident.t -> string
    val tree_of_path : Path.t -> Outcometree.out_ident
    val path : Stdlib.Format.formatter -> Path.t -> unit
    val string_of_path : Path.t -> string
    val type_path : Stdlib.Format.formatter -> Path.t -> unit

    Print a type path taking account of -short-paths. Calls should be within wrap_printing_env.

    module Out_name : sig ... end
    type namespace := Shape.Sig_component_kind.t option
    val strings_of_paths : namespace -> Path.t list -> string list

    Print a list of paths, using the same naming context to avoid name collisions

    val raw_type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit
    val string_of_label : Asttypes.arg_label -> string
    val wrap_printing_env : error:bool -> Env.t -> (unit -> 'a) -> 'a
    module Naming_context : sig ... end
    module Conflicts : sig ... end

    The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

    val reset : unit -> unit
    val type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit

    Print out a type. This will pick names for type variables, and will not reuse names for common type variables shared across multiple type expressions. (It will also reset the printing state, which matters for other type formatters such as prepared_type_expr.) If you want multiple types to use common names for type variables, see prepare_for_printing and prepared_type_expr.

    val prepare_for_printing : Types.type_expr list -> unit

    prepare_for_printing resets the global printing environment, a la reset, and prepares the types for printing by reserving names and marking loops. Any type variables that are shared between multiple types in the input list will be given the same name when printed with prepared_type_expr.

    val add_type_to_preparation : Types.type_expr -> unit

    add_type_to_preparation ty extend a previous type expression preparation to the type expression ty

    val prepared_type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit

    The function prepared_type_expr is a less-safe but more-flexible version of type_expr that should only be called on type_exprs that have been passed to prepare_for_printing. Unlike type_expr, this function does no extra work before printing a type; in particular, this means that any loops in the type expression may cause a stack overflow (see #8860) since this function does not mark any loops. The benefit of this is that if multiple type expressions are prepared simultaneously and then printed with prepared_type_expr, they will use the same names for the same type variables.

    val constructor_arguments : +Printtyp (ocaml.Printtyp)

    Module Printtyp

    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val ident : Stdlib.Format.formatter -> Ident.t -> unit
    val namespaced_ident : Shape.Sig_component_kind.t -> Ident.t -> string
    val tree_of_path : Path.t -> Outcometree.out_ident
    val path : Stdlib.Format.formatter -> Path.t -> unit
    val string_of_path : Path.t -> string
    val type_path : Stdlib.Format.formatter -> Path.t -> unit

    Print a type path taking account of -short-paths. Calls should be within wrap_printing_env.

    module Out_name : sig ... end
    type namespace := Shape.Sig_component_kind.t option
    val strings_of_paths : namespace -> Path.t list -> string list

    Print a list of paths, using the same naming context to avoid name collisions

    val raw_type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit
    val string_of_label : Asttypes.arg_label -> string
    val wrap_printing_env : error:bool -> Env.t -> (unit -> 'a) -> 'a
    module Naming_context : sig ... end
    module Conflicts : sig ... end

    The Conflicts module keeps track of conflicts arising when attributing names to identifiers and provides functions that can print explanations for these conflict in error messages

    val reset : unit -> unit
    val type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit

    Print out a type. This will pick names for type variables, and will not reuse names for common type variables shared across multiple type expressions. (It will also reset the printing state, which matters for other type formatters such as prepared_type_expr.) If you want multiple types to use common names for type variables, see prepare_for_printing and prepared_type_expr.

    val prepare_for_printing : Types.type_expr list -> unit

    prepare_for_printing resets the global printing environment, a la reset, and prepares the types for printing by reserving names and marking loops. Any type variables that are shared between multiple types in the input list will be given the same name when printed with prepared_type_expr.

    val add_type_to_preparation : Types.type_expr -> unit

    add_type_to_preparation ty extend a previous type expression preparation to the type expression ty

    val prepared_type_expr : Stdlib.Format.formatter -> Types.type_expr -> unit

    The function prepared_type_expr is a less-safe but more-flexible version of type_expr that should only be called on type_exprs that have been passed to prepare_for_printing. Unlike type_expr, this function does no extra work before printing a type; in particular, this means that any loops in the type expression may cause a stack overflow (see #8860) since this function does not mark any loops. The benefit of this is that if multiple type expressions are prepared simultaneously and then printed with prepared_type_expr, they will use the same names for the same type variables.

    val constructor_arguments : Stdlib.Format.formatter -> Types.constructor_arguments -> unit
    val tree_of_type_scheme : Types.type_expr -> Outcometree.out_type
    val type_scheme : Stdlib.Format.formatter -> Types.type_expr -> unit
    val prepared_type_scheme : Stdlib.Format.formatter -> Types.type_expr -> unit
    val shared_type_scheme : Stdlib.Format.formatter -> Types.type_expr -> unit

    shared_type_scheme is very similar to type_scheme, but does not reset the printing context first. This is intended to be used in cases where the printing should have a particularly wide context, such as documentation generators; most use cases, such as error messages, have narrower contexts for which type_scheme is better suited.

    val tree_of_value_description : @@ -50,14 +50,14 @@ Types.extension_constructor -> unit
    val tree_of_module : Ident.t -> - ?ellipsis:bool -> + ?ellipsis:bool -> Types.module_type -> Types.rec_status -> Outcometree.out_sig_item
    val signature : Stdlib.Format.formatter -> Types.signature -> unit
    val tree_of_modtype_declaration : Ident.t -> Types.modtype_declaration -> Outcometree.out_sig_item
    val functor_parameters : - sep:(Stdlib.Format.formatter -> unit -> unit) -> + sep:(Stdlib.Format.formatter -> unit -> unit) -> ('b -> Stdlib.Format.formatter -> unit) -> (Ident.t option * 'b) list -> Stdlib.Format.formatter -> @@ -97,7 +97,7 @@ Stdlib.Format.formatter -> Env.t -> Errortrace.unification_error -> - ?type_expected_explanation:(Stdlib.Format.formatter -> unit) -> + ?type_expected_explanation:(Stdlib.Format.formatter -> unit) -> (Stdlib.Format.formatter -> unit) -> (Stdlib.Format.formatter -> unit) -> unit
    val report_equality_error : @@ -129,4 +129,4 @@ string -> Stdlib.Format.formatter -> Types.signature -> - unit

    printed_signature sourcefile ppf sg print the signature sg of sourcefile with potential warnings for name collisions

    \ No newline at end of file + unit

    printed_signature sourcefile ppf sg print the signature sg of sourcefile with potential warnings for name collisions

    diff --git a/ocaml/Printtyped/index.html b/ocaml/Printtyped/index.html index 4ae6848..f56be2e 100644 --- a/ocaml/Printtyped/index.html +++ b/ocaml/Printtyped/index.html @@ -1,5 +1,5 @@ -Printtyped (ocaml.Printtyped)

    Module Printtyped

    val interface : Stdlib.Format.formatter -> Typedtree.signature -> unit
    val implementation : Stdlib.Format.formatter -> Typedtree.structure -> unit
    val implementation_with_coercion : +Printtyped (ocaml.Printtyped)

    Module Printtyped

    val interface : Stdlib.Format.formatter -> Typedtree.signature -> unit
    val implementation : Stdlib.Format.formatter -> Typedtree.structure -> unit
    val implementation_with_coercion : Stdlib.Format.formatter -> Typedtree.implementation -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Proc/index.html b/ocaml/Proc/index.html index ace755b..92cb1fd 100644 --- a/ocaml/Proc/index.html +++ b/ocaml/Proc/index.html @@ -1,2 +1,2 @@ -Proc (ocaml.Proc)

    Module Proc

    val word_addressed : bool
    val num_register_classes : int
    val register_class : Reg.t -> int
    val num_available_registers : int array
    val first_available_register : int array
    val register_name : int -> string
    val phys_reg : int -> Reg.t
    val rotate_registers : bool
    val loc_arguments : Cmm.machtype -> Reg.t array * int
    val loc_results : Cmm.machtype -> Reg.t array
    val loc_parameters : Cmm.machtype -> Reg.t array
    val loc_external_arguments : Cmm.exttype list -> Reg.t array array * int
    val loc_external_results : Cmm.machtype -> Reg.t array
    val loc_exn_bucket : Reg.t
    val max_arguments_for_tailcalls : int
    val safe_register_pressure : Mach.operation -> int
    val max_register_pressure : Mach.operation -> int array
    val destroyed_at_oper : Mach.instruction_desc -> Reg.t array
    val destroyed_at_raise : Reg.t array
    val destroyed_at_reloadretaddr : Reg.t array
    val frame_required : Mach.fundecl -> bool
    val prologue_required : Mach.fundecl -> bool
    val dwarf_register_numbers : reg_class:int -> int array

    For a given register class, the DWARF register numbering for that class. Given an allocated register with location Reg n and class reg_class, the returned array contains the corresponding DWARF register number at index n - first_available_register.(reg_class).

    val stack_ptr_dwarf_register_number : int

    The DWARF register number corresponding to the stack pointer.

    val assemble_file : string -> string -> int
    val init : unit -> unit
    \ No newline at end of file +Proc (ocaml.Proc)

    Module Proc

    val word_addressed : bool
    val num_register_classes : int
    val register_class : Reg.t -> int
    val num_available_registers : int array
    val first_available_register : int array
    val register_name : int -> string
    val phys_reg : int -> Reg.t
    val rotate_registers : bool
    val loc_arguments : Cmm.machtype -> Reg.t array * int
    val loc_results : Cmm.machtype -> Reg.t array
    val loc_parameters : Cmm.machtype -> Reg.t array
    val loc_external_arguments : Cmm.exttype list -> Reg.t array array * int
    val loc_external_results : Cmm.machtype -> Reg.t array
    val loc_exn_bucket : Reg.t
    val max_arguments_for_tailcalls : int
    val safe_register_pressure : Mach.operation -> int
    val max_register_pressure : Mach.operation -> int array
    val destroyed_at_oper : Mach.instruction_desc -> Reg.t array
    val destroyed_at_raise : Reg.t array
    val destroyed_at_reloadretaddr : Reg.t array
    val frame_required : Mach.fundecl -> bool
    val prologue_required : Mach.fundecl -> bool
    val dwarf_register_numbers : reg_class:int -> int array

    For a given register class, the DWARF register numbering for that class. Given an allocated register with location Reg n and class reg_class, the returned array contains the corresponding DWARF register number at index n - first_available_register.(reg_class).

    val stack_ptr_dwarf_register_number : int

    The DWARF register number corresponding to the stack pointer.

    val assemble_file : string -> string -> int
    val init : unit -> unit
    diff --git a/ocaml/Profile/index.html b/ocaml/Profile/index.html index 648d7e7..41bfc9e 100644 --- a/ocaml/Profile/index.html +++ b/ocaml/Profile/index.html @@ -1,2 +1,2 @@ -Profile (ocaml.Profile)

    Module Profile

    Compiler performance recording

    Warning: this module is unstable and part of compiler-libs.

    type file = string
    val reset : unit -> unit

    erase all recorded profile information

    val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a

    record_call pass f calls f and records its profile information.

    val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b

    record pass f arg records the profile information of f arg

    type column = [
    1. | `Time
    2. | `Alloc
    3. | `Top_heap
    4. | `Abs_top_heap
    ]
    val print : Stdlib.Format.formatter -> column list -> unit

    Prints the selected recorded profiling information to the formatter.

    Command line flags

    val options_doc : string
    val all_columns : column list

    A few pass names that are needed in several places, and shared to avoid typos.

    val generate : string
    val transl : string
    val typing : string
    \ No newline at end of file +Profile (ocaml.Profile)

    Module Profile

    Compiler performance recording

    Warning: this module is unstable and part of compiler-libs.

    type file = string
    val reset : unit -> unit

    erase all recorded profile information

    val record_call : ?accumulate:bool -> string -> (unit -> 'a) -> 'a

    record_call pass f calls f and records its profile information.

    val record : ?accumulate:bool -> string -> ('a -> 'b) -> 'a -> 'b

    record pass f arg records the profile information of f arg

    type column = [
    1. | `Time
    2. | `Alloc
    3. | `Top_heap
    4. | `Abs_top_heap
    ]
    val print : Stdlib.Format.formatter -> column list -> unit

    Prints the selected recorded profiling information to the formatter.

    Command line flags

    val options_doc : string
    val all_columns : column list

    A few pass names that are needed in several places, and shared to avoid typos.

    val generate : string
    val transl : string
    val typing : string
    diff --git a/ocaml/Profiling/index.html b/ocaml/Profiling/index.html index c976ed0..079a19d 100644 --- a/ocaml/Profiling/index.html +++ b/ocaml/Profiling/index.html @@ -1,2 +1,2 @@ -Profiling (ocaml.Profiling)

    Module Profiling

    val counters : (string * (string * int array)) list ref
    val incr : int array -> int -> unit
    \ No newline at end of file +Profiling (ocaml.Profiling)

    Module Profiling

    val counters : (string * (string * int array)) list ref
    val incr : int array -> int -> unit
    diff --git a/ocaml/Projection/Map/index.html b/ocaml/Projection/Map/index.html index bd94f06..f33fef4 100644 --- a/ocaml/Projection/Map/index.html +++ b/ocaml/Projection/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Projection.Map)

    Module Projection.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Projection.Map)

    Module Projection.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Projection/Set/index.html b/ocaml/Projection/Set/index.html index a97c89e..4ea6dee 100644 --- a/ocaml/Projection/Set/index.html +++ b/ocaml/Projection/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Projection.Set)

    Module Projection.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Projection.Set)

    Module Projection.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Projection/T/index.html b/ocaml/Projection/T/index.html index 89a512e..2bc3bf8 100644 --- a/ocaml/Projection/T/index.html +++ b/ocaml/Projection/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Projection.T)

    Module Projection.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Projection.T)

    Module Projection.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Projection/Tbl/index.html b/ocaml/Projection/Tbl/index.html index 6602abf..0375745 100644 --- a/ocaml/Projection/Tbl/index.html +++ b/ocaml/Projection/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Projection.Tbl)

    Module Projection.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Projection.Tbl)

    Module Projection.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Projection/index.html b/ocaml/Projection/index.html index 61d40cc..8d401fc 100644 --- a/ocaml/Projection/index.html +++ b/ocaml/Projection/index.html @@ -1,8 +1,8 @@ -Projection (ocaml.Projection)

    Module Projection

    Representation of projections from closures and blocks.

    type project_closure = {
    1. set_of_closures : Variable.t;
      (*

      must yield a set of closures

      *)
    2. closure_id : Closure_id.t;
    }

    The selection of one closure given a set of closures, required before a function defined by said set of closures can be applied. See more detailed documentation below on set_of_closures.

    type move_within_set_of_closures = {
    1. closure : Variable.t;
      (*

      must yield a closure

      *)
    2. start_from : Closure_id.t;
    3. move_to : Closure_id.t;
    }

    The selection of one closure given another closure in the same set of closures. See more detailed documentation below on set_of_closures. The move_to closure must be part of the free variables of start_from.

    type project_var = {
    1. closure : Variable.t;
      (*

      must yield a closure

      *)
    2. closure_id : Closure_id.t;
    3. var : Var_within_closure.t;
    }

    The selection from a closure of a variable bound by said closure. In other words, access to a function's environment. Also see more detailed documentation below on set_of_closures.

    val print_project_closure : Stdlib.Format.formatter -> project_closure -> unit
    val print_move_within_set_of_closures : +Projection (ocaml.Projection)

    Module Projection

    Representation of projections from closures and blocks.

    type project_closure = {
    1. set_of_closures : Variable.t;
      (*

      must yield a set of closures

      *)
    2. closure_id : Closure_id.t;
    }

    The selection of one closure given a set of closures, required before a function defined by said set of closures can be applied. See more detailed documentation below on set_of_closures.

    type move_within_set_of_closures = {
    1. closure : Variable.t;
      (*

      must yield a closure

      *)
    2. start_from : Closure_id.t;
    3. move_to : Closure_id.t;
    }

    The selection of one closure given another closure in the same set of closures. See more detailed documentation below on set_of_closures. The move_to closure must be part of the free variables of start_from.

    type project_var = {
    1. closure : Variable.t;
      (*

      must yield a closure

      *)
    2. closure_id : Closure_id.t;
    3. var : Var_within_closure.t;
    }

    The selection from a closure of a variable bound by said closure. In other words, access to a function's environment. Also see more detailed documentation below on set_of_closures.

    val print_project_closure : Stdlib.Format.formatter -> project_closure -> unit
    val print_move_within_set_of_closures : Stdlib.Format.formatter -> move_within_set_of_closures -> unit
    val print_project_var : Stdlib.Format.formatter -> project_var -> unit
    val compare_project_var : project_var -> project_var -> int
    val compare_project_closure : project_closure -> project_closure -> int
    val compare_move_within_set_of_closures : move_within_set_of_closures -> move_within_set_of_closures -> - int
    type t =
    1. | Project_var of project_var
    2. | Project_closure of project_closure
    3. | Move_within_set_of_closures of move_within_set_of_closures
    4. | Field of int * Variable.t
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val projecting_from : t -> Variable.t

    Return which variable the given projection projects from.

    val map_projecting_from : t -> f:(Variable.t -> Variable.t) -> t

    Change the variable that the given projection projects from.

    \ No newline at end of file + int
    type t =
    1. | Project_var of project_var
    2. | Project_closure of project_closure
    3. | Move_within_set_of_closures of move_within_set_of_closures
    4. | Field of int * Variable.t
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val projecting_from : t -> Variable.t

    Return which variable the given projection projects from.

    val map_projecting_from : t -> f:(Variable.t -> Variable.t) -> t

    Change the variable that the given projection projects from.

    diff --git a/ocaml/Rec_check/index.html b/ocaml/Rec_check/index.html index c4f1673..10b68d7 100644 --- a/ocaml/Rec_check/index.html +++ b/ocaml/Rec_check/index.html @@ -1,5 +1,5 @@ -Rec_check (ocaml.Rec_check)

    Module Rec_check

    exception Illegal_expr
    val is_valid_recursive_expression : +Rec_check (ocaml.Rec_check)

    Module Rec_check

    exception Illegal_expr
    val is_valid_recursive_expression : Ident.t list -> Typedtree.expression -> - bool
    val is_valid_class_expr : Ident.t list -> Typedtree.class_expr -> bool
    \ No newline at end of file + bool
    val is_valid_class_expr : Ident.t list -> Typedtree.class_expr -> bool
    diff --git a/ocaml/Ref_to_variables/index.html b/ocaml/Ref_to_variables/index.html index 99a2346..170a00e 100644 --- a/ocaml/Ref_to_variables/index.html +++ b/ocaml/Ref_to_variables/index.html @@ -1,2 +1,2 @@ -Ref_to_variables (ocaml.Ref_to_variables)

    Module Ref_to_variables

    Transform let-bound references into variables.

    val eliminate_ref : Flambda.program -> Flambda.program
    \ No newline at end of file +Ref_to_variables (ocaml.Ref_to_variables)

    Module Ref_to_variables

    Transform let-bound references into variables.

    val eliminate_ref : Flambda.program -> Flambda.program
    diff --git a/ocaml/Reg/Map/index.html b/ocaml/Reg/Map/index.html index f7baad0..3a358aa 100644 --- a/ocaml/Reg/Map/index.html +++ b/ocaml/Reg/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Reg.Map)

    Module Reg.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Reg.Map)

    Module Reg.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Reg/Raw_name/index.html b/ocaml/Reg/Raw_name/index.html index 17aacb4..04bbb32 100644 --- a/ocaml/Reg/Raw_name/index.html +++ b/ocaml/Reg/Raw_name/index.html @@ -1,2 +1,2 @@ -Raw_name (ocaml.Reg.Raw_name)

    Module Reg.Raw_name

    type t
    val create_from_var : Backend_var.t -> t
    \ No newline at end of file +Raw_name (ocaml.Reg.Raw_name)

    Module Reg.Raw_name

    type t
    val create_from_var : Backend_var.t -> t
    diff --git a/ocaml/Reg/Set/index.html b/ocaml/Reg/Set/index.html index cee41f6..7a115b8 100644 --- a/ocaml/Reg/Set/index.html +++ b/ocaml/Reg/Set/index.html @@ -1,3 +1,2 @@ -Set (ocaml.Reg.Set)

    Module Reg.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Set (ocaml.Reg.Set)

    Module Reg.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Reg/index.html b/ocaml/Reg/index.html index a2e9616..554929b 100644 --- a/ocaml/Reg/index.html +++ b/ocaml/Reg/index.html @@ -1,2 +1,2 @@ -Reg (ocaml.Reg)

    Module Reg

    module Raw_name : sig ... end
    type t = {
    1. mutable raw_name : Raw_name.t;
    2. stamp : int;
    3. typ : Cmm.machtype_component;
    4. mutable loc : location;
    5. mutable spill : bool;
    6. mutable part : int option;
    7. mutable interf : t list;
    8. mutable prefer : (t * int) list;
    9. mutable degree : int;
    10. mutable spill_cost : int;
    11. mutable visited : int;
    }
    and location =
    1. | Unknown
    2. | Reg of int
    3. | Stack of stack_location
    and stack_location =
    1. | Local of int
    2. | Incoming of int
    3. | Outgoing of int
    4. | Domainstate of int
    val dummy : t
    val create : Cmm.machtype_component -> t
    val createv : Cmm.machtype -> t array
    val createv_like : t array -> t array
    val clone : t -> t
    val at_location : Cmm.machtype_component -> location -> t
    val typv : t array -> Cmm.machtype
    val anonymous : t -> bool
    val name : t -> string
    module Set : Set.S with type elt = t
    module Map : Map.S with type key = t
    val add_set_array : Set.t -> t array -> Set.t
    val diff_set_array : Set.t -> t array -> Set.t
    val inter_set_array : Set.t -> t array -> Set.t
    val disjoint_set_array : Set.t -> t array -> bool
    val set_of_array : t array -> Set.t
    val reset : unit -> unit
    val all_registers : unit -> t list
    val num_registers : unit -> int
    val reinit : unit -> unit
    val mark_visited : t -> unit
    val is_visited : t -> bool
    val clear_visited_marks : unit -> unit
    \ No newline at end of file +Reg (ocaml.Reg)

    Module Reg

    module Raw_name : sig ... end
    type t = {
    1. mutable raw_name : Raw_name.t;
    2. stamp : int;
    3. typ : Cmm.machtype_component;
    4. mutable loc : location;
    5. mutable spill : bool;
    6. mutable part : int option;
    7. mutable interf : t list;
    8. mutable prefer : (t * int) list;
    9. mutable degree : int;
    10. mutable spill_cost : int;
    11. mutable visited : int;
    }
    and location =
    1. | Unknown
    2. | Reg of int
    3. | Stack of stack_location
    and stack_location =
    1. | Local of int
    2. | Incoming of int
    3. | Outgoing of int
    4. | Domainstate of int
    val dummy : t
    val create : Cmm.machtype_component -> t
    val createv : Cmm.machtype -> t array
    val createv_like : t array -> t array
    val clone : t -> t
    val at_location : Cmm.machtype_component -> location -> t
    val typv : t array -> Cmm.machtype
    val anonymous : t -> bool
    val name : t -> string
    module Set : Set.S with type elt = t
    module Map : Map.S with type key = t
    val add_set_array : Set.t -> t array -> Set.t
    val diff_set_array : Set.t -> t array -> Set.t
    val inter_set_array : Set.t -> t array -> Set.t
    val disjoint_set_array : Set.t -> t array -> bool
    val set_of_array : t array -> Set.t
    val reset : unit -> unit
    val all_registers : unit -> t list
    val num_registers : unit -> int
    val reinit : unit -> unit
    val mark_visited : t -> unit
    val is_visited : t -> bool
    val clear_visited_marks : unit -> unit
    diff --git a/ocaml/Reload/index.html b/ocaml/Reload/index.html index ff4f6ba..305fb46 100644 --- a/ocaml/Reload/index.html +++ b/ocaml/Reload/index.html @@ -1,2 +1,2 @@ -Reload (ocaml.Reload)

    Module Reload

    val fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
    \ No newline at end of file +Reload (ocaml.Reload)

    Module Reload

    val fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
    diff --git a/ocaml/Reloadgen/class-reload_generic/index.html b/ocaml/Reloadgen/class-reload_generic/index.html index 2b08832..685169c 100644 --- a/ocaml/Reloadgen/class-reload_generic/index.html +++ b/ocaml/Reloadgen/class-reload_generic/index.html @@ -1,5 +1,5 @@ -reload_generic (ocaml.Reloadgen.reload_generic)

    Class Reloadgen.reload_generic

    method reload_operation : Mach.operation -> +reload_generic (ocaml.Reloadgen.reload_generic)

    Class Reloadgen.reload_generic

    method reload_operation : Mach.operation -> Reg.t array -> Reg.t array -> - Reg.t array * Reg.t array
    method reload_test : Mach.test -> Reg.t array -> Reg.t array
    method makereg : Reg.t -> Reg.t
    method makeregs : Reg.t array -> Reg.t array
    method fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
    \ No newline at end of file + Reg.t array * Reg.t array
    method reload_test : Mach.test -> Reg.t array -> Reg.t array
    method makereg : Reg.t -> Reg.t
    method makeregs : Reg.t array -> Reg.t array
    method fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
    diff --git a/ocaml/Reloadgen/index.html b/ocaml/Reloadgen/index.html index 73f9a99..3b6b465 100644 --- a/ocaml/Reloadgen/index.html +++ b/ocaml/Reloadgen/index.html @@ -1,2 +1,2 @@ -Reloadgen (ocaml.Reloadgen)

    Module Reloadgen

    class reload_generic : object ... end
    \ No newline at end of file +Reloadgen (ocaml.Reloadgen)

    Module Reloadgen

    class reload_generic : object ... end
    diff --git a/ocaml/Remove_free_vars_equal_to_args/index.html b/ocaml/Remove_free_vars_equal_to_args/index.html index 636555e..dcb8b51 100644 --- a/ocaml/Remove_free_vars_equal_to_args/index.html +++ b/ocaml/Remove_free_vars_equal_to_args/index.html @@ -1,5 +1,5 @@ -Remove_free_vars_equal_to_args (ocaml.Remove_free_vars_equal_to_args)

    Module Remove_free_vars_equal_to_args

    Replace free variables in closures known to be equal to specialised arguments of such closures with those specialised arguments.

    val run : - ppf_dump:Stdlib.Format.formatter -> +Remove_free_vars_equal_to_args (ocaml.Remove_free_vars_equal_to_args)

    Module Remove_free_vars_equal_to_args

    Replace free variables in closures known to be equal to specialised arguments of such closures with those specialised arguments.

    \ No newline at end of file + Flambda.set_of_closures option
    diff --git a/ocaml/Remove_unused_arguments/index.html b/ocaml/Remove_unused_arguments/index.html index 1b7428a..a6d323d 100644 --- a/ocaml/Remove_unused_arguments/index.html +++ b/ocaml/Remove_unused_arguments/index.html @@ -1,13 +1,8 @@ -Remove_unused_arguments (ocaml.Remove_unused_arguments)

    Module Remove_unused_arguments

    val separate_unused_arguments_in_closures : +Remove_unused_arguments (ocaml.Remove_unused_arguments)

    Module Remove_unused_arguments

    val separate_unused_arguments_in_closures : Flambda.program -> - backend:(module Backend_intf.S) -> - Flambda.program

    Introduce a stub function to avoid depending on unused arguments.

    For instance, it turns let rec fact n unused = - if n = 0 then 1 - else n * fact (n-1) unused into let rec fact' n = - if n = 0 then 1 - else n * fact' (n-1) - and fact n unused = fact' n

    val separate_unused_arguments_in_set_of_closures : + backend:(module Backend_intf.S) -> + Flambda.program

    Introduce a stub function to avoid depending on unused arguments.

    For instance, it turns let rec fact n unused = if n = 0 then 1 else n * fact (n-1) unused into let rec fact' n = if n = 0 then 1 else n * fact' (n-1) and fact n unused = fact' n

    val separate_unused_arguments_in_set_of_closures : Flambda.set_of_closures -> - backend:(module Backend_intf.S) -> - Flambda.set_of_closures option
    \ No newline at end of file + backend:(module Backend_intf.S) -> + Flambda.set_of_closures option
    diff --git a/ocaml/Remove_unused_closure_vars/index.html b/ocaml/Remove_unused_closure_vars/index.html index 821b52b..629282b 100644 --- a/ocaml/Remove_unused_closure_vars/index.html +++ b/ocaml/Remove_unused_closure_vars/index.html @@ -1,5 +1,5 @@ -Remove_unused_closure_vars (ocaml.Remove_unused_closure_vars)

    Module Remove_unused_closure_vars

    val remove_unused_closure_variables : - remove_direct_call_surrogates:bool -> +Remove_unused_closure_vars (ocaml.Remove_unused_closure_vars)

    Module Remove_unused_closure_vars

    val remove_unused_closure_variables : + remove_direct_call_surrogates:bool -> Flambda.program -> - Flambda.program

    Eliminate variables bound by sets of closures that are not required. Also eliminate functions within sets of closures that are not required.

    \ No newline at end of file + Flambda.program

    Eliminate variables bound by sets of closures that are not required. Also eliminate functions within sets of closures that are not required.

    diff --git a/ocaml/Remove_unused_program_constructs/index.html b/ocaml/Remove_unused_program_constructs/index.html index 218177e..27560af 100644 --- a/ocaml/Remove_unused_program_constructs/index.html +++ b/ocaml/Remove_unused_program_constructs/index.html @@ -1,2 +1,2 @@ -Remove_unused_program_constructs (ocaml.Remove_unused_program_constructs)

    Module Remove_unused_program_constructs

    val remove_unused_program_constructs : Flambda.program -> Flambda.program
    \ No newline at end of file +Remove_unused_program_constructs (ocaml.Remove_unused_program_constructs)

    Module Remove_unused_program_constructs

    val remove_unused_program_constructs : Flambda.program -> Flambda.program
    diff --git a/ocaml/Runtime_events/Callbacks/index.html b/ocaml/Runtime_events/Callbacks/index.html index 457ebb5..3375280 100644 --- a/ocaml/Runtime_events/Callbacks/index.html +++ b/ocaml/Runtime_events/Callbacks/index.html @@ -1,14 +1,14 @@ -Callbacks (ocaml.Runtime_events.Callbacks)

    Module Runtime_events.Callbacks

    type t

    Type of callbacks

    val create : - ?runtime_begin:(int -> Timestamp.t -> runtime_phase -> unit) -> - ?runtime_end:(int -> Timestamp.t -> runtime_phase -> unit) -> - ?runtime_counter:(int -> Timestamp.t -> runtime_counter -> int -> unit) -> - ?alloc:(int -> Timestamp.t -> int array -> unit) -> - ?lifecycle:(int -> Timestamp.t -> lifecycle -> int option -> unit) -> - ?lost_events:(int -> int -> unit) -> +Callbacks (ocaml.Runtime_events.Callbacks)

    Module Runtime_events.Callbacks

    type t

    Type of callbacks

    val create : + ?runtime_begin:(int -> Timestamp.t -> runtime_phase -> unit) -> + ?runtime_end:(int -> Timestamp.t -> runtime_phase -> unit) -> + ?runtime_counter:(int -> Timestamp.t -> runtime_counter -> int -> unit) -> + ?alloc:(int -> Timestamp.t -> int array -> unit) -> + ?lifecycle:(int -> Timestamp.t -> lifecycle -> int option -> unit) -> + ?lost_events:(int -> int -> unit) -> unit -> t

    Create a Callback that optionally subscribes to one or more runtime events. The first int supplied to callbacks is the ring buffer index. Each domain owns a single ring buffer for the duration of the domain's existence. After a domain terminates, a newly spawned domain may take ownership of the ring buffer. A runtime_begin callback is called when the runtime enters a new phase (e.g a runtime_begin with EV_MINOR is called at the start of a minor GC). A runtime_end callback is called when the runtime leaves a certain phase. The runtime_counter callback is called when a counter is emitted by the runtime. lifecycle callbacks are called when the ring undergoes a change in lifecycle and a consumer may need to respond. alloc callbacks are currently only called on the instrumented runtime. lost_events callbacks are called if the consumer code detects some unconsumed events have been overwritten.

    val add_user_event : 'a Type.t -> (int -> Timestamp.t -> 'a User.t -> 'a -> unit) -> t -> - t

    add_user_event ty callback t extends t to additionally subscribe to user events of type ty. When such an event happens, callback is called with the corresponding event and payload.

    \ No newline at end of file + t

    add_user_event ty callback t extends t to additionally subscribe to user events of type ty. When such an event happens, callback is called with the corresponding event and payload.

    diff --git a/ocaml/Runtime_events/Timestamp/index.html b/ocaml/Runtime_events/Timestamp/index.html index 18e5c4e..6a8c2a1 100644 --- a/ocaml/Runtime_events/Timestamp/index.html +++ b/ocaml/Runtime_events/Timestamp/index.html @@ -1,2 +1,2 @@ -Timestamp (ocaml.Runtime_events.Timestamp)

    Module Runtime_events.Timestamp

    type t

    Type for the int64 timestamp to allow for future changes

    val to_int64 : t -> int64
    \ No newline at end of file +Timestamp (ocaml.Runtime_events.Timestamp)

    Module Runtime_events.Timestamp

    type t

    Type for the int64 timestamp to allow for future changes

    val to_int64 : t -> int64
    diff --git a/ocaml/Runtime_events/Type/index.html b/ocaml/Runtime_events/Type/index.html index af9856e..0d7f47c 100644 --- a/ocaml/Runtime_events/Type/index.html +++ b/ocaml/Runtime_events/Type/index.html @@ -1,5 +1,5 @@ -Type (ocaml.Runtime_events.Type)

    Module Runtime_events.Type

    type 'a t

    The type for a user event content type

    val unit : unit t

    An event that has no data associated with it

    type span =
    1. | Begin
    2. | End
    val span : span t

    An event that has a beginning and an end

    val int : int t

    An event containing an integer value

    val register : - encode:(bytes -> 'a -> int) -> - decode:(bytes -> int -> 'a) -> - 'a t

    Registers a custom type by providing an encoder and a decoder. The encoder writes the value in the provided buffer and returns the number of bytes written. The decoder gets a slice of the buffer of specified length, and returns the decoded value.

    The maximum value length is 1024 bytes.

    \ No newline at end of file +Type (ocaml.Runtime_events.Type)

    Module Runtime_events.Type

    type 'a t

    The type for a user event content type

    val unit : unit t

    An event that has no data associated with it

    type span =
    1. | Begin
    2. | End
    val span : span t

    An event that has a beginning and an end

    val int : int t

    An event containing an integer value

    val register : + encode:(bytes -> 'a -> int) -> + decode:(bytes -> int -> 'a) -> + 'a t

    Registers a custom type by providing an encoder and a decoder. The encoder writes the value in the provided buffer and returns the number of bytes written. The decoder gets a slice of the buffer of specified length, and returns the decoded value.

    The maximum value length is 1024 bytes.

    diff --git a/ocaml/Runtime_events/User/index.html b/ocaml/Runtime_events/User/index.html index 4bfc419..320c4db 100644 --- a/ocaml/Runtime_events/User/index.html +++ b/ocaml/Runtime_events/User/index.html @@ -1,2 +1,2 @@ -User (ocaml.Runtime_events.User)

    Module Runtime_events.User

    User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

    type tag = ..

    The type for a user event tag. Tags are used to discriminate between user events of the same type

    type 'value t

    The type for a user event. User events describe their tag, carried data type and an unique string-based name

    val register : string -> tag -> 'value Type.t -> 'value t

    register name tag ty registers a new event with an unique name, carrying a tag and values of type ty

    val write : 'value t -> 'value -> unit

    write t v records a new event t with value v

    val name : _ t -> string

    name t is the uniquely identifying name of event t

    val tag : 'a t -> tag

    tag t is the associated tag of event t, when it is known. An event can be unknown if it was not registered in the consumer program.

    \ No newline at end of file +User (ocaml.Runtime_events.User)

    Module Runtime_events.User

    User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

    type tag = ..

    The type for a user event tag. Tags are used to discriminate between user events of the same type

    type 'value t

    The type for a user event. User events describe their tag, carried data type and an unique string-based name

    val register : string -> tag -> 'value Type.t -> 'value t

    register name tag ty registers a new event with an unique name, carrying a tag and values of type ty

    val write : 'value t -> 'value -> unit

    write t v records a new event t with value v

    val name : _ t -> string

    name t is the uniquely identifying name of event t

    val tag : 'a t -> tag

    tag t is the associated tag of event t, when it is known. An event can be unknown if it was not registered in the consumer program.

    diff --git a/ocaml/Runtime_events/index.html b/ocaml/Runtime_events/index.html index 2dd9416..e5e05d8 100644 --- a/ocaml/Runtime_events/index.html +++ b/ocaml/Runtime_events/index.html @@ -1,2 +1,2 @@ -Runtime_events (ocaml.Runtime_events)

    Module Runtime_events

    Runtime events - ring buffer-based runtime tracing

    This module enables users to enable and subscribe to tracing events from the Garbage Collector and other parts of the OCaml runtime. This can be useful for diagnostic or performance monitoring purposes. This module can be used to subscribe to events for the current process or external processes asynchronously.

    When enabled (either via setting the OCAML_RUNTIME_EVENTS_START environment variable or calling Runtime_events.start) a file with the pid of the process and extension .events will be created. By default this is in the current directory but can be over-ridden by the OCAML_RUNTIME_EVENTS_DIR environment variable. Each domain maintains its own ring buffer in a section of the larger file into which it emits events.

    There is additionally a set of C APIs in runtime_events.h that can enable zero-impact monitoring of the current process or bindings for other languages.

    The runtime events system's behaviour can be controlled by the following environment variables:

    • OCAML_RUNTIME_EVENTS_START if set will cause the runtime events system to be started as part of the OCaml runtime initialization.
    • OCAML_RUNTIME_EVENTS_DIR sets the directory where the runtime events ring buffers will be located. If not present the program's working directory will be used.
    • OCAML_RUNTIME_EVENTS_PRESERVE if set will prevent the OCaml runtime from removing its ring buffers when it terminates. This can help if monitoring very short running programs.
    type runtime_counter =
    1. | EV_C_FORCE_MINOR_ALLOC_SMALL
    2. | EV_C_FORCE_MINOR_MAKE_VECT
    3. | EV_C_FORCE_MINOR_SET_MINOR_HEAP_SIZE
    4. | EV_C_FORCE_MINOR_MEMPROF
    5. | EV_C_MINOR_PROMOTED
    6. | EV_C_MINOR_ALLOCATED
    7. | EV_C_REQUEST_MAJOR_ALLOC_SHR
    8. | EV_C_REQUEST_MAJOR_ADJUST_GC_SPEED
    9. | EV_C_REQUEST_MINOR_REALLOC_REF_TABLE
    10. | EV_C_REQUEST_MINOR_REALLOC_EPHE_REF_TABLE
    11. | EV_C_REQUEST_MINOR_REALLOC_CUSTOM_TABLE
    12. | EV_C_MAJOR_HEAP_POOL_WORDS
      (*

      Total words in a Domain's major heap pools. This is the sum of unallocated and live words in each pool.

      • since 5.1
      *)
    13. | EV_C_MAJOR_HEAP_POOL_LIVE_WORDS
      (*

      Current live words in a Domain's major heap pools.

      • since 5.1
      *)
    14. | EV_C_MAJOR_HEAP_LARGE_WORDS
      (*

      Total words of a Domain's major heap large allocations. A large allocation is an allocation larger than the largest sized pool.

      • since 5.1
      *)
    15. | EV_C_MAJOR_HEAP_POOL_FRAG_WORDS
      (*

      Words in a Domain's major heap pools lost to fragmentation. This is due to there not being a pool with the exact size of an allocation and a larger sized pool needing to be used.

      • since 5.1
      *)
    16. | EV_C_MAJOR_HEAP_POOL_LIVE_BLOCKS
      (*

      Live blocks of a Domain's major heap pools.

      • since 5.1
      *)
    17. | EV_C_MAJOR_HEAP_LARGE_BLOCKS
      (*

      Live blocks of a Domain's major heap large allocations.

      • since 5.1
      *)

    The type for counter events emitted by the runtime

    type runtime_phase =
    1. | EV_EXPLICIT_GC_SET
    2. | EV_EXPLICIT_GC_STAT
    3. | EV_EXPLICIT_GC_MINOR
    4. | EV_EXPLICIT_GC_MAJOR
    5. | EV_EXPLICIT_GC_FULL_MAJOR
    6. | EV_EXPLICIT_GC_COMPACT
    7. | EV_MAJOR
    8. | EV_MAJOR_SWEEP
    9. | EV_MAJOR_MARK_ROOTS
    10. | EV_MAJOR_MARK
    11. | EV_MINOR
    12. | EV_MINOR_LOCAL_ROOTS
    13. | EV_MINOR_FINALIZED
    14. | EV_EXPLICIT_GC_MAJOR_SLICE
    15. | EV_FINALISE_UPDATE_FIRST
    16. | EV_FINALISE_UPDATE_LAST
    17. | EV_INTERRUPT_REMOTE
    18. | EV_MAJOR_EPHE_MARK
    19. | EV_MAJOR_EPHE_SWEEP
    20. | EV_MAJOR_FINISH_MARKING
    21. | EV_MAJOR_GC_CYCLE_DOMAINS
    22. | EV_MAJOR_GC_PHASE_CHANGE
    23. | EV_MAJOR_GC_STW
    24. | EV_MAJOR_MARK_OPPORTUNISTIC
    25. | EV_MAJOR_SLICE
    26. | EV_MAJOR_FINISH_CYCLE
    27. | EV_MINOR_CLEAR
    28. | EV_MINOR_FINALIZERS_OLDIFY
    29. | EV_MINOR_GLOBAL_ROOTS
    30. | EV_MINOR_LEAVE_BARRIER
    31. | EV_STW_API_BARRIER
    32. | EV_STW_HANDLER
    33. | EV_STW_LEADER
    34. | EV_MAJOR_FINISH_SWEEPING
    35. | EV_MINOR_FINALIZERS_ADMIN
    36. | EV_MINOR_REMEMBERED_SET
    37. | EV_MINOR_REMEMBERED_SET_PROMOTE
    38. | EV_MINOR_LOCAL_ROOTS_PROMOTE
    39. | EV_DOMAIN_CONDITION_WAIT
    40. | EV_DOMAIN_RESIZE_HEAP_RESERVATION

    The type for span events emitted by the runtime

    type lifecycle =
    1. | EV_RING_START
    2. | EV_RING_STOP
    3. | EV_RING_PAUSE
    4. | EV_RING_RESUME
    5. | EV_FORK_PARENT
    6. | EV_FORK_CHILD
    7. | EV_DOMAIN_SPAWN
    8. | EV_DOMAIN_TERMINATE

    Lifecycle events for the ring itself

    val lifecycle_name : lifecycle -> string

    Return a string representation of a given lifecycle event type

    val runtime_phase_name : runtime_phase -> string

    Return a string representation of a given runtime phase event type

    val runtime_counter_name : runtime_counter -> string

    Return a string representation of a given runtime counter type

    type cursor

    Type of the cursor used when consuming

    module Timestamp : sig ... end
    module Type : sig ... end
    module User : sig ... end

    User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

    module Callbacks : sig ... end
    val start : unit -> unit

    start () will start the collection of events in the runtime if not already started.

    Events can be consumed by creating a cursor with create_cursor and providing a set of callbacks to be called for each type of event.

    val pause : unit -> unit

    pause () will pause the collection of events in the runtime. Traces are collected if the program has called Runtime_events.start () or the OCAML_RUNTIME_EVENTS_START environment variable has been set.

    val resume : unit -> unit

    resume () will resume the collection of events in the runtime. Traces are collected if the program has called Runtime_events.start () or the OCAML_RUNTIME_EVENTS_START environment variable has been set.

    val create_cursor : (string * int) option -> cursor

    create_cursor path_pid creates a cursor to read from an runtime_events. Cursors can be created for runtime_events in and out of process. A runtime_events ring-buffer may have multiple cursors reading from it at any point in time and a program may have multiple cursors open concurrently (for example if multiple consumers want different sets of events). If path_pid is None then a cursor is created for the current process. Otherwise the pair contains a string path to the directory that contains the pid.events file and int pid for the runtime_events of an external process to monitor.

    val free_cursor : cursor -> unit

    Free a previously created runtime_events cursor

    val read_poll : cursor -> Callbacks.t -> int option -> int

    read_poll cursor callbacks max_option calls the corresponding functions on callbacks for up to max_option events read off cursor's runtime_events and returns the number of events read.

    \ No newline at end of file +Runtime_events (ocaml.Runtime_events)

    Module Runtime_events

    Runtime events - ring buffer-based runtime tracing

    This module enables users to enable and subscribe to tracing events from the Garbage Collector and other parts of the OCaml runtime. This can be useful for diagnostic or performance monitoring purposes. This module can be used to subscribe to events for the current process or external processes asynchronously.

    When enabled (either via setting the OCAML_RUNTIME_EVENTS_START environment variable or calling Runtime_events.start) a file with the pid of the process and extension .events will be created. By default this is in the current directory but can be over-ridden by the OCAML_RUNTIME_EVENTS_DIR environment variable. Each domain maintains its own ring buffer in a section of the larger file into which it emits events.

    There is additionally a set of C APIs in runtime_events.h that can enable zero-impact monitoring of the current process or bindings for other languages.

    The runtime events system's behaviour can be controlled by the following environment variables:

    • OCAML_RUNTIME_EVENTS_START if set will cause the runtime events system to be started as part of the OCaml runtime initialization.
    • OCAML_RUNTIME_EVENTS_DIR sets the directory where the runtime events ring buffers will be located. If not present the program's working directory will be used.
    • OCAML_RUNTIME_EVENTS_PRESERVE if set will prevent the OCaml runtime from removing its ring buffers when it terminates. This can help if monitoring very short running programs.
    type runtime_counter =
    1. | EV_C_FORCE_MINOR_ALLOC_SMALL
    2. | EV_C_FORCE_MINOR_MAKE_VECT
    3. | EV_C_FORCE_MINOR_SET_MINOR_HEAP_SIZE
    4. | EV_C_FORCE_MINOR_MEMPROF
    5. | EV_C_MINOR_PROMOTED
    6. | EV_C_MINOR_ALLOCATED
    7. | EV_C_REQUEST_MAJOR_ALLOC_SHR
    8. | EV_C_REQUEST_MAJOR_ADJUST_GC_SPEED
    9. | EV_C_REQUEST_MINOR_REALLOC_REF_TABLE
    10. | EV_C_REQUEST_MINOR_REALLOC_EPHE_REF_TABLE
    11. | EV_C_REQUEST_MINOR_REALLOC_CUSTOM_TABLE
    12. | EV_C_MAJOR_HEAP_POOL_WORDS
      (*

      Total words in a Domain's major heap pools. This is the sum of unallocated and live words in each pool.

      • since 5.1
      *)
    13. | EV_C_MAJOR_HEAP_POOL_LIVE_WORDS
      (*

      Current live words in a Domain's major heap pools.

      • since 5.1
      *)
    14. | EV_C_MAJOR_HEAP_LARGE_WORDS
      (*

      Total words of a Domain's major heap large allocations. A large allocation is an allocation larger than the largest sized pool.

      • since 5.1
      *)
    15. | EV_C_MAJOR_HEAP_POOL_FRAG_WORDS
      (*

      Words in a Domain's major heap pools lost to fragmentation. This is due to there not being a pool with the exact size of an allocation and a larger sized pool needing to be used.

      • since 5.1
      *)
    16. | EV_C_MAJOR_HEAP_POOL_LIVE_BLOCKS
      (*

      Live blocks of a Domain's major heap pools.

      • since 5.1
      *)
    17. | EV_C_MAJOR_HEAP_LARGE_BLOCKS
      (*

      Live blocks of a Domain's major heap large allocations.

      • since 5.1
      *)

    The type for counter events emitted by the runtime

    type runtime_phase =
    1. | EV_EXPLICIT_GC_SET
    2. | EV_EXPLICIT_GC_STAT
    3. | EV_EXPLICIT_GC_MINOR
    4. | EV_EXPLICIT_GC_MAJOR
    5. | EV_EXPLICIT_GC_FULL_MAJOR
    6. | EV_EXPLICIT_GC_COMPACT
    7. | EV_MAJOR
    8. | EV_MAJOR_SWEEP
    9. | EV_MAJOR_MARK_ROOTS
    10. | EV_MAJOR_MARK
    11. | EV_MINOR
    12. | EV_MINOR_LOCAL_ROOTS
    13. | EV_MINOR_FINALIZED
    14. | EV_EXPLICIT_GC_MAJOR_SLICE
    15. | EV_FINALISE_UPDATE_FIRST
    16. | EV_FINALISE_UPDATE_LAST
    17. | EV_INTERRUPT_REMOTE
    18. | EV_MAJOR_EPHE_MARK
    19. | EV_MAJOR_EPHE_SWEEP
    20. | EV_MAJOR_FINISH_MARKING
    21. | EV_MAJOR_GC_CYCLE_DOMAINS
    22. | EV_MAJOR_GC_PHASE_CHANGE
    23. | EV_MAJOR_GC_STW
    24. | EV_MAJOR_MARK_OPPORTUNISTIC
    25. | EV_MAJOR_SLICE
    26. | EV_MAJOR_FINISH_CYCLE
    27. | EV_MINOR_CLEAR
    28. | EV_MINOR_FINALIZERS_OLDIFY
    29. | EV_MINOR_GLOBAL_ROOTS
    30. | EV_MINOR_LEAVE_BARRIER
    31. | EV_STW_API_BARRIER
    32. | EV_STW_HANDLER
    33. | EV_STW_LEADER
    34. | EV_MAJOR_FINISH_SWEEPING
    35. | EV_MINOR_FINALIZERS_ADMIN
    36. | EV_MINOR_REMEMBERED_SET
    37. | EV_MINOR_REMEMBERED_SET_PROMOTE
    38. | EV_MINOR_LOCAL_ROOTS_PROMOTE
    39. | EV_DOMAIN_CONDITION_WAIT
    40. | EV_DOMAIN_RESIZE_HEAP_RESERVATION

    The type for span events emitted by the runtime

    type lifecycle =
    1. | EV_RING_START
    2. | EV_RING_STOP
    3. | EV_RING_PAUSE
    4. | EV_RING_RESUME
    5. | EV_FORK_PARENT
    6. | EV_FORK_CHILD
    7. | EV_DOMAIN_SPAWN
    8. | EV_DOMAIN_TERMINATE

    Lifecycle events for the ring itself

    val lifecycle_name : lifecycle -> string

    Return a string representation of a given lifecycle event type

    val runtime_phase_name : runtime_phase -> string

    Return a string representation of a given runtime phase event type

    val runtime_counter_name : runtime_counter -> string

    Return a string representation of a given runtime counter type

    type cursor

    Type of the cursor used when consuming

    module Timestamp : sig ... end
    module Type : sig ... end
    module User : sig ... end

    User events is a way for libraries to provide runtime events that can be consumed by other tools. These events can carry known data types or custom values. The current maximum number of user events is 8192.

    module Callbacks : sig ... end
    val start : unit -> unit

    start () will start the collection of events in the runtime if not already started.

    Events can be consumed by creating a cursor with create_cursor and providing a set of callbacks to be called for each type of event.

    val pause : unit -> unit

    pause () will pause the collection of events in the runtime. Traces are collected if the program has called Runtime_events.start () or the OCAML_RUNTIME_EVENTS_START environment variable has been set.

    val resume : unit -> unit

    resume () will resume the collection of events in the runtime. Traces are collected if the program has called Runtime_events.start () or the OCAML_RUNTIME_EVENTS_START environment variable has been set.

    val create_cursor : (string * int) option -> cursor

    create_cursor path_pid creates a cursor to read from an runtime_events. Cursors can be created for runtime_events in and out of process. A runtime_events ring-buffer may have multiple cursors reading from it at any point in time and a program may have multiple cursors open concurrently (for example if multiple consumers want different sets of events). If path_pid is None then a cursor is created for the current process. Otherwise the pair contains a string path to the directory that contains the pid.events file and int pid for the runtime_events of an external process to monitor.

    val free_cursor : cursor -> unit

    Free a previously created runtime_events cursor

    val read_poll : cursor -> Callbacks.t -> int option -> int

    read_poll cursor callbacks max_option calls the corresponding functions on callbacks for up to max_option events read off cursor's runtime_events and returns the number of events read.

    diff --git a/ocaml/Runtimedef/index.html b/ocaml/Runtimedef/index.html index 77a52a8..99c1337 100644 --- a/ocaml/Runtimedef/index.html +++ b/ocaml/Runtimedef/index.html @@ -1,2 +1,2 @@ -Runtimedef (ocaml.Runtimedef)

    Module Runtimedef

    val builtin_exceptions : string array
    val builtin_primitives : string array
    \ No newline at end of file +Runtimedef (ocaml.Runtimedef)

    Module Runtimedef

    val builtin_exceptions : string array
    val builtin_primitives : string array
    diff --git a/ocaml/Schedgen/class-scheduler_generic/index.html b/ocaml/Schedgen/class-scheduler_generic/index.html index 73acfa3..b21a735 100644 --- a/ocaml/Schedgen/class-scheduler_generic/index.html +++ b/ocaml/Schedgen/class-scheduler_generic/index.html @@ -1,2 +1,2 @@ -scheduler_generic (ocaml.Schedgen.scheduler_generic)

    Class Schedgen.scheduler_generic

    method virtual oper_issue_cycles : Mach.operation -> int
    method virtual oper_latency : Mach.operation -> int
    method reload_retaddr_issue_cycles : int
    method reload_retaddr_latency : int
    method oper_in_basic_block : Mach.operation -> bool
    method is_store : Mach.operation -> bool
    method is_load : Mach.operation -> bool
    method is_checkbound : Mach.operation -> bool
    method schedule_fundecl : Linear.fundecl -> Linear.fundecl
    \ No newline at end of file +scheduler_generic (ocaml.Schedgen.scheduler_generic)

    Class Schedgen.scheduler_generic

    method virtual oper_issue_cycles : Mach.operation -> int
    method virtual oper_latency : Mach.operation -> int
    method reload_retaddr_issue_cycles : int
    method reload_retaddr_latency : int
    method oper_in_basic_block : Mach.operation -> bool
    method is_store : Mach.operation -> bool
    method is_load : Mach.operation -> bool
    method is_checkbound : Mach.operation -> bool
    method schedule_fundecl : Linear.fundecl -> Linear.fundecl
    diff --git a/ocaml/Schedgen/index.html b/ocaml/Schedgen/index.html index 9350d07..e2007dd 100644 --- a/ocaml/Schedgen/index.html +++ b/ocaml/Schedgen/index.html @@ -1,2 +1,2 @@ -Schedgen (ocaml.Schedgen)

    Module Schedgen

    type code_dag_node = {
    1. instr : Linear.instruction;
    2. delay : int;
    3. mutable sons : (code_dag_node * int) list;
    4. mutable date : int;
    5. mutable length : int;
    6. mutable ancestors : int;
    7. mutable emitted_ancestors : int;
    }
    class virtual scheduler_generic : object ... end
    val reset : unit -> unit
    \ No newline at end of file +Schedgen (ocaml.Schedgen)

    Module Schedgen

    type code_dag_node = {
    1. instr : Linear.instruction;
    2. delay : int;
    3. mutable sons : (code_dag_node * int) list;
    4. mutable date : int;
    5. mutable length : int;
    6. mutable ancestors : int;
    7. mutable emitted_ancestors : int;
    }
    class virtual scheduler_generic : object ... end
    val reset : unit -> unit
    diff --git a/ocaml/Scheduling/index.html b/ocaml/Scheduling/index.html index 66c4b0e..e3cc2ce 100644 --- a/ocaml/Scheduling/index.html +++ b/ocaml/Scheduling/index.html @@ -1,2 +1,2 @@ -Scheduling (ocaml.Scheduling)

    Module Scheduling

    \ No newline at end of file +Scheduling (ocaml.Scheduling)

    Module Scheduling

    diff --git a/ocaml/Selectgen/Coeffect/index.html b/ocaml/Selectgen/Coeffect/index.html index 30fd380..f192f1b 100644 --- a/ocaml/Selectgen/Coeffect/index.html +++ b/ocaml/Selectgen/Coeffect/index.html @@ -1,2 +1,2 @@ -Coeffect (ocaml.Selectgen.Coeffect)

    Module Selectgen.Coeffect

    type t =
    1. | None
    2. | Read_mutable
    3. | Arbitrary
    \ No newline at end of file +Coeffect (ocaml.Selectgen.Coeffect)

    Module Selectgen.Coeffect

    type t =
    1. | None
    2. | Read_mutable
    3. | Arbitrary
    diff --git a/ocaml/Selectgen/Effect/index.html b/ocaml/Selectgen/Effect/index.html index bd58512..ba2d311 100644 --- a/ocaml/Selectgen/Effect/index.html +++ b/ocaml/Selectgen/Effect/index.html @@ -1,2 +1,2 @@ -Effect (ocaml.Selectgen.Effect)

    Module Selectgen.Effect

    type t =
    1. | None
    2. | Raise
    3. | Arbitrary
    \ No newline at end of file +Effect (ocaml.Selectgen.Effect)

    Module Selectgen.Effect

    type t =
    1. | None
    2. | Raise
    3. | Arbitrary
    diff --git a/ocaml/Selectgen/Effect_and_coeffect/index.html b/ocaml/Selectgen/Effect_and_coeffect/index.html index d36bdec..16ea712 100644 --- a/ocaml/Selectgen/Effect_and_coeffect/index.html +++ b/ocaml/Selectgen/Effect_and_coeffect/index.html @@ -1,2 +1,2 @@ -Effect_and_coeffect (ocaml.Selectgen.Effect_and_coeffect)

    Module Selectgen.Effect_and_coeffect

    type t
    val none : t
    val arbitrary : t
    val effect : t -> Effect.t
    val coeffect : t -> Coeffect.t
    val effect_only : Effect.t -> t
    val coeffect_only : Coeffect.t -> t
    val join : t -> t -> t
    val join_list_map : 'a list -> ('a -> t) -> t
    \ No newline at end of file +Effect_and_coeffect (ocaml.Selectgen.Effect_and_coeffect)

    Module Selectgen.Effect_and_coeffect

    type t
    val none : t
    val arbitrary : t
    val effect : t -> Effect.t
    val coeffect : t -> Coeffect.t
    val effect_only : Effect.t -> t
    val coeffect_only : Coeffect.t -> t
    val join : t -> t -> t
    val join_list_map : 'a list -> ('a -> t) -> t
    diff --git a/ocaml/Selectgen/class-selector_generic/index.html b/ocaml/Selectgen/class-selector_generic/index.html index babbef3..9efa4f6 100644 --- a/ocaml/Selectgen/class-selector_generic/index.html +++ b/ocaml/Selectgen/class-selector_generic/index.html @@ -1,5 +1,5 @@ -selector_generic (ocaml.Selectgen.selector_generic)

    Class Selectgen.selector_generic

    method is_immediate : Mach.integer_operation -> int -> bool
    method virtual is_immediate_test : Mach.integer_comparison -> int -> bool
    method virtual select_addressing : Cmm.memory_chunk -> +selector_generic (ocaml.Selectgen.selector_generic)

    Class Selectgen.selector_generic

    method is_immediate : Mach.integer_operation -> int -> bool
    method virtual is_immediate_test : Mach.integer_comparison -> int -> bool
    method virtual select_addressing : Cmm.memory_chunk -> Cmm.expression -> Arch.addressing_mode * Cmm.expression
    method is_simple_expr : Cmm.expression -> bool
    method effects_of : Cmm.expression -> Effect_and_coeffect.t
    method select_operation : Cmm.operation -> Cmm.expression list -> @@ -23,7 +23,7 @@ unit
    method emit_extcall_args : environment -> Cmm.exttype list -> Cmm.expression list -> - Reg.t array * int
    method emit_stores : environment -> Cmm.expression list -> Reg.t array -> unit
    method mark_call : unit
    method mark_tailcall : unit
    method mark_c_tailcall : unit
    method mark_instr : Mach.instruction_desc -> unit
    method emit_fundecl : future_funcnames:Misc.Stdlib.String.Set.t -> + Reg.t array * int
    method emit_stores : environment -> Cmm.expression list -> Reg.t array -> unit
    method mark_call : unit
    method mark_tailcall : unit
    method mark_c_tailcall : unit
    method mark_instr : Mach.instruction_desc -> unit
    method emit_fundecl : future_funcnames:Misc.Stdlib.String.Set.t -> Cmm.fundecl -> Mach.fundecl
    method extract_onto : Mach.instruction -> Mach.instruction
    method extract : Mach.instruction
    method insert : environment -> Mach.instruction_desc -> @@ -42,4 +42,4 @@ Reg.t array -> Reg.t array -> int -> - unit
    method insert_moves : environment -> Reg.t array -> Reg.t array -> unit
    method emit_expr : environment -> Cmm.expression -> Reg.t array option
    method emit_tail : environment -> Cmm.expression -> unit
    val contains_calls : bool ref
    \ No newline at end of file + unit
    method insert_moves : environment -> Reg.t array -> Reg.t array -> unit
    method emit_expr : environment -> Cmm.expression -> Reg.t array option
    method emit_tail : environment -> Cmm.expression -> unit
    val contains_calls : bool ref
    diff --git a/ocaml/Selectgen/index.html b/ocaml/Selectgen/index.html index 529eab1..1d619ad 100644 --- a/ocaml/Selectgen/index.html +++ b/ocaml/Selectgen/index.html @@ -1,7 +1,7 @@ -Selectgen (ocaml.Selectgen)

    Module Selectgen

    type environment
    val env_add : - ?mut:Asttypes.mutable_flag -> +Selectgen (ocaml.Selectgen)

    Module Selectgen

    type environment
    val env_find : Backend_var.t -> environment -> Reg.t array
    val size_expr : environment -> Cmm.expression -> int
    module Effect : sig ... end
    module Coeffect : sig ... end
    module Effect_and_coeffect : sig ... end
    class virtual selector_generic : object ... end
    val reset : unit -> unit
    \ No newline at end of file + environment
    val env_find : Backend_var.t -> environment -> Reg.t array
    val size_expr : environment -> Cmm.expression -> int
    module Effect : sig ... end
    module Coeffect : sig ... end
    module Effect_and_coeffect : sig ... end
    class virtual selector_generic : object ... end
    val reset : unit -> unit
    diff --git a/ocaml/Selection/index.html b/ocaml/Selection/index.html index 3c9cbeb..85f941a 100644 --- a/ocaml/Selection/index.html +++ b/ocaml/Selection/index.html @@ -1,5 +1,5 @@ -Selection (ocaml.Selection)

    Module Selection

    val fundecl : - future_funcnames:Misc.Stdlib.String.Set.t -> +Selection (ocaml.Selection)

    Module Selection

    val fundecl : + future_funcnames:Misc.Stdlib.String.Set.t -> Cmm.fundecl -> - Mach.fundecl
    \ No newline at end of file + Mach.fundecl
    diff --git a/ocaml/Semantics_of_primitives/index.html b/ocaml/Semantics_of_primitives/index.html index 5a9a857..7ebd3f8 100644 --- a/ocaml/Semantics_of_primitives/index.html +++ b/ocaml/Semantics_of_primitives/index.html @@ -1,2 +1,2 @@ -Semantics_of_primitives (ocaml.Semantics_of_primitives)

    Module Semantics_of_primitives

    Description of the semantics of primitives, to be used for optimization purposes.

    "No effects" means that the primitive does not change the observable state of the world. For example, it must not write to any mutable storage, call arbitrary external functions or change control flow (e.g. by raising an exception). Note that allocation is not "No effects" (see below).

    It is assumed in the compiler that applications of primitives with no effects, whose results are not used, may be eliminated. It is further assumed that applications of primitives with no effects may be duplicated (and thus possibly executed more than once).

    (Exceptions arising from allocation points, for example "out of memory" or exceptions propagated from finalizers or signal handlers, are treated as "effects out of the ether" and thus ignored for our determination here of effectfulness. The same goes for floating point operations that may cause hardware traps on some platforms.)

    "Only generative effects" means that a primitive does not change the observable state of the world save for possibly affecting the state of the garbage collector by performing an allocation. Applications of primitives that only have generative effects and whose results are unused may be eliminated by the compiler. However, unlike "No effects" primitives, such applications will never be eligible for duplication.

    "Arbitrary effects" covers all other primitives.

    "No coeffects" means that the primitive does not observe the effects (in the sense described above) of other expressions. For example, it must not read from any mutable storage or call arbitrary external functions.

    It is assumed in the compiler that, subject to data dependencies, expressions with neither effects nor coeffects may be reordered with respect to other expressions.

    type effects =
    1. | No_effects
    2. | Only_generative_effects
    3. | Arbitrary_effects
    type coeffects =
    1. | No_coeffects
    2. | Has_coeffects

    Describe the semantics of a primitive. This does not take into account of the (non-)(co)effectfulness of the arguments in a primitive application. To determine whether such an application is (co)effectful, the arguments must also be analysed.

    type return_type =
    1. | Float
    2. | Other
    val return_type_of_primitive : Clambda_primitives.primitive -> return_type
    \ No newline at end of file +Semantics_of_primitives (ocaml.Semantics_of_primitives)

    Module Semantics_of_primitives

    Description of the semantics of primitives, to be used for optimization purposes.

    "No effects" means that the primitive does not change the observable state of the world. For example, it must not write to any mutable storage, call arbitrary external functions or change control flow (e.g. by raising an exception). Note that allocation is not "No effects" (see below).

    It is assumed in the compiler that applications of primitives with no effects, whose results are not used, may be eliminated. It is further assumed that applications of primitives with no effects may be duplicated (and thus possibly executed more than once).

    (Exceptions arising from allocation points, for example "out of memory" or exceptions propagated from finalizers or signal handlers, are treated as "effects out of the ether" and thus ignored for our determination here of effectfulness. The same goes for floating point operations that may cause hardware traps on some platforms.)

    "Only generative effects" means that a primitive does not change the observable state of the world save for possibly affecting the state of the garbage collector by performing an allocation. Applications of primitives that only have generative effects and whose results are unused may be eliminated by the compiler. However, unlike "No effects" primitives, such applications will never be eligible for duplication.

    "Arbitrary effects" covers all other primitives.

    "No coeffects" means that the primitive does not observe the effects (in the sense described above) of other expressions. For example, it must not read from any mutable storage or call arbitrary external functions.

    It is assumed in the compiler that, subject to data dependencies, expressions with neither effects nor coeffects may be reordered with respect to other expressions.

    type effects =
    1. | No_effects
    2. | Only_generative_effects
    3. | Arbitrary_effects
    type coeffects =
    1. | No_coeffects
    2. | Has_coeffects

    Describe the semantics of a primitive. This does not take into account of the (non-)(co)effectfulness of the arguments in a primitive application. To determine whether such an application is (co)effectful, the arguments must also be analysed.

    type return_type =
    1. | Float
    2. | Other
    val return_type_of_primitive : Clambda_primitives.primitive -> return_type
    diff --git a/ocaml/Set_of_closures_id/Map/index.html b/ocaml/Set_of_closures_id/Map/index.html index 19fd1c6..759ff18 100644 --- a/ocaml/Set_of_closures_id/Map/index.html +++ b/ocaml/Set_of_closures_id/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Set_of_closures_id.Map)

    Module Set_of_closures_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Set_of_closures_id.Map)

    Module Set_of_closures_id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Set_of_closures_id/Set/index.html b/ocaml/Set_of_closures_id/Set/index.html index e3f8a1d..c0125d1 100644 --- a/ocaml/Set_of_closures_id/Set/index.html +++ b/ocaml/Set_of_closures_id/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Set_of_closures_id.Set)

    Module Set_of_closures_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Set_of_closures_id.Set)

    Module Set_of_closures_id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Set_of_closures_id/T/index.html b/ocaml/Set_of_closures_id/T/index.html index 7da6991..96627fc 100644 --- a/ocaml/Set_of_closures_id/T/index.html +++ b/ocaml/Set_of_closures_id/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Set_of_closures_id.T)

    Module Set_of_closures_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Set_of_closures_id.T)

    Module Set_of_closures_id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Set_of_closures_id/Tbl/index.html b/ocaml/Set_of_closures_id/Tbl/index.html index 0adbd7a..8927dd9 100644 --- a/ocaml/Set_of_closures_id/Tbl/index.html +++ b/ocaml/Set_of_closures_id/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Set_of_closures_id.Tbl)

    Module Set_of_closures_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Set_of_closures_id.Tbl)

    Module Set_of_closures_id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Set_of_closures_id/index.html b/ocaml/Set_of_closures_id/index.html index c0cb258..1bdc96f 100644 --- a/ocaml/Set_of_closures_id/index.html +++ b/ocaml/Set_of_closures_id/index.html @@ -1,2 +1,2 @@ -Set_of_closures_id (ocaml.Set_of_closures_id)

    Module Set_of_closures_id

    An identifier, unique across the whole program, that identifies a set of closures (viz. Set_of_closures).

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : ?name:string -> Compilation_unit.t -> t
    val name : t -> string option
    val get_compilation_unit : t -> Compilation_unit.t
    \ No newline at end of file +Set_of_closures_id (ocaml.Set_of_closures_id)

    Module Set_of_closures_id

    An identifier, unique across the whole program, that identifies a set of closures (viz. Set_of_closures).

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : ?name:string -> Compilation_unit.t -> t
    val name : t -> string option
    val get_compilation_unit : t -> Compilation_unit.t
    diff --git a/ocaml/Set_of_closures_origin/Map/index.html b/ocaml/Set_of_closures_origin/Map/index.html index 953cbc3..bb4b68f 100644 --- a/ocaml/Set_of_closures_origin/Map/index.html +++ b/ocaml/Set_of_closures_origin/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Set_of_closures_origin.Map)

    Module Set_of_closures_origin.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Set_of_closures_origin.Map)

    Module Set_of_closures_origin.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Set_of_closures_origin/Set/index.html b/ocaml/Set_of_closures_origin/Set/index.html index 6cc11b5..cc4e005 100644 --- a/ocaml/Set_of_closures_origin/Set/index.html +++ b/ocaml/Set_of_closures_origin/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Set_of_closures_origin.Set)

    Module Set_of_closures_origin.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Set_of_closures_origin.Set)

    Module Set_of_closures_origin.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Set_of_closures_origin/T/index.html b/ocaml/Set_of_closures_origin/T/index.html index 5a85795..22fdff8 100644 --- a/ocaml/Set_of_closures_origin/T/index.html +++ b/ocaml/Set_of_closures_origin/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Set_of_closures_origin.T)

    Module Set_of_closures_origin.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Set_of_closures_origin.T)

    Module Set_of_closures_origin.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Set_of_closures_origin/Tbl/index.html b/ocaml/Set_of_closures_origin/Tbl/index.html index 99473bc..5d58fbf 100644 --- a/ocaml/Set_of_closures_origin/Tbl/index.html +++ b/ocaml/Set_of_closures_origin/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Set_of_closures_origin.Tbl)

    Module Set_of_closures_origin.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Set_of_closures_origin.Tbl)

    Module Set_of_closures_origin.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Set_of_closures_origin/index.html b/ocaml/Set_of_closures_origin/index.html index 182ca00..e9daf05 100644 --- a/ocaml/Set_of_closures_origin/index.html +++ b/ocaml/Set_of_closures_origin/index.html @@ -1,2 +1,2 @@ -Set_of_closures_origin (ocaml.Set_of_closures_origin)

    Module Set_of_closures_origin

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Set_of_closures_id.t -> t
    val get_compilation_unit : t -> Compilation_unit.t
    \ No newline at end of file +Set_of_closures_origin (ocaml.Set_of_closures_origin)

    Module Set_of_closures_origin

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : Set_of_closures_id.t -> t
    val get_compilation_unit : t -> Compilation_unit.t
    diff --git a/ocaml/Shape/Item/Map/index.html b/ocaml/Shape/Item/Map/index.html index caa4164..c0e6b39 100644 --- a/ocaml/Shape/Item/Map/index.html +++ b/ocaml/Shape/Item/Map/index.html @@ -1,8 +1,8 @@ -Map (ocaml.Shape.Item.Map)

    Module Item.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Shape.Item.Map)

    Module Item.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Shape/Item/index.html b/ocaml/Shape/Item/index.html index 9f29046..e4d00de 100644 --- a/ocaml/Shape/Item/index.html +++ b/ocaml/Shape/Item/index.html @@ -1,2 +1,2 @@ -Item (ocaml.Shape.Item)

    Module Shape.Item

    type t
    val make : string -> Sig_component_kind.t -> t
    val value : Ident.t -> t
    val type_ : Ident.t -> t
    val module_ : Ident.t -> t
    val module_type : Ident.t -> t
    val extension_constructor : Ident.t -> t
    val class_ : Ident.t -> t
    val class_type : Ident.t -> t
    module Map : Map.S with type key = t
    \ No newline at end of file +Item (ocaml.Shape.Item)

    Module Shape.Item

    type t
    val make : string -> Sig_component_kind.t -> t
    val value : Ident.t -> t
    val type_ : Ident.t -> t
    val module_ : Ident.t -> t
    val module_type : Ident.t -> t
    val extension_constructor : Ident.t -> t
    val class_ : Ident.t -> t
    val class_type : Ident.t -> t
    module Map : Map.S with type key = t
    diff --git a/ocaml/Shape/Make_reduce/argument-1-Context/index.html b/ocaml/Shape/Make_reduce/argument-1-Context/index.html index 61d0e7a..29f8b3f 100644 --- a/ocaml/Shape/Make_reduce/argument-1-Context/index.html +++ b/ocaml/Shape/Make_reduce/argument-1-Context/index.html @@ -1,2 +1,2 @@ -Context (ocaml.Shape.Make_reduce.Context)

    Parameter Make_reduce.Context

    type env
    val fuel : int
    val read_unit_shape : unit_name:string -> t option
    val find_shape : env -> Ident.t -> t
    \ No newline at end of file +Context (ocaml.Shape.Make_reduce.Context)

    Parameter Make_reduce.Context

    type env
    val fuel : int
    val read_unit_shape : unit_name:string -> t option
    val find_shape : env -> Ident.t -> t
    diff --git a/ocaml/Shape/Make_reduce/index.html b/ocaml/Shape/Make_reduce/index.html index 568ddd8..43679a6 100644 --- a/ocaml/Shape/Make_reduce/index.html +++ b/ocaml/Shape/Make_reduce/index.html @@ -1,2 +1,2 @@ -Make_reduce (ocaml.Shape.Make_reduce)

    Module Shape.Make_reduce

    The Make_reduce functor is used to generate a reduction function for shapes.

    It is parametrized by:

    • an environment and a function to find shapes by path in that environment
    • a function to load the shape of an external compilation unit
    • some fuel, which is used to bound recursion when dealing with recursive shapes introduced by recursive modules. (FTR: merlin currently uses a fuel of 10, which seems to be enough for most practical examples)

    Parameters

    module Context : sig ... end

    Signature

    val reduce : Context.env -> t -> t
    \ No newline at end of file +Make_reduce (ocaml.Shape.Make_reduce)

    Module Shape.Make_reduce

    The Make_reduce functor is used to generate a reduction function for shapes.

    It is parametrized by:

    • an environment and a function to find shapes by path in that environment
    • a function to load the shape of an external compilation unit
    • some fuel, which is used to bound recursion when dealing with recursive shapes introduced by recursive modules. (FTR: merlin currently uses a fuel of 10, which seems to be enough for most practical examples)

    Parameters

    module Context : sig ... end

    Signature

    val reduce : Context.env -> t -> t
    diff --git a/ocaml/Shape/Map/index.html b/ocaml/Shape/Map/index.html index 2fc277f..d1fda93 100644 --- a/ocaml/Shape/Map/index.html +++ b/ocaml/Shape/Map/index.html @@ -1,2 +1,2 @@ -Map (ocaml.Shape.Map)

    Module Shape.Map

    type shape = t
    type nonrec t = t Item.Map.t
    val empty : t
    val add : t -> Item.t -> shape -> t
    val add_value : t -> Ident.t -> Uid.t -> t
    val add_value_proj : t -> Ident.t -> shape -> t
    val add_type : t -> Ident.t -> Uid.t -> t
    val add_type_proj : t -> Ident.t -> shape -> t
    val add_module : t -> Ident.t -> shape -> t
    val add_module_proj : t -> Ident.t -> shape -> t
    val add_module_type : t -> Ident.t -> Uid.t -> t
    val add_module_type_proj : t -> Ident.t -> shape -> t
    val add_extcons : t -> Ident.t -> Uid.t -> t
    val add_extcons_proj : t -> Ident.t -> shape -> t
    val add_class : t -> Ident.t -> Uid.t -> t
    val add_class_proj : t -> Ident.t -> shape -> t
    val add_class_type : t -> Ident.t -> Uid.t -> t
    val add_class_type_proj : t -> Ident.t -> shape -> t
    \ No newline at end of file +Map (ocaml.Shape.Map)

    Module Shape.Map

    type shape = t
    type nonrec t = t Item.Map.t
    val empty : t
    val add : t -> Item.t -> shape -> t
    val add_value : t -> Ident.t -> Uid.t -> t
    val add_value_proj : t -> Ident.t -> shape -> t
    val add_type : t -> Ident.t -> Uid.t -> t
    val add_type_proj : t -> Ident.t -> shape -> t
    val add_module : t -> Ident.t -> shape -> t
    val add_module_proj : t -> Ident.t -> shape -> t
    val add_module_type : t -> Ident.t -> Uid.t -> t
    val add_module_type_proj : t -> Ident.t -> shape -> t
    val add_extcons : t -> Ident.t -> Uid.t -> t
    val add_extcons_proj : t -> Ident.t -> shape -> t
    val add_class : t -> Ident.t -> Uid.t -> t
    val add_class_proj : t -> Ident.t -> shape -> t
    val add_class_type : t -> Ident.t -> Uid.t -> t
    val add_class_type_proj : t -> Ident.t -> shape -> t
    diff --git a/ocaml/Shape/Sig_component_kind/index.html b/ocaml/Shape/Sig_component_kind/index.html index edae564..5547ca4 100644 --- a/ocaml/Shape/Sig_component_kind/index.html +++ b/ocaml/Shape/Sig_component_kind/index.html @@ -1,2 +1,2 @@ -Sig_component_kind (ocaml.Shape.Sig_component_kind)

    Module Shape.Sig_component_kind

    type t =
    1. | Value
    2. | Type
    3. | Module
    4. | Module_type
    5. | Extension_constructor
    6. | Class
    7. | Class_type
    val to_string : t -> string
    val can_appear_in_types : t -> bool

    Whether the name of a component of that kind can appear in a type.

    \ No newline at end of file +Sig_component_kind (ocaml.Shape.Sig_component_kind)

    Module Shape.Sig_component_kind

    type t =
    1. | Value
    2. | Type
    3. | Module
    4. | Module_type
    5. | Extension_constructor
    6. | Class
    7. | Class_type
    val to_string : t -> string
    val can_appear_in_types : t -> bool

    Whether the name of a component of that kind can appear in a type.

    diff --git a/ocaml/Shape/Uid/Map/index.html b/ocaml/Shape/Uid/Map/index.html index 8072466..28f1fc3 100644 --- a/ocaml/Shape/Uid/Map/index.html +++ b/ocaml/Shape/Uid/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Shape.Uid.Map)

    Module Uid.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Shape.Uid.Map)

    Module Uid.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Shape/Uid/Set/index.html b/ocaml/Shape/Uid/Set/index.html index da1c60d..8c36289 100644 --- a/ocaml/Shape/Uid/Set/index.html +++ b/ocaml/Shape/Uid/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Shape.Uid.Set)

    Module Uid.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Shape.Uid.Set)

    Module Uid.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Shape/Uid/T/index.html b/ocaml/Shape/Uid/T/index.html index 59bcb27..442b8b2 100644 --- a/ocaml/Shape/Uid/T/index.html +++ b/ocaml/Shape/Uid/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Shape.Uid.T)

    Module Uid.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Shape.Uid.T)

    Module Uid.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Shape/Uid/Tbl/index.html b/ocaml/Shape/Uid/Tbl/index.html index 9aec18c..792291e 100644 --- a/ocaml/Shape/Uid/Tbl/index.html +++ b/ocaml/Shape/Uid/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Shape.Uid.Tbl)

    Module Uid.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Shape.Uid.Tbl)

    Module Uid.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Shape/Uid/index.html b/ocaml/Shape/Uid/index.html index b7d3ffc..71ad3c4 100644 --- a/ocaml/Shape/Uid/index.html +++ b/ocaml/Shape/Uid/index.html @@ -1,2 +1,2 @@ -Uid (ocaml.Shape.Uid)

    Module Shape.Uid

    type t = private
    1. | Compilation_unit of string
    2. | Item of {
      1. comp_unit : string;
      2. id : int;
      }
    3. | Internal
    4. | Predef of string
    val reinit : unit -> unit
    val mk : current_unit:string -> t
    val of_compilation_unit_id : Ident.t -> t
    val of_predef_id : Ident.t -> t
    val internal_not_actually_unique : t
    val for_actual_declaration : t -> bool
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Uid (ocaml.Shape.Uid)

    Module Shape.Uid

    type t = private
    1. | Compilation_unit of string
    2. | Item of {
      1. comp_unit : string;
      2. id : int;
      }
    3. | Internal
    4. | Predef of string
    val reinit : unit -> unit
    val mk : current_unit:string -> t
    val of_compilation_unit_id : Ident.t -> t
    val of_predef_id : Ident.t -> t
    val internal_not_actually_unique : t
    val for_actual_declaration : t -> bool
    include Identifiable.S with type t := t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Shape/index.html b/ocaml/Shape/index.html index 883682b..feed1b2 100644 --- a/ocaml/Shape/index.html +++ b/ocaml/Shape/index.html @@ -1,6 +1,6 @@ -Shape (ocaml.Shape)

    Module Shape

    module Uid : sig ... end
    module Sig_component_kind : sig ... end
    module Item : sig ... end
    type var = Ident.t
    type t = {
    1. uid : Uid.t option;
    2. desc : desc;
    }
    and desc =
    1. | Var of var
    2. | Abs of var * t
    3. | App of t * t
    4. | Struct of t Item.Map.t
    5. | Leaf
    6. | Proj of t * Item.t
    7. | Comp_unit of string
    val print : Stdlib.Format.formatter -> t -> unit
    val for_unnamed_functor_param : var
    val fresh_var : ?name:string -> Uid.t -> var * t
    val var : Uid.t -> Ident.t -> t
    val abs : ?uid:Uid.t -> var -> t -> t
    val app : ?uid:Uid.t -> t -> arg:t -> t
    val str : ?uid:Uid.t -> t Item.Map.t -> t
    val proj : ?uid:Uid.t -> t -> Item.t -> t
    val leaf : Uid.t -> t
    val decompose_abs : t -> (var * t) option
    val for_persistent_unit : string -> t
    val leaf_for_unpack : t
    module Map : sig ... end
    val dummy_mod : t
    val of_path : - find_shape:(Sig_component_kind.t -> Ident.t -> t) -> - namespace:Sig_component_kind.t -> +Shape (ocaml.Shape)

    Module Shape

    module Uid : sig ... end
    module Sig_component_kind : sig ... end
    module Item : sig ... end
    type var = Ident.t
    type t = {
    1. uid : Uid.t option;
    2. desc : desc;
    }
    and desc =
    1. | Var of var
    2. | Abs of var * t
    3. | App of t * t
    4. | Struct of t Item.Map.t
    5. | Leaf
    6. | Proj of t * Item.t
    7. | Comp_unit of string
    val print : Stdlib.Format.formatter -> t -> unit
    val for_unnamed_functor_param : var
    val fresh_var : ?name:string -> Uid.t -> var * t
    val var : Uid.t -> Ident.t -> t
    val abs : ?uid:Uid.t -> var -> t -> t
    val app : ?uid:Uid.t -> t -> arg:t -> t
    val str : ?uid:Uid.t -> t Item.Map.t -> t
    val proj : ?uid:Uid.t -> t -> Item.t -> t
    val leaf : Uid.t -> t
    val decompose_abs : t -> (var * t) option
    val for_persistent_unit : string -> t
    val leaf_for_unpack : t
    module Map : sig ... end
    val dummy_mod : t
    val of_path : + find_shape:(Sig_component_kind.t -> Ident.t -> t) -> + namespace:Sig_component_kind.t -> Path.t -> - t
    val set_uid_if_none : t -> Uid.t -> t
    module Make_reduce (Context : sig ... end) : sig ... end

    The Make_reduce functor is used to generate a reduction function for shapes.

    val local_reduce : t -> t
    \ No newline at end of file + t
    val set_uid_if_none : t -> Uid.t -> t
    module Make_reduce (Context : sig ... end) : sig ... end

    The Make_reduce functor is used to generate a reduction function for shapes.

    val local_reduce : t -> t
    diff --git a/ocaml/Share_constants/index.html b/ocaml/Share_constants/index.html index 1246981..bdc1860 100644 --- a/ocaml/Share_constants/index.html +++ b/ocaml/Share_constants/index.html @@ -1,2 +1,2 @@ -Share_constants (ocaml.Share_constants)

    Module Share_constants

    Share lifted constants that are eligible for sharing (e.g. not strings) and have equal definitions.

    val share_constants : Flambda.program -> Flambda.program
    \ No newline at end of file +Share_constants (ocaml.Share_constants)

    Module Share_constants

    Share lifted constants that are eligible for sharing (e.g. not strings) and have equal definitions.

    val share_constants : Flambda.program -> Flambda.program
    diff --git a/ocaml/Signature_group/index.html b/ocaml/Signature_group/index.html index 9cb8963..b6e0723 100644 --- a/ocaml/Signature_group/index.html +++ b/ocaml/Signature_group/index.html @@ -1,7 +1,7 @@ -Signature_group (ocaml.Signature_group)

    Module Signature_group

    Iterate on signature by syntactic group of items

    Classes, class types and private row types adds ghost components to the signature where they are defined.

    When editing or printing a signature it is therefore important to identify those ghost components.

    This module provides type grouping together ghost components with the corresponding core item (or recursive group) and the corresponding iterators.

    type sig_item = {
    1. src : Types.signature_item;
      (*

      the syntactic item

      *)
    2. post_ghosts : Types.signature_item list;
      (*

      ghost classes types are post-declared

      *)
    }

    Classes and class types generate ghosts signature items, we group them together before printing

    val flatten : sig_item -> Types.signature

    flatten sig_item is x.src :: x.post_ghosts

    type core_rec_group =
    1. | Not_rec of sig_item
    2. | Rec_group of sig_item list

    A group of mutually recursive definition

    val rec_items : core_rec_group -> sig_item list

    rec_items group is the list of sig_items in the group

    type rec_group = {
    1. pre_ghosts : Types.signature_item list;
    2. group : core_rec_group;
    }

    Private #row types are manifested as a sequence of definitions preceding a recursive group, we collect them and separate them from the syntactic recursive group.

    val next : Types.signature -> (rec_group * Types.signature) option

    The sequence seq signature iterates over signature rec_group by rec_group. The second element of the tuple in the full_seq case is the not-yet traversed part of the signature.

    val iter : (rec_group -> unit) -> Types.signature -> unit
    val fold : ('acc -> rec_group -> 'acc) -> 'acc -> Types.signature -> 'acc
    type in_place_patch = {
    1. ghosts : Types.signature;
      (*

      updated list of ghost items

      *)
    2. replace_by : Types.signature_item option;
      (*

      replacement for the selected item

      *)
    }

    Describe how to amend one element of a signature

    val replace_in_place : - (ghosts:Types.signature -> +Signature_group (ocaml.Signature_group)

    Module Signature_group

    Iterate on signature by syntactic group of items

    Classes, class types and private row types adds ghost components to the signature where they are defined.

    When editing or printing a signature it is therefore important to identify those ghost components.

    This module provides type grouping together ghost components with the corresponding core item (or recursive group) and the corresponding iterators.

    type sig_item = {
    1. src : Types.signature_item;
      (*

      the syntactic item

      *)
    2. post_ghosts : Types.signature_item list;
      (*

      ghost classes types are post-declared

      *)
    }

    Classes and class types generate ghosts signature items, we group them together before printing

    val flatten : sig_item -> Types.signature

    flatten sig_item is x.src :: x.post_ghosts

    type core_rec_group =
    1. | Not_rec of sig_item
    2. | Rec_group of sig_item list

    A group of mutually recursive definition

    val rec_items : core_rec_group -> sig_item list

    rec_items group is the list of sig_items in the group

    type rec_group = {
    1. pre_ghosts : Types.signature_item list;
    2. group : core_rec_group;
    }

    Private #row types are manifested as a sequence of definitions preceding a recursive group, we collect them and separate them from the syntactic recursive group.

    val next : Types.signature -> (rec_group * Types.signature) option

    The sequence seq signature iterates over signature rec_group by rec_group. The second element of the tuple in the full_seq case is the not-yet traversed part of the signature.

    val iter : (rec_group -> unit) -> Types.signature -> unit
    val fold : ('acc -> rec_group -> 'acc) -> 'acc -> Types.signature -> 'acc
    type in_place_patch = {
    1. ghosts : Types.signature;
      (*

      updated list of ghost items

      *)
    2. replace_by : Types.signature_item option;
      (*

      replacement for the selected item

      *)
    }

    Describe how to amend one element of a signature

    val replace_in_place : + (ghosts:Types.signature -> Types.signature_item -> ('a * in_place_patch) option) -> Types.signature -> - ('a * Types.signature) option

    !replace_in_place patch sg replaces the first element of the signature for which patch ~rec_group ~ghosts component returns Some (value,patch). The rec_group argument is the remaining part of the mutually recursive group of component. The ghosts list is the current prefix of ghost components associated to component

    \ No newline at end of file + ('a * Types.signature) option

    !replace_in_place patch sg replaces the first element of the signature for which patch ~rec_group ~ghosts component returns Some (value,patch). The rec_group argument is the remaining part of the mutually recursive group of component. The ghosts list is the current prefix of ghost components associated to component

    diff --git a/ocaml/Simple_value_approx/index.html b/ocaml/Simple_value_approx/index.html index 6099617..fcbb4e3 100644 --- a/ocaml/Simple_value_approx/index.html +++ b/ocaml/Simple_value_approx/index.html @@ -1,61 +1,46 @@ -Simple_value_approx (ocaml.Simple_value_approx)

    Module Simple_value_approx

    Simple approximations to the runtime results of computations. This pass is designed for speed rather than accuracy; the performance is important since it is used heavily during inlining.

    type 'a boxed_int =
    1. | Int32 : int32 boxed_int
    2. | Int64 : int64 boxed_int
    3. | Nativeint : nativeint boxed_int
    type value_string = {
    1. contents : string option;
    2. size : int;
    }
    type unresolved_value =
    1. | Set_of_closures_id of Set_of_closures_id.t
    2. | Symbol of Symbol.t
    type unknown_because_of =
    1. | Unresolved_value of unresolved_value
    2. | Other
    type t = private {
    1. descr : descr;
    2. var : Variable.t option;
    3. symbol : (Symbol.t * int option) option;
    }

    A value of type t corresponds to an "approximation" of the result of a computation in the program being compiled. That is to say, it represents what knowledge we have about such a result at compile time. The simplification pass exploits this information to partially evaluate computations.

    At a high level, an approximation for a value v has three parts:

    • the "description" (for example, "the constant integer 42");
    • an optional variable;
    • an optional symbol or symbol field. If the variable (resp. symbol) is present then that variable (resp. symbol) may be used to obtain the value v.

    The exact semantics of the variable and symbol fields follows.

    Approximations are deduced at particular points in an expression tree, but may subsequently be propagated to other locations.

    At the point at which an approximation is built for some value v, we can construct a set of variables (call the set S) that are known to alias the same value v. Each member of S will have the same or a more precise descr field in its approximation relative to the approximation for v. (An increase in precision may currently be introduced for pattern matches.) If S is non-empty then it is guaranteed that there is a unique member of S that was declared in a scope further out ("earlier") than all other members of S. If such a member exists then it is recorded in the var field. Otherwise var is None.

    Analogous to the construction of the set S, we can construct a set T consisting of all symbols that are known to alias the value whose approximation is being constructed. If T is non-empty then the symbol field is set to some member of T; it does not matter which one. (There is no notion of scope for symbols.)

    Note about mutable blocks:

    Mutable blocks are always represented by Value_unknown or Value_bottom. Any other approximation could leave the door open to a miscompilation. Such bad scenarios are most likely a user using Obj.magic or Obj.set_field in an inappropriate situation. Such a situation might be: let x = (1, 1) in - Obj.set_field (Obj.repr x) 0 (Obj.repr 2); - assert(fst x = 2) The user would probably expect the assertion to be true, but the compiler could in fact propagate the value of x across the Obj.set_field.

    Insisting that mutable blocks have Value_unknown or Value_bottom approximations certainly won't always prevent this kind of error, but should help catch many of them.

    It is possible that there may be some false positives, with correct but unreachable code causing this check to fail. However the likelihood of this seems sufficiently low, especially compared to the advantages gained by performing the check, that we include it.

    An example of a pattern that might trigger a false positive is: type a = { a : int } - type b = { mutable b : int } - type _ t = - | A : a t - | B : b t - let f (type x) (v:x t) (r:x) = - match v with - | A -> r.a - | B -> r.b <- 2; 3 - let v = - let r = - ref A in - r := A; (* Some pattern that the compiler can't understand *) - f !r { a = 1 } When inlining f, the B branch is unreachable, yet the compiler cannot prove it and must therefore keep it.

    and descr = private
    1. | Value_block of Tag.t * t array
    2. | Value_int of int
    3. | Value_char of char
    4. | Value_float of float option
    5. | Value_boxed_int : 'a boxed_int * 'a -> descr
    6. | Value_set_of_closures of value_set_of_closures
    7. | Value_closure of value_closure
    8. | Value_string of value_string
    9. | Value_float_array of value_float_array
    10. | Value_unknown of unknown_because_of
    11. | Value_bottom
    12. | Value_extern of Export_id.t
    13. | Value_symbol of Symbol.t
    14. | Value_unresolved of unresolved_value
    and value_closure = {
    1. set_of_closures : t;
    2. closure_id : Closure_id.t;
    }
    and function_declarations = private {
    1. is_classic_mode : bool;
    2. set_of_closures_id : Set_of_closures_id.t;
    3. set_of_closures_origin : Set_of_closures_origin.t;
    4. funs : function_declaration Variable.Map.t;
    }
    and function_body = private {
    1. free_variables : Variable.Set.t;
    2. free_symbols : Symbol.Set.t;
    3. stub : bool;
    4. dbg : Debuginfo.t;
    5. inline : Lambda.inline_attribute;
    6. specialise : Lambda.specialise_attribute;
    7. is_a_functor : bool;
    8. body : Flambda.t;
    9. poll : Lambda.poll_attribute;
    }
    and function_declaration = private {
    1. closure_origin : Closure_origin.t;
    2. params : Parameter.t list;
    3. function_body : function_body option;
    }
    and value_set_of_closures = private {
    1. function_decls : function_declarations;
    2. bound_vars : t Var_within_closure.Map.t;
    3. free_vars : Flambda.specialised_to Variable.Map.t;
    4. invariant_params : Variable.Set.t Variable.Map.t Stdlib.Lazy.t;
    5. recursive : Variable.Set.t Stdlib.Lazy.t;
    6. size : int option Variable.Map.t Stdlib.Lazy.t;
      (*

      For functions that are very likely to be inlined, the size of the function's body.

      *)
    7. specialised_args : Flambda.specialised_to Variable.Map.t;
    8. freshening : Freshening.Project_var.t;
    9. direct_call_surrogates : Closure_id.t Closure_id.Map.t;
    }
    and value_float_array_contents =
    1. | Contents of t array
    2. | Unknown_or_mutable
    and value_float_array = {
    1. contents : value_float_array_contents;
    2. size : int;
    }
    val descr : t -> descr

    Extraction of the description of approximation(s).

    val descrs : t list -> descr list
    val print : Stdlib.Format.formatter -> t -> unit

    Pretty-printing of approximations to a formatter.

    val print_descr : Stdlib.Format.formatter -> descr -> unit
    val print_value_set_of_closures : +Simple_value_approx (ocaml.Simple_value_approx)

    Module Simple_value_approx

    Simple approximations to the runtime results of computations. This pass is designed for speed rather than accuracy; the performance is important since it is used heavily during inlining.

    type 'a boxed_int =
    1. | Int32 : int32 boxed_int
    2. | Int64 : int64 boxed_int
    3. | Nativeint : nativeint boxed_int
    type value_string = {
    1. contents : string option;
    2. size : int;
    }
    type unresolved_value =
    1. | Set_of_closures_id of Set_of_closures_id.t
    2. | Symbol of Symbol.t
    type unknown_because_of =
    1. | Unresolved_value of unresolved_value
    2. | Other
    type t = private {
    1. descr : descr;
    2. var : Variable.t option;
    3. symbol : (Symbol.t * int option) option;
    }

    A value of type t corresponds to an "approximation" of the result of a computation in the program being compiled. That is to say, it represents what knowledge we have about such a result at compile time. The simplification pass exploits this information to partially evaluate computations.

    At a high level, an approximation for a value v has three parts:

    • the "description" (for example, "the constant integer 42");
    • an optional variable;
    • an optional symbol or symbol field. If the variable (resp. symbol) is present then that variable (resp. symbol) may be used to obtain the value v.

    The exact semantics of the variable and symbol fields follows.

    Approximations are deduced at particular points in an expression tree, but may subsequently be propagated to other locations.

    At the point at which an approximation is built for some value v, we can construct a set of variables (call the set S) that are known to alias the same value v. Each member of S will have the same or a more precise descr field in its approximation relative to the approximation for v. (An increase in precision may currently be introduced for pattern matches.) If S is non-empty then it is guaranteed that there is a unique member of S that was declared in a scope further out ("earlier") than all other members of S. If such a member exists then it is recorded in the var field. Otherwise var is None.

    Analogous to the construction of the set S, we can construct a set T consisting of all symbols that are known to alias the value whose approximation is being constructed. If T is non-empty then the symbol field is set to some member of T; it does not matter which one. (There is no notion of scope for symbols.)

    Note about mutable blocks:

    Mutable blocks are always represented by Value_unknown or Value_bottom. Any other approximation could leave the door open to a miscompilation. Such bad scenarios are most likely a user using Obj.magic or Obj.set_field in an inappropriate situation. Such a situation might be: let x = (1, 1) in Obj.set_field (Obj.repr x) 0 (Obj.repr 2); assert(fst x = 2) The user would probably expect the assertion to be true, but the compiler could in fact propagate the value of x across the Obj.set_field.

    Insisting that mutable blocks have Value_unknown or Value_bottom approximations certainly won't always prevent this kind of error, but should help catch many of them.

    It is possible that there may be some false positives, with correct but unreachable code causing this check to fail. However the likelihood of this seems sufficiently low, especially compared to the advantages gained by performing the check, that we include it.

    An example of a pattern that might trigger a false positive is: type a = { a : int } type b = { mutable b : int } type _ t = | A : a t | B : b t let f (type x) (v:x t) (r:x) = match v with | A -> r.a | B -> r.b <- 2; 3 let v = let r = ref A in r := A; (* Some pattern that the compiler can't understand *) f !r { a = 1 } When inlining f, the B branch is unreachable, yet the compiler cannot prove it and must therefore keep it.

    and descr = private
    1. | Value_block of Tag.t * t array
    2. | Value_int of int
    3. | Value_char of char
    4. | Value_float of float option
    5. | Value_boxed_int : 'a boxed_int * 'a -> descr
    6. | Value_set_of_closures of value_set_of_closures
    7. | Value_closure of value_closure
    8. | Value_string of value_string
    9. | Value_float_array of value_float_array
    10. | Value_unknown of unknown_because_of
    11. | Value_bottom
    12. | Value_extern of Export_id.t
    13. | Value_symbol of Symbol.t
    14. | Value_unresolved of unresolved_value
    and value_closure = {
    1. set_of_closures : t;
    2. closure_id : Closure_id.t;
    }
    and function_declarations = private {
    1. is_classic_mode : bool;
    2. set_of_closures_id : Set_of_closures_id.t;
    3. set_of_closures_origin : Set_of_closures_origin.t;
    4. funs : function_declaration Variable.Map.t;
    }
    and function_body = private {
    1. free_variables : Variable.Set.t;
    2. free_symbols : Symbol.Set.t;
    3. stub : bool;
    4. dbg : Debuginfo.t;
    5. inline : Lambda.inline_attribute;
    6. specialise : Lambda.specialise_attribute;
    7. is_a_functor : bool;
    8. body : Flambda.t;
    9. poll : Lambda.poll_attribute;
    }
    and function_declaration = private {
    1. closure_origin : Closure_origin.t;
    2. params : Parameter.t list;
    3. function_body : function_body option;
    }
    and value_set_of_closures = private {
    1. function_decls : function_declarations;
    2. bound_vars : t Var_within_closure.Map.t;
    3. free_vars : Flambda.specialised_to Variable.Map.t;
    4. invariant_params : Variable.Set.t Variable.Map.t Stdlib.Lazy.t;
    5. recursive : Variable.Set.t Stdlib.Lazy.t;
    6. size : int option Variable.Map.t Stdlib.Lazy.t;
      (*

      For functions that are very likely to be inlined, the size of the function's body.

      *)
    7. specialised_args : Flambda.specialised_to Variable.Map.t;
    8. freshening : Freshening.Project_var.t;
    9. direct_call_surrogates : Closure_id.t Closure_id.Map.t;
    }
    and value_float_array_contents =
    1. | Contents of t array
    2. | Unknown_or_mutable
    and value_float_array = {
    1. contents : value_float_array_contents;
    2. size : int;
    }
    val descr : t -> descr

    Extraction of the description of approximation(s).

    val descrs : t list -> descr list
    val print : Stdlib.Format.formatter -> t -> unit

    Pretty-printing of approximations to a formatter.

    val print_descr : Stdlib.Format.formatter -> descr -> unit
    val print_value_set_of_closures : Stdlib.Format.formatter -> value_set_of_closures -> unit
    val print_function_declarations : Stdlib.Format.formatter -> function_declarations -> unit
    val function_declarations_approx : - keep_body:(Variable.t -> Flambda.function_declaration -> bool) -> + keep_body:(Variable.t -> Flambda.function_declaration -> bool) -> Flambda.function_declarations -> function_declarations
    val create_value_set_of_closures : - function_decls:function_declarations -> - bound_vars:t Var_within_closure.Map.t -> - free_vars:Flambda.specialised_to Variable.Map.t -> - invariant_params:Variable.Set.t Variable.Map.t lazy_t -> - recursive:Variable.Set.t Stdlib.Lazy.t -> - specialised_args:Flambda.specialised_to Variable.Map.t -> - freshening:Freshening.Project_var.t -> - direct_call_surrogates:Closure_id.t Closure_id.Map.t -> + function_decls:function_declarations -> + bound_vars:t Var_within_closure.Map.t -> + free_vars:Flambda.specialised_to Variable.Map.t -> + invariant_params:Variable.Set.t Variable.Map.t lazy_t -> + recursive:Variable.Set.t Stdlib.Lazy.t -> + specialised_args:Flambda.specialised_to Variable.Map.t -> + freshening:Freshening.Project_var.t -> + direct_call_surrogates:Closure_id.t Closure_id.Map.t -> value_set_of_closures
    val update_freshening_of_value_set_of_closures : value_set_of_closures -> - freshening:Freshening.Project_var.t -> - value_set_of_closures
    val value_unknown : unknown_because_of -> t

    Basic construction of approximations.

    val value_int : int -> t
    val value_char : char -> t
    val value_float : float -> t
    val value_any_float : t
    val value_mutable_float_array : size:int -> t
    val value_immutable_float_array : t array -> t
    val value_string : int -> string option -> t
    val value_boxed_int : 'i boxed_int -> 'i -> t
    val value_block : Tag.t -> t array -> t
    val value_extern : Export_id.t -> t
    val value_symbol : Symbol.t -> t
    val value_bottom : t
    val value_unresolved : unresolved_value -> t
    val value_closure : - ?closure_var:Variable.t -> - ?set_of_closures_var:Variable.t -> - ?set_of_closures_symbol:Symbol.t -> + freshening:Freshening.Project_var.t -> + value_set_of_closures
    val value_unknown : unknown_because_of -> t

    Basic construction of approximations.

    val value_int : int -> t
    val value_char : char -> t
    val value_float : float -> t
    val value_any_float : t
    val value_mutable_float_array : size:int -> t
    val value_immutable_float_array : t array -> t
    val value_string : int -> string option -> t
    val value_boxed_int : 'i boxed_int -> 'i -> t
    val value_block : Tag.t -> t array -> t
    val value_extern : Export_id.t -> t
    val value_symbol : Symbol.t -> t
    val value_bottom : t
    val value_unresolved : unresolved_value -> t
    val value_closure : + ?closure_var:Variable.t -> + ?set_of_closures_var:Variable.t -> + ?set_of_closures_symbol:Symbol.t -> value_set_of_closures -> Closure_id.t -> t

    Construct a closure approximation given the approximation of the corresponding set of closures and the closure ID of the closure to be projected from such set. closure_var and/or set_of_closures_var may be specified to augment the approximation with variables that may be used to access the closure value itself, so long as they are in scope at the proposed point of use.

    val value_set_of_closures : - ?set_of_closures_var:Variable.t -> + ?set_of_closures_var:Variable.t -> value_set_of_closures -> - t

    Construct a set of closures approximation. set_of_closures_var is as for the parameter of the same name in value_closure, above.

    val make_const_int : int -> Flambda.t * t

    Take the given constant and produce an appropriate approximation for it together with an Flambda expression representing it.

    val make_const_char : char -> Flambda.t * t
    val make_const_bool : bool -> Flambda.t * t
    val make_const_float : float -> Flambda.t * t
    val make_const_boxed_int : 'i boxed_int -> 'i -> Flambda.t * t
    val make_const_int_named : int -> Flambda.named * t
    val make_const_char_named : char -> Flambda.named * t
    val make_const_bool_named : bool -> Flambda.named * t
    val make_const_float_named : float -> Flambda.named * t
    val make_const_boxed_int_named : 'i boxed_int -> 'i -> Flambda.named * t
    val augment_with_variable : t -> Variable.t -> t

    Augment an approximation with a given variable (see comment above). If the approximation was already augmented with a variable, the one passed to this function replaces it within the approximation.

    val augment_with_symbol : t -> Symbol.t -> t

    Like augment_with_variable, but for symbol information.

    val augment_with_symbol_field : t -> Symbol.t -> int -> t

    Like augment_with_symbol, but for symbol field information.

    val replace_description : t -> descr -> t

    Replace the description within an approximation.

    val augment_with_kind : t -> Lambda.value_kind -> t

    Improve the description by taking the kind into account

    val augment_kind_with_approx : t -> Lambda.value_kind -> Lambda.value_kind

    Improve the kind by taking the description into account

    val equal_boxed_int : 'a boxed_int -> 'a -> 'b boxed_int -> 'b -> bool
    val meet : really_import_approx:(t -> t) -> t -> t -> t
    val known : t -> bool

    An approximation is "known" iff it is not Value_unknown.

    val useful : t -> bool

    An approximation is "useful" iff it is neither unknown nor bottom.

    val all_not_useful : t list -> bool

    Whether all approximations in the given list do *not* satisfy useful.

    val warn_on_mutation : t -> bool

    Whether to warn on attempts to mutate a value. It must have been resolved (it cannot be Value_extern or Value_symbol). (See comment above for further explanation.)

    type simplification_summary =
    1. | Nothing_done
    2. | Replaced_term
    type simplification_result = Flambda.t * simplification_summary * t
    type simplification_result_named = Flambda.named * simplification_summary * t
    val simplify : t -> Flambda.t -> simplification_result

    Given an expression and its approximation, attempt to simplify the expression to a constant (with associated approximation), taking into account whether the expression has any side effects.

    val simplify_using_env : + t

    Construct a set of closures approximation. set_of_closures_var is as for the parameter of the same name in value_closure, above.

    val make_const_int : int -> Flambda.t * t

    Take the given constant and produce an appropriate approximation for it together with an Flambda expression representing it.

    val make_const_char : char -> Flambda.t * t
    val make_const_bool : bool -> Flambda.t * t
    val make_const_float : float -> Flambda.t * t
    val make_const_boxed_int : 'i boxed_int -> 'i -> Flambda.t * t
    val make_const_int_named : int -> Flambda.named * t
    val make_const_char_named : char -> Flambda.named * t
    val make_const_bool_named : bool -> Flambda.named * t
    val make_const_float_named : float -> Flambda.named * t
    val make_const_boxed_int_named : 'i boxed_int -> 'i -> Flambda.named * t
    val augment_with_variable : t -> Variable.t -> t

    Augment an approximation with a given variable (see comment above). If the approximation was already augmented with a variable, the one passed to this function replaces it within the approximation.

    val augment_with_symbol : t -> Symbol.t -> t

    Like augment_with_variable, but for symbol information.

    val augment_with_symbol_field : t -> Symbol.t -> int -> t

    Like augment_with_symbol, but for symbol field information.

    val replace_description : t -> descr -> t

    Replace the description within an approximation.

    val augment_with_kind : t -> Lambda.value_kind -> t

    Improve the description by taking the kind into account

    val augment_kind_with_approx : t -> Lambda.value_kind -> Lambda.value_kind

    Improve the kind by taking the description into account

    val equal_boxed_int : 'a boxed_int -> 'a -> 'b boxed_int -> 'b -> bool
    val meet : really_import_approx:(t -> t) -> t -> t -> t
    val known : t -> bool

    An approximation is "known" iff it is not Value_unknown.

    val useful : t -> bool

    An approximation is "useful" iff it is neither unknown nor bottom.

    val all_not_useful : t list -> bool

    Whether all approximations in the given list do *not* satisfy useful.

    val warn_on_mutation : t -> bool

    Whether to warn on attempts to mutate a value. It must have been resolved (it cannot be Value_extern or Value_symbol). (See comment above for further explanation.)

    type simplification_summary =
    1. | Nothing_done
    2. | Replaced_term
    type simplification_result = Flambda.t * simplification_summary * t
    type simplification_result_named = Flambda.named * simplification_summary * t
    val simplify : t -> Flambda.t -> simplification_result

    Given an expression and its approximation, attempt to simplify the expression to a constant (with associated approximation), taking into account whether the expression has any side effects.

    val simplify_using_env : t -> - is_present_in_env:(Variable.t -> bool) -> + is_present_in_env:(Variable.t -> bool) -> Flambda.t -> simplification_result

    As for simplify, but also enables us to simplify based on equalities between variables. The caller must provide a function that tells us whether, if we simplify to a given variable, the value of that variable will be accessible in the current environment.

    val simplify_named : t -> Flambda.named -> simplification_result_named
    val simplify_named_using_env : t -> - is_present_in_env:(Variable.t -> bool) -> + is_present_in_env:(Variable.t -> bool) -> Flambda.named -> simplification_result_named
    val simplify_var_to_var_using_env : t -> - is_present_in_env:(Variable.t -> bool) -> - Variable.t option

    If the given approximation identifies another variable and is_present_in_env deems it to be in scope, return that variable (wrapped in a Some), otherwise return None.

    val simplify_var : t -> (Flambda.named * t) option
    type get_field_result =
    1. | Ok of t
    2. | Unreachable
    val get_field : t -> field_index:int -> get_field_result

    Given the approximation t of a value, expected to correspond to a block (in the Pmakeblock sense of the word), and a field index then return an appropriate approximation for that field of the block (or Unreachable if the code with the approximation t is unreachable). N.B. Not all cases of unreachable code are returned as Unreachable.

    type checked_approx_for_block =
    1. | Wrong
    2. | Ok of Tag.t * t array
    val check_approx_for_block : t -> checked_approx_for_block

    Try to prove that a value with the given approximation may be used as a block.

    val approx_for_bound_var : value_set_of_closures -> Var_within_closure.t -> t

    Find the approximation for a bound variable in a set-of-closures approximation. A fatal error is produced if the variable is not bound in the given approximation.

    val freshen_and_check_closure_id : + is_present_in_env:(Variable.t -> bool) -> + Variable.t option

    If the given approximation identifies another variable and is_present_in_env deems it to be in scope, return that variable (wrapped in a Some), otherwise return None.

    val simplify_var : t -> (Flambda.named * t) option
    type get_field_result =
    1. | Ok of t
    2. | Unreachable
    val get_field : t -> field_index:int -> get_field_result

    Given the approximation t of a value, expected to correspond to a block (in the Pmakeblock sense of the word), and a field index then return an appropriate approximation for that field of the block (or Unreachable if the code with the approximation t is unreachable). N.B. Not all cases of unreachable code are returned as Unreachable.

    type checked_approx_for_block =
    1. | Wrong
    2. | Ok of Tag.t * t array
    val check_approx_for_block : t -> checked_approx_for_block

    Try to prove that a value with the given approximation may be used as a block.

    val approx_for_bound_var : value_set_of_closures -> Var_within_closure.t -> t

    Find the approximation for a bound variable in a set-of-closures approximation. A fatal error is produced if the variable is not bound in the given approximation.

    val freshen_and_check_closure_id : value_set_of_closures -> Closure_id.t -> Closure_id.t

    Given a set-of-closures approximation and a closure ID, apply any freshening specified by the approximation to the closure ID, and return the resulting ID. Causes a fatal error if the resulting closure ID does not correspond to any function declaration in the approximation.

    type strict_checked_approx_for_set_of_closures =
    1. | Wrong
    2. | Ok of Variable.t option * value_set_of_closures
    val strict_check_approx_for_set_of_closures : @@ -70,7 +55,7 @@ t -> checked_approx_for_closure_allowing_unresolved

    As for check_approx_for_closure, but values coming from external compilation units with unresolved approximations are permitted.

    val check_approx_for_float : t -> float option

    Returns the value if it can be proved to be a constant float

    val float_array_as_constant : value_float_array -> float list option

    Returns the value if it can be proved to be a constant float array

    val check_approx_for_string : t -> string option

    Returns the value if it can be proved to be a constant string

    type switch_branch_selection =
    1. | Cannot_be_taken
    2. | Can_be_taken
    3. | Must_be_taken
    val potentially_taken_const_switch_branch : t -> int -> switch_branch_selection

    Check that the branch is compatible with the approximation

    val potentially_taken_block_switch_branch : t -> int -> switch_branch_selection
    val function_arity : function_declaration -> int

    Create a set of function declarations based on another set of function declarations.

    val import_function_declarations_for_pack : function_declarations -> (Set_of_closures_id.t -> Set_of_closures_id.t) -> @@ -80,4 +65,4 @@ (Flambda.t -> Flambda.t) -> function_declaration

    Creates a map from closure IDs to function declarations by iterating over all sets of closures in the given map.

    val clear_function_bodies : function_declarations -> function_declarations
    \ No newline at end of file + function_declarations Closure_id.Map.t

    Creates a map from closure IDs to function declarations by iterating over all sets of closures in the given map.

    val clear_function_bodies : function_declarations -> function_declarations
    diff --git a/ocaml/Simplif/index.html b/ocaml/Simplif/index.html index afb3708..13ceba8 100644 --- a/ocaml/Simplif/index.html +++ b/ocaml/Simplif/index.html @@ -1,10 +1,10 @@ -Simplif (ocaml.Simplif)

    Module Simplif

    Lambda simplification.

    Warning: this module is unstable and part of compiler-libs.

    val simplify_lambda : Lambda.lambda -> Lambda.lambda
    val split_default_wrapper : - id:Ident.t -> - kind:Lambda.function_kind -> - params:(Ident.t * Lambda.value_kind) list -> - return:Lambda.value_kind -> - body:Lambda.lambda -> - attr:Lambda.function_attribute -> - loc:Lambda.scoped_location -> - (Ident.t * Lambda.lambda) list
    \ No newline at end of file +Simplif (ocaml.Simplif)

    Module Simplif

    Lambda simplification.

    Warning: this module is unstable and part of compiler-libs.

    val simplify_lambda : Lambda.lambda -> Lambda.lambda
    val split_default_wrapper : + id:Ident.t -> + kind:Lambda.function_kind -> + params:(Ident.t * Lambda.value_kind) list -> + return:Lambda.value_kind -> + body:Lambda.lambda -> + attr:Lambda.function_attribute -> + loc:Lambda.scoped_location -> + (Ident.t * Lambda.lambda) list
    diff --git a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html index 26e6366..e3c8b8f 100644 --- a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html +++ b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int32/index.html @@ -1,5 +1,5 @@ -Simplify_boxed_int32 (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_int32)

    Module Simplify_boxed_integer_ops.Simplify_boxed_int32

    val simplify_unop : +Simplify_boxed_int32 (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_int32)

    Module Simplify_boxed_integer_ops.Simplify_boxed_int32

    \ No newline at end of file + size_int:int -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    diff --git a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html index df0196e..bee9730 100644 --- a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html +++ b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_int64/index.html @@ -1,5 +1,5 @@ -Simplify_boxed_int64 (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_int64)

    Module Simplify_boxed_integer_ops.Simplify_boxed_int64

    val simplify_unop : +Simplify_boxed_int64 (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_int64)

    Module Simplify_boxed_integer_ops.Simplify_boxed_int64

    \ No newline at end of file + size_int:int -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    diff --git a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html index 78c3c41..21cf797 100644 --- a/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html +++ b/ocaml/Simplify_boxed_integer_ops/Simplify_boxed_nativeint/index.html @@ -1,5 +1,5 @@ -Simplify_boxed_nativeint (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_nativeint)

    Module Simplify_boxed_integer_ops.Simplify_boxed_nativeint

    val simplify_unop : +Simplify_boxed_nativeint (ocaml.Simplify_boxed_integer_ops.Simplify_boxed_nativeint)

    Module Simplify_boxed_integer_ops.Simplify_boxed_nativeint

    \ No newline at end of file + size_int:int -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    diff --git a/ocaml/Simplify_boxed_integer_ops/index.html b/ocaml/Simplify_boxed_integer_ops/index.html index 835ce9e..8cc2726 100644 --- a/ocaml/Simplify_boxed_integer_ops/index.html +++ b/ocaml/Simplify_boxed_integer_ops/index.html @@ -1,5 +1,5 @@ -Simplify_boxed_integer_ops (ocaml.Simplify_boxed_integer_ops)

    Module Simplify_boxed_integer_ops

    module Simplify_boxed_nativeint : +Simplify_boxed_integer_ops (ocaml.Simplify_boxed_integer_ops)

    Module Simplify_boxed_integer_ops

    \ No newline at end of file + Simplify_boxed_integer_ops_intf.S with type t := Stdlib.Int64.t
    diff --git a/ocaml/Simplify_boxed_integer_ops_intf/index.html b/ocaml/Simplify_boxed_integer_ops_intf/index.html index 60006de..ee67677 100644 --- a/ocaml/Simplify_boxed_integer_ops_intf/index.html +++ b/ocaml/Simplify_boxed_integer_ops_intf/index.html @@ -1,2 +1,2 @@ -Simplify_boxed_integer_ops_intf (ocaml.Simplify_boxed_integer_ops_intf)

    Module Simplify_boxed_integer_ops_intf

    module type S = sig ... end
    \ No newline at end of file +Simplify_boxed_integer_ops_intf (ocaml.Simplify_boxed_integer_ops_intf)

    Module Simplify_boxed_integer_ops_intf

    module type S = sig ... end
    diff --git a/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html b/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html index b170892..a804517 100644 --- a/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html +++ b/ocaml/Simplify_boxed_integer_ops_intf/module-type-S/index.html @@ -1,5 +1,5 @@ -S (ocaml.Simplify_boxed_integer_ops_intf.S)

    Module type Simplify_boxed_integer_ops_intf.S

    type t
    val simplify_unop : +S (ocaml.Simplify_boxed_integer_ops_intf.S)

    Module type Simplify_boxed_integer_ops_intf.S

    type t
    \ No newline at end of file + size_int:int -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    diff --git a/ocaml/Simplify_common/index.html b/ocaml/Simplify_common/index.html index b59d306..05c1614 100644 --- a/ocaml/Simplify_common/index.html +++ b/ocaml/Simplify_common/index.html @@ -1,5 +1,5 @@ -Simplify_common (ocaml.Simplify_common)

    Module Simplify_common

    const_*_expr expr v annot, where the expression expr is known to evaluate to the value v, attempt to produce a more simple expression together with its approximation and the benefit gained by replacing expr with this new expression. This simplification is only performed if expr is known to have no side effects. Otherwise, expr itself is returned, with an appropriate approximation but zero benefit.

    const_boxed_int_expr takes an additional argument specifying the kind of boxed integer to which the given expression evaluates.

    val const_int_expr : +Simplify_common (ocaml.Simplify_common)

    Module Simplify_common

    const_*_expr expr v annot, where the expression expr is known to evaluate to the value v, attempt to produce a more simple expression together with its approximation and the benefit gained by replacing expr with this new expression. This simplification is only performed if expr is known to have no side effects. Otherwise, expr itself is returned, with an appropriate approximation but zero benefit.

    const_boxed_int_expr takes an additional argument specifying the kind of boxed integer to which the given expression evaluates.

    val const_char_expr : @@ -25,4 +25,4 @@ Lambda.float_comparison -> float -> float -> - Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    val swap16 : int -> int

    Functions for transposing the order of bytes within words of various sizes.

    val swap32 : int32 -> int32
    val swap64 : int64 -> int64
    val swapnative : nativeint -> nativeint
    \ No newline at end of file + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t
    val swap16 : int -> int

    Functions for transposing the order of bytes within words of various sizes.

    val swap32 : int32 -> int32
    val swap64 : int64 -> int64
    val swapnative : nativeint -> nativeint
    diff --git a/ocaml/Simplify_primitives/index.html b/ocaml/Simplify_primitives/index.html index ccf0a9e..54cd267 100644 --- a/ocaml/Simplify_primitives/index.html +++ b/ocaml/Simplify_primitives/index.html @@ -1,8 +1,8 @@ -Simplify_primitives (ocaml.Simplify_primitives)

    Module Simplify_primitives

    val primitive : +Simplify_primitives (ocaml.Simplify_primitives)

    Module Simplify_primitives

    Simplifies an application of a primitive based on approximation information.

    \ No newline at end of file + size_int:int -> + Flambda.named * Simple_value_approx.t * Inlining_cost.Benefit.t

    Simplifies an application of a primitive based on approximation information.

    diff --git a/ocaml/Spill/index.html b/ocaml/Spill/index.html index 2dc2ebc..8747dd6 100644 --- a/ocaml/Spill/index.html +++ b/ocaml/Spill/index.html @@ -1,2 +1,2 @@ -Spill (ocaml.Spill)

    Module Spill

    val fundecl : Mach.fundecl -> Mach.fundecl
    \ No newline at end of file +Spill (ocaml.Spill)

    Module Spill

    val fundecl : Mach.fundecl -> Mach.fundecl
    diff --git a/ocaml/Split/index.html b/ocaml/Split/index.html index f787c3c..4cc165d 100644 --- a/ocaml/Split/index.html +++ b/ocaml/Split/index.html @@ -1,2 +1,2 @@ -Split (ocaml.Split)

    Module Split

    val fundecl : Mach.fundecl -> Mach.fundecl
    val reset : unit -> unit
    \ No newline at end of file +Split (ocaml.Split)

    Module Split

    val fundecl : Mach.fundecl -> Mach.fundecl
    val reset : unit -> unit
    diff --git a/ocaml/Static_exception/Map/index.html b/ocaml/Static_exception/Map/index.html index 15a0969..3585df8 100644 --- a/ocaml/Static_exception/Map/index.html +++ b/ocaml/Static_exception/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Static_exception.Map)

    Module Static_exception.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Static_exception.Map)

    Module Static_exception.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Static_exception/Set/index.html b/ocaml/Static_exception/Set/index.html index 48e0fd9..22a1492 100644 --- a/ocaml/Static_exception/Set/index.html +++ b/ocaml/Static_exception/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Static_exception.Set)

    Module Static_exception.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Static_exception.Set)

    Module Static_exception.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Static_exception/T/index.html b/ocaml/Static_exception/T/index.html index 5154244..5c45528 100644 --- a/ocaml/Static_exception/T/index.html +++ b/ocaml/Static_exception/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Static_exception.T)

    Module Static_exception.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Static_exception.T)

    Module Static_exception.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Static_exception/Tbl/index.html b/ocaml/Static_exception/Tbl/index.html index 4395ee4..11cd78a 100644 --- a/ocaml/Static_exception/Tbl/index.html +++ b/ocaml/Static_exception/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Static_exception.Tbl)

    Module Static_exception.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Static_exception.Tbl)

    Module Static_exception.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Static_exception/index.html b/ocaml/Static_exception/index.html index 8680e06..331b608 100644 --- a/ocaml/Static_exception/index.html +++ b/ocaml/Static_exception/index.html @@ -1,2 +1,2 @@ -Static_exception (ocaml.Static_exception)

    Module Static_exception

    An identifier that is used to label static exceptions. Its uniqueness properties are unspecified.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : unit -> t
    val to_int : t -> int
    \ No newline at end of file +Static_exception (ocaml.Static_exception)

    Module Static_exception

    An identifier that is used to label static exceptions. Its uniqueness properties are unspecified.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : unit -> t
    val to_int : t -> int
    diff --git a/ocaml/Std_exit/index.html b/ocaml/Std_exit/index.html index 25c47a6..420225e 100644 --- a/ocaml/Std_exit/index.html +++ b/ocaml/Std_exit/index.html @@ -1,2 +1,2 @@ -Std_exit (ocaml.Std_exit)

    Module Std_exit

    \ No newline at end of file +Std_exit (ocaml.Std_exit)

    Module Std_exit

    diff --git a/ocaml/Stdlib/Arg/index.html b/ocaml/Stdlib/Arg/index.html index ff1dcc7..9cee861 100644 --- a/ocaml/Stdlib/Arg/index.html +++ b/ocaml/Stdlib/Arg/index.html @@ -1,30 +1,30 @@ -Arg (ocaml.Stdlib.Arg)

    Module Stdlib.Arg

    Parsing of command line arguments.

    This module provides a general mechanism for extracting options and arguments from the command line to the program. For example:

    let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>"
    -let verbose = ref false
    -let input_files = ref []
    -let output_file = ref ""
    +Arg (ocaml.Stdlib.Arg)

    Module Stdlib.Arg

    Parsing of command line arguments.

    This module provides a general mechanism for extracting options and arguments from the command line to the program. For example:

         let usage_msg = "append [-verbose] <file1> [<file2>] ... -o <output>"
    +     let verbose = ref false
    +     let input_files = ref []
    +     let output_file = ref ""
     
    -let anon_fun filename =
    -  input_files := filename::!input_files
    +     let anon_fun filename =
    +       input_files := filename::!input_files
     
    -let speclist =
    -  [("-verbose", Arg.Set verbose, "Output debug information");
    -   ("-o", Arg.Set_string output_file, "Set output file name")]
    +     let speclist =
    +       [("-verbose", Arg.Set verbose, "Output debug information");
    +        ("-o", Arg.Set_string output_file, "Set output file name")]
     
    -let () =
    -  Arg.parse speclist anon_fun usage_msg;
    -  (* Main functionality here *)

    Syntax of command lines: A keyword is a character string starting with a -. An option is a keyword alone or followed by an argument. The types of keywords are: Unit, Bool, Set, Clear, String, Set_string, Int, Set_int, Float, Set_float, Tuple, Symbol, Rest, Rest_all and Expand.

    Unit, Set and Clear keywords take no argument.

    A Rest or Rest_all keyword takes the remainder of the command line as arguments. (More explanations below.)

    Every other keyword takes the following word on the command line as argument. For compatibility with GNU getopt_long, keyword=arg is also allowed. Arguments not preceded by a keyword are called anonymous arguments.

    Examples (cmd is assumed to be the command name):

    • cmd -flag (a unit option)
    • cmd -int 1 (an int option with argument 1)
    • cmd -string foobar (a string option with argument "foobar")
    • cmd -float 12.34 (a float option with argument 12.34)
    • cmd a b c (three anonymous arguments: "a", "b", and "c")
    • cmd a b -- c d (two anonymous arguments and a rest option with two arguments)

    Rest takes a function that is called repeatedly for each remaining command line argument. Rest_all takes a function that is called once, with the list of all remaining arguments.

    Note that if no arguments follow a Rest keyword then the function is not called at all whereas the function for a Rest_all keyword is called with an empty list.

    • alert unsynchronized_access The Arg module relies on a mutable global state, parsing functions should only be called from a single domain.
    type spec =
    1. | Unit of unit -> unit
      (*

      Call the function with unit argument

      *)
    2. | Bool of bool -> unit
      (*

      Call the function with a bool argument

      *)
    3. | Set of bool ref
      (*

      Set the reference to true

      *)
    4. | Clear of bool ref
      (*

      Set the reference to false

      *)
    5. | String of string -> unit
      (*

      Call the function with a string argument

      *)
    6. | Set_string of string ref
      (*

      Set the reference to the string argument

      *)
    7. | Int of int -> unit
      (*

      Call the function with an int argument

      *)
    8. | Set_int of int ref
      (*

      Set the reference to the int argument

      *)
    9. | Float of float -> unit
      (*

      Call the function with a float argument

      *)
    10. | Set_float of float ref
      (*

      Set the reference to the float argument

      *)
    11. | Tuple of spec list
      (*

      Take several arguments according to the spec list

      *)
    12. | Symbol of string list * string -> unit
      (*

      Take one of the symbols as argument and call the function with the symbol

      *)
    13. | Rest of string -> unit
      (*

      Stop interpreting keywords and call the function with each remaining argument

      *)
    14. | Rest_all of string list -> unit
      (*

      Stop interpreting keywords and call the function with all remaining arguments

      *)
    15. | Expand of string -> string array
      (*

      If the remaining arguments to process are of the form ["-foo"; "arg"] @ rest where "foo" is registered as Expand f, then the arguments f "arg" @ rest are processed. Only allowed in parse_and_expand_argv_dynamic.

      *)

    The concrete type describing the behavior associated with a keyword.

    type key = string
    type doc = string
    type usage_msg = string
    type anon_fun = string -> unit
    val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

    Arg.parse speclist anon_fun usage_msg parses the command line. speclist is a list of triples (key, spec, doc). key is the option keyword, it must start with a '-' character. spec gives the option type and the function to call when this option is found on the command line. doc is a one-line description of this option. anon_fun is called on anonymous arguments. The functions in spec and anon_fun are called in the same order as their arguments appear on the command line.

    If an error occurs, Arg.parse exits the program, after printing to standard error an error message as follows:

    • The reason for the error: unknown option, invalid or missing argument, etc.
    • usage_msg
    • The list of options, each followed by the corresponding doc string. Beware: options that have an empty doc string will not be included in the list.

    For the user to be able to specify anonymous arguments starting with a -, include for example ("-", String anon_fun, doc) in speclist.

    By default, parse recognizes two unit options, -help and --help, which will print to standard output usage_msg and the list of options, and exit the program. You can override this behaviour by specifying your own -help and --help options in speclist.

    val parse_dynamic : + let () = + Arg.parse speclist anon_fun usage_msg; + (* Main functionality here *)

    Syntax of command lines: A keyword is a character string starting with a -. An option is a keyword alone or followed by an argument. The types of keywords are: Unit, Bool, Set, Clear, String, Set_string, Int, Set_int, Float, Set_float, Tuple, Symbol, Rest, Rest_all and Expand.

    Unit, Set and Clear keywords take no argument.

    A Rest or Rest_all keyword takes the remainder of the command line as arguments. (More explanations below.)

    Every other keyword takes the following word on the command line as argument. For compatibility with GNU getopt_long, keyword=arg is also allowed. Arguments not preceded by a keyword are called anonymous arguments.

    Examples (cmd is assumed to be the command name):

    • cmd -flag (a unit option)
    • cmd -int 1 (an int option with argument 1)
    • cmd -string foobar (a string option with argument "foobar")
    • cmd -float 12.34 (a float option with argument 12.34)
    • cmd a b c (three anonymous arguments: "a", "b", and "c")
    • cmd a b -- c d (two anonymous arguments and a rest option with two arguments)

    Rest takes a function that is called repeatedly for each remaining command line argument. Rest_all takes a function that is called once, with the list of all remaining arguments.

    Note that if no arguments follow a Rest keyword then the function is not called at all whereas the function for a Rest_all keyword is called with an empty list.

    • alert unsynchronized_access The Arg module relies on a mutable global state, parsing functions should only be called from a single domain.
    type spec =
    1. | Unit of unit -> unit
      (*

      Call the function with unit argument

      *)
    2. | Bool of bool -> unit
      (*

      Call the function with a bool argument

      *)
    3. | Set of bool ref
      (*

      Set the reference to true

      *)
    4. | Clear of bool ref
      (*

      Set the reference to false

      *)
    5. | String of string -> unit
      (*

      Call the function with a string argument

      *)
    6. | Set_string of string ref
      (*

      Set the reference to the string argument

      *)
    7. | Int of int -> unit
      (*

      Call the function with an int argument

      *)
    8. | Set_int of int ref
      (*

      Set the reference to the int argument

      *)
    9. | Float of float -> unit
      (*

      Call the function with a float argument

      *)
    10. | Set_float of float ref
      (*

      Set the reference to the float argument

      *)
    11. | Tuple of spec list
      (*

      Take several arguments according to the spec list

      *)
    12. | Symbol of string list * string -> unit
      (*

      Take one of the symbols as argument and call the function with the symbol

      *)
    13. | Rest of string -> unit
      (*

      Stop interpreting keywords and call the function with each remaining argument

      *)
    14. | Rest_all of string list -> unit
      (*

      Stop interpreting keywords and call the function with all remaining arguments

      *)
    15. | Expand of string -> string array
      (*

      If the remaining arguments to process are of the form ["-foo"; "arg"] @ rest where "foo" is registered as Expand f, then the arguments f "arg" @ rest are processed. Only allowed in parse_and_expand_argv_dynamic.

      *)

    The concrete type describing the behavior associated with a keyword.

    type key = string
    type doc = string
    type usage_msg = string
    type anon_fun = string -> unit
    val parse : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

    Arg.parse speclist anon_fun usage_msg parses the command line. speclist is a list of triples (key, spec, doc). key is the option keyword, it must start with a '-' character. spec gives the option type and the function to call when this option is found on the command line. doc is a one-line description of this option. anon_fun is called on anonymous arguments. The functions in spec and anon_fun are called in the same order as their arguments appear on the command line.

    If an error occurs, Arg.parse exits the program, after printing to standard error an error message as follows:

    • The reason for the error: unknown option, invalid or missing argument, etc.
    • usage_msg
    • The list of options, each followed by the corresponding doc string. Beware: options that have an empty doc string will not be included in the list.

    For the user to be able to specify anonymous arguments starting with a -, include for example ("-", String anon_fun, doc) in speclist.

    By default, parse recognizes two unit options, -help and --help, which will print to standard output usage_msg and the list of options, and exit the program. You can override this behaviour by specifying your own -help and --help options in speclist.

    val parse_dynamic : (key * spec * doc) list ref -> anon_fun -> usage_msg -> unit

    Same as Arg.parse, except that the speclist argument is a reference and may be updated during the parsing. A typical use for this feature is to parse command lines of the form:

    • command subcommand options where the list of options depends on the value of the subcommand argument.
    • since 4.01
    val parse_argv : - ?current:int ref -> + ?current:int ref -> string array -> (key * spec * doc) list -> anon_fun -> usage_msg -> unit

    Arg.parse_argv ~current args speclist anon_fun usage_msg parses the array args as if it were the command line. It uses and updates the value of ~current (if given), or Arg.current. You must set it before calling parse_argv. The initial value of current is the index of the program name (argument 0) in the array. If an error occurs, Arg.parse_argv raises Arg.Bad with the error message as argument. If option -help or --help is given, Arg.parse_argv raises Arg.Help with the help message as argument.

    val parse_argv_dynamic : - ?current:int ref -> + ?current:int ref -> string array -> (key * spec * doc) list ref -> anon_fun -> @@ -35,4 +35,4 @@ let () = (key * spec * doc) list ref -> anon_fun -> string -> - unit

    Same as Arg.parse_argv_dynamic, except that the argv argument is a reference and may be updated during the parsing of Expand arguments. See Arg.parse_argv_dynamic.

    • since 4.05
    val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

    Same as Arg.parse, except that the Expand arguments are allowed and the current reference is not updated.

    • since 4.05
    exception Help of string

    Raised by Arg.parse_argv when the user asks for help.

    exception Bad of string

    Functions in spec or anon_fun can raise Arg.Bad with an error message to reject invalid arguments. Arg.Bad is also raised by Arg.parse_argv in case of an error.

    val usage : (key * spec * doc) list -> usage_msg -> unit

    Arg.usage speclist usage_msg prints to standard error an error message that includes the list of valid options. This is the same message that Arg.parse prints in case of error. speclist and usage_msg are the same as for Arg.parse.

    val usage_string : (key * spec * doc) list -> usage_msg -> string

    Returns the message that would have been printed by Arg.usage, if provided with the same parameters.

    val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list

    Align the documentation strings by inserting spaces at the first alignment separator (tab or, if tab is not found, space), according to the length of the keyword. Use a alignment separator as the first character in a doc string if you want to align the whole string. The doc strings corresponding to Symbol arguments are aligned on the next line.

    • parameter limit

      options with keyword and message longer than limit will not be used to compute the alignment.

    val current : int ref

    Position (in Sys.argv) of the argument being processed. You can change this value, e.g. to force Arg.parse to skip some arguments. Arg.parse uses the initial value of Arg.current as the index of argument 0 (the program name) and starts parsing arguments at the next element.

    val read_arg : string -> string array

    Arg.read_arg file reads newline-terminated command line arguments from file file.

    • since 4.05
    val read_arg0 : string -> string array

    Identical to Arg.read_arg but assumes null character terminated command line arguments.

    • since 4.05
    val write_arg : string -> string array -> unit

    Arg.write_arg file args writes the arguments args newline-terminated into the file file. If any of the arguments in args contains a newline, use Arg.write_arg0 instead.

    • since 4.05
    val write_arg0 : string -> string array -> unit

    Identical to Arg.write_arg but uses the null character for terminator instead of newline.

    • since 4.05
    \ No newline at end of file + unit

    Same as Arg.parse_argv_dynamic, except that the argv argument is a reference and may be updated during the parsing of Expand arguments. See Arg.parse_argv_dynamic.

    • since 4.05
    val parse_expand : (key * spec * doc) list -> anon_fun -> usage_msg -> unit

    Same as Arg.parse, except that the Expand arguments are allowed and the current reference is not updated.

    • since 4.05
    exception Help of string

    Raised by Arg.parse_argv when the user asks for help.

    exception Bad of string

    Functions in spec or anon_fun can raise Arg.Bad with an error message to reject invalid arguments. Arg.Bad is also raised by Arg.parse_argv in case of an error.

    val usage : (key * spec * doc) list -> usage_msg -> unit

    Arg.usage speclist usage_msg prints to standard error an error message that includes the list of valid options. This is the same message that Arg.parse prints in case of error. speclist and usage_msg are the same as for Arg.parse.

    val usage_string : (key * spec * doc) list -> usage_msg -> string

    Returns the message that would have been printed by Arg.usage, if provided with the same parameters.

    val align : ?limit:int -> (key * spec * doc) list -> (key * spec * doc) list

    Align the documentation strings by inserting spaces at the first alignment separator (tab or, if tab is not found, space), according to the length of the keyword. Use a alignment separator as the first character in a doc string if you want to align the whole string. The doc strings corresponding to Symbol arguments are aligned on the next line.

    • parameter limit

      options with keyword and message longer than limit will not be used to compute the alignment.

    val current : int ref

    Position (in Sys.argv) of the argument being processed. You can change this value, e.g. to force Arg.parse to skip some arguments. Arg.parse uses the initial value of Arg.current as the index of argument 0 (the program name) and starts parsing arguments at the next element.

    val read_arg : string -> string array

    Arg.read_arg file reads newline-terminated command line arguments from file file.

    • since 4.05
    val read_arg0 : string -> string array

    Identical to Arg.read_arg but assumes null character terminated command line arguments.

    • since 4.05
    val write_arg : string -> string array -> unit

    Arg.write_arg file args writes the arguments args newline-terminated into the file file. If any of the arguments in args contains a newline, use Arg.write_arg0 instead.

    • since 4.05
    val write_arg0 : string -> string array -> unit

    Identical to Arg.write_arg but uses the null character for terminator instead of newline.

    • since 4.05
    diff --git a/ocaml/Stdlib/Array/index.html b/ocaml/Stdlib/Array/index.html index c760e35..70e27e3 100644 --- a/ocaml/Stdlib/Array/index.html +++ b/ocaml/Stdlib/Array/index.html @@ -1,9 +1,9 @@ -Array (ocaml.Stdlib.Array)

    Module Stdlib.Array

    Array operations.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a array

    An alias for the type of arrays.

    val length : 'a array -> int

    Return the length (number of elements) of the given array.

    val get : 'a array -> int -> 'a

    get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val set : 'a array -> int -> 'a -> unit

    set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

    • raises Invalid_argument

      if n is outside the range 0 to length a - 1.

    val make : int -> 'a -> 'a array

    make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val init : int -> (int -> 'a) -> 'a array

    init n f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied in order to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

    val make_matrix : int -> int -> 'a -> 'a array array

    make_matrix dimx dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

    • raises Invalid_argument

      if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val append : 'a array -> 'a array -> 'a array

    append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

    • raises Invalid_argument

      if length v1 + length v2 > Sys.max_array_length.

    val concat : 'a array list -> 'a array

    Same as append, but concatenates a list of arrays.

    val sub : 'a array -> int -> int -> 'a array

    sub a pos len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : 'a array -> 'a array

    copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val fill : 'a array -> int -> int -> 'a -> unit

    fill a pos len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a.

    val blit : 'a array -> int -> 'a array -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : 'a array -> 'a list

    to_list a returns the list of all the elements of a.

    val of_list : 'a list -> 'a array

    of_list l returns a fresh array containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_array_length.

    Iterators

    val iter : ('a -> unit) -> 'a array -> unit

    iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : (int -> 'a -> unit) -> 'a array -> unit

    Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val map : ('a -> 'b) -> 'a array -> 'b array

    map f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_inplace : ('a -> 'a) -> 'a array -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : (int -> 'a -> 'a) -> 'a array -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a array -> 'acc

    fold_left f init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_left_map : +Array (ocaml.Stdlib.Array)

    Module Stdlib.Array

    Array operations.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a array

    An alias for the type of arrays.

    val length : 'a array -> int

    Return the length (number of elements) of the given array.

    val get : 'a array -> int -> 'a

    get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

    val set : 'a array -> int -> 'a -> unit

    set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

    val make : int -> 'a -> 'a array

    make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val init : int -> (int -> 'a) -> 'a array

    init n f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied in order to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

    val make_matrix : int -> int -> 'a -> 'a array array

    make_matrix dimx dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

    • raises Invalid_argument

      if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val append : 'a array -> 'a array -> 'a array

    append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

    val concat : 'a array list -> 'a array

    Same as append, but concatenates a list of arrays.

    val sub : 'a array -> int -> int -> 'a array

    sub a pos len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : 'a array -> 'a array

    copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val fill : 'a array -> int -> int -> 'a -> unit

    fill a pos len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

    val blit : 'a array -> int -> 'a array -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : 'a array -> 'a list

    to_list a returns the list of all the elements of a.

    val of_list : 'a list -> 'a array

    of_list l returns a fresh array containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_array_length.

    Iterators

    val iter : ('a -> unit) -> 'a array -> unit

    iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : (int -> 'a -> unit) -> 'a array -> unit

    Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val map : ('a -> 'b) -> 'a array -> 'b array

    map f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_inplace : ('a -> 'a) -> 'a array -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : (int -> 'a -> 'b) -> 'a array -> 'b array

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : (int -> 'a -> 'a) -> 'a array -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a array -> 'acc

    fold_left f init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a array -> - 'acc * 'b array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13
    val fold_right : ('a -> 'acc -> 'acc) -> 'a array -> 'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

    Iterators on two arrays

    val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit

    iter2 f a b applies function f to all the elements of a and b.

    • raises Invalid_argument

      if the arrays are not the same size.

    • since 4.03 (4.05 in ArrayLabels)
    val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

    map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • raises Invalid_argument

      if the arrays are not the same size.

    • since 4.03 (4.05 in ArrayLabels)

    Array scanning

    val for_all : ('a -> bool) -> 'a array -> bool

    for_all f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    • since 4.03
    val exists : ('a -> bool) -> 'a array -> bool

    exists f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    • since 4.03
    val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two arrays have different lengths.

    • since 4.11
    val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two arrays have different lengths.

    • since 4.11
    val mem : 'a -> 'a array -> bool

    mem a set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

    • since 4.03
    val memq : 'a -> 'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03
    val find_opt : ('a -> bool) -> 'a array -> 'a option

    find_opt f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

    • since 4.13
    val find_index : ('a -> bool) -> 'a array -> int option

    find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a array -> 'b option

    find_map f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.13
    val find_mapi : (int -> 'a -> 'b option) -> 'a array -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Arrays of pairs

    val split : ('a * 'b) array -> 'a array * 'b array

    split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

    • since 4.13
    val combine : 'a array -> 'b array -> ('a * 'b) array

    combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

    • since 4.13

    Sorting

    val sort : ('a -> 'a -> int) -> 'a array -> unit

    Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : ('a -> 'a -> int) -> 'a array -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

    val fast_sort : ('a -> 'a -> int) -> 'a array -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Arrays and Sequences

    val to_seq : 'a array -> 'a Seq.t

    Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : 'a array -> (int * 'a) Seq.t

    Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a array

    Create an array from the generator

    • since 4.07

    Arrays and concurrency safety

    Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
    +  'acc * 'b array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13
    val fold_right : ('a -> 'acc -> 'acc) -> 'a array -> 'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

    Iterators on two arrays

    val iter2 : ('a -> 'b -> unit) -> 'a array -> 'b array -> unit

    iter2 f a b applies function f to all the elements of a and b.

    • since 4.03 (4.05 in ArrayLabels)
    val map2 : ('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

    map2 f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • since 4.03 (4.05 in ArrayLabels)

    Array scanning

    val for_all : ('a -> bool) -> 'a array -> bool

    for_all f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    • since 4.03
    val exists : ('a -> bool) -> 'a array -> bool

    exists f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    • since 4.03
    val for_all2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as for_all, but for a two-argument predicate.

    • since 4.11
    val exists2 : ('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • since 4.11
    val mem : 'a -> 'a array -> bool

    mem a set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

    • since 4.03
    val memq : 'a -> 'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03
    val find_opt : ('a -> bool) -> 'a array -> 'a option

    find_opt f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

    • since 4.13
    val find_index : ('a -> bool) -> 'a array -> int option

    find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a array -> 'b option

    find_map f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.13
    val find_mapi : (int -> 'a -> 'b option) -> 'a array -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Arrays of pairs

    val split : ('a * 'b) array -> 'a array * 'b array

    split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

    • since 4.13
    val combine : 'a array -> 'b array -> ('a * 'b) array

    combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

    • since 4.13

    Sorting

    val sort : ('a -> 'a -> int) -> 'a array -> unit

    Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : ('a -> 'a -> int) -> 'a array -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

    val fast_sort : ('a -> 'a -> int) -> 'a array -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Arrays and Sequences

    val to_seq : 'a array -> 'a Seq.t

    Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : 'a array -> (int * 'a) Seq.t

    Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a array

    Create an array from the generator

    • since 4.07

    Arrays and concurrency safety

    Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
     let a = Array.make size 1
     let d1 = Domain.spawn (fun () ->
        Array.iteri (fun i x -> a.(i) <- x + 1) a
    @@ -11,9 +11,9 @@ let d1 = Domain.spawn (fun () ->
     let d2 = Domain.spawn (fun () ->
       Array.iteri (fun i x -> a.(i) <- 2 * x + 1) a
     )
    -let () = Domain.join d1; Domain.join d2

    After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

    Float arrays

    Float arrays have two supplementary caveats in the presence of data races.

    First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

    For instance, at the end of

    let zeros = Array.make size 0.
    +let () = Domain.join d1; Domain.join d2

    After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

    Float arrays

    Float arrays have two supplementary caveats in the presence of data races.

    First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

    For instance, at the end of

     let zeros = Array.make size 0.
     let max_floats = Array.make size Float.max_float
     let res = Array.copy zeros
     let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
     let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
    -let () = Domain.join d1; Domain.join d2

    the res array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the res array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    diff --git a/ocaml/Stdlib/ArrayLabels/index.html b/ocaml/Stdlib/ArrayLabels/index.html index 7317165..782a5df 100644 --- a/ocaml/Stdlib/ArrayLabels/index.html +++ b/ocaml/Stdlib/ArrayLabels/index.html @@ -1,15 +1,15 @@ -ArrayLabels (ocaml.Stdlib.ArrayLabels)

    Module Stdlib.ArrayLabels

    Array operations.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a array

    An alias for the type of arrays.

    val length : 'a array -> int

    Return the length (number of elements) of the given array.

    val get : 'a array -> int -> 'a

    get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val set : 'a array -> int -> 'a -> unit

    set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

    • raises Invalid_argument

      if n is outside the range 0 to length a - 1.

    val make : int -> 'a -> 'a array

    make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val init : int -> f:(int -> 'a) -> 'a array

    init n ~f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied in order to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

    val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array

    make_matrix ~dimx ~dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

    • raises Invalid_argument

      if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val append : 'a array -> 'a array -> 'a array

    append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

    • raises Invalid_argument

      if length v1 + length v2 > Sys.max_array_length.

    val concat : 'a array list -> 'a array

    Same as append, but concatenates a list of arrays.

    val sub : 'a array -> pos:int -> len:int -> 'a array

    sub a ~pos ~len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : 'a array -> 'a array

    copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val fill : 'a array -> pos:int -> len:int -> 'a -> unit

    fill a ~pos ~len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a.

    val blit : - src:'a array -> - src_pos:int -> - dst:'a array -> - dst_pos:int -> - len:int -> - unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : 'a array -> 'a list

    to_list a returns the list of all the elements of a.

    val of_list : 'a list -> 'a array

    of_list l returns a fresh array containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_array_length.

    Iterators

    val iter : f:('a -> unit) -> 'a array -> unit

    iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : f:(int -> 'a -> unit) -> 'a array -> unit

    Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val map : f:('a -> 'b) -> 'a array -> 'b array

    map ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_inplace : f:('a -> 'a) -> 'a array -> unit

    map_inplace ~f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : f:(int -> 'a -> 'b) -> 'a array -> 'b array

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : f:(int -> 'a -> 'a) -> 'a array -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc

    fold_left ~f ~init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_left_map : - f:('acc -> 'a -> 'acc * 'b) -> - init:'acc -> +ArrayLabels (ocaml.Stdlib.ArrayLabels)

    Module Stdlib.ArrayLabels

    Array operations.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a array

    An alias for the type of arrays.

    val length : 'a array -> int

    Return the length (number of elements) of the given array.

    val get : 'a array -> int -> 'a

    get a n returns the element number n of array a. The first element has number 0. The last element has number length a - 1. You can also write a.(n) instead of get a n.

    val set : 'a array -> int -> 'a -> unit

    set a n x modifies array a in place, replacing element number n with x. You can also write a.(n) <- x instead of set a n x.

    val make : int -> 'a -> 'a array

    make n x returns a fresh array of length n, initialized with x. All the elements of this new array are initially physically equal to x (in the sense of the == predicate). Consequently, if x is mutable, it is shared among all elements of the array, and modifying x through one of the array entries will modify all other entries at the same time.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the value of x is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val create_float : int -> float array

    create_float n returns a fresh float array of length n, with uninitialized data.

    • since 4.03
    val init : int -> f:(int -> 'a) -> 'a array

    init n ~f returns a fresh array of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied in order to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_array_length. If the return type of f is float, then the maximum size is only Sys.max_array_length / 2.

    val make_matrix : dimx:int -> dimy:int -> 'a -> 'a array array

    make_matrix ~dimx ~dimy e returns a two-dimensional array (an array of arrays) with first dimension dimx and second dimension dimy. All the elements of this new matrix are initially physically equal to e. The element (x,y) of a matrix m is accessed with the notation m.(x).(y).

    • raises Invalid_argument

      if dimx or dimy is negative or greater than Sys.max_array_length. If the value of e is a floating-point number, then the maximum size is only Sys.max_array_length / 2.

    val append : 'a array -> 'a array -> 'a array

    append v1 v2 returns a fresh array containing the concatenation of the arrays v1 and v2.

    val concat : 'a array list -> 'a array

    Same as append, but concatenates a list of arrays.

    val sub : 'a array -> pos:int -> len:int -> 'a array

    sub a ~pos ~len returns a fresh array of length len, containing the elements number pos to pos + len - 1 of array a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : 'a array -> 'a array

    copy a returns a copy of a, that is, a fresh array containing the same elements as a.

    val fill : 'a array -> pos:int -> len:int -> 'a -> unit

    fill a ~pos ~len x modifies the array a in place, storing x in elements number pos to pos + len - 1.

    val blit : + src:'a array -> + src_pos:int -> + dst:'a array -> + dst_pos:int -> + len:int -> + unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from array src, starting at element number src_pos, to array dst, starting at element number dst_pos. It works correctly even if src and dst are the same array, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : 'a array -> 'a list

    to_list a returns the list of all the elements of a.

    val of_list : 'a list -> 'a array

    of_list l returns a fresh array containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_array_length.

    Iterators

    val iter : f:('a -> unit) -> 'a array -> unit

    iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : f:(int -> 'a -> unit) -> 'a array -> unit

    Same as iter, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val map : f:('a -> 'b) -> 'a array -> 'b array

    map ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_inplace : f:('a -> 'a) -> 'a array -> unit

    map_inplace ~f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : f:(int -> 'a -> 'b) -> 'a array -> 'b array

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : f:(int -> 'a -> 'a) -> 'a array -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a array -> 'acc

    fold_left ~f ~init a computes f (... (f (f init a.(0)) a.(1)) ...) a.(n-1), where n is the length of the array a.

    val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> 'a array -> - 'acc * 'b array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13
    val fold_right : f:('a -> 'acc -> 'acc) -> 'a array -> init:'acc -> 'acc

    fold_right ~f a ~init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

    Iterators on two arrays

    val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit

    iter2 ~f a b applies function f to all the elements of a and b.

    • raises Invalid_argument

      if the arrays are not the same size.

    • since 4.05
    val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

    map2 ~f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • raises Invalid_argument

      if the arrays are not the same size.

    • since 4.05

    Array scanning

    val for_all : f:('a -> bool) -> 'a array -> bool

    for_all ~f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    • since 4.03
    val exists : f:('a -> bool) -> 'a array -> bool

    exists ~f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    • since 4.03
    val for_all2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two arrays have different lengths.

    • since 4.11
    val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two arrays have different lengths.

    • since 4.11
    val mem : 'a -> set:'a array -> bool

    mem a ~set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

    • since 4.03
    val memq : 'a -> set:'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03
    val find_opt : f:('a -> bool) -> 'a array -> 'a option

    find_opt ~f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

    • since 4.13
    val find_index : f:('a -> bool) -> 'a array -> int option

    find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:('a -> 'b option) -> 'a array -> 'b option

    find_map ~f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.13
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a array -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Arrays of pairs

    val split : ('a * 'b) array -> 'a array * 'b array

    split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

    • since 4.13
    val combine : 'a array -> 'b array -> ('a * 'b) array

    combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

    • since 4.13

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Arrays and Sequences

    val to_seq : 'a array -> 'a Seq.t

    Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : 'a array -> (int * 'a) Seq.t

    Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a array

    Create an array from the generator

    • since 4.07

    Arrays and concurrency safety

    Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
    +  'acc * 'b array

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.13
    val fold_right : f:('a -> 'acc -> 'acc) -> 'a array -> init:'acc -> 'acc

    fold_right ~f a ~init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the array a.

    Iterators on two arrays

    val iter2 : f:('a -> 'b -> unit) -> 'a array -> 'b array -> unit

    iter2 ~f a b applies function f to all the elements of a and b.

    • since 4.05
    val map2 : f:('a -> 'b -> 'c) -> 'a array -> 'b array -> 'c array

    map2 ~f a b applies function f to all the elements of a and b, and builds an array with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • since 4.05

    Array scanning

    val for_all : f:('a -> bool) -> 'a array -> bool

    for_all ~f [|a1; ...; an|] checks if all elements of the array satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    • since 4.03
    val exists : f:('a -> bool) -> 'a array -> bool

    exists ~f [|a1; ...; an|] checks if at least one element of the array satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    • since 4.03
    val for_all2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as for_all, but for a two-argument predicate.

    • since 4.11
    val exists2 : f:('a -> 'b -> bool) -> 'a array -> 'b array -> bool

    Same as exists, but for a two-argument predicate.

    • since 4.11
    val mem : 'a -> set:'a array -> bool

    mem a ~set is true if and only if a is structurally equal to an element of l (i.e. there is an x in l such that compare a x = 0).

    • since 4.03
    val memq : 'a -> set:'a array -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    • since 4.03
    val find_opt : f:('a -> bool) -> 'a array -> 'a option

    find_opt ~f a returns the first element of the array a that satisfies the predicate f, or None if there is no value that satisfies f in the array a.

    • since 4.13
    val find_index : f:('a -> bool) -> 'a array -> int option

    find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:('a -> 'b option) -> 'a array -> 'b option

    find_map ~f a applies f to the elements of a in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.13
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a array -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Arrays of pairs

    val split : ('a * 'b) array -> 'a array * 'b array

    split [|(a1,b1); ...; (an,bn)|] is ([|a1; ...; an|], [|b1; ...; bn|]).

    • since 4.13
    val combine : 'a array -> 'b array -> ('a * 'b) array

    combine [|a1; ...; an|] [|b1; ...; bn|] is [|(a1,b1); ...; (an,bn)|]. Raise Invalid_argument if the two arrays have different lengths.

    • since 4.13

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Sort an array in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the array and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary array of length n/2, where n is the length of the array. It is usually faster than the current implementation of sort.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a array -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Arrays and Sequences

    val to_seq : 'a array -> 'a Seq.t

    Iterate on the array, in increasing order. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : 'a array -> (int * 'a) Seq.t

    Iterate on the array, in increasing order, yielding indices along elements. Modifications of the array during iteration will be reflected in the sequence.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a array

    Create an array from the generator

    • since 4.07

    Arrays and concurrency safety

    Care must be taken when concurrently accessing arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
     let a = ArrayLabels.make size 1
     let d1 = Domain.spawn (fun () ->
        ArrayLabels.iteri ~f:(fun i x -> a.(i) <- x + 1) a
    @@ -17,9 +17,9 @@ let d1 = Domain.spawn (fun () ->
     let d2 = Domain.spawn (fun () ->
       ArrayLabels.iteri ~f:(fun i x -> a.(i) <- 2 * x + 1) a
     )
    -let () = Domain.join d1; Domain.join d2

    After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

    Float arrays

    Float arrays have two supplementary caveats in the presence of data races.

    First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

    For instance, at the end of

    let zeros = Array.make size 0.
    +let () = Domain.join d1; Domain.join d2

    After executing this code, each field of the array a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of the array, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same array element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the array elements.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location (with a few exceptions for float arrays).

    Float arrays

    Float arrays have two supplementary caveats in the presence of data races.

    First, the blit operation might copy an array byte-by-byte. Data races between such a blit operation and another operation might produce surprising values due to tearing: partial writes interleaved with other operations can create float values that would not exist with a sequential execution.

    For instance, at the end of

     let zeros = Array.make size 0.
     let max_floats = Array.make size Float.max_float
     let res = Array.copy zeros
     let d1 = Domain.spawn (fun () -> Array.blit zeros 0 res 0 size)
     let d2 = Domain.spawn (fun () -> Array.blit max_floats 0 res 0 size)
    -let () = Domain.join d1; Domain.join d2

    the res array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the res array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    diff --git a/ocaml/Stdlib/Atomic/index.html b/ocaml/Stdlib/Atomic/index.html index facb8d2..2cff387 100644 --- a/ocaml/Stdlib/Atomic/index.html +++ b/ocaml/Stdlib/Atomic/index.html @@ -1,5 +1,5 @@ -Atomic (ocaml.Stdlib.Atomic)

    Module Stdlib.Atomic

    Atomic references.

    See the examples below. See 'Memory model: The hard bits' chapter in the manual.

    • since 4.12
    type !'a t

    An atomic (mutable) reference to a value of type 'a.

    val make : 'a -> 'a t

    Create an atomic reference.

    val get : 'a t -> 'a

    Get the current value of the atomic reference.

    val set : 'a t -> 'a -> unit

    Set a new value for the atomic reference.

    val exchange : 'a t -> 'a -> 'a

    Set a new value for the atomic reference, and return the current value.

    val compare_and_set : 'a t -> 'a -> 'a -> bool

    compare_and_set r seen v sets the new value of r to v only if its current value is physically equal to seen -- the comparison and the set occur atomically. Returns true if the comparison succeeded (so the set happened) and false otherwise.

    val fetch_and_add : int t -> int -> int

    fetch_and_add r n atomically increments the value of r by n, and returns the current value (before the increment).

    val incr : int t -> unit

    incr r atomically increments the value of r by 1.

    val decr : int t -> unit

    decr r atomically decrements the value of r by 1.

    Examples

    Basic Thread Coordination

    A basic use case is to have global counters that are updated in a thread-safe way, for example to keep some sorts of metrics over IOs performed by the program. Another basic use case is to coordinate the termination of threads in a given program, for example when one thread finds an answer, or when the program is shut down by the user.

    Here, for example, we're going to try to find a number whose hash satisfies a basic property. To do that, we'll run multiple threads which will try random numbers until they find one that works.

    Of course the output below is a sample run and will change every time the program is run.

    (* use for termination *)
    +Atomic (ocaml.Stdlib.Atomic)

    Module Stdlib.Atomic

    Atomic references.

    See the examples below. See 'Memory model: The hard bits' chapter in the manual.

    • since 4.12
    type !'a t

    An atomic (mutable) reference to a value of type 'a.

    val make : 'a -> 'a t

    Create an atomic reference.

    val get : 'a t -> 'a

    Get the current value of the atomic reference.

    val set : 'a t -> 'a -> unit

    Set a new value for the atomic reference.

    val exchange : 'a t -> 'a -> 'a

    Set a new value for the atomic reference, and return the current value.

    val compare_and_set : 'a t -> 'a -> 'a -> bool

    compare_and_set r seen v sets the new value of r to v only if its current value is physically equal to seen -- the comparison and the set occur atomically. Returns true if the comparison succeeded (so the set happened) and false otherwise.

    val fetch_and_add : int t -> int -> int

    fetch_and_add r n atomically increments the value of r by n, and returns the current value (before the increment).

    val incr : int t -> unit

    incr r atomically increments the value of r by 1.

    val decr : int t -> unit

    decr r atomically decrements the value of r by 1.

    Examples

    Basic Thread Coordination

    A basic use case is to have global counters that are updated in a thread-safe way, for example to keep some sorts of metrics over IOs performed by the program. Another basic use case is to coordinate the termination of threads in a given program, for example when one thread finds an answer, or when the program is shut down by the user.

    Here, for example, we're going to try to find a number whose hash satisfies a basic property. To do that, we'll run multiple threads which will try random numbers until they find one that works.

    Of course the output below is a sample run and will change every time the program is run.

    (* use for termination *)
     let stop_all_threads = Atomic.make false
     
     (* total number of individual attempts to find a number *)
    @@ -61,4 +61,4 @@ let rec pop (stack: _ stack) : _ option =
     # pop st
     - : int option = Some 1
     # pop st
    -- : int option = None
    \ No newline at end of file +- : int option = None
    diff --git a/ocaml/Stdlib/Bigarray/Array0/index.html b/ocaml/Stdlib/Bigarray/Array0/index.html index bf43b22..d3b3fec 100644 --- a/ocaml/Stdlib/Bigarray/Array0/index.html +++ b/ocaml/Stdlib/Bigarray/Array0/index.html @@ -1,2 +1,2 @@ -Array0 (ocaml.Stdlib.Bigarray.Array0)

    Module Bigarray.Array0

    Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    • since 4.05
    type (!'a, !'b, !'c) t

    The type of zero-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> ('a, 'b, 'c) t

    Array0.create kind layout returns a new Bigarray of zero dimension. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

    Array0.init kind layout v behaves like Array0.create kind layout except that the element is additionally initialized to the value v.

    • since 4.12
    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Array0.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a. No copying of elements is involved: the new array and the original array share the same storage space.

    • since 4.06
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is a's kind_size_in_bytes.

    val get : ('a, 'b, 'c) t -> 'a

    Array0.get a returns the only element in a.

    val set : ('a, 'b, 'c) t -> 'a -> unit

    Array0.set a x v stores the value v in a.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Genarray.fill for more details.

    val of_value : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

    Build a zero-dimensional Bigarray initialized from the given value.

    \ No newline at end of file +Array0 (ocaml.Stdlib.Bigarray.Array0)

    Module Bigarray.Array0

    Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    • since 4.05
    type (!'a, !'b, !'c) t

    The type of zero-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> ('a, 'b, 'c) t

    Array0.create kind layout returns a new Bigarray of zero dimension. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

    Array0.init kind layout v behaves like Array0.create kind layout except that the element is additionally initialized to the value v.

    • since 4.12
    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Array0.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a. No copying of elements is involved: the new array and the original array share the same storage space.

    • since 4.06
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is a's kind_size_in_bytes.

    val get : ('a, 'b, 'c) t -> 'a

    Array0.get a returns the only element in a.

    val set : ('a, 'b, 'c) t -> 'a -> unit

    Array0.set a x v stores the value v in a.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Genarray.fill for more details.

    val of_value : ('a, 'b) kind -> 'c layout -> 'a -> ('a, 'b, 'c) t

    Build a zero-dimensional Bigarray initialized from the given value.

    diff --git a/ocaml/Stdlib/Bigarray/Array1/index.html b/ocaml/Stdlib/Bigarray/Array1/index.html index 90249a2..f094961 100644 --- a/ocaml/Stdlib/Bigarray/Array1/index.html +++ b/ocaml/Stdlib/Bigarray/Array1/index.html @@ -1,2 +1,2 @@ -Array1 (ocaml.Stdlib.Bigarray.Array1)

    Module Bigarray.Array1

    One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    type (!'a, !'b, !'c) t

    The type of one-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> ('a, 'b, 'c) t

    Array1.create kind layout dim returns a new Bigarray of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> int -> (int -> 'a) -> ('a, 'b, 'c) t

    Array1.init kind layout dim f returns a new Bigarray b of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    Each element Array1.get b i of the array is initialized to the result of f i.

    In other words, Array1.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dim.

    • since 4.12
    val dim : ('a, 'b, 'c) t -> int

    Return the size (dimension) of the given one-dimensional Bigarray.

    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Array1.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimension as a). No copying of elements is involved: the new array and the original array share the same storage space.

    • since 4.06
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

    • since 4.03
    val get : ('a, 'b, 'c) t -> int -> 'a

    Array1.get a x, or alternatively a.{x}, returns the element of a at index x. x must be greater or equal than 0 and strictly less than Array1.dim a if a has C layout. If a has Fortran layout, x must be greater or equal than 1 and less or equal than Array1.dim a. Otherwise, Invalid_argument is raised.

    val set : ('a, 'b, 'c) t -> int -> 'a -> unit

    Array1.set a x v, also written a.{x} <- v, stores the value v at index x in a. x must be inside the bounds of a as described in Bigarray.Array1.get; otherwise, Invalid_argument is raised.

    val sub : ('a, 'b, 'c) t -> int -> int -> ('a, 'b, 'c) t

    Extract a sub-array of the given one-dimensional Bigarray. See Genarray.sub_left for more details.

    val slice : ('a, 'b, 'c) t -> int -> ('a, 'b, 'c) Array0.t

    Extract a scalar (zero-dimensional slice) of the given one-dimensional Bigarray. The integer parameter is the index of the scalar to extract. See Bigarray.Genarray.slice_left and Bigarray.Genarray.slice_right for more details.

    • since 4.05
    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Genarray.fill for more details.

    val of_array : ('a, 'b) kind -> 'c layout -> 'a array -> ('a, 'b, 'c) t

    Build a one-dimensional Bigarray initialized from the given array.

    val unsafe_get : ('a, 'b, 'c) t -> int -> 'a

    Like Bigarray.Array1.get, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

    val unsafe_set : ('a, 'b, 'c) t -> int -> 'a -> unit

    Like Bigarray.Array1.set, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

    \ No newline at end of file +Array1 (ocaml.Stdlib.Bigarray.Array1)

    Module Bigarray.Array1

    One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    type (!'a, !'b, !'c) t

    The type of one-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> ('a, 'b, 'c) t

    Array1.create kind layout dim returns a new Bigarray of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> int -> (int -> 'a) -> ('a, 'b, 'c) t

    Array1.init kind layout dim f returns a new Bigarray b of one dimension, whose size is dim. kind and layout determine the array element kind and the array layout as described for Genarray.create.

    Each element Array1.get b i of the array is initialized to the result of f i.

    In other words, Array1.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dim.

    • since 4.12
    val dim : ('a, 'b, 'c) t -> int

    Return the size (dimension) of the given one-dimensional Bigarray.

    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Array1.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimension as a). No copying of elements is involved: the new array and the original array share the same storage space.

    • since 4.06
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

    • since 4.03
    val get : ('a, 'b, 'c) t -> int -> 'a

    Array1.get a x, or alternatively a.{x}, returns the element of a at index x. x must be greater or equal than 0 and strictly less than Array1.dim a if a has C layout. If a has Fortran layout, x must be greater or equal than 1 and less or equal than Array1.dim a. Otherwise, Invalid_argument is raised.

    val set : ('a, 'b, 'c) t -> int -> 'a -> unit

    Array1.set a x v, also written a.{x} <- v, stores the value v at index x in a. x must be inside the bounds of a as described in Bigarray.Array1.get; otherwise, Invalid_argument is raised.

    val sub : ('a, 'b, 'c) t -> int -> int -> ('a, 'b, 'c) t

    Extract a sub-array of the given one-dimensional Bigarray. See Genarray.sub_left for more details.

    val slice : ('a, 'b, 'c) t -> int -> ('a, 'b, 'c) Array0.t

    Extract a scalar (zero-dimensional slice) of the given one-dimensional Bigarray. The integer parameter is the index of the scalar to extract. See Bigarray.Genarray.slice_left and Bigarray.Genarray.slice_right for more details.

    • since 4.05
    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Genarray.fill for more details.

    val of_array : ('a, 'b) kind -> 'c layout -> 'a array -> ('a, 'b, 'c) t

    Build a one-dimensional Bigarray initialized from the given array.

    val unsafe_get : ('a, 'b, 'c) t -> int -> 'a

    Like Bigarray.Array1.get, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

    val unsafe_set : ('a, 'b, 'c) t -> int -> 'a -> unit

    Like Bigarray.Array1.set, but bounds checking is not always performed. Use with caution and only when the program logic guarantees that the access is within bounds.

    diff --git a/ocaml/Stdlib/Bigarray/Array2/index.html b/ocaml/Stdlib/Bigarray/Array2/index.html index 1012dbf..344ac52 100644 --- a/ocaml/Stdlib/Bigarray/Array2/index.html +++ b/ocaml/Stdlib/Bigarray/Array2/index.html @@ -1,5 +1,5 @@ -Array2 (ocaml.Stdlib.Bigarray.Array2)

    Module Bigarray.Array2

    Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

    type (!'a, !'b, !'c) t

    The type of two-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> int -> ('a, 'b, 'c) t

    Array2.create kind layout dim1 dim2 returns a new Bigarray of two dimensions, whose size is dim1 in the first dimension and dim2 in the second dimension. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

    val init : +Array2 (ocaml.Stdlib.Bigarray.Array2)

    Module Bigarray.Array2

    Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

    type (!'a, !'b, !'c) t

    The type of two-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> int -> ('a, 'b, 'c) t

    Array2.create kind layout dim1 dim2 returns a new Bigarray of two dimensions, whose size is dim1 in the first dimension and dim2 in the second dimension. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> int -> @@ -12,4 +12,4 @@ ('a, 'b, fortran_layout) t

    Extract a two-dimensional sub-array of the given two-dimensional Bigarray by restricting the second dimension. See Bigarray.Genarray.sub_right for more details. Array2.sub_right applies only to arrays with Fortran layout.

    val slice_left : ('a, 'b, c_layout) t -> int -> ('a, 'b, c_layout) Array1.t

    Extract a row (one-dimensional slice) of the given two-dimensional Bigarray. The integer parameter is the index of the row to extract. See Bigarray.Genarray.slice_left for more details. Array2.slice_left applies only to arrays with C layout.

    val slice_right : ('a, 'b, fortran_layout) t -> int -> - ('a, 'b, fortran_layout) Array1.t

    Extract a column (one-dimensional slice) of the given two-dimensional Bigarray. The integer parameter is the index of the column to extract. See Bigarray.Genarray.slice_right for more details. Array2.slice_right applies only to arrays with Fortran layout.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Bigarray.Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Bigarray.Genarray.fill for more details.

    val of_array : ('a, 'b) kind -> 'c layout -> 'a array array -> ('a, 'b, 'c) t

    Build a two-dimensional Bigarray initialized from the given array of arrays.

    val unsafe_get : ('a, 'b, 'c) t -> int -> int -> 'a

    Like Bigarray.Array2.get, but bounds checking is not always performed.

    val unsafe_set : ('a, 'b, 'c) t -> int -> int -> 'a -> unit

    Like Bigarray.Array2.set, but bounds checking is not always performed.

    \ No newline at end of file + ('a, 'b, fortran_layout) Array1.t

    Extract a column (one-dimensional slice) of the given two-dimensional Bigarray. The integer parameter is the index of the column to extract. See Bigarray.Genarray.slice_right for more details. Array2.slice_right applies only to arrays with Fortran layout.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy the first Bigarray to the second Bigarray. See Bigarray.Genarray.blit for more details.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Fill the given Bigarray with the given value. See Bigarray.Genarray.fill for more details.

    val of_array : ('a, 'b) kind -> 'c layout -> 'a array array -> ('a, 'b, 'c) t

    Build a two-dimensional Bigarray initialized from the given array of arrays.

    val unsafe_get : ('a, 'b, 'c) t -> int -> int -> 'a

    Like Bigarray.Array2.get, but bounds checking is not always performed.

    val unsafe_set : ('a, 'b, 'c) t -> int -> int -> 'a -> unit

    Like Bigarray.Array2.set, but bounds checking is not always performed.

    diff --git a/ocaml/Stdlib/Bigarray/Array3/index.html b/ocaml/Stdlib/Bigarray/Array3/index.html index 7e98f32..9283b1f 100644 --- a/ocaml/Stdlib/Bigarray/Array3/index.html +++ b/ocaml/Stdlib/Bigarray/Array3/index.html @@ -1,5 +1,5 @@ -Array3 (ocaml.Stdlib.Bigarray.Array3)

    Module Bigarray.Array3

    Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

    type (!'a, !'b, !'c) t

    The type of three-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> int -> int -> ('a, 'b, 'c) t

    Array3.create kind layout dim1 dim2 dim3 returns a new Bigarray of three dimensions, whose size is dim1 in the first dimension, dim2 in the second dimension, and dim3 in the third. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

    val init : +Array3 (ocaml.Stdlib.Bigarray.Array3)

    Module Bigarray.Array3

    Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

    type (!'a, !'b, !'c) t

    The type of three-dimensional Bigarrays whose elements have OCaml type 'a, representation kind 'b, and memory layout 'c.

    val create : ('a, 'b) kind -> 'c layout -> int -> int -> int -> ('a, 'b, 'c) t

    Array3.create kind layout dim1 dim2 dim3 returns a new Bigarray of three dimensions, whose size is dim1 in the first dimension, dim2 in the second dimension, and dim3 in the third. kind and layout determine the array element kind and the array layout as described for Bigarray.Genarray.create.

    val init : ('a, 'b) kind -> 'c layout -> int -> @@ -25,4 +25,4 @@ ('a, 'b) kind -> 'c layout -> 'a array array array -> - ('a, 'b, 'c) t

    Build a three-dimensional Bigarray initialized from the given array of arrays of arrays.

    val unsafe_get : ('a, 'b, 'c) t -> int -> int -> int -> 'a

    Like Bigarray.Array3.get, but bounds checking is not always performed.

    val unsafe_set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit

    Like Bigarray.Array3.set, but bounds checking is not always performed.

    \ No newline at end of file + ('a, 'b, 'c) t

    Build a three-dimensional Bigarray initialized from the given array of arrays of arrays.

    val unsafe_get : ('a, 'b, 'c) t -> int -> int -> int -> 'a

    Like Bigarray.Array3.get, but bounds checking is not always performed.

    val unsafe_set : ('a, 'b, 'c) t -> int -> int -> int -> 'a -> unit

    Like Bigarray.Array3.set, but bounds checking is not always performed.

    diff --git a/ocaml/Stdlib/Bigarray/Genarray/index.html b/ocaml/Stdlib/Bigarray/Genarray/index.html index 589e81b..d2a06c7 100644 --- a/ocaml/Stdlib/Bigarray/Genarray/index.html +++ b/ocaml/Stdlib/Bigarray/Genarray/index.html @@ -1,15 +1,14 @@ -Genarray (ocaml.Stdlib.Bigarray.Genarray)

    Module Bigarray.Genarray

    type (!'a, !'b, !'c) t

    The type Genarray.t is the type of Bigarrays with variable numbers of dimensions. Any number of dimensions between 0 and 16 is supported.

    The three type parameters to Genarray.t identify the array element kind and layout, as follows:

    • the first parameter, 'a, is the OCaml type for accessing array elements (float, int, int32, int64, nativeint);
    • the second parameter, 'b, is the actual kind of array elements (float32_elt, float64_elt, int8_signed_elt, int8_unsigned_elt, etc);
    • the third parameter, 'c, identifies the array layout (c_layout or fortran_layout).

    For instance, (float, float32_elt, fortran_layout) Genarray.t is the type of generic Bigarrays containing 32-bit floats in Fortran layout; reads and writes in this array use the OCaml type float.

    val create : ('a, 'b) kind -> 'c layout -> int array -> ('a, 'b, 'c) t

    Genarray.create kind layout dimensions returns a new Bigarray whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

    For instance, Genarray.create int32 c_layout [|4;6;8|] returns a fresh Bigarray of 32-bit integers, in C layout, having three dimensions, the three dimensions being 4, 6 and 8 respectively.

    Bigarrays returned by Genarray.create are not initialized: the initial values of array elements is unspecified.

    Genarray.create raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

    val init : +Genarray (ocaml.Stdlib.Bigarray.Genarray)

    Module Bigarray.Genarray

    type (!'a, !'b, !'c) t

    The type Genarray.t is the type of Bigarrays with variable numbers of dimensions. Any number of dimensions between 0 and 16 is supported.

    The three type parameters to Genarray.t identify the array element kind and layout, as follows:

    • the first parameter, 'a, is the OCaml type for accessing array elements (float, int, int32, int64, nativeint);
    • the second parameter, 'b, is the actual kind of array elements (float32_elt, float64_elt, int8_signed_elt, int8_unsigned_elt, etc);
    • the third parameter, 'c, identifies the array layout (c_layout or fortran_layout).

    For instance, (float, float32_elt, fortran_layout) Genarray.t is the type of generic Bigarrays containing 32-bit floats in Fortran layout; reads and writes in this array use the OCaml type float.

    val create : ('a, 'b) kind -> 'c layout -> int array -> ('a, 'b, 'c) t

    Genarray.create kind layout dimensions returns a new Bigarray whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

    For instance, Genarray.create int32 c_layout [|4;6;8|] returns a fresh Bigarray of 32-bit integers, in C layout, having three dimensions, the three dimensions being 4, 6 and 8 respectively.

    Bigarrays returned by Genarray.create are not initialized: the initial values of array elements is unspecified.

    Genarray.create raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

    val init : ('a, 'b) kind -> 'c layout -> int array -> (int array -> 'a) -> - ('a, 'b, 'c) t

    Genarray.init kind layout dimensions f returns a new Bigarray b whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

    Each element Genarray.get b i is initialized to the result of f i. In other words, Genarray.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dimensions. The index array i may be shared and mutated between calls to f.

    For instance, Genarray.init int c_layout [|2; 1; 3|] - (Array.fold_left (+) 0) returns a fresh Bigarray of integers, in C layout, having three dimensions (2, 1, 3, respectively), with the element values 0, 1, 2, 1, 2, 3.

    Genarray.init raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

    • since 4.12
    val num_dims : ('a, 'b, 'c) t -> int

    Return the number of dimensions of the given Bigarray.

    val dims : ('a, 'b, 'c) t -> int array

    Genarray.dims a returns all dimensions of the Bigarray a, as an array of integers of length Genarray.num_dims a.

    val nth_dim : ('a, 'b, 'c) t -> int -> int

    Genarray.nth_dim a n returns the n-th dimension of the Bigarray a. The first dimension corresponds to n = 0; the second dimension corresponds to n = 1; the last dimension, to n = Genarray.num_dims a - 1.

    • raises Invalid_argument

      if n is less than 0 or greater or equal than Genarray.num_dims a.

    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Genarray.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimensions as a). No copying of elements is involved: the new array and the original array share the same storage space. The dimensions are reversed, such that get v [| a; b |] in C layout becomes get v [| b+1; a+1 |] in Fortran layout.

    • since 4.04
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

    • since 4.03
    val get : ('a, 'b, 'c) t -> int array -> 'a

    Read an element of a generic Bigarray. Genarray.get a [|i1; ...; iN|] returns the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

    If a has C layout, the coordinates must be greater or equal than 0 and strictly less than the corresponding dimensions of a. If a has Fortran layout, the coordinates must be greater or equal than 1 and less or equal than the corresponding dimensions of a.

    If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} instead of Genarray.get a [|i1; ...; iN|]. (The syntax a.{...} with one, two or three coordinates is reserved for accessing one-, two- and three-dimensional arrays as described below.)

    • raises Invalid_argument

      if the array a does not have exactly N dimensions, or if the coordinates are outside the array bounds.

    val set : ('a, 'b, 'c) t -> int array -> 'a -> unit

    Assign an element of a generic Bigarray. Genarray.set a [|i1; ...; iN|] v stores the value v in the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

    The array a must have exactly N dimensions, and all coordinates must lie inside the array bounds, as described for Genarray.get; otherwise, Invalid_argument is raised.

    If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} <- v instead of Genarray.set a [|i1; ...; iN|] v. (The syntax a.{...} <- v with one, two or three coordinates is reserved for updating one-, two- and three-dimensional arrays as described below.)

    val sub_left : ('a, 'b, c_layout) t -> int -> int -> ('a, 'b, c_layout) t

    Extract a sub-array of the given Bigarray by restricting the first (left-most) dimension. Genarray.sub_left a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the first dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the first dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1+ofs; ...; iN|] of the original array a.

    Genarray.sub_left applies only to Bigarrays in C layout.

    • raises Invalid_argument

      if ofs and len do not designate a valid sub-array of a, that is, if ofs < 0, or len < 0, or ofs + len > Genarray.nth_dim a 0.

    val sub_right : + ('a, 'b, 'c) t

    Genarray.init kind layout dimensions f returns a new Bigarray b whose element kind is determined by the parameter kind (one of float32, float64, int8_signed, etc) and whose layout is determined by the parameter layout (one of c_layout or fortran_layout). The dimensions parameter is an array of integers that indicate the size of the Bigarray in each dimension. The length of dimensions determines the number of dimensions of the Bigarray.

    Each element Genarray.get b i is initialized to the result of f i. In other words, Genarray.init kind layout dimensions f tabulates the results of f applied to the indices of a new Bigarray whose layout is described by kind, layout and dimensions. The index array i may be shared and mutated between calls to f.

    For instance, Genarray.init int c_layout [|2; 1; 3|] (Array.fold_left (+) 0) returns a fresh Bigarray of integers, in C layout, having three dimensions (2, 1, 3, respectively), with the element values 0, 1, 2, 1, 2, 3.

    Genarray.init raises Invalid_argument if the number of dimensions is not in the range 0 to 16 inclusive, or if one of the dimensions is negative.

    • since 4.12
    val num_dims : ('a, 'b, 'c) t -> int

    Return the number of dimensions of the given Bigarray.

    val dims : ('a, 'b, 'c) t -> int array

    Genarray.dims a returns all dimensions of the Bigarray a, as an array of integers of length Genarray.num_dims a.

    val nth_dim : ('a, 'b, 'c) t -> int -> int

    Genarray.nth_dim a n returns the n-th dimension of the Bigarray a. The first dimension corresponds to n = 0; the second dimension corresponds to n = 1; the last dimension, to n = Genarray.num_dims a - 1.

    • raises Invalid_argument

      if n is less than 0 or greater or equal than Genarray.num_dims a.

    val kind : ('a, 'b, 'c) t -> ('a, 'b) kind

    Return the kind of the given Bigarray.

    val layout : ('a, 'b, 'c) t -> 'c layout

    Return the layout of the given Bigarray.

    val change_layout : ('a, 'b, 'c) t -> 'd layout -> ('a, 'b, 'd) t

    Genarray.change_layout a layout returns a Bigarray with the specified layout, sharing the data with a (and hence having the same dimensions as a). No copying of elements is involved: the new array and the original array share the same storage space. The dimensions are reversed, such that get v [| a; b |] in C layout becomes get v [| b+1; a+1 |] in Fortran layout.

    • since 4.04
    val size_in_bytes : ('a, 'b, 'c) t -> int

    size_in_bytes a is the number of elements in a multiplied by a's kind_size_in_bytes.

    • since 4.03
    val get : ('a, 'b, 'c) t -> int array -> 'a

    Read an element of a generic Bigarray. Genarray.get a [|i1; ...; iN|] returns the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

    If a has C layout, the coordinates must be greater or equal than 0 and strictly less than the corresponding dimensions of a. If a has Fortran layout, the coordinates must be greater or equal than 1 and less or equal than the corresponding dimensions of a.

    If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} instead of Genarray.get a [|i1; ...; iN|]. (The syntax a.{...} with one, two or three coordinates is reserved for accessing one-, two- and three-dimensional arrays as described below.)

    • raises Invalid_argument

      if the array a does not have exactly N dimensions, or if the coordinates are outside the array bounds.

    val set : ('a, 'b, 'c) t -> int array -> 'a -> unit

    Assign an element of a generic Bigarray. Genarray.set a [|i1; ...; iN|] v stores the value v in the element of a whose coordinates are i1 in the first dimension, i2 in the second dimension, ..., iN in the N-th dimension.

    The array a must have exactly N dimensions, and all coordinates must lie inside the array bounds, as described for Genarray.get; otherwise, Invalid_argument is raised.

    If N > 3, alternate syntax is provided: you can write a.{i1, i2, ..., iN} <- v instead of Genarray.set a [|i1; ...; iN|] v. (The syntax a.{...} <- v with one, two or three coordinates is reserved for updating one-, two- and three-dimensional arrays as described below.)

    val sub_left : ('a, 'b, c_layout) t -> int -> int -> ('a, 'b, c_layout) t

    Extract a sub-array of the given Bigarray by restricting the first (left-most) dimension. Genarray.sub_left a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the first dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the first dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1+ofs; ...; iN|] of the original array a.

    Genarray.sub_left applies only to Bigarrays in C layout.

    • raises Invalid_argument

      if ofs and len do not designate a valid sub-array of a, that is, if ofs < 0, or len < 0, or ofs + len > Genarray.nth_dim a 0.

    val sub_right : ('a, 'b, fortran_layout) t -> int -> int -> - ('a, 'b, fortran_layout) t

    Extract a sub-array of the given Bigarray by restricting the last (right-most) dimension. Genarray.sub_right a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the last dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the last dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1; ...; iN+ofs|] of the original array a.

    Genarray.sub_right applies only to Bigarrays in Fortran layout.

    • raises Invalid_argument

      if ofs and len do not designate a valid sub-array of a, that is, if ofs < 1, or len < 0, or ofs + len > Genarray.nth_dim a (Genarray.num_dims a - 1).

    val slice_left : ('a, 'b, c_layout) t -> int array -> ('a, 'b, c_layout) t

    Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the first (left-most) coordinates. Genarray.slice_left a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the first M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|i1; ...; iM; j1; ...; j(N-M)|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

    Genarray.slice_left applies only to Bigarrays in C layout.

    • raises Invalid_argument

      if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

    val slice_right : + ('a, 'b, fortran_layout) t

    Extract a sub-array of the given Bigarray by restricting the last (right-most) dimension. Genarray.sub_right a ofs len returns a Bigarray with the same number of dimensions as a, and the same dimensions as a, except the last dimension, which corresponds to the interval [ofs ... ofs + len - 1] of the last dimension of a. No copying of elements is involved: the sub-array and the original array share the same storage space. In other terms, the element at coordinates [|i1; ...; iN|] of the sub-array is identical to the element at coordinates [|i1; ...; iN+ofs|] of the original array a.

    Genarray.sub_right applies only to Bigarrays in Fortran layout.

    • raises Invalid_argument

      if ofs and len do not designate a valid sub-array of a, that is, if ofs < 1, or len < 0, or ofs + len > Genarray.nth_dim a (Genarray.num_dims a - 1).

    val slice_left : ('a, 'b, c_layout) t -> int array -> ('a, 'b, c_layout) t

    Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the first (left-most) coordinates. Genarray.slice_left a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the first M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|i1; ...; iM; j1; ...; j(N-M)|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

    Genarray.slice_left applies only to Bigarrays in C layout.

    • raises Invalid_argument

      if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

    val slice_right : ('a, 'b, fortran_layout) t -> int array -> - ('a, 'b, fortran_layout) t

    Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the last (right-most) coordinates. Genarray.slice_right a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the last M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|j1; ...; j(N-M); i1; ...; iM|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

    Genarray.slice_right applies only to Bigarrays in Fortran layout.

    • raises Invalid_argument

      if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy all elements of a Bigarray in another Bigarray. Genarray.blit src dst copies all elements of src into dst. Both arrays src and dst must have the same number of dimensions and equal dimensions. Copying a sub-array of src to a sub-array of dst can be achieved by applying Genarray.blit to sub-array or slices of src and dst.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Set all elements of a Bigarray to a given value. Genarray.fill a v stores the value v in all elements of the Bigarray a. Setting only some elements of a to v can be achieved by applying Genarray.fill to a sub-array or a slice of a.

    \ No newline at end of file + ('a, 'b, fortran_layout) t

    Extract a sub-array of lower dimension from the given Bigarray by fixing one or several of the last (right-most) coordinates. Genarray.slice_right a [|i1; ... ; iM|] returns the 'slice' of a obtained by setting the last M coordinates to i1, ..., iM. If a has N dimensions, the slice has dimension N - M, and the element at coordinates [|j1; ...; j(N-M)|] in the slice is identical to the element at coordinates [|j1; ...; j(N-M); i1; ...; iM|] in the original array a. No copying of elements is involved: the slice and the original array share the same storage space.

    Genarray.slice_right applies only to Bigarrays in Fortran layout.

    • raises Invalid_argument

      if M >= N, or if [|i1; ... ; iM|] is outside the bounds of a.

    val blit : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> unit

    Copy all elements of a Bigarray in another Bigarray. Genarray.blit src dst copies all elements of src into dst. Both arrays src and dst must have the same number of dimensions and equal dimensions. Copying a sub-array of src to a sub-array of dst can be achieved by applying Genarray.blit to sub-array or slices of src and dst.

    val fill : ('a, 'b, 'c) t -> 'a -> unit

    Set all elements of a Bigarray to a given value. Genarray.fill a v stores the value v in all elements of the Bigarray a. Setting only some elements of a to v can be achieved by applying Genarray.fill to a sub-array or a slice of a.

    diff --git a/ocaml/Stdlib/Bigarray/index.html b/ocaml/Stdlib/Bigarray/index.html index 001ca5e..31bd5bc 100644 --- a/ocaml/Stdlib/Bigarray/index.html +++ b/ocaml/Stdlib/Bigarray/index.html @@ -1,12 +1,12 @@ -Bigarray (ocaml.Stdlib.Bigarray)

    Module Stdlib.Bigarray

    Large, multi-dimensional, numerical arrays.

    This module implements multi-dimensional arrays of integers and floating-point numbers, thereafter referred to as 'Bigarrays', to distinguish them from the standard OCaml arrays described in Array.

    The implementation allows efficient sharing of large numerical arrays between OCaml code and C or Fortran numerical libraries.

    The main differences between 'Bigarrays' and standard OCaml arrays are as follows:

    • Bigarrays are not limited in size, unlike OCaml arrays. (Normal float arrays are limited to 2,097,151 elements on a 32-bit platform, and normal arrays of other types to 4,194,303 elements.)
    • Bigarrays are multi-dimensional. Any number of dimensions between 0 and 16 is supported. In contrast, OCaml arrays are mono-dimensional and require encoding multi-dimensional arrays as arrays of arrays.
    • Bigarrays can only contain integers and floating-point numbers, while OCaml arrays can contain arbitrary OCaml data types.
    • Bigarrays provide more space-efficient storage of integer and floating-point elements than normal OCaml arrays, in particular because they support 'small' types such as single-precision floats and 8 and 16-bit integers, in addition to the standard OCaml types of double-precision floats and 32 and 64-bit integers.
    • The memory layout of Bigarrays is entirely compatible with that of arrays in C and Fortran, allowing large arrays to be passed back and forth between OCaml code and C / Fortran code with no data copying at all.
    • Bigarrays support interesting high-level operations that normal arrays do not provide efficiently, such as extracting sub-arrays and 'slicing' a multi-dimensional array along certain dimensions, all without any copying.

    Users of this module are encouraged to do open Bigarray in their source, then refer to array types and operations via short dot notation, e.g. Array1.t or Array2.sub.

    Bigarrays support all the OCaml ad-hoc polymorphic operations:

    Element kinds

    Bigarrays can contain elements of the following kinds:

    Each element kind is represented at the type level by one of the *_elt types defined below (defined with a single constructor instead of abstract types for technical injectivity reasons).

    • since 4.07 Moved from otherlibs to stdlib.
    type float32_elt =
    1. | Float32_elt
    type float64_elt =
    1. | Float64_elt
    type int8_signed_elt =
    1. | Int8_signed_elt
    type int8_unsigned_elt =
    1. | Int8_unsigned_elt
    type int16_signed_elt =
    1. | Int16_signed_elt
    type int16_unsigned_elt =
    1. | Int16_unsigned_elt
    type int32_elt =
    1. | Int32_elt
    type int64_elt =
    1. | Int64_elt
    type int_elt =
    1. | Int_elt
    type nativeint_elt =
    1. | Nativeint_elt
    type complex32_elt =
    1. | Complex32_elt
    type complex64_elt =
    1. | Complex64_elt
    type ('a, 'b) kind =
    1. | Float32 : (float, float32_elt) kind
    2. | Float64 : (float, float64_elt) kind
    3. | Int8_signed : (int, int8_signed_elt) kind
    4. | Int8_unsigned : (int, int8_unsigned_elt) kind
    5. | Int16_signed : (int, int16_signed_elt) kind
    6. | Int16_unsigned : (int, int16_unsigned_elt) kind
    7. | Int32 : (int32, int32_elt) kind
    8. | Int64 : (int64, int64_elt) kind
    9. | Int : (int, int_elt) kind
    10. | Nativeint : (nativeint, nativeint_elt) kind
    11. | Complex32 : (Complex.t, complex32_elt) kind
    12. | Complex64 : (Complex.t, complex64_elt) kind
    13. | Char : (char, int8_unsigned_elt) kind

    To each element kind is associated an OCaml type, which is the type of OCaml values that can be stored in the Bigarray or read back from it. This type is not necessarily the same as the type of the array elements proper: for instance, a Bigarray whose elements are of kind float32_elt contains 32-bit single precision floats, but reading or writing one of its elements from OCaml uses the OCaml type float, which is 64-bit double precision floats.

    The GADT type ('a, 'b) kind captures this association of an OCaml type 'a for values read or written in the Bigarray, and of an element kind 'b which represents the actual contents of the Bigarray. Its constructors list all possible associations of OCaml types with element kinds, and are re-exported below for backward-compatibility reasons.

    Using a generalized algebraic datatype (GADT) here allows writing well-typed polymorphic functions whose return type depend on the argument type, such as:

    let zero : type a b. (a, b) kind -> a = function
    -  | Float32 -> 0.0 | Complex32 -> Complex.zero
    -  | Float64 -> 0.0 | Complex64 -> Complex.zero
    -  | Int8_signed -> 0 | Int8_unsigned -> 0
    -  | Int16_signed -> 0 | Int16_unsigned -> 0
    -  | Int32 -> 0l | Int64 -> 0L
    -  | Int -> 0 | Nativeint -> 0n
    -  | Char -> '\000'
    val float32 : (float, float32_elt) kind
    val float64 : (float, float64_elt) kind
    val complex32 : (Complex.t, complex32_elt) kind
    val complex64 : (Complex.t, complex64_elt) kind
    val int8_signed : (int, int8_signed_elt) kind
    val int8_unsigned : (int, int8_unsigned_elt) kind
    val int16_signed : (int, int16_signed_elt) kind
    val int16_unsigned : (int, int16_unsigned_elt) kind
    val int : (int, int_elt) kind
    val int32 : (int32, int32_elt) kind
    val int64 : (int64, int64_elt) kind
    val nativeint : (nativeint, nativeint_elt) kind
    val char : (char, int8_unsigned_elt) kind

    As shown by the types of the values above, Bigarrays of kind float32_elt and float64_elt are accessed using the OCaml type float. Bigarrays of complex kinds complex32_elt, complex64_elt are accessed with the OCaml type Complex.t. Bigarrays of integer kinds are accessed using the smallest OCaml integer type large enough to represent the array elements: int for 8- and 16-bit integer Bigarrays, as well as OCaml-integer Bigarrays; int32 for 32-bit integer Bigarrays; int64 for 64-bit integer Bigarrays; and nativeint for platform-native integer Bigarrays. Finally, Bigarrays of kind int8_unsigned_elt can also be accessed as arrays of characters instead of arrays of small integers, by using the kind value char instead of int8_unsigned.

    val kind_size_in_bytes : ('a, 'b) kind -> int

    kind_size_in_bytes k is the number of bytes used to store an element of type k.

    • since 4.03

    Array layouts

    type c_layout =
    1. | C_layout_typ
    type fortran_layout =
    1. | Fortran_layout_typ

    To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for Bigarrays, one compatible with the C conventions, the other compatible with the Fortran conventions.

    In the C-style layout, array indices start at 0, and multi-dimensional arrays are laid out in row-major format. That is, for a two-dimensional array, all elements of row 0 are contiguous in memory, followed by all elements of row 1, etc. In other terms, the array elements at (x,y) and (x, y+1) are adjacent in memory.

    In the Fortran-style layout, array indices start at 1, and multi-dimensional arrays are laid out in column-major format. That is, for a two-dimensional array, all elements of column 0 are contiguous in memory, followed by all elements of column 1, etc. In other terms, the array elements at (x,y) and (x+1, y) are adjacent in memory.

    Each layout style is identified at the type level by the phantom types Bigarray.c_layout and Bigarray.fortran_layout respectively.

    Supported layouts

    The GADT type 'a layout represents one of the two supported memory layouts: C-style or Fortran-style. Its constructors are re-exported as values below for backward-compatibility reasons.

    type 'a layout =
    1. | C_layout : c_layout layout
    2. | Fortran_layout : fortran_layout layout
    val c_layout : c_layout layout
    val fortran_layout : fortran_layout layout

    Generic arrays (of arbitrarily many dimensions)

    module Genarray : sig ... end

    Zero-dimensional arrays

    module Array0 : sig ... end

    Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    One-dimensional arrays

    module Array1 : sig ... end

    One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    Two-dimensional arrays

    module Array2 : sig ... end

    Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

    Three-dimensional arrays

    module Array3 : sig ... end

    Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

    Coercions between generic Bigarrays and fixed-dimension Bigarrays

    val genarray_of_array0 : ('a, 'b, 'c) Array0.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given zero-dimensional Bigarray.

    • since 4.05
    val genarray_of_array1 : ('a, 'b, 'c) Array1.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given one-dimensional Bigarray.

    val genarray_of_array2 : ('a, 'b, 'c) Array2.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given two-dimensional Bigarray.

    val genarray_of_array3 : ('a, 'b, 'c) Array3.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given three-dimensional Bigarray.

    val array0_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

    Return the zero-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly zero dimension.

    • since 4.05
    val array1_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array1.t

    Return the one-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly one dimension.

    val array2_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array2.t

    Return the two-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly two dimensions.

    val array3_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array3.t

    Return the three-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly three dimensions.

    Re-shaping Bigarrays

    val reshape : ('a, 'b, 'c) Genarray.t -> int array -> ('a, 'b, 'c) Genarray.t

    reshape b [|d1;...;dN|] converts the Bigarray b to a N-dimensional array of dimensions d1...dN. The returned array and the original array b share their data and have the same layout. For instance, assuming that b is a one-dimensional array of dimension 12, reshape b [|3;4|] returns a two-dimensional array b' of dimensions 3 and 4. If b has C layout, the element (x,y) of b' corresponds to the element x * 3 + y of b. If b has Fortran layout, the element (x,y) of b' corresponds to the element x + (y - 1) * 4 of b. The returned Bigarray must have exactly the same number of elements as the original Bigarray b. That is, the product of the dimensions of b must be equal to i1 * ... * iN. Otherwise, Invalid_argument is raised.

    val reshape_0 : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

    Specialized version of Bigarray.reshape for reshaping to zero-dimensional arrays.

    • since 4.05
    val reshape_1 : ('a, 'b, 'c) Genarray.t -> int -> ('a, 'b, 'c) Array1.t

    Specialized version of Bigarray.reshape for reshaping to one-dimensional arrays.

    val reshape_2 : ('a, 'b, 'c) Genarray.t -> int -> int -> ('a, 'b, 'c) Array2.t

    Specialized version of Bigarray.reshape for reshaping to two-dimensional arrays.

    val reshape_3 : +Bigarray (ocaml.Stdlib.Bigarray)

    Module Stdlib.Bigarray

    Large, multi-dimensional, numerical arrays.

    This module implements multi-dimensional arrays of integers and floating-point numbers, thereafter referred to as 'Bigarrays', to distinguish them from the standard OCaml arrays described in Array.

    The implementation allows efficient sharing of large numerical arrays between OCaml code and C or Fortran numerical libraries.

    The main differences between 'Bigarrays' and standard OCaml arrays are as follows:

    • Bigarrays are not limited in size, unlike OCaml arrays. (Normal float arrays are limited to 2,097,151 elements on a 32-bit platform, and normal arrays of other types to 4,194,303 elements.)
    • Bigarrays are multi-dimensional. Any number of dimensions between 0 and 16 is supported. In contrast, OCaml arrays are mono-dimensional and require encoding multi-dimensional arrays as arrays of arrays.
    • Bigarrays can only contain integers and floating-point numbers, while OCaml arrays can contain arbitrary OCaml data types.
    • Bigarrays provide more space-efficient storage of integer and floating-point elements than normal OCaml arrays, in particular because they support 'small' types such as single-precision floats and 8 and 16-bit integers, in addition to the standard OCaml types of double-precision floats and 32 and 64-bit integers.
    • The memory layout of Bigarrays is entirely compatible with that of arrays in C and Fortran, allowing large arrays to be passed back and forth between OCaml code and C / Fortran code with no data copying at all.
    • Bigarrays support interesting high-level operations that normal arrays do not provide efficiently, such as extracting sub-arrays and 'slicing' a multi-dimensional array along certain dimensions, all without any copying.

    Users of this module are encouraged to do open Bigarray in their source, then refer to array types and operations via short dot notation, e.g. Array1.t or Array2.sub.

    Bigarrays support all the OCaml ad-hoc polymorphic operations:

    Element kinds

    Bigarrays can contain elements of the following kinds:

    Each element kind is represented at the type level by one of the *_elt types defined below (defined with a single constructor instead of abstract types for technical injectivity reasons).

    • since 4.07 Moved from otherlibs to stdlib.
    type float32_elt =
    1. | Float32_elt
    type float64_elt =
    1. | Float64_elt
    type int8_signed_elt =
    1. | Int8_signed_elt
    type int8_unsigned_elt =
    1. | Int8_unsigned_elt
    type int16_signed_elt =
    1. | Int16_signed_elt
    type int16_unsigned_elt =
    1. | Int16_unsigned_elt
    type int32_elt =
    1. | Int32_elt
    type int64_elt =
    1. | Int64_elt
    type int_elt =
    1. | Int_elt
    type nativeint_elt =
    1. | Nativeint_elt
    type complex32_elt =
    1. | Complex32_elt
    type complex64_elt =
    1. | Complex64_elt
    type ('a, 'b) kind =
    1. | Float32 : (float, float32_elt) kind
    2. | Float64 : (float, float64_elt) kind
    3. | Int8_signed : (int, int8_signed_elt) kind
    4. | Int8_unsigned : (int, int8_unsigned_elt) kind
    5. | Int16_signed : (int, int16_signed_elt) kind
    6. | Int16_unsigned : (int, int16_unsigned_elt) kind
    7. | Int32 : (int32, int32_elt) kind
    8. | Int64 : (int64, int64_elt) kind
    9. | Int : (int, int_elt) kind
    10. | Nativeint : (nativeint, nativeint_elt) kind
    11. | Complex32 : (Complex.t, complex32_elt) kind
    12. | Complex64 : (Complex.t, complex64_elt) kind
    13. | Char : (char, int8_unsigned_elt) kind

    To each element kind is associated an OCaml type, which is the type of OCaml values that can be stored in the Bigarray or read back from it. This type is not necessarily the same as the type of the array elements proper: for instance, a Bigarray whose elements are of kind float32_elt contains 32-bit single precision floats, but reading or writing one of its elements from OCaml uses the OCaml type float, which is 64-bit double precision floats.

    The GADT type ('a, 'b) kind captures this association of an OCaml type 'a for values read or written in the Bigarray, and of an element kind 'b which represents the actual contents of the Bigarray. Its constructors list all possible associations of OCaml types with element kinds, and are re-exported below for backward-compatibility reasons.

    Using a generalized algebraic datatype (GADT) here allows writing well-typed polymorphic functions whose return type depend on the argument type, such as:

      let zero : type a b. (a, b) kind -> a = function
    +    | Float32 -> 0.0 | Complex32 -> Complex.zero
    +    | Float64 -> 0.0 | Complex64 -> Complex.zero
    +    | Int8_signed -> 0 | Int8_unsigned -> 0
    +    | Int16_signed -> 0 | Int16_unsigned -> 0
    +    | Int32 -> 0l | Int64 -> 0L
    +    | Int -> 0 | Nativeint -> 0n
    +    | Char -> '\000'
    val float32 : (float, float32_elt) kind
    val float64 : (float, float64_elt) kind
    val complex32 : (Complex.t, complex32_elt) kind
    val complex64 : (Complex.t, complex64_elt) kind
    val int8_signed : (int, int8_signed_elt) kind
    val int8_unsigned : (int, int8_unsigned_elt) kind
    val int16_signed : (int, int16_signed_elt) kind
    val int16_unsigned : (int, int16_unsigned_elt) kind
    val int : (int, int_elt) kind
    val int32 : (int32, int32_elt) kind
    val int64 : (int64, int64_elt) kind
    val nativeint : (nativeint, nativeint_elt) kind
    val char : (char, int8_unsigned_elt) kind

    As shown by the types of the values above, Bigarrays of kind float32_elt and float64_elt are accessed using the OCaml type float. Bigarrays of complex kinds complex32_elt, complex64_elt are accessed with the OCaml type Complex.t. Bigarrays of integer kinds are accessed using the smallest OCaml integer type large enough to represent the array elements: int for 8- and 16-bit integer Bigarrays, as well as OCaml-integer Bigarrays; int32 for 32-bit integer Bigarrays; int64 for 64-bit integer Bigarrays; and nativeint for platform-native integer Bigarrays. Finally, Bigarrays of kind int8_unsigned_elt can also be accessed as arrays of characters instead of arrays of small integers, by using the kind value char instead of int8_unsigned.

    val kind_size_in_bytes : ('a, 'b) kind -> int

    kind_size_in_bytes k is the number of bytes used to store an element of type k.

    • since 4.03

    Array layouts

    type c_layout =
    1. | C_layout_typ
    type fortran_layout =
    1. | Fortran_layout_typ

    To facilitate interoperability with existing C and Fortran code, this library supports two different memory layouts for Bigarrays, one compatible with the C conventions, the other compatible with the Fortran conventions.

    In the C-style layout, array indices start at 0, and multi-dimensional arrays are laid out in row-major format. That is, for a two-dimensional array, all elements of row 0 are contiguous in memory, followed by all elements of row 1, etc. In other terms, the array elements at (x,y) and (x, y+1) are adjacent in memory.

    In the Fortran-style layout, array indices start at 1, and multi-dimensional arrays are laid out in column-major format. That is, for a two-dimensional array, all elements of column 0 are contiguous in memory, followed by all elements of column 1, etc. In other terms, the array elements at (x,y) and (x+1, y) are adjacent in memory.

    Each layout style is identified at the type level by the phantom types Bigarray.c_layout and Bigarray.fortran_layout respectively.

    Supported layouts

    The GADT type 'a layout represents one of the two supported memory layouts: C-style or Fortran-style. Its constructors are re-exported as values below for backward-compatibility reasons.

    type 'a layout =
    1. | C_layout : c_layout layout
    2. | Fortran_layout : fortran_layout layout
    val c_layout : c_layout layout
    val fortran_layout : fortran_layout layout

    Generic arrays (of arbitrarily many dimensions)

    module Genarray : sig ... end

    Zero-dimensional arrays

    module Array0 : sig ... end

    Zero-dimensional arrays. The Array0 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of zero-dimensional arrays that only contain a single scalar value. Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    One-dimensional arrays

    module Array1 : sig ... end

    One-dimensional arrays. The Array1 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of one-dimensional arrays. (The Array2 and Array3 structures below provide operations specialized for two- and three-dimensional arrays.) Statically knowing the number of dimensions of the array allows faster operations, and more precise static type-checking.

    Two-dimensional arrays

    module Array2 : sig ... end

    Two-dimensional arrays. The Array2 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of two-dimensional arrays.

    Three-dimensional arrays

    module Array3 : sig ... end

    Three-dimensional arrays. The Array3 structure provides operations similar to those of Bigarray.Genarray, but specialized to the case of three-dimensional arrays.

    Coercions between generic Bigarrays and fixed-dimension Bigarrays

    val genarray_of_array0 : ('a, 'b, 'c) Array0.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given zero-dimensional Bigarray.

    • since 4.05
    val genarray_of_array1 : ('a, 'b, 'c) Array1.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given one-dimensional Bigarray.

    val genarray_of_array2 : ('a, 'b, 'c) Array2.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given two-dimensional Bigarray.

    val genarray_of_array3 : ('a, 'b, 'c) Array3.t -> ('a, 'b, 'c) Genarray.t

    Return the generic Bigarray corresponding to the given three-dimensional Bigarray.

    val array0_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

    Return the zero-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly zero dimension.

    • since 4.05
    val array1_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array1.t

    Return the one-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly one dimension.

    val array2_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array2.t

    Return the two-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly two dimensions.

    val array3_of_genarray : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array3.t

    Return the three-dimensional Bigarray corresponding to the given generic Bigarray.

    • raises Invalid_argument

      if the generic Bigarray does not have exactly three dimensions.

    Re-shaping Bigarrays

    val reshape : ('a, 'b, 'c) Genarray.t -> int array -> ('a, 'b, 'c) Genarray.t

    reshape b [|d1;...;dN|] converts the Bigarray b to a N-dimensional array of dimensions d1...dN. The returned array and the original array b share their data and have the same layout. For instance, assuming that b is a one-dimensional array of dimension 12, reshape b [|3;4|] returns a two-dimensional array b' of dimensions 3 and 4. If b has C layout, the element (x,y) of b' corresponds to the element x * 3 + y of b. If b has Fortran layout, the element (x,y) of b' corresponds to the element x + (y - 1) * 4 of b. The returned Bigarray must have exactly the same number of elements as the original Bigarray b. That is, the product of the dimensions of b must be equal to i1 * ... * iN. Otherwise, Invalid_argument is raised.

    val reshape_0 : ('a, 'b, 'c) Genarray.t -> ('a, 'b, 'c) Array0.t

    Specialized version of Bigarray.reshape for reshaping to zero-dimensional arrays.

    • since 4.05
    val reshape_1 : ('a, 'b, 'c) Genarray.t -> int -> ('a, 'b, 'c) Array1.t

    Specialized version of Bigarray.reshape for reshaping to one-dimensional arrays.

    val reshape_2 : ('a, 'b, 'c) Genarray.t -> int -> int -> ('a, 'b, 'c) Array2.t

    Specialized version of Bigarray.reshape for reshaping to two-dimensional arrays.

    val reshape_3 : ('a, 'b, 'c) Genarray.t -> int -> int -> @@ -21,4 +21,4 @@ let d2 = Domain.spawn (update (fun x -> 2 * x + 1) a) let () = Domain.join d1; Domain.join d2

    After executing this code, each field of the bigarray a is either 2, 3, 4 or 5. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of the bigarray, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same bigarray element without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the bigarray elements.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains.

    Tearing

    Bigarrays have a distinct caveat in the presence of data races: concurrent bigarray operations might produce surprising values due to tearing. More precisely, the interleaving of partial writes and reads might create values that would not exist with a sequential execution. For instance, at the end of

    let res = Array1.init Complex64 c_layout size (fun _ -> Complex.zero)
     let d1 = Domain.spawn (fun () -> Array1.fill res Complex.one)
     let d2 = Domain.spawn (fun () -> Array1.fill res Complex.i)
    -let () = Domain.join d1; Domain.join d2

    the res bigarray might contain values that are neither Complex.i nor Complex.one (for instance 1 + i).

    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the res bigarray might contain values that are neither Complex.i nor Complex.one (for instance 1 + i).

    diff --git a/ocaml/Stdlib/Bool/index.html b/ocaml/Stdlib/Bool/index.html index 002c5ea..3b573c3 100644 --- a/ocaml/Stdlib/Bool/index.html +++ b/ocaml/Stdlib/Bool/index.html @@ -1,2 +1,2 @@ -Bool (ocaml.Stdlib.Bool)

    Module Stdlib.Bool

    Boolean values.

    • since 4.08

    Booleans

    type t = bool =
    1. | false
    2. | true

    The type of booleans (truth values).

    The constructors false and true are included here so that they have paths, but they are not intended to be used in user-defined data types.

    val not : bool -> bool

    not b is the boolean negation of b.

    val (&&) : bool -> bool -> bool

    e0 && e1 is the lazy boolean conjunction of expressions e0 and e1. If e0 evaluates to false, e1 is not evaluated. Right-associative operator at precedence level 3/11.

    val (||) : bool -> bool -> bool

    e0 || e1 is the lazy boolean disjunction of expressions e0 and e1. If e0 evaluates to true, e1 is not evaluated. Right-associative operator at precedence level 2/11.

    Predicates and comparisons

    val equal : bool -> bool -> bool

    equal b0 b1 is true if and only if b0 and b1 are both true or both false.

    val compare : bool -> bool -> int

    compare b0 b1 is a total order on boolean values. false is smaller than true.

    Converting

    val to_int : bool -> int

    to_int b is 0 if b is false and 1 if b is true.

    val to_float : bool -> float

    to_float b is 0. if b is false and 1. if b is true.

    val to_string : bool -> string

    to_string b is "true" if b is true and "false" if b is false.

    val seeded_hash : int -> bool -> int

    A seeded hash function for booleans, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : bool -> int

    An unseeded hash function for booleans, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Bool (ocaml.Stdlib.Bool)

    Module Stdlib.Bool

    Boolean values.

    • since 4.08

    Booleans

    type t = bool =
    1. | false
    2. | true

    The type of booleans (truth values).

    The constructors false and true are included here so that they have paths, but they are not intended to be used in user-defined data types.

    val not : bool -> bool

    not b is the boolean negation of b.

    val (&&) : bool -> bool -> bool

    e0 && e1 is the lazy boolean conjunction of expressions e0 and e1. If e0 evaluates to false, e1 is not evaluated. Right-associative operator at precedence level 3/11.

    val (||) : bool -> bool -> bool

    e0 || e1 is the lazy boolean disjunction of expressions e0 and e1. If e0 evaluates to true, e1 is not evaluated. Right-associative operator at precedence level 2/11.

    Predicates and comparisons

    val equal : bool -> bool -> bool

    equal b0 b1 is true if and only if b0 and b1 are both true or both false.

    val compare : bool -> bool -> int

    compare b0 b1 is a total order on boolean values. false is smaller than true.

    Converting

    val to_int : bool -> int

    to_int b is 0 if b is false and 1 if b is true.

    val to_float : bool -> float

    to_float b is 0. if b is false and 1. if b is true.

    val to_string : bool -> string

    to_string b is "true" if b is true and "false" if b is false.

    val seeded_hash : int -> bool -> int

    A seeded hash function for booleans, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : bool -> int

    An unseeded hash function for booleans, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/Buffer/index.html b/ocaml/Stdlib/Buffer/index.html index b702ca6..8033606 100644 --- a/ocaml/Stdlib/Buffer/index.html +++ b/ocaml/Stdlib/Buffer/index.html @@ -1,5 +1,6 @@ -Buffer (ocaml.Stdlib.Buffer)

    Module Stdlib.Buffer

    Extensible buffers.

    This module implements buffers that automatically expand as necessary. It provides accumulative concatenation of strings in linear time (instead of quadratic time when strings are concatenated pairwise). For example:

    let concat_strings ss =
    -  let b = Buffer.create 16 in
    -    List.iter (Buffer.add_string b) ss;
    -    Buffer.contents b

    Unsynchronized accesses

    Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

    type t

    The abstract type of buffers.

    val create : int -> t

    create n returns a fresh buffer, initially empty. The n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than n characters are stored in the buffer, but shrinks back to n characters when reset is called. For best performance, n should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer (for instance, 80 for a buffer that holds one output line). Nothing bad will happen if the buffer grows beyond that limit, however. In doubt, take n = 16 for instance. If n is not between 1 and Sys.max_string_length, it will be clipped to that interval.

    val contents : t -> string

    Return a copy of the current contents of the buffer. The buffer itself is unchanged.

    val to_bytes : t -> bytes

    Return a copy of the current contents of the buffer. The buffer itself is unchanged.

    • since 4.02
    val sub : t -> int -> int -> string

    Buffer.sub b off len returns a copy of len bytes from the current contents of the buffer b, starting at offset off.

    • raises Invalid_argument

      if off and len do not designate a valid range of b.

    val blit : t -> int -> bytes -> int -> int -> unit

    Buffer.blit src srcoff dst dstoff len copies len characters from the current contents of the buffer src, starting at offset srcoff to dst, starting at character dstoff.

    • raises Invalid_argument

      if srcoff and len do not designate a valid range of src, or if dstoff and len do not designate a valid range of dst.

    • since 3.11.2
    val nth : t -> int -> char

    Get the n-th character of the buffer.

    • raises Invalid_argument

      if index out of bounds

    val length : t -> int

    Return the number of characters currently contained in the buffer.

    val clear : t -> unit

    Empty the buffer.

    val reset : t -> unit

    Empty the buffer and deallocate the internal byte sequence holding the buffer contents, replacing it with the initial internal byte sequence of length n that was allocated by Buffer.create n. For long-lived buffers that may have grown a lot, reset allows faster reclamation of the space used by the buffer.

    val output_buffer : out_channel -> t -> unit

    output_buffer oc b writes the current contents of buffer b on the output channel oc.

    val truncate : t -> int -> unit

    truncate b len truncates the length of b to len Note: the internal byte sequence is not shortened.

    • raises Invalid_argument

      if len < 0 or len > length b.

    • since 4.05

    Appending

    Note: all add_* operations can raise Failure if the internal byte sequence of the buffer would need to grow beyond Sys.max_string_length.

    val add_char : t -> char -> unit

    add_char b c appends the character c at the end of buffer b.

    val add_utf_8_uchar : t -> Uchar.t -> unit

    add_utf_8_uchar b u appends the UTF-8 encoding of u at the end of buffer b.

    • since 4.06
    val add_utf_16le_uchar : t -> Uchar.t -> unit

    add_utf_16le_uchar b u appends the UTF-16LE encoding of u at the end of buffer b.

    • since 4.06
    val add_utf_16be_uchar : t -> Uchar.t -> unit

    add_utf_16be_uchar b u appends the UTF-16BE encoding of u at the end of buffer b.

    • since 4.06
    val add_string : t -> string -> unit

    add_string b s appends the string s at the end of buffer b.

    val add_bytes : t -> bytes -> unit

    add_bytes b s appends the byte sequence s at the end of buffer b.

    • since 4.02
    val add_substring : t -> string -> int -> int -> unit

    add_substring b s ofs len takes len characters from offset ofs in string s and appends them at the end of buffer b.

    • raises Invalid_argument

      if ofs and len do not designate a valid range of s.

    val add_subbytes : t -> bytes -> int -> int -> unit

    add_subbytes b s ofs len takes len characters from offset ofs in byte sequence s and appends them at the end of buffer b.

    • raises Invalid_argument

      if ofs and len do not designate a valid range of s.

    • since 4.02
    val add_substitute : t -> (string -> string) -> string -> unit

    add_substitute b f s appends the string pattern s at the end of buffer b with substitution. The substitution process looks for variables into the pattern and substitutes each variable name by its value, as obtained by applying the mapping f to the variable name. Inside the string pattern, a variable name immediately follows a non-escaped $ character and is one of the following:

    • a non empty sequence of alphanumeric or _ characters,
    • an arbitrary sequence of characters enclosed by a pair of matching parentheses or curly brackets. An escaped $ character is a $ that immediately follows a backslash character; it then stands for a plain $.
    • raises Not_found

      if the closing character of a parenthesized variable cannot be found.

    val add_buffer : t -> t -> unit

    add_buffer b1 b2 appends the current contents of buffer b2 at the end of buffer b1. b2 is not modified.

    val add_channel : t -> in_channel -> int -> unit

    add_channel b ic n reads at most n characters from the input channel ic and stores them at the end of buffer b.

    • raises End_of_file

      if the channel contains fewer than n characters. In this case, the characters are still added to the buffer, so as to avoid loss of data.

    • raises Invalid_argument

      if len < 0 or len > Sys.max_string_length.

    Buffers and Sequences

    val to_seq : t -> char Seq.t

    Iterate on the buffer, in increasing order.

    The behavior is not specified if the buffer is modified during iteration.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the buffer, in increasing order, yielding indices along chars.

    The behavior is not specified if the buffer is modified during iteration.

    • since 4.07
    val add_seq : t -> char Seq.t -> unit

    Add chars to the buffer

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a buffer from the generator

    • since 4.07

    Binary encoding of integers

    The functions in this section append binary encodings of integers to buffers.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. Functions that encode these values truncate their inputs to their least significant bytes.

    val add_uint8 : t -> int -> unit

    add_uint8 b i appends a binary unsigned 8-bit integer i to b.

    • since 4.08
    val add_int8 : t -> int -> unit

    add_int8 b i appends a binary signed 8-bit integer i to b.

    • since 4.08
    val add_uint16_ne : t -> int -> unit

    add_uint16_ne b i appends a binary native-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_uint16_be : t -> int -> unit

    add_uint16_be b i appends a binary big-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_uint16_le : t -> int -> unit

    add_uint16_le b i appends a binary little-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_int16_ne : t -> int -> unit

    add_int16_ne b i appends a binary native-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int16_be : t -> int -> unit

    add_int16_be b i appends a binary big-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int16_le : t -> int -> unit

    add_int16_le b i appends a binary little-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int32_ne : t -> int32 -> unit

    add_int32_ne b i appends a binary native-endian 32-bit integer i to b.

    • since 4.08
    val add_int32_be : t -> int32 -> unit

    add_int32_be b i appends a binary big-endian 32-bit integer i to b.

    • since 4.08
    val add_int32_le : t -> int32 -> unit

    add_int32_le b i appends a binary little-endian 32-bit integer i to b.

    • since 4.08
    val add_int64_ne : t -> int64 -> unit

    add_int64_ne b i appends a binary native-endian 64-bit integer i to b.

    • since 4.08
    val add_int64_be : t -> int64 -> unit

    add_int64_be b i appends a binary big-endian 64-bit integer i to b.

    • since 4.08
    val add_int64_le : t -> int64 -> unit

    add_int64_ne b i appends a binary little-endian 64-bit integer i to b.

    • since 4.08
    \ No newline at end of file +Buffer (ocaml.Stdlib.Buffer)

    Module Stdlib.Buffer

    Extensible buffers.

    This module implements buffers that automatically expand as necessary. It provides accumulative concatenation of strings in linear time (instead of quadratic time when strings are concatenated pairwise). For example:

         let concat_strings ss =
    +       let b = Buffer.create 16 in
    +         List.iter (Buffer.add_string b) ss;
    +         Buffer.contents b
    +

    Unsynchronized accesses

    Unsynchronized accesses to a buffer may lead to an invalid buffer state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

    type t

    The abstract type of buffers.

    val create : int -> t

    create n returns a fresh buffer, initially empty. The n parameter is the initial size of the internal byte sequence that holds the buffer contents. That byte sequence is automatically reallocated when more than n characters are stored in the buffer, but shrinks back to n characters when reset is called. For best performance, n should be of the same order of magnitude as the number of characters that are expected to be stored in the buffer (for instance, 80 for a buffer that holds one output line). Nothing bad will happen if the buffer grows beyond that limit, however. In doubt, take n = 16 for instance. If n is not between 1 and Sys.max_string_length, it will be clipped to that interval.

    val contents : t -> string

    Return a copy of the current contents of the buffer. The buffer itself is unchanged.

    val to_bytes : t -> bytes

    Return a copy of the current contents of the buffer. The buffer itself is unchanged.

    • since 4.02
    val sub : t -> int -> int -> string

    Buffer.sub b off len returns a copy of len bytes from the current contents of the buffer b, starting at offset off.

    val blit : t -> int -> bytes -> int -> int -> unit

    Buffer.blit src srcoff dst dstoff len copies len characters from the current contents of the buffer src, starting at offset srcoff to dst, starting at character dstoff.

    • raises Invalid_argument

      if srcoff and len do not designate a valid range of src, or if dstoff and len do not designate a valid range of dst.

    • since 3.11.2
    val nth : t -> int -> char

    Get the n-th character of the buffer.

    val length : t -> int

    Return the number of characters currently contained in the buffer.

    val clear : t -> unit

    Empty the buffer.

    val reset : t -> unit

    Empty the buffer and deallocate the internal byte sequence holding the buffer contents, replacing it with the initial internal byte sequence of length n that was allocated by Buffer.create n. For long-lived buffers that may have grown a lot, reset allows faster reclamation of the space used by the buffer.

    val output_buffer : out_channel -> t -> unit

    output_buffer oc b writes the current contents of buffer b on the output channel oc.

    val truncate : t -> int -> unit

    truncate b len truncates the length of b to len Note: the internal byte sequence is not shortened.

    • since 4.05

    Appending

    Note: all add_* operations can raise Failure if the internal byte sequence of the buffer would need to grow beyond Sys.max_string_length.

    val add_char : t -> char -> unit

    add_char b c appends the character c at the end of buffer b.

    val add_utf_8_uchar : t -> Uchar.t -> unit

    add_utf_8_uchar b u appends the UTF-8 encoding of u at the end of buffer b.

    • since 4.06
    val add_utf_16le_uchar : t -> Uchar.t -> unit

    add_utf_16le_uchar b u appends the UTF-16LE encoding of u at the end of buffer b.

    • since 4.06
    val add_utf_16be_uchar : t -> Uchar.t -> unit

    add_utf_16be_uchar b u appends the UTF-16BE encoding of u at the end of buffer b.

    • since 4.06
    val add_string : t -> string -> unit

    add_string b s appends the string s at the end of buffer b.

    val add_bytes : t -> bytes -> unit

    add_bytes b s appends the byte sequence s at the end of buffer b.

    • since 4.02
    val add_substring : t -> string -> int -> int -> unit

    add_substring b s ofs len takes len characters from offset ofs in string s and appends them at the end of buffer b.

    val add_subbytes : t -> bytes -> int -> int -> unit

    add_subbytes b s ofs len takes len characters from offset ofs in byte sequence s and appends them at the end of buffer b.

    • since 4.02
    val add_substitute : t -> (string -> string) -> string -> unit

    add_substitute b f s appends the string pattern s at the end of buffer b with substitution. The substitution process looks for variables into the pattern and substitutes each variable name by its value, as obtained by applying the mapping f to the variable name. Inside the string pattern, a variable name immediately follows a non-escaped $ character and is one of the following:

    • a non empty sequence of alphanumeric or _ characters,
    • an arbitrary sequence of characters enclosed by a pair of matching parentheses or curly brackets. An escaped $ character is a $ that immediately follows a backslash character; it then stands for a plain $.
    • raises Not_found

      if the closing character of a parenthesized variable cannot be found.

    val add_buffer : t -> t -> unit

    add_buffer b1 b2 appends the current contents of buffer b2 at the end of buffer b1. b2 is not modified.

    val add_channel : t -> in_channel -> int -> unit

    add_channel b ic n reads at most n characters from the input channel ic and stores them at the end of buffer b.

    • raises End_of_file

      if the channel contains fewer than n characters. In this case, the characters are still added to the buffer, so as to avoid loss of data.

    Buffers and Sequences

    val to_seq : t -> char Seq.t

    Iterate on the buffer, in increasing order.

    The behavior is not specified if the buffer is modified during iteration.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the buffer, in increasing order, yielding indices along chars.

    The behavior is not specified if the buffer is modified during iteration.

    • since 4.07
    val add_seq : t -> char Seq.t -> unit

    Add chars to the buffer

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a buffer from the generator

    • since 4.07

    Binary encoding of integers

    The functions in this section append binary encodings of integers to buffers.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. Functions that encode these values truncate their inputs to their least significant bytes.

    val add_uint8 : t -> int -> unit

    add_uint8 b i appends a binary unsigned 8-bit integer i to b.

    • since 4.08
    val add_int8 : t -> int -> unit

    add_int8 b i appends a binary signed 8-bit integer i to b.

    • since 4.08
    val add_uint16_ne : t -> int -> unit

    add_uint16_ne b i appends a binary native-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_uint16_be : t -> int -> unit

    add_uint16_be b i appends a binary big-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_uint16_le : t -> int -> unit

    add_uint16_le b i appends a binary little-endian unsigned 16-bit integer i to b.

    • since 4.08
    val add_int16_ne : t -> int -> unit

    add_int16_ne b i appends a binary native-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int16_be : t -> int -> unit

    add_int16_be b i appends a binary big-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int16_le : t -> int -> unit

    add_int16_le b i appends a binary little-endian signed 16-bit integer i to b.

    • since 4.08
    val add_int32_ne : t -> int32 -> unit

    add_int32_ne b i appends a binary native-endian 32-bit integer i to b.

    • since 4.08
    val add_int32_be : t -> int32 -> unit

    add_int32_be b i appends a binary big-endian 32-bit integer i to b.

    • since 4.08
    val add_int32_le : t -> int32 -> unit

    add_int32_le b i appends a binary little-endian 32-bit integer i to b.

    • since 4.08
    val add_int64_ne : t -> int64 -> unit

    add_int64_ne b i appends a binary native-endian 64-bit integer i to b.

    • since 4.08
    val add_int64_be : t -> int64 -> unit

    add_int64_be b i appends a binary big-endian 64-bit integer i to b.

    • since 4.08
    val add_int64_le : t -> int64 -> unit

    add_int64_ne b i appends a binary little-endian 64-bit integer i to b.

    • since 4.08
    diff --git a/ocaml/Stdlib/Bytes/index.html b/ocaml/Stdlib/Bytes/index.html index b4bd80d..0a2386c 100644 --- a/ocaml/Stdlib/Bytes/index.html +++ b/ocaml/Stdlib/Bytes/index.html @@ -1,17 +1,14 @@ -Bytes (ocaml.Stdlib.Bytes)

    Module Stdlib.Bytes

    Byte sequence operations.

    A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

    Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

    Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

    Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

    Bytes are represented by the OCaml type char.

    The labeled version of this module can be used as described in the StdLabels module.

    • since 4.02
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    • raises Invalid_argument

      if n is not a valid index in s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    val init : int -> (int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> int -> int -> bytes

    sub s pos len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val sub_string : bytes -> int -> int -> string

    Same as sub but return a string instead of a byte sequence.

    val extend : bytes -> int -> int -> bytes

    extend s left right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • since 4.05 in BytesLabels
    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies s in place, replacing len characters with c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val blit : bytes -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val blit_string : string -> int -> bytes -> int -> int -> unit

    blit_string src src_pos dst dst_pos len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    • since 4.05 in BytesLabels
    val concat : bytes -> bytes list -> bytes

    concat sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • since 4.05 in BytesLabels
    val iter : (char -> unit) -> bytes -> unit

    iter f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s - (length s - 1)); ().

    val iteri : (int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : (char -> char) -> bytes -> bytes

    map f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : (int -> char -> char) -> bytes -> bytes

    mapi f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : ('acc -> char -> 'acc) -> 'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> bytes -> 'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : (char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : (char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from - s 0 c.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.03 (4.05 in BytesLabels)
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
    +Bytes (ocaml.Stdlib.Bytes)

    Module Stdlib.Bytes

    Byte sequence operations.

    A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

    Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

    Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

    Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

    Bytes are represented by the OCaml type char.

    The labeled version of this module can be used as described in the StdLabels module.

    • since 4.02
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    val init : int -> (int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> int -> int -> bytes

    sub s pos len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    val sub_string : bytes -> int -> int -> string

    Same as sub but return a string instead of a byte sequence.

    val extend : bytes -> int -> int -> bytes

    extend s left right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • since 4.05 in BytesLabels
    val fill : bytes -> int -> int -> char -> unit

    fill s pos len c modifies s in place, replacing len characters with c, starting at pos.

    val blit : bytes -> int -> bytes -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val blit_string : string -> int -> bytes -> int -> int -> unit

    blit_string src src_pos dst dst_pos len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    • since 4.05 in BytesLabels
    val concat : bytes -> bytes list -> bytes

    concat sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • since 4.05 in BytesLabels
    val iter : (char -> unit) -> bytes -> unit

    iter f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s (length s - 1)); ().

    val iteri : (int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : (char -> char) -> bytes -> bytes

    map f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : (int -> char -> char) -> bytes -> bytes

    mapi f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : ('acc -> char -> 'acc) -> 'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> bytes -> 'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : (char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : (char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from s 0 c.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in BytesLabels)
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.03 (4.05 in BytesLabels)
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
       let s = Bytes.create len in
       for i = 0 to len - 1 do Bytes.set s i (f i) done;
       Bytes.unsafe_to_string s

    This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

    Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

    We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

    2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

    let bytes_length (s : bytes) =
       String.length (Bytes.unsafe_to_string s)

    In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

    The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

    val unsafe_of_string : string -> bytes

    Unsafely convert a shared string to a byte sequence that should not be mutated.

    The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

    In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

    For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

    let incorrect = Bytes.unsafe_of_string "hello"
    -let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) - (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
    +let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
     let b = Bytes.make size  ' '
     let update b f ()  =
       Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
     let d1 = Domain.spawn (update b (fun x -> x + 1))
     let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
     let () = Domain.join d1; Domain.join d2

    the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

    After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

    Mixed-size accesses

    Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

    let b = Bytes.make 10 '\000'
    -let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    \ No newline at end of file +let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    diff --git a/ocaml/Stdlib/BytesLabels/index.html b/ocaml/Stdlib/BytesLabels/index.html index 8fdeb79..6286e35 100644 --- a/ocaml/Stdlib/BytesLabels/index.html +++ b/ocaml/Stdlib/BytesLabels/index.html @@ -1,29 +1,26 @@ -BytesLabels (ocaml.Stdlib.BytesLabels)

    Module Stdlib.BytesLabels

    Byte sequence operations.

    A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

    Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

    Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

    Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

    Bytes are represented by the OCaml type char.

    The labeled version of this module can be used as described in the StdLabels module.

    • since 4.02
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    • raises Invalid_argument

      if n is not a valid index in s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    val init : int -> f:(int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> pos:int -> len:int -> bytes

    sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val sub_string : bytes -> pos:int -> len:int -> string

    Same as sub but return a string instead of a byte sequence.

    val extend : bytes -> left:int -> right:int -> bytes

    extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • since 4.05 in BytesLabels
    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val blit : - src:bytes -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val blit_string : - src:string -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    blit_string ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    • since 4.05 in BytesLabels
    val concat : sep:bytes -> bytes list -> bytes

    concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • since 4.05 in BytesLabels
    val iter : f:(char -> unit) -> bytes -> unit

    iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s - (length s - 1)); ().

    val iteri : f:(int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : f:(char -> char) -> bytes -> bytes

    map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : f:(int -> char -> char) -> bytes -> bytes

    mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : f:(char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from - s 0 c.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.05
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
    +BytesLabels (ocaml.Stdlib.BytesLabels)

    Module Stdlib.BytesLabels

    Byte sequence operations.

    A byte sequence is a mutable data structure that contains a fixed-length sequence of bytes. Each byte can be indexed in constant time for reading or writing.

    Given a byte sequence s of length l, we can access each of the l bytes of s via its index in the sequence. Indexes start at 0, and we will call an index valid in s if it falls within the range [0...l-1] (inclusive). A position is the point between two bytes or at the beginning or end of the sequence. We call a position valid in s if it falls within the range [0...l] (inclusive). Note that the byte at index n is between positions n and n+1.

    Two parameters start and len are said to designate a valid range of s if len >= 0 and start and start+len are valid positions in s.

    Byte sequences can be modified in place, for instance via the set and blit functions described below. See also strings (module String), which are almost the same data structure, but cannot be modified in place.

    Bytes are represented by the OCaml type char.

    The labeled version of this module can be used as described in the StdLabels module.

    • since 4.02
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    val init : int -> f:(int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> pos:int -> len:int -> bytes

    sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    val sub_string : bytes -> pos:int -> len:int -> string

    Same as sub but return a string instead of a byte sequence.

    val extend : bytes -> left:int -> right:int -> bytes

    extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • since 4.05 in BytesLabels
    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

    val blit : + src:bytes -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val blit_string : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    blit_string ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from string src, starting at index src_pos, to byte sequence dst, starting at index dst_pos.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    • since 4.05 in BytesLabels
    val concat : sep:bytes -> bytes list -> bytes

    concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • since 4.05 in BytesLabels
    val iter : f:(char -> unit) -> bytes -> unit

    iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s (length s - 1)); ().

    val iteri : f:(int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : f:(char -> char) -> bytes -> bytes

    map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : f:(int -> char -> char) -> bytes -> bytes

    mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : f:(char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from s 0 c.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.05
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
       let s = Bytes.create len in
       for i = 0 to len - 1 do Bytes.set s i (f i) done;
       Bytes.unsafe_to_string s

    This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

    Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

    We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

    2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

    let bytes_length (s : bytes) =
       String.length (Bytes.unsafe_to_string s)

    In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

    The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

    val unsafe_of_string : string -> bytes

    Unsafely convert a shared string to a byte sequence that should not be mutated.

    The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

    In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

    For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

    let incorrect = Bytes.unsafe_of_string "hello"
    -let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : sep:char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) - (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
    +let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : sep:char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
     let b = Bytes.make size  ' '
     let update b f ()  =
       Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
     let d1 = Domain.spawn (update b (fun x -> x + 1))
     let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
     let () = Domain.join d1; Domain.join d2

    the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

    After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

    Mixed-size accesses

    Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

    let b = Bytes.make 10 '\000'
    -let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    \ No newline at end of file +let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    diff --git a/ocaml/Stdlib/Callback/index.html b/ocaml/Stdlib/Callback/index.html index 1cf16cd..d53f931 100644 --- a/ocaml/Stdlib/Callback/index.html +++ b/ocaml/Stdlib/Callback/index.html @@ -1,2 +1,2 @@ -Callback (ocaml.Stdlib.Callback)

    Module Stdlib.Callback

    Registering OCaml values with the C runtime.

    This module allows OCaml values to be registered with the C runtime under a symbolic name, so that C code can later call back registered OCaml functions, or raise registered OCaml exceptions.

    val register : string -> 'a -> unit

    Callback.register n v registers the value v under the name n. C code can later retrieve a handle to v by calling caml_named_value(n).

    val register_exception : string -> exn -> unit

    Callback.register_exception n exn registers the exception contained in the exception value exn under the name n. C code can later retrieve a handle to the exception by calling caml_named_value(n). The exception value thus obtained is suitable for passing as first argument to raise_constant or raise_with_arg.

    \ No newline at end of file +Callback (ocaml.Stdlib.Callback)

    Module Stdlib.Callback

    Registering OCaml values with the C runtime.

    This module allows OCaml values to be registered with the C runtime under a symbolic name, so that C code can later call back registered OCaml functions, or raise registered OCaml exceptions.

    val register : string -> 'a -> unit

    Callback.register n v registers the value v under the name n. C code can later retrieve a handle to v by calling caml_named_value(n).

    val register_exception : string -> exn -> unit

    Callback.register_exception n exn registers the exception contained in the exception value exn under the name n. C code can later retrieve a handle to the exception by calling caml_named_value(n). The exception value thus obtained is suitable for passing as first argument to raise_constant or raise_with_arg.

    diff --git a/ocaml/Stdlib/Char/index.html b/ocaml/Stdlib/Char/index.html index 7c97d2c..357a8b7 100644 --- a/ocaml/Stdlib/Char/index.html +++ b/ocaml/Stdlib/Char/index.html @@ -1,2 +1,2 @@ -Char (ocaml.Stdlib.Char)

    Module Stdlib.Char

    Character operations.

    val code : char -> int

    Return the ASCII code of the argument.

    val chr : int -> char

    Return the character with the given ASCII code.

    • raises Invalid_argument

      if the argument is outside the range 0--255.

    val escaped : char -> string

    Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03
    type t = char

    An alias for the type of characters.

    val compare : t -> t -> int

    The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equal function for chars.

    • since 4.03
    val seeded_hash : int -> t -> int

    A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Char (ocaml.Stdlib.Char)

    Module Stdlib.Char

    Character operations.

    val code : char -> int

    Return the ASCII code of the argument.

    val chr : int -> char

    Return the character with the given ASCII code.

    val escaped : char -> string

    Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03
    type t = char

    An alias for the type of characters.

    val compare : t -> t -> int

    The comparison function for characters, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Char to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equal function for chars.

    • since 4.03
    val seeded_hash : int -> t -> int

    A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/Complex/index.html b/ocaml/Stdlib/Complex/index.html index ff00afa..c62d27e 100644 --- a/ocaml/Stdlib/Complex/index.html +++ b/ocaml/Stdlib/Complex/index.html @@ -1,2 +1,2 @@ -Complex (ocaml.Stdlib.Complex)

    Module Stdlib.Complex

    Complex numbers.

    This module provides arithmetic operations on complex numbers. Complex numbers are represented by their real and imaginary parts (cartesian representation). Each part is represented by a double-precision floating-point number (type float).

    type t = {
    1. re : float;
    2. im : float;
    }

    The type of complex numbers. re is the real part and im the imaginary part.

    val zero : t

    The complex number 0.

    val one : t

    The complex number 1.

    val i : t

    The complex number i.

    val neg : t -> t

    Unary negation.

    val conj : t -> t

    Conjugate: given the complex x + i.y, returns x - i.y.

    val add : t -> t -> t

    Addition

    val sub : t -> t -> t

    Subtraction

    val mul : t -> t -> t

    Multiplication

    val inv : t -> t

    Multiplicative inverse (1/z).

    val div : t -> t -> t

    Division

    val sqrt : t -> t

    Square root. The result x + i.y is such that x > 0 or x = 0 and y >= 0. This function has a discontinuity along the negative real axis.

    val norm2 : t -> float

    Norm squared: given x + i.y, returns x^2 + y^2.

    val norm : t -> float

    Norm: given x + i.y, returns sqrt(x^2 + y^2).

    val arg : t -> float

    Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number. This angle ranges from -pi to pi. This function has a discontinuity along the negative real axis.

    val polar : float -> float -> t

    polar norm arg returns the complex having norm norm and argument arg.

    val exp : t -> t

    Exponentiation. exp z returns e to the z power.

    val log : t -> t

    Natural logarithm (in base e).

    val pow : t -> t -> t

    Power function. pow z1 z2 returns z1 to the z2 power.

    \ No newline at end of file +Complex (ocaml.Stdlib.Complex)

    Module Stdlib.Complex

    Complex numbers.

    This module provides arithmetic operations on complex numbers. Complex numbers are represented by their real and imaginary parts (cartesian representation). Each part is represented by a double-precision floating-point number (type float).

    type t = {
    1. re : float;
    2. im : float;
    }

    The type of complex numbers. re is the real part and im the imaginary part.

    val zero : t

    The complex number 0.

    val one : t

    The complex number 1.

    val i : t

    The complex number i.

    val neg : t -> t

    Unary negation.

    val conj : t -> t

    Conjugate: given the complex x + i.y, returns x - i.y.

    val add : t -> t -> t

    Addition

    val sub : t -> t -> t

    Subtraction

    val mul : t -> t -> t

    Multiplication

    val inv : t -> t

    Multiplicative inverse (1/z).

    val div : t -> t -> t

    Division

    val sqrt : t -> t

    Square root. The result x + i.y is such that x > 0 or x = 0 and y >= 0. This function has a discontinuity along the negative real axis.

    val norm2 : t -> float

    Norm squared: given x + i.y, returns x^2 + y^2.

    val norm : t -> float

    Norm: given x + i.y, returns sqrt(x^2 + y^2).

    val arg : t -> float

    Argument. The argument of a complex number is the angle in the complex plane between the positive real axis and a line passing through zero and the number. This angle ranges from -pi to pi. This function has a discontinuity along the negative real axis.

    val polar : float -> float -> t

    polar norm arg returns the complex having norm norm and argument arg.

    val exp : t -> t

    Exponentiation. exp z returns e to the z power.

    val log : t -> t

    Natural logarithm (in base e).

    val pow : t -> t -> t

    Power function. pow z1 z2 returns z1 to the z2 power.

    diff --git a/ocaml/Stdlib/Condition/index.html b/ocaml/Stdlib/Condition/index.html index 40d3708..fb97240 100644 --- a/ocaml/Stdlib/Condition/index.html +++ b/ocaml/Stdlib/Condition/index.html @@ -1,31 +1,31 @@ -Condition (ocaml.Stdlib.Condition)

    Module Stdlib.Condition

    Condition variables.

    Condition variables are useful when several threads wish to access a shared data structure that is protected by a mutex (a mutual exclusion lock).

    A condition variable is a communication channel. On the receiver side, one or more threads can indicate that they wish to wait for a certain property to become true. On the sender side, a thread can signal that this property has become true, causing one (or more) waiting threads to be woken up.

    For instance, in the implementation of a queue data structure, if a thread that wishes to extract an element finds that the queue is currently empty, then this thread waits for the queue to become nonempty. A thread that inserts an element into the queue signals that the queue has become nonempty. A condition variable is used for this purpose. This communication channel conveys the information that the property "the queue is nonempty" is true, or more accurately, may be true. (We explain below why the receiver of a signal cannot be certain that the property holds.)

    To continue the example of the queue, assuming that the queue has a fixed maximum capacity, then a thread that wishes to insert an element may find that the queue is full. Then, this thread must wait for the queue to become not full, and a thread that extracts an element of the queue signals that the queue has become not full. Another condition variable is used for this purpose.

    In short, a condition variable c is used to convey the information that a certain property P about a shared data structure D, protected by a mutex m, may be true.

    Condition variables provide an efficient alternative to busy-waiting. When one wishes to wait for the property P to be true, instead of writing a busy-waiting loop:

    Mutex.lock m;
    -while not P do
    -  Mutex.unlock m; Mutex.lock m
    -done;
    -<update the data structure>;
    -Mutex.unlock m

    one uses wait in the body of the loop, as follows:

    Mutex.lock m;
    -while not P do
    -  Condition.wait c m
    -done;
    -<update the data structure>;
    -Mutex.unlock m

    The busy-waiting loop is inefficient because the waiting thread consumes processing time and creates contention of the mutex m. Calling wait allows the waiting thread to be suspended, so it does not consume any computing resources while waiting.

    With a condition variable c, exactly one mutex m is associated. This association is implicit: the mutex m is not explicitly passed as an argument to create. It is up to the programmer to know, for each condition variable c, which is the associated mutex m.

    With a mutex m, several condition variables can be associated. In the example of the bounded queue, one condition variable is used to indicate that the queue is nonempty, and another condition variable is used to indicate that the queue is not full.

    With a condition variable c, exactly one logical property P should be associated. Examples of such properties include "the queue is nonempty" and "the queue is not full". It is up to the programmer to keep track, for each condition variable, of the corresponding property P. A signal is sent on the condition variable c as an indication that the property P is true, or may be true. On the receiving end, however, a thread that is woken up cannot assume that P is true; after a call to wait terminates, one must explicitly test whether P is true. There are several reasons why this is so. One reason is that, between the moment when the signal is sent and the moment when a waiting thread receives the signal and is scheduled, the property P may be falsified by some other thread that is able to acquire the mutex m and alter the data structure D. Another reason is that spurious wakeups may occur: a waiting thread can be woken up even if no signal was sent.

    Here is a complete example, where a mutex protects a sequential unbounded queue, and where a condition variable is used to signal that the queue is nonempty.

    type 'a safe_queue =
    -  { queue : 'a Queue.t; mutex : Mutex.t; nonempty : Condition.t }
    +Condition (ocaml.Stdlib.Condition)

    Module Stdlib.Condition

    Condition variables.

    Condition variables are useful when several threads wish to access a shared data structure that is protected by a mutex (a mutual exclusion lock).

    A condition variable is a communication channel. On the receiver side, one or more threads can indicate that they wish to wait for a certain property to become true. On the sender side, a thread can signal that this property has become true, causing one (or more) waiting threads to be woken up.

    For instance, in the implementation of a queue data structure, if a thread that wishes to extract an element finds that the queue is currently empty, then this thread waits for the queue to become nonempty. A thread that inserts an element into the queue signals that the queue has become nonempty. A condition variable is used for this purpose. This communication channel conveys the information that the property "the queue is nonempty" is true, or more accurately, may be true. (We explain below why the receiver of a signal cannot be certain that the property holds.)

    To continue the example of the queue, assuming that the queue has a fixed maximum capacity, then a thread that wishes to insert an element may find that the queue is full. Then, this thread must wait for the queue to become not full, and a thread that extracts an element of the queue signals that the queue has become not full. Another condition variable is used for this purpose.

    In short, a condition variable c is used to convey the information that a certain property P about a shared data structure D, protected by a mutex m, may be true.

    Condition variables provide an efficient alternative to busy-waiting. When one wishes to wait for the property P to be true, instead of writing a busy-waiting loop:

      Mutex.lock m;
    +  while not P do
    +    Mutex.unlock m; Mutex.lock m
    +  done;
    +  <update the data structure>;
    +  Mutex.unlock m

    one uses wait in the body of the loop, as follows:

      Mutex.lock m;
    +  while not P do
    +    Condition.wait c m
    +  done;
    +  <update the data structure>;
    +  Mutex.unlock m

    The busy-waiting loop is inefficient because the waiting thread consumes processing time and creates contention of the mutex m. Calling wait allows the waiting thread to be suspended, so it does not consume any computing resources while waiting.

    With a condition variable c, exactly one mutex m is associated. This association is implicit: the mutex m is not explicitly passed as an argument to create. It is up to the programmer to know, for each condition variable c, which is the associated mutex m.

    With a mutex m, several condition variables can be associated. In the example of the bounded queue, one condition variable is used to indicate that the queue is nonempty, and another condition variable is used to indicate that the queue is not full.

    With a condition variable c, exactly one logical property P should be associated. Examples of such properties include "the queue is nonempty" and "the queue is not full". It is up to the programmer to keep track, for each condition variable, of the corresponding property P. A signal is sent on the condition variable c as an indication that the property P is true, or may be true. On the receiving end, however, a thread that is woken up cannot assume that P is true; after a call to wait terminates, one must explicitly test whether P is true. There are several reasons why this is so. One reason is that, between the moment when the signal is sent and the moment when a waiting thread receives the signal and is scheduled, the property P may be falsified by some other thread that is able to acquire the mutex m and alter the data structure D. Another reason is that spurious wakeups may occur: a waiting thread can be woken up even if no signal was sent.

    Here is a complete example, where a mutex protects a sequential unbounded queue, and where a condition variable is used to signal that the queue is nonempty.

      type 'a safe_queue =
    +    { queue : 'a Queue.t; mutex : Mutex.t; nonempty : Condition.t }
     
    -let create () =
    -  { queue = Queue.create(); mutex = Mutex.create();
    -    nonempty = Condition.create() }
    +  let create () =
    +    { queue = Queue.create(); mutex = Mutex.create();
    +      nonempty = Condition.create() }
     
    -let add v q =
    -  Mutex.lock q.mutex;
    -  let was_empty = Queue.is_empty q.queue in
    -  Queue.add v q.queue;
    -  if was_empty then Condition.broadcast q.nonempty;
    -  Mutex.unlock q.mutex
    +  let add v q =
    +    Mutex.lock q.mutex;
    +    let was_empty = Queue.is_empty q.queue in
    +    Queue.add v q.queue;
    +    if was_empty then Condition.broadcast q.nonempty;
    +    Mutex.unlock q.mutex
     
    -let take q =
    -  Mutex.lock q.mutex;
    -  while Queue.is_empty q.queue do Condition.wait q.nonempty q.mutex done;
    -  let v = Queue.take q.queue in (* cannot fail since queue is nonempty *)
    -  Mutex.unlock q.mutex;
    -  v

    Because the call to broadcast takes place inside the critical section, the following property holds whenever the mutex is unlocked: if the queue is nonempty, then no thread is waiting, or, in other words, if some thread is waiting, then the queue must be empty. This is a desirable property: if a thread that attempts to execute a take operation could remain suspended even though the queue is nonempty, that would be a problematic situation, known as a deadlock.

    type t

    The type of condition variables.

    val create : unit -> t

    create() creates and returns a new condition variable. This condition variable should be associated (in the programmer's mind) with a certain mutex m and with a certain property P of the data structure that is protected by the mutex m.

    val wait : t -> Mutex.t -> unit

    The call wait c m is permitted only if m is the mutex associated with the condition variable c, and only if m is currently locked. This call atomically unlocks the mutex m and suspends the current thread on the condition variable c. This thread can later be woken up after the condition variable c has been signaled via signal or broadcast; however, it can also be woken up for no reason. The mutex m is locked again before wait returns. One cannot assume that the property P associated with the condition variable c holds when wait returns; one must explicitly test whether P holds after calling wait.

    val signal : t -> unit

    signal c wakes up one of the threads waiting on the condition variable c, if there is one. If there is none, this call has no effect.

    It is recommended to call signal c inside a critical section, that is, while the mutex m associated with c is locked.

    val broadcast : t -> unit

    broadcast c wakes up all threads waiting on the condition variable c. If there are none, this call has no effect.

    It is recommended to call broadcast c inside a critical section, that is, while the mutex m associated with c is locked.

    \ No newline at end of file + let take q = + Mutex.lock q.mutex; + while Queue.is_empty q.queue do Condition.wait q.nonempty q.mutex done; + let v = Queue.take q.queue in (* cannot fail since queue is nonempty *) + Mutex.unlock q.mutex; + v

    Because the call to broadcast takes place inside the critical section, the following property holds whenever the mutex is unlocked: if the queue is nonempty, then no thread is waiting, or, in other words, if some thread is waiting, then the queue must be empty. This is a desirable property: if a thread that attempts to execute a take operation could remain suspended even though the queue is nonempty, that would be a problematic situation, known as a deadlock.

    type t

    The type of condition variables.

    val create : unit -> t

    create() creates and returns a new condition variable. This condition variable should be associated (in the programmer's mind) with a certain mutex m and with a certain property P of the data structure that is protected by the mutex m.

    val wait : t -> Mutex.t -> unit

    The call wait c m is permitted only if m is the mutex associated with the condition variable c, and only if m is currently locked. This call atomically unlocks the mutex m and suspends the current thread on the condition variable c. This thread can later be woken up after the condition variable c has been signaled via signal or broadcast; however, it can also be woken up for no reason. The mutex m is locked again before wait returns. One cannot assume that the property P associated with the condition variable c holds when wait returns; one must explicitly test whether P holds after calling wait.

    val signal : t -> unit

    signal c wakes up one of the threads waiting on the condition variable c, if there is one. If there is none, this call has no effect.

    It is recommended to call signal c inside a critical section, that is, while the mutex m associated with c is locked.

    val broadcast : t -> unit

    broadcast c wakes up all threads waiting on the condition variable c. If there are none, this call has no effect.

    It is recommended to call broadcast c inside a critical section, that is, while the mutex m associated with c is locked.

    diff --git a/ocaml/Stdlib/Digest/index.html b/ocaml/Stdlib/Digest/index.html index 4bee70c..a6c91f3 100644 --- a/ocaml/Stdlib/Digest/index.html +++ b/ocaml/Stdlib/Digest/index.html @@ -1,2 +1,2 @@ -Digest (ocaml.Stdlib.Digest)

    Module Stdlib.Digest

    MD5 message digest.

    This module provides functions to compute 128-bit 'digests' of arbitrary-length strings or files. The algorithm used is MD5.

    The MD5 hash function is not cryptographically secure. Hence, this module should not be used for security-sensitive applications. More recent, stronger cryptographic primitives should be used instead.

    type t = string

    The type of digests: 16-character strings.

    val compare : t -> t -> int

    The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

    • since 4.00
    val equal : t -> t -> bool

    The equal function for 16-character digest.

    • since 4.03
    val string : string -> t

    Return the digest of the given string.

    val bytes : bytes -> t

    Return the digest of the given byte sequence.

    • since 4.02
    val substring : string -> int -> int -> t

    Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

    val subbytes : bytes -> int -> int -> t

    Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

    • since 4.02
    val channel : in_channel -> int -> t

    If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

    val file : string -> t

    Return the digest of the file whose name is given.

    val output : out_channel -> t -> unit

    Write a digest on the given output channel.

    val input : in_channel -> t

    Read a digest from the given input channel.

    val to_hex : t -> string

    Return the printable hexadecimal representation of the given digest.

    • raises Invalid_argument

      if the argument is not exactly 16 bytes.

    val from_hex : string -> t

    Convert a hexadecimal representation back into the corresponding digest.

    • raises Invalid_argument

      if the argument is not exactly 32 hexadecimal characters.

    • since 4.00
    \ No newline at end of file +Digest (ocaml.Stdlib.Digest)

    Module Stdlib.Digest

    MD5 message digest.

    This module provides functions to compute 128-bit 'digests' of arbitrary-length strings or files. The algorithm used is MD5.

    The MD5 hash function is not cryptographically secure. Hence, this module should not be used for security-sensitive applications. More recent, stronger cryptographic primitives should be used instead.

    type t = string

    The type of digests: 16-character strings.

    val compare : t -> t -> int

    The comparison function for 16-character digest, with the same specification as Stdlib.compare and the implementation shared with String.compare. Along with the type t, this function compare allows the module Digest to be passed as argument to the functors Set.Make and Map.Make.

    • since 4.00
    val equal : t -> t -> bool

    The equal function for 16-character digest.

    • since 4.03
    val string : string -> t

    Return the digest of the given string.

    val bytes : bytes -> t

    Return the digest of the given byte sequence.

    • since 4.02
    val substring : string -> int -> int -> t

    Digest.substring s ofs len returns the digest of the substring of s starting at index ofs and containing len characters.

    val subbytes : bytes -> int -> int -> t

    Digest.subbytes s ofs len returns the digest of the subsequence of s starting at index ofs and containing len bytes.

    • since 4.02
    val channel : in_channel -> int -> t

    If len is nonnegative, Digest.channel ic len reads len characters from channel ic and returns their digest, or raises End_of_file if end-of-file is reached before len characters are read. If len is negative, Digest.channel ic len reads all characters from ic until end-of-file is reached and return their digest.

    val file : string -> t

    Return the digest of the file whose name is given.

    val output : out_channel -> t -> unit

    Write a digest on the given output channel.

    val input : in_channel -> t

    Read a digest from the given input channel.

    val to_hex : t -> string

    Return the printable hexadecimal representation of the given digest.

    val from_hex : string -> t

    Convert a hexadecimal representation back into the corresponding digest.

    • raises Invalid_argument

      if the argument is not exactly 32 hexadecimal characters.

    • since 4.00
    diff --git a/ocaml/Stdlib/Domain/DLS/index.html b/ocaml/Stdlib/Domain/DLS/index.html index 30300f4..01f92b1 100644 --- a/ocaml/Stdlib/Domain/DLS/index.html +++ b/ocaml/Stdlib/Domain/DLS/index.html @@ -1,5 +1,5 @@ -DLS (ocaml.Stdlib.Domain.DLS)

    Module Domain.DLS

    Domain-local Storage

    type 'a key

    Type of a DLS key

    val new_key : ?split_from_parent:('a -> 'a) -> (unit -> 'a) -> 'a key

    new_key f returns a new key bound to initialiser f for accessing , domain-local variables.

    If split_from_parent is not provided, the value for a new domain will be computed on-demand by the new domain: the first get call will call the initializer f and store that value.

    If split_from_parent is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using 'a Lazy.t key:

    let init () = ...
    +DLS (ocaml.Stdlib.Domain.DLS)

    Module Domain.DLS

    Domain-local Storage

    type 'a key

    Type of a DLS key

    val new_key : ?split_from_parent:('a -> 'a) -> (unit -> 'a) -> 'a key

    new_key f returns a new key bound to initialiser f for accessing , domain-local variables.

    If split_from_parent is not provided, the value for a new domain will be computed on-demand by the new domain: the first get call will call the initializer f and store that value.

    If split_from_parent is provided, spawning a domain will derive the child value (for this key) from the parent value. This computation happens in the parent domain and it always happens, regardless of whether the child domain will use it. If the splitting function is expensive or requires child-side computation, consider using 'a Lazy.t key:

    let init () = ...
     
     let split_from_parent parent_value =
       ... parent-side computation ...;
    @@ -9,4 +9,4 @@ let split_from_parent parent_value =
     
     let key = Domain.DLS.new_key ~split_from_parent init
     
    -let get () = Lazy.force (Domain.DLS.get key)

    In this case a part of the computation happens on the child domain; in particular, it can access parent_value concurrently with the parent domain, which may require explicit synchronization to avoid data races.

    val get : 'a key -> 'a

    get k returns v if a value v is associated to the key k on the calling domain's domain-local state. Sets k's value with its initialiser and returns it otherwise.

    val set : 'a key -> 'a -> unit

    set k v updates the calling domain's domain-local state to associate the key k with value v. It overwrites any previous values associated to k, which cannot be restored later.

    \ No newline at end of file +let get () = Lazy.force (Domain.DLS.get key)

    In this case a part of the computation happens on the child domain; in particular, it can access parent_value concurrently with the parent domain, which may require explicit synchronization to avoid data races.

    val get : 'a key -> 'a

    get k returns v if a value v is associated to the key k on the calling domain's domain-local state. Sets k's value with its initialiser and returns it otherwise.

    val set : 'a key -> 'a -> unit

    set k v updates the calling domain's domain-local state to associate the key k with value v. It overwrites any previous values associated to k, which cannot be restored later.

    diff --git a/ocaml/Stdlib/Domain/index.html b/ocaml/Stdlib/Domain/index.html index e30a324..356f0d0 100644 --- a/ocaml/Stdlib/Domain/index.html +++ b/ocaml/Stdlib/Domain/index.html @@ -1,5 +1,5 @@ -Domain (ocaml.Stdlib.Domain)

    Module Stdlib.Domain

    • alert unstable The Domain interface may change in incompatible ways in the future.

    Domains.

    See 'Parallel programming' chapter in the manual.

    • since 5.0
    • alert unstable The Domain interface may change in incompatible ways in the future.
    type !'a t

    A domain of type 'a t runs independently, eventually producing a result of type 'a, or an exception

    val spawn : (unit -> 'a) -> 'a t

    spawn f creates a new domain that runs in parallel with the current domain.

    • raises Failure

      if the program has insufficient resources to create another domain.

    val join : 'a t -> 'a

    join d blocks until domain d runs to completion. If d results in a value, then that is returned by join d. If d raises an uncaught exception, then that is re-raised by join d.

    type id = private int

    Domains have unique integer identifiers

    val get_id : 'a t -> id

    get_id d returns the identifier of the domain d

    val self : unit -> id

    self () is the identifier of the currently running domain

    val before_first_spawn : (unit -> unit) -> unit

    before_first_spawn f registers f to be called before the first domain is spawned by the program. The functions registered with before_first_spawn are called on the main (initial) domain. The functions registered with before_first_spawn are called in 'first in, first out' order: the oldest function added with before_first_spawn is called first.

    • raises Invalid_argument

      if the program has already spawned a domain.

    val at_exit : (unit -> unit) -> unit

    at_exit f registers f to be called when the current domain exits. Note that at_exit callbacks are domain-local and only apply to the calling domain. The registered functions are called in 'last in, first out' order: the function most recently added with at_exit is called first. An example:

    let temp_file_key = Domain.DLS.new_key (fun _ ->
    +Domain (ocaml.Stdlib.Domain)

    Module Stdlib.Domain

    • alert unstable The Domain interface may change in incompatible ways in the future.

    Domains.

    See 'Parallel programming' chapter in the manual.

    • since 5.0
    • alert unstable The Domain interface may change in incompatible ways in the future.
    type !'a t

    A domain of type 'a t runs independently, eventually producing a result of type 'a, or an exception

    val spawn : (unit -> 'a) -> 'a t

    spawn f creates a new domain that runs in parallel with the current domain.

    • raises Failure

      if the program has insufficient resources to create another domain.

    val join : 'a t -> 'a

    join d blocks until domain d runs to completion. If d results in a value, then that is returned by join d. If d raises an uncaught exception, then that is re-raised by join d.

    type id = private int

    Domains have unique integer identifiers

    val get_id : 'a t -> id

    get_id d returns the identifier of the domain d

    val self : unit -> id

    self () is the identifier of the currently running domain

    val before_first_spawn : (unit -> unit) -> unit

    before_first_spawn f registers f to be called before the first domain is spawned by the program. The functions registered with before_first_spawn are called on the main (initial) domain. The functions registered with before_first_spawn are called in 'first in, first out' order: the oldest function added with before_first_spawn is called first.

    val at_exit : (unit -> unit) -> unit

    at_exit f registers f to be called when the current domain exits. Note that at_exit callbacks are domain-local and only apply to the calling domain. The registered functions are called in 'last in, first out' order: the function most recently added with at_exit is called first. An example:

    let temp_file_key = Domain.DLS.new_key (fun _ ->
       let tmp = snd (Filename.open_temp_file "" "") in
       Domain.at_exit (fun () -> close_out_noerr tmp);
    -  tmp)

    The snippet above creates a key that when retrieved for the first time will open a temporary file and register an at_exit callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits.

    val cpu_relax : unit -> unit

    If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures

    val is_main_domain : unit -> bool

    is_main_domain () returns true if called from the initial domain.

    The recommended maximum number of domains which should be running simultaneously (including domains already running).

    The value returned is at least 1.

    module DLS : sig ... end

    Domain-local Storage

    \ No newline at end of file + tmp)

    The snippet above creates a key that when retrieved for the first time will open a temporary file and register an at_exit callback to close it, thus guaranteeing the descriptor is not leaked in case the current domain exits.

    val cpu_relax : unit -> unit

    If busy-waiting, calling cpu_relax () between iterations will improve performance on some CPU architectures

    val is_main_domain : unit -> bool

    is_main_domain () returns true if called from the initial domain.

    The recommended maximum number of domains which should be running simultaneously (including domains already running).

    The value returned is at least 1.

    module DLS : sig ... end

    Domain-local Storage

    diff --git a/ocaml/Stdlib/Effect/Deep/index.html b/ocaml/Stdlib/Effect/Deep/index.html index bc70c19..186ee04 100644 --- a/ocaml/Stdlib/Effect/Deep/index.html +++ b/ocaml/Stdlib/Effect/Deep/index.html @@ -1,6 +1,6 @@ -Deep (ocaml.Stdlib.Effect.Deep)

    Module Effect.Deep

    Deep handlers

    type ('a, 'b) continuation

    ('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

    val continue : ('a, 'b) continuation -> 'a -> 'b

    continue k x resumes the continuation k by passing x to k.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    val discontinue : ('a, 'b) continuation -> exn -> 'b

    discontinue k e resumes the continuation k by raising the exception e in k.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    val discontinue_with_backtrace : +Deep (ocaml.Stdlib.Effect.Deep)

    Module Effect.Deep

    Deep handlers

    type ('a, 'b) continuation

    ('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

    val continue : ('a, 'b) continuation -> 'a -> 'b

    continue k x resumes the continuation k by passing x to k.

    val discontinue : ('a, 'b) continuation -> exn -> 'b

    discontinue k e resumes the continuation k by raising the exception e in k.

    val discontinue_with_backtrace : ('a, 'b) continuation -> exn -> Printexc.raw_backtrace -> - 'b

    discontinue_with_backtrace k e bt resumes the continuation k by raising the exception e in k using bt as the origin for the exception.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    type ('a, 'b) handler = {
    1. retc : 'a -> 'b;
    2. exnc : exn -> 'b;
    3. effc : 'c. 'c t -> (('c, 'b) continuation -> 'b) option;
    }

    ('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

    val match_with : ('c -> 'a) -> 'c -> ('a, 'b) handler -> 'b

    match_with f v h runs the computation f v in the handler h.

    type 'a effect_handler = {
    1. effc : 'b. 'b t -> (('b, 'a) continuation -> 'a) option;
    }

    'a effect_handler is a deep handler with an identity value handler fun x -> x and an exception handler that raises any exception fun e -> raise e.

    val try_with : ('b -> 'a) -> 'b -> 'a effect_handler -> 'a

    try_with f v h runs the computation f v under the handler h.

    val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

    get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

    \ No newline at end of file + 'b

    discontinue_with_backtrace k e bt resumes the continuation k by raising the exception e in k using bt as the origin for the exception.

    type ('a, 'b) handler = {
    1. retc : 'a -> 'b;
    2. exnc : exn -> 'b;
    3. effc : 'c. 'c t -> (('c, 'b) continuation -> 'b) option;
    }

    ('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

    val match_with : ('c -> 'a) -> 'c -> ('a, 'b) handler -> 'b

    match_with f v h runs the computation f v in the handler h.

    type 'a effect_handler = {
    1. effc : 'b. 'b t -> (('b, 'a) continuation -> 'a) option;
    }

    'a effect_handler is a deep handler with an identity value handler fun x -> x and an exception handler that raises any exception fun e -> raise e.

    val try_with : ('b -> 'a) -> 'b -> 'a effect_handler -> 'a

    try_with f v h runs the computation f v under the handler h.

    val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

    get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

    diff --git a/ocaml/Stdlib/Effect/Shallow/index.html b/ocaml/Stdlib/Effect/Shallow/index.html index e72d03f..f417c47 100644 --- a/ocaml/Stdlib/Effect/Shallow/index.html +++ b/ocaml/Stdlib/Effect/Shallow/index.html @@ -1,7 +1,7 @@ -Shallow (ocaml.Stdlib.Effect.Shallow)

    Module Effect.Shallow

    type ('a, 'b) continuation

    ('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

    val fiber : ('a -> 'b) -> ('a, 'b) continuation

    fiber f constructs a continuation that runs the computation f.

    type ('a, 'b) handler = {
    1. retc : 'a -> 'b;
    2. exnc : exn -> 'b;
    3. effc : 'c. 'c t -> (('c, 'a) continuation -> 'b) option;
    }

    ('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

    val continue_with : ('c, 'a) continuation -> 'c -> ('a, 'b) handler -> 'b

    continue_with k v h resumes the continuation k with value v with the handler h.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    val discontinue_with : ('c, 'a) continuation -> exn -> ('a, 'b) handler -> 'b

    discontinue_with k e h resumes the continuation k by raising the exception e with the handler h.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    val discontinue_with_backtrace : +Shallow (ocaml.Stdlib.Effect.Shallow)

    Module Effect.Shallow

    type ('a, 'b) continuation

    ('a,'b) continuation is a delimited continuation that expects a 'a value and returns a 'b value.

    val fiber : ('a -> 'b) -> ('a, 'b) continuation

    fiber f constructs a continuation that runs the computation f.

    type ('a, 'b) handler = {
    1. retc : 'a -> 'b;
    2. exnc : exn -> 'b;
    3. effc : 'c. 'c t -> (('c, 'a) continuation -> 'b) option;
    }

    ('a,'b) handler is a handler record with three fields -- retc is the value handler, exnc handles exceptions, and effc handles the effects performed by the computation enclosed by the handler.

    val continue_with : ('c, 'a) continuation -> 'c -> ('a, 'b) handler -> 'b

    continue_with k v h resumes the continuation k with value v with the handler h.

    val discontinue_with : ('c, 'a) continuation -> exn -> ('a, 'b) handler -> 'b

    discontinue_with k e h resumes the continuation k by raising the exception e with the handler h.

    val discontinue_with_backtrace : ('a, 'b) continuation -> exn -> Printexc.raw_backtrace -> ('b, 'c) handler -> - 'c

    discontinue_with k e bt h resumes the continuation k by raising the exception e with the handler h using the raw backtrace bt as the origin of the exception.

    • raises Continuation_already_resumed

      if the continuation has already been resumed.

    val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

    get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

    \ No newline at end of file + 'c

    discontinue_with k e bt h resumes the continuation k by raising the exception e with the handler h using the raw backtrace bt as the origin of the exception.

    val get_callstack : ('a, 'b) continuation -> int -> Printexc.raw_backtrace

    get_callstack c n returns a description of the top of the call stack on the continuation c, with at most n entries.

    diff --git a/ocaml/Stdlib/Effect/index.html b/ocaml/Stdlib/Effect/index.html index 4e6e23d..c22440c 100644 --- a/ocaml/Stdlib/Effect/index.html +++ b/ocaml/Stdlib/Effect/index.html @@ -1,2 +1,2 @@ -Effect (ocaml.Stdlib.Effect)

    Module Stdlib.Effect

    • alert unstable The Effect interface may change in incompatible ways in the future.

    Effects.

    See 'Language extensions/Effect handlers' section in the manual.

    • since 5.0
    • alert unstable The Effect interface may change in incompatible ways in the future.
    type _ t = ..

    The type of effects.

    exception Unhandled : 'a t -> exn

    Unhandled e is raised when effect e is performed and there is no handler for it.

    exception Continuation_already_resumed

    Exception raised when a continuation is continued or discontinued more than once.

    val perform : 'a t -> 'a

    perform e performs an effect e.

    • raises Unhandled

      if there is no handler for e.

    module Deep : sig ... end

    Deep handlers

    module Shallow : sig ... end
    \ No newline at end of file +Effect (ocaml.Stdlib.Effect)

    Module Stdlib.Effect

    • alert unstable The Effect interface may change in incompatible ways in the future.

    Effects.

    See 'Language extensions/Effect handlers' section in the manual.

    • since 5.0
    • alert unstable The Effect interface may change in incompatible ways in the future.
    type _ t = ..

    The type of effects.

    exception Unhandled : 'a t -> exn

    Unhandled e is raised when effect e is performed and there is no handler for it.

    exception Continuation_already_resumed

    Exception raised when a continuation is continued or discontinued more than once.

    val perform : 'a t -> 'a

    perform e performs an effect e.

    • raises Unhandled

      if there is no handler for e.

    module Deep : sig ... end

    Deep handlers

    module Shallow : sig ... end
    diff --git a/ocaml/Stdlib/Either/index.html b/ocaml/Stdlib/Either/index.html index 8b79f76..d1bf4b0 100644 --- a/ocaml/Stdlib/Either/index.html +++ b/ocaml/Stdlib/Either/index.html @@ -1,17 +1,17 @@ -Either (ocaml.Stdlib.Either)

    Module Stdlib.Either

    Either type.

    Either is the simplest and most generic sum/variant type: a value of ('a, 'b) Either.t is either a Left (v : 'a) or a Right (v : 'b).

    It is a natural choice in the API of generic functions where values could fall in two different cases, possibly at different types, without assigning a specific meaning to what each case should be.

    For example:

    List.partition_map:
    -  ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    If you are looking for a parametrized type where one alternative means success and the other means failure, you should use the more specific type Result.t.

    • since 4.12
    type ('a, 'b) t =
    1. | Left of 'a
    2. | Right of 'b

    A value of ('a, 'b) Either.t contains either a value of 'a or a value of 'b

    val left : 'a -> ('a, 'b) t

    left v is Left v.

    val right : 'b -> ('a, 'b) t

    right v is Right v.

    val is_left : ('a, 'b) t -> bool

    is_left (Left v) is true, is_left (Right v) is false.

    val is_right : ('a, 'b) t -> bool

    is_right (Left v) is false, is_right (Right v) is true.

    val find_left : ('a, 'b) t -> 'a option

    find_left (Left v) is Some v, find_left (Right _) is None

    val find_right : ('a, 'b) t -> 'b option

    find_right (Right v) is Some v, find_right (Left _) is None

    val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

    map_left f e is Left (f v) if e is Left v and e if e is Right _.

    val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

    map_right f e is Right (f v) if e is Right v and e if e is Left _.

    val map : - left:('a1 -> 'a2) -> - right:('b1 -> 'b2) -> +Either (ocaml.Stdlib.Either)

    Module Stdlib.Either

    Either type.

    Either is the simplest and most generic sum/variant type: a value of ('a, 'b) Either.t is either a Left (v : 'a) or a Right (v : 'b).

    It is a natural choice in the API of generic functions where values could fall in two different cases, possibly at different types, without assigning a specific meaning to what each case should be.

    For example:

    List.partition_map:
    +    ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    If you are looking for a parametrized type where one alternative means success and the other means failure, you should use the more specific type Result.t.

    • since 4.12
    type ('a, 'b) t =
    1. | Left of 'a
    2. | Right of 'b

    A value of ('a, 'b) Either.t contains either a value of 'a or a value of 'b

    val left : 'a -> ('a, 'b) t

    left v is Left v.

    val right : 'b -> ('a, 'b) t

    right v is Right v.

    val is_left : ('a, 'b) t -> bool

    is_left (Left v) is true, is_left (Right v) is false.

    val is_right : ('a, 'b) t -> bool

    is_right (Left v) is false, is_right (Right v) is true.

    val find_left : ('a, 'b) t -> 'a option

    find_left (Left v) is Some v, find_left (Right _) is None

    val find_right : ('a, 'b) t -> 'b option

    find_right (Right v) is Some v, find_right (Left _) is None

    val map_left : ('a1 -> 'a2) -> ('a1, 'b) t -> ('a2, 'b) t

    map_left f e is Left (f v) if e is Left v and e if e is Right _.

    val map_right : ('b1 -> 'b2) -> ('a, 'b1) t -> ('a, 'b2) t

    map_right f e is Right (f v) if e is Right v and e if e is Left _.

    val map : + left:('a1 -> 'a2) -> + right:('b1 -> 'b2) -> ('a1, 'b1) t -> - ('a2, 'b2) t

    map ~left ~right (Left v) is Left (left v), map ~left ~right (Right v) is Right (right v).

    val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

    fold ~left ~right (Left v) is left v, and fold ~left ~right (Right v) is right v.

    val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

    iter ~left ~right (Left v) is left v, and iter ~left ~right (Right v) is right v.

    val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

    for_all ~left ~right (Left v) is left v, and for_all ~left ~right (Right v) is right v.

    val equal : - left:('a -> 'a -> bool) -> - right:('b -> 'b -> bool) -> + ('a2, 'b2) t

    map ~left ~right (Left v) is Left (left v), map ~left ~right (Right v) is Right (right v).

    val fold : left:('a -> 'c) -> right:('b -> 'c) -> ('a, 'b) t -> 'c

    fold ~left ~right (Left v) is left v, and fold ~left ~right (Right v) is right v.

    val iter : left:('a -> unit) -> right:('b -> unit) -> ('a, 'b) t -> unit

    iter ~left ~right (Left v) is left v, and iter ~left ~right (Right v) is right v.

    val for_all : left:('a -> bool) -> right:('b -> bool) -> ('a, 'b) t -> bool

    for_all ~left ~right (Left v) is left v, and for_all ~left ~right (Right v) is right v.

    val equal : + left:('a -> 'a -> bool) -> + right:('b -> 'b -> bool) -> ('a, 'b) t -> ('a, 'b) t -> bool

    equal ~left ~right e0 e1 tests equality of e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _.

    val compare : - left:('a -> 'a -> int) -> - right:('b -> 'b -> int) -> + left:('a -> 'a -> int) -> + right:('b -> 'b -> int) -> ('a, 'b) t -> ('a, 'b) t -> - int

    compare ~left ~right e0 e1 totally orders e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _. Left _ values are smaller than Right _ values.

    \ No newline at end of file + int

    compare ~left ~right e0 e1 totally orders e0 and e1 using left and right to respectively compare values wrapped by Left _ and Right _. Left _ values are smaller than Right _ values.

    diff --git a/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html b/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html index 0454514..b978889 100644 --- a/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/Bucket/index.html @@ -1,2 +1,2 @@ -Bucket (ocaml.Stdlib.Ephemeron.K1.Bucket)

    Module K1.Bucket

    type ('k, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k, 'd) t

    Create a new bucket.

    val add : ('k, 'd) t -> 'k -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k, 'd) t -> 'k -> unit

    remove b k removes from b the most-recently added ephemeron with key k, or does nothing if there is no such ephemeron.

    val find : ('k, 'd) t -> 'k -> 'd option

    Returns the data of the most-recently added ephemeron with the given key, or None if there is no such ephemeron.

    val length : ('k, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k, 'd) t -> unit

    Remove all ephemerons from the bucket.

    \ No newline at end of file +Bucket (ocaml.Stdlib.Ephemeron.K1.Bucket)

    Module K1.Bucket

    type ('k, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k, 'd) t

    Create a new bucket.

    val add : ('k, 'd) t -> 'k -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k, 'd) t -> 'k -> unit

    remove b k removes from b the most-recently added ephemeron with key k, or does nothing if there is no such ephemeron.

    val find : ('k, 'd) t -> 'k -> 'd option

    Returns the data of the most-recently added ephemeron with the given key, or None if there is no such ephemeron.

    val length : ('k, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k, 'd) t -> unit

    Remove all ephemerons from the bucket.

    diff --git a/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html b/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html index a08be8f..d01ac78 100644 --- a/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Ephemeron.K1.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H (ocaml.Stdlib.Ephemeron.K1.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Ephemeron/K1/Make/index.html b/ocaml/Stdlib/Ephemeron/K1/Make/index.html index a5c1168..019bb0e 100644 --- a/ocaml/Stdlib/Ephemeron/K1/Make/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Ephemeron.K1.Make)

    Module K1.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +Make (ocaml.Stdlib.Ephemeron.K1.Make)

    Module K1.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html b/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html index ebf80b8..0ecc2b2 100644 --- a/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Ephemeron.K1.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H (ocaml.Stdlib.Ephemeron.K1.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html b/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html index ca1fd23..9e601a8 100644 --- a/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.Ephemeron.K1.MakeSeeded)

    Module K1.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +MakeSeeded (ocaml.Stdlib.Ephemeron.K1.MakeSeeded)

    Module K1.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/K1/index.html b/ocaml/Stdlib/Ephemeron/K1/index.html index 0d0c707..f2b3482 100644 --- a/ocaml/Stdlib/Ephemeron/K1/index.html +++ b/ocaml/Stdlib/Ephemeron/K1/index.html @@ -1,2 +1,2 @@ -K1 (ocaml.Stdlib.Ephemeron.K1)

    Module Ephemeron.K1

    Ephemerons with one key.

    type ('k, 'd) t

    an ephemeron with one key

    val make : 'k -> 'd -> ('k, 'd) t

    Ephemeron.K1.make k d creates an ephemeron with key k and data d.

    val query : ('k, 'd) t -> 'k -> 'd option

    Ephemeron.K1.query eph key returns Some x (where x is the ephemeron's data) if key is physically equal to eph's key, and None if eph is empty or key is not equal to eph's key.

    module Make (H : Hashtbl.HashedType) : S with type key = H.t

    Functor building an implementation of a weak hash table

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    \ No newline at end of file +K1 (ocaml.Stdlib.Ephemeron.K1)

    Module Ephemeron.K1

    Ephemerons with one key.

    type ('k, 'd) t

    an ephemeron with one key

    val make : 'k -> 'd -> ('k, 'd) t

    Ephemeron.K1.make k d creates an ephemeron with key k and data d.

    val query : ('k, 'd) t -> 'k -> 'd option

    Ephemeron.K1.query eph key returns Some x (where x is the ephemeron's data) if key is physically equal to eph's key, and None if eph is empty or key is not equal to eph's key.

    module Make (H : Hashtbl.HashedType) : S with type key = H.t

    Functor building an implementation of a weak hash table

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    diff --git a/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html b/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html index d02da6c..51760ce 100644 --- a/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/Bucket/index.html @@ -1,2 +1,2 @@ -Bucket (ocaml.Stdlib.Ephemeron.K2.Bucket)

    Module K2.Bucket

    type ('k1, 'k2, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k1, 'k2, 'd) t

    Create a new bucket.

    val add : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> unit

    remove b k1 k2 removes from b the most-recently added ephemeron with keys k1 and k2, or does nothing if there is no such ephemeron.

    val find : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option

    Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

    val length : ('k1, 'k2, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k1, 'k2, 'd) t -> unit

    Remove all ephemerons from the bucket.

    \ No newline at end of file +Bucket (ocaml.Stdlib.Ephemeron.K2.Bucket)

    Module K2.Bucket

    type ('k1, 'k2, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k1, 'k2, 'd) t

    Create a new bucket.

    val add : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> unit

    remove b k1 k2 removes from b the most-recently added ephemeron with keys k1 and k2, or does nothing if there is no such ephemeron.

    val find : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option

    Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

    val length : ('k1, 'k2, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k1, 'k2, 'd) t -> unit

    Remove all ephemerons from the bucket.

    diff --git a/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html b/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html index 406b561..35fd54f 100644 --- a/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/Make/argument-1-H1/index.html @@ -1,2 +1,2 @@ -H1 (ocaml.Stdlib.Ephemeron.K2.Make.H1)

    Parameter Make.H1

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H1 (ocaml.Stdlib.Ephemeron.K2.Make.H1)

    Parameter Make.H1

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html b/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html index 56ed5e5..35cb706 100644 --- a/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/Make/argument-2-H2/index.html @@ -1,2 +1,2 @@ -H2 (ocaml.Stdlib.Ephemeron.K2.Make.H2)

    Parameter Make.H2

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H2 (ocaml.Stdlib.Ephemeron.K2.Make.H2)

    Parameter Make.H2

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Ephemeron/K2/Make/index.html b/ocaml/Stdlib/Ephemeron/K2/Make/index.html index c0bd7c5..a8a1657 100644 --- a/ocaml/Stdlib/Ephemeron/K2/Make/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Ephemeron.K2.Make)

    Module K2.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H1.t * H2.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +Make (ocaml.Stdlib.Ephemeron.K2.Make)

    Module K2.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H1.t * H2.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html index 7fa35bf..074d12c 100644 --- a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-1-H1/index.html @@ -1,2 +1,2 @@ -H1 (ocaml.Stdlib.Ephemeron.K2.MakeSeeded.H1)

    Parameter MakeSeeded.H1

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H1 (ocaml.Stdlib.Ephemeron.K2.MakeSeeded.H1)

    Parameter MakeSeeded.H1

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html index 813612a..83cc287 100644 --- a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/argument-2-H2/index.html @@ -1,2 +1,2 @@ -H2 (ocaml.Stdlib.Ephemeron.K2.MakeSeeded.H2)

    Parameter MakeSeeded.H2

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H2 (ocaml.Stdlib.Ephemeron.K2.MakeSeeded.H2)

    Parameter MakeSeeded.H2

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html index 0b180d9..64d9a38 100644 --- a/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.Ephemeron.K2.MakeSeeded)

    Module K2.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H1.t * H2.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +MakeSeeded (ocaml.Stdlib.Ephemeron.K2.MakeSeeded)

    Module K2.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H1.t * H2.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/K2/index.html b/ocaml/Stdlib/Ephemeron/K2/index.html index baafcd1..1634408 100644 --- a/ocaml/Stdlib/Ephemeron/K2/index.html +++ b/ocaml/Stdlib/Ephemeron/K2/index.html @@ -1,8 +1,8 @@ -K2 (ocaml.Stdlib.Ephemeron.K2)

    Module Ephemeron.K2

    Ephemerons with two keys.

    type ('k1, 'k2, 'd) t

    an ephemeron with two keys

    val make : 'k1 -> 'k2 -> 'd -> ('k1, 'k2, 'd) t
    val query : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option
    module Make +K2 (ocaml.Stdlib.Ephemeron.K2)

    Module Ephemeron.K2

    Ephemerons with two keys.

    type ('k1, 'k2, 'd) t

    an ephemeron with two keys

    val make : 'k1 -> 'k2 -> 'd -> ('k1, 'k2, 'd) t
    val query : ('k1, 'k2, 'd) t -> 'k1 -> 'k2 -> 'd option
    module Make (H1 : Hashtbl.HashedType) (H2 : Hashtbl.HashedType) : S with type key = H1.t * H2.t

    Functor building an implementation of a weak hash table

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    \ No newline at end of file + SeededS with type key = H1.t * H2.t

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    diff --git a/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html b/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html index 3f12712..d06ecc1 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/Bucket/index.html @@ -1,2 +1,2 @@ -Bucket (ocaml.Stdlib.Ephemeron.Kn.Bucket)

    Module Kn.Bucket

    type ('k, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k, 'd) t

    Create a new bucket.

    val add : ('k, 'd) t -> 'k array -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k, 'd) t -> 'k array -> unit

    remove b k removes from b the most-recently added ephemeron with keys k, or does nothing if there is no such ephemeron.

    val find : ('k, 'd) t -> 'k array -> 'd option

    Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

    val length : ('k, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k, 'd) t -> unit

    Remove all ephemerons from the bucket.

    \ No newline at end of file +Bucket (ocaml.Stdlib.Ephemeron.Kn.Bucket)

    Module Kn.Bucket

    type ('k, 'd) t

    A bucket is a mutable "list" of ephemerons.

    val make : unit -> ('k, 'd) t

    Create a new bucket.

    val add : ('k, 'd) t -> 'k array -> 'd -> unit

    Add an ephemeron to the bucket.

    val remove : ('k, 'd) t -> 'k array -> unit

    remove b k removes from b the most-recently added ephemeron with keys k, or does nothing if there is no such ephemeron.

    val find : ('k, 'd) t -> 'k array -> 'd option

    Returns the data of the most-recently added ephemeron with the given keys, or None if there is no such ephemeron.

    val length : ('k, 'd) t -> int

    Returns an upper bound on the length of the bucket.

    val clear : ('k, 'd) t -> unit

    Remove all ephemerons from the bucket.

    diff --git a/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html b/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html index ae670bb..08a16db 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Ephemeron.Kn.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H (ocaml.Stdlib.Ephemeron.Kn.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Ephemeron/Kn/Make/index.html b/ocaml/Stdlib/Ephemeron/Kn/Make/index.html index dce7ea9..2789001 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/Make/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Ephemeron.Kn.Make)

    Module Kn.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H.t array
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +Make (ocaml.Stdlib.Ephemeron.Kn.Make)

    Module Kn.Make

    Functor building an implementation of a weak hash table

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    Parameters

    Signature

    type key = H.t array
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html b/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html index d8dfd5e..e6daa15 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Ephemeron.Kn.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H (ocaml.Stdlib.Ephemeron.Kn.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html b/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html index 273ece0..35dc959 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.Ephemeron.Kn.MakeSeeded)

    Module Kn.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H.t array
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +MakeSeeded (ocaml.Stdlib.Ephemeron.Kn.MakeSeeded)

    Module Kn.MakeSeeded

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    Parameters

    Signature

    type key = H.t array
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/Kn/index.html b/ocaml/Stdlib/Ephemeron/Kn/index.html index 7ef76b5..651ff68 100644 --- a/ocaml/Stdlib/Ephemeron/Kn/index.html +++ b/ocaml/Stdlib/Ephemeron/Kn/index.html @@ -1,4 +1,4 @@ -Kn (ocaml.Stdlib.Ephemeron.Kn)

    Module Ephemeron.Kn

    Ephemerons with arbitrary number of keys of the same type.

    type ('k, 'd) t

    an ephemeron with an arbitrary number of keys of the same type

    val make : 'k array -> 'd -> ('k, 'd) t
    val query : ('k, 'd) t -> 'k array -> 'd option
    module Make (H : Hashtbl.HashedType) : S with type key = H.t array

    Functor building an implementation of a weak hash table

    module MakeSeeded +Kn (ocaml.Stdlib.Ephemeron.Kn)

    Module Ephemeron.Kn

    Ephemerons with arbitrary number of keys of the same type.

    type ('k, 'd) t

    an ephemeron with an arbitrary number of keys of the same type

    val make : 'k array -> 'd -> ('k, 'd) t
    val query : ('k, 'd) t -> 'k array -> 'd option
    module Make (H : Hashtbl.HashedType) : S with type key = H.t array

    Functor building an implementation of a weak hash table

    module MakeSeeded (H : Hashtbl.SeededHashedType) : - SeededS with type key = H.t array

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    \ No newline at end of file + SeededS with type key = H.t array

    Functor building an implementation of a weak hash table. The seed is similar to the one of Hashtbl.MakeSeeded.

    module Bucket : sig ... end
    diff --git a/ocaml/Stdlib/Ephemeron/index.html b/ocaml/Stdlib/Ephemeron/index.html index c0ee2a8..352b41b 100644 --- a/ocaml/Stdlib/Ephemeron/index.html +++ b/ocaml/Stdlib/Ephemeron/index.html @@ -1,2 +1,2 @@ -Ephemeron (ocaml.Stdlib.Ephemeron)

    Module Stdlib.Ephemeron

    Ephemerons and weak hash tables.

    Ephemerons and weak hash tables are useful when one wants to cache or memorize the computation of a function, as long as the arguments and the function are used, without creating memory leaks by continuously keeping old computation results that are not useful anymore because one argument or the function is freed. An implementation using Hashtbl.t is not suitable because all associations would keep the arguments and the result in memory.

    Ephemerons can also be used for "adding" a field to an arbitrary boxed OCaml value: you can attach some information to a value created by an external library without memory leaks.

    Ephemerons hold some keys and one or no data. They are all boxed OCaml values. The keys of an ephemeron have the same behavior as weak pointers according to the garbage collector. In fact OCaml weak pointers are implemented as ephemerons without data.

    The keys and data of an ephemeron are said to be full if they point to a value, or empty if the value has never been set, has been unset, or was erased by the GC. In the function that accesses the keys or data these two states are represented by the option type.

    The data is considered by the garbage collector alive if all the full keys are alive and if the ephemeron is alive. When one of the keys is not considered alive anymore by the GC, the data is emptied from the ephemeron. The data could be alive for another reason and in that case the GC will not free it, but the ephemeron will not hold the data anymore.

    The ephemerons complicate the notion of liveness of values, because it is not anymore an equivalence with the reachability from root value by usual pointers (not weak and not ephemerons). With ephemerons the notion of liveness is constructed by the least fixpoint of: A value is alive if:

    • it is a root value
    • it is reachable from alive value by usual pointers
    • it is the data of an alive ephemeron with all its full keys alive

    Notes:

    Ephemerons are defined in a language agnostic way in this paper: B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97

    • since 4.03

    Unsynchronized accesses

    Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

    module type S = sig ... end

    The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

    module type SeededS = sig ... end

    The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

    module K1 : sig ... end

    Ephemerons with one key.

    module K2 : sig ... end

    Ephemerons with two keys.

    module Kn : sig ... end

    Ephemerons with arbitrary number of keys of the same type.

    \ No newline at end of file +Ephemeron (ocaml.Stdlib.Ephemeron)

    Module Stdlib.Ephemeron

    Ephemerons and weak hash tables.

    Ephemerons and weak hash tables are useful when one wants to cache or memorize the computation of a function, as long as the arguments and the function are used, without creating memory leaks by continuously keeping old computation results that are not useful anymore because one argument or the function is freed. An implementation using Hashtbl.t is not suitable because all associations would keep the arguments and the result in memory.

    Ephemerons can also be used for "adding" a field to an arbitrary boxed OCaml value: you can attach some information to a value created by an external library without memory leaks.

    Ephemerons hold some keys and one or no data. They are all boxed OCaml values. The keys of an ephemeron have the same behavior as weak pointers according to the garbage collector. In fact OCaml weak pointers are implemented as ephemerons without data.

    The keys and data of an ephemeron are said to be full if they point to a value, or empty if the value has never been set, has been unset, or was erased by the GC. In the function that accesses the keys or data these two states are represented by the option type.

    The data is considered by the garbage collector alive if all the full keys are alive and if the ephemeron is alive. When one of the keys is not considered alive anymore by the GC, the data is emptied from the ephemeron. The data could be alive for another reason and in that case the GC will not free it, but the ephemeron will not hold the data anymore.

    The ephemerons complicate the notion of liveness of values, because it is not anymore an equivalence with the reachability from root value by usual pointers (not weak and not ephemerons). With ephemerons the notion of liveness is constructed by the least fixpoint of: A value is alive if:

    • it is a root value
    • it is reachable from alive value by usual pointers
    • it is the data of an alive ephemeron with all its full keys alive

    Notes:

    Ephemerons are defined in a language agnostic way in this paper: B. Hayes, Ephemerons: A New Finalization Mechanism, OOPSLA'97

    • since 4.03

    Unsynchronized accesses

    Unsynchronized accesses to a weak hash table may lead to an invalid weak hash table state. Thus, concurrent accesses to a buffer must be synchronized (for instance with a Mutex.t).

    module type S = sig ... end

    The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

    module type SeededS = sig ... end

    The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

    module K1 : sig ... end

    Ephemerons with one key.

    module K2 : sig ... end

    Ephemerons with two keys.

    module Kn : sig ... end

    Ephemerons with arbitrary number of keys of the same type.

    diff --git a/ocaml/Stdlib/Ephemeron/module-type-S/index.html b/ocaml/Stdlib/Ephemeron/module-type-S/index.html index abea333..4441e39 100644 --- a/ocaml/Stdlib/Ephemeron/module-type-S/index.html +++ b/ocaml/Stdlib/Ephemeron/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Stdlib.Ephemeron.S)

    Module type Ephemeron.S

    The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +S (ocaml.Stdlib.Ephemeron.S)

    Module type Ephemeron.S

    The output signature of the functors K1.Make and K2.Make. These hash tables are weak in the keys. If all the keys of a binding are alive the binding is kept, but if one of the keys of the binding is dead then the binding is removed.

    Propose the same interface as usual hash table. However since the bindings are weak, even if mem h k is true, a subsequent find h k may raise Not_found because the garbage collector can run between the two.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html b/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html index cb83490..61fa7aa 100644 --- a/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html +++ b/ocaml/Stdlib/Ephemeron/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (ocaml.Stdlib.Ephemeron.SeededS)

    Module type Ephemeron.SeededS

    The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    \ No newline at end of file +SeededS (ocaml.Stdlib.Ephemeron.SeededS)

    Module type Ephemeron.SeededS

    The output signature of the functors K1.MakeSeeded and K2.MakeSeeded.

    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val length : 'a t -> int
    val stats : 'a t -> Hashtbl.statistics
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    val of_seq : (key * 'a) Seq.t -> 'a t
    val clean : 'a t -> unit

    remove all dead bindings. Done automatically during automatic resizing.

    val stats_alive : 'a t -> Hashtbl.statistics

    same as Hashtbl.SeededS.stats but only count the alive bindings

    diff --git a/ocaml/Stdlib/Filename/index.html b/ocaml/Stdlib/Filename/index.html index 41a37f6..d320b85 100644 --- a/ocaml/Stdlib/Filename/index.html +++ b/ocaml/Stdlib/Filename/index.html @@ -1,14 +1,14 @@ -Filename (ocaml.Stdlib.Filename)

    Module Stdlib.Filename

    Operations on file names.

    val current_dir_name : string

    The conventional name for the current directory (e.g. . in Unix).

    val parent_dir_name : string

    The conventional name for the parent of the current directory (e.g. .. in Unix).

    val dir_sep : string

    The directory separator (e.g. / in Unix).

    • since 3.11.2
    val concat : string -> string -> string

    concat dir file returns a file name that designates file file in directory dir.

    val is_relative : string -> bool

    Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

    val is_implicit : string -> bool

    Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

    val check_suffix : string -> string -> bool

    check_suffix name suff returns true if the filename name ends with the suffix suff.

    Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

    val chop_suffix : string -> string -> string

    chop_suffix name suff removes the suffix suff from the filename name.

    • raises Invalid_argument

      if name does not end with the suffix suff.

    val chop_suffix_opt : suffix:string -> string -> string option

    chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

    Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

    • since 4.08
    val extension : string -> string

    extension name is the shortest suffix ext of name0 where:

    • name0 is the longest suffix of name that does not contain a directory separator;
    • ext starts with a period;
    • ext is preceded by at least one non-period character in name0.

    If such a suffix does not exist, extension name is the empty string.

    • since 4.04
    val remove_extension : string -> string

    Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

    The following invariant holds for any file name s:

    remove_extension s ^ extension s = s

    • since 4.04
    val chop_extension : string -> string

    Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

    val basename : string -> string

    Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

    This function conforms to the specification of POSIX.1-2008 for the basename utility.

    val dirname : string -> string

    See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

    val null : string

    null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

    • since 4.10
    val temp_file : ?temp_dir:string -> string -> string -> string

    temp_file prefix suffix returns the name of a fresh temporary file in the temporary directory. The base name of the temporary file is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary file is created empty, with permissions 0o600 (readable and writable only by the file owner). The file is guaranteed to be different from any other file that existed when temp_file was called.

    • raises Sys_error

      if the file could not be created.

    • before 3.11.2

      no ?temp_dir optional argument

    val open_temp_file : - ?mode:open_flag list -> - ?perms:int -> - ?temp_dir:string -> +Filename (ocaml.Stdlib.Filename)

    Module Stdlib.Filename

    Operations on file names.

    val current_dir_name : string

    The conventional name for the current directory (e.g. . in Unix).

    val parent_dir_name : string

    The conventional name for the parent of the current directory (e.g. .. in Unix).

    val dir_sep : string

    The directory separator (e.g. / in Unix).

    • since 3.11.2
    val concat : string -> string -> string

    concat dir file returns a file name that designates file file in directory dir.

    val is_relative : string -> bool

    Return true if the file name is relative to the current directory, false if it is absolute (i.e. in Unix, starts with /).

    val is_implicit : string -> bool

    Return true if the file name is relative and does not start with an explicit reference to the current directory (./ or ../ in Unix), false if it starts with an explicit reference to the root directory or the current directory.

    val check_suffix : string -> string -> bool

    check_suffix name suff returns true if the filename name ends with the suffix suff.

    Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

    val chop_suffix : string -> string -> string

    chop_suffix name suff removes the suffix suff from the filename name.

    val chop_suffix_opt : suffix:string -> string -> string option

    chop_suffix_opt ~suffix filename removes the suffix from the filename if possible, or returns None if the filename does not end with the suffix.

    Under Windows ports (including Cygwin), comparison is case-insensitive, relying on String.lowercase_ascii. Note that this does not match exactly the interpretation of case-insensitive filename equivalence from Windows.

    • since 4.08
    val extension : string -> string

    extension name is the shortest suffix ext of name0 where:

    • name0 is the longest suffix of name that does not contain a directory separator;
    • ext starts with a period;
    • ext is preceded by at least one non-period character in name0.

    If such a suffix does not exist, extension name is the empty string.

    • since 4.04
    val remove_extension : string -> string

    Return the given file name without its extension, as defined in Filename.extension. If the extension is empty, the function returns the given file name.

    The following invariant holds for any file name s:

    remove_extension s ^ extension s = s

    • since 4.04
    val chop_extension : string -> string

    Same as Filename.remove_extension, but raise Invalid_argument if the given name has an empty extension.

    val basename : string -> string

    Split a file name into directory name / base file name. If name is a valid file name, then concat (dirname name) (basename name) returns a file name which is equivalent to name. Moreover, after setting the current directory to dirname name (with Sys.chdir), references to basename name (which is a relative file name) designate the same file as name before the call to Sys.chdir.

    This function conforms to the specification of POSIX.1-2008 for the basename utility.

    val dirname : string -> string

    See Filename.basename. This function conforms to the specification of POSIX.1-2008 for the dirname utility.

    val null : string

    null is "/dev/null" on POSIX and "NUL" on Windows. It represents a file on the OS that discards all writes and returns end of file on reads.

    • since 4.10
    val temp_file : ?temp_dir:string -> string -> string -> string

    temp_file prefix suffix returns the name of a fresh temporary file in the temporary directory. The base name of the temporary file is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary file is created empty, with permissions 0o600 (readable and writable only by the file owner). The file is guaranteed to be different from any other file that existed when temp_file was called.

    • raises Sys_error

      if the file could not be created.

    • before 3.11.2

      no ?temp_dir optional argument

    val open_temp_file : + ?mode:open_flag list -> + ?perms:int -> + ?temp_dir:string -> string -> string -> - string * out_channel

    Same as Filename.temp_file, but returns both the name of a fresh temporary file, and an output channel opened (atomically) on this file. This function is more secure than temp_file: there is no risk that the temporary file will be modified (e.g. replaced by a symbolic link) before the program opens it. The optional argument mode is a list of additional flags to control the opening of the file. It can contain one or several of Open_append, Open_binary, and Open_text. The default is [Open_text] (open in text mode). The file is created with permissions perms (defaults to readable and writable only by the file owner, 0o600).

    • raises Sys_error

      if the file could not be opened.

    • before 4.03

      no ?perms optional argument

    • before 3.11.2

      no ?temp_dir optional argument

    val temp_dir : ?temp_dir:string -> ?perms:int -> string -> string -> string

    temp_dir prefix suffix creates and returns the name of a fresh temporary directory with permissions perms (defaults to 0o700) inside temp_dir. The base name of the temporary directory is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary directory is created empty, with permissions 0o700 (readable, writable, and searchable only by the file owner). The directory is guaranteed to be different from any other directory that existed when temp_dir was called.

    If temp_dir does not exist, this function does not create it. Instead, it raises Sys_error.

    • raises Sys_error

      if the directory could not be created.

    • since 5.1
    val get_temp_dir_name : unit -> string

    The name of the temporary directory: Under Unix, the value of the TMPDIR environment variable, or "/tmp" if the variable is not set. Under Windows, the value of the TEMP environment variable, or "." if the variable is not set. The temporary directory can be changed with Filename.set_temp_dir_name.

    • since 4.00
    val set_temp_dir_name : string -> unit

    Change the temporary directory returned by Filename.get_temp_dir_name and used by Filename.temp_file and Filename.open_temp_file. The temporary directory is a domain-local value which is inherited by child domains.

    • since 4.00
    val quote : string -> string

    Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

    val quote_command : + string * out_channel

    Same as Filename.temp_file, but returns both the name of a fresh temporary file, and an output channel opened (atomically) on this file. This function is more secure than temp_file: there is no risk that the temporary file will be modified (e.g. replaced by a symbolic link) before the program opens it. The optional argument mode is a list of additional flags to control the opening of the file. It can contain one or several of Open_append, Open_binary, and Open_text. The default is [Open_text] (open in text mode). The file is created with permissions perms (defaults to readable and writable only by the file owner, 0o600).

    • raises Sys_error

      if the file could not be opened.

    • before 4.03

      no ?perms optional argument

    • before 3.11.2

      no ?temp_dir optional argument

    val temp_dir : ?temp_dir:string -> ?perms:int -> string -> string -> string

    temp_dir prefix suffix creates and returns the name of a fresh temporary directory with permissions perms (defaults to 0o700) inside temp_dir. The base name of the temporary directory is formed by concatenating prefix, then a suitably chosen integer number, then suffix. The optional argument temp_dir indicates the temporary directory to use, defaulting to the current result of Filename.get_temp_dir_name. The temporary directory is created empty, with permissions 0o700 (readable, writable, and searchable only by the file owner). The directory is guaranteed to be different from any other directory that existed when temp_dir was called.

    If temp_dir does not exist, this function does not create it. Instead, it raises Sys_error.

    • raises Sys_error

      if the directory could not be created.

    • since 5.1
    val get_temp_dir_name : unit -> string

    The name of the temporary directory: Under Unix, the value of the TMPDIR environment variable, or "/tmp" if the variable is not set. Under Windows, the value of the TEMP environment variable, or "." if the variable is not set. The temporary directory can be changed with Filename.set_temp_dir_name.

    • since 4.00
    val set_temp_dir_name : string -> unit

    Change the temporary directory returned by Filename.get_temp_dir_name and used by Filename.temp_file and Filename.open_temp_file. The temporary directory is a domain-local value which is inherited by child domains.

    • since 4.00
    val quote : string -> string

    Return a quoted version of a file name, suitable for use as one argument in a command line, escaping all meta-characters. Warning: under Windows, the output is only suitable for use with programs that follow the standard Windows quoting conventions.

    val quote_command : string -> - ?stdin:string -> - ?stdout:string -> - ?stderr:string -> + ?stdin:string -> + ?stdout:string -> + ?stderr:string -> string list -> - string

    quote_command cmd args returns a quoted command line, suitable for use as an argument to Sys.command, Unix.system, and the Unix.open_process functions.

    The string cmd is the command to call. The list args is the list of arguments to pass to this command. It can be empty.

    The optional arguments ?stdin and ?stdout and ?stderr are file names used to redirect the standard input, the standard output, or the standard error of the command. If ~stdin:f is given, a redirection < f is performed and the standard input of the command reads from file f. If ~stdout:f is given, a redirection > f is performed and the standard output of the command is written to file f. If ~stderr:f is given, a redirection 2> f is performed and the standard error of the command is written to file f. If both ~stdout:f and ~stderr:f are given, with the exact same file name f, a 2>&1 redirection is performed so that the standard output and the standard error of the command are interleaved and redirected to the same file f.

    Under Unix and Cygwin, the command, the arguments, and the redirections if any are quoted using Filename.quote, then concatenated. Under Win32, additional quoting is performed as required by the cmd.exe shell that is called by Sys.command.

    • raises Failure

      if the command cannot be escaped on the current platform.

    • since 4.10
    \ No newline at end of file + string

    quote_command cmd args returns a quoted command line, suitable for use as an argument to Sys.command, Unix.system, and the Unix.open_process functions.

    The string cmd is the command to call. The list args is the list of arguments to pass to this command. It can be empty.

    The optional arguments ?stdin and ?stdout and ?stderr are file names used to redirect the standard input, the standard output, or the standard error of the command. If ~stdin:f is given, a redirection < f is performed and the standard input of the command reads from file f. If ~stdout:f is given, a redirection > f is performed and the standard output of the command is written to file f. If ~stderr:f is given, a redirection 2> f is performed and the standard error of the command is written to file f. If both ~stdout:f and ~stderr:f are given, with the exact same file name f, a 2>&1 redirection is performed so that the standard output and the standard error of the command are interleaved and redirected to the same file f.

    Under Unix and Cygwin, the command, the arguments, and the redirections if any are quoted using Filename.quote, then concatenated. Under Win32, additional quoting is performed as required by the cmd.exe shell that is called by Sys.command.

    • raises Failure

      if the command cannot be escaped on the current platform.

    • since 4.10
    diff --git a/ocaml/Stdlib/Float/Array/index.html b/ocaml/Stdlib/Float/Array/index.html index d75900f..a899836 100644 --- a/ocaml/Stdlib/Float/Array/index.html +++ b/ocaml/Stdlib/Float/Array/index.html @@ -1,5 +1,5 @@ -Array (ocaml.Stdlib.Float.Array)

    Module Float.Array

    Float arrays with packed representation.

    type t = floatarray

    The type of float arrays with packed representation.

    • since 4.08
    val length : t -> int

    Return the length (number of elements) of the given floatarray.

    val get : t -> int -> float

    get a n returns the element number n of floatarray a.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val set : t -> int -> float -> unit

    set a n x modifies floatarray a in place, replacing element number n with x.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val make : int -> float -> t

    make n x returns a fresh floatarray of length n, initialized with x.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val create : int -> t

    create n returns a fresh floatarray of length n, with uninitialized data.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val init : int -> (int -> float) -> t

    init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val append : t -> t -> t

    append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

    • raises Invalid_argument

      if length v1 + length v2 > Sys.max_floatarray_length.

    val concat : t list -> t

    Same as append, but concatenates a list of floatarrays.

    val sub : t -> int -> int -> t

    sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : t -> t

    copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

    val fill : t -> int -> int -> float -> unit

    fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a.

    val blit : t -> int -> t -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : t -> float list

    to_list a returns the list of all the elements of a.

    val of_list : float list -> t

    of_list l returns a fresh floatarray containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_floatarray_length.

    Iterators

    val iter : (float -> unit) -> t -> unit

    iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : (int -> float -> unit) -> t -> unit

    Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val map : (float -> float) -> t -> t

    map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    val map_inplace : (float -> float) -> t -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : (int -> float -> float) -> t -> t

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : (int -> float -> float) -> t -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

    fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

    val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

    Iterators on two arrays

    val iter2 : (float -> float -> unit) -> t -> t -> unit

    Array.iter2 f a b applies function f to all the elements of a and b.

    • raises Invalid_argument

      if the floatarrays are not the same size.

    val map2 : (float -> float -> float) -> t -> t -> t

    map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • raises Invalid_argument

      if the floatarrays are not the same size.

    Array scanning

    val for_all : (float -> bool) -> t -> bool

    for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    val exists : (float -> bool) -> t -> bool

    exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    val mem : float -> t -> bool

    mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

    val mem_ieee : float -> t -> bool

    Same as mem, but uses IEEE equality instead of structural equality.

    Array searching

    val find_opt : (float -> bool) -> t -> float option
    val find_index : (float -> bool) -> t -> int option

    find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : (float -> 'a option) -> t -> 'a option
    val find_mapi : (int -> float -> 'a option) -> t -> 'a option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Sorting

    val sort : (float -> float -> int) -> t -> unit

    Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : (float -> float -> int) -> t -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

    val fast_sort : (float -> float -> int) -> t -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Float arrays and Sequences

    val to_seq : t -> float Seq.t

    Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

    val to_seqi : t -> (int * float) Seq.t

    Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

    val of_seq : float Seq.t -> t

    Create an array from the generator.

    val map_to_array : (float -> 'a) -> t -> 'a array

    map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_from_array : ('a -> float) -> 'a array -> t

    map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    Arrays and concurrency safety

    Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
    +Array (ocaml.Stdlib.Float.Array)

    Module Float.Array

    Float arrays with packed representation.

    type t = floatarray

    The type of float arrays with packed representation.

    • since 4.08
    val length : t -> int

    Return the length (number of elements) of the given floatarray.

    val get : t -> int -> float

    get a n returns the element number n of floatarray a.

    val set : t -> int -> float -> unit

    set a n x modifies floatarray a in place, replacing element number n with x.

    val make : int -> float -> t

    make n x returns a fresh floatarray of length n, initialized with x.

    val create : int -> t

    create n returns a fresh floatarray of length n, with uninitialized data.

    val init : int -> (int -> float) -> t

    init n f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n f tabulates the results of f applied to the integers 0 to n-1.

    val append : t -> t -> t

    append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

    val concat : t list -> t

    Same as append, but concatenates a list of floatarrays.

    val sub : t -> int -> int -> t

    sub a pos len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : t -> t

    copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

    val fill : t -> int -> int -> float -> unit

    fill a pos len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

    val blit : t -> int -> t -> int -> int -> unit

    blit src src_pos dst dst_pos len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : t -> float list

    to_list a returns the list of all the elements of a.

    val of_list : float list -> t

    of_list l returns a fresh floatarray containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_floatarray_length.

    Iterators

    val iter : (float -> unit) -> t -> unit

    iter f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : (int -> float -> unit) -> t -> unit

    Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val map : (float -> float) -> t -> t

    map f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    val map_inplace : (float -> float) -> t -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : (int -> float -> float) -> t -> t

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : (int -> float -> float) -> t -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : ('acc -> float -> 'acc) -> 'acc -> t -> 'acc

    fold_left f x init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

    val fold_right : (float -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

    Iterators on two arrays

    val iter2 : (float -> float -> unit) -> t -> t -> unit

    Array.iter2 f a b applies function f to all the elements of a and b.

    val map2 : (float -> float -> float) -> t -> t -> t

    map2 f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    Array scanning

    val for_all : (float -> bool) -> t -> bool

    for_all f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    val exists : (float -> bool) -> t -> bool

    exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    val mem : float -> t -> bool

    mem a set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

    val mem_ieee : float -> t -> bool

    Same as mem, but uses IEEE equality instead of structural equality.

    Array searching

    val find_opt : (float -> bool) -> t -> float option
    val find_index : (float -> bool) -> t -> int option

    find_index f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : (float -> 'a option) -> t -> 'a option
    val find_mapi : (int -> float -> 'a option) -> t -> 'a option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Sorting

    val sort : (float -> float -> int) -> t -> unit

    Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : (float -> float -> int) -> t -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

    val fast_sort : (float -> float -> int) -> t -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Float arrays and Sequences

    val to_seq : t -> float Seq.t

    Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

    val to_seqi : t -> (int * float) Seq.t

    Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

    val of_seq : float Seq.t -> t

    Create an array from the generator.

    val map_to_array : (float -> 'a) -> t -> 'a array

    map_to_array f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_from_array : ('a -> float) -> 'a array -> t

    map_from_array f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    Arrays and concurrency safety

    Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
     let a = Float.Array.make size 1.
     let update a f () =
        Float.Array.iteri (fun i x -> Float.Array.set a i (f x)) a
    @@ -10,4 +10,4 @@ let max_floats = Float.Array.make size Float.max_float
     let res = Float.Array.copy zeros
     let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
     let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
    -let () = Domain.join d1; Domain.join d2

    the res float array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the res float array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    diff --git a/ocaml/Stdlib/Float/ArrayLabels/index.html b/ocaml/Stdlib/Float/ArrayLabels/index.html index fe40b02..4ffa30f 100644 --- a/ocaml/Stdlib/Float/ArrayLabels/index.html +++ b/ocaml/Stdlib/Float/ArrayLabels/index.html @@ -1,5 +1,5 @@ -ArrayLabels (ocaml.Stdlib.Float.ArrayLabels)

    Module Float.ArrayLabels

    Float arrays with packed representation (labeled functions).

    type t = floatarray

    The type of float arrays with packed representation.

    • since 4.08
    val length : t -> int

    Return the length (number of elements) of the given floatarray.

    val get : t -> int -> float

    get a n returns the element number n of floatarray a.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val set : t -> int -> float -> unit

    set a n x modifies floatarray a in place, replacing element number n with x.

    • raises Invalid_argument

      if n is outside the range 0 to (length a - 1).

    val make : int -> float -> t

    make n x returns a fresh floatarray of length n, initialized with x.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val create : int -> t

    create n returns a fresh floatarray of length n, with uninitialized data.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val init : int -> f:(int -> float) -> t

    init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_floatarray_length.

    val append : t -> t -> t

    append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

    • raises Invalid_argument

      if length v1 + length v2 > Sys.max_floatarray_length.

    val concat : t list -> t

    Same as append, but concatenates a list of floatarrays.

    val sub : t -> pos:int -> len:int -> t

    sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : t -> t

    copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

    val fill : t -> pos:int -> len:int -> float -> unit

    fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a.

    val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : t -> float list

    to_list a returns the list of all the elements of a.

    val of_list : float list -> t

    of_list l returns a fresh floatarray containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_floatarray_length.

    Iterators

    val iter : f:(float -> unit) -> t -> unit

    iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : f:(int -> float -> unit) -> t -> unit

    Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val map : f:(float -> float) -> t -> t

    map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    val map_inplace : f:(float -> float) -> t -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : f:(int -> float -> float) -> t -> t

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : f:(int -> float -> float) -> t -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

    fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

    val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

    Iterators on two arrays

    val iter2 : f:(float -> float -> unit) -> t -> t -> unit

    Array.iter2 ~f a b applies function f to all the elements of a and b.

    • raises Invalid_argument

      if the floatarrays are not the same size.

    val map2 : f:(float -> float -> float) -> t -> t -> t

    map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    • raises Invalid_argument

      if the floatarrays are not the same size.

    Array scanning

    val for_all : f:(float -> bool) -> t -> bool

    for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    val exists : f:(float -> bool) -> t -> bool

    exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    val mem : float -> set:t -> bool

    mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

    val mem_ieee : float -> set:t -> bool

    Same as mem, but uses IEEE equality instead of structural equality.

    Array searching

    val find_opt : f:(float -> bool) -> t -> float option
    val find_index : f:(float -> bool) -> t -> int option

    find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:(float -> 'a option) -> t -> 'a option
    val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Sorting

    val sort : cmp:(float -> float -> int) -> t -> unit

    Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : cmp:(float -> float -> int) -> t -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

    val fast_sort : cmp:(float -> float -> int) -> t -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Float arrays and Sequences

    val to_seq : t -> float Seq.t

    Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

    val to_seqi : t -> (int * float) Seq.t

    Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

    val of_seq : float Seq.t -> t

    Create an array from the generator.

    val map_to_array : f:(float -> 'a) -> t -> 'a array

    map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_from_array : f:('a -> float) -> 'a array -> t

    map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    Arrays and concurrency safety

    Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
    +ArrayLabels (ocaml.Stdlib.Float.ArrayLabels)

    Module Float.ArrayLabels

    Float arrays with packed representation (labeled functions).

    type t = floatarray

    The type of float arrays with packed representation.

    • since 4.08
    val length : t -> int

    Return the length (number of elements) of the given floatarray.

    val get : t -> int -> float

    get a n returns the element number n of floatarray a.

    val set : t -> int -> float -> unit

    set a n x modifies floatarray a in place, replacing element number n with x.

    val make : int -> float -> t

    make n x returns a fresh floatarray of length n, initialized with x.

    val create : int -> t

    create n returns a fresh floatarray of length n, with uninitialized data.

    val init : int -> f:(int -> float) -> t

    init n ~f returns a fresh floatarray of length n, with element number i initialized to the result of f i. In other terms, init n ~f tabulates the results of f applied to the integers 0 to n-1.

    val append : t -> t -> t

    append v1 v2 returns a fresh floatarray containing the concatenation of the floatarrays v1 and v2.

    val concat : t list -> t

    Same as append, but concatenates a list of floatarrays.

    val sub : t -> pos:int -> len:int -> t

    sub a ~pos ~len returns a fresh floatarray of length len, containing the elements number pos to pos + len - 1 of floatarray a.

    • raises Invalid_argument

      if pos and len do not designate a valid subarray of a; that is, if pos < 0, or len < 0, or pos + len > length a.

    val copy : t -> t

    copy a returns a copy of a, that is, a fresh floatarray containing the same elements as a.

    val fill : t -> pos:int -> len:int -> float -> unit

    fill a ~pos ~len x modifies the floatarray a in place, storing x in elements number pos to pos + len - 1.

    val blit : src:t -> src_pos:int -> dst:t -> dst_pos:int -> len:int -> unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len elements from floatarray src, starting at element number src_pos, to floatarray dst, starting at element number dst_pos. It works correctly even if src and dst are the same floatarray, and the source and destination chunks overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid subarray of src, or if dst_pos and len do not designate a valid subarray of dst.

    val to_list : t -> float list

    to_list a returns the list of all the elements of a.

    val of_list : float list -> t

    of_list l returns a fresh floatarray containing the elements of l.

    • raises Invalid_argument

      if the length of l is greater than Sys.max_floatarray_length.

    Iterators

    val iter : f:(float -> unit) -> t -> unit

    iter ~f a applies function f in turn to all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().

    val iteri : f:(int -> float -> unit) -> t -> unit

    Same as iter, but the function is applied with the index of the element as first argument, and the element itself as second argument.

    val map : f:(float -> float) -> t -> t

    map ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    val map_inplace : f:(float -> float) -> t -> unit

    map_inplace f a applies function f to all elements of a, and updates their values in place.

    • since 5.1
    val mapi : f:(int -> float -> float) -> t -> t

    Same as map, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    val mapi_inplace : f:(int -> float -> float) -> t -> unit

    Same as map_inplace, but the function is applied to the index of the element as first argument, and the element itself as second argument.

    • since 5.1
    val fold_left : f:('acc -> float -> 'acc) -> init:'acc -> t -> 'acc

    fold_left ~f x ~init computes f (... (f (f x init.(0)) init.(1)) ...) init.(n-1), where n is the length of the floatarray init.

    val fold_right : f:(float -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold_right f a init computes f a.(0) (f a.(1) ( ... (f a.(n-1) init) ...)), where n is the length of the floatarray a.

    Iterators on two arrays

    val iter2 : f:(float -> float -> unit) -> t -> t -> unit

    Array.iter2 ~f a b applies function f to all the elements of a and b.

    val map2 : f:(float -> float -> float) -> t -> t -> t

    map2 ~f a b applies function f to all the elements of a and b, and builds a floatarray with the results returned by f: [| f a.(0) b.(0); ...; f a.(length a - 1) b.(length b - 1)|].

    Array scanning

    val for_all : f:(float -> bool) -> t -> bool

    for_all ~f [|a1; ...; an|] checks if all elements of the floatarray satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an).

    val exists : f:(float -> bool) -> t -> bool

    exists f [|a1; ...; an|] checks if at least one element of the floatarray satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an).

    val mem : float -> set:t -> bool

    mem a ~set is true if and only if there is an element of set that is structurally equal to a, i.e. there is an x in set such that compare a x = 0.

    val mem_ieee : float -> set:t -> bool

    Same as mem, but uses IEEE equality instead of structural equality.

    Array searching

    val find_opt : f:(float -> bool) -> t -> float option
    val find_index : f:(float -> bool) -> t -> int option

    find_index ~f a returns Some i, where i is the index of the first element of the array a that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:(float -> 'a option) -> t -> 'a option
    val find_mapi : f:(int -> float -> 'a option) -> t -> 'a option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1

    Sorting

    val sort : cmp:(float -> float -> int) -> t -> unit

    Sort a floatarray in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see below for a complete specification). For example, Stdlib.compare is a suitable comparison function. After calling sort, the array is sorted in place in increasing order. sort is guaranteed to run in constant heap space and (at most) logarithmic stack space.

    The current implementation uses Heap Sort. It runs in constant stack space.

    Specification of the comparison function: Let a be the floatarray and cmp the comparison function. The following must be true for all x, y, z in a :

    • cmp x y > 0 if and only if cmp y x < 0
    • if cmp x y >= 0 and cmp y z >= 0 then cmp x z >= 0

    When sort returns, a contains the same elements as before, reordered in such a way that for all i and j valid indices of a :

    • cmp a.(i) a.(j) >= 0 if and only if i >= j
    val stable_sort : cmp:(float -> float -> int) -> t -> unit

    Same as sort, but the sorting algorithm is stable (i.e. elements that compare equal are kept in their original order) and not guaranteed to run in constant heap space.

    The current implementation uses Merge Sort. It uses a temporary floatarray of length n/2, where n is the length of the floatarray. It is usually faster than the current implementation of sort.

    val fast_sort : cmp:(float -> float -> int) -> t -> unit

    Same as sort or stable_sort, whichever is faster on typical input.

    Float arrays and Sequences

    val to_seq : t -> float Seq.t

    Iterate on the floatarray, in increasing order. Modifications of the floatarray during iteration will be reflected in the sequence.

    val to_seqi : t -> (int * float) Seq.t

    Iterate on the floatarray, in increasing order, yielding indices along elements. Modifications of the floatarray during iteration will be reflected in the sequence.

    val of_seq : float Seq.t -> t

    Create an array from the generator.

    val map_to_array : f:(float -> 'a) -> t -> 'a array

    map_to_array ~f a applies function f to all the elements of a, and builds an array with the results returned by f: [| f a.(0); f a.(1); ...; f a.(length a - 1) |].

    val map_from_array : f:('a -> float) -> 'a array -> t

    map_from_array ~f a applies function f to all the elements of a, and builds a floatarray with the results returned by f.

    Arrays and concurrency safety

    Care must be taken when concurrently accessing float arrays from multiple domains: accessing an array will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every float array operation that accesses more than one array element is not atomic. This includes iteration, scanning, sorting, splitting and combining arrays.

    For example, consider the following program:

    let size = 100_000_000
     let a = Float.ArrayLabels.make size 1.
     let update a f () =
        Float.ArrayLabels.iteri ~f:(fun i x -> Float.Array.set a i (f x)) a
    @@ -10,4 +10,4 @@ let max_floats = Float.Array.make size Float.max_float
     let res = Float.Array.copy zeros
     let d1 = Domain.spawn (fun () -> Float.Array.blit zeros 0 res 0 size)
     let d2 = Domain.spawn (fun () -> Float.Array.blit max_floats 0 res 0 size)
    -let () = Domain.join d1; Domain.join d2

    the res float array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the res float array might contain values that are neither 0. nor max_float.

    Second, on 32-bit architectures, getting or setting a field involves two separate memory accesses. In the presence of data races, the user may observe tearing on any operation.

    diff --git a/ocaml/Stdlib/Float/index.html b/ocaml/Stdlib/Float/index.html index 083c6d9..13510e2 100644 --- a/ocaml/Stdlib/Float/index.html +++ b/ocaml/Stdlib/Float/index.html @@ -1,2 +1,2 @@ -Float (ocaml.Stdlib.Float)

    Module Stdlib.Float

    Floating-point arithmetic.

    OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

    • since 4.07
    val zero : float

    The floating point 0.

    • since 4.08
    val one : float

    The floating-point 1.

    • since 4.08
    val minus_one : float

    The floating-point -1.

    • since 4.08
    val neg : float -> float

    Unary negation.

    val add : float -> float -> float

    Floating-point addition.

    val sub : float -> float -> float

    Floating-point subtraction.

    val mul : float -> float -> float

    Floating-point multiplication.

    val div : float -> float -> float

    Floating-point division.

    val fma : float -> float -> float -> float

    fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

    On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

    • since 4.08
    val rem : float -> float -> float

    rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

    val succ : float -> float

    succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

    • since 4.08
    val pred : float -> float

    pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

    • since 4.08
    val abs : float -> float

    abs f returns the absolute value of f.

    val infinity : float

    Positive infinity.

    val neg_infinity : float

    Negative infinity.

    val nan : float

    A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    nan is quiet_nan since 5.1; it was a signaling NaN before.

    val signaling_nan : float

    Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

    • since 5.1
    val quiet_nan : float

    Quiet NaN.

    • since 5.1
    val pi : float

    The constant pi.

    val max_float : float

    The largest positive finite value of type float.

    val min_float : float

    The smallest positive, non-zero, non-denormalized value of type float.

    val epsilon : float

    The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

    val is_finite : float -> bool

    is_finite x is true if and only if x is finite i.e., not infinite and not nan.

    • since 4.08
    val is_infinite : float -> bool

    is_infinite x is true if and only if x is infinity or neg_infinity.

    • since 4.08
    val is_nan : float -> bool

    is_nan x is true if and only if x is not a number (see nan).

    • since 4.08
    val is_integer : float -> bool

    is_integer x is true if and only if x is an integer.

    • since 4.08
    val of_int : int -> float

    Convert an integer to floating-point.

    val to_int : float -> int

    Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val of_string : string -> float

    Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

    • raises Failure

      if the given string is not a valid representation of a float.

    val of_string_opt : string -> float option

    Same as of_string, but returns None instead of raising.

    val to_string : float -> string

    Return a string representation of a floating-point number.

    This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

    This function is an alias for Stdlib.string_of_float.

    type fpclass = fpclass =
    1. | FP_normal
      (*

      Normal number, none of the below

      *)
    2. | FP_subnormal
      (*

      Number very close to 0.0, has reduced precision

      *)
    3. | FP_zero
      (*

      Number is 0.0 or -0.0

      *)
    4. | FP_infinite
      (*

      Number is positive or negative infinity

      *)
    5. | FP_nan
      (*

      Not a number: result of an undefined operation

      *)

    The five classes of floating-point numbers, as determined by the classify_float function.

    val classify_float : float -> fpclass

    Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

    val pow : float -> float -> float

    Exponentiation.

    val sqrt : float -> float

    Square root.

    val cbrt : float -> float

    Cube root.

    • since 4.13
    val exp : float -> float

    Exponential.

    val exp2 : float -> float

    Base 2 exponential function.

    • since 4.13
    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val log2 : float -> float

    Base 2 logarithm.

    • since 4.13
    val expm1 : float -> float

    expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

    val log1p : float -> float

    log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

    val cos : float -> float

    Cosine. Argument is in radians.

    val sin : float -> float

    Sine. Argument is in radians.

    val tan : float -> float

    Tangent. Argument is in radians.

    val acos : float -> float

    Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

    val asin : float -> float

    Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

    val atan : float -> float

    Arc tangent. Result is in radians and is between -pi/2 and pi/2.

    val atan2 : float -> float -> float

    atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

    val hypot : float -> float -> float

    hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

    val cosh : float -> float

    Hyperbolic cosine. Argument is in radians.

    val sinh : float -> float

    Hyperbolic sine. Argument is in radians.

    val tanh : float -> float

    Hyperbolic tangent. Argument is in radians.

    val acosh : float -> float

    Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

    • since 4.13
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13
    val atanh : float -> float

    Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

    • since 4.13
    val erf : float -> float

    Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

    • since 4.13
    val erfc : float -> float

    Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

    • since 4.13
    val trunc : float -> float

    trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

    • since 4.08
    val round : float -> float

    round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

    On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

    • since 4.08
    val ceil : float -> float

    Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

    val floor : float -> float

    Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

    val next_after : float -> float -> float

    next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

    • since 4.08
    val copy_sign : float -> float -> float

    copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

    val sign_bit : float -> bool

    sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

    • since 4.08
    val frexp : float -> float * int

    frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

    val ldexp : float -> int -> float

    ldexp x n returns x *. 2 ** n.

    val modf : float -> float * float

    modf f returns the pair of the fractional and integral part of f.

    type t = float

    An alias for the type of floating-point numbers.

    val compare : t -> t -> int

    compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

    val equal : t -> t -> bool

    The equal function for floating-point numbers, compared using compare.

    val min : t -> t -> t

    min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

    • since 4.08
    val max : float -> float -> float

    max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

    • since 4.08
    val min_max : float -> float -> float * float

    min_max x y is (min x y, max x y), just more efficient.

    • since 4.08
    val min_num : t -> t -> t

    min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

    • since 4.08
    val max_num : t -> t -> t

    max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

    • since 4.08
    val min_max_num : float -> float -> float * float

    min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

    • since 4.08
    val seeded_hash : int -> t -> int

    A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    module Array : sig ... end

    Float arrays with packed representation.

    module ArrayLabels : sig ... end

    Float arrays with packed representation (labeled functions).

    \ No newline at end of file +Float (ocaml.Stdlib.Float)

    Module Stdlib.Float

    Floating-point arithmetic.

    OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

    • since 4.07
    val zero : float

    The floating point 0.

    • since 4.08
    val one : float

    The floating-point 1.

    • since 4.08
    val minus_one : float

    The floating-point -1.

    • since 4.08
    val neg : float -> float

    Unary negation.

    val add : float -> float -> float

    Floating-point addition.

    val sub : float -> float -> float

    Floating-point subtraction.

    val mul : float -> float -> float

    Floating-point multiplication.

    val div : float -> float -> float

    Floating-point division.

    val fma : float -> float -> float -> float

    fma x y z returns x * y + z, with a best effort for computing this expression with a single rounding, using either hardware instructions (providing full IEEE compliance) or a software emulation.

    On 64-bit Cygwin, 64-bit mingw-w64 and MSVC 2017 and earlier, this function may be emulated owing to known bugs on limitations on these platforms. Note: since software emulation of the fma is costly, make sure that you are using hardware fma support if performance matters.

    • since 4.08
    val rem : float -> float -> float

    rem a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

    val succ : float -> float

    succ x returns the floating point number right after x i.e., the smallest floating-point number greater than x. See also next_after.

    • since 4.08
    val pred : float -> float

    pred x returns the floating-point number right before x i.e., the greatest floating-point number smaller than x. See also next_after.

    • since 4.08
    val abs : float -> float

    abs f returns the absolute value of f.

    val infinity : float

    Positive infinity.

    val neg_infinity : float

    Negative infinity.

    val nan : float

    A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    nan is quiet_nan since 5.1; it was a signaling NaN before.

    val signaling_nan : float

    Signaling NaN. The corresponding signals do not raise OCaml exception, but the value can be useful for interoperability with C libraries.

    • since 5.1
    val quiet_nan : float

    Quiet NaN.

    • since 5.1
    val pi : float

    The constant pi.

    val max_float : float

    The largest positive finite value of type float.

    val min_float : float

    The smallest positive, non-zero, non-denormalized value of type float.

    val epsilon : float

    The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

    val is_finite : float -> bool

    is_finite x is true if and only if x is finite i.e., not infinite and not nan.

    • since 4.08
    val is_infinite : float -> bool

    is_infinite x is true if and only if x is infinity or neg_infinity.

    • since 4.08
    val is_nan : float -> bool

    is_nan x is true if and only if x is not a number (see nan).

    • since 4.08
    val is_integer : float -> bool

    is_integer x is true if and only if x is an integer.

    • since 4.08
    val of_int : int -> float

    Convert an integer to floating-point.

    val to_int : float -> int

    Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val of_string : string -> float

    Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X). The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit. The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit. In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional. The _ (underscore) character can appear anywhere in the string and is ignored. Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

    • raises Failure

      if the given string is not a valid representation of a float.

    val of_string_opt : string -> float option

    Same as of_string, but returns None instead of raising.

    val to_string : float -> string

    Return a string representation of a floating-point number.

    This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

    This function is an alias for Stdlib.string_of_float.

    type fpclass = fpclass =
    1. | FP_normal
      (*

      Normal number, none of the below

      *)
    2. | FP_subnormal
      (*

      Number very close to 0.0, has reduced precision

      *)
    3. | FP_zero
      (*

      Number is 0.0 or -0.0

      *)
    4. | FP_infinite
      (*

      Number is positive or negative infinity

      *)
    5. | FP_nan
      (*

      Not a number: result of an undefined operation

      *)

    The five classes of floating-point numbers, as determined by the classify_float function.

    val classify_float : float -> fpclass

    Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

    val pow : float -> float -> float

    Exponentiation.

    val sqrt : float -> float

    Square root.

    val cbrt : float -> float

    Cube root.

    • since 4.13
    val exp : float -> float

    Exponential.

    val exp2 : float -> float

    Base 2 exponential function.

    • since 4.13
    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val log2 : float -> float

    Base 2 logarithm.

    • since 4.13
    val expm1 : float -> float

    expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

    val log1p : float -> float

    log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

    val cos : float -> float

    Cosine. Argument is in radians.

    val sin : float -> float

    Sine. Argument is in radians.

    val tan : float -> float

    Tangent. Argument is in radians.

    val acos : float -> float

    Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

    val asin : float -> float

    Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

    val atan : float -> float

    Arc tangent. Result is in radians and is between -pi/2 and pi/2.

    val atan2 : float -> float -> float

    atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

    val hypot : float -> float -> float

    hypot x y returns sqrt(x *. x +. y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

    val cosh : float -> float

    Hyperbolic cosine. Argument is in radians.

    val sinh : float -> float

    Hyperbolic sine. Argument is in radians.

    val tanh : float -> float

    Hyperbolic tangent. Argument is in radians.

    val acosh : float -> float

    Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

    • since 4.13
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13
    val atanh : float -> float

    Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

    • since 4.13
    val erf : float -> float

    Error function. The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

    • since 4.13
    val erfc : float -> float

    Complementary error function (erfc x = 1 - erf x). The argument ranges over the entire real line. The result is always within [-1.0, 1.0].

    • since 4.13
    val trunc : float -> float

    trunc x rounds x to the nearest integer whose absolute value is less than or equal to x.

    • since 4.08
    val round : float -> float

    round x rounds x to the nearest integer with ties (fractional values of 0.5) rounded away from zero, regardless of the current rounding direction. If x is an integer, +0., -0., nan, or infinite, x itself is returned.

    On 64-bit mingw-w64, this function may be emulated owing to a bug in the C runtime library (CRT) on this platform.

    • since 4.08
    val ceil : float -> float

    Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

    val floor : float -> float

    Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

    val next_after : float -> float -> float

    next_after x y returns the next representable floating-point value following x in the direction of y. More precisely, if y is greater (resp. less) than x, it returns the smallest (resp. largest) representable number greater (resp. less) than x. If x equals y, the function returns y. If x or y is nan, a nan is returned. Note that next_after max_float infinity = infinity and that next_after 0. infinity is the smallest denormalized positive number. If x is the smallest denormalized positive number, next_after x 0. = 0.

    • since 4.08
    val copy_sign : float -> float -> float

    copy_sign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

    val sign_bit : float -> bool

    sign_bit x is true if and only if the sign bit of x is set. For example sign_bit 1. and signbit 0. are false while sign_bit (-1.) and sign_bit (-0.) are true.

    • since 4.08
    val frexp : float -> float * int

    frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

    val ldexp : float -> int -> float

    ldexp x n returns x *. 2 ** n.

    val modf : float -> float * float

    modf f returns the pair of the fractional and integral part of f.

    type t = float

    An alias for the type of floating-point numbers.

    val compare : t -> t -> int

    compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

    val equal : t -> t -> bool

    The equal function for floating-point numbers, compared using compare.

    val min : t -> t -> t

    min x y returns the minimum of x and y. It returns nan when x or y is nan. Moreover min (-0.) (+0.) = -0.

    • since 4.08
    val max : float -> float -> float

    max x y returns the maximum of x and y. It returns nan when x or y is nan. Moreover max (-0.) (+0.) = +0.

    • since 4.08
    val min_max : float -> float -> float * float

    min_max x y is (min x y, max x y), just more efficient.

    • since 4.08
    val min_num : t -> t -> t

    min_num x y returns the minimum of x and y treating nan as missing values. If both x and y are nan, nan is returned. Moreover min_num (-0.) (+0.) = -0.

    • since 4.08
    val max_num : t -> t -> t

    max_num x y returns the maximum of x and y treating nan as missing values. If both x and y are nan nan is returned. Moreover max_num (-0.) (+0.) = +0.

    • since 4.08
    val min_max_num : float -> float -> float * float

    min_max_num x y is (min_num x y, max_num x y), just more efficient. Note that in particular min_max_num x nan = (x, x) and min_max_num nan y = (y, y).

    • since 4.08
    val seeded_hash : int -> t -> int

    A seeded hash function for floats, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for floats, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    module Array : sig ... end

    Float arrays with packed representation.

    module ArrayLabels : sig ... end

    Float arrays with packed representation (labeled functions).

    diff --git a/ocaml/Stdlib/Format/index.html b/ocaml/Stdlib/Format/index.html index 10902a2..dc3bb43 100644 --- a/ocaml/Stdlib/Format/index.html +++ b/ocaml/Stdlib/Format/index.html @@ -1,21 +1,15 @@ -Format (ocaml.Stdlib.Format)

    Module Stdlib.Format

    Pretty-printing.

    If you are new to this module, see the examples below.

    This module implements a pretty-printing facility to format values within 'pretty-printing boxes' and 'semantic tags' combined with a set of printf-like functions. The pretty-printer splits lines at specified break hints, and indents lines according to the box structure. Similarly, semantic tags can be used to decouple text presentation from its contents.

    This pretty-printing facility is implemented as an overlay on top of abstract formatters which provide basic output functions. Some formatters are predefined, notably:

    Most functions in the Format module come in two variants: a short version that operates on the current domain's standard formatter as obtained using get_std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument. For the version that operates on the current domain's standard formatter, the call to get_std_formatter is delayed until the last argument is received.

    More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

    Warning: Since formatters contain mutable state, it is not thread-safe to use the same formatter on multiple domains in parallel without synchronization.

    If multiple domains write to the same output channel using the predefined formatters (as obtained by get_std_formatter or get_err_formatter), the output from the domains will be interleaved with each other at points where the formatters are flushed, such as with print_flush. This synchronization is not performed by formatters obtained from formatter_of_out_channel (on the standard out channels or others).

    Introduction

    You may consider this module as providing an extension to the printf facility to provide automatic line splitting. The addition of pretty-printing annotations to your regular printf format strings gives you fancy indentation and line breaks. Pretty-printing annotations are described below in the documentation of the function Format.fprintf.

    You may also use the explicit pretty-printing box management and printing functions provided by this module. This style is more basic but more verbose than the concise fprintf format strings.

    For instance, the sequence open_box 0; print_string "x ="; print_space (); - print_int 1; close_box (); print_newline () that prints x = 1 within a pretty-printing box, can be abbreviated as printf "@[%s@ %i@]@." "x =" 1, or even shorter printf "@[x =@ %i@]@." 1.

    Rule of thumb for casual users of this library:

    • use simple pretty-printing boxes (as obtained by open_box 0);
    • use simple break hints as obtained by print_cut () that outputs a simple break hint, or by print_space () that outputs a space indicating a break hint;
    • once a pretty-printing box is open, display its material with basic printing functions (e. g. print_int and print_string);
    • when the material for a pretty-printing box has been printed, call close_box () to close the box;
    • at the end of pretty-printing, flush the pretty-printer to display all the remaining material, e.g. evaluate print_newline ().

    The behavior of pretty-printing commands is unspecified if there is no open pretty-printing box. Each box opened by one of the open_ functions below must be closed using close_box for proper formatting. Otherwise, some of the material printed in the boxes may not be output, or may be formatted incorrectly.

    In case of interactive use, each phrase is executed in the initial state of the standard pretty-printer: after each phrase execution, the interactive system closes all open pretty-printing boxes, flushes all pending text, and resets the standard pretty-printer.

    Warning: mixing calls to pretty-printing functions of this module with calls to Stdlib low level output functions is error prone.

    The pretty-printing functions output material that is delayed in the pretty-printer queue and stacks in order to compute proper line splitting. In contrast, basic I/O output functions write directly in their output device. As a consequence, the output of a basic I/O function may appear before the output of a pretty-printing function that has been called before. For instance, - Stdlib.print_string "<"; - Format.print_string "PRETTY"; - Stdlib.print_string ">"; - Format.print_string "TEXT"; - leads to output <>PRETTYTEXT.

    Formatters

    type formatter

    Abstract data corresponding to a pretty-printer (also called a formatter) and all its machinery. See also Defining formatters.

    Pretty-printing boxes

    The pretty-printing engine uses the concepts of pretty-printing box and break hint to drive indentation and line splitting behavior of the pretty-printer.

    Each different pretty-printing box kind introduces a specific line splitting policy:

    • within an horizontal box, break hints never split the line (but the line may be split in a box nested deeper),
    • within a vertical box, break hints always split the line,
    • within an horizontal/vertical box, if the box fits on the current line then break hints never split the line, otherwise break hint always split the line,
    • within a compacting box, a break hint never splits the line, unless there is no more room on the current line.

    Note that line splitting policy is box specific: the policy of a box does not rule the policy of inner boxes. For instance, if a vertical box is nested in an horizontal box, all break hints within the vertical box will split the line.

    Moreover, opening a box after the maximum indentation limit splits the line whether or not the box would end up fitting on the line.

    val pp_open_box : formatter -> int -> unit
    val open_box : int -> unit

    pp_open_box ppf d opens a new compacting pretty-printing box with offset d in the formatter ppf.

    Within this box, the pretty-printer prints as much as possible material on every line.

    A break hint splits the line if there is no more room on the line to print the remainder of the box.

    Within this box, the pretty-printer emphasizes the box structure: if a structural box does not fit fully on a simple line, a break hint also splits the line if the splitting ``moves to the left'' (i.e. the new line gets an indentation smaller than the one of the current line).

    This box is the general purpose pretty-printing box.

    If the pretty-printer splits the line in the box, offset d is added to the current indentation.

    val pp_close_box : formatter -> unit -> unit
    val close_box : unit -> unit

    Closes the most recently open pretty-printing box.

    val pp_open_hbox : formatter -> unit -> unit
    val open_hbox : unit -> unit

    pp_open_hbox ppf () opens a new 'horizontal' pretty-printing box.

    This box prints material on a single line.

    Break hints in a horizontal box never split the line. (Line splitting may still occur inside boxes nested deeper).

    val pp_open_vbox : formatter -> int -> unit
    val open_vbox : int -> unit

    pp_open_vbox ppf d opens a new 'vertical' pretty-printing box with offset d.

    This box prints material on as many lines as break hints in the box.

    Every break hint in a vertical box splits the line.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    val pp_open_hvbox : formatter -> int -> unit
    val open_hvbox : int -> unit

    pp_open_hvbox ppf d opens a new 'horizontal/vertical' pretty-printing box with offset d.

    This box behaves as an horizontal box if it fits on a single line, otherwise it behaves as a vertical box.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    val pp_open_hovbox : formatter -> int -> unit
    val open_hovbox : int -> unit

    pp_open_hovbox ppf d opens a new 'horizontal-or-vertical' pretty-printing box with offset d.

    This box prints material as much as possible on every line.

    A break hint splits the line if there is no more room on the line to print the remainder of the box.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    Formatting functions

    val pp_print_string : formatter -> string -> unit
    val print_string : string -> unit

    pp_print_string ppf s prints s in the current pretty-printing box.

    val pp_print_bytes : formatter -> bytes -> unit
    val print_bytes : bytes -> unit

    pp_print_bytes ppf b prints b in the current pretty-printing box.

    • since 4.13
    val pp_print_as : formatter -> int -> string -> unit
    val print_as : int -> string -> unit

    pp_print_as ppf len s prints s in the current pretty-printing box. The pretty-printer formats s as if it were of length len.

    val pp_print_int : formatter -> int -> unit
    val print_int : int -> unit

    Print an integer in the current pretty-printing box.

    val pp_print_float : formatter -> float -> unit
    val print_float : float -> unit

    Print a floating point number in the current pretty-printing box.

    val pp_print_char : formatter -> char -> unit
    val print_char : char -> unit

    Print a character in the current pretty-printing box.

    val pp_print_bool : formatter -> bool -> unit
    val print_bool : bool -> unit

    Print a boolean in the current pretty-printing box.

    Break hints

    A 'break hint' tells the pretty-printer to output some space or split the line whichever way is more appropriate to the current pretty-printing box splitting rules.

    Break hints are used to separate printing items and are mandatory to let the pretty-printer correctly split lines and indent items.

    Simple break hints are:

    • the 'space': output a space or split the line if appropriate,
    • the 'cut': split the line if appropriate.

    Note: the notions of space and line splitting are abstract for the pretty-printing engine, since those notions can be completely redefined by the programmer. However, in the pretty-printer default setting, ``output a space'' simply means printing a space character (ASCII code 32) and ``split the line'' means printing a newline character (ASCII code 10).

    val pp_print_space : formatter -> unit -> unit
    val print_space : unit -> unit

    pp_print_space ppf () emits a 'space' break hint: the pretty-printer may split the line at this point, otherwise it prints one space.

    pp_print_space ppf () is equivalent to pp_print_break ppf 1 0.

    val pp_print_cut : formatter -> unit -> unit
    val print_cut : unit -> unit

    pp_print_cut ppf () emits a 'cut' break hint: the pretty-printer may split the line at this point, otherwise it prints nothing.

    pp_print_cut ppf () is equivalent to pp_print_break ppf 0 0.

    val pp_print_break : formatter -> int -> int -> unit
    val print_break : int -> int -> unit

    pp_print_break ppf nspaces offset emits a 'full' break hint: the pretty-printer may split the line at this point, otherwise it prints nspaces spaces.

    If the pretty-printer splits the line, offset is added to the current indentation.

    val pp_print_custom_break : +Format (ocaml.Stdlib.Format)

    Module Stdlib.Format

    Pretty-printing.

    If you are new to this module, see the examples below.

    This module implements a pretty-printing facility to format values within 'pretty-printing boxes' and 'semantic tags' combined with a set of printf-like functions. The pretty-printer splits lines at specified break hints, and indents lines according to the box structure. Similarly, semantic tags can be used to decouple text presentation from its contents.

    This pretty-printing facility is implemented as an overlay on top of abstract formatters which provide basic output functions. Some formatters are predefined, notably:

    Most functions in the Format module come in two variants: a short version that operates on the current domain's standard formatter as obtained using get_std_formatter and the generic version prefixed by pp_ that takes a formatter as its first argument. For the version that operates on the current domain's standard formatter, the call to get_std_formatter is delayed until the last argument is received.

    More formatters can be created with formatter_of_out_channel, formatter_of_buffer, formatter_of_symbolic_output_buffer or using custom formatters.

    Warning: Since formatters contain mutable state, it is not thread-safe to use the same formatter on multiple domains in parallel without synchronization.

    If multiple domains write to the same output channel using the predefined formatters (as obtained by get_std_formatter or get_err_formatter), the output from the domains will be interleaved with each other at points where the formatters are flushed, such as with print_flush. This synchronization is not performed by formatters obtained from formatter_of_out_channel (on the standard out channels or others).

    Introduction

    You may consider this module as providing an extension to the printf facility to provide automatic line splitting. The addition of pretty-printing annotations to your regular printf format strings gives you fancy indentation and line breaks. Pretty-printing annotations are described below in the documentation of the function Format.fprintf.

    You may also use the explicit pretty-printing box management and printing functions provided by this module. This style is more basic but more verbose than the concise fprintf format strings.

    For instance, the sequence open_box 0; print_string "x ="; print_space (); print_int 1; close_box (); print_newline () that prints x = 1 within a pretty-printing box, can be abbreviated as printf "@[%s@ %i@]@." "x =" 1, or even shorter printf "@[x =@ %i@]@." 1.

    Rule of thumb for casual users of this library:

    • use simple pretty-printing boxes (as obtained by open_box 0);
    • use simple break hints as obtained by print_cut () that outputs a simple break hint, or by print_space () that outputs a space indicating a break hint;
    • once a pretty-printing box is open, display its material with basic printing functions (e. g. print_int and print_string);
    • when the material for a pretty-printing box has been printed, call close_box () to close the box;
    • at the end of pretty-printing, flush the pretty-printer to display all the remaining material, e.g. evaluate print_newline ().

    The behavior of pretty-printing commands is unspecified if there is no open pretty-printing box. Each box opened by one of the open_ functions below must be closed using close_box for proper formatting. Otherwise, some of the material printed in the boxes may not be output, or may be formatted incorrectly.

    In case of interactive use, each phrase is executed in the initial state of the standard pretty-printer: after each phrase execution, the interactive system closes all open pretty-printing boxes, flushes all pending text, and resets the standard pretty-printer.

    Warning: mixing calls to pretty-printing functions of this module with calls to Stdlib low level output functions is error prone.

    The pretty-printing functions output material that is delayed in the pretty-printer queue and stacks in order to compute proper line splitting. In contrast, basic I/O output functions write directly in their output device. As a consequence, the output of a basic I/O function may appear before the output of a pretty-printing function that has been called before. For instance, Stdlib.print_string "<"; Format.print_string "PRETTY"; Stdlib.print_string ">"; Format.print_string "TEXT"; leads to output <>PRETTYTEXT.

    Formatters

    type formatter

    Abstract data corresponding to a pretty-printer (also called a formatter) and all its machinery. See also Defining formatters.

    Pretty-printing boxes

    The pretty-printing engine uses the concepts of pretty-printing box and break hint to drive indentation and line splitting behavior of the pretty-printer.

    Each different pretty-printing box kind introduces a specific line splitting policy:

    • within an horizontal box, break hints never split the line (but the line may be split in a box nested deeper),
    • within a vertical box, break hints always split the line,
    • within an horizontal/vertical box, if the box fits on the current line then break hints never split the line, otherwise break hint always split the line,
    • within a compacting box, a break hint never splits the line, unless there is no more room on the current line.

    Note that line splitting policy is box specific: the policy of a box does not rule the policy of inner boxes. For instance, if a vertical box is nested in an horizontal box, all break hints within the vertical box will split the line.

    Moreover, opening a box after the maximum indentation limit splits the line whether or not the box would end up fitting on the line.

    val pp_open_box : formatter -> int -> unit
    val open_box : int -> unit

    pp_open_box ppf d opens a new compacting pretty-printing box with offset d in the formatter ppf.

    Within this box, the pretty-printer prints as much as possible material on every line.

    A break hint splits the line if there is no more room on the line to print the remainder of the box.

    Within this box, the pretty-printer emphasizes the box structure: if a structural box does not fit fully on a simple line, a break hint also splits the line if the splitting ``moves to the left'' (i.e. the new line gets an indentation smaller than the one of the current line).

    This box is the general purpose pretty-printing box.

    If the pretty-printer splits the line in the box, offset d is added to the current indentation.

    val pp_close_box : formatter -> unit -> unit
    val close_box : unit -> unit

    Closes the most recently open pretty-printing box.

    val pp_open_hbox : formatter -> unit -> unit
    val open_hbox : unit -> unit

    pp_open_hbox ppf () opens a new 'horizontal' pretty-printing box.

    This box prints material on a single line.

    Break hints in a horizontal box never split the line. (Line splitting may still occur inside boxes nested deeper).

    val pp_open_vbox : formatter -> int -> unit
    val open_vbox : int -> unit

    pp_open_vbox ppf d opens a new 'vertical' pretty-printing box with offset d.

    This box prints material on as many lines as break hints in the box.

    Every break hint in a vertical box splits the line.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    val pp_open_hvbox : formatter -> int -> unit
    val open_hvbox : int -> unit

    pp_open_hvbox ppf d opens a new 'horizontal/vertical' pretty-printing box with offset d.

    This box behaves as an horizontal box if it fits on a single line, otherwise it behaves as a vertical box.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    val pp_open_hovbox : formatter -> int -> unit
    val open_hovbox : int -> unit

    pp_open_hovbox ppf d opens a new 'horizontal-or-vertical' pretty-printing box with offset d.

    This box prints material as much as possible on every line.

    A break hint splits the line if there is no more room on the line to print the remainder of the box.

    If the pretty-printer splits the line in the box, d is added to the current indentation.

    Formatting functions

    val pp_print_string : formatter -> string -> unit
    val print_string : string -> unit

    pp_print_string ppf s prints s in the current pretty-printing box.

    val pp_print_bytes : formatter -> bytes -> unit
    val print_bytes : bytes -> unit

    pp_print_bytes ppf b prints b in the current pretty-printing box.

    • since 4.13
    val pp_print_as : formatter -> int -> string -> unit
    val print_as : int -> string -> unit

    pp_print_as ppf len s prints s in the current pretty-printing box. The pretty-printer formats s as if it were of length len.

    val pp_print_int : formatter -> int -> unit
    val print_int : int -> unit

    Print an integer in the current pretty-printing box.

    val pp_print_float : formatter -> float -> unit
    val print_float : float -> unit

    Print a floating point number in the current pretty-printing box.

    val pp_print_char : formatter -> char -> unit
    val print_char : char -> unit

    Print a character in the current pretty-printing box.

    val pp_print_bool : formatter -> bool -> unit
    val print_bool : bool -> unit

    Print a boolean in the current pretty-printing box.

    Break hints

    A 'break hint' tells the pretty-printer to output some space or split the line whichever way is more appropriate to the current pretty-printing box splitting rules.

    Break hints are used to separate printing items and are mandatory to let the pretty-printer correctly split lines and indent items.

    Simple break hints are:

    • the 'space': output a space or split the line if appropriate,
    • the 'cut': split the line if appropriate.

    Note: the notions of space and line splitting are abstract for the pretty-printing engine, since those notions can be completely redefined by the programmer. However, in the pretty-printer default setting, ``output a space'' simply means printing a space character (ASCII code 32) and ``split the line'' means printing a newline character (ASCII code 10).

    val pp_print_space : formatter -> unit -> unit
    val print_space : unit -> unit

    pp_print_space ppf () emits a 'space' break hint: the pretty-printer may split the line at this point, otherwise it prints one space.

    pp_print_space ppf () is equivalent to pp_print_break ppf 1 0.

    val pp_print_cut : formatter -> unit -> unit
    val print_cut : unit -> unit

    pp_print_cut ppf () emits a 'cut' break hint: the pretty-printer may split the line at this point, otherwise it prints nothing.

    pp_print_cut ppf () is equivalent to pp_print_break ppf 0 0.

    val pp_print_break : formatter -> int -> int -> unit
    val print_break : int -> int -> unit

    pp_print_break ppf nspaces offset emits a 'full' break hint: the pretty-printer may split the line at this point, otherwise it prints nspaces spaces.

    If the pretty-printer splits the line, offset is added to the current indentation.

    val pp_print_custom_break : formatter -> - fits:(string * int * string) -> - breaks:(string * int * string) -> + fits:(string * int * string) -> + breaks:(string * int * string) -> unit

    pp_print_custom_break ppf ~fits:(s1, n, s2) ~breaks:(s3, m, s4) emits a custom break hint: the pretty-printer may split the line at this point.

    If it does not split the line, then the s1 is emitted, then n spaces, then s2.

    If it splits the line, then it emits the s3 string, then an indent (according to the box rules), then an offset of m spaces, then the s4 string.

    While n and m are handled by formatter_out_functions.out_indent, the strings will be handled by formatter_out_functions.out_string. This allows for a custom formatter that handles indentation distinctly, for example, outputs <br/> tags or &nbsp; entities.

    The custom break is useful if you want to change which visible (non-whitespace) characters are printed in case of break or no break. For example, when printing a list [a; b; c] , you might want to add a trailing semicolon when it is printed vertically:

    [
       a;
       b;
       c;
     ]

    You can do this as follows:

    printf "@[<v 0>[@;<0 2>@[<v 0>a;@,b;@,c@]%t]@]@\n"
    -  (pp_print_custom_break ~fits:("", 0, "") ~breaks:(";", 0, ""))
    • since 4.08
    val pp_force_newline : formatter -> unit -> unit
    val force_newline : unit -> unit

    Force a new line in the current pretty-printing box.

    The pretty-printer must split the line at this point,

    Not the normal way of pretty-printing, since imperative line splitting may interfere with current line counters and box size calculation. Using break hints within an enclosing vertical box is a better alternative.

    val pp_print_if_newline : formatter -> unit -> unit
    val print_if_newline : unit -> unit

    Execute the next formatting command if the preceding line has just been split. Otherwise, ignore the next formatting command.

    Pretty-printing termination

    val pp_print_flush : formatter -> unit -> unit
    val print_flush : unit -> unit

    End of pretty-printing: resets the pretty-printer to initial state.

    All open pretty-printing boxes are closed, all pending text is printed. In addition, the pretty-printer low level output device is flushed to ensure that all pending text is really displayed.

    Note: never use print_flush in the normal course of a pretty-printing routine, since the pretty-printer uses a complex buffering machinery to properly indent the output; manually flushing those buffers at random would conflict with the pretty-printer strategy and result to poor rendering.

    Only consider using print_flush when displaying all pending material is mandatory (for instance in case of interactive use when you want the user to read some text) and when resetting the pretty-printer state will not disturb further pretty-printing.

    Warning: If the output device of the pretty-printer is an output channel, repeated calls to print_flush means repeated calls to Stdlib.flush to flush the out channel; these explicit flush calls could foil the buffering strategy of output channels and could dramatically impact efficiency.

    val pp_print_newline : formatter -> unit -> unit
    val print_newline : unit -> unit

    End of pretty-printing: resets the pretty-printer to initial state.

    All open pretty-printing boxes are closed, all pending text is printed.

    Equivalent to print_flush with a new line emitted on the pretty-printer low-level output device immediately before the device is flushed. See corresponding words of caution for print_flush.

    Note: this is not the normal way to output a new line; the preferred method is using break hints within a vertical pretty-printing box.

    Margin

    val pp_set_margin : formatter -> int -> unit
    val set_margin : int -> unit

    pp_set_margin ppf d sets the right margin to d (in characters): the pretty-printer splits lines that overflow the right margin according to the break hints given. Setting the margin to d means that the formatting engine aims at printing at most d-1 characters per line. Nothing happens if d is smaller than 2. If d is too large, the right margin is set to the maximum admissible value (which is greater than 10 ^ 9). If d is less than the current maximum indentation limit, the maximum indentation limit is decreased while trying to preserve a minimal ratio max_indent/margin>=50% and if possible the current difference margin - max_indent.

    See also pp_set_geometry.

    val pp_get_margin : formatter -> unit -> int
    val get_margin : unit -> int

    Returns the position of the right margin.

    Maximum indentation limit

    val pp_set_max_indent : formatter -> int -> unit
    val set_max_indent : int -> unit

    pp_set_max_indent ppf d sets the maximum indentation limit of lines to d (in characters): once this limit is reached, new pretty-printing boxes are rejected to the left, unless the enclosing box fully fits on the current line. As an illustration,

    set_margin 10; set_max_indent 5; printf "@[123456@[7@]89A@]@." 

    yields

    123456
    -789A

    because the nested box "@[7@]" is opened after the maximum indentation limit (7>5) and its parent box does not fit on the current line. Either decreasing the length of the parent box to make it fit on a line:

    printf "@[123456@[7@]89@]@." 

    or opening an intermediary box before the maximum indentation limit which fits on the current line

    printf "@[123@[456@[7@]89@]A@]@." 

    avoids the rejection to the left of the inner boxes and print respectively "123456789" and "123456789A" . Note also that vertical boxes never fit on a line whereas horizontal boxes always fully fit on the current line. Opening a box may split a line whereas the contents may have fit. If this behavior is problematic, it can be curtailed by setting the maximum indentation limit to margin - 1. Note that setting the maximum indentation limit to margin is invalid.

    Nothing happens if d is smaller than 2.

    If d is too large, the limit is set to the maximum admissible value (which is greater than 10 ^ 9).

    If d is greater or equal than the current margin, it is ignored, and the current maximum indentation limit is kept.

    See also pp_set_geometry.

    val pp_get_max_indent : formatter -> unit -> int
    val get_max_indent : unit -> int

    Return the maximum indentation limit (in characters).

    Geometry

    Geometric functions can be used to manipulate simultaneously the coupled variables, margin and maximum indentation limit.

    type geometry = {
    1. max_indent : int;
    2. margin : int;
    }
    • since 4.08
    val check_geometry : geometry -> bool

    Check if the formatter geometry is valid: 1 < max_indent < margin

    • since 4.08
    val pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit
    val set_geometry : max_indent:int -> margin:int -> unit
    val pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit
    val safe_set_geometry : max_indent:int -> margin:int -> unit

    pp_set_geometry ppf ~max_indent ~margin sets both the margin and maximum indentation limit for ppf.

    When 1 < max_indent < margin, pp_set_geometry ppf ~max_indent ~margin is equivalent to pp_set_margin ppf margin; pp_set_max_indent ppf max_indent; and avoids the subtly incorrect pp_set_max_indent ppf max_indent; pp_set_margin ppf margin;

    Outside of this domain, pp_set_geometry raises an invalid argument exception whereas pp_safe_set_geometry does nothing.

    • since 4.08
    val pp_update_geometry : formatter -> (geometry -> geometry) -> unit

    pp_update_geometry ppf (fun geo -> { geo with ... }) lets you update a formatter's geometry in a way that is robust to extension of the geometry record with new fields.

    Raises an invalid argument exception if the returned geometry does not satisfy check_geometry.

    • since 4.11
    val update_geometry : (geometry -> geometry) -> unit
    val pp_get_geometry : formatter -> unit -> geometry
    val get_geometry : unit -> geometry

    Return the current geometry of the formatter

    • since 4.08

    Maximum formatting depth

    The maximum formatting depth is the maximum number of pretty-printing boxes simultaneously open.

    Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

    val pp_set_max_boxes : formatter -> int -> unit
    val set_max_boxes : int -> unit

    pp_set_max_boxes ppf max sets the maximum number of pretty-printing boxes simultaneously open.

    Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

    Nothing happens if max is smaller than 2.

    val pp_get_max_boxes : formatter -> unit -> int
    val get_max_boxes : unit -> int

    Returns the maximum number of pretty-printing boxes allowed before ellipsis.

    val pp_over_max_boxes : formatter -> unit -> bool
    val over_max_boxes : unit -> bool

    Tests if the maximum number of pretty-printing boxes allowed have already been opened.

    Tabulation boxes

    A tabulation box prints material on lines divided into cells of fixed length. A tabulation box provides a simple way to display vertical columns of left adjusted text.

    This box features command set_tab to define cell boundaries, and command print_tab to move from cell to cell and split the line when there is no more cells to print on the line.

    Note: printing within tabulation box is line directed, so arbitrary line splitting inside a tabulation box leads to poor rendering. Yet, controlled use of tabulation boxes allows simple printing of columns within module Format.

    val pp_open_tbox : formatter -> unit -> unit
    val open_tbox : unit -> unit

    open_tbox () opens a new tabulation box.

    This box prints lines separated into cells of fixed width.

    Inside a tabulation box, special tabulation markers defines points of interest on the line (for instance to delimit cell boundaries). Function Format.set_tab sets a tabulation marker at insertion point.

    A tabulation box features specific tabulation breaks to move to next tabulation marker or split the line. Function Format.print_tbreak prints a tabulation break.

    val pp_close_tbox : formatter -> unit -> unit
    val close_tbox : unit -> unit

    Closes the most recently opened tabulation box.

    val pp_set_tab : formatter -> unit -> unit
    val set_tab : unit -> unit

    Sets a tabulation marker at current insertion point.

    val pp_print_tab : formatter -> unit -> unit
    val print_tab : unit -> unit

    print_tab () emits a 'next' tabulation break hint: if not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right, or the pretty-printer splits the line and insertion point moves to the leftmost tabulation marker.

    It is equivalent to print_tbreak 0 0.

    val pp_print_tbreak : formatter -> int -> int -> unit
    val print_tbreak : int -> int -> unit

    print_tbreak nspaces offset emits a 'full' tabulation break hint.

    If not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right and the pretty-printer prints nspaces spaces.

    If there is no next tabulation marker on the right, the pretty-printer splits the line at this point, then insertion point moves to the leftmost tabulation marker of the box.

    If the pretty-printer splits the line, offset is added to the current indentation.

    Ellipsis

    val pp_set_ellipsis_text : formatter -> string -> unit
    val set_ellipsis_text : string -> unit

    Set the text of the ellipsis printed when too many pretty-printing boxes are open (a single dot, ., by default).

    val pp_get_ellipsis_text : formatter -> unit -> string
    val get_ellipsis_text : unit -> string

    Return the text of the ellipsis.

    Semantic tags

    type stag = ..

    Semantic tags (or simply tags) are user's defined annotations to associate user's specific operations to printed entities.

    Common usage of semantic tags is text decoration to get specific font or text size rendering for a display device, or marking delimitation of entities (e.g. HTML or TeX elements or terminal escape sequences). More sophisticated usage of semantic tags could handle dynamic modification of the pretty-printer behavior to properly print the material within some specific tags. For instance, we can define an RGB tag like so:

    type stag += RGB of {r:int;g:int;b:int}

    In order to properly delimit printed entities, a semantic tag must be opened before and closed after the entity. Semantic tags must be properly nested like parentheses using pp_open_stag and pp_close_stag.

    Tag specific operations occur any time a tag is opened or closed, At each occurrence, two kinds of operations are performed tag-marking and tag-printing:

    • The tag-marking operation is the simpler tag specific operation: it simply writes a tag specific string into the output device of the formatter. Tag-marking does not interfere with line-splitting computation.
    • The tag-printing operation is the more involved tag specific operation: it can print arbitrary material to the formatter. Tag-printing is tightly linked to the current pretty-printer operations.

    Roughly speaking, tag-marking is commonly used to get a better rendering of texts in the rendering device, while tag-printing allows fine tuning of printing routines to print the same entity differently according to the semantic tags (i.e. print additional material or even omit parts of the output).

    More precisely: when a semantic tag is opened or closed then both and successive 'tag-printing' and 'tag-marking' operations occur:

    • Tag-printing a semantic tag means calling the formatter specific function print_open_stag (resp. print_close_stag) with the name of the tag as argument: that tag-printing function can then print any regular material to the formatter (so that this material is enqueued as usual in the formatter queue for further line splitting computation).
    • Tag-marking a semantic tag means calling the formatter specific function mark_open_stag (resp. mark_close_stag) with the name of the tag as argument: that tag-marking function can then return the 'tag-opening marker' (resp. `tag-closing marker') for direct output into the output device of the formatter.

    Being written directly into the output device of the formatter, semantic tag marker strings are not considered as part of the printing material that drives line splitting (in other words, the length of the strings corresponding to tag markers is considered as zero for line splitting).

    Thus, semantic tag handling is in some sense transparent to pretty-printing and does not interfere with usual indentation. Hence, a single pretty-printing routine can output both simple 'verbatim' material or richer decorated output depending on the treatment of tags. By default, tags are not active, hence the output is not decorated with tag information. Once set_tags is set to true, the pretty-printer engine honors tags and decorates the output accordingly.

    Default tag-marking functions behave the HTML way: string tags are enclosed in "<" and ">" while other tags are ignored; hence, opening marker for tag string "t" is "<t>" and closing marker is "</t>".

    Default tag-printing functions just do nothing.

    Tag-marking and tag-printing functions are user definable and can be set by calling set_formatter_stag_functions.

    Semantic tag operations may be set on or off with set_tags. Tag-marking operations may be set on or off with set_mark_tags. Tag-printing operations may be set on or off with set_print_tags.

    • since 4.08
    type tag = string
    type stag +=
    1. | String_tag of tag
      (*

      String_tag s is a string tag s. String tags can be inserted either by explicitly using the constructor String_tag or by using the dedicated format syntax "@{<s> ... @}".

      • since 4.08
      *)
    val pp_open_stag : formatter -> stag -> unit
    val open_stag : stag -> unit

    pp_open_stag ppf t opens the semantic tag named t.

    The print_open_stag tag-printing function of the formatter is called with t as argument; then the opening tag marker for t, as given by mark_open_stag t, is written into the output device of the formatter.

    • since 4.08
    val pp_close_stag : formatter -> unit -> unit
    val close_stag : unit -> unit

    pp_close_stag ppf () closes the most recently opened semantic tag t.

    The closing tag marker, as given by mark_close_stag t, is written into the output device of the formatter; then the print_close_stag tag-printing function of the formatter is called with t as argument.

    • since 4.08
    val pp_set_tags : formatter -> bool -> unit
    val set_tags : bool -> unit

    pp_set_tags ppf b turns on or off the treatment of semantic tags (default is off).

    val pp_set_print_tags : formatter -> bool -> unit
    val set_print_tags : bool -> unit

    pp_set_print_tags ppf b turns on or off the tag-printing operations.

    val pp_set_mark_tags : formatter -> bool -> unit
    val set_mark_tags : bool -> unit

    pp_set_mark_tags ppf b turns on or off the tag-marking operations.

    val pp_get_print_tags : formatter -> unit -> bool
    val get_print_tags : unit -> bool

    Return the current status of tag-printing operations.

    val pp_get_mark_tags : formatter -> unit -> bool
    val get_mark_tags : unit -> bool

    Return the current status of tag-marking operations.

    val pp_set_formatter_out_channel : formatter -> out_channel -> unit

    Redirecting the standard formatter output

    val set_formatter_out_channel : out_channel -> unit

    Redirect the standard pretty-printer output to the given channel. (All the output functions of the standard formatter are set to the default output functions printing to the given channel.)

    set_formatter_out_channel is equivalent to pp_set_formatter_out_channel std_formatter.

    val pp_set_formatter_output_functions : + (pp_print_custom_break ~fits:("", 0, "") ~breaks:(";", 0, ""))
    • since 4.08
    val pp_force_newline : formatter -> unit -> unit
    val force_newline : unit -> unit

    Force a new line in the current pretty-printing box.

    The pretty-printer must split the line at this point,

    Not the normal way of pretty-printing, since imperative line splitting may interfere with current line counters and box size calculation. Using break hints within an enclosing vertical box is a better alternative.

    val pp_print_if_newline : formatter -> unit -> unit
    val print_if_newline : unit -> unit

    Execute the next formatting command if the preceding line has just been split. Otherwise, ignore the next formatting command.

    Pretty-printing termination

    val pp_print_flush : formatter -> unit -> unit
    val print_flush : unit -> unit

    End of pretty-printing: resets the pretty-printer to initial state.

    All open pretty-printing boxes are closed, all pending text is printed. In addition, the pretty-printer low level output device is flushed to ensure that all pending text is really displayed.

    Note: never use print_flush in the normal course of a pretty-printing routine, since the pretty-printer uses a complex buffering machinery to properly indent the output; manually flushing those buffers at random would conflict with the pretty-printer strategy and result to poor rendering.

    Only consider using print_flush when displaying all pending material is mandatory (for instance in case of interactive use when you want the user to read some text) and when resetting the pretty-printer state will not disturb further pretty-printing.

    Warning: If the output device of the pretty-printer is an output channel, repeated calls to print_flush means repeated calls to Stdlib.flush to flush the out channel; these explicit flush calls could foil the buffering strategy of output channels and could dramatically impact efficiency.

    val pp_print_newline : formatter -> unit -> unit
    val print_newline : unit -> unit

    End of pretty-printing: resets the pretty-printer to initial state.

    All open pretty-printing boxes are closed, all pending text is printed.

    Equivalent to print_flush with a new line emitted on the pretty-printer low-level output device immediately before the device is flushed. See corresponding words of caution for print_flush.

    Note: this is not the normal way to output a new line; the preferred method is using break hints within a vertical pretty-printing box.

    Margin

    val pp_set_margin : formatter -> int -> unit
    val set_margin : int -> unit

    pp_set_margin ppf d sets the right margin to d (in characters): the pretty-printer splits lines that overflow the right margin according to the break hints given. Setting the margin to d means that the formatting engine aims at printing at most d-1 characters per line. Nothing happens if d is smaller than 2. If d is too large, the right margin is set to the maximum admissible value (which is greater than 10 ^ 9). If d is less than the current maximum indentation limit, the maximum indentation limit is decreased while trying to preserve a minimal ratio max_indent/margin>=50% and if possible the current difference margin - max_indent.

    See also pp_set_geometry.

    val pp_get_margin : formatter -> unit -> int
    val get_margin : unit -> int

    Returns the position of the right margin.

    Maximum indentation limit

    val pp_set_max_indent : formatter -> int -> unit
    val set_max_indent : int -> unit

    pp_set_max_indent ppf d sets the maximum indentation limit of lines to d (in characters): once this limit is reached, new pretty-printing boxes are rejected to the left, unless the enclosing box fully fits on the current line. As an illustration,

     set_margin 10; set_max_indent 5; printf "@[123456@[7@]89A@]@." 

    yields

      123456
    +  789A

    because the nested box "@[7@]" is opened after the maximum indentation limit (7>5) and its parent box does not fit on the current line. Either decreasing the length of the parent box to make it fit on a line:

     printf "@[123456@[7@]89@]@." 

    or opening an intermediary box before the maximum indentation limit which fits on the current line

     printf "@[123@[456@[7@]89@]A@]@." 

    avoids the rejection to the left of the inner boxes and print respectively "123456789" and "123456789A" . Note also that vertical boxes never fit on a line whereas horizontal boxes always fully fit on the current line. Opening a box may split a line whereas the contents may have fit. If this behavior is problematic, it can be curtailed by setting the maximum indentation limit to margin - 1. Note that setting the maximum indentation limit to margin is invalid.

    Nothing happens if d is smaller than 2.

    If d is too large, the limit is set to the maximum admissible value (which is greater than 10 ^ 9).

    If d is greater or equal than the current margin, it is ignored, and the current maximum indentation limit is kept.

    See also pp_set_geometry.

    val pp_get_max_indent : formatter -> unit -> int
    val get_max_indent : unit -> int

    Return the maximum indentation limit (in characters).

    Geometry

    Geometric functions can be used to manipulate simultaneously the coupled variables, margin and maximum indentation limit.

    type geometry = {
    1. max_indent : int;
    2. margin : int;
    }
    • since 4.08
    val check_geometry : geometry -> bool

    Check if the formatter geometry is valid: 1 < max_indent < margin

    • since 4.08
    val pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit
    val set_geometry : max_indent:int -> margin:int -> unit
    val pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit
    val safe_set_geometry : max_indent:int -> margin:int -> unit

    pp_set_geometry ppf ~max_indent ~margin sets both the margin and maximum indentation limit for ppf.

    When 1 < max_indent < margin, pp_set_geometry ppf ~max_indent ~margin is equivalent to pp_set_margin ppf margin; pp_set_max_indent ppf max_indent; and avoids the subtly incorrect pp_set_max_indent ppf max_indent; pp_set_margin ppf margin;

    Outside of this domain, pp_set_geometry raises an invalid argument exception whereas pp_safe_set_geometry does nothing.

    • since 4.08
    val pp_update_geometry : formatter -> (geometry -> geometry) -> unit

    pp_update_geometry ppf (fun geo -> { geo with ... }) lets you update a formatter's geometry in a way that is robust to extension of the geometry record with new fields.

    Raises an invalid argument exception if the returned geometry does not satisfy check_geometry.

    • since 4.11
    val update_geometry : (geometry -> geometry) -> unit
    val pp_get_geometry : formatter -> unit -> geometry
    val get_geometry : unit -> geometry

    Return the current geometry of the formatter

    • since 4.08

    Maximum formatting depth

    The maximum formatting depth is the maximum number of pretty-printing boxes simultaneously open.

    Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

    val pp_set_max_boxes : formatter -> int -> unit
    val set_max_boxes : int -> unit

    pp_set_max_boxes ppf max sets the maximum number of pretty-printing boxes simultaneously open.

    Material inside boxes nested deeper is printed as an ellipsis (more precisely as the text returned by get_ellipsis_text ()).

    Nothing happens if max is smaller than 2.

    val pp_get_max_boxes : formatter -> unit -> int
    val get_max_boxes : unit -> int

    Returns the maximum number of pretty-printing boxes allowed before ellipsis.

    val pp_over_max_boxes : formatter -> unit -> bool
    val over_max_boxes : unit -> bool

    Tests if the maximum number of pretty-printing boxes allowed have already been opened.

    Tabulation boxes

    A tabulation box prints material on lines divided into cells of fixed length. A tabulation box provides a simple way to display vertical columns of left adjusted text.

    This box features command set_tab to define cell boundaries, and command print_tab to move from cell to cell and split the line when there is no more cells to print on the line.

    Note: printing within tabulation box is line directed, so arbitrary line splitting inside a tabulation box leads to poor rendering. Yet, controlled use of tabulation boxes allows simple printing of columns within module Format.

    val pp_open_tbox : formatter -> unit -> unit
    val open_tbox : unit -> unit

    open_tbox () opens a new tabulation box.

    This box prints lines separated into cells of fixed width.

    Inside a tabulation box, special tabulation markers defines points of interest on the line (for instance to delimit cell boundaries). Function Format.set_tab sets a tabulation marker at insertion point.

    A tabulation box features specific tabulation breaks to move to next tabulation marker or split the line. Function Format.print_tbreak prints a tabulation break.

    val pp_close_tbox : formatter -> unit -> unit
    val close_tbox : unit -> unit

    Closes the most recently opened tabulation box.

    val pp_set_tab : formatter -> unit -> unit
    val set_tab : unit -> unit

    Sets a tabulation marker at current insertion point.

    val pp_print_tab : formatter -> unit -> unit
    val print_tab : unit -> unit

    print_tab () emits a 'next' tabulation break hint: if not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right, or the pretty-printer splits the line and insertion point moves to the leftmost tabulation marker.

    It is equivalent to print_tbreak 0 0.

    val pp_print_tbreak : formatter -> int -> int -> unit
    val print_tbreak : int -> int -> unit

    print_tbreak nspaces offset emits a 'full' tabulation break hint.

    If not already set on a tabulation marker, the insertion point moves to the first tabulation marker on the right and the pretty-printer prints nspaces spaces.

    If there is no next tabulation marker on the right, the pretty-printer splits the line at this point, then insertion point moves to the leftmost tabulation marker of the box.

    If the pretty-printer splits the line, offset is added to the current indentation.

    Ellipsis

    val pp_set_ellipsis_text : formatter -> string -> unit
    val set_ellipsis_text : string -> unit

    Set the text of the ellipsis printed when too many pretty-printing boxes are open (a single dot, ., by default).

    val pp_get_ellipsis_text : formatter -> unit -> string
    val get_ellipsis_text : unit -> string

    Return the text of the ellipsis.

    Semantic tags

    type stag = ..

    Semantic tags (or simply tags) are user's defined annotations to associate user's specific operations to printed entities.

    Common usage of semantic tags is text decoration to get specific font or text size rendering for a display device, or marking delimitation of entities (e.g. HTML or TeX elements or terminal escape sequences). More sophisticated usage of semantic tags could handle dynamic modification of the pretty-printer behavior to properly print the material within some specific tags. For instance, we can define an RGB tag like so:

    type stag += RGB of {r:int;g:int;b:int}

    In order to properly delimit printed entities, a semantic tag must be opened before and closed after the entity. Semantic tags must be properly nested like parentheses using pp_open_stag and pp_close_stag.

    Tag specific operations occur any time a tag is opened or closed, At each occurrence, two kinds of operations are performed tag-marking and tag-printing:

    • The tag-marking operation is the simpler tag specific operation: it simply writes a tag specific string into the output device of the formatter. Tag-marking does not interfere with line-splitting computation.
    • The tag-printing operation is the more involved tag specific operation: it can print arbitrary material to the formatter. Tag-printing is tightly linked to the current pretty-printer operations.

    Roughly speaking, tag-marking is commonly used to get a better rendering of texts in the rendering device, while tag-printing allows fine tuning of printing routines to print the same entity differently according to the semantic tags (i.e. print additional material or even omit parts of the output).

    More precisely: when a semantic tag is opened or closed then both and successive 'tag-printing' and 'tag-marking' operations occur:

    • Tag-printing a semantic tag means calling the formatter specific function print_open_stag (resp. print_close_stag) with the name of the tag as argument: that tag-printing function can then print any regular material to the formatter (so that this material is enqueued as usual in the formatter queue for further line splitting computation).
    • Tag-marking a semantic tag means calling the formatter specific function mark_open_stag (resp. mark_close_stag) with the name of the tag as argument: that tag-marking function can then return the 'tag-opening marker' (resp. `tag-closing marker') for direct output into the output device of the formatter.

    Being written directly into the output device of the formatter, semantic tag marker strings are not considered as part of the printing material that drives line splitting (in other words, the length of the strings corresponding to tag markers is considered as zero for line splitting).

    Thus, semantic tag handling is in some sense transparent to pretty-printing and does not interfere with usual indentation. Hence, a single pretty-printing routine can output both simple 'verbatim' material or richer decorated output depending on the treatment of tags. By default, tags are not active, hence the output is not decorated with tag information. Once set_tags is set to true, the pretty-printer engine honors tags and decorates the output accordingly.

    Default tag-marking functions behave the HTML way: string tags are enclosed in "<" and ">" while other tags are ignored; hence, opening marker for tag string "t" is "<t>" and closing marker is "</t>".

    Default tag-printing functions just do nothing.

    Tag-marking and tag-printing functions are user definable and can be set by calling set_formatter_stag_functions.

    Semantic tag operations may be set on or off with set_tags. Tag-marking operations may be set on or off with set_mark_tags. Tag-printing operations may be set on or off with set_print_tags.

    • since 4.08
    type tag = string
    type stag +=
    1. | String_tag of tag
      (*

      String_tag s is a string tag s. String tags can be inserted either by explicitly using the constructor String_tag or by using the dedicated format syntax "@{<s> ... @}".

      • since 4.08
      *)
    val pp_open_stag : formatter -> stag -> unit
    val open_stag : stag -> unit

    pp_open_stag ppf t opens the semantic tag named t.

    The print_open_stag tag-printing function of the formatter is called with t as argument; then the opening tag marker for t, as given by mark_open_stag t, is written into the output device of the formatter.

    • since 4.08
    val pp_close_stag : formatter -> unit -> unit
    val close_stag : unit -> unit

    pp_close_stag ppf () closes the most recently opened semantic tag t.

    The closing tag marker, as given by mark_close_stag t, is written into the output device of the formatter; then the print_close_stag tag-printing function of the formatter is called with t as argument.

    • since 4.08
    val pp_set_tags : formatter -> bool -> unit
    val set_tags : bool -> unit

    pp_set_tags ppf b turns on or off the treatment of semantic tags (default is off).

    val pp_set_print_tags : formatter -> bool -> unit
    val set_print_tags : bool -> unit

    pp_set_print_tags ppf b turns on or off the tag-printing operations.

    val pp_set_mark_tags : formatter -> bool -> unit
    val set_mark_tags : bool -> unit

    pp_set_mark_tags ppf b turns on or off the tag-marking operations.

    val pp_get_print_tags : formatter -> unit -> bool
    val get_print_tags : unit -> bool

    Return the current status of tag-printing operations.

    val pp_get_mark_tags : formatter -> unit -> bool
    val get_mark_tags : unit -> bool

    Return the current status of tag-marking operations.

    val pp_set_formatter_out_channel : formatter -> out_channel -> unit

    Redirecting the standard formatter output

    val set_formatter_out_channel : out_channel -> unit

    Redirect the standard pretty-printer output to the given channel. (All the output functions of the standard formatter are set to the default output functions printing to the given channel.)

    set_formatter_out_channel is equivalent to pp_set_formatter_out_channel std_formatter.

    val pp_set_formatter_output_functions : formatter -> (string -> int -> int -> unit) -> (unit -> unit) -> @@ -44,59 +38,57 @@ formatter Domain.DLS.key

    synchronized_formatter_of_out_channel oc returns the key to the domain-local state that holds the domain-local formatter for writing to the corresponding output channel oc.

    When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    • alert unstable
    val std_formatter : formatter

    The initial domain's standard formatter to write to standard output.

    It is defined as formatter_of_out_channel Stdlib.stdout.

    val get_std_formatter : unit -> formatter

    get_std_formatter () returns the current domain's standard formatter used to write to standard output.

    • since 5.0
    val err_formatter : formatter

    The initial domain's formatter to write to standard error.

    It is defined as formatter_of_out_channel Stdlib.stderr.

    val get_err_formatter : unit -> formatter

    get_err_formatter () returns the current domain's formatter used to write to standard error.

    • since 5.0
    val formatter_of_buffer : Buffer.t -> formatter

    formatter_of_buffer b returns a new formatter writing to buffer b. At the end of pretty-printing, the formatter must be flushed using pp_print_flush or pp_print_newline, to print all the pending material into the buffer.

    val stdbuf : Buffer.t

    The initial domain's string buffer in which str_formatter writes.

    val get_stdbuf : unit -> Buffer.t

    get_stdbuf () returns the current domain's string buffer in which the current domain's string formatter writes.

    • since 5.0
    val str_formatter : formatter

    The initial domain's formatter to output to the stdbuf string buffer.

    str_formatter is defined as formatter_of_buffer stdbuf.

    val get_str_formatter : unit -> formatter

    The current domain's formatter to output to the current domains string buffer.

    • since 5.0
    val flush_str_formatter : unit -> string

    Returns the material printed with str_formatter of the current domain, flushes the formatter and resets the corresponding buffer.

    val make_formatter : (string -> int -> int -> unit) -> (unit -> unit) -> - formatter

    make_formatter out flush returns a new formatter that outputs with function out, and flushes with function flush.

    For instance,

    make_formatter
    -  (Stdlib.output oc)
    -  (fun () -> Stdlib.flush oc)

    returns a formatter to the Stdlib.out_channel oc.

    val make_synchronized_formatter : + formatter

    make_formatter out flush returns a new formatter that outputs with function out, and flushes with function flush.

    For instance,

      make_formatter
    +    (Stdlib.output oc)
    +    (fun () -> Stdlib.flush oc)

    returns a formatter to the Stdlib.out_channel oc.

    val make_synchronized_formatter : (string -> int -> int -> unit) -> (unit -> unit) -> formatter Domain.DLS.key

    make_synchronized_formatter out flush returns the key to the domain-local state that holds the domain-local formatter that outputs with function out, and flushes with function flush.

    When the formatter is used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    • since 5.0
    • alert unstable
    val formatter_of_out_functions : formatter_out_functions -> formatter

    formatter_of_out_functions out_funs returns a new formatter that writes with the set of output functions out_funs.

    See definition of type formatter_out_functions for the meaning of argument out_funs.

    • since 4.06

    Symbolic pretty-printing

    Symbolic pretty-printing is pretty-printing using a symbolic formatter, i.e. a formatter that outputs symbolic pretty-printing items.

    When using a symbolic formatter, all regular pretty-printing activities occur but output material is symbolic and stored in a buffer of output items. At the end of pretty-printing, flushing the output buffer allows post-processing of symbolic output before performing low level output operations.

    In practice, first define a symbolic output buffer b using:

    • let sob = make_symbolic_output_buffer (). Then define a symbolic formatter with:
    • let ppf = formatter_of_symbolic_output_buffer sob

    Use symbolic formatter ppf as usual, and retrieve symbolic items at end of pretty-printing by flushing symbolic output buffer sob with:

    • flush_symbolic_output_buffer sob.
    type symbolic_output_item =
    1. | Output_flush
      (*

      symbolic flush command

      *)
    2. | Output_newline
      (*

      symbolic newline command

      *)
    3. | Output_string of string
      (*

      Output_string s: symbolic output for string s

      *)
    4. | Output_spaces of int
      (*

      Output_spaces n: symbolic command to output n spaces

      *)
    5. | Output_indent of int
      (*

      Output_indent i: symbolic indentation of size i

      *)

    Items produced by symbolic pretty-printers

    • since 4.06
    type symbolic_output_buffer

    The output buffer of a symbolic pretty-printer.

    • since 4.06
    val make_symbolic_output_buffer : unit -> symbolic_output_buffer

    make_symbolic_output_buffer () returns a fresh buffer for symbolic output.

    • since 4.06
    val clear_symbolic_output_buffer : symbolic_output_buffer -> unit

    clear_symbolic_output_buffer sob resets buffer sob.

    • since 4.06
    val get_symbolic_output_buffer : symbolic_output_buffer -> symbolic_output_item list

    get_symbolic_output_buffer sob returns the contents of buffer sob.

    • since 4.06
    val flush_symbolic_output_buffer : symbolic_output_buffer -> - symbolic_output_item list

    flush_symbolic_output_buffer sob returns the contents of buffer sob and resets buffer sob. flush_symbolic_output_buffer sob is equivalent to let items = get_symbolic_output_buffer sob in - clear_symbolic_output_buffer sob; items

    • since 4.06
    val add_symbolic_output_item : + symbolic_output_item list

    flush_symbolic_output_buffer sob returns the contents of buffer sob and resets buffer sob. flush_symbolic_output_buffer sob is equivalent to let items = get_symbolic_output_buffer sob in clear_symbolic_output_buffer sob; items

    • since 4.06
    val add_symbolic_output_item : symbolic_output_buffer -> symbolic_output_item -> unit

    add_symbolic_output_item sob itm adds item itm to buffer sob.

    • since 4.06
    val formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter

    formatter_of_symbolic_output_buffer sob returns a symbolic formatter that outputs to symbolic_output_buffer sob.

    • since 4.06

    Convenience formatting functions.

    val pp_print_iter : - ?pp_sep:(formatter -> unit -> unit) -> + ?pp_sep:(formatter -> unit -> unit) -> (('a -> unit) -> 'b -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'b -> unit

    pp_print_iter ~pp_sep iter pp_v ppf v formats on ppf the iterations of iter over a collection v of values using pp_v. Iterations are separated by pp_sep (defaults to pp_print_cut).

    • since 5.1
    val pp_print_list : - ?pp_sep:(formatter -> unit -> unit) -> + ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a list -> unit

    pp_print_list ?pp_sep pp_v ppf l prints items of list l, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty lists.

    • since 4.02
    val pp_print_array : - ?pp_sep:(formatter -> unit -> unit) -> + ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a array -> unit

    pp_print_array ?pp_sep pp_v ppf a prints items of array a, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut). Does nothing on empty arrays.

    If a is mutated after pp_print_array is called, the printed values may not be what is expected because Format can delay the printing. This can be avoided by flushing ppf.

    • since 5.1
    val pp_print_seq : - ?pp_sep:(formatter -> unit -> unit) -> + ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a Seq.t -> unit

    pp_print_seq ?pp_sep pp_v ppf s prints items of sequence s, using pp_v to print each item, and calling pp_sep between items (pp_sep defaults to pp_print_cut. Does nothing on empty sequences.

    This function does not terminate on infinite sequences.

    • since 4.12
    val pp_print_text : formatter -> string -> unit

    pp_print_text ppf s prints s with spaces and newlines respectively printed using pp_print_space and pp_force_newline.

    • since 4.02
    val pp_print_option : - ?none:(formatter -> unit -> unit) -> + ?none:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a option -> unit

    pp_print_option ?none pp_v ppf o prints o on ppf using pp_v if o is Some v and none if it is None. none prints nothing by default.

    • since 4.08
    val pp_print_result : - ok:(formatter -> 'a -> unit) -> - error:(formatter -> 'e -> unit) -> + ok:(formatter -> 'a -> unit) -> + error:(formatter -> 'e -> unit) -> formatter -> ('a, 'e) result -> unit

    pp_print_result ~ok ~error ppf r prints r on ppf using ok if r is Ok _ and error if r is Error _.

    • since 4.08
    val pp_print_either : - left:(formatter -> 'a -> unit) -> - right:(formatter -> 'b -> unit) -> + left:(formatter -> 'a -> unit) -> + right:(formatter -> 'b -> unit) -> formatter -> ('a, 'b) Either.t -> - unit

    pp_print_either ~left ~right ppf e prints e on ppf using left if e is Either.Left _ and right if e is Either.Right _.

    • since 4.13

    Formatted pretty-printing

    Module Format provides a complete set of printf like functions for pretty-printing using format string specifications.

    Specific annotations may be added in the format strings to give pretty-printing commands to the pretty-printing engine.

    Those annotations are introduced in the format strings using the @ character. For instance, @ means a space break, @, means a cut, @[ opens a new box, and @] closes the last open box.

    val fprintf : formatter -> ('a, formatter, unit) format -> 'a

    fprintf ff fmt arg1 ... argN formats the arguments arg1 to argN according to the format string fmt, and outputs the resulting string on the formatter ff.

    The format string fmt is a character string which contains three types of objects: plain characters and conversion specifications as specified in the Printf module, and pretty-printing indications specific to the Format module.

    The pretty-printing indication characters are introduced by a @ character, and their meanings are:

    • @[: open a pretty-printing box. The type and offset of the box may be optionally specified with the following syntax: the < character, followed by an optional box type indication, then an optional integer offset, and the closing > character. Pretty-printing box type is one of h, v, hv, b, or hov. 'h' stands for an 'horizontal' pretty-printing box, 'v' stands for a 'vertical' pretty-printing box, 'hv' stands for an 'horizontal/vertical' pretty-printing box, 'b' stands for an 'horizontal-or-vertical' pretty-printing box demonstrating indentation, 'hov' stands a simple 'horizontal-or-vertical' pretty-printing box. For instance, @[<hov 2> opens an 'horizontal-or-vertical' pretty-printing box with indentation 2 as obtained with open_hovbox 2. For more details about pretty-printing boxes, see the various box opening functions open_*box.
    • @]: close the most recently opened pretty-printing box.
    • @,: output a 'cut' break hint, as with print_cut ().
    • @ : output a 'space' break hint, as with print_space ().
    • @;: output a 'full' break hint as with print_break. The nspaces and offset parameters of the break hint may be optionally specified with the following syntax: the < character, followed by an integer nspaces value, then an integer offset, and a closing > character. If no parameters are provided, the full break defaults to a 'space' break hint.
    • @.: flush the pretty-printer and split the line, as with print_newline ().
    • @<n>: print the following item as if it were of length n. Hence, printf "@<0>%s" arg prints arg as a zero length string. If @<n> is not followed by a conversion specification, then the following character of the format is printed as if it were of length n.
    • @\{: open a semantic tag. The name of the tag may be optionally specified with the following syntax: the < character, followed by an optional string specification, and the closing > character. The string specification is any character string that does not contain the closing character '>'. If omitted, the tag name defaults to the empty string. For more details about semantic tags, see the functions open_stag and close_stag.
    • @\}: close the most recently opened semantic tag.
    • @?: flush the pretty-printer as with print_flush (). This is equivalent to the conversion %!.
    • @\n: force a newline, as with force_newline (), not the normal way of pretty-printing, you should prefer using break hints inside a vertical pretty-printing box.

    Note: To prevent the interpretation of a @ character as a pretty-printing indication, escape it with a % character. Old quotation mode @@ is deprecated since it is not compatible with formatted input interpretation of character '@'.

    Example: printf "@[%s@ %d@]@." "x =" 1 is equivalent to open_box (); print_string "x ="; print_space (); - print_int 1; close_box (); print_newline (). It prints x = 1 within a pretty-printing 'horizontal-or-vertical' box.

    val printf : ('a, formatter, unit) format -> 'a

    Same as fprintf above, but output on get_std_formatter ().

    It is defined similarly to fun fmt -> fprintf (get_std_formatter ()) fmt but delays calling get_std_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    val eprintf : ('a, formatter, unit) format -> 'a

    Same as fprintf above, but output on get_err_formatter ().

    It is defined similarly to fun fmt -> fprintf (get_err_formatter ()) fmt but delays calling get_err_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    val sprintf : ('a, unit, string) format -> 'a

    Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. Note that the pretty-printer queue is flushed at the end of each call to sprintf. Note that if your format string contains a %a, you should use asprintf.

    In case of multiple and related calls to sprintf to output material on a single string, you should consider using fprintf with the predefined formatter str_formatter and call flush_str_formatter () to get the final result.

    Alternatively, you can use Format.fprintf with a formatter writing to a buffer of your own: flushing the formatter and the buffer at the end of pretty-printing returns the desired string.

    val asprintf : ('a, formatter, unit, string) format4 -> 'a

    Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. The type of asprintf is general enough to interact nicely with %a conversions.

    • since 4.01
    val dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a

    Same as fprintf, except the formatter is the last argument. dprintf "..." a b c is a function of type formatter -> unit which can be given to a format specifier %t.

    This can be used as a replacement for asprintf to delay formatting decisions. Using the string returned by asprintf in a formatting context forces formatting decisions to be taken in isolation, and the final string may be created prematurely. dprintf allows delay of formatting decisions until the final formatting context is known. For example:

    let t = Format.dprintf "%i@ %i@ %i" 1 2 3 in
    -...
    -Format.printf "@[<v>%t@]" t
    • since 4.08
    val ifprintf : formatter -> ('a, formatter, unit) format -> 'a

    Same as fprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 3.10

    Formatted Pretty-Printing with continuations.

    val kfprintf : + unit

    pp_print_either ~left ~right ppf e prints e on ppf using left if e is Either.Left _ and right if e is Either.Right _.

    • since 4.13

    Formatted pretty-printing

    Module Format provides a complete set of printf like functions for pretty-printing using format string specifications.

    Specific annotations may be added in the format strings to give pretty-printing commands to the pretty-printing engine.

    Those annotations are introduced in the format strings using the @ character. For instance, @ means a space break, @, means a cut, @[ opens a new box, and @] closes the last open box.

    val fprintf : formatter -> ('a, formatter, unit) format -> 'a

    fprintf ff fmt arg1 ... argN formats the arguments arg1 to argN according to the format string fmt, and outputs the resulting string on the formatter ff.

    The format string fmt is a character string which contains three types of objects: plain characters and conversion specifications as specified in the Printf module, and pretty-printing indications specific to the Format module.

    The pretty-printing indication characters are introduced by a @ character, and their meanings are:

    • @[: open a pretty-printing box. The type and offset of the box may be optionally specified with the following syntax: the < character, followed by an optional box type indication, then an optional integer offset, and the closing > character. Pretty-printing box type is one of h, v, hv, b, or hov. 'h' stands for an 'horizontal' pretty-printing box, 'v' stands for a 'vertical' pretty-printing box, 'hv' stands for an 'horizontal/vertical' pretty-printing box, 'b' stands for an 'horizontal-or-vertical' pretty-printing box demonstrating indentation, 'hov' stands a simple 'horizontal-or-vertical' pretty-printing box. For instance, @[<hov 2> opens an 'horizontal-or-vertical' pretty-printing box with indentation 2 as obtained with open_hovbox 2. For more details about pretty-printing boxes, see the various box opening functions open_*box.
    • @]: close the most recently opened pretty-printing box.
    • @,: output a 'cut' break hint, as with print_cut ().
    • @ : output a 'space' break hint, as with print_space ().
    • @;: output a 'full' break hint as with print_break. The nspaces and offset parameters of the break hint may be optionally specified with the following syntax: the < character, followed by an integer nspaces value, then an integer offset, and a closing > character. If no parameters are provided, the full break defaults to a 'space' break hint.
    • @.: flush the pretty-printer and split the line, as with print_newline ().
    • @<n>: print the following item as if it were of length n. Hence, printf "@<0>%s" arg prints arg as a zero length string. If @<n> is not followed by a conversion specification, then the following character of the format is printed as if it were of length n.
    • @\{: open a semantic tag. The name of the tag may be optionally specified with the following syntax: the < character, followed by an optional string specification, and the closing > character. The string specification is any character string that does not contain the closing character '>'. If omitted, the tag name defaults to the empty string. For more details about semantic tags, see the functions open_stag and close_stag.
    • @\}: close the most recently opened semantic tag.
    • @?: flush the pretty-printer as with print_flush (). This is equivalent to the conversion %!.
    • @\n: force a newline, as with force_newline (), not the normal way of pretty-printing, you should prefer using break hints inside a vertical pretty-printing box.

    Note: To prevent the interpretation of a @ character as a pretty-printing indication, escape it with a % character. Old quotation mode @@ is deprecated since it is not compatible with formatted input interpretation of character '@'.

    Example: printf "@[%s@ %d@]@." "x =" 1 is equivalent to open_box (); print_string "x ="; print_space (); print_int 1; close_box (); print_newline (). It prints x = 1 within a pretty-printing 'horizontal-or-vertical' box.

    val printf : ('a, formatter, unit) format -> 'a

    Same as fprintf above, but output on get_std_formatter ().

    It is defined similarly to fun fmt -> fprintf (get_std_formatter ()) fmt but delays calling get_std_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    val eprintf : ('a, formatter, unit) format -> 'a

    Same as fprintf above, but output on get_err_formatter ().

    It is defined similarly to fun fmt -> fprintf (get_err_formatter ()) fmt but delays calling get_err_formatter until after the final argument required by the format is received. When used with multiple domains, the output from the domains will be interleaved with each other at points where the formatter is flushed, such as with print_flush.

    val sprintf : ('a, unit, string) format -> 'a

    Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. Note that the pretty-printer queue is flushed at the end of each call to sprintf. Note that if your format string contains a %a, you should use asprintf.

    In case of multiple and related calls to sprintf to output material on a single string, you should consider using fprintf with the predefined formatter str_formatter and call flush_str_formatter () to get the final result.

    Alternatively, you can use Format.fprintf with a formatter writing to a buffer of your own: flushing the formatter and the buffer at the end of pretty-printing returns the desired string.

    val asprintf : ('a, formatter, unit, string) format4 -> 'a

    Same as printf above, but instead of printing on a formatter, returns a string containing the result of formatting the arguments. The type of asprintf is general enough to interact nicely with %a conversions.

    • since 4.01
    val dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a

    Same as fprintf, except the formatter is the last argument. dprintf "..." a b c is a function of type formatter -> unit which can be given to a format specifier %t.

    This can be used as a replacement for asprintf to delay formatting decisions. Using the string returned by asprintf in a formatting context forces formatting decisions to be taken in isolation, and the final string may be created prematurely. dprintf allows delay of formatting decisions until the final formatting context is known. For example:

      let t = Format.dprintf "%i@ %i@ %i" 1 2 3 in
    +  ...
    +  Format.printf "@[<v>%t@]" t
    • since 4.08
    val ifprintf : formatter -> ('a, formatter, unit) format -> 'a

    Same as fprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 3.10

    Formatted Pretty-Printing with continuations.

    val kfprintf : (formatter -> 'a) -> formatter -> ('b, formatter, unit, 'a) format4 -> @@ -119,7 +111,8 @@ val pp_pair : Format.formatter -> int * bool -> unit = <fun> l: [(0, true); (1, false); (2, true); (3, false); (4, true); (5, false); (6, true); (7, false); (8, true); (9, false); (10, true); (11, false); (12, true); (13, false); (14, true); (15, false); (16, true); - (17, false); (18, true); (19, false)]

    What this does, briefly, is:

    • pp_pair prints a pair bool*int surrounded in "(" ")". It takes a formatter (into which formatting happens), and the pair itself. When printing is done it returns ().
    • Format.printf "l = [@[<hov>%a@]]@." ... l is like printf, but with additional formatting instructions (denoted with "@"). The pair "@<hov>" and "@" is a "horizontal-or-vertical box".
    • "@." ends formatting with a newline. It is similar to "\n" but is also aware of the Format.formatter's state. Do not use "\n" with Format.
    • "%a" is a formatting instruction, like "%d" or "%s" for printf. However, where "%d" prints an integer and "%s" prints a string, "%a" takes a printer (of type Format.formatter -> 'a -> unit) and a value (of type 'a) and applies the printer to the value. This is key to compositionality of printers.
    • We build a list printer using Format.pp_print_list ~pp_sep:(...) pp_pair. pp_print_list takes an element printer and returns a list printer. The ?pp_sep optional argument, if provided, is called in between each element to print a separator.
    • Here, for a separator, we use (fun out () -> Format.fprintf out ";@ "). It prints ";", and then "@ " which is a breaking space (either it prints " ", or it prints a newline if the box is about to overflow). This "@ " is responsible for the list printing splitting into several lines.

    If we omit "@ ", we get an ugly single-line print:

    # Format.printf "l: [@[<hov>%a@]]@."
    +      (17, false); (18, true); (19, false)]
    +

    What this does, briefly, is:

    • pp_pair prints a pair bool*int surrounded in "(" ")". It takes a formatter (into which formatting happens), and the pair itself. When printing is done it returns ().
    • Format.printf "l = [@[<hov>%a@]]@." ... l is like printf, but with additional formatting instructions (denoted with "@"). The pair "@<hov>" and "@" is a "horizontal-or-vertical box".
    • "@." ends formatting with a newline. It is similar to "\n" but is also aware of the Format.formatter's state. Do not use "\n" with Format.
    • "%a" is a formatting instruction, like "%d" or "%s" for printf. However, where "%d" prints an integer and "%s" prints a string, "%a" takes a printer (of type Format.formatter -> 'a -> unit) and a value (of type 'a) and applies the printer to the value. This is key to compositionality of printers.
    • We build a list printer using Format.pp_print_list ~pp_sep:(...) pp_pair. pp_print_list takes an element printer and returns a list printer. The ?pp_sep optional argument, if provided, is called in between each element to print a separator.
    • Here, for a separator, we use (fun out () -> Format.fprintf out ";@ "). It prints ";", and then "@ " which is a breaking space (either it prints " ", or it prints a newline if the box is about to overflow). This "@ " is responsible for the list printing splitting into several lines.

    If we omit "@ ", we get an ugly single-line print:

      # Format.printf "l: [@[<hov>%a@]]@."
           Format.(pp_print_list ~pp_sep:(fun out () -> fprintf out "; ") pp_pair) l
       l: [(0, true); (1, false); (2, true); (* ... *); (18, true); (19, false)]
     - : unit = ()

    Generally, it is good practice to define custom printers for important types in your program. If, for example, you were to define basic geometry types like so:

    type point = {
    @@ -135,9 +128,9 @@ type rectangle = {
     
     let pp_rectangle out (r:rectangle) =
       Format.fprintf out "{ @[ll=%a;@ ur=%a@] }"
    -    pp_point r.ll pp_point r.ur

    In the .mli file, we could have:

    val pp_point : Format.formatter -> point -> unit
    +    pp_point r.ll pp_point r.ur

    In the .mli file, we could have:

      val pp_point : Format.formatter -> point -> unit
     
    -val pp_rectangle : Format.formatter -> rectangle -> unit

    These printers can now be used with "%a" inside other printers.

    # Format.printf "some rectangle: %a@."
    +  val pp_rectangle : Format.formatter -> rectangle -> unit

    These printers can now be used with "%a" inside other printers.

     # Format.printf "some rectangle: %a@."
           (Format.pp_print_option pp_rectangle)
           (Some {ll={x=1.; y=2.}; ur={x=42.; y=500.12345}})
     some rectangle: { l={ x=1.000; y=2.000 }; ur={ x=42.000; y=500.123 } }
    @@ -145,4 +138,4 @@ some rectangle: { l={ x=1.000; y=2.000 }; ur={ x=42.000; y=500.123 } }
     # Format.printf "no rectangle: %a@."
           (Format.pp_option pp_rectangle)
           None
    -no rectangle:

    See how we combine pp_print_option (option printer) and our newly defined rectangle printer, like we did with pp_print_list earlier.

    For a more extensive tutorial, see "Using the Format module".

    A final note: the Format module is a starting point. The OCaml ecosystem has libraries that makes formatting easier and more expressive, with more combinators, more concise names, etc. An example of such a library is Fmt.

    Automatic deriving of pretty-printers from type definitions is also possible, using https://github.com/ocaml-ppx/ppx_deriving or similar ppx derivers.

    \ No newline at end of file +no rectangle:

    See how we combine pp_print_option (option printer) and our newly defined rectangle printer, like we did with pp_print_list earlier.

    For a more extensive tutorial, see "Using the Format module".

    A final note: the Format module is a starting point. The OCaml ecosystem has libraries that makes formatting easier and more expressive, with more combinators, more concise names, etc. An example of such a library is Fmt.

    Automatic deriving of pretty-printers from type definitions is also possible, using https://github.com/ocaml-ppx/ppx_deriving or similar ppx derivers.

    diff --git a/ocaml/Stdlib/Fun/index.html b/ocaml/Stdlib/Fun/index.html index 059c108..e7ed7c4 100644 --- a/ocaml/Stdlib/Fun/index.html +++ b/ocaml/Stdlib/Fun/index.html @@ -1,2 +1,2 @@ -Fun (ocaml.Stdlib.Fun)

    Module Stdlib.Fun

    Function manipulation.

    • since 4.08

    Combinators

    val id : 'a -> 'a

    id is the identity function. For any argument x, id x is x.

    val const : 'a -> _ -> 'a

    const c is a function that always returns the value c. For any argument x, (const c) x is c.

    val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c

    flip f reverses the argument order of the binary function f. For any arguments x and y, (flip f) x y is f y x.

    val negate : ('a -> bool) -> 'a -> bool

    negate p is the negation of the predicate function p. For any argument x, (negate p) x is not (p x).

    Exception handling

    val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a

    protect ~finally work invokes work () and then finally () before work () returns with its value or an exception. In the latter case the exception is re-raised after finally (). If finally () raises an exception, then the exception Finally_raised is raised instead.

    protect can be used to enforce local invariants whether work () returns normally or raises an exception. However, it does not protect against unexpected exceptions raised inside finally () such as Stdlib.Out_of_memory, Stdlib.Stack_overflow, or asynchronous exceptions raised by signal handlers (e.g. Sys.Break).

    Note: It is a programming error if other kinds of exceptions are raised by finally, as any exception raised in work () will be lost in the event of a Finally_raised exception. Therefore, one should make sure to handle those inside the finally.

    exception Finally_raised of exn

    Finally_raised exn is raised by protect ~finally work when finally raises an exception exn. This exception denotes either an unexpected exception or a programming error. As a general rule, one should not catch a Finally_raised exception except as part of a catch-all handler.

    \ No newline at end of file +Fun (ocaml.Stdlib.Fun)

    Module Stdlib.Fun

    Function manipulation.

    • since 4.08

    Combinators

    val id : 'a -> 'a

    id is the identity function. For any argument x, id x is x.

    val const : 'a -> _ -> 'a

    const c is a function that always returns the value c. For any argument x, (const c) x is c.

    val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c

    flip f reverses the argument order of the binary function f. For any arguments x and y, (flip f) x y is f y x.

    val negate : ('a -> bool) -> 'a -> bool

    negate p is the negation of the predicate function p. For any argument x, (negate p) x is not (p x).

    Exception handling

    val protect : finally:(unit -> unit) -> (unit -> 'a) -> 'a

    protect ~finally work invokes work () and then finally () before work () returns with its value or an exception. In the latter case the exception is re-raised after finally (). If finally () raises an exception, then the exception Finally_raised is raised instead.

    protect can be used to enforce local invariants whether work () returns normally or raises an exception. However, it does not protect against unexpected exceptions raised inside finally () such as Stdlib.Out_of_memory, Stdlib.Stack_overflow, or asynchronous exceptions raised by signal handlers (e.g. Sys.Break).

    Note: It is a programming error if other kinds of exceptions are raised by finally, as any exception raised in work () will be lost in the event of a Finally_raised exception. Therefore, one should make sure to handle those inside the finally.

    exception Finally_raised of exn

    Finally_raised exn is raised by protect ~finally work when finally raises an exception exn. This exception denotes either an unexpected exception or a programming error. As a general rule, one should not catch a Finally_raised exception except as part of a catch-all handler.

    diff --git a/ocaml/Stdlib/Gc/Memprof/index.html b/ocaml/Stdlib/Gc/Memprof/index.html index 3d6e2de..c106115 100644 --- a/ocaml/Stdlib/Gc/Memprof/index.html +++ b/ocaml/Stdlib/Gc/Memprof/index.html @@ -1,6 +1,6 @@ -Memprof (ocaml.Stdlib.Gc.Memprof)

    Module Gc.Memprof

    Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

    Since blocks are composed of several words, a block can potentially be sampled several times. If a block is sampled several times, then each of the callback is called once for each event of this block: the multiplicity is given in the n_samples field of the allocation structure.

    This engine makes it possible to implement a low-overhead memory profiler as an OCaml library.

    Note: this API is EXPERIMENTAL. It may change without prior notice.

    type allocation_source =
    1. | Normal
    2. | Marshal
    3. | Custom
    type allocation = private {
    1. n_samples : int;
      (*

      The number of samples in this block (>= 1).

      *)
    2. size : int;
      (*

      The size of the block, in words, excluding the header.

      *)
    3. source : allocation_source;
      (*

      The type of the allocation.

      *)
    4. callstack : Printexc.raw_backtrace;
      (*

      The callstack for the allocation.

      *)
    }

    The type of metadata associated with allocations. This is the type of records passed to the callback triggered by the sampling of an allocation.

    type ('minor, 'major) tracker = {
    1. alloc_minor : allocation -> 'minor option;
    2. alloc_major : allocation -> 'major option;
    3. promote : 'minor -> 'major option;
    4. dealloc_minor : 'minor -> unit;
    5. dealloc_major : 'major -> unit;
    }

    A ('minor, 'major) tracker describes how memprof should track sampled blocks over their lifetime, keeping a user-defined piece of metadata for each of them: 'minor is the type of metadata to keep for minor blocks, and 'major the type of metadata for major blocks.

    When using threads, it is guaranteed that allocation callbacks are always run in the thread where the allocation takes place.

    If an allocation-tracking or promotion-tracking function returns None, memprof stops tracking the corresponding value.

    val null_tracker : ('minor, 'major) tracker

    Default callbacks simply return None or ()

    val start : - sampling_rate:float -> - ?callstack_size:int -> +Memprof (ocaml.Stdlib.Gc.Memprof)

    Module Gc.Memprof

    Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

    Since blocks are composed of several words, a block can potentially be sampled several times. If a block is sampled several times, then each of the callback is called once for each event of this block: the multiplicity is given in the n_samples field of the allocation structure.

    This engine makes it possible to implement a low-overhead memory profiler as an OCaml library.

    Note: this API is EXPERIMENTAL. It may change without prior notice.

    type allocation_source =
    1. | Normal
    2. | Marshal
    3. | Custom
    type allocation = private {
    1. n_samples : int;
      (*

      The number of samples in this block (>= 1).

      *)
    2. size : int;
      (*

      The size of the block, in words, excluding the header.

      *)
    3. source : allocation_source;
      (*

      The type of the allocation.

      *)
    4. callstack : Printexc.raw_backtrace;
      (*

      The callstack for the allocation.

      *)
    }

    The type of metadata associated with allocations. This is the type of records passed to the callback triggered by the sampling of an allocation.

    type ('minor, 'major) tracker = {
    1. alloc_minor : allocation -> 'minor option;
    2. alloc_major : allocation -> 'major option;
    3. promote : 'minor -> 'major option;
    4. dealloc_minor : 'minor -> unit;
    5. dealloc_major : 'major -> unit;
    }

    A ('minor, 'major) tracker describes how memprof should track sampled blocks over their lifetime, keeping a user-defined piece of metadata for each of them: 'minor is the type of metadata to keep for minor blocks, and 'major the type of metadata for major blocks.

    When using threads, it is guaranteed that allocation callbacks are always run in the thread where the allocation takes place.

    If an allocation-tracking or promotion-tracking function returns None, memprof stops tracking the corresponding value.

    val null_tracker : ('minor, 'major) tracker

    Default callbacks simply return None or ()

    val start : + sampling_rate:float -> + ?callstack_size:int -> ('minor, 'major) tracker -> - unit

    Start the sampling with the given parameters. Fails if sampling is already active.

    The parameter sampling_rate is the sampling rate in samples per word (including headers). Usually, with cheap callbacks, a rate of 1e-4 has no visible effect on performance, and 1e-3 causes the program to run a few percent slower

    The parameter callstack_size is the length of the callstack recorded at every sample. Its default is max_int.

    The parameter tracker determines how to track sampled blocks over their lifetime in the minor and major heap.

    Sampling is temporarily disabled when calling a callback for the current thread. So they do not need to be re-entrant if the program is single-threaded. However, if threads are used, it is possible that a context switch occurs during a callback, in this case the callback functions must be re-entrant.

    Note that the callback can be postponed slightly after the actual event. The callstack passed to the callback is always accurate, but the program state may have evolved.

    val stop : unit -> unit

    Stop the sampling. Fails if sampling is not active.

    This function does not allocate memory.

    All the already tracked blocks are discarded. If there are pending postponed callbacks, they may be discarded.

    Calling stop when a callback is running can lead to callbacks not being called even though some events happened.

    \ No newline at end of file + unit

    Start the sampling with the given parameters. Fails if sampling is already active.

    The parameter sampling_rate is the sampling rate in samples per word (including headers). Usually, with cheap callbacks, a rate of 1e-4 has no visible effect on performance, and 1e-3 causes the program to run a few percent slower

    The parameter callstack_size is the length of the callstack recorded at every sample. Its default is max_int.

    The parameter tracker determines how to track sampled blocks over their lifetime in the minor and major heap.

    Sampling is temporarily disabled when calling a callback for the current thread. So they do not need to be re-entrant if the program is single-threaded. However, if threads are used, it is possible that a context switch occurs during a callback, in this case the callback functions must be re-entrant.

    Note that the callback can be postponed slightly after the actual event. The callstack passed to the callback is always accurate, but the program state may have evolved.

    val stop : unit -> unit

    Stop the sampling. Fails if sampling is not active.

    This function does not allocate memory.

    All the already tracked blocks are discarded. If there are pending postponed callbacks, they may be discarded.

    Calling stop when a callback is running can lead to callbacks not being called even though some events happened.

    diff --git a/ocaml/Stdlib/Gc/index.html b/ocaml/Stdlib/Gc/index.html index 8eb76a1..91d3e7c 100644 --- a/ocaml/Stdlib/Gc/index.html +++ b/ocaml/Stdlib/Gc/index.html @@ -1,2 +1,2 @@ -Gc (ocaml.Stdlib.Gc)

    Module Stdlib.Gc

    Memory management control and statistics; finalised values.

    type stat = {
    1. minor_words : float;
      (*

      Number of words allocated in the minor heap since the program was started.

      *)
    2. promoted_words : float;
      (*

      Number of words allocated in the minor heap that survived a minor collection and were moved to the major heap since the program was started.

      *)
    3. major_words : float;
      (*

      Number of words allocated in the major heap, including the promoted words, since the program was started.

      *)
    4. minor_collections : int;
      (*

      Number of minor collections since the program was started.

      *)
    5. major_collections : int;
      (*

      Number of major collection cycles completed since the program was started.

      *)
    6. heap_words : int;
      (*

      Total size of the major heap, in words.

      *)
    7. heap_chunks : int;
      (*

      Number of contiguous pieces of memory that make up the major heap. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    8. live_words : int;
      (*

      Number of words of live data in the major heap, including the header words.

      Note that "live" words refers to every word in the major heap that isn't currently known to be collectable, which includes words that have become unreachable by the program after the start of the previous gc cycle. It is typically much simpler and more predictable to call Gc.full_major (or Gc.compact) then computing gc stats, as then "live" words has the simple meaning of "reachable by the program". One caveat is that a single call to Gc.full_major will not reclaim values that have a finaliser from Gc.finalise (this does not apply to Gc.finalise_last). If this caveat matters, simply call Gc.full_major twice instead of once.

      *)
    9. live_blocks : int;
      (*

      Number of live blocks in the major heap.

      See live_words for a caveat about what "live" means.

      *)
    10. free_words : int;
      (*

      Number of words in the free list.

      *)
    11. free_blocks : int;
      (*

      Number of blocks in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    12. largest_free : int;
      (*

      Size (in words) of the largest block in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    13. fragments : int;
      (*

      Number of wasted words due to fragmentation. These are 1-words free blocks placed between two live blocks. They are not available for allocation.

      *)
    14. compactions : int;
      (*

      Number of heap compactions since the program was started.

      *)
    15. top_heap_words : int;
      (*

      Maximum size reached by the major heap, in words.

      *)
    16. stack_size : int;
      (*

      Current size of the stack, in words. This metrics is currently not available in OCaml 5: the field value is always 0.

      • since 3.12
      *)
    17. forced_major_collections : int;
      (*

      Number of forced full major collections completed since the program was started.

      • since 4.12
      *)
    }

    The memory management counters are returned in a stat record. These counters give values for the whole program.

    The total amount of memory allocated by the program since it was started is (in words) minor_words + major_words - promoted_words. Multiply by the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get the number of bytes.

    type control = {
    1. minor_heap_size : int;
      (*

      The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. The total size of the minor heap used by this program is the sum of the heap sizes of the active domains. Default: 256k.

      *)
    2. major_heap_increment : int;
      (*

      How much to add to the major heap when increasing it. If this number is less than or equal to 1000, it is a percentage of the current heap size (i.e. setting it to 100 will double the heap size at each increase). If it is more than 1000, it is a fixed number of words that will be added to the heap. Default: 15.

      *)
    3. space_overhead : int;
      (*

      The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 120.

      *)
    4. verbose : int;
      (*

      This value controls the GC messages on standard error output. It is a sum of some of the following flags, to print messages on the corresponding events:

      • 0x001 Start and end of major GC cycle.
      • 0x002 Minor collection and major GC slice.
      • 0x004 Growing and shrinking of the heap.
      • 0x008 Resizing of stacks and memory manager tables.
      • 0x010 Heap compaction.
      • 0x020 Change of GC parameters.
      • 0x040 Computation of major GC slice size.
      • 0x080 Calling of finalisation functions.
      • 0x100 Bytecode executable and shared library search at start-up.
      • 0x200 Computation of compaction-triggering condition.
      • 0x400 Output GC statistics at program exit. Default: 0.
      *)
    5. max_overhead : int;
      (*

      Heap compaction is triggered when the estimated amount of "wasted" memory is more than max_overhead percent of the amount of live data. If max_overhead is set to 0, heap compaction is triggered at the end of each major GC cycle (this setting is intended for testing purposes only). If max_overhead >= 1000000, compaction is never triggered. If compaction is permanently disabled, it is strongly suggested to set allocation_policy to 2. Default: 500.

      *)
    6. stack_limit : int;
      (*

      The maximum size of the fiber stacks (in words). Default: 1024k.

      *)
    7. allocation_policy : int;
      (*

      The policy used for allocating in the major heap. Possible values are 0, 1 and 2.

      • 0 is the next-fit policy, which is usually fast but can result in fragmentation, increasing memory consumption.
      • 1 is the first-fit policy, which avoids fragmentation but has corner cases (in certain realistic workloads) where it is sensibly slower.
      • 2 is the best-fit policy, which is fast and avoids fragmentation. In our experiments it is faster and uses less memory than both next-fit and first-fit. (since OCaml 4.10)

      The default is best-fit.

      On one example that was known to be bad for next-fit and first-fit, next-fit takes 28s using 855Mio of memory, first-fit takes 47s using 566Mio of memory, best-fit takes 27s using 545Mio of memory.

      Note: If you change to next-fit, you may need to reduce the space_overhead setting, for example using 80 instead of the default 120 which is tuned for best-fit. Otherwise, your program will need more memory.

      Note: changing the allocation policy at run-time forces a heap compaction, which is a lengthy operation unless the heap is small (e.g. at the start of the program).

      Default: 2.

      • since 3.11
      *)
    8. window_size : int;
      (*

      The size of the window used by the major GC for smoothing out variations in its workload. This is an integer between 1 and 50. Default: 1.

      • since 4.03
      *)
    9. custom_major_ratio : int;
      (*

      Target ratio of floating garbage to major heap size for out-of-heap memory held by custom values located in the major heap. The GC speed is adjusted to try to use this much memory for dead values that are not yet collected. Expressed as a percentage of major heap size. The default value keeps the out-of-heap floating garbage about the same size as the in-heap overhead. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 44.

      • since 4.08
      *)
    10. custom_minor_ratio : int;
      (*

      Bound on floating garbage for out-of-heap memory held by custom values in the minor heap. A minor GC is triggered when this much memory is held by custom values located in the minor heap. Expressed as a percentage of minor heap size. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 100.

      • since 4.08
      *)
    11. custom_minor_max_size : int;
      (*

      Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. Custom values that hold more than this many bytes are allocated on the major heap. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 70000 bytes.

      • since 4.08
      *)
    }

    The GC parameters are given as a control record. Note that these parameters can also be initialised by setting the OCAMLRUNPARAM environment variable. See the documentation of ocamlrun.

    val stat : unit -> stat

    Return the current values of the memory management counters in a stat record that represent the program's total memory stats. This function causes a full major collection.

    val quick_stat : unit -> stat

    Same as stat except that live_words, live_blocks, free_words, free_blocks, largest_free, and fragments are set to 0. Due to per-domain buffers it may only represent the state of the program's total memory usage since the last minor collection. This function is much faster than stat because it does not need to trigger a full major collection.

    val counters : unit -> float * float * float

    Return (minor_words, promoted_words, major_words) for the current domain or potentially previous domains. This function is as fast as quick_stat.

    val minor_words : unit -> float

    Number of words allocated in the minor heap by this domain or potentially previous domains. This number is accurate in byte-code programs, but only an approximation in programs compiled to native code.

    In native code this function does not allocate.

    • since 4.04
    val get : unit -> control

    Return the current values of the GC parameters in a control record.

    • alert unsynchronized_access GC parameters are a mutable global state.
    val set : control -> unit

    set r changes the GC parameters according to the control record r. The normal usage is: Gc.set { (Gc.get()) with Gc.verbose = 0x00d }

    • alert unsynchronized_access GC parameters are a mutable global state.
    val minor : unit -> unit

    Trigger a minor collection.

    val major_slice : int -> int

    major_slice n Do a minor collection and a slice of major collection. n is the size of the slice: the GC will do enough work to free (on average) n words of memory. If n = 0, the GC will try to do enough work to ensure that the next automatic slice has no work to do. This function returns an unspecified integer (currently: 0).

    val major : unit -> unit

    Do a minor collection and finish the current major collection cycle.

    val full_major : unit -> unit

    Do a minor collection, finish the current major collection cycle, and perform a complete new cycle. This will collect all currently unreachable blocks.

    val compact : unit -> unit

    Perform a full major collection and compact the heap. Note that heap compaction is a lengthy operation.

    val print_stat : out_channel -> unit

    Print the current values of the memory management counters (in human-readable form) of the total program into the channel argument.

    val allocated_bytes : unit -> float

    Return the number of bytes allocated by this domain and potentially a previous domain. It is returned as a float to avoid overflow problems with int on 32-bit machines.

    val get_minor_free : unit -> int

    Return the current size of the free space inside the minor heap of this domain.

    • since 4.03
    val finalise : ('a -> unit) -> 'a -> unit

    finalise f v registers f as a finalisation function for v. v must be heap-allocated. f will be called with v as argument at some point between the first time v becomes unreachable (including through weak pointers) and the time v is collected by the GC. Several functions can be registered for the same value, or even several instances of the same function. Each instance will be called once (or never, if the program terminates before v becomes unreachable).

    The GC will call the finalisation functions in the order of deallocation. When several values become unreachable at the same time (i.e. during the same GC cycle), the finalisation functions will be called in the reverse order of the corresponding calls to finalise. If finalise is called in the same order as the values are allocated, that means each value is finalised before the values it depends upon. Of course, this becomes false if additional dependencies are introduced by assignments.

    In the presence of multiple OCaml threads it should be assumed that any particular finaliser may be executed in any of the threads.

    Anything reachable from the closure of finalisation functions is considered reachable, so the following code will not work as expected:

    • let v = ... in Gc.finalise (fun _ -> ...v...) v

    Instead you should make sure that v is not in the closure of the finalisation function by writing:

    • let f = fun x -> ... let v = ... in Gc.finalise f v

    The f function can use all features of OCaml, including assignments that make the value reachable again. It can also loop forever (in this case, the other finalisation functions will not be called during the execution of f, unless it calls finalise_release). It can call finalise on v or other values to register other functions or even itself. It can raise an exception; in this case the exception will interrupt whatever the program was doing when the function was called.

    finalise will raise Invalid_argument if v is not guaranteed to be heap-allocated. Some examples of values that are not heap-allocated are integers, constant constructors, booleans, the empty array, the empty list, the unit value. The exact list of what is heap-allocated or not is implementation-dependent. Some constant values can be heap-allocated but never deallocated during the lifetime of the program, for example a list of integer constants; this is also implementation-dependent. Note that values of types float are sometimes allocated and sometimes not, so finalising them is unsafe, and finalise will also raise Invalid_argument for them. Values of type 'a Lazy.t (for any 'a) are like float in this respect, except that the compiler sometimes optimizes them in a way that prevents finalise from detecting them. In this case, it will not raise Invalid_argument, but you should still avoid calling finalise on lazy values.

    The results of calling String.make, Bytes.make, Bytes.create, Array.make, and Stdlib.ref are guaranteed to be heap-allocated and non-constant except when the length argument is 0.

    val finalise_last : (unit -> unit) -> 'a -> unit

    same as finalise except the value is not given as argument. So you can't use the given value for the computation of the finalisation function. The benefit is that the function is called after the value is unreachable for the last time instead of the first time. So contrary to finalise the value will never be reachable again or used again. In particular every weak pointer and ephemeron that contained this value as key or data is unset before running the finalisation function. Moreover the finalisation functions attached with finalise are always called before the finalisation functions attached with finalise_last.

    • since 4.04
    val finalise_release : unit -> unit

    A finalisation function may call finalise_release to tell the GC that it can launch the next finalisation function without waiting for the current one to return.

    type alarm

    An alarm is a piece of data that calls a user function at the end of each major GC cycle. The following functions are provided to create and delete alarms.

    val create_alarm : (unit -> unit) -> alarm

    create_alarm f will arrange for f to be called at the end of each major GC cycle, not caused by f itself, starting with the current cycle or the next one. A value of type alarm is returned that you can use to call delete_alarm.

    val delete_alarm : alarm -> unit

    delete_alarm a will stop the calls to the function associated to a. Calling delete_alarm a again has no effect.

    val eventlog_pause : unit -> unit
    • deprecated Use Runtime_events.pause instead.
    val eventlog_resume : unit -> unit
    • deprecated Use Runtime_events.resume instead.
    module Memprof : sig ... end

    Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

    \ No newline at end of file +Gc (ocaml.Stdlib.Gc)

    Module Stdlib.Gc

    Memory management control and statistics; finalised values.

    type stat = {
    1. minor_words : float;
      (*

      Number of words allocated in the minor heap since the program was started.

      *)
    2. promoted_words : float;
      (*

      Number of words allocated in the minor heap that survived a minor collection and were moved to the major heap since the program was started.

      *)
    3. major_words : float;
      (*

      Number of words allocated in the major heap, including the promoted words, since the program was started.

      *)
    4. minor_collections : int;
      (*

      Number of minor collections since the program was started.

      *)
    5. major_collections : int;
      (*

      Number of major collection cycles completed since the program was started.

      *)
    6. heap_words : int;
      (*

      Total size of the major heap, in words.

      *)
    7. heap_chunks : int;
      (*

      Number of contiguous pieces of memory that make up the major heap. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    8. live_words : int;
      (*

      Number of words of live data in the major heap, including the header words.

      Note that "live" words refers to every word in the major heap that isn't currently known to be collectable, which includes words that have become unreachable by the program after the start of the previous gc cycle. It is typically much simpler and more predictable to call Gc.full_major (or Gc.compact) then computing gc stats, as then "live" words has the simple meaning of "reachable by the program". One caveat is that a single call to Gc.full_major will not reclaim values that have a finaliser from Gc.finalise (this does not apply to Gc.finalise_last). If this caveat matters, simply call Gc.full_major twice instead of once.

      *)
    9. live_blocks : int;
      (*

      Number of live blocks in the major heap.

      See live_words for a caveat about what "live" means.

      *)
    10. free_words : int;
      (*

      Number of words in the free list.

      *)
    11. free_blocks : int;
      (*

      Number of blocks in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    12. largest_free : int;
      (*

      Size (in words) of the largest block in the free list. This metrics is currently not available in OCaml 5: the field value is always 0.

      *)
    13. fragments : int;
      (*

      Number of wasted words due to fragmentation. These are 1-words free blocks placed between two live blocks. They are not available for allocation.

      *)
    14. compactions : int;
      (*

      Number of heap compactions since the program was started.

      *)
    15. top_heap_words : int;
      (*

      Maximum size reached by the major heap, in words.

      *)
    16. stack_size : int;
      (*

      Current size of the stack, in words. This metrics is currently not available in OCaml 5: the field value is always 0.

      • since 3.12
      *)
    17. forced_major_collections : int;
      (*

      Number of forced full major collections completed since the program was started.

      • since 4.12
      *)
    }

    The memory management counters are returned in a stat record. These counters give values for the whole program.

    The total amount of memory allocated by the program since it was started is (in words) minor_words + major_words - promoted_words. Multiply by the word size (4 on a 32-bit machine, 8 on a 64-bit machine) to get the number of bytes.

    type control = {
    1. minor_heap_size : int;
      (*

      The size (in words) of the minor heap. Changing this parameter will trigger a minor collection. The total size of the minor heap used by this program is the sum of the heap sizes of the active domains. Default: 256k.

      *)
    2. major_heap_increment : int;
      (*

      How much to add to the major heap when increasing it. If this number is less than or equal to 1000, it is a percentage of the current heap size (i.e. setting it to 100 will double the heap size at each increase). If it is more than 1000, it is a fixed number of words that will be added to the heap. Default: 15.

      *)
    3. space_overhead : int;
      (*

      The major GC speed is computed from this parameter. This is the memory that will be "wasted" because the GC does not immediately collect unreachable blocks. It is expressed as a percentage of the memory used for live data. The GC will work more (use more CPU time and collect blocks more eagerly) if space_overhead is smaller. Default: 120.

      *)
    4. verbose : int;
      (*

      This value controls the GC messages on standard error output. It is a sum of some of the following flags, to print messages on the corresponding events:

      • 0x001 Start and end of major GC cycle.
      • 0x002 Minor collection and major GC slice.
      • 0x004 Growing and shrinking of the heap.
      • 0x008 Resizing of stacks and memory manager tables.
      • 0x010 Heap compaction.
      • 0x020 Change of GC parameters.
      • 0x040 Computation of major GC slice size.
      • 0x080 Calling of finalisation functions.
      • 0x100 Bytecode executable and shared library search at start-up.
      • 0x200 Computation of compaction-triggering condition.
      • 0x400 Output GC statistics at program exit. Default: 0.
      *)
    5. max_overhead : int;
      (*

      Heap compaction is triggered when the estimated amount of "wasted" memory is more than max_overhead percent of the amount of live data. If max_overhead is set to 0, heap compaction is triggered at the end of each major GC cycle (this setting is intended for testing purposes only). If max_overhead >= 1000000, compaction is never triggered. If compaction is permanently disabled, it is strongly suggested to set allocation_policy to 2. Default: 500.

      *)
    6. stack_limit : int;
      (*

      The maximum size of the fiber stacks (in words). Default: 1024k.

      *)
    7. allocation_policy : int;
      (*

      The policy used for allocating in the major heap. Possible values are 0, 1 and 2.

      • 0 is the next-fit policy, which is usually fast but can result in fragmentation, increasing memory consumption.
      • 1 is the first-fit policy, which avoids fragmentation but has corner cases (in certain realistic workloads) where it is sensibly slower.
      • 2 is the best-fit policy, which is fast and avoids fragmentation. In our experiments it is faster and uses less memory than both next-fit and first-fit. (since OCaml 4.10)

      The default is best-fit.

      On one example that was known to be bad for next-fit and first-fit, next-fit takes 28s using 855Mio of memory, first-fit takes 47s using 566Mio of memory, best-fit takes 27s using 545Mio of memory.

      Note: If you change to next-fit, you may need to reduce the space_overhead setting, for example using 80 instead of the default 120 which is tuned for best-fit. Otherwise, your program will need more memory.

      Note: changing the allocation policy at run-time forces a heap compaction, which is a lengthy operation unless the heap is small (e.g. at the start of the program).

      Default: 2.

      • since 3.11
      *)
    8. window_size : int;
      (*

      The size of the window used by the major GC for smoothing out variations in its workload. This is an integer between 1 and 50. Default: 1.

      • since 4.03
      *)
    9. custom_major_ratio : int;
      (*

      Target ratio of floating garbage to major heap size for out-of-heap memory held by custom values located in the major heap. The GC speed is adjusted to try to use this much memory for dead values that are not yet collected. Expressed as a percentage of major heap size. The default value keeps the out-of-heap floating garbage about the same size as the in-heap overhead. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 44.

      • since 4.08
      *)
    10. custom_minor_ratio : int;
      (*

      Bound on floating garbage for out-of-heap memory held by custom values in the minor heap. A minor GC is triggered when this much memory is held by custom values located in the minor heap. Expressed as a percentage of minor heap size. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 100.

      • since 4.08
      *)
    11. custom_minor_max_size : int;
      (*

      Maximum amount of out-of-heap memory for each custom value allocated in the minor heap. Custom values that hold more than this many bytes are allocated on the major heap. Note: this only applies to values allocated with caml_alloc_custom_mem (e.g. bigarrays). Default: 70000 bytes.

      • since 4.08
      *)
    }

    The GC parameters are given as a control record. Note that these parameters can also be initialised by setting the OCAMLRUNPARAM environment variable. See the documentation of ocamlrun.

    val stat : unit -> stat

    Return the current values of the memory management counters in a stat record that represent the program's total memory stats. This function causes a full major collection.

    val quick_stat : unit -> stat

    Same as stat except that live_words, live_blocks, free_words, free_blocks, largest_free, and fragments are set to 0. Due to per-domain buffers it may only represent the state of the program's total memory usage since the last minor collection. This function is much faster than stat because it does not need to trigger a full major collection.

    val counters : unit -> float * float * float

    Return (minor_words, promoted_words, major_words) for the current domain or potentially previous domains. This function is as fast as quick_stat.

    val minor_words : unit -> float

    Number of words allocated in the minor heap by this domain or potentially previous domains. This number is accurate in byte-code programs, but only an approximation in programs compiled to native code.

    In native code this function does not allocate.

    • since 4.04
    val get : unit -> control

    Return the current values of the GC parameters in a control record.

    • alert unsynchronized_access GC parameters are a mutable global state.
    val set : control -> unit

    set r changes the GC parameters according to the control record r. The normal usage is: Gc.set { (Gc.get()) with Gc.verbose = 0x00d }

    • alert unsynchronized_access GC parameters are a mutable global state.
    val minor : unit -> unit

    Trigger a minor collection.

    val major_slice : int -> int

    major_slice n Do a minor collection and a slice of major collection. n is the size of the slice: the GC will do enough work to free (on average) n words of memory. If n = 0, the GC will try to do enough work to ensure that the next automatic slice has no work to do. This function returns an unspecified integer (currently: 0).

    val major : unit -> unit

    Do a minor collection and finish the current major collection cycle.

    val full_major : unit -> unit

    Do a minor collection, finish the current major collection cycle, and perform a complete new cycle. This will collect all currently unreachable blocks.

    val compact : unit -> unit

    Perform a full major collection and compact the heap. Note that heap compaction is a lengthy operation.

    val print_stat : out_channel -> unit

    Print the current values of the memory management counters (in human-readable form) of the total program into the channel argument.

    val allocated_bytes : unit -> float

    Return the number of bytes allocated by this domain and potentially a previous domain. It is returned as a float to avoid overflow problems with int on 32-bit machines.

    val get_minor_free : unit -> int

    Return the current size of the free space inside the minor heap of this domain.

    • since 4.03
    val finalise : ('a -> unit) -> 'a -> unit

    finalise f v registers f as a finalisation function for v. v must be heap-allocated. f will be called with v as argument at some point between the first time v becomes unreachable (including through weak pointers) and the time v is collected by the GC. Several functions can be registered for the same value, or even several instances of the same function. Each instance will be called once (or never, if the program terminates before v becomes unreachable).

    The GC will call the finalisation functions in the order of deallocation. When several values become unreachable at the same time (i.e. during the same GC cycle), the finalisation functions will be called in the reverse order of the corresponding calls to finalise. If finalise is called in the same order as the values are allocated, that means each value is finalised before the values it depends upon. Of course, this becomes false if additional dependencies are introduced by assignments.

    In the presence of multiple OCaml threads it should be assumed that any particular finaliser may be executed in any of the threads.

    Anything reachable from the closure of finalisation functions is considered reachable, so the following code will not work as expected:

    • let v = ... in Gc.finalise (fun _ -> ...v...) v

    Instead you should make sure that v is not in the closure of the finalisation function by writing:

    • let f = fun x -> ... let v = ... in Gc.finalise f v

    The f function can use all features of OCaml, including assignments that make the value reachable again. It can also loop forever (in this case, the other finalisation functions will not be called during the execution of f, unless it calls finalise_release). It can call finalise on v or other values to register other functions or even itself. It can raise an exception; in this case the exception will interrupt whatever the program was doing when the function was called.

    finalise will raise Invalid_argument if v is not guaranteed to be heap-allocated. Some examples of values that are not heap-allocated are integers, constant constructors, booleans, the empty array, the empty list, the unit value. The exact list of what is heap-allocated or not is implementation-dependent. Some constant values can be heap-allocated but never deallocated during the lifetime of the program, for example a list of integer constants; this is also implementation-dependent. Note that values of types float are sometimes allocated and sometimes not, so finalising them is unsafe, and finalise will also raise Invalid_argument for them. Values of type 'a Lazy.t (for any 'a) are like float in this respect, except that the compiler sometimes optimizes them in a way that prevents finalise from detecting them. In this case, it will not raise Invalid_argument, but you should still avoid calling finalise on lazy values.

    The results of calling String.make, Bytes.make, Bytes.create, Array.make, and Stdlib.ref are guaranteed to be heap-allocated and non-constant except when the length argument is 0.

    val finalise_last : (unit -> unit) -> 'a -> unit

    same as finalise except the value is not given as argument. So you can't use the given value for the computation of the finalisation function. The benefit is that the function is called after the value is unreachable for the last time instead of the first time. So contrary to finalise the value will never be reachable again or used again. In particular every weak pointer and ephemeron that contained this value as key or data is unset before running the finalisation function. Moreover the finalisation functions attached with finalise are always called before the finalisation functions attached with finalise_last.

    • since 4.04
    val finalise_release : unit -> unit

    A finalisation function may call finalise_release to tell the GC that it can launch the next finalisation function without waiting for the current one to return.

    type alarm

    An alarm is a piece of data that calls a user function at the end of each major GC cycle. The following functions are provided to create and delete alarms.

    val create_alarm : (unit -> unit) -> alarm

    create_alarm f will arrange for f to be called at the end of each major GC cycle, not caused by f itself, starting with the current cycle or the next one. A value of type alarm is returned that you can use to call delete_alarm.

    val delete_alarm : alarm -> unit

    delete_alarm a will stop the calls to the function associated to a. Calling delete_alarm a again has no effect.

    val eventlog_pause : unit -> unit
    • deprecated Use Runtime_events.pause instead.
    val eventlog_resume : unit -> unit
    • deprecated Use Runtime_events.resume instead.
    module Memprof : sig ... end

    Memprof is a sampling engine for allocated memory words. Every allocated word has a probability of being sampled equal to a configurable sampling rate. Once a block is sampled, it becomes tracked. A tracked block triggers a user-defined callback as soon as it is allocated, promoted or deallocated.

    diff --git a/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html b/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html index d4ba370..650164b 100644 --- a/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html +++ b/ocaml/Stdlib/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Hashtbl.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H (ocaml.Stdlib.Hashtbl.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Hashtbl/Make/index.html b/ocaml/Stdlib/Hashtbl/Make/index.html index c27554b..cbe2c09 100644 --- a/ocaml/Stdlib/Hashtbl/Make/index.html +++ b/ocaml/Stdlib/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Hashtbl.Make)

    Module Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    Parameters

    module H : HashedType

    Signature

    type key = H.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +Make (ocaml.Stdlib.Hashtbl.Make)

    Module Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    Parameters

    module H : HashedType

    Signature

    type key = H.t
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html b/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html index 82224aa..a12a9f6 100644 --- a/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/ocaml/Stdlib/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Hashtbl.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H (ocaml.Stdlib.Hashtbl.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html b/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html index b0a9077..58b9260 100644 --- a/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html +++ b/ocaml/Stdlib/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.Hashtbl.MakeSeeded)

    Module Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    • since 4.00

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +MakeSeeded (ocaml.Stdlib.Hashtbl.MakeSeeded)

    Module Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    • since 4.00

    Parameters

    Signature

    type key = H.t
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/Hashtbl/index.html b/ocaml/Stdlib/Hashtbl/index.html index f20fee6..25d8507 100644 --- a/ocaml/Stdlib/Hashtbl/index.html +++ b/ocaml/Stdlib/Hashtbl/index.html @@ -1,80 +1,80 @@ -Hashtbl (ocaml.Stdlib.Hashtbl)

    Module Stdlib.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

    The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

    Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

    The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

    See the examples section.

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val add : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.add tbl key data adds a binding of key to data in table tbl.

    Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

    If you desire the classic behavior of replacing elements, see replace.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_opt : ('a, 'b) t -> 'a -> 'b option

    Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

    • since 4.05
    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

    Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

    Other comments for iter apply as well.

    • since 4.03
    val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

    Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

    module IntHash =
    -  struct
    -    type t = int
    -    let equal i j = i=j
    -    let hash i = i land max_int
    -  end
    +Hashtbl (ocaml.Stdlib.Hashtbl)

    Module Stdlib.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

    The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

    Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

    The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

    See the examples section.

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val add : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.add tbl key data adds a binding of key to data in table tbl.

    Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

    If you desire the classic behavior of replacing elements, see replace.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_opt : ('a, 'b) t -> 'a -> 'b option

    Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

    • since 4.05
    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

    Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

    Other comments for iter apply as well.

    • since 4.03
    val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

    Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

      module IntHash =
    +    struct
    +      type t = int
    +      let equal i j = i=j
    +      let hash i = i land max_int
    +    end
     
    -module IntHashtbl = Hashtbl.Make(IntHash)
    +  module IntHashtbl = Hashtbl.Make(IntHash)
     
    -let h = IntHashtbl.create 17 in
    -IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a - IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = sig ... end

    The input signature of the functor Make.

    module type S = sig ... end

    The output signature of the functor Make.

    module Make (H : HashedType) : S with type key = H.t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    module type SeededHashedType = sig ... end

    The input signature of the functor MakeSeeded.

    module type SeededS = sig ... end

    The output signature of the functor MakeSeeded.

    module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

    (* 0...99 *)
    -let seq = Seq.ints 0 |> Seq.take 100
    +  let h = IntHashtbl.create 17 in
    +  IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = sig ... end

    The input signature of the functor Make.

    module type S = sig ... end

    The output signature of the functor Make.

    module Make (H : HashedType) : S with type key = H.t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    module type SeededHashedType = sig ... end

    The input signature of the functor MakeSeeded.

    module type SeededS = sig ... end

    The output signature of the functor MakeSeeded.

    module MakeSeeded (H : SeededHashedType) : SeededS with type key = H.t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

      (* 0...99 *)
    +  let seq = Seq.ints 0 |> Seq.take 100
     
    -(* build from Seq.t *)
    -# let tbl =
    -    seq
    -    |> Seq.map (fun x -> x, string_of_int x)
    -    |> Hashtbl.of_seq
    -val tbl : (int, string) Hashtbl.t = <abstr>
    +  (* build from Seq.t *)
    +  # let tbl =
    +      seq
    +      |> Seq.map (fun x -> x, string_of_int x)
    +      |> Hashtbl.of_seq
    +  val tbl : (int, string) Hashtbl.t = <abstr>
     
    -# Hashtbl.length tbl
    -- : int = 100
    +  # Hashtbl.length tbl
    +  - : int = 100
     
    -# Hashtbl.find_opt tbl 32
    -- : string option = Some "32"
    +  # Hashtbl.find_opt tbl 32
    +  - : string option = Some "32"
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = None
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = None
     
    -# Hashtbl.replace tbl 166 "one six six"
    -- : unit = ()
    +  # Hashtbl.replace tbl 166 "one six six"
    +  - : unit = ()
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = Some "one six six"
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = Some "one six six"
     
    -# Hashtbl.length tbl
    -- : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

    # module Char_tbl = Hashtbl.Make(struct
    -    type t = char
    -    let equal = Char.equal
    -    let hash = Hashtbl.hash
    -  end)
    +  # Hashtbl.length tbl
    +  - : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

      # module Char_tbl = Hashtbl.Make(struct
    +      type t = char
    +      let equal = Char.equal
    +      let hash = Hashtbl.hash
    +    end)
     
    -(*  count distinct occurrences of chars in [seq] *)
    -# let count_chars (seq : char Seq.t) : _ list =
    -    let counts = Char_tbl.create 16 in
    -    Seq.iter
    -      (fun c ->
    -        let count_c =
    -          Char_tbl.find_opt counts c
    -          |> Option.value ~default:0
    -        in
    -        Char_tbl.replace counts c (count_c + 1))
    -      seq;
    -    (* turn into a list *)
    -    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    -      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    -val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
    +  (*  count distinct occurrences of chars in [seq] *)
    +  # let count_chars (seq : char Seq.t) : _ list =
    +      let counts = Char_tbl.create 16 in
    +      Seq.iter
    +        (fun c ->
    +          let count_c =
    +            Char_tbl.find_opt counts c
    +            |> Option.value ~default:0
    +          in
    +          Char_tbl.replace counts c (count_c + 1))
    +        seq;
    +      (* turn into a list *)
    +      Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    +        |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    +  val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
     
    -(* basic seq from a string *)
    -# let seq = String.to_seq "hello world, and all the camels in it!"
    -val seq : char Seq.t = <fun>
    +  (* basic seq from a string *)
    +  # let seq = String.to_seq "hello world, and all the camels in it!"
    +  val seq : char Seq.t = <fun>
     
    -# count_chars seq
    -- : (Char.t * int) list =
    -[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    - ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    - ('s', 1); ('t', 2); ('w', 1)]
    +  # count_chars seq
    +  - : (Char.t * int) list =
    +  [(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    +   ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    +   ('s', 1); ('t', 2); ('w', 1)]
     
    -(* "abcabcabc..." *)
    -# let seq2 =
    -    Seq.cycle (String.to_seq "abc") |> Seq.take 31
    -val seq2 : char Seq.t = <fun>
    +  (* "abcabcabc..." *)
    +  # let seq2 =
    +      Seq.cycle (String.to_seq "abc") |> Seq.take 31
    +  val seq2 : char Seq.t = <fun>
     
    -# String.of_seq seq2
    -- : String.t = "abcabcabcabcabcabcabcabcabcabca"
    +  # String.of_seq seq2
    +  - : String.t = "abcabcabcabcabcabcabcabcabcabca"
     
    -# count_chars seq2
    -- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
    \ No newline at end of file + # count_chars seq2 + - : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)] +
    diff --git a/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html b/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html index 34a8a7b..73131e1 100644 --- a/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html +++ b/ocaml/Stdlib/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (ocaml.Stdlib.Hashtbl.HashedType)

    Module type Hashtbl.HashedType

    The input signature of the functor Make.

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +HashedType (ocaml.Stdlib.Hashtbl.HashedType)

    Module type Hashtbl.HashedType

    The input signature of the functor Make.

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Hashtbl/module-type-S/index.html b/ocaml/Stdlib/Hashtbl/module-type-S/index.html index b91f80e..45fc8cf 100644 --- a/ocaml/Stdlib/Hashtbl/module-type-S/index.html +++ b/ocaml/Stdlib/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Stdlib.Hashtbl.S)

    Module type Hashtbl.S

    The output signature of the functor Make.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +S (ocaml.Stdlib.Hashtbl.S)

    Module type Hashtbl.S

    The output signature of the functor Make.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html b/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html index ff9dfff..e3191ed 100644 --- a/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html +++ b/ocaml/Stdlib/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (ocaml.Stdlib.Hashtbl.SeededHashedType)

    Module type Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    • since 4.00
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +SeededHashedType (ocaml.Stdlib.Hashtbl.SeededHashedType)

    Module type Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    • since 4.00
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html b/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html index ebcbf9a..8f6b8e9 100644 --- a/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html +++ b/ocaml/Stdlib/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (ocaml.Stdlib.Hashtbl.SeededS)

    Module type Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    • since 4.00
    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +SeededS (ocaml.Stdlib.Hashtbl.SeededS)

    Module type Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    • since 4.00
    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/In_channel/index.html b/ocaml/Stdlib/In_channel/index.html index 751f79f..22db2a2 100644 --- a/ocaml/Stdlib/In_channel/index.html +++ b/ocaml/Stdlib/In_channel/index.html @@ -1,3 +1,2 @@ -In_channel (ocaml.Stdlib.In_channel)

    Module Stdlib.In_channel

    Input channels.

    This module provides functions for working with input channels.

    See the example section below.

    • since 4.14

    Channels

    type t = in_channel

    The type of input channel.

    type open_flag = open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)

    Opening modes for open_gen.

    val stdin : t

    The standard input for the process.

    val open_bin : string -> t

    Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

    val open_text : string -> t

    Same as open_bin, but the file is opened in text mode, so that newline translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

    val open_gen : open_flag list -> int -> string -> t

    open_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. open_text and open_bin are special cases of this function.

    val with_open_bin : string -> (t -> 'a) -> 'a

    with_open_bin fn f opens a channel ic on file fn and returns f - ic. After f returns, either with a value or by raising an exception, ic is guaranteed to be closed.

    val with_open_text : string -> (t -> 'a) -> 'a

    Like with_open_bin, but the channel is opened in text mode (see open_text).

    val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

    Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

    val close : t -> unit

    Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close, which does nothing when applied to an already closed channel.

    val close_noerr : t -> unit

    Same as close, but ignore all errors.

    Input

    val input_char : t -> char option

    Read one character from the given input channel. Returns None if there are no more characters to read.

    val input_byte : t -> int option

    Same as input_char, but return the 8-bit integer representing the character. Returns None if the end of file was reached.

    val input_line : t -> string option

    input_line ic reads characters from ic until a newline or the end of file is reached. Returns the string of all characters read, without the newline (if any). Returns None if the end of the file has been reached. In particular, this will be the case if the last line of input is empty.

    A newline is the character \n unless the file is open in text mode and Sys.win32 is true in which case it is the sequence of characters \r\n.

    val really_input_string : t -> int -> string option

    really_input_string ic len reads len characters from channel ic and returns them in a new string. Returns None if the end of file is reached before len characters have been read.

    If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

    val input_all : t -> string

    input_all ic reads all remaining data from ic.

    If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

    val input_lines : t -> string list

    input_lines ic reads lines using input_line until the end of file is reached. It returns the list of all lines read, in the order they were read. The newline characters that terminate lines are not included in the returned strings. Empty lines produce empty strings.

    • since 5.1

    Advanced input

    val input : t -> bytes -> int -> int -> int

    input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached.

    Use really_input to read exactly len characters.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    val really_input : t -> bytes -> int -> int -> unit option

    really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

    Returns None if the end of file is reached before len characters have been read.

    If the same channel is read concurrently by multiple threads, the bytes read by really_input are not guaranteed to be contiguous.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    val fold_lines : ('acc -> string -> 'acc) -> 'acc -> t -> 'acc

    fold_lines f init ic reads lines from ic using input_line until the end of file is reached, and successively passes each line to function f in the style of a fold. More precisely, if lines l1, ..., lN are read, fold_lines f init ic computes f (... (f (f init l1) l2) ...) lN. If f has no side effects, this is equivalent to List.fold_left f init (In_channel.input_lines ic), but is more efficient since it does not construct the list of all lines read.

    • since 5.1

    Seeking

    val seek : t -> int64 -> unit

    seek chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

    val pos : t -> int64

    Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    Attributes

    val length : t -> int64

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

    val set_binary_mode : t -> bool -> unit

    set_binary_mode ic true sets the channel ic to binary mode: no translations take place during input.

    set_binary_mode ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n.

    This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    val isatty : t -> bool

    isatty ic is true if ic refers to a terminal or console window, false otherwise.

    • since 5.1

    Examples

    Reading the contents of a file:

    let read_file file = In_channel.with_open_bin file In_channel.input_all

    Reading a line from stdin:

    let user_input () = In_channel.input_line In_channel.stdin
    \ No newline at end of file +In_channel (ocaml.Stdlib.In_channel)

    Module Stdlib.In_channel

    Input channels.

    This module provides functions for working with input channels.

    See the example section below.

    • since 4.14

    Channels

    type t = in_channel

    The type of input channel.

    type open_flag = open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)

    Opening modes for open_gen.

    val stdin : t

    The standard input for the process.

    val open_bin : string -> t

    Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

    val open_text : string -> t

    Same as open_bin, but the file is opened in text mode, so that newline translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

    val open_gen : open_flag list -> int -> string -> t

    open_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. open_text and open_bin are special cases of this function.

    val with_open_bin : string -> (t -> 'a) -> 'a

    with_open_bin fn f opens a channel ic on file fn and returns f ic. After f returns, either with a value or by raising an exception, ic is guaranteed to be closed.

    val with_open_text : string -> (t -> 'a) -> 'a

    Like with_open_bin, but the channel is opened in text mode (see open_text).

    val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

    Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

    val close : t -> unit

    Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close, which does nothing when applied to an already closed channel.

    val close_noerr : t -> unit

    Same as close, but ignore all errors.

    Input

    val input_char : t -> char option

    Read one character from the given input channel. Returns None if there are no more characters to read.

    val input_byte : t -> int option

    Same as input_char, but return the 8-bit integer representing the character. Returns None if the end of file was reached.

    val input_line : t -> string option

    input_line ic reads characters from ic until a newline or the end of file is reached. Returns the string of all characters read, without the newline (if any). Returns None if the end of the file has been reached. In particular, this will be the case if the last line of input is empty.

    A newline is the character \n unless the file is open in text mode and Sys.win32 is true in which case it is the sequence of characters \r\n.

    val really_input_string : t -> int -> string option

    really_input_string ic len reads len characters from channel ic and returns them in a new string. Returns None if the end of file is reached before len characters have been read.

    If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

    val input_all : t -> string

    input_all ic reads all remaining data from ic.

    If the same channel is read concurrently by multiple threads, the returned string is not guaranteed to contain contiguous characters from the input.

    val input_lines : t -> string list

    input_lines ic reads lines using input_line until the end of file is reached. It returns the list of all lines read, in the order they were read. The newline characters that terminate lines are not included in the returned strings. Empty lines produce empty strings.

    • since 5.1

    Advanced input

    val input : t -> bytes -> int -> int -> int

    input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached.

    Use really_input to read exactly len characters.

    val really_input : t -> bytes -> int -> int -> unit option

    really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

    Returns None if the end of file is reached before len characters have been read.

    If the same channel is read concurrently by multiple threads, the bytes read by really_input are not guaranteed to be contiguous.

    val fold_lines : ('acc -> string -> 'acc) -> 'acc -> t -> 'acc

    fold_lines f init ic reads lines from ic using input_line until the end of file is reached, and successively passes each line to function f in the style of a fold. More precisely, if lines l1, ..., lN are read, fold_lines f init ic computes f (... (f (f init l1) l2) ...) lN. If f has no side effects, this is equivalent to List.fold_left f init (In_channel.input_lines ic), but is more efficient since it does not construct the list of all lines read.

    • since 5.1

    Seeking

    val seek : t -> int64 -> unit

    seek chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

    val pos : t -> int64

    Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    Attributes

    val length : t -> int64

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

    val set_binary_mode : t -> bool -> unit

    set_binary_mode ic true sets the channel ic to binary mode: no translations take place during input.

    set_binary_mode ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n.

    This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    val isatty : t -> bool

    isatty ic is true if ic refers to a terminal or console window, false otherwise.

    • since 5.1

    Examples

    Reading the contents of a file:

      let read_file file = In_channel.with_open_bin file In_channel.input_all

    Reading a line from stdin:

      let user_input () = In_channel.input_line In_channel.stdin
    diff --git a/ocaml/Stdlib/Int/index.html b/ocaml/Stdlib/Int/index.html index 0d29a89..dd53aa6 100644 --- a/ocaml/Stdlib/Int/index.html +++ b/ocaml/Stdlib/Int/index.html @@ -1,2 +1,2 @@ -Int (ocaml.Stdlib.Int)

    Module Stdlib.Int

    Integer values.

    Integers are Sys.int_size bits wide and use two's complement representation. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

    • since 4.08

    Integers

    type t = int

    The type for integer values.

    val zero : int

    zero is the integer 0.

    val one : int

    one is the integer 1.

    val minus_one : int

    minus_one is the integer -1.

    val neg : int -> int

    neg x is ~-x.

    val add : int -> int -> int

    add x y is the addition x + y.

    val sub : int -> int -> int

    sub x y is the subtraction x - y.

    val mul : int -> int -> int

    mul x y is the multiplication x * y.

    val div : int -> int -> int

    div x y is the division x / y. See Stdlib.(/) for details.

    val rem : int -> int -> int

    rem x y is the remainder x mod y. See Stdlib.(mod) for details.

    val succ : int -> int

    succ x is add x 1.

    val pred : int -> int

    pred x is sub x 1.

    val abs : int -> int

    abs x is the absolute value of x. That is x if x is positive and neg x if x is negative. Warning. This may be negative if the argument is min_int.

    val max_int : int

    max_int is the greatest representable integer, 2{^[Sys.int_size - 1]} - 1.

    val min_int : int

    min_int is the smallest representable integer, -2{^[Sys.int_size - 1]}.

    val logand : int -> int -> int

    logand x y is the bitwise logical and of x and y.

    val logor : int -> int -> int

    logor x y is the bitwise logical or of x and y.

    val logxor : int -> int -> int

    logxor x y is the bitwise logical exclusive or of x and y.

    val lognot : int -> int

    lognot x is the bitwise logical negation of x.

    val shift_left : int -> int -> int

    shift_left x n shifts x to the left by n bits. The result is unspecified if n < 0 or n > Sys.int_size.

    val shift_right : int -> int -> int

    shift_right x n shifts x to the right by n bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if n < 0 or n > Sys.int_size.

    val shift_right_logical : int -> int -> int

    shift_right x n shifts x to the right by n bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if n < 0 or n > Sys.int_size.

    Predicates and comparisons

    val equal : int -> int -> bool

    equal x y is true if and only if x = y.

    val compare : int -> int -> int

    compare x y is Stdlib.compare x y but more efficient.

    val min : int -> int -> int

    Return the smaller of the two arguments.

    • since 4.13
    val max : int -> int -> int

    Return the greater of the two arguments.

    • since 4.13

    Converting

    val to_float : int -> float

    to_float x is x as a floating point number.

    val of_float : float -> int

    of_float x truncates x to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val to_string : int -> string

    to_string x is the written representation of x in decimal.

    val seeded_hash : int -> int -> int

    A seeded hash function for ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : int -> int

    An unseeded hash function for ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Int (ocaml.Stdlib.Int)

    Module Stdlib.Int

    Integer values.

    Integers are Sys.int_size bits wide and use two's complement representation. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

    • since 4.08

    Integers

    type t = int

    The type for integer values.

    val zero : int

    zero is the integer 0.

    val one : int

    one is the integer 1.

    val minus_one : int

    minus_one is the integer -1.

    val neg : int -> int

    neg x is ~-x.

    val add : int -> int -> int

    add x y is the addition x + y.

    val sub : int -> int -> int

    sub x y is the subtraction x - y.

    val mul : int -> int -> int

    mul x y is the multiplication x * y.

    val div : int -> int -> int

    div x y is the division x / y. See Stdlib.(/) for details.

    val rem : int -> int -> int

    rem x y is the remainder x mod y. See Stdlib.(mod) for details.

    val succ : int -> int

    succ x is add x 1.

    val pred : int -> int

    pred x is sub x 1.

    val abs : int -> int

    abs x is the absolute value of x. That is x if x is positive and neg x if x is negative. Warning. This may be negative if the argument is min_int.

    val max_int : int

    max_int is the greatest representable integer, 2{^[Sys.int_size - 1]} - 1.

    val min_int : int

    min_int is the smallest representable integer, -2{^[Sys.int_size - 1]}.

    val logand : int -> int -> int

    logand x y is the bitwise logical and of x and y.

    val logor : int -> int -> int

    logor x y is the bitwise logical or of x and y.

    val logxor : int -> int -> int

    logxor x y is the bitwise logical exclusive or of x and y.

    val lognot : int -> int

    lognot x is the bitwise logical negation of x.

    val shift_left : int -> int -> int

    shift_left x n shifts x to the left by n bits. The result is unspecified if n < 0 or n > Sys.int_size.

    val shift_right : int -> int -> int

    shift_right x n shifts x to the right by n bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if n < 0 or n > Sys.int_size.

    val shift_right_logical : int -> int -> int

    shift_right x n shifts x to the right by n bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if n < 0 or n > Sys.int_size.

    Predicates and comparisons

    val equal : int -> int -> bool

    equal x y is true if and only if x = y.

    val compare : int -> int -> int

    compare x y is Stdlib.compare x y but more efficient.

    val min : int -> int -> int

    Return the smaller of the two arguments.

    • since 4.13
    val max : int -> int -> int

    Return the greater of the two arguments.

    • since 4.13

    Converting

    val to_float : int -> float

    to_float x is x as a floating point number.

    val of_float : float -> int

    of_float x truncates x to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val to_string : int -> string

    to_string x is the written representation of x in decimal.

    val seeded_hash : int -> int -> int

    A seeded hash function for ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : int -> int

    An unseeded hash function for ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/Int32/index.html b/ocaml/Stdlib/Int32/index.html index 07899b4..3f3663b 100644 --- a/ocaml/Stdlib/Int32/index.html +++ b/ocaml/Stdlib/Int32/index.html @@ -1,4 +1,4 @@ -Int32 (ocaml.Stdlib.Int32)

    Module Stdlib.Int32

    32-bit integers.

    This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.

    Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.

    Literals for 32-bit integers are suffixed by l:

    let zero: int32 = 0l
    -let one: int32 = 1l
    -let m_one: int32 = -1l
    val zero : int32

    The 32-bit integer 0.

    val one : int32

    The 32-bit integer 1.

    val minus_one : int32

    The 32-bit integer -1.

    val neg : int32 -> int32

    Unary negation.

    val add : int32 -> int32 -> int32

    Addition.

    val sub : int32 -> int32 -> int32

    Subtraction.

    val mul : int32 -> int32 -> int32

    Multiplication.

    val div : int32 -> int32 -> int32

    Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    • raises Division_by_zero

      if the second argument is zero.

    val unsigned_div : int32 -> int32 -> int32

    Same as div, except that arguments and result are interpreted as unsigned 32-bit integers.

    • since 4.08
    val rem : int32 -> int32 -> int32

    Integer remainder. If y is not zero, the result of Int32.rem x y satisfies the following property: x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y). If y = 0, Int32.rem x y raises Division_by_zero.

    val unsigned_rem : int32 -> int32 -> int32

    Same as rem, except that arguments and result are interpreted as unsigned 32-bit integers.

    • since 4.08
    val succ : int32 -> int32

    Successor. Int32.succ x is Int32.add x Int32.one.

    val pred : int32 -> int32

    Predecessor. Int32.pred x is Int32.sub x Int32.one.

    val abs : int32 -> int32

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int32

    The greatest representable 32-bit integer, 231 - 1.

    val min_int : int32

    The smallest representable 32-bit integer, -231.

    val logand : int32 -> int32 -> int32

    Bitwise logical and.

    val logor : int32 -> int32 -> int32

    Bitwise logical or.

    val logxor : int32 -> int32 -> int32

    Bitwise logical exclusive or.

    val lognot : int32 -> int32

    Bitwise logical negation.

    val shift_left : int32 -> int -> int32

    Int32.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 32.

    val shift_right : int32 -> int -> int32

    Int32.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.

    val shift_right_logical : int32 -> int -> int32

    Int32.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.

    val of_int : int -> int32

    Convert the given integer (type int) to a 32-bit integer (type int32). On 64-bit platforms, the argument is taken modulo 232.

    val to_int : int32 -> int

    Convert the given 32-bit integer (type int32) to an integer (type int). On 32-bit platforms, the 32-bit integer is taken modulo 231, i.e. the high-order bit is lost during the conversion. On 64-bit platforms, the conversion is exact.

    val unsigned_to_int : int32 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int32

    Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int32.min_int, Int32.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int32 -> float

    Convert the given 32-bit integer to a floating-point number.

    val of_string : string -> int32

    Convert the given string to a 32-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int32.max_int+1]. If the input exceeds Int32.max_int it is converted to the signed integer Int32.min_int + input - Int32.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.

    val of_string_opt : string -> int32 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int32 -> string

    Return the string representation of its argument, in signed decimal.

    val bits_of_float : float -> int32

    Return the internal representation of the given float according to the IEEE 754 floating-point 'single format' bit layout. Bit 31 of the result represents the sign of the float; bits 30 to 23 represent the (biased) exponent; bits 22 to 0 represent the mantissa.

    val float_of_bits : int32 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'single format' bit layout, is the given int32.

    type t = int32

    An alias for the type of 32-bit integers.

    val compare : t -> t -> int

    The comparison function for 32-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int32 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 32-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int32s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 32-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 32-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Int32 (ocaml.Stdlib.Int32)

    Module Stdlib.Int32

    32-bit integers.

    This module provides operations on the type int32 of signed 32-bit integers. Unlike the built-in int type, the type int32 is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations over int32 are taken modulo 232.

    Performance notice: values of type int32 occupy more memory space than values of type int, and arithmetic operations on int32 are generally slower than those on int. Use int32 only when the application requires exact 32-bit arithmetic.

    Literals for 32-bit integers are suffixed by l:

      let zero: int32 = 0l
    +  let one: int32 = 1l
    +  let m_one: int32 = -1l
    val zero : int32

    The 32-bit integer 0.

    val one : int32

    The 32-bit integer 1.

    val minus_one : int32

    The 32-bit integer -1.

    val neg : int32 -> int32

    Unary negation.

    val add : int32 -> int32 -> int32

    Addition.

    val sub : int32 -> int32 -> int32

    Subtraction.

    val mul : int32 -> int32 -> int32

    Multiplication.

    val div : int32 -> int32 -> int32

    Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : int32 -> int32 -> int32

    Same as div, except that arguments and result are interpreted as unsigned 32-bit integers.

    • since 4.08
    val rem : int32 -> int32 -> int32

    Integer remainder. If y is not zero, the result of Int32.rem x y satisfies the following property: x = Int32.add (Int32.mul (Int32.div x y) y) (Int32.rem x y). If y = 0, Int32.rem x y raises Division_by_zero.

    val unsigned_rem : int32 -> int32 -> int32

    Same as rem, except that arguments and result are interpreted as unsigned 32-bit integers.

    • since 4.08
    val succ : int32 -> int32

    Successor. Int32.succ x is Int32.add x Int32.one.

    val pred : int32 -> int32

    Predecessor. Int32.pred x is Int32.sub x Int32.one.

    val abs : int32 -> int32

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int32

    The greatest representable 32-bit integer, 231 - 1.

    val min_int : int32

    The smallest representable 32-bit integer, -231.

    val logand : int32 -> int32 -> int32

    Bitwise logical and.

    val logor : int32 -> int32 -> int32

    Bitwise logical or.

    val logxor : int32 -> int32 -> int32

    Bitwise logical exclusive or.

    val lognot : int32 -> int32

    Bitwise logical negation.

    val shift_left : int32 -> int -> int32

    Int32.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 32.

    val shift_right : int32 -> int -> int32

    Int32.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 32.

    val shift_right_logical : int32 -> int -> int32

    Int32.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 32.

    val of_int : int -> int32

    Convert the given integer (type int) to a 32-bit integer (type int32). On 64-bit platforms, the argument is taken modulo 232.

    val to_int : int32 -> int

    Convert the given 32-bit integer (type int32) to an integer (type int). On 32-bit platforms, the 32-bit integer is taken modulo 231, i.e. the high-order bit is lost during the conversion. On 64-bit platforms, the conversion is exact.

    val unsigned_to_int : int32 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int32

    Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int32.min_int, Int32.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int32 -> float

    Convert the given 32-bit integer to a floating-point number.

    val of_string : string -> int32

    Convert the given string to a 32-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int32.max_int+1]. If the input exceeds Int32.max_int it is converted to the signed integer Int32.min_int + input - Int32.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int32.

    val of_string_opt : string -> int32 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int32 -> string

    Return the string representation of its argument, in signed decimal.

    val bits_of_float : float -> int32

    Return the internal representation of the given float according to the IEEE 754 floating-point 'single format' bit layout. Bit 31 of the result represents the sign of the float; bits 30 to 23 represent the (biased) exponent; bits 22 to 0 represent the mantissa.

    val float_of_bits : int32 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'single format' bit layout, is the given int32.

    type t = int32

    An alias for the type of 32-bit integers.

    val compare : t -> t -> int

    The comparison function for 32-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int32 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 32-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int32s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 32-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 32-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/Int64/index.html b/ocaml/Stdlib/Int64/index.html index db735df..01d67cf 100644 --- a/ocaml/Stdlib/Int64/index.html +++ b/ocaml/Stdlib/Int64/index.html @@ -1,4 +1,4 @@ -Int64 (ocaml.Stdlib.Int64)

    Module Stdlib.Int64

    64-bit integers.

    This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264

    Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.

    Literals for 64-bit integers are suffixed by L:

    let zero: int64 = 0L
    -let one: int64 = 1L
    -let m_one: int64 = -1L
    val zero : int64

    The 64-bit integer 0.

    val one : int64

    The 64-bit integer 1.

    val minus_one : int64

    The 64-bit integer -1.

    val neg : int64 -> int64

    Unary negation.

    val add : int64 -> int64 -> int64

    Addition.

    val sub : int64 -> int64 -> int64

    Subtraction.

    val mul : int64 -> int64 -> int64

    Multiplication.

    val div : int64 -> int64 -> int64

    Integer division.

    • raises Division_by_zero

      if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : int64 -> int64 -> int64

    Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val rem : int64 -> int64 -> int64

    Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

    val unsigned_rem : int64 -> int64 -> int64

    Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val succ : int64 -> int64

    Successor. Int64.succ x is Int64.add x Int64.one.

    val pred : int64 -> int64

    Predecessor. Int64.pred x is Int64.sub x Int64.one.

    val abs : int64 -> int64

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int64

    The greatest representable 64-bit integer, 263 - 1.

    val min_int : int64

    The smallest representable 64-bit integer, -263.

    val logand : int64 -> int64 -> int64

    Bitwise logical and.

    val logor : int64 -> int64 -> int64

    Bitwise logical or.

    val logxor : int64 -> int64 -> int64

    Bitwise logical exclusive or.

    val lognot : int64 -> int64

    Bitwise logical negation.

    val shift_left : int64 -> int -> int64

    Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right : int64 -> int -> int64

    Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right_logical : int64 -> int -> int64

    Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

    val of_int : int -> int64

    Convert the given integer (type int) to a 64-bit integer (type int64).

    val to_int : int64 -> int

    Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

    val unsigned_to_int : int64 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int64

    Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int64 -> float

    Convert the given 64-bit integer to a floating-point number.

    val of_int32 : int32 -> int64

    Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

    val to_int32 : int64 -> int32

    Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

    val of_nativeint : nativeint -> int64

    Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

    val to_nativeint : int64 -> nativeint

    Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

    val of_string : string -> int64

    Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

    val of_string_opt : string -> int64 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int64 -> string

    Return the string representation of its argument, in decimal.

    val bits_of_float : float -> int64

    Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

    val float_of_bits : int64 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

    type t = int64

    An alias for the type of 64-bit integers.

    val compare : t -> t -> int

    The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Int64 (ocaml.Stdlib.Int64)

    Module Stdlib.Int64

    64-bit integers.

    This module provides operations on the type int64 of signed 64-bit integers. Unlike the built-in int type, the type int64 is guaranteed to be exactly 64-bit wide on all platforms. All arithmetic operations over int64 are taken modulo 264

    Performance notice: values of type int64 occupy more memory space than values of type int, and arithmetic operations on int64 are generally slower than those on int. Use int64 only when the application requires exact 64-bit arithmetic.

    Literals for 64-bit integers are suffixed by L:

      let zero: int64 = 0L
    +  let one: int64 = 1L
    +  let m_one: int64 = -1L
    val zero : int64

    The 64-bit integer 0.

    val one : int64

    The 64-bit integer 1.

    val minus_one : int64

    The 64-bit integer -1.

    val neg : int64 -> int64

    Unary negation.

    val add : int64 -> int64 -> int64

    Addition.

    val sub : int64 -> int64 -> int64

    Subtraction.

    val mul : int64 -> int64 -> int64

    Multiplication.

    val div : int64 -> int64 -> int64

    Integer division.

    • raises Division_by_zero

      if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : int64 -> int64 -> int64

    Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val rem : int64 -> int64 -> int64

    Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

    val unsigned_rem : int64 -> int64 -> int64

    Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val succ : int64 -> int64

    Successor. Int64.succ x is Int64.add x Int64.one.

    val pred : int64 -> int64

    Predecessor. Int64.pred x is Int64.sub x Int64.one.

    val abs : int64 -> int64

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int64

    The greatest representable 64-bit integer, 263 - 1.

    val min_int : int64

    The smallest representable 64-bit integer, -263.

    val logand : int64 -> int64 -> int64

    Bitwise logical and.

    val logor : int64 -> int64 -> int64

    Bitwise logical or.

    val logxor : int64 -> int64 -> int64

    Bitwise logical exclusive or.

    val lognot : int64 -> int64

    Bitwise logical negation.

    val shift_left : int64 -> int -> int64

    Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right : int64 -> int -> int64

    Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right_logical : int64 -> int -> int64

    Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

    val of_int : int -> int64

    Convert the given integer (type int) to a 64-bit integer (type int64).

    val to_int : int64 -> int

    Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

    val unsigned_to_int : int64 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int64

    Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int64 -> float

    Convert the given 64-bit integer to a floating-point number.

    val of_int32 : int32 -> int64

    Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

    val to_int32 : int64 -> int32

    Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

    val of_nativeint : nativeint -> int64

    Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

    val to_nativeint : int64 -> nativeint

    Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

    val of_string : string -> int64

    Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

    val of_string_opt : string -> int64 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int64 -> string

    Return the string representation of its argument, in decimal.

    val bits_of_float : float -> int64

    Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

    val float_of_bits : int64 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

    type t = int64

    An alias for the type of 64-bit integers.

    val compare : t -> t -> int

    The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/LargeFile/index.html b/ocaml/Stdlib/LargeFile/index.html index a199df5..8308f63 100644 --- a/ocaml/Stdlib/LargeFile/index.html +++ b/ocaml/Stdlib/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (ocaml.Stdlib.LargeFile)

    Module Stdlib.LargeFile

    Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

    val seek_out : out_channel -> int64 -> unit
    val pos_out : out_channel -> int64
    val out_channel_length : out_channel -> int64
    val seek_in : in_channel -> int64 -> unit
    val pos_in : in_channel -> int64
    val in_channel_length : in_channel -> int64
    \ No newline at end of file +LargeFile (ocaml.Stdlib.LargeFile)

    Module Stdlib.LargeFile

    Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

    val seek_out : out_channel -> int64 -> unit
    val pos_out : out_channel -> int64
    val out_channel_length : out_channel -> int64
    val seek_in : in_channel -> int64 -> unit
    val pos_in : in_channel -> int64
    val in_channel_length : in_channel -> int64
    diff --git a/ocaml/Stdlib/Lazy/index.html b/ocaml/Stdlib/Lazy/index.html index 6103403..e58ecec 100644 --- a/ocaml/Stdlib/Lazy/index.html +++ b/ocaml/Stdlib/Lazy/index.html @@ -1,5 +1,5 @@ -Lazy (ocaml.Stdlib.Lazy)

    Module Stdlib.Lazy

    Deferred computations.

    type 'a t = 'a CamlinternalLazy.t

    A value of type 'a Lazy.t is a deferred computation, called a suspension, that has a result of type 'a. The special expression syntax lazy (expr) makes a suspension of the computation of expr, without computing expr itself yet. "Forcing" the suspension will then compute expr and return its result. Matching a suspension with the special pattern syntax lazy(pattern) also computes the underlying expression and tries to bind it to pattern:

    let lazy_option_map f x =
    -match x with
    -| lazy (Some x) -> Some (Lazy.force f x)
    -| _ -> None

    Note: If lazy patterns appear in multiple cases in a pattern-matching, lazy expressions may be forced even outside of the case ultimately selected by the pattern matching. In the example above, the suspension x is always computed.

    Note: lazy_t is the built-in type constructor used by the compiler for the lazy keyword. You should not use it directly. Always use Lazy.t instead.

    Note: Lazy.force is not concurrency-safe. If you use this module with multiple fibers, systhreads or domains, then you will need to add some locks. The module however ensures memory-safety, and hence, concurrently accessing this module will not lead to a crash but the behaviour is unspecified.

    Note: if the program is compiled with the -rectypes option, ill-founded recursive definitions of the form let rec x = lazy x or let rec x = lazy(lazy(...(lazy x))) are accepted by the type-checker and lead, when forced, to ill-formed values that trigger infinite loops in the garbage collector and other parts of the run-time system. Without the -rectypes option, such ill-founded recursive definitions are rejected by the type-checker.

    exception Undefined

    Raised when forcing a suspension concurrently from multiple fibers, systhreads or domains, or when the suspension tries to force itself recursively.

    val force : 'a t -> 'a

    force x forces the suspension x and returns its result. If x has already been forced, Lazy.force x returns the same value again without recomputing it. If it raised an exception, the same exception is raised again.

    Iterators

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f x returns a suspension that, when forced, forces x and applies f to its value.

    It is equivalent to lazy (f (Lazy.force x)).

    • since 4.13

    Reasoning on already-forced suspensions

    val is_val : 'a t -> bool

    is_val x returns true if x has already been forced and did not raise an exception.

    • since 4.00
    val from_val : 'a -> 'a t

    from_val v evaluates v first (as any function would) and returns an already-forced suspension of its result. It is the same as let x = v in lazy x, but uses dynamic tests to optimize suspension creation in some cases.

    • since 4.00
    val map_val : ('a -> 'b) -> 'a t -> 'b t

    map_val f x applies f directly if x is already forced, otherwise it behaves as map f x.

    When x is already forced, this behavior saves the construction of a suspension, but on the other hand it performs more work eagerly that may not be useful if you never force the function result.

    If f raises an exception, it will be raised immediately when is_val x, or raised only when forcing the thunk otherwise.

    If map_val f x does not raise an exception, then is_val (map_val f x) is equal to is_val x.

    • since 4.13

    Advanced

    The following definitions are for advanced uses only; they require familiary with the lazy compilation scheme to be used appropriately.

    val from_fun : (unit -> 'a) -> 'a t

    from_fun f is the same as lazy (f ()) but slightly more efficient.

    It should only be used if the function f is already defined. In particular it is always less efficient to write from_fun (fun () -> expr) than lazy expr.

    • since 4.00
    val force_val : 'a t -> 'a

    force_val x forces the suspension x and returns its result. If x has already been forced, force_val x returns the same value again without recomputing it.

    If the computation of x raises an exception, it is unspecified whether force_val x raises the same exception or Undefined.

    • raises Undefined

      if the forcing of x tries to force x itself recursively.

    \ No newline at end of file +Lazy (ocaml.Stdlib.Lazy)

    Module Stdlib.Lazy

    Deferred computations.

    type 'a t = 'a CamlinternalLazy.t

    A value of type 'a Lazy.t is a deferred computation, called a suspension, that has a result of type 'a. The special expression syntax lazy (expr) makes a suspension of the computation of expr, without computing expr itself yet. "Forcing" the suspension will then compute expr and return its result. Matching a suspension with the special pattern syntax lazy(pattern) also computes the underlying expression and tries to bind it to pattern:

      let lazy_option_map f x =
    +  match x with
    +  | lazy (Some x) -> Some (Lazy.force f x)
    +  | _ -> None

    Note: If lazy patterns appear in multiple cases in a pattern-matching, lazy expressions may be forced even outside of the case ultimately selected by the pattern matching. In the example above, the suspension x is always computed.

    Note: lazy_t is the built-in type constructor used by the compiler for the lazy keyword. You should not use it directly. Always use Lazy.t instead.

    Note: Lazy.force is not concurrency-safe. If you use this module with multiple fibers, systhreads or domains, then you will need to add some locks. The module however ensures memory-safety, and hence, concurrently accessing this module will not lead to a crash but the behaviour is unspecified.

    Note: if the program is compiled with the -rectypes option, ill-founded recursive definitions of the form let rec x = lazy x or let rec x = lazy(lazy(...(lazy x))) are accepted by the type-checker and lead, when forced, to ill-formed values that trigger infinite loops in the garbage collector and other parts of the run-time system. Without the -rectypes option, such ill-founded recursive definitions are rejected by the type-checker.

    exception Undefined

    Raised when forcing a suspension concurrently from multiple fibers, systhreads or domains, or when the suspension tries to force itself recursively.

    val force : 'a t -> 'a

    force x forces the suspension x and returns its result. If x has already been forced, Lazy.force x returns the same value again without recomputing it. If it raised an exception, the same exception is raised again.

    Iterators

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f x returns a suspension that, when forced, forces x and applies f to its value.

    It is equivalent to lazy (f (Lazy.force x)).

    • since 4.13

    Reasoning on already-forced suspensions

    val is_val : 'a t -> bool

    is_val x returns true if x has already been forced and did not raise an exception.

    • since 4.00
    val from_val : 'a -> 'a t

    from_val v evaluates v first (as any function would) and returns an already-forced suspension of its result. It is the same as let x = v in lazy x, but uses dynamic tests to optimize suspension creation in some cases.

    • since 4.00
    val map_val : ('a -> 'b) -> 'a t -> 'b t

    map_val f x applies f directly if x is already forced, otherwise it behaves as map f x.

    When x is already forced, this behavior saves the construction of a suspension, but on the other hand it performs more work eagerly that may not be useful if you never force the function result.

    If f raises an exception, it will be raised immediately when is_val x, or raised only when forcing the thunk otherwise.

    If map_val f x does not raise an exception, then is_val (map_val f x) is equal to is_val x.

    • since 4.13

    Advanced

    The following definitions are for advanced uses only; they require familiary with the lazy compilation scheme to be used appropriately.

    val from_fun : (unit -> 'a) -> 'a t

    from_fun f is the same as lazy (f ()) but slightly more efficient.

    It should only be used if the function f is already defined. In particular it is always less efficient to write from_fun (fun () -> expr) than lazy expr.

    • since 4.00
    val force_val : 'a t -> 'a

    force_val x forces the suspension x and returns its result. If x has already been forced, force_val x returns the same value again without recomputing it.

    If the computation of x raises an exception, it is unspecified whether force_val x raises the same exception or Undefined.

    • raises Undefined

      if the forcing of x tries to force x itself recursively.

    diff --git a/ocaml/Stdlib/Lexing/index.html b/ocaml/Stdlib/Lexing/index.html index a78e0fb..371569d 100644 --- a/ocaml/Stdlib/Lexing/index.html +++ b/ocaml/Stdlib/Lexing/index.html @@ -1,2 +1,2 @@ -Lexing (ocaml.Stdlib.Lexing)

    Module Stdlib.Lexing

    The run-time library for lexers generated by ocamllex.

    Positions

    type position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }

    A value of type position describes a point in a source file. pos_fname is the file name; pos_lnum is the line number; pos_bol is the offset of the beginning of the line (number of characters between the beginning of the lexbuf and the beginning of the line); pos_cnum is the offset of the position (number of characters between the beginning of the lexbuf and the position). The difference between pos_cnum and pos_bol is the character offset within the line (i.e. the column number, assuming each character is one column wide).

    See the documentation of type lexbuf for information about how the lexing engine will manage positions.

    val dummy_pos : position

    A value of type position, guaranteed to be different from any valid position.

    Lexer buffers

    type lexbuf = {
    1. refill_buff : lexbuf -> unit;
    2. mutable lex_buffer : bytes;
    3. mutable lex_buffer_len : int;
    4. mutable lex_abs_pos : int;
    5. mutable lex_start_pos : int;
    6. mutable lex_curr_pos : int;
    7. mutable lex_last_pos : int;
    8. mutable lex_last_action : int;
    9. mutable lex_eof_reached : bool;
    10. mutable lex_mem : int array;
    11. mutable lex_start_p : position;
    12. mutable lex_curr_p : position;
    }

    The type of lexer buffers. A lexer buffer is the argument passed to the scanning functions defined by the generated scanners. The lexer buffer holds the current state of the scanner, plus a function to refill the buffer from the input.

    Lexers can optionally maintain the lex_curr_p and lex_start_p position fields. This "position tracking" mode is the default, and it corresponds to passing ~with_position:true to functions that create lexer buffers. In this mode, the lexing engine and lexer actions are co-responsible for properly updating the position fields, as described in the next paragraph. When the mode is explicitly disabled (with ~with_position:false), the lexing engine will not touch the position fields and the lexer actions should be careful not to do it either; the lex_curr_p and lex_start_p field will then always hold the dummy_pos invalid position. Not tracking positions avoids allocations and memory writes and can significantly improve the performance of the lexer in contexts where lex_start_p and lex_curr_p are not needed.

    Position tracking mode works as follows. At each token, the lexing engine will copy lex_curr_p to lex_start_p, then change the pos_cnum field of lex_curr_p by updating it with the number of characters read since the start of the lexbuf. The other fields are left unchanged by the lexing engine. In order to keep them accurate, they must be initialised before the first use of the lexbuf, and updated by the relevant lexer actions (i.e. at each end of line -- see also new_line).

    val from_channel : ?with_positions:bool -> in_channel -> lexbuf

    Create a lexer buffer on the given input channel. Lexing.from_channel inchan returns a lexer buffer which reads from the input channel inchan, at the current reading position.

    val from_string : ?with_positions:bool -> string -> lexbuf

    Create a lexer buffer which reads from the given string. Reading starts from the first character in the string. An end-of-input condition is generated when the end of the string is reached.

    val from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf

    Create a lexer buffer with the given function as its reading method. When the scanner needs more characters, it will call the given function, giving it a byte sequence s and a byte count n. The function should put n bytes or fewer in s, starting at index 0, and return the number of bytes provided. A return value of 0 means end of input.

    val set_position : lexbuf -> position -> unit

    Set the initial tracked input position for lexbuf to a custom value. Ignores pos_fname. See set_filename for changing this field.

    • since 4.11
    val set_filename : lexbuf -> string -> unit

    Set filename in the initial tracked position to file in lexbuf.

    • since 4.11
    val with_positions : lexbuf -> bool

    Tell whether the lexer buffer keeps track of position fields lex_curr_p / lex_start_p, as determined by the corresponding optional argument for functions that create lexer buffers (whose default value is true).

    When with_positions is false, lexer actions should not modify position fields. Doing it nevertheless could re-enable the with_position mode and degrade performances.

    Functions for lexer semantic actions

    The following functions can be called from the semantic actions of lexer definitions (the ML code enclosed in braces that computes the value returned by lexing functions). They give access to the character string matched by the regular expression associated with the semantic action. These functions must be applied to the argument lexbuf, which, in the code generated by ocamllex, is bound to the lexer buffer passed to the parsing function.

    val lexeme : lexbuf -> string

    Lexing.lexeme lexbuf returns the string matched by the regular expression.

    val lexeme_char : lexbuf -> int -> char

    Lexing.lexeme_char lexbuf i returns character number i in the matched string.

    val lexeme_start : lexbuf -> int

    Lexing.lexeme_start lexbuf returns the offset in the input stream of the first character of the matched string. The first character of the stream has offset 0.

    val lexeme_end : lexbuf -> int

    Lexing.lexeme_end lexbuf returns the offset in the input stream of the character following the last character of the matched string. The first character of the stream has offset 0.

    val lexeme_start_p : lexbuf -> position

    Like lexeme_start, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

    val lexeme_end_p : lexbuf -> position

    Like lexeme_end, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

    val new_line : lexbuf -> unit

    Update the lex_curr_p field of the lexbuf to reflect the start of a new line. You can call this function in the semantic action of the rule that matches the end-of-line character. The function does nothing when position tracking is disabled.

    • since 3.11

    Miscellaneous functions

    val flush_input : lexbuf -> unit

    Discard the contents of the buffer and reset the current position to 0. The next use of the lexbuf will trigger a refill.

    \ No newline at end of file +Lexing (ocaml.Stdlib.Lexing)

    Module Stdlib.Lexing

    The run-time library for lexers generated by ocamllex.

    Positions

    type position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }

    A value of type position describes a point in a source file. pos_fname is the file name; pos_lnum is the line number; pos_bol is the offset of the beginning of the line (number of characters between the beginning of the lexbuf and the beginning of the line); pos_cnum is the offset of the position (number of characters between the beginning of the lexbuf and the position). The difference between pos_cnum and pos_bol is the character offset within the line (i.e. the column number, assuming each character is one column wide).

    See the documentation of type lexbuf for information about how the lexing engine will manage positions.

    val dummy_pos : position

    A value of type position, guaranteed to be different from any valid position.

    Lexer buffers

    type lexbuf = {
    1. refill_buff : lexbuf -> unit;
    2. mutable lex_buffer : bytes;
    3. mutable lex_buffer_len : int;
    4. mutable lex_abs_pos : int;
    5. mutable lex_start_pos : int;
    6. mutable lex_curr_pos : int;
    7. mutable lex_last_pos : int;
    8. mutable lex_last_action : int;
    9. mutable lex_eof_reached : bool;
    10. mutable lex_mem : int array;
    11. mutable lex_start_p : position;
    12. mutable lex_curr_p : position;
    }

    The type of lexer buffers. A lexer buffer is the argument passed to the scanning functions defined by the generated scanners. The lexer buffer holds the current state of the scanner, plus a function to refill the buffer from the input.

    Lexers can optionally maintain the lex_curr_p and lex_start_p position fields. This "position tracking" mode is the default, and it corresponds to passing ~with_position:true to functions that create lexer buffers. In this mode, the lexing engine and lexer actions are co-responsible for properly updating the position fields, as described in the next paragraph. When the mode is explicitly disabled (with ~with_position:false), the lexing engine will not touch the position fields and the lexer actions should be careful not to do it either; the lex_curr_p and lex_start_p field will then always hold the dummy_pos invalid position. Not tracking positions avoids allocations and memory writes and can significantly improve the performance of the lexer in contexts where lex_start_p and lex_curr_p are not needed.

    Position tracking mode works as follows. At each token, the lexing engine will copy lex_curr_p to lex_start_p, then change the pos_cnum field of lex_curr_p by updating it with the number of characters read since the start of the lexbuf. The other fields are left unchanged by the lexing engine. In order to keep them accurate, they must be initialised before the first use of the lexbuf, and updated by the relevant lexer actions (i.e. at each end of line -- see also new_line).

    val from_channel : ?with_positions:bool -> in_channel -> lexbuf

    Create a lexer buffer on the given input channel. Lexing.from_channel inchan returns a lexer buffer which reads from the input channel inchan, at the current reading position.

    val from_string : ?with_positions:bool -> string -> lexbuf

    Create a lexer buffer which reads from the given string. Reading starts from the first character in the string. An end-of-input condition is generated when the end of the string is reached.

    val from_function : ?with_positions:bool -> (bytes -> int -> int) -> lexbuf

    Create a lexer buffer with the given function as its reading method. When the scanner needs more characters, it will call the given function, giving it a byte sequence s and a byte count n. The function should put n bytes or fewer in s, starting at index 0, and return the number of bytes provided. A return value of 0 means end of input.

    val set_position : lexbuf -> position -> unit

    Set the initial tracked input position for lexbuf to a custom value. Ignores pos_fname. See set_filename for changing this field.

    • since 4.11
    val set_filename : lexbuf -> string -> unit

    Set filename in the initial tracked position to file in lexbuf.

    • since 4.11
    val with_positions : lexbuf -> bool

    Tell whether the lexer buffer keeps track of position fields lex_curr_p / lex_start_p, as determined by the corresponding optional argument for functions that create lexer buffers (whose default value is true).

    When with_positions is false, lexer actions should not modify position fields. Doing it nevertheless could re-enable the with_position mode and degrade performances.

    Functions for lexer semantic actions

    The following functions can be called from the semantic actions of lexer definitions (the ML code enclosed in braces that computes the value returned by lexing functions). They give access to the character string matched by the regular expression associated with the semantic action. These functions must be applied to the argument lexbuf, which, in the code generated by ocamllex, is bound to the lexer buffer passed to the parsing function.

    val lexeme : lexbuf -> string

    Lexing.lexeme lexbuf returns the string matched by the regular expression.

    val lexeme_char : lexbuf -> int -> char

    Lexing.lexeme_char lexbuf i returns character number i in the matched string.

    val lexeme_start : lexbuf -> int

    Lexing.lexeme_start lexbuf returns the offset in the input stream of the first character of the matched string. The first character of the stream has offset 0.

    val lexeme_end : lexbuf -> int

    Lexing.lexeme_end lexbuf returns the offset in the input stream of the character following the last character of the matched string. The first character of the stream has offset 0.

    val lexeme_start_p : lexbuf -> position

    Like lexeme_start, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

    val lexeme_end_p : lexbuf -> position

    Like lexeme_end, but return a complete position instead of an offset. When position tracking is disabled, the function returns dummy_pos.

    val new_line : lexbuf -> unit

    Update the lex_curr_p field of the lexbuf to reflect the start of a new line. You can call this function in the semantic action of the rule that matches the end-of-line character. The function does nothing when position tracking is disabled.

    • since 3.11

    Miscellaneous functions

    val flush_input : lexbuf -> unit

    Discard the contents of the buffer and reset the current position to 0. The next use of the lexbuf will trigger a refill.

    diff --git a/ocaml/Stdlib/List/index.html b/ocaml/Stdlib/List/index.html index 6950ab1..2fd1768 100644 --- a/ocaml/Stdlib/List/index.html +++ b/ocaml/Stdlib/List/index.html @@ -1,16 +1,16 @@ -List (ocaml.Stdlib.List)

    Module Stdlib.List

    List operations.

    Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

    The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val is_empty : 'a list -> bool

    is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

    • since 5.1
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.03 (4.05 in ListLabels)
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    • raises Invalid_argument

      if n is negative.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • raises Invalid_argument

      if n is negative.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val init : int -> (int -> 'a) -> 'a list

    init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

    • raises Invalid_argument

      if len < 0.

    • since 4.06
    val append : 'a list -> 'a list -> 'a list

    append l0 l1 appends l1 to l0. Same function as the infix operator @.

    • since 5.1 this function is tail-recursive.
    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val concat : 'a list list -> 'a list

    Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iter : ('a -> unit) -> 'a list -> unit

    iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

    val iteri : (int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val map : ('a -> 'b) -> 'a list -> 'b list

    map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

    val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

    Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : ('a -> 'b) -> 'a list -> 'b list

    rev_map f l gives the same result as rev (map f l), but is more efficient.

    val filter_map : ('a -> 'b option) -> 'a list -> 'b list

    filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

    • since 4.08
    val concat_map : ('a -> 'b list) -> 'a list -> 'b list

    concat_map f l gives the same result as concat (map f l). Tail-recursive.

    • since 4.10
    val fold_left_map : +List (ocaml.Stdlib.List)

    Module Stdlib.List

    List operations.

    Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

    The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val is_empty : 'a list -> bool

    is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

    • since 5.1
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.03 (4.05 in ListLabels)
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val init : int -> (int -> 'a) -> 'a list

    init len f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

    • since 4.06
    val append : 'a list -> 'a list -> 'a list

    append l0 l1 appends l1 to l0. Same function as the infix operator @.

    • since 5.1 this function is tail-recursive.
    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val concat : 'a list list -> 'a list

    Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : ('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : ('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iter : ('a -> unit) -> 'a list -> unit

    iter f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

    val iteri : (int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val map : ('a -> 'b) -> 'a list -> 'b list

    map f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

    val mapi : (int -> 'a -> 'b) -> 'a list -> 'b list

    Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : ('a -> 'b) -> 'a list -> 'b list

    rev_map f l gives the same result as rev (map f l), but is more efficient.

    val filter_map : ('a -> 'b option) -> 'a list -> 'b list

    filter_map f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

    • since 4.08
    val concat_map : ('a -> 'b list) -> 'a list -> 'b list

    concat_map f l gives the same result as concat (map f l). Tail-recursive.

    • since 4.10
    val fold_left_map : ('acc -> 'a -> 'acc * 'b) -> 'acc -> 'a list -> - 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc

    fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc

    fold_right f [a1; ...; an] init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

    Iterators on two lists

    val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    map2 f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : + 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a list -> 'acc

    fold_left f init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc

    fold_right f [a1; ...; an] init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

    Iterators on two lists

    val iter2 : ('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    map2 f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : ('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a list -> 'b list -> - 'acc

    fold_left2 f init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val fold_right2 : + 'acc

    fold_left2 f init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val fold_right2 : ('a -> 'b -> 'acc -> 'acc) -> 'a list -> 'b list -> 'acc -> - 'acc

    fold_right2 f [a1; ...; an] [b1; ...; bn] init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

    • raises Invalid_argument

      if the two lists are determined to have different lengths. Not tail-recursive.

    List scanning

    val for_all : ('a -> bool) -> 'a list -> bool

    for_all f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : ('a -> bool) -> 'a list -> bool

    exists f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> 'a list -> bool

    mem a set is true if and only if a is equal to an element of set.

    val memq : 'a -> 'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : ('a -> bool) -> 'a list -> 'a

    find f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : ('a -> bool) -> 'a list -> 'a option

    find f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : ('a -> bool) -> 'a list -> int option

    find_index f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a list -> 'b option

    find_map f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.10
    val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : ('a -> bool) -> 'a list -> 'a list

    filter f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : ('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : (int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : ('a -> bool) -> 'a list -> 'a list * 'a list

    partition f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    val partition_map : ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

    • if f x is Left y1, then y1 is in l1, and
    • if f x is Right y2, then y2 is in l2.

    The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

    In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

    • since 4.12

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assoc_opt : 'a -> ('a * 'b) list -> 'b option

    assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

    • since 4.05
    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> ('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> ('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

    remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

    val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

    Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

    Lists of pairs

    val split : ('a * 'b) list -> 'a list * 'b list

    Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

    val combine : 'a list -> 'b list -> ('a * 'b) list

    Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

    • raises Invalid_argument

      if the two lists have different lengths. Not tail-recursive.

    Sorting

    val sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.02 (4.03 in ListLabels)
    val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

    Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

    Lists and Sequences

    val to_seq : 'a list -> 'a Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    \ No newline at end of file + 'acc

    fold_right2 f [a1; ...; an] [b1; ...; bn] init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

    • raises Invalid_argument

      if the two lists are determined to have different lengths. Not tail-recursive.

    List scanning

    val for_all : ('a -> bool) -> 'a list -> bool

    for_all f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : ('a -> bool) -> 'a list -> bool

    exists f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : ('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> 'a list -> bool

    mem a set is true if and only if a is equal to an element of set.

    val memq : 'a -> 'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : ('a -> bool) -> 'a list -> 'a

    find f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : ('a -> bool) -> 'a list -> 'a option

    find f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : ('a -> bool) -> 'a list -> int option

    find_index f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a list -> 'b option

    find_map f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.10
    val find_mapi : (int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : ('a -> bool) -> 'a list -> 'a list

    filter f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : ('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : (int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : ('a -> bool) -> 'a list -> 'a list * 'a list

    partition f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    val partition_map : ('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

    • if f x is Left y1, then y1 is in l1, and
    • if f x is Right y2, then y2 is in l2.

    The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

    In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

    • since 4.12

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assoc_opt : 'a -> ('a * 'b) list -> 'b option

    assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

    • since 4.05
    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> ('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> ('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

    remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

    val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

    Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

    Lists of pairs

    val split : ('a * 'b) list -> 'a list * 'b list

    Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

    val combine : 'a list -> 'b list -> ('a * 'b) list

    Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

    • raises Invalid_argument

      if the two lists have different lengths. Not tail-recursive.

    Sorting

    val sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : ('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.02 (4.03 in ListLabels)
    val merge : ('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

    Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

    Lists and Sequences

    val to_seq : 'a list -> 'a Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    diff --git a/ocaml/Stdlib/ListLabels/index.html b/ocaml/Stdlib/ListLabels/index.html index 552178e..0e40dac 100644 --- a/ocaml/Stdlib/ListLabels/index.html +++ b/ocaml/Stdlib/ListLabels/index.html @@ -1,16 +1,16 @@ -ListLabels (ocaml.Stdlib.ListLabels)

    Module Stdlib.ListLabels

    List operations.

    Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

    The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> len:int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val is_empty : 'a list -> bool

    is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

    • since 5.1
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    • raises Invalid_argument

      if n is negative.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • raises Invalid_argument

      if n is negative.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val init : len:int -> f:(int -> 'a) -> 'a list

    init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

    • raises Invalid_argument

      if len < 0.

    • since 4.06
    val append : 'a list -> 'a list -> 'a list

    append l0 l1 appends l1 to l0. Same function as the infix operator @.

    • since 5.1 this function is tail-recursive.
    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val concat : 'a list list -> 'a list

    Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iter : f:('a -> unit) -> 'a list -> unit

    iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

    val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val map : f:('a -> 'b) -> 'a list -> 'b list

    map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

    val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

    Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : f:('a -> 'b) -> 'a list -> 'b list

    rev_map ~f l gives the same result as rev (map f l), but is more efficient.

    val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

    filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

    • since 4.08
    val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

    concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

    • since 4.10
    val fold_left_map : - f:('acc -> 'a -> 'acc * 'b) -> - init:'acc -> +ListLabels (ocaml.Stdlib.ListLabels)

    Module Stdlib.ListLabels

    List operations.

    Some functions are flagged as not tail-recursive. A tail-recursive function uses constant stack space, while a non-tail-recursive function uses stack space proportional to the length of its list argument, which can be a problem with very long lists. When the function takes several list arguments, an approximate formula giving stack usage (in some unspecified constant unit) is shown in parentheses.

    The above considerations can usually be ignored if your lists are not longer than about 10000 elements.

    The labeled version of this module can be used as described in the StdLabels module.

    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> len:int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val is_empty : 'a list -> bool

    is_empty l is true if and only if l has no elements. It is equivalent to compare_length_with l 0 = 0.

    • since 5.1
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val init : len:int -> f:(int -> 'a) -> 'a list

    init ~len ~f is [f 0; f 1; ...; f (len-1)], evaluated left to right.

    • since 4.06
    val append : 'a list -> 'a list -> 'a list

    append l0 l1 appends l1 to l0. Same function as the infix operator @.

    • since 5.1 this function is tail-recursive.
    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val concat : 'a list list -> 'a list

    Concatenate a list of lists. The elements of the argument are all concatenated together (in the same order) to give the result. Not tail-recursive (length of the argument + length of the longest sub-list).

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iter : f:('a -> unit) -> 'a list -> unit

    iter ~f [a1; ...; an] applies function f in turn to [a1; ...; an]. It is equivalent to f a1; f a2; ...; f an.

    val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val map : f:('a -> 'b) -> 'a list -> 'b list

    map ~f [a1; ...; an] applies function f to a1, ..., an, and builds the list [f a1; ...; f an] with the results returned by f.

    val mapi : f:(int -> 'a -> 'b) -> 'a list -> 'b list

    Same as map, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : f:('a -> 'b) -> 'a list -> 'b list

    rev_map ~f l gives the same result as rev (map f l), but is more efficient.

    val filter_map : f:('a -> 'b option) -> 'a list -> 'b list

    filter_map ~f l applies f to every element of l, filters out the None elements and returns the list of the arguments of the Some elements.

    • since 4.08
    val concat_map : f:('a -> 'b list) -> 'a list -> 'b list

    concat_map ~f l gives the same result as concat (map f l). Tail-recursive.

    • since 4.10
    val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> 'a list -> - 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : f:('a -> 'acc -> 'acc) -> 'a list -> init:'acc -> 'acc

    fold_right ~f [a1; ...; an] ~init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

    Iterators on two lists

    val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    map2 ~f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : - f:('acc -> 'a -> 'b -> 'acc) -> - init:'acc -> + 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    val fold_right : f:('a -> 'acc -> 'acc) -> 'a list -> init:'acc -> 'acc

    fold_right ~f [a1; ...; an] ~init is f a1 (f a2 (... (f an init) ...)). Not tail-recursive.

    Iterators on two lists

    val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    map2 ~f [a1; ...; an] [b1; ...; bn] is [f a1 b1; ...; f an bn].

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : + f:('acc -> 'a -> 'b -> 'acc) -> + init:'acc -> 'a list -> 'b list -> - 'acc

    fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val fold_right2 : - f:('a -> 'b -> 'acc -> 'acc) -> + 'acc

    fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val fold_right2 : + f:('a -> 'b -> 'acc -> 'acc) -> 'a list -> 'b list -> - init:'acc -> - 'acc

    fold_right2 ~f [a1; ...; an] [b1; ...; bn] ~init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

    • raises Invalid_argument

      if the two lists are determined to have different lengths. Not tail-recursive.

    List scanning

    val for_all : f:('a -> bool) -> 'a list -> bool

    for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : f:('a -> bool) -> 'a list -> bool

    exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> set:'a list -> bool

    mem a ~set is true if and only if a is equal to an element of set.

    val memq : 'a -> set:'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : f:('a -> bool) -> 'a list -> 'a

    find ~f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : f:('a -> bool) -> 'a list -> 'a option

    find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : f:('a -> bool) -> 'a list -> int option

    find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:('a -> 'b option) -> 'a list -> 'b option

    find_map ~f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.10
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : f:('a -> bool) -> 'a list -> 'a list

    filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : f:('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

    partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    val partition_map : f:('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

    • if f x is Left y1, then y1 is in l1, and
    • if f x is Right y2, then y2 is in l2.

    The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

    In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

    • since 4.12

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assoc_opt : 'a -> ('a * 'b) list -> 'b option

    assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

    • since 4.05
    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> map:('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> map:('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

    remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

    val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

    Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

    Lists of pairs

    val split : ('a * 'b) list -> 'a list * 'b list

    Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

    val combine : 'a list -> 'b list -> ('a * 'b) list

    Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

    • raises Invalid_argument

      if the two lists have different lengths. Not tail-recursive.

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.03
    val merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

    Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge ~cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

    Lists and Sequences

    val to_seq : 'a list -> 'a Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    \ No newline at end of file + init:'acc -> + 'acc

    fold_right2 ~f [a1; ...; an] [b1; ...; bn] ~init is f a1 b1 (f a2 b2 (... (f an bn init) ...)).

    • raises Invalid_argument

      if the two lists are determined to have different lengths. Not tail-recursive.

    List scanning

    val for_all : f:('a -> bool) -> 'a list -> bool

    for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : f:('a -> bool) -> 'a list -> bool

    exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> set:'a list -> bool

    mem a ~set is true if and only if a is equal to an element of set.

    val memq : 'a -> set:'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : f:('a -> bool) -> 'a list -> 'a

    find ~f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : f:('a -> bool) -> 'a list -> 'a option

    find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : f:('a -> bool) -> 'a list -> int option

    find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_map : f:('a -> 'b option) -> 'a list -> 'b option

    find_map ~f l applies f to the elements of l in order, and returns the first result of the form Some v, or None if none exist.

    • since 4.10
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : f:('a -> bool) -> 'a list -> 'a list

    filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : f:('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

    partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    val partition_map : f:('a -> ('b, 'c) Either.t) -> 'a list -> 'b list * 'c list

    partition_map f l returns a pair of lists (l1, l2) such that, for each element x of the input list l:

    • if f x is Left y1, then y1 is in l1, and
    • if f x is Right y2, then y2 is in l2.

    The output elements are included in l1 and l2 in the same relative order as the corresponding input elements in l.

    In particular, partition_map (fun x -> if f x then Left x else Right x) l is equivalent to partition f l.

    • since 4.12

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assoc_opt : 'a -> ('a * 'b) list -> 'b option

    assoc_opt a l returns the value associated with key a in the list of pairs l. That is, assoc_opt a [ ...; (a,b); ...] = Some b if (a,b) is the leftmost binding of a in list l. Returns None if there is no value associated with a in the list l.

    • since 4.05
    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> map:('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> map:('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    val remove_assoc : 'a -> ('a * 'b) list -> ('a * 'b) list

    remove_assoc a l returns the list of pairs l without the first pair with key a, if any. Not tail-recursive.

    val remove_assq : 'a -> ('a * 'b) list -> ('a * 'b) list

    Same as remove_assoc, but uses physical equality instead of structural equality to compare keys. Not tail-recursive.

    Lists of pairs

    val split : ('a * 'b) list -> 'a list * 'b list

    Transform a list of pairs into a pair of lists: split [(a1,b1); ...; (an,bn)] is ([a1; ...; an], [b1; ...; bn]). Not tail-recursive.

    val combine : 'a list -> 'b list -> ('a * 'b) list

    Transform a pair of lists into a list of pairs: combine [a1; ...; an] [b1; ...; bn] is [(a1,b1); ...; (an,bn)].

    • raises Invalid_argument

      if the two lists have different lengths. Not tail-recursive.

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.03
    val merge : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> 'a list

    Merge two lists: Assuming that l1 and l2 are sorted according to the comparison function cmp, merge ~cmp l1 l2 will return a sorted list containing all the elements of l1 and l2. If several elements compare equal, the elements of l1 will be before the elements of l2. Not tail-recursive (sum of the lengths of the arguments).

    Lists and Sequences

    val to_seq : 'a list -> 'a Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    diff --git a/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html b/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html index 7f484c5..b1fe558 100644 --- a/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html +++ b/ocaml/Stdlib/Map/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (ocaml.Stdlib.Map.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +Ord (ocaml.Stdlib.Map.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/Map/Make/index.html b/ocaml/Stdlib/Map/Make/index.html index bc8073f..9053fb4 100644 --- a/ocaml/Stdlib/Map/Make/index.html +++ b/ocaml/Stdlib/Map/Make/index.html @@ -1,8 +1,8 @@ -Make (ocaml.Stdlib.Map.Make)

    Module Map.Make

    Functor building an implementation of the map structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Maps

    type key = Ord.t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Make (ocaml.Stdlib.Map.Make)

    Module Map.Make

    Functor building an implementation of the map structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Maps

    type key = Ord.t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/Map/index.html b/ocaml/Stdlib/Map/index.html index 8a90c29..64e8ab8 100644 --- a/ocaml/Stdlib/Map/index.html +++ b/ocaml/Stdlib/Map/index.html @@ -1,13 +1,13 @@ -Map (ocaml.Stdlib.Map)

    Module Stdlib.Map

    Association tables over ordered types.

    This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

    For instance:

    module IntPairs =
    -  struct
    -    type t = int * int
    -    let compare (x0,y0) (x1,y1) =
    -      match Stdlib.compare x0 x1 with
    -          0 -> Stdlib.compare y0 y1
    -        | c -> c
    -  end
    +Map (ocaml.Stdlib.Map)

    Module Stdlib.Map

    Association tables over ordered types.

    This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

    For instance:

      module IntPairs =
    +    struct
    +      type t = int * int
    +      let compare (x0,y0) (x1,y1) =
    +        match Stdlib.compare x0 x1 with
    +            0 -> Stdlib.compare y0 y1
    +          | c -> c
    +    end
     
    -module PairsMap = Map.Make(IntPairs)
    +  module PairsMap = Map.Make(IntPairs)
     
    -let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

    This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : S with type key = Ord.t

    Functor building an implementation of the map structure given a totally ordered type.

    \ No newline at end of file + let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

    This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : S with type key = Ord.t

    Functor building an implementation of the map structure given a totally ordered type.

    diff --git a/ocaml/Stdlib/Map/module-type-OrderedType/index.html b/ocaml/Stdlib/Map/module-type-OrderedType/index.html index f2ce5ab..0c16d8f 100644 --- a/ocaml/Stdlib/Map/module-type-OrderedType/index.html +++ b/ocaml/Stdlib/Map/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (ocaml.Stdlib.Map.OrderedType)

    Module type Map.OrderedType

    Input signature of the functor Make.

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +OrderedType (ocaml.Stdlib.Map.OrderedType)

    Module type Map.OrderedType

    Input signature of the functor Make.

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/Map/module-type-S/index.html b/ocaml/Stdlib/Map/module-type-S/index.html index b3043a2..53d07c5 100644 --- a/ocaml/Stdlib/Map/module-type-S/index.html +++ b/ocaml/Stdlib/Map/module-type-S/index.html @@ -1,8 +1,8 @@ -S (ocaml.Stdlib.Map.S)

    Module type Map.S

    Output signature of the functor Make.

    Maps

    type key

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +S (ocaml.Stdlib.Map.S)

    Module type Map.S

    Output signature of the functor Make.

    Maps

    type key

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/Marshal/index.html b/ocaml/Stdlib/Marshal/index.html index 9f48144..f7b5591 100644 --- a/ocaml/Stdlib/Marshal/index.html +++ b/ocaml/Stdlib/Marshal/index.html @@ -1,2 +1,2 @@ -Marshal (ocaml.Stdlib.Marshal)

    Module Stdlib.Marshal

    Marshaling of data structures.

    This module provides functions to encode arbitrary data structures as sequences of bytes, which can then be written on a file or sent over a pipe or network connection. The bytes can then be read back later, possibly in another process, and decoded back into a data structure. The format for the byte sequences is compatible across all machines for a given version of OCaml.

    Warning: marshaling is currently not type-safe. The type of marshaled data is not transmitted along the value of the data, making it impossible to check that the data read back possesses the type expected by the context. In particular, the result type of the Marshal.from_* functions is given as 'a, but this is misleading: the returned OCaml value does not possess type 'a for all 'a; it has one, unique type which cannot be determined at compile-time. The programmer should explicitly give the expected type of the returned value, using the following syntax:

    • (Marshal.from_channel chan : type). Anything can happen at run-time if the object in the file does not belong to the given type.

    Values of extensible variant types, for example exceptions (of extensible type exn), returned by the unmarshaller should not be pattern-matched over through match ... with or try ... with, because unmarshalling does not preserve the information required for matching their constructors. Structural equalities with other extensible variant values does not work either. Most other uses such as Printexc.to_string, will still work as expected.

    The representation of marshaled values is not human-readable, and uses bytes that are not printable characters. Therefore, input and output channels used in conjunction with Marshal.to_channel and Marshal.from_channel must be opened in binary mode, using e.g. open_out_bin or open_in_bin; channels opened in text mode will cause unmarshaling errors on platforms where text channels behave differently than binary channels, e.g. Windows.

    type extern_flags =
    1. | No_sharing
      (*

      Don't preserve sharing

      *)
    2. | Closures
      (*

      Send function closures

      *)
    3. | Compat_32
      (*

      Ensure 32-bit compatibility

      *)

    The flags to the Marshal.to_* functions below.

    val to_channel : out_channel -> 'a -> extern_flags list -> unit

    Marshal.to_channel chan v flags writes the representation of v on channel chan. The flags argument is a possibly empty list of flags that governs the marshaling behavior with respect to sharing, functional values, and compatibility between 32- and 64-bit platforms.

    If flags does not contain Marshal.No_sharing, circularities and sharing inside the value v are detected and preserved in the sequence of bytes produced. In particular, this guarantees that marshaling always terminates. Sharing between values marshaled by successive calls to Marshal.to_channel is neither detected nor preserved, though. If flags contains Marshal.No_sharing, sharing is ignored. This results in faster marshaling if v contains no shared substructures, but may cause slower marshaling and larger byte representations if v actually contains sharing, or even non-termination if v contains cycles.

    If flags does not contain Marshal.Closures, marshaling fails when it encounters a functional value inside v: only 'pure' data structures, containing neither functions nor objects, can safely be transmitted between different programs. If flags contains Marshal.Closures, functional values will be marshaled as a the position in the code of the program together with the values corresponding to the free variables captured in the closure. In this case, the output of marshaling can only be read back in processes that run exactly the same program, with exactly the same compiled code. (This is checked at un-marshaling time, using an MD5 digest of the code transmitted along with the code position.)

    The exact definition of which free variables are captured in a closure is not specified and can vary between bytecode and native code (and according to optimization flags). In particular, a function value accessing a global reference may or may not include the reference in its closure. If it does, unmarshaling the corresponding closure will create a new reference, different from the global one.

    If flags contains Marshal.Compat_32, marshaling fails when it encounters an integer value outside the range [-2{^30}, 2{^30}-1] of integers that are representable on a 32-bit platform. This ensures that marshaled data generated on a 64-bit platform can be safely read back on a 32-bit platform. If flags does not contain Marshal.Compat_32, integer values outside the range [-2{^30}, 2{^30}-1] are marshaled, and can be read back on a 64-bit platform, but will cause an error at un-marshaling time when read back on a 32-bit platform. The Mashal.Compat_32 flag only matters when marshaling is performed on a 64-bit platform; it has no effect if marshaling is performed on a 32-bit platform.

    • raises Failure

      if chan is not in binary mode.

    val to_bytes : 'a -> extern_flags list -> bytes

    Marshal.to_bytes v flags returns a byte sequence containing the representation of v. The flags argument has the same meaning as for Marshal.to_channel.

    • since 4.02
    val to_string : 'a -> extern_flags list -> string

    Same as to_bytes but return the result as a string instead of a byte sequence.

    val to_buffer : bytes -> int -> int -> 'a -> extern_flags list -> int

    Marshal.to_buffer buff ofs len v flags marshals the value v, storing its byte representation in the sequence buff, starting at index ofs, and writing at most len bytes. It returns the number of bytes actually written to the sequence. If the byte representation of v does not fit in len characters, the exception Failure is raised.

    val from_channel : in_channel -> 'a

    Marshal.from_channel chan reads from channel chan the byte representation of a structured value, as produced by one of the Marshal.to_* functions, and reconstructs and returns the corresponding value.

    • raises End_of_file

      if chan is already at the end of the file.

    • raises Failure

      if the end of the file is reached during unmarshalling itself or if chan is not in binary mode.

    val from_bytes : bytes -> int -> 'a

    Marshal.from_bytes buff ofs unmarshals a structured value like Marshal.from_channel does, except that the byte representation is not read from a channel, but taken from the byte sequence buff, starting at position ofs. The byte sequence is not mutated.

    • since 4.02
    val from_string : string -> int -> 'a

    Same as from_bytes but take a string as argument instead of a byte sequence.

    val header_size : int

    The bytes representing a marshaled value are composed of a fixed-size header and a variable-sized data part, whose size can be determined from the header. Marshal.header_size is the size, in bytes, of the header. Marshal.data_size buff ofs is the size, in bytes, of the data part, assuming a valid header is stored in buff starting at position ofs. Finally, Marshal.total_size buff ofs is the total size, in bytes, of the marshaled value. Both Marshal.data_size and Marshal.total_size raise Failure if buff, ofs does not contain a valid header.

    To read the byte representation of a marshaled value into a byte sequence, the program needs to read first Marshal.header_size bytes into the sequence, then determine the length of the remainder of the representation using Marshal.data_size, make sure the sequence is large enough to hold the remaining data, then read it, and finally call Marshal.from_bytes to unmarshal the value.

    val data_size : bytes -> int -> int
    val total_size : bytes -> int -> int
    \ No newline at end of file +Marshal (ocaml.Stdlib.Marshal)

    Module Stdlib.Marshal

    Marshaling of data structures.

    This module provides functions to encode arbitrary data structures as sequences of bytes, which can then be written on a file or sent over a pipe or network connection. The bytes can then be read back later, possibly in another process, and decoded back into a data structure. The format for the byte sequences is compatible across all machines for a given version of OCaml.

    Warning: marshaling is currently not type-safe. The type of marshaled data is not transmitted along the value of the data, making it impossible to check that the data read back possesses the type expected by the context. In particular, the result type of the Marshal.from_* functions is given as 'a, but this is misleading: the returned OCaml value does not possess type 'a for all 'a; it has one, unique type which cannot be determined at compile-time. The programmer should explicitly give the expected type of the returned value, using the following syntax:

    • (Marshal.from_channel chan : type). Anything can happen at run-time if the object in the file does not belong to the given type.

    Values of extensible variant types, for example exceptions (of extensible type exn), returned by the unmarshaller should not be pattern-matched over through match ... with or try ... with, because unmarshalling does not preserve the information required for matching their constructors. Structural equalities with other extensible variant values does not work either. Most other uses such as Printexc.to_string, will still work as expected.

    The representation of marshaled values is not human-readable, and uses bytes that are not printable characters. Therefore, input and output channels used in conjunction with Marshal.to_channel and Marshal.from_channel must be opened in binary mode, using e.g. open_out_bin or open_in_bin; channels opened in text mode will cause unmarshaling errors on platforms where text channels behave differently than binary channels, e.g. Windows.

    type extern_flags =
    1. | No_sharing
      (*

      Don't preserve sharing

      *)
    2. | Closures
      (*

      Send function closures

      *)
    3. | Compat_32
      (*

      Ensure 32-bit compatibility

      *)

    The flags to the Marshal.to_* functions below.

    val to_channel : out_channel -> 'a -> extern_flags list -> unit

    Marshal.to_channel chan v flags writes the representation of v on channel chan. The flags argument is a possibly empty list of flags that governs the marshaling behavior with respect to sharing, functional values, and compatibility between 32- and 64-bit platforms.

    If flags does not contain Marshal.No_sharing, circularities and sharing inside the value v are detected and preserved in the sequence of bytes produced. In particular, this guarantees that marshaling always terminates. Sharing between values marshaled by successive calls to Marshal.to_channel is neither detected nor preserved, though. If flags contains Marshal.No_sharing, sharing is ignored. This results in faster marshaling if v contains no shared substructures, but may cause slower marshaling and larger byte representations if v actually contains sharing, or even non-termination if v contains cycles.

    If flags does not contain Marshal.Closures, marshaling fails when it encounters a functional value inside v: only 'pure' data structures, containing neither functions nor objects, can safely be transmitted between different programs. If flags contains Marshal.Closures, functional values will be marshaled as a the position in the code of the program together with the values corresponding to the free variables captured in the closure. In this case, the output of marshaling can only be read back in processes that run exactly the same program, with exactly the same compiled code. (This is checked at un-marshaling time, using an MD5 digest of the code transmitted along with the code position.)

    The exact definition of which free variables are captured in a closure is not specified and can vary between bytecode and native code (and according to optimization flags). In particular, a function value accessing a global reference may or may not include the reference in its closure. If it does, unmarshaling the corresponding closure will create a new reference, different from the global one.

    If flags contains Marshal.Compat_32, marshaling fails when it encounters an integer value outside the range [-2{^30}, 2{^30}-1] of integers that are representable on a 32-bit platform. This ensures that marshaled data generated on a 64-bit platform can be safely read back on a 32-bit platform. If flags does not contain Marshal.Compat_32, integer values outside the range [-2{^30}, 2{^30}-1] are marshaled, and can be read back on a 64-bit platform, but will cause an error at un-marshaling time when read back on a 32-bit platform. The Mashal.Compat_32 flag only matters when marshaling is performed on a 64-bit platform; it has no effect if marshaling is performed on a 32-bit platform.

    • raises Failure

      if chan is not in binary mode.

    val to_bytes : 'a -> extern_flags list -> bytes

    Marshal.to_bytes v flags returns a byte sequence containing the representation of v. The flags argument has the same meaning as for Marshal.to_channel.

    • since 4.02
    val to_string : 'a -> extern_flags list -> string

    Same as to_bytes but return the result as a string instead of a byte sequence.

    val to_buffer : bytes -> int -> int -> 'a -> extern_flags list -> int

    Marshal.to_buffer buff ofs len v flags marshals the value v, storing its byte representation in the sequence buff, starting at index ofs, and writing at most len bytes. It returns the number of bytes actually written to the sequence. If the byte representation of v does not fit in len characters, the exception Failure is raised.

    val from_channel : in_channel -> 'a

    Marshal.from_channel chan reads from channel chan the byte representation of a structured value, as produced by one of the Marshal.to_* functions, and reconstructs and returns the corresponding value.

    • raises End_of_file

      if chan is already at the end of the file.

    • raises Failure

      if the end of the file is reached during unmarshalling itself or if chan is not in binary mode.

    val from_bytes : bytes -> int -> 'a

    Marshal.from_bytes buff ofs unmarshals a structured value like Marshal.from_channel does, except that the byte representation is not read from a channel, but taken from the byte sequence buff, starting at position ofs. The byte sequence is not mutated.

    • since 4.02
    val from_string : string -> int -> 'a

    Same as from_bytes but take a string as argument instead of a byte sequence.

    val header_size : int

    The bytes representing a marshaled value are composed of a fixed-size header and a variable-sized data part, whose size can be determined from the header. Marshal.header_size is the size, in bytes, of the header. Marshal.data_size buff ofs is the size, in bytes, of the data part, assuming a valid header is stored in buff starting at position ofs. Finally, Marshal.total_size buff ofs is the total size, in bytes, of the marshaled value. Both Marshal.data_size and Marshal.total_size raise Failure if buff, ofs does not contain a valid header.

    To read the byte representation of a marshaled value into a byte sequence, the program needs to read first Marshal.header_size bytes into the sequence, then determine the length of the remainder of the representation using Marshal.data_size, make sure the sequence is large enough to hold the remaining data, then read it, and finally call Marshal.from_bytes to unmarshal the value.

    val data_size : bytes -> int -> int
    val total_size : bytes -> int -> int
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html index 13e2df9..bee7a4a 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.MoreLabels.Hashtbl.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H (ocaml.Stdlib.MoreLabels.Hashtbl.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html index 0edfb8f..cbce840 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.MoreLabels.Hashtbl.Make)

    Module Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    Parameters

    module H : HashedType

    Signature

    type key = H.t
    type 'a t = 'a Hashtbl.Make(H).t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +Make (ocaml.Stdlib.MoreLabels.Hashtbl.Make)

    Module Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    Parameters

    module H : HashedType

    Signature

    type key = H.t
    type 'a t = 'a Hashtbl.Make(H).t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html index 3344bd9..f77acaa 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.MoreLabels.Hashtbl.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +H (ocaml.Stdlib.MoreLabels.Hashtbl.MakeSeeded.H)

    Parameter MakeSeeded.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html index 9cfa098..305a3e0 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/MakeSeeded/index.html @@ -1,2 +1,2 @@ -MakeSeeded (ocaml.Stdlib.MoreLabels.Hashtbl.MakeSeeded)

    Module Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    • since 4.00

    Parameters

    Signature

    type key = H.t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +MakeSeeded (ocaml.Stdlib.MoreLabels.Hashtbl.MakeSeeded)

    Module Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    • since 4.00

    Parameters

    Signature

    type key = H.t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/index.html index 51456d0..92267c4 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/index.html @@ -1,91 +1,91 @@ -Hashtbl (ocaml.Stdlib.MoreLabels.Hashtbl)

    Module MoreLabels.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

    The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

    Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

    The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

    See the examples section.

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t = ('a, 'b) Hashtbl.t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val add : ('a, 'b) t -> key:'a -> data:'b -> unit

    Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

    Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

    If you desire the classic behavior of replacing elements, see replace.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_opt : ('a, 'b) t -> 'a -> 'b option

    Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

    • since 4.05
    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

    Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : - f:(key:'a -> data:'b -> 'b option) -> +Hashtbl (ocaml.Stdlib.MoreLabels.Hashtbl)

    Module MoreLabels.Hashtbl

    Hash tables and hash functions.

    Hash tables are hashed association tables, with in-place modification. Because most operations on a hash table modify their input, they're more commonly used in imperative code. The lookup of the value associated with a key (see find, find_opt) is normally very fast, often faster than the equivalent lookup in Map.

    The functors Make and MakeSeeded can be used when performance or flexibility are key. The user provides custom equality and hash functions for the key type, and obtains a custom hash table type for this particular type of key.

    Warning a hash table is only as good as the hash function. A bad hash function will turn the table into a degenerate association list, with linear time lookup instead of constant time lookup.

    The polymorphic t hash table is useful in simpler cases or in interactive environments. It uses the polymorphic hash function defined in the OCaml runtime (at the time of writing, it's SipHash), as well as the polymorphic equality (=).

    See the examples section.

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t = ('a, 'b) Hashtbl.t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val add : ('a, 'b) t -> key:'a -> data:'b -> unit

    Hashtbl.add tbl ~key ~data adds a binding of key to data in table tbl.

    Warning: Previous bindings for key are not removed, but simply hidden. That is, after performing remove tbl key, the previous binding for key, if any, is restored. (Same behavior as with association lists.)

    If you desire the classic behavior of replacing elements, see replace.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_opt : ('a, 'b) t -> 'a -> 'b option

    Hashtbl.find_opt tbl x returns the current binding of x in tbl, or None if no such binding exists.

    • since 4.05
    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> key:'a -> data:'b -> unit

    Hashtbl.replace tbl ~key ~data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : f:(key:'a -> data:'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter ~f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : + f:(key:'a -> data:'b -> 'b option) -> ('a, 'b) t -> unit

    Hashtbl.filter_map_inplace ~f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

    Other comments for iter apply as well.

    • since 4.03
    val fold : - f:(key:'a -> data:'b -> 'acc -> 'acc) -> + f:(key:'a -> data:'b -> 'acc -> 'acc) -> ('a, 'b) t -> - init:'acc -> - 'acc

    Hashtbl.fold ~f tbl ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = Hashtbl.statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

    module IntHash =
    -  struct
    -    type t = int
    -    let equal i j = i=j
    -    let hash i = i land max_int
    -  end
    +  init:'acc ->
    +  'acc

    Hashtbl.fold ~f tbl ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = Hashtbl.statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

      module IntHash =
    +    struct
    +      type t = int
    +      let equal i j = i=j
    +      let hash i = i land max_int
    +    end
     
    -module IntHashtbl = Hashtbl.Make(IntHash)
    +  module IntHashtbl = Hashtbl.Make(IntHash)
     
    -let h = IntHashtbl.create 17 in
    -IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a - IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = sig ... end

    The input signature of the functor Make.

    module type S = sig ... end

    The output signature of the functor Make.

    module Make + let h = IntHashtbl.create 17 in + IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = sig ... end

    The input signature of the functor Make.

    module type S = sig ... end

    The output signature of the functor Make.

    module Make (H : HashedType) : S with type key = H.t and type 'a t = 'a Hashtbl.Make(H).t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    module type SeededHashedType = sig ... end

    The input signature of the functor MakeSeeded.

    module type SeededS = sig ... end

    The output signature of the functor MakeSeeded.

    module MakeSeeded (H : SeededHashedType) : - SeededS with type key = H.t and type 'a t = 'a Hashtbl.MakeSeeded(H).t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

    (* 0...99 *)
    -let seq = Seq.ints 0 |> Seq.take 100
    +  SeededS with type key = H.t and type 'a t = 'a Hashtbl.MakeSeeded(H).t

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

      (* 0...99 *)
    +  let seq = Seq.ints 0 |> Seq.take 100
     
    -(* build from Seq.t *)
    -# let tbl =
    -    seq
    -    |> Seq.map (fun x -> x, string_of_int x)
    -    |> Hashtbl.of_seq
    -val tbl : (int, string) Hashtbl.t = <abstr>
    +  (* build from Seq.t *)
    +  # let tbl =
    +      seq
    +      |> Seq.map (fun x -> x, string_of_int x)
    +      |> Hashtbl.of_seq
    +  val tbl : (int, string) Hashtbl.t = <abstr>
     
    -# Hashtbl.length tbl
    -- : int = 100
    +  # Hashtbl.length tbl
    +  - : int = 100
     
    -# Hashtbl.find_opt tbl 32
    -- : string option = Some "32"
    +  # Hashtbl.find_opt tbl 32
    +  - : string option = Some "32"
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = None
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = None
     
    -# Hashtbl.replace tbl 166 "one six six"
    -- : unit = ()
    +  # Hashtbl.replace tbl 166 "one six six"
    +  - : unit = ()
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = Some "one six six"
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = Some "one six six"
     
    -# Hashtbl.length tbl
    -- : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

    # module Char_tbl = Hashtbl.Make(struct
    -    type t = char
    -    let equal = Char.equal
    -    let hash = Hashtbl.hash
    -  end)
    +  # Hashtbl.length tbl
    +  - : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

      # module Char_tbl = Hashtbl.Make(struct
    +      type t = char
    +      let equal = Char.equal
    +      let hash = Hashtbl.hash
    +    end)
     
    -(*  count distinct occurrences of chars in [seq] *)
    -# let count_chars (seq : char Seq.t) : _ list =
    -    let counts = Char_tbl.create 16 in
    -    Seq.iter
    -      (fun c ->
    -        let count_c =
    -          Char_tbl.find_opt counts c
    -          |> Option.value ~default:0
    -        in
    -        Char_tbl.replace counts c (count_c + 1))
    -      seq;
    -    (* turn into a list *)
    -    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    -      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    -val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
    +  (*  count distinct occurrences of chars in [seq] *)
    +  # let count_chars (seq : char Seq.t) : _ list =
    +      let counts = Char_tbl.create 16 in
    +      Seq.iter
    +        (fun c ->
    +          let count_c =
    +            Char_tbl.find_opt counts c
    +            |> Option.value ~default:0
    +          in
    +          Char_tbl.replace counts c (count_c + 1))
    +        seq;
    +      (* turn into a list *)
    +      Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    +        |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    +  val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
     
    -(* basic seq from a string *)
    -# let seq = String.to_seq "hello world, and all the camels in it!"
    -val seq : char Seq.t = <fun>
    +  (* basic seq from a string *)
    +  # let seq = String.to_seq "hello world, and all the camels in it!"
    +  val seq : char Seq.t = <fun>
     
    -# count_chars seq
    -- : (Char.t * int) list =
    -[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    - ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    - ('s', 1); ('t', 2); ('w', 1)]
    +  # count_chars seq
    +  - : (Char.t * int) list =
    +  [(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    +   ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    +   ('s', 1); ('t', 2); ('w', 1)]
     
    -(* "abcabcabc..." *)
    -# let seq2 =
    -    Seq.cycle (String.to_seq "abc") |> Seq.take 31
    -val seq2 : char Seq.t = <fun>
    +  (* "abcabcabc..." *)
    +  # let seq2 =
    +      Seq.cycle (String.to_seq "abc") |> Seq.take 31
    +  val seq2 : char Seq.t = <fun>
     
    -# String.of_seq seq2
    -- : String.t = "abcabcabcabcabcabcabcabcabcabca"
    +  # String.of_seq seq2
    +  - : String.t = "abcabcabcabcabcabcabcabcabcabca"
     
    -# count_chars seq2
    -- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
    \ No newline at end of file + # count_chars seq2 + - : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)] +
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html index 807ab8d..22d8f85 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-HashedType/index.html @@ -1,2 +1,2 @@ -HashedType (ocaml.Stdlib.MoreLabels.Hashtbl.HashedType)

    Module type Hashtbl.HashedType

    The input signature of the functor Make.

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +HashedType (ocaml.Stdlib.MoreLabels.Hashtbl.HashedType)

    Module type Hashtbl.HashedType

    The input signature of the functor Make.

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html index f0bdcfc..a939c6a 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Stdlib.MoreLabels.Hashtbl.S)

    Module type Hashtbl.S

    The output signature of the functor Make.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +S (ocaml.Stdlib.MoreLabels.Hashtbl.S)

    Module type Hashtbl.S

    The output signature of the functor Make.

    type key
    type !'a t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html index 23e8139..5b883f6 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededHashedType/index.html @@ -1,2 +1,2 @@ -SeededHashedType (ocaml.Stdlib.MoreLabels.Hashtbl.SeededHashedType)

    Module type Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    • since 4.00
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    \ No newline at end of file +SeededHashedType (ocaml.Stdlib.MoreLabels.Hashtbl.SeededHashedType)

    Module type Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    • since 4.00
    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val seeded_hash : int -> t -> int

    A seeded hashing function on keys. The first argument is the seed. It must be the case that if equal x y is true, then seeded_hash seed x = seeded_hash seed y for any value of seed. A suitable choice for seeded_hash is the function Hashtbl.seeded_hash below.

    diff --git a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html index 853e185..64827d2 100644 --- a/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html +++ b/ocaml/Stdlib/MoreLabels/Hashtbl/module-type-SeededS/index.html @@ -1,2 +1,2 @@ -SeededS (ocaml.Stdlib.MoreLabels.Hashtbl.SeededS)

    Module type Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    • since 4.00
    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    \ No newline at end of file +SeededS (ocaml.Stdlib.MoreLabels.Hashtbl.SeededS)

    Module type Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    • since 4.00
    type key
    type !'a t
    val create : ?random:bool -> int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    val copy : 'a t -> 'a t
    val add : 'a t -> key:key -> data:'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key:key -> data:'a -> unit
    val mem : 'a t -> key -> bool
    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit
    val filter_map_inplace : f:(key:key -> data:'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> statistics
    val to_seq : 'a t -> (key * 'a) Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t
    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html b/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html index 760f987..935cc0a 100644 --- a/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html +++ b/ocaml/Stdlib/MoreLabels/Map/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (ocaml.Stdlib.MoreLabels.Map.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +Ord (ocaml.Stdlib.MoreLabels.Map.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/MoreLabels/Map/Make/index.html b/ocaml/Stdlib/MoreLabels/Map/Make/index.html index 2a2ef63..ce78fe2 100644 --- a/ocaml/Stdlib/MoreLabels/Map/Make/index.html +++ b/ocaml/Stdlib/MoreLabels/Map/Make/index.html @@ -1,8 +1,8 @@ -Make (ocaml.Stdlib.MoreLabels.Map.Make)

    Module Map.Make

    Functor building an implementation of the map structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Maps

    type key = Ord.t

    The type of the map keys.

    type 'a t = 'a Map.Make(Ord).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key:key -> data:'a -> 'a t -> 'a t

    add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

    add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

    update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : - f:(key -> 'a option -> 'b option -> 'c option) -> +Make (ocaml.Stdlib.MoreLabels.Map.Make)

    Module Map.Make

    Functor building an implementation of the map structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Maps

    type key = Ord.t

    The type of the map keys.

    type 'a t = 'a Map.Make(Ord).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key:key -> data:'a -> 'a t -> 'a t

    add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

    add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

    update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : f:(key -> bool) -> 'a t -> key * 'a

    find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : f:(key -> bool) -> 'a t -> key * 'a

    find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

    iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

    fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : f:('a -> 'b) -> 'a t -> 'b t

    map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

    filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : f:(key -> bool) -> 'a t -> key * 'a

    find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : f:(key -> bool) -> 'a t -> key * 'a

    find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

    iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

    fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : f:('a -> 'b) -> 'a t -> 'b t

    map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

    filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

    for_all ~f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : f:(key -> 'a -> bool) -> 'a t -> bool

    exists ~f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

    for_all ~f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : f:(key -> 'a -> bool) -> 'a t -> bool

    exists ~f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Map/index.html b/ocaml/Stdlib/MoreLabels/Map/index.html index 096d539..20f430d 100644 --- a/ocaml/Stdlib/MoreLabels/Map/index.html +++ b/ocaml/Stdlib/MoreLabels/Map/index.html @@ -1,15 +1,15 @@ -Map (ocaml.Stdlib.MoreLabels.Map)

    Module MoreLabels.Map

    Association tables over ordered types.

    This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

    For instance:

    module IntPairs =
    -  struct
    -    type t = int * int
    -    let compare (x0,y0) (x1,y1) =
    -      match Stdlib.compare x0 x1 with
    -          0 -> Stdlib.compare y0 y1
    -        | c -> c
    -  end
    +Map (ocaml.Stdlib.MoreLabels.Map)

    Module MoreLabels.Map

    Association tables over ordered types.

    This module implements applicative association tables, also known as finite maps or dictionaries, given a total ordering function over the keys. All operations over maps are purely applicative (no side-effects). The implementation uses balanced binary trees, and therefore searching and insertion take time logarithmic in the size of the map.

    For instance:

      module IntPairs =
    +    struct
    +      type t = int * int
    +      let compare (x0,y0) (x1,y1) =
    +        match Stdlib.compare x0 x1 with
    +            0 -> Stdlib.compare y0 y1
    +          | c -> c
    +    end
     
    -module PairsMap = Map.Make(IntPairs)
    +  module PairsMap = Map.Make(IntPairs)
     
    -let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

    This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make + let m = PairsMap.(empty |> add (0,1) "hello" |> add (1,0) "world")

    This creates a new module PairsMap, with a new type 'a PairsMap.t of maps from int * int to 'a. In this example, m contains string values so its type is string PairsMap.t.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : - S with type key = Ord.t and type 'a t = 'a Map.Make(Ord).t

    Functor building an implementation of the map structure given a totally ordered type.

    \ No newline at end of file + S with type key = Ord.t and type 'a t = 'a Map.Make(Ord).t

    Functor building an implementation of the map structure given a totally ordered type.

    diff --git a/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html b/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html index 5083620..a4f829e 100644 --- a/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html +++ b/ocaml/Stdlib/MoreLabels/Map/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (ocaml.Stdlib.MoreLabels.Map.OrderedType)

    Module type Map.OrderedType

    Input signature of the functor Make.

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +OrderedType (ocaml.Stdlib.MoreLabels.Map.OrderedType)

    Module type Map.OrderedType

    Input signature of the functor Make.

    type t

    The type of the map keys.

    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html b/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html index fb3a948..617e016 100644 --- a/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html +++ b/ocaml/Stdlib/MoreLabels/Map/module-type-S/index.html @@ -1,8 +1,8 @@ -S (ocaml.Stdlib.MoreLabels.Map.S)

    Module type Map.S

    Output signature of the functor Make.

    Maps

    type key

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key:key -> data:'a -> 'a t -> 'a t

    add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

    add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

    update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : - f:(key -> 'a option -> 'b option -> 'c option) -> +S (ocaml.Stdlib.MoreLabels.Map.S)

    Module type Map.S

    Output signature of the functor Make.

    Maps

    type key

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key:key -> data:'a -> 'a t -> 'a t

    add ~key ~data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key:key -> data:'a -> 'a list t -> 'a list t

    add_to_list ~key ~data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key:key -> f:('a option -> 'a option) -> 'a t -> 'a t

    update ~key ~f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : + f:(key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : f:(key -> bool) -> 'a t -> key * 'a

    find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : f:(key -> bool) -> 'a t -> key * 'a

    find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

    iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

    fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : f:('a -> 'b) -> 'a t -> 'b t

    map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

    filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : f:(key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union ~f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : f:(key -> bool) -> 'a t -> key * 'a

    find_first ~f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt ~f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : f:(key -> bool) -> 'a t -> key * 'a

    find_last ~f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : f:(key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt ~f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : f:(key:key -> data:'a -> unit) -> 'a t -> unit

    iter ~f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : f:(key:key -> data:'a -> 'acc -> 'acc) -> 'a t -> init:'acc -> 'acc

    fold ~f m ~init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : f:('a -> 'b) -> 'a t -> 'b t

    map ~f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : f:(key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : f:(key -> 'a -> bool) -> 'a t -> 'a t

    filter ~f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map ~f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

    for_all ~f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : f:(key -> 'a -> bool) -> 'a t -> bool

    exists ~f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : f:(key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition ~f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : cmp:('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal ~cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : cmp:('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : f:(key -> 'a -> bool) -> 'a t -> bool

    for_all ~f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : f:(key -> 'a -> bool) -> 'a t -> bool

    exists ~f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html b/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html index 3a1dc81..18e8a7a 100644 --- a/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html +++ b/ocaml/Stdlib/MoreLabels/Set/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (ocaml.Stdlib.MoreLabels.Set.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +Ord (ocaml.Stdlib.MoreLabels.Set.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/MoreLabels/Set/Make/index.html b/ocaml/Stdlib/MoreLabels/Set/Make/index.html index e740a33..00a8617 100644 --- a/ocaml/Stdlib/MoreLabels/Set/Make/index.html +++ b/ocaml/Stdlib/MoreLabels/Set/Make/index.html @@ -1,3 +1,2 @@ -Make (ocaml.Stdlib.MoreLabels.Set.Make)

    Module Set.Make

    Functor building an implementation of the set structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Sets

    type elt = Ord.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : f:(elt -> bool) -> t -> elt

    find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : f:(elt -> bool) -> t -> elt option

    find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : f:(elt -> bool) -> t -> elt

    find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : f:(elt -> bool) -> t -> elt option

    find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : f:(elt -> unit) -> t -> unit

    iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : f:(elt -> elt) -> t -> t

    map ~f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : f:(elt -> bool) -> t -> t

    filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(elt -> elt option) -> t -> t

    filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : f:(elt -> bool) -> t -> t * t

    partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : f:(elt -> bool) -> t -> bool

    for_all ~f s checks if all elements of the set satisfy the predicate f.

    val exists : f:(elt -> bool) -> t -> bool

    exists ~f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Make (ocaml.Stdlib.MoreLabels.Set.Make)

    Module Set.Make

    Functor building an implementation of the set structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Sets

    type elt = Ord.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : f:(elt -> bool) -> t -> elt

    find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : f:(elt -> bool) -> t -> elt option

    find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : f:(elt -> bool) -> t -> elt

    find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : f:(elt -> bool) -> t -> elt option

    find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : f:(elt -> unit) -> t -> unit

    iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : f:(elt -> elt) -> t -> t

    map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : f:(elt -> bool) -> t -> t

    filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(elt -> elt option) -> t -> t

    filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : f:(elt -> bool) -> t -> t * t

    partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : f:(elt -> bool) -> t -> bool

    for_all ~f s checks if all elements of the set satisfy the predicate f.

    val exists : f:(elt -> bool) -> t -> bool

    exists ~f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/Set/index.html b/ocaml/Stdlib/MoreLabels/Set/index.html index 93f8eea..f4b8844 100644 --- a/ocaml/Stdlib/MoreLabels/Set/index.html +++ b/ocaml/Stdlib/MoreLabels/Set/index.html @@ -1,15 +1,15 @@ -Set (ocaml.Stdlib.MoreLabels.Set)

    Module MoreLabels.Set

    Sets over ordered types.

    This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

    The Make functor constructs implementations for any type, given a compare function. For instance:

    module IntPairs =
    -  struct
    -    type t = int * int
    -    let compare (x0,y0) (x1,y1) =
    -      match Stdlib.compare x0 x1 with
    -          0 -> Stdlib.compare y0 y1
    -        | c -> c
    -  end
    +Set (ocaml.Stdlib.MoreLabels.Set)

    Module MoreLabels.Set

    Sets over ordered types.

    This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

    The Make functor constructs implementations for any type, given a compare function. For instance:

      module IntPairs =
    +    struct
    +      type t = int * int
    +      let compare (x0,y0) (x1,y1) =
    +        match Stdlib.compare x0 x1 with
    +            0 -> Stdlib.compare y0 y1
    +          | c -> c
    +    end
     
    -module PairsSet = Set.Make(IntPairs)
    +  module PairsSet = Set.Make(IntPairs)
     
    -let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

    This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make + let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

    This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : - S with type elt = Ord.t and type t = Set.Make(Ord).t

    Functor building an implementation of the set structure given a totally ordered type.

    \ No newline at end of file + S with type elt = Ord.t and type t = Set.Make(Ord).t

    Functor building an implementation of the set structure given a totally ordered type.

    diff --git a/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html b/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html index 16f7142..7d2d28c 100644 --- a/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html +++ b/ocaml/Stdlib/MoreLabels/Set/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (ocaml.Stdlib.MoreLabels.Set.OrderedType)

    Module type Set.OrderedType

    Input signature of the functor Make.

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +OrderedType (ocaml.Stdlib.MoreLabels.Set.OrderedType)

    Module type Set.OrderedType

    Input signature of the functor Make.

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html b/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html index fa95f36..b1ecdb7 100644 --- a/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html +++ b/ocaml/Stdlib/MoreLabels/Set/module-type-S/index.html @@ -1,3 +1,2 @@ -S (ocaml.Stdlib.MoreLabels.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    Sets

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : f:(elt -> bool) -> t -> elt

    find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : f:(elt -> bool) -> t -> elt option

    find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : f:(elt -> bool) -> t -> elt

    find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : f:(elt -> bool) -> t -> elt option

    find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : f:(elt -> unit) -> t -> unit

    iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : f:(elt -> elt) -> t -> t

    map ~f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : f:(elt -> bool) -> t -> t

    filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(elt -> elt option) -> t -> t

    filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : f:(elt -> bool) -> t -> t * t

    partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : f:(elt -> bool) -> t -> bool

    for_all ~f s checks if all elements of the set satisfy the predicate f.

    val exists : f:(elt -> bool) -> t -> bool

    exists ~f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +S (ocaml.Stdlib.MoreLabels.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    Sets

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : f:(elt -> bool) -> t -> elt

    find_first ~f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : f:(elt -> bool) -> t -> elt option

    find_first_opt ~f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : f:(elt -> bool) -> t -> elt

    find_last ~f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : f:(elt -> bool) -> t -> elt option

    find_last_opt ~f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : f:(elt -> unit) -> t -> unit

    iter ~f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : f:(elt -> 'acc -> 'acc) -> t -> init:'acc -> 'acc

    fold ~f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : f:(elt -> elt) -> t -> t

    map ~f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : f:(elt -> bool) -> t -> t

    filter ~f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : f:(elt -> elt option) -> t -> t

    filter_map ~f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : f:(elt -> bool) -> t -> t * t

    partition ~f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : f:(elt -> bool) -> t -> bool

    for_all ~f s checks if all elements of the set satisfy the predicate f.

    val exists : f:(elt -> bool) -> t -> bool

    exists ~f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/MoreLabels/index.html b/ocaml/Stdlib/MoreLabels/index.html index ecf3925..a607c85 100644 --- a/ocaml/Stdlib/MoreLabels/index.html +++ b/ocaml/Stdlib/MoreLabels/index.html @@ -1,4 +1,4 @@ -MoreLabels (ocaml.Stdlib.MoreLabels)

    Module Stdlib.MoreLabels

    Extra labeled libraries.

    This meta-module provides labelized versions of the Hashtbl, Map and Set modules.

    This module is intended to be used through open MoreLabels which replaces Hashtbl, Map, and Set with their labeled counterparts.

    For example:

    open MoreLabels
    +MoreLabels (ocaml.Stdlib.MoreLabels)

    Module Stdlib.MoreLabels

    Extra labeled libraries.

    This meta-module provides labelized versions of the Hashtbl, Map and Set modules.

    This module is intended to be used through open MoreLabels which replaces Hashtbl, Map, and Set with their labeled counterparts.

    For example:

      open MoreLabels
     
    -Hashtbl.iter ~f:(fun ~key ~data -> g key data) table
    module Hashtbl : sig ... end

    Hash tables and hash functions.

    module Map : sig ... end

    Association tables over ordered types.

    module Set : sig ... end

    Sets over ordered types.

    \ No newline at end of file + Hashtbl.iter ~f:(fun ~key ~data -> g key data) table
    module Hashtbl : sig ... end

    Hash tables and hash functions.

    module Map : sig ... end

    Association tables over ordered types.

    module Set : sig ... end

    Sets over ordered types.

    diff --git a/ocaml/Stdlib/Mutex/index.html b/ocaml/Stdlib/Mutex/index.html index 7fe0dcf..1cf4d77 100644 --- a/ocaml/Stdlib/Mutex/index.html +++ b/ocaml/Stdlib/Mutex/index.html @@ -1,4 +1,4 @@ -Mutex (ocaml.Stdlib.Mutex)

    Module Stdlib.Mutex

    Locks for mutual exclusion.

    Mutexes (mutual-exclusion locks) are used to implement critical sections and protect shared mutable data structures against concurrent accesses. The typical use is (if m is the mutex associated with the data structure D):

    Mutex.lock m;
    -(* Critical section that operates over D *);
    -Mutex.unlock m
    type t

    The type of mutexes.

    val create : unit -> t

    Return a new mutex.

    val lock : t -> unit

    Lock the given mutex. Only one thread can have the mutex locked at any time. A thread that attempts to lock a mutex already locked by another thread will suspend until the other thread unlocks the mutex.

    • raises Sys_error

      if the mutex is already locked by the thread calling Mutex.lock.

    • before 4.12

      Sys_error was not raised for recursive locking (platform-dependent behaviour)

    val try_lock : t -> bool

    Same as Mutex.lock, but does not suspend the calling thread if the mutex is already locked: just return false immediately in that case. If the mutex is unlocked, lock it and return true.

    val unlock : t -> unit

    Unlock the given mutex. Other threads suspended trying to lock the mutex will restart. The mutex must have been previously locked by the thread that calls Mutex.unlock.

    • raises Sys_error

      if the mutex is unlocked or was locked by another thread.

    • before 4.12

      Sys_error was not raised when unlocking an unlocked mutex or when unlocking a mutex from a different thread.

    val protect : t -> (unit -> 'a) -> 'a

    protect mutex f runs f() in a critical section where mutex is locked (using lock); it then takes care of releasing mutex, whether f() returned a value or raised an exception.

    The unlocking operation is guaranteed to always takes place, even in the event an asynchronous exception (e.g. Sys.Break) is raised in some signal handler.

    • since 5.1
    \ No newline at end of file +Mutex (ocaml.Stdlib.Mutex)

    Module Stdlib.Mutex

    Locks for mutual exclusion.

    Mutexes (mutual-exclusion locks) are used to implement critical sections and protect shared mutable data structures against concurrent accesses. The typical use is (if m is the mutex associated with the data structure D):

      Mutex.lock m;
    +  (* Critical section that operates over D *);
    +  Mutex.unlock m
    type t

    The type of mutexes.

    val create : unit -> t

    Return a new mutex.

    val lock : t -> unit

    Lock the given mutex. Only one thread can have the mutex locked at any time. A thread that attempts to lock a mutex already locked by another thread will suspend until the other thread unlocks the mutex.

    • before 4.12

      Sys_error was not raised for recursive locking (platform-dependent behaviour)

    val try_lock : t -> bool

    Same as Mutex.lock, but does not suspend the calling thread if the mutex is already locked: just return false immediately in that case. If the mutex is unlocked, lock it and return true.

    val unlock : t -> unit

    Unlock the given mutex. Other threads suspended trying to lock the mutex will restart. The mutex must have been previously locked by the thread that calls Mutex.unlock.

    • raises Sys_error

      if the mutex is unlocked or was locked by another thread.

    • before 4.12

      Sys_error was not raised when unlocking an unlocked mutex or when unlocking a mutex from a different thread.

    val protect : t -> (unit -> 'a) -> 'a

    protect mutex f runs f() in a critical section where mutex is locked (using lock); it then takes care of releasing mutex, whether f() returned a value or raised an exception.

    The unlocking operation is guaranteed to always takes place, even in the event an asynchronous exception (e.g. Sys.Break) is raised in some signal handler.

    • since 5.1
    diff --git a/ocaml/Stdlib/Nativeint/index.html b/ocaml/Stdlib/Nativeint/index.html index 1da9c65..c3a72d8 100644 --- a/ocaml/Stdlib/Nativeint/index.html +++ b/ocaml/Stdlib/Nativeint/index.html @@ -1,5 +1,4 @@ -Nativeint (ocaml.Stdlib.Nativeint)

    Module Stdlib.Nativeint

    Processor-native integers.

    This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 232 or 264 depending on the word size of the architecture.

    Performance notice: values of type nativeint occupy more memory space than values of type int, and arithmetic operations on nativeint are generally slower than those on int. Use nativeint only when the application requires the extra bit of precision over the int type.

    Literals for native integers are suffixed by n:

    let zero: nativeint = 0n
    -let one: nativeint = 1n
    -let m_one: nativeint = -1n
    val zero : nativeint

    The native integer 0.

    val one : nativeint

    The native integer 1.

    val minus_one : nativeint

    The native integer -1.

    val neg : nativeint -> nativeint

    Unary negation.

    val add : nativeint -> nativeint -> nativeint

    Addition.

    val sub : nativeint -> nativeint -> nativeint

    Subtraction.

    val mul : nativeint -> nativeint -> nativeint

    Multiplication.

    val div : nativeint -> nativeint -> nativeint

    Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    • raises Division_by_zero

      if the second argument is zero.

    val unsigned_div : nativeint -> nativeint -> nativeint

    Same as div, except that arguments and result are interpreted as unsigned native integers.

    • since 4.08
    val rem : nativeint -> nativeint -> nativeint

    Integer remainder. If y is not zero, the result of Nativeint.rem x y satisfies the following properties: Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y and x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) - (Nativeint.rem x y). If y = 0, Nativeint.rem x y raises Division_by_zero.

    val unsigned_rem : nativeint -> nativeint -> nativeint

    Same as rem, except that arguments and result are interpreted as unsigned native integers.

    • since 4.08
    val succ : nativeint -> nativeint

    Successor. Nativeint.succ x is Nativeint.add x Nativeint.one.

    val pred : nativeint -> nativeint

    Predecessor. Nativeint.pred x is Nativeint.sub x Nativeint.one.

    val abs : nativeint -> nativeint

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val size : int

    The size in bits of a native integer. This is equal to 32 on a 32-bit platform and to 64 on a 64-bit platform.

    val max_int : nativeint

    The greatest representable native integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

    val min_int : nativeint

    The smallest representable native integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

    val logand : nativeint -> nativeint -> nativeint

    Bitwise logical and.

    val logor : nativeint -> nativeint -> nativeint

    Bitwise logical or.

    val logxor : nativeint -> nativeint -> nativeint

    Bitwise logical exclusive or.

    val lognot : nativeint -> nativeint

    Bitwise logical negation.

    val shift_left : nativeint -> int -> nativeint

    Nativeint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

    val shift_right : nativeint -> int -> nativeint

    Nativeint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

    val shift_right_logical : nativeint -> int -> nativeint

    Nativeint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

    val of_int : int -> nativeint

    Convert the given integer (type int) to a native integer (type nativeint).

    val to_int : nativeint -> int

    Convert the given native integer (type nativeint) to an integer (type int). The high-order bit is lost during the conversion.

    val unsigned_to_int : nativeint -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> nativeint

    Convert the given floating-point number to a native integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Nativeint.min_int, Nativeint.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : nativeint -> float

    Convert the given native integer to a floating-point number.

    val of_int32 : int32 -> nativeint

    Convert the given 32-bit integer (type int32) to a native integer.

    val to_int32 : nativeint -> int32

    Convert the given native integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

    val of_string : string -> nativeint

    Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Nativeint.max_int+1]. If the input exceeds Nativeint.max_int it is converted to the signed integer Int64.min_int + input - Nativeint.max_int - 1.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

    val of_string_opt : string -> nativeint option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : nativeint -> string

    Return the string representation of its argument, in decimal.

    type t = nativeint

    An alias for the type of native integers.

    val compare : t -> t -> int

    The comparison function for native integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Nativeint to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned native integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for native ints.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for native ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for native ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    \ No newline at end of file +Nativeint (ocaml.Stdlib.Nativeint)

    Module Stdlib.Nativeint

    Processor-native integers.

    This module provides operations on the type nativeint of signed 32-bit integers (on 32-bit platforms) or signed 64-bit integers (on 64-bit platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over nativeint are taken modulo 232 or 264 depending on the word size of the architecture.

    Performance notice: values of type nativeint occupy more memory space than values of type int, and arithmetic operations on nativeint are generally slower than those on int. Use nativeint only when the application requires the extra bit of precision over the int type.

    Literals for native integers are suffixed by n:

     let zero: nativeint = 0n
    + let one: nativeint = 1n
    + let m_one: nativeint = -1n
    val zero : nativeint

    The native integer 0.

    val one : nativeint

    The native integer 1.

    val minus_one : nativeint

    The native integer -1.

    val neg : nativeint -> nativeint

    Unary negation.

    val add : nativeint -> nativeint -> nativeint

    Addition.

    val sub : nativeint -> nativeint -> nativeint

    Subtraction.

    val mul : nativeint -> nativeint -> nativeint

    Multiplication.

    val div : nativeint -> nativeint -> nativeint

    Integer division. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : nativeint -> nativeint -> nativeint

    Same as div, except that arguments and result are interpreted as unsigned native integers.

    • since 4.08
    val rem : nativeint -> nativeint -> nativeint

    Integer remainder. If y is not zero, the result of Nativeint.rem x y satisfies the following properties: Nativeint.zero <= Nativeint.rem x y < Nativeint.abs y and x = Nativeint.add (Nativeint.mul (Nativeint.div x y) y) (Nativeint.rem x y). If y = 0, Nativeint.rem x y raises Division_by_zero.

    val unsigned_rem : nativeint -> nativeint -> nativeint

    Same as rem, except that arguments and result are interpreted as unsigned native integers.

    • since 4.08
    val succ : nativeint -> nativeint

    Successor. Nativeint.succ x is Nativeint.add x Nativeint.one.

    val pred : nativeint -> nativeint

    Predecessor. Nativeint.pred x is Nativeint.sub x Nativeint.one.

    val abs : nativeint -> nativeint

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val size : int

    The size in bits of a native integer. This is equal to 32 on a 32-bit platform and to 64 on a 64-bit platform.

    val max_int : nativeint

    The greatest representable native integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

    val min_int : nativeint

    The smallest representable native integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

    val logand : nativeint -> nativeint -> nativeint

    Bitwise logical and.

    val logor : nativeint -> nativeint -> nativeint

    Bitwise logical or.

    val logxor : nativeint -> nativeint -> nativeint

    Bitwise logical exclusive or.

    val lognot : nativeint -> nativeint

    Bitwise logical negation.

    val shift_left : nativeint -> int -> nativeint

    Nativeint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

    val shift_right : nativeint -> int -> nativeint

    Nativeint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

    val shift_right_logical : nativeint -> int -> nativeint

    Nativeint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

    val of_int : int -> nativeint

    Convert the given integer (type int) to a native integer (type nativeint).

    val to_int : nativeint -> int

    Convert the given native integer (type nativeint) to an integer (type int). The high-order bit is lost during the conversion.

    val unsigned_to_int : nativeint -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> nativeint

    Convert the given floating-point number to a native integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Nativeint.min_int, Nativeint.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : nativeint -> float

    Convert the given native integer to a floating-point number.

    val of_int32 : int32 -> nativeint

    Convert the given 32-bit integer (type int32) to a native integer.

    val to_int32 : nativeint -> int32

    Convert the given native integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

    val of_string : string -> nativeint

    Convert the given string to a native integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Nativeint.max_int+1]. If the input exceeds Nativeint.max_int it is converted to the signed integer Int64.min_int + input - Nativeint.max_int - 1.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

    val of_string_opt : string -> nativeint option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : nativeint -> string

    Return the string representation of its argument, in decimal.

    type t = nativeint

    An alias for the type of native integers.

    val compare : t -> t -> int

    The comparison function for native integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Nativeint to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned native integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for native ints.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for native ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for native ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    diff --git a/ocaml/Stdlib/Obj/Closure/index.html b/ocaml/Stdlib/Obj/Closure/index.html index 12dc20e..4bbd35b 100644 --- a/ocaml/Stdlib/Obj/Closure/index.html +++ b/ocaml/Stdlib/Obj/Closure/index.html @@ -1,2 +1,2 @@ -Closure (ocaml.Stdlib.Obj.Closure)

    Module Obj.Closure

    type info = {
    1. arity : int;
    2. start_env : int;
    }
    val info : t -> info
    \ No newline at end of file +Closure (ocaml.Stdlib.Obj.Closure)

    Module Obj.Closure

    type info = {
    1. arity : int;
    2. start_env : int;
    }
    val info : t -> info
    diff --git a/ocaml/Stdlib/Obj/Ephemeron/index.html b/ocaml/Stdlib/Obj/Ephemeron/index.html index 82ef72c..ca3fd3a 100644 --- a/ocaml/Stdlib/Obj/Ephemeron/index.html +++ b/ocaml/Stdlib/Obj/Ephemeron/index.html @@ -1,2 +1,2 @@ -Ephemeron (ocaml.Stdlib.Obj.Ephemeron)

    Module Obj.Ephemeron

    Ephemeron with arbitrary arity and untyped

    type obj_t = t

    alias for Obj.t

    type t

    an ephemeron cf Ephemeron

    val create : int -> t

    create n returns an ephemeron with n keys. All the keys and the data are initially empty. The argument n must be between zero and max_ephe_length (limits included).

    val length : t -> int

    return the number of keys

    val get_key : t -> int -> obj_t option
    val get_key_copy : t -> int -> obj_t option
    val set_key : t -> int -> obj_t -> unit
    val unset_key : t -> int -> unit
    val check_key : t -> int -> bool
    val blit_key : t -> int -> t -> int -> int -> unit
    val get_data : t -> obj_t option
    val get_data_copy : t -> obj_t option
    val set_data : t -> obj_t -> unit
    val unset_data : t -> unit
    val check_data : t -> bool
    val blit_data : t -> t -> unit
    val max_ephe_length : int

    Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain

    \ No newline at end of file +Ephemeron (ocaml.Stdlib.Obj.Ephemeron)

    Module Obj.Ephemeron

    Ephemeron with arbitrary arity and untyped

    type obj_t = t

    alias for Obj.t

    type t

    an ephemeron cf Ephemeron

    val create : int -> t

    create n returns an ephemeron with n keys. All the keys and the data are initially empty. The argument n must be between zero and max_ephe_length (limits included).

    val length : t -> int

    return the number of keys

    val get_key : t -> int -> obj_t option
    val get_key_copy : t -> int -> obj_t option
    val set_key : t -> int -> obj_t -> unit
    val unset_key : t -> int -> unit
    val check_key : t -> int -> bool
    val blit_key : t -> int -> t -> int -> int -> unit
    val get_data : t -> obj_t option
    val get_data_copy : t -> obj_t option
    val set_data : t -> obj_t -> unit
    val unset_data : t -> unit
    val check_data : t -> bool
    val blit_data : t -> t -> unit
    val max_ephe_length : int

    Maximum length of an ephemeron, ie the maximum number of keys an ephemeron could contain

    diff --git a/ocaml/Stdlib/Obj/Extension_constructor/index.html b/ocaml/Stdlib/Obj/Extension_constructor/index.html index 89e6f09..01d5c89 100644 --- a/ocaml/Stdlib/Obj/Extension_constructor/index.html +++ b/ocaml/Stdlib/Obj/Extension_constructor/index.html @@ -1,2 +1,2 @@ -Extension_constructor (ocaml.Stdlib.Obj.Extension_constructor)

    Module Obj.Extension_constructor

    type t = extension_constructor
    val of_val : 'a -> t
    val name : t -> string
    val id : t -> int
    \ No newline at end of file +Extension_constructor (ocaml.Stdlib.Obj.Extension_constructor)

    Module Obj.Extension_constructor

    type t = extension_constructor
    val of_val : 'a -> t
    val name : t -> string
    val id : t -> int
    diff --git a/ocaml/Stdlib/Obj/index.html b/ocaml/Stdlib/Obj/index.html index c8f9565..6684dfe 100644 --- a/ocaml/Stdlib/Obj/index.html +++ b/ocaml/Stdlib/Obj/index.html @@ -1,2 +1,2 @@ -Obj (ocaml.Stdlib.Obj)

    Module Stdlib.Obj

    Operations on internal representations of values.

    Not for the casual user.

    type t
    type raw_data = nativeint
    val repr : 'a -> t
    val obj : t -> 'a
    val magic : 'a -> 'b
    val is_block : t -> bool
    val is_int : t -> bool
    val tag : t -> int
    val size : t -> int
    val reachable_words : t -> int

    Computes the total size (in words, including the headers) of all heap blocks accessible from the argument. Statically allocated blocks are included.

    • since 4.04
    val field : t -> int -> t
    val set_field : t -> int -> t -> unit

    When using flambda:

    set_field MUST NOT be called on immutable blocks. (Blocks allocated in C stubs, or with new_block below, are always considered mutable.)

    The same goes for set_double_field.

    For experts only: set_field et al can be made safe by first wrapping the block in Sys.opaque_identity, so any information about its contents will not be propagated.

    val double_field : t -> int -> float
    val set_double_field : t -> int -> float -> unit
    val raw_field : t -> int -> raw_data
    val set_raw_field : t -> int -> raw_data -> unit
    val new_block : int -> int -> t
    val dup : t -> t
    val add_offset : t -> Int32.t -> t
    val with_tag : int -> t -> t
    val first_non_constant_constructor_tag : int
    val last_non_constant_constructor_tag : int
    val forcing_tag : int
    val cont_tag : int
    val lazy_tag : int
    val closure_tag : int
    val object_tag : int
    val infix_tag : int
    val forward_tag : int
    val no_scan_tag : int
    val abstract_tag : int
    val string_tag : int
    val double_tag : int
    val double_array_tag : int
    val custom_tag : int
    val int_tag : int
    val out_of_heap_tag : int
    val unaligned_tag : int
    module Closure : sig ... end
    module Extension_constructor : sig ... end
    module Ephemeron : sig ... end

    Ephemeron with arbitrary arity and untyped

    \ No newline at end of file +Obj (ocaml.Stdlib.Obj)

    Module Stdlib.Obj

    Operations on internal representations of values.

    Not for the casual user.

    type t
    type raw_data = nativeint
    val repr : 'a -> t
    val obj : t -> 'a
    val magic : 'a -> 'b
    val is_block : t -> bool
    val is_int : t -> bool
    val tag : t -> int
    val size : t -> int
    val reachable_words : t -> int

    Computes the total size (in words, including the headers) of all heap blocks accessible from the argument. Statically allocated blocks are included.

    • since 4.04
    val field : t -> int -> t
    val set_field : t -> int -> t -> unit

    When using flambda:

    set_field MUST NOT be called on immutable blocks. (Blocks allocated in C stubs, or with new_block below, are always considered mutable.)

    The same goes for set_double_field.

    For experts only: set_field et al can be made safe by first wrapping the block in Sys.opaque_identity, so any information about its contents will not be propagated.

    val double_field : t -> int -> float
    val set_double_field : t -> int -> float -> unit
    val raw_field : t -> int -> raw_data
    val set_raw_field : t -> int -> raw_data -> unit
    val new_block : int -> int -> t
    val dup : t -> t
    val add_offset : t -> Int32.t -> t
    val with_tag : int -> t -> t
    val first_non_constant_constructor_tag : int
    val last_non_constant_constructor_tag : int
    val forcing_tag : int
    val cont_tag : int
    val lazy_tag : int
    val closure_tag : int
    val object_tag : int
    val infix_tag : int
    val forward_tag : int
    val no_scan_tag : int
    val abstract_tag : int
    val string_tag : int
    val double_tag : int
    val double_array_tag : int
    val custom_tag : int
    val int_tag : int
    val out_of_heap_tag : int
    val unaligned_tag : int
    module Closure : sig ... end
    module Extension_constructor : sig ... end
    module Ephemeron : sig ... end

    Ephemeron with arbitrary arity and untyped

    diff --git a/ocaml/Stdlib/Oo/index.html b/ocaml/Stdlib/Oo/index.html index 37d3e35..e1bec6a 100644 --- a/ocaml/Stdlib/Oo/index.html +++ b/ocaml/Stdlib/Oo/index.html @@ -1,2 +1,2 @@ -Oo (ocaml.Stdlib.Oo)

    Module Stdlib.Oo

    Operations on objects

    val copy : < .. > as 'a -> 'a

    Oo.copy o returns a copy of object o, that is a fresh object with the same methods and instance variables as o.

    • alert unsynchronized_access Unsynchronized accesses to mutable objects are a programming error.
    val id : < .. > -> int

    Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.

    \ No newline at end of file +Oo (ocaml.Stdlib.Oo)

    Module Stdlib.Oo

    Operations on objects

    val copy : (< .. > as 'a) -> 'a

    Oo.copy o returns a copy of object o, that is a fresh object with the same methods and instance variables as o.

    • alert unsynchronized_access Unsynchronized accesses to mutable objects are a programming error.
    val id : < .. > -> int

    Return an integer identifying this object, unique for the current execution of the program. The generic comparison and hashing functions are based on this integer. When an object is obtained by unmarshaling, the id is refreshed, and thus different from the original object. As a consequence, the internal invariants of data structures such as hash table or sets containing objects are broken after unmarshaling the data structures.

    diff --git a/ocaml/Stdlib/Option/index.html b/ocaml/Stdlib/Option/index.html index 36972e8..04773aa 100644 --- a/ocaml/Stdlib/Option/index.html +++ b/ocaml/Stdlib/Option/index.html @@ -1,2 +1,2 @@ -Option (ocaml.Stdlib.Option)

    Module Stdlib.Option

    Option values.

    Option values explicitly indicate the presence or absence of a value.

    • since 4.08

    Options

    type 'a t = 'a option =
    1. | None
    2. | Some of 'a

    The type for option values. Either None or a value Some v.

    val none : 'a option

    none is None.

    val some : 'a -> 'a option

    some v is Some v.

    val value : 'a option -> default:'a -> 'a

    value o ~default is v if o is Some v and default otherwise.

    val get : 'a option -> 'a

    get o is v if o is Some v and raise otherwise.

    • raises Invalid_argument

      if o is None.

    val bind : 'a option -> ('a -> 'b option) -> 'b option

    bind o f is f v if o is Some v and None if o is None.

    val join : 'a option option -> 'a option

    join oo is Some v if oo is Some (Some v) and None otherwise.

    val map : ('a -> 'b) -> 'a option -> 'b option

    map f o is None if o is None and Some (f v) if o is Some v.

    val fold : none:'a -> some:('b -> 'a) -> 'b option -> 'a

    fold ~none ~some o is none if o is None and some v if o is Some v.

    val iter : ('a -> unit) -> 'a option -> unit

    iter f o is f v if o is Some v and () otherwise.

    Predicates and comparisons

    val is_none : 'a option -> bool

    is_none o is true if and only if o is None.

    val is_some : 'a option -> bool

    is_some o is true if and only if o is Some o.

    val equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool

    equal eq o0 o1 is true if and only if o0 and o1 are both None or if they are Some v0 and Some v1 and eq v0 v1 is true.

    val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int

    compare cmp o0 o1 is a total order on options using cmp to compare values wrapped by Some _. None is smaller than Some _ values.

    Converting

    val to_result : none:'e -> 'a option -> ('a, 'e) result

    to_result ~none o is Ok v if o is Some v and Error none otherwise.

    val to_list : 'a option -> 'a list

    to_list o is [] if o is None and [v] if o is Some v.

    val to_seq : 'a option -> 'a Seq.t

    to_seq o is o as a sequence. None is the empty sequence and Some v is the singleton sequence containing v.

    \ No newline at end of file +Option (ocaml.Stdlib.Option)

    Module Stdlib.Option

    Option values.

    Option values explicitly indicate the presence or absence of a value.

    • since 4.08

    Options

    type 'a t = 'a option =
    1. | None
    2. | Some of 'a

    The type for option values. Either None or a value Some v.

    val none : 'a option

    none is None.

    val some : 'a -> 'a option

    some v is Some v.

    val value : 'a option -> default:'a -> 'a

    value o ~default is v if o is Some v and default otherwise.

    val get : 'a option -> 'a

    get o is v if o is Some v and raise otherwise.

    val bind : 'a option -> ('a -> 'b option) -> 'b option

    bind o f is f v if o is Some v and None if o is None.

    val join : 'a option option -> 'a option

    join oo is Some v if oo is Some (Some v) and None otherwise.

    val map : ('a -> 'b) -> 'a option -> 'b option

    map f o is None if o is None and Some (f v) if o is Some v.

    val fold : none:'a -> some:('b -> 'a) -> 'b option -> 'a

    fold ~none ~some o is none if o is None and some v if o is Some v.

    val iter : ('a -> unit) -> 'a option -> unit

    iter f o is f v if o is Some v and () otherwise.

    Predicates and comparisons

    val is_none : 'a option -> bool

    is_none o is true if and only if o is None.

    val is_some : 'a option -> bool

    is_some o is true if and only if o is Some o.

    val equal : ('a -> 'a -> bool) -> 'a option -> 'a option -> bool

    equal eq o0 o1 is true if and only if o0 and o1 are both None or if they are Some v0 and Some v1 and eq v0 v1 is true.

    val compare : ('a -> 'a -> int) -> 'a option -> 'a option -> int

    compare cmp o0 o1 is a total order on options using cmp to compare values wrapped by Some _. None is smaller than Some _ values.

    Converting

    val to_result : none:'e -> 'a option -> ('a, 'e) result

    to_result ~none o is Ok v if o is Some v and Error none otherwise.

    val to_list : 'a option -> 'a list

    to_list o is [] if o is None and [v] if o is Some v.

    val to_seq : 'a option -> 'a Seq.t

    to_seq o is o as a sequence. None is the empty sequence and Some v is the singleton sequence containing v.

    diff --git a/ocaml/Stdlib/Out_channel/index.html b/ocaml/Stdlib/Out_channel/index.html index 808a2b1..11c5752 100644 --- a/ocaml/Stdlib/Out_channel/index.html +++ b/ocaml/Stdlib/Out_channel/index.html @@ -1,5 +1,4 @@ -Out_channel (ocaml.Stdlib.Out_channel)

    Module Stdlib.Out_channel

    Output channels.

    This module provides functions for working with output channels.

    See the example section below.

    • since 4.14

    Channels

    type t = out_channel

    The type of output channel.

    type open_flag = open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)

    Opening modes for open_gen.

    val stdout : t

    The standard output for the process.

    val stderr : t

    The standard error output for the process.

    val open_bin : string -> t

    Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

    val open_text : string -> t

    Same as open_bin, but the file is opened in text mode, so that newline translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

    val open_gen : open_flag list -> int -> string -> t

    open_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. open_text and open_bin are special cases of this function.

    val with_open_bin : string -> (t -> 'a) -> 'a

    with_open_bin fn f opens a channel oc on file fn and returns f - oc. After f returns, either with a value or by raising an exception, oc is guaranteed to be closed.

    val with_open_text : string -> (t -> 'a) -> 'a

    Like with_open_bin, but the channel is opened in text mode (see open_text).

    val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

    Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

    val close : t -> unit

    Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close and flush, which do nothing when applied to an already closed channel. Note that close may raise Sys_error if the operating system signals an error when flushing or closing.

    val close_noerr : t -> unit

    Same as close, but ignore all errors.

    Output

    val output_char : t -> char -> unit

    Write the character on the given output channel.

    val output_byte : t -> int -> unit

    Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

    val output_string : t -> string -> unit

    Write the string on the given output channel.

    val output_bytes : t -> bytes -> unit

    Write the byte sequence on the given output channel.

    Advanced output

    val output : t -> bytes -> int -> int -> unit

    output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    val output_substring : t -> string -> int -> int -> unit

    Same as output but take a string as argument instead of a byte sequence.

    Flushing

    val flush : t -> unit

    Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

    val flush_all : unit -> unit

    Flush all open output channels; ignore errors.

    Seeking

    val seek : t -> int64 -> unit

    seek chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

    val pos : t -> int64

    Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results).

    For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    Attributes

    val length : t -> int64

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

    val set_binary_mode : t -> bool -> unit

    set_binary_mode oc true sets the channel oc to binary mode: no translations take place during output.

    set_binary_mode oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n.

    This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    val set_buffered : t -> bool -> unit

    set_buffered oc true sets the channel oc to buffered mode. In this mode, data output on oc will be buffered until either the internal buffer is full or the function flush or flush_all is called, at which point it will be sent to the output device.

    set_buffered oc false sets the channel oc to unbuffered mode. In this mode, data output on oc will be sent to the output device immediately.

    All channels are open in buffered mode by default.

    val is_buffered : t -> bool

    is_buffered oc returns whether the channel oc is buffered (see set_buffered).

    val isatty : t -> bool

    isatty oc is true if oc refers to a terminal or console window, false otherwise.

    • since 5.1

    Examples

    Writing the contents of a file:

    let write_file file s =
    -  Out_channel.with_open_bin file
    -    (fun oc -> Out_channel.output_string oc s))
    \ No newline at end of file +Out_channel (ocaml.Stdlib.Out_channel)

    Module Stdlib.Out_channel

    Output channels.

    This module provides functions for working with output channels.

    See the example section below.

    • since 4.14

    Channels

    type t = out_channel

    The type of output channel.

    type open_flag = open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)

    Opening modes for open_gen.

    val stdout : t

    The standard output for the process.

    val stderr : t

    The standard error output for the process.

    val open_bin : string -> t

    Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

    val open_text : string -> t

    Same as open_bin, but the file is opened in text mode, so that newline translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like open_bin.

    val open_gen : open_flag list -> int -> string -> t

    open_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. open_text and open_bin are special cases of this function.

    val with_open_bin : string -> (t -> 'a) -> 'a

    with_open_bin fn f opens a channel oc on file fn and returns f oc. After f returns, either with a value or by raising an exception, oc is guaranteed to be closed.

    val with_open_text : string -> (t -> 'a) -> 'a

    Like with_open_bin, but the channel is opened in text mode (see open_text).

    val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

    Like with_open_bin, but can specify the opening mode and file permission, in case the file must be created (see open_gen).

    val close : t -> unit

    Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close and flush, which do nothing when applied to an already closed channel. Note that close may raise Sys_error if the operating system signals an error when flushing or closing.

    val close_noerr : t -> unit

    Same as close, but ignore all errors.

    Output

    val output_char : t -> char -> unit

    Write the character on the given output channel.

    val output_byte : t -> int -> unit

    Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

    val output_string : t -> string -> unit

    Write the string on the given output channel.

    val output_bytes : t -> bytes -> unit

    Write the byte sequence on the given output channel.

    Advanced output

    val output : t -> bytes -> int -> int -> unit

    output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

    val output_substring : t -> string -> int -> int -> unit

    Same as output but take a string as argument instead of a byte sequence.

    Flushing

    val flush : t -> unit

    Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

    val flush_all : unit -> unit

    Flush all open output channels; ignore errors.

    Seeking

    val seek : t -> int64 -> unit

    seek chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

    val pos : t -> int64

    Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results).

    For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos, then going back to this position using seek will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    Attributes

    val length : t -> int64

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

    val set_binary_mode : t -> bool -> unit

    set_binary_mode oc true sets the channel oc to binary mode: no translations take place during output.

    set_binary_mode oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n.

    This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    val set_buffered : t -> bool -> unit

    set_buffered oc true sets the channel oc to buffered mode. In this mode, data output on oc will be buffered until either the internal buffer is full or the function flush or flush_all is called, at which point it will be sent to the output device.

    set_buffered oc false sets the channel oc to unbuffered mode. In this mode, data output on oc will be sent to the output device immediately.

    All channels are open in buffered mode by default.

    val is_buffered : t -> bool

    is_buffered oc returns whether the channel oc is buffered (see set_buffered).

    val isatty : t -> bool

    isatty oc is true if oc refers to a terminal or console window, false otherwise.

    • since 5.1

    Examples

    Writing the contents of a file:

      let write_file file s =
    +    Out_channel.with_open_bin file
    +      (fun oc -> Out_channel.output_string oc s))
    diff --git a/ocaml/Stdlib/Parsing/index.html b/ocaml/Stdlib/Parsing/index.html index 843460b..50f4995 100644 --- a/ocaml/Stdlib/Parsing/index.html +++ b/ocaml/Stdlib/Parsing/index.html @@ -1,2 +1,2 @@ -Parsing (ocaml.Stdlib.Parsing)

    Module Stdlib.Parsing

    The run-time library for parsers generated by ocamlyacc.

    val symbol_start : unit -> int

    symbol_start and Parsing.symbol_end are to be called in the action part of a grammar rule only. They return the offset of the string that matches the left-hand side of the rule: symbol_start() returns the offset of the first character; symbol_end() returns the offset after the last character. The first character in a file is at offset 0.

    val symbol_end : unit -> int
    val rhs_start : int -> int

    Same as Parsing.symbol_start and Parsing.symbol_end, but return the offset of the string matching the nth item on the right-hand side of the rule, where n is the integer parameter to rhs_start and rhs_end. n is 1 for the leftmost item.

    val rhs_end : int -> int
    val symbol_start_pos : unit -> Lexing.position

    Same as symbol_start, but return a position instead of an offset.

    val symbol_end_pos : unit -> Lexing.position

    Same as symbol_end, but return a position instead of an offset.

    val rhs_start_pos : int -> Lexing.position

    Same as rhs_start, but return a position instead of an offset.

    val rhs_end_pos : int -> Lexing.position

    Same as rhs_end, but return a position instead of an offset.

    val clear_parser : unit -> unit

    Empty the parser stack. Call it just after a parsing function has returned, to remove all pointers from the parser stack to structures that were built by semantic actions during parsing. This is optional, but lowers the memory requirements of the programs.

    exception Parse_error

    Raised when a parser encounters a syntax error. Can also be raised from the action part of a grammar rule, to initiate error recovery.

    val set_trace : bool -> bool

    Control debugging support for ocamlyacc-generated parsers. After Parsing.set_trace true, the pushdown automaton that executes the parsers prints a trace of its actions (reading a token, shifting a state, reducing by a rule) on standard output. Parsing.set_trace false turns this debugging trace off. The boolean returned is the previous state of the trace flag.

    • since 3.11
    \ No newline at end of file +Parsing (ocaml.Stdlib.Parsing)

    Module Stdlib.Parsing

    The run-time library for parsers generated by ocamlyacc.

    val symbol_start : unit -> int

    symbol_start and Parsing.symbol_end are to be called in the action part of a grammar rule only. They return the offset of the string that matches the left-hand side of the rule: symbol_start() returns the offset of the first character; symbol_end() returns the offset after the last character. The first character in a file is at offset 0.

    val symbol_end : unit -> int
    val rhs_start : int -> int

    Same as Parsing.symbol_start and Parsing.symbol_end, but return the offset of the string matching the nth item on the right-hand side of the rule, where n is the integer parameter to rhs_start and rhs_end. n is 1 for the leftmost item.

    val rhs_end : int -> int
    val symbol_start_pos : unit -> Lexing.position

    Same as symbol_start, but return a position instead of an offset.

    val symbol_end_pos : unit -> Lexing.position

    Same as symbol_end, but return a position instead of an offset.

    val rhs_start_pos : int -> Lexing.position

    Same as rhs_start, but return a position instead of an offset.

    val rhs_end_pos : int -> Lexing.position

    Same as rhs_end, but return a position instead of an offset.

    val clear_parser : unit -> unit

    Empty the parser stack. Call it just after a parsing function has returned, to remove all pointers from the parser stack to structures that were built by semantic actions during parsing. This is optional, but lowers the memory requirements of the programs.

    exception Parse_error

    Raised when a parser encounters a syntax error. Can also be raised from the action part of a grammar rule, to initiate error recovery.

    val set_trace : bool -> bool

    Control debugging support for ocamlyacc-generated parsers. After Parsing.set_trace true, the pushdown automaton that executes the parsers prints a trace of its actions (reading a token, shifting a state, reducing by a rule) on standard output. Parsing.set_trace false turns this debugging trace off. The boolean returned is the previous state of the trace flag.

    • since 3.11
    diff --git a/ocaml/Stdlib/Printexc/Slot/index.html b/ocaml/Stdlib/Printexc/Slot/index.html index 9e25fdf..9c1e3fc 100644 --- a/ocaml/Stdlib/Printexc/Slot/index.html +++ b/ocaml/Stdlib/Printexc/Slot/index.html @@ -1,2 +1,2 @@ -Slot (ocaml.Stdlib.Printexc.Slot)

    Module Printexc.Slot

    • since 4.02
    val is_raise : t -> bool

    is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

    • since 4.02
    val is_inline : t -> bool

    is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

    • since 4.04
    val location : t -> location option

    location slot returns the location information of the slot, if available, and None otherwise.

    Some possible reasons for failing to return a location are as follow:

    • the slot corresponds to a compiler-inserted raise
    • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
    • since 4.02
    val name : t -> string option

    name slot returns the name of the function or definition enclosing the location referred to by the slot.

    name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

    • since 4.11
    val format : int -> t -> string option

    format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

    Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

    • since 4.02
    \ No newline at end of file +Slot (ocaml.Stdlib.Printexc.Slot)

    Module Printexc.Slot

    • since 4.02
    val is_raise : t -> bool

    is_raise slot is true when slot refers to a raising point in the code, and false when it comes from a simple function call.

    • since 4.02
    val is_inline : t -> bool

    is_inline slot is true when slot refers to a call that got inlined by the compiler, and false when it comes from any other context.

    • since 4.04
    val location : t -> location option

    location slot returns the location information of the slot, if available, and None otherwise.

    Some possible reasons for failing to return a location are as follow:

    • the slot corresponds to a compiler-inserted raise
    • the slot corresponds to a part of the program that has not been compiled with debug information (-g)
    • since 4.02
    val name : t -> string option

    name slot returns the name of the function or definition enclosing the location referred to by the slot.

    name slot returns None if the name is unavailable, which may happen for the same reasons as location returning None.

    • since 4.11
    val format : int -> t -> string option

    format pos slot returns the string representation of slot as raw_backtrace_to_string would format it, assuming it is the pos-th element of the backtrace: the 0-th element is pretty-printed differently than the others.

    Whole-backtrace printing functions also skip some uninformative slots; in that case, format pos slot returns None.

    • since 4.02
    diff --git a/ocaml/Stdlib/Printexc/index.html b/ocaml/Stdlib/Printexc/index.html index 0cf1a34..e9c9960 100644 --- a/ocaml/Stdlib/Printexc/index.html +++ b/ocaml/Stdlib/Printexc/index.html @@ -1,18 +1,17 @@ -Printexc (ocaml.Stdlib.Printexc)

    Module Stdlib.Printexc

    Facilities for printing exceptions and inspecting current call stack.

    type t = exn = ..

    The type of exception values.

    val to_string : exn -> string

    Printexc.to_string e returns a string representation of the exception e.

    val to_string_default : exn -> string

    Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

    • since 4.09
    val print : ('a -> 'b) -> 'a -> 'b

    Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

    val catch : ('a -> 'b) -> 'a -> 'b

    Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

    • deprecated This function is no longer needed.
    val print_backtrace : out_channel -> unit

    Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

    If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

    • since 3.11
    val get_backtrace : unit -> string

    Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

    • since 3.11
    val record_backtrace : bool -> unit

    Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

    • since 3.11
    val backtrace_status : unit -> bool

    Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

    • since 3.11
    val register_printer : (exn -> string option) -> unit

    Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some - s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

    When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

    When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

    • since 3.11.2
    val use_printers : exn -> string option

    Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

    • since 4.09

    Raw backtraces

    type raw_backtrace

    The type raw_backtrace stores a backtrace in a low-level format, which can be converted to usable form using raw_backtrace_entries and backtrace_slots_of_raw_entry below.

    Converting backtraces to backtrace_slots is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use raw_backtrace to avoid or delay conversion.

    Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the backtrace_slots function of the next section.

    • since 4.01
    type raw_backtrace_entry = private int

    A raw_backtrace_entry is an element of a raw_backtrace.

    Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

    A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

    Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

    • since 4.12
    val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
    • since 4.12
    val get_raw_backtrace : unit -> raw_backtrace

    Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

    • since 4.01
    val print_raw_backtrace : out_channel -> raw_backtrace -> unit

    Print a raw backtrace in the same format Printexc.print_backtrace uses.

    • since 4.01
    val raw_backtrace_to_string : raw_backtrace -> string

    Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

    • since 4.01
    val raise_with_backtrace : exn -> raw_backtrace -> 'a

    Reraise the exception using the given raw_backtrace for the origin of the exception

    • since 4.05

    Current call stack

    val get_callstack : int -> raw_backtrace

    Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

    • since 4.01

    Uncaught exceptions

    val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

    Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

    • since 4.11
    val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

    Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

    Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

    Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

    If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

    • since 4.02

    Manipulation of backtrace information

    These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format.

    type backtrace_slot

    The abstract type backtrace_slot represents a single slot of a backtrace.

    • since 4.02
    val backtrace_slots : raw_backtrace -> backtrace_slot array option

    Returns the slots of a raw backtrace, or None if none of them contain useful information.

    In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

    Some possible reasons for returning None are as follow:

    • none of the slots in the trace come from modules compiled with debug information (-g)
    • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
    • since 4.02
    val backtrace_slots_of_raw_entry : +Printexc (ocaml.Stdlib.Printexc)

    Module Stdlib.Printexc

    Facilities for printing exceptions and inspecting current call stack.

    type t = exn = ..

    The type of exception values.

    val to_string : exn -> string

    Printexc.to_string e returns a string representation of the exception e.

    val to_string_default : exn -> string

    Printexc.to_string_default e returns a string representation of the exception e, ignoring all registered exception printers.

    • since 4.09
    val print : ('a -> 'b) -> 'a -> 'b

    Printexc.print fn x applies fn to x and returns the result. If the evaluation of fn x raises any exception, the name of the exception is printed on standard error output, and the exception is raised again. The typical use is to catch and report exceptions that escape a function application.

    val catch : ('a -> 'b) -> 'a -> 'b

    Printexc.catch fn x is similar to Printexc.print, but aborts the program with exit code 2 after printing the uncaught exception. This function is deprecated: the runtime system is now able to print uncaught exceptions as precisely as Printexc.catch does. Moreover, calling Printexc.catch makes it harder to track the location of the exception using the debugger or the stack backtrace facility. So, do not use Printexc.catch in new code.

    • deprecated This function is no longer needed.
    val print_backtrace : out_channel -> unit

    Printexc.print_backtrace oc prints an exception backtrace on the output channel oc. The backtrace lists the program locations where the most-recently raised exception was raised and where it was propagated through function calls.

    If the call is not inside an exception handler, the returned backtrace is unspecified. If the call is after some exception-catching code (before in the handler, or in a when-guard during the matching of the exception handler), the backtrace may correspond to a later exception than the handled one.

    • since 3.11
    val get_backtrace : unit -> string

    Printexc.get_backtrace () returns a string containing the same exception backtrace that Printexc.print_backtrace would print. Same restriction usage than print_backtrace.

    • since 3.11
    val record_backtrace : bool -> unit

    Printexc.record_backtrace b turns recording of exception backtraces on (if b = true) or off (if b = false). Initially, backtraces are not recorded, unless the b flag is given to the program through the OCAMLRUNPARAM variable.

    • since 3.11
    val backtrace_status : unit -> bool

    Printexc.backtrace_status() returns true if exception backtraces are currently recorded, false if not.

    • since 3.11
    val register_printer : (exn -> string option) -> unit

    Printexc.register_printer fn registers fn as an exception printer. The printer should return None or raise an exception if it does not know how to convert the passed exception, and Some s with s the resulting string if it can convert the passed exception. Exceptions raised by the printer are ignored.

    When converting an exception into a string, the printers will be invoked in the reverse order of their registrations, until a printer returns a Some s value (if no such printer exists, the runtime will use a generic printer).

    When using this mechanism, one should be aware that an exception backtrace is attached to the thread that saw it raised, rather than to the exception itself. Practically, it means that the code related to fn should not use the backtrace if it has itself raised an exception before.

    • since 3.11.2
    val use_printers : exn -> string option

    Printexc.use_printers e returns None if there are no registered printers and Some s with else as the resulting string otherwise.

    • since 4.09

    Raw backtraces

    type raw_backtrace

    The type raw_backtrace stores a backtrace in a low-level format, which can be converted to usable form using raw_backtrace_entries and backtrace_slots_of_raw_entry below.

    Converting backtraces to backtrace_slots is slower than capturing the backtraces. If an application processes many backtraces, it can be useful to use raw_backtrace to avoid or delay conversion.

    Raw backtraces cannot be marshalled. If you need marshalling, you should use the array returned by the backtrace_slots function of the next section.

    • since 4.01
    type raw_backtrace_entry = private int

    A raw_backtrace_entry is an element of a raw_backtrace.

    Each raw_backtrace_entry is an opaque integer, whose value is not stable between different programs, or even between different runs of the same binary.

    A raw_backtrace_entry can be converted to a usable form using backtrace_slots_of_raw_entry below. Note that, due to inlining, a single raw_backtrace_entry may convert to several backtrace_slots. Since the values of a raw_backtrace_entry are not stable, they cannot be marshalled. If they are to be converted, the conversion must be done by the process that generated them.

    Again due to inlining, there may be multiple distinct raw_backtrace_entry values that convert to equal backtrace_slots. However, if two raw_backtrace_entrys are equal as integers, then they represent the same backtrace_slots.

    • since 4.12
    val raw_backtrace_entries : raw_backtrace -> raw_backtrace_entry array
    • since 4.12
    val get_raw_backtrace : unit -> raw_backtrace

    Printexc.get_raw_backtrace () returns the same exception backtrace that Printexc.print_backtrace would print, but in a raw format. Same restriction usage than print_backtrace.

    • since 4.01
    val print_raw_backtrace : out_channel -> raw_backtrace -> unit

    Print a raw backtrace in the same format Printexc.print_backtrace uses.

    • since 4.01
    val raw_backtrace_to_string : raw_backtrace -> string

    Return a string from a raw backtrace, in the same format Printexc.get_backtrace uses.

    • since 4.01
    val raise_with_backtrace : exn -> raw_backtrace -> 'a

    Reraise the exception using the given raw_backtrace for the origin of the exception

    • since 4.05

    Current call stack

    val get_callstack : int -> raw_backtrace

    Printexc.get_callstack n returns a description of the top of the call stack on the current program point (for the current thread), with at most n entries. (Note: this function is not related to exceptions at all, despite being part of the Printexc module.)

    • since 4.01

    Uncaught exceptions

    val default_uncaught_exception_handler : exn -> raw_backtrace -> unit

    Printexc.default_uncaught_exception_handler prints the exception and backtrace on standard error output.

    • since 4.11
    val set_uncaught_exception_handler : (exn -> raw_backtrace -> unit) -> unit

    Printexc.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions. The default handler is Printexc.default_uncaught_exception_handler.

    Note that when fn is called all the functions registered with Stdlib.at_exit have already been called. Because of this you must make sure any output channel fn writes on is flushed.

    Also note that exceptions raised by user code in the interactive toplevel are not passed to this function as they are caught by the toplevel itself.

    If fn raises an exception, both the exceptions passed to fn and raised by fn will be printed with their respective backtrace.

    • since 4.02

    Manipulation of backtrace information

    These functions are used to traverse the slots of a raw backtrace and extract information from them in a programmer-friendly format.

    type backtrace_slot

    The abstract type backtrace_slot represents a single slot of a backtrace.

    • since 4.02
    val backtrace_slots : raw_backtrace -> backtrace_slot array option

    Returns the slots of a raw backtrace, or None if none of them contain useful information.

    In the return array, the slot at index 0 corresponds to the most recent function call, raise, or primitive get_backtrace call in the trace.

    Some possible reasons for returning None are as follow:

    • none of the slots in the trace come from modules compiled with debug information (-g)
    • the program is a bytecode program that has not been linked with debug information enabled (ocamlc -g)
    • since 4.02
    val backtrace_slots_of_raw_entry : raw_backtrace_entry -> backtrace_slot array option

    Returns the slots of a single raw backtrace entry, or None if this entry lacks debug information.

    Slots are returned in the same order as backtrace_slots: the slot at index 0 is the most recent call, raise, or primitive, and subsequent slots represent callers.

    • since 4.12
    type location = {
    1. filename : string;
    2. line_number : int;
    3. start_char : int;
    4. end_char : int;
    }

    The type of location information found in backtraces. start_char and end_char are positions relative to the beginning of the line.

    • since 4.02
    module Slot : sig ... end

    Raw backtrace slots

    type raw_backtrace_slot

    This type is used to iterate over the slots of a raw_backtrace. For most purposes, backtrace_slots_of_raw_entry is easier to use.

    Like raw_backtrace_entry, values of this type are process-specific and must absolutely not be marshalled, and are unsafe to use for this reason (marshalling them may not fail, but un-marshalling and using the result will result in undefined behavior).

    Elements of this type can still be compared and hashed: when two elements are equal, then they represent the same source location (the converse is not necessarily true in presence of inlining, for example).

    • since 4.02
    val raw_backtrace_length : raw_backtrace -> int

    raw_backtrace_length bckt returns the number of slots in the backtrace bckt.

    • since 4.02
    val get_raw_backtrace_slot : raw_backtrace -> int -> raw_backtrace_slot

    get_raw_backtrace_slot bckt pos returns the slot in position pos in the backtrace bckt.

    • since 4.02
    val convert_raw_backtrace_slot : raw_backtrace_slot -> backtrace_slot

    Extracts the user-friendly backtrace_slot from a low-level raw_backtrace_slot.

    • since 4.02
    val get_raw_backtrace_next_slot : raw_backtrace_slot -> - raw_backtrace_slot option

    get_raw_backtrace_next_slot slot returns the next slot inlined, if any.

    Sample code to iterate over all frames (inlined and non-inlined):

    (* Iterate over inlined frames *)
    -let rec iter_raw_backtrace_slot f slot =
    -  f slot;
    -  match get_raw_backtrace_next_slot slot with
    -  | None -> ()
    -  | Some slot' -> iter_raw_backtrace_slot f slot'
    +  raw_backtrace_slot option

    get_raw_backtrace_next_slot slot returns the next slot inlined, if any.

    Sample code to iterate over all frames (inlined and non-inlined):

      (* Iterate over inlined frames *)
    +  let rec iter_raw_backtrace_slot f slot =
    +    f slot;
    +    match get_raw_backtrace_next_slot slot with
    +    | None -> ()
    +    | Some slot' -> iter_raw_backtrace_slot f slot'
     
    -(* Iterate over stack frames *)
    -let iter_raw_backtrace f bt =
    -  for i = 0 to raw_backtrace_length bt - 1 do
    -    iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i)
    -  done
    • since 4.04

    Exception slots

    val exn_slot_id : exn -> int

    Printexc.exn_slot_id returns an integer which uniquely identifies the constructor used to create the exception value exn (in the current runtime).

    • since 4.02
    val exn_slot_name : exn -> string

    Printexc.exn_slot_name exn returns the internal name of the constructor used to create the exception value exn.

    • since 4.02
    \ No newline at end of file + (* Iterate over stack frames *) + let iter_raw_backtrace f bt = + for i = 0 to raw_backtrace_length bt - 1 do + iter_raw_backtrace_slot f (get_raw_backtrace_slot bt i) + done
    • since 4.04

    Exception slots

    val exn_slot_id : exn -> int

    Printexc.exn_slot_id returns an integer which uniquely identifies the constructor used to create the exception value exn (in the current runtime).

    • since 4.02
    val exn_slot_name : exn -> string

    Printexc.exn_slot_name exn returns the internal name of the constructor used to create the exception value exn.

    • since 4.02
    diff --git a/ocaml/Stdlib/Printf/index.html b/ocaml/Stdlib/Printf/index.html index 36d410f..c3a04a3 100644 --- a/ocaml/Stdlib/Printf/index.html +++ b/ocaml/Stdlib/Printf/index.html @@ -1,5 +1,5 @@ -Printf (ocaml.Stdlib.Printf)

    Module Stdlib.Printf

    Formatted output functions.

    val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a

    fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

    The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

    Conversion specifications have the following form:

    % [flags] [width] [.precision] type

    In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

    The types and their meanings are:

    • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
    • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
    • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
    • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
    • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
    • s: insert a string argument.
    • S: convert a string argument to OCaml syntax (double quotes, escapes).
    • c: insert a character argument.
    • C: convert a character argument to OCaml syntax (single quotes, escapes).
    • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
    • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
    • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
    • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
    • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
    • B: convert a boolean argument to the string true or false
    • b: convert a boolean argument (deprecated; do not use in new programs).
    • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
    • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
    • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
    • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
    • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
    • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
    • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
    • !: take no argument and flush the output.
    • %: take no argument and output one % character.
    • \@: take no argument and output one \@ character.
    • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

    The optional flags are:

    • -: left-justify the output (default is right justification).
    • 0: for numerical conversions, pad with zeroes instead of spaces.
    • +: for signed numerical conversions, prefix number with a + sign if positive.
    • space: for signed numerical conversions, prefix number with a space if positive.
    • #: request an alternate formatting style for the integer types and the floating-point type F.

    The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

    The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

    The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

    val printf : ('a, out_channel, unit) format -> 'a

    Same as Printf.fprintf, but output on stdout.

    val eprintf : ('a, out_channel, unit) format -> 'a

    Same as Printf.fprintf, but output on stderr.

    val sprintf : ('a, unit, string) format -> 'a

    Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

    val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

    Same as Printf.fprintf, but instead of printing on an output channel, append the formatted arguments to the given extensible buffer (see module Buffer).

    val ifprintf : 'b -> ('a, 'b, 'c, unit) format4 -> 'a

    Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 3.10
    val ibprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

    Same as Printf.bprintf, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 4.11

    Formatted output functions with continuations.

    val kfprintf : +Printf (ocaml.Stdlib.Printf)

    Module Stdlib.Printf

    Formatted output functions.

    val fprintf : out_channel -> ('a, out_channel, unit) format -> 'a

    fprintf outchan format arg1 ... argN formats the arguments arg1 to argN according to the format string format, and outputs the resulting string on the channel outchan.

    The format string is a character string which contains two types of objects: plain characters, which are simply copied to the output channel, and conversion specifications, each of which causes conversion and printing of arguments.

    Conversion specifications have the following form:

    % [flags] [width] [.precision] type

    In short, a conversion specification consists in the % character, followed by optional modifiers and a type which is made of one or two characters.

    The types and their meanings are:

    • d, i: convert an integer argument to signed decimal. The flag # adds underscores to large values for readability.
    • u, n, l, L, or N: convert an integer argument to unsigned decimal. Warning: n, l, L, and N are used for scanf, and should not be used for printf. The flag # adds underscores to large values for readability.
    • x: convert an integer argument to unsigned hexadecimal, using lowercase letters. The flag # adds a 0x prefix to non zero values.
    • X: convert an integer argument to unsigned hexadecimal, using uppercase letters. The flag # adds a 0X prefix to non zero values.
    • o: convert an integer argument to unsigned octal. The flag # adds a 0 prefix to non zero values.
    • s: insert a string argument.
    • S: convert a string argument to OCaml syntax (double quotes, escapes).
    • c: insert a character argument.
    • C: convert a character argument to OCaml syntax (single quotes, escapes).
    • f: convert a floating-point argument to decimal notation, in the style dddd.ddd.
    • F: convert a floating-point argument to OCaml syntax (dddd. or dddd.ddd or d.ddd e+-dd). Converts to hexadecimal with the # flag (see h).
    • e or E: convert a floating-point argument to decimal notation, in the style d.ddd e+-dd (mantissa and exponent).
    • g or G: convert a floating-point argument to decimal notation, in style f or e, E (whichever is more compact). Moreover, any trailing zeros are removed from the fractional part of the result and the decimal-point character is removed if there is no fractional part remaining.
    • h or H: convert a floating-point argument to hexadecimal notation, in the style 0xh.hhhh p+-dd (hexadecimal mantissa, exponent in decimal and denotes a power of 2).
    • B: convert a boolean argument to the string true or false
    • b: convert a boolean argument (deprecated; do not use in new programs).
    • ld, li, lu, lx, lX, lo: convert an int32 argument to the format specified by the second letter (decimal, hexadecimal, etc).
    • nd, ni, nu, nx, nX, no: convert a nativeint argument to the format specified by the second letter.
    • Ld, Li, Lu, Lx, LX, Lo: convert an int64 argument to the format specified by the second letter.
    • a: user-defined printer. Take two arguments and apply the first one to outchan (the current output channel) and to the second argument. The first argument must therefore have type out_channel -> 'b -> unit and the second 'b. The output produced by the function is inserted in the output of fprintf at the current point.
    • t: same as %a, but take only one argument (with type out_channel -> unit) and apply it to outchan.
    • \{ fmt %\}: convert a format string argument to its type digest. The argument must have the same type as the internal format string fmt.
    • ( fmt %): format string substitution. Take a format string argument and substitute it to the internal format string fmt to print following arguments. The argument must have the same type as the internal format string fmt.
    • !: take no argument and flush the output.
    • %: take no argument and output one % character.
    • \@: take no argument and output one \@ character.
    • ,: take no argument and output nothing: a no-op delimiter for conversion specifications.

    The optional flags are:

    • -: left-justify the output (default is right justification).
    • 0: for numerical conversions, pad with zeroes instead of spaces.
    • +: for signed numerical conversions, prefix number with a + sign if positive.
    • space: for signed numerical conversions, prefix number with a space if positive.
    • #: request an alternate formatting style for the integer types and the floating-point type F.

    The optional width is an integer indicating the minimal width of the result. For instance, %6d prints an integer, prefixing it with spaces to fill at least 6 characters.

    The optional precision is a dot . followed by an integer indicating how many digits follow the decimal point in the %f, %e, %E, %h, and %H conversions or the maximum number of significant digits to appear for the %F, %g and %G conversions. For instance, %.4f prints a float with 4 fractional digits.

    The integer in a width or precision can also be specified as *, in which case an extra integer argument is taken to specify the corresponding width or precision. This integer argument precedes immediately the argument to print. For instance, %.*f prints a float with as many fractional digits as the value of the argument given before the float.

    val printf : ('a, out_channel, unit) format -> 'a

    Same as Printf.fprintf, but output on stdout.

    val eprintf : ('a, out_channel, unit) format -> 'a

    Same as Printf.fprintf, but output on stderr.

    val sprintf : ('a, unit, string) format -> 'a

    Same as Printf.fprintf, but instead of printing on an output channel, return a string containing the result of formatting the arguments.

    val bprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

    Same as Printf.fprintf, but instead of printing on an output channel, append the formatted arguments to the given extensible buffer (see module Buffer).

    val ifprintf : 'b -> ('a, 'b, 'c, unit) format4 -> 'a

    Same as Printf.fprintf, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 3.10
    val ibprintf : Buffer.t -> ('a, Buffer.t, unit) format -> 'a

    Same as Printf.bprintf, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 4.11

    Formatted output functions with continuations.

    val kfprintf : (out_channel -> 'd) -> out_channel -> ('a, out_channel, unit, 'd) format4 -> @@ -11,4 +11,4 @@ (Buffer.t -> 'd) -> Buffer.t -> ('a, Buffer.t, unit, 'd) format4 -> - 'a

    Same as kbprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 4.11

    Deprecated

    val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

    A deprecated synonym for ksprintf.

    • deprecated Use Printf.ksprintf instead.
    \ No newline at end of file + 'a

    Same as kbprintf above, but does not print anything. Useful to ignore some material when conditionally printing.

    • since 4.11

    Deprecated

    val kprintf : (string -> 'b) -> ('a, unit, string, 'b) format4 -> 'a

    A deprecated synonym for ksprintf.

    • deprecated Use Printf.ksprintf instead.
    diff --git a/ocaml/Stdlib/Queue/index.html b/ocaml/Stdlib/Queue/index.html index 454539b..07a254d 100644 --- a/ocaml/Stdlib/Queue/index.html +++ b/ocaml/Stdlib/Queue/index.html @@ -1,5 +1,5 @@ -Queue (ocaml.Stdlib.Queue)

    Module Stdlib.Queue

    First-in first-out queues.

    This module implements queues (FIFOs), with in-place modification. See the example section below.

    Unsynchronized accesses

    Unsynchronized accesses to a queue may lead to an invalid queue state. Thus, concurrent accesses to queues must be synchronized (for instance with a Mutex.t).

    type !'a t

    The type of queues containing elements of type 'a.

    exception Empty

    Raised when Queue.take or Queue.peek is applied to an empty queue.

    val create : unit -> 'a t

    Return a new queue, initially empty.

    val add : 'a -> 'a t -> unit

    add x q adds the element x at the end of the queue q.

    val push : 'a -> 'a t -> unit

    push is a synonym for add.

    val take : 'a t -> 'a

    take q removes and returns the first element in queue q, or raises Empty if the queue is empty.

    val take_opt : 'a t -> 'a option

    take_opt q removes and returns the first element in queue q, or returns None if the queue is empty.

    • since 4.08
    val pop : 'a t -> 'a

    pop is a synonym for take.

    val peek : 'a t -> 'a

    peek q returns the first element in queue q, without removing it from the queue, or raises Empty if the queue is empty.

    val peek_opt : 'a t -> 'a option

    peek_opt q returns the first element in queue q, without removing it from the queue, or returns None if the queue is empty.

    • since 4.08
    val top : 'a t -> 'a

    top is a synonym for peek.

    val clear : 'a t -> unit

    Discard all elements from a queue.

    val copy : 'a t -> 'a t

    Return a copy of the given queue.

    val is_empty : 'a t -> bool

    Return true if the given queue is empty, false otherwise.

    val length : 'a t -> int

    Return the number of elements in a queue.

    val iter : ('a -> unit) -> 'a t -> unit

    iter f q applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

    val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold f accu q is equivalent to List.fold_left f accu l, where l is the list of q's elements. The queue remains unchanged.

    val transfer : 'a t -> 'a t -> unit

    transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence iter (fun x -> add x q2) q1; clear q1, but runs in constant time.

    Iterators

    val to_seq : 'a t -> 'a Seq.t

    Iterate on the queue, in front-to-back order. The behavior is not specified if the queue is modified during the iteration.

    • since 4.07
    val add_seq : 'a t -> 'a Seq.t -> unit

    Add the elements from a sequence to the end of the queue.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a t

    Create a queue from a sequence.

    • since 4.07

    Examples

    Basic Example

    A basic example:

    # let q = Queue.create ()
    +Queue (ocaml.Stdlib.Queue)

    Module Stdlib.Queue

    First-in first-out queues.

    This module implements queues (FIFOs), with in-place modification. See the example section below.

    Unsynchronized accesses

    Unsynchronized accesses to a queue may lead to an invalid queue state. Thus, concurrent accesses to queues must be synchronized (for instance with a Mutex.t).

    type !'a t

    The type of queues containing elements of type 'a.

    exception Empty

    Raised when Queue.take or Queue.peek is applied to an empty queue.

    val create : unit -> 'a t

    Return a new queue, initially empty.

    val add : 'a -> 'a t -> unit

    add x q adds the element x at the end of the queue q.

    val push : 'a -> 'a t -> unit

    push is a synonym for add.

    val take : 'a t -> 'a

    take q removes and returns the first element in queue q, or raises Empty if the queue is empty.

    val take_opt : 'a t -> 'a option

    take_opt q removes and returns the first element in queue q, or returns None if the queue is empty.

    • since 4.08
    val pop : 'a t -> 'a

    pop is a synonym for take.

    val peek : 'a t -> 'a

    peek q returns the first element in queue q, without removing it from the queue, or raises Empty if the queue is empty.

    val peek_opt : 'a t -> 'a option

    peek_opt q returns the first element in queue q, without removing it from the queue, or returns None if the queue is empty.

    • since 4.08
    val top : 'a t -> 'a

    top is a synonym for peek.

    val clear : 'a t -> unit

    Discard all elements from a queue.

    val copy : 'a t -> 'a t

    Return a copy of the given queue.

    val is_empty : 'a t -> bool

    Return true if the given queue is empty, false otherwise.

    val length : 'a t -> int

    Return the number of elements in a queue.

    val iter : ('a -> unit) -> 'a t -> unit

    iter f q applies f in turn to all elements of q, from the least recently entered to the most recently entered. The queue itself is unchanged.

    val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold f accu q is equivalent to List.fold_left f accu l, where l is the list of q's elements. The queue remains unchanged.

    val transfer : 'a t -> 'a t -> unit

    transfer q1 q2 adds all of q1's elements at the end of the queue q2, then clears q1. It is equivalent to the sequence iter (fun x -> add x q2) q1; clear q1, but runs in constant time.

    Iterators

    val to_seq : 'a t -> 'a Seq.t

    Iterate on the queue, in front-to-back order. The behavior is not specified if the queue is modified during the iteration.

    • since 4.07
    val add_seq : 'a t -> 'a Seq.t -> unit

    Add the elements from a sequence to the end of the queue.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a t

    Create a queue from a sequence.

    • since 4.07

    Examples

    Basic Example

    A basic example:

    # let q = Queue.create ()
     val q : '_weak1 Queue.t = <abstr>
     
     
    @@ -19,60 +19,60 @@ val q : '_weak1 Queue.t = <abstr>
     - : int = 3
     
     # Queue.pop q
    -Exception: Stdlib.Queue.Empty.

    Search Through a Graph

    For a more elaborate example, a classic algorithmic use of queues is to implement a BFS (breadth-first search) through a graph.

     type graph = {
    -   edges: (int, int list) Hashtbl.t
    - }
    +Exception: Stdlib.Queue.Empty.

    Search Through a Graph

    For a more elaborate example, a classic algorithmic use of queues is to implement a BFS (breadth-first search) through a graph.

      type graph = {
    +    edges: (int, int list) Hashtbl.t
    +  }
     
    -(* Search in graph [g] using BFS, starting from node [start].
    -   It returns the first node that satisfies [p], or [None] if
    -   no node reachable from [start] satisfies [p].
    -*)
    -let search_for ~(g:graph) ~(start:int) (p:int -> bool) : int option =
    -  let to_explore = Queue.create() in
    -  let explored = Hashtbl.create 16 in
    + (* Search in graph [g] using BFS, starting from node [start].
    +    It returns the first node that satisfies [p], or [None] if
    +    no node reachable from [start] satisfies [p].
    + *)
    + let search_for ~(g:graph) ~(start:int) (p:int -> bool) : int option =
    +   let to_explore = Queue.create() in
    +   let explored = Hashtbl.create 16 in
     
    -  Queue.push start to_explore;
    -  let rec loop () =
    -    if Queue.is_empty to_explore then None
    -    else
    -      (* node to explore *)
    -      let node = Queue.pop to_explore in
    -      explore_node node
    +   Queue.push start to_explore;
    +   let rec loop () =
    +     if Queue.is_empty to_explore then None
    +     else
    +       (* node to explore *)
    +       let node = Queue.pop to_explore in
    +       explore_node node
     
    -  and explore_node node =
    -    if not (Hashtbl.mem explored node) then (
    -      if p node then Some node (* found *)
    -      else (
    -        Hashtbl.add explored node ();
    -        let children =
    -          Hashtbl.find_opt g.edges node
    -          |> Option.value ~default:[]
    -        in
    -        List.iter (fun child -> Queue.push child to_explore) children;
    -        loop()
    -      )
    -    ) else loop()
    -  in
    -  loop()
    +   and explore_node node =
    +     if not (Hashtbl.mem explored node) then (
    +       if p node then Some node (* found *)
    +       else (
    +         Hashtbl.add explored node ();
    +         let children =
    +           Hashtbl.find_opt g.edges node
    +           |> Option.value ~default:[]
    +         in
    +         List.iter (fun child -> Queue.push child to_explore) children;
    +         loop()
    +       )
    +     ) else loop()
    +   in
    +   loop()
     
    -(* a sample graph *)
    -let my_graph: graph =
    -  let edges =
    -    List.to_seq [
    -      1, [2;3];
    -      2, [10; 11];
    -      3, [4;5];
    -      5, [100];
    -      11, [0; 20];
    -    ]
    -    |> Hashtbl.of_seq
    -  in {edges}
    + (* a sample graph *)
    + let my_graph: graph =
    +   let edges =
    +     List.to_seq [
    +       1, [2;3];
    +       2, [10; 11];
    +       3, [4;5];
    +       5, [100];
    +       11, [0; 20];
    +     ]
    +     |> Hashtbl.of_seq
    +   in {edges}
     
    -# search_for ~g:my_graph ~start:1 (fun x -> x = 30)
    -- : int option = None
    + # search_for ~g:my_graph ~start:1 (fun x -> x = 30)
    + - : int option = None
     
    -# search_for ~g:my_graph ~start:1 (fun x -> x >= 15)
    -- : int option = Some 20
    + # search_for ~g:my_graph ~start:1 (fun x -> x >= 15)
    + - : int option = Some 20
     
    -# search_for ~g:my_graph ~start:1 (fun x -> x >= 50)
    -- : int option = Some 100
    \ No newline at end of file + # search_for ~g:my_graph ~start:1 (fun x -> x >= 50) + - : int option = Some 100
    diff --git a/ocaml/Stdlib/Random/State/index.html b/ocaml/Stdlib/Random/State/index.html index ff7fd99..b1b322a 100644 --- a/ocaml/Stdlib/Random/State/index.html +++ b/ocaml/Stdlib/Random/State/index.html @@ -1,2 +1,2 @@ -State (ocaml.Stdlib.Random.State)

    Module Random.State

    type t

    The type of PRNG states.

    val make : int array -> t

    Create a new state and initialize it with the given seed.

    val make_self_init : unit -> t

    Create a new state and initialize it with a random seed chosen in a system-dependent way. The seed is obtained as described in Random.self_init.

    val copy : t -> t

    Return a copy of the given state.

    val bits : t -> int
    val int : t -> int -> int
    val full_int : t -> int -> int
    val int32 : t -> Int32.t -> Int32.t
    val nativeint : t -> Nativeint.t -> Nativeint.t
    val int64 : t -> Int64.t -> Int64.t
    val float : t -> float -> float
    val bool : t -> bool
    val bits32 : t -> Int32.t
    val bits64 : t -> Int64.t
    val nativebits : t -> Nativeint.t

    These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.

    val split : t -> t

    Draw a fresh PRNG state from the given PRNG state. (The given PRNG state is modified.) The new PRNG is statistically independent from the given PRNG. Data can be drawn from both PRNGs, in any order, without risk of correlation. Both PRNGs can be split later, arbitrarily many times.

    • since 5.0
    val to_binary_string : t -> string

    Serializes the PRNG state into an immutable sequence of bytes. See of_binary_string for deserialization.

    The string type is intended here for serialization only, the encoding is not human-readable and may not be printable.

    Note that the serialization format may differ across OCaml versions.

    • since 5.1
    val of_binary_string : string -> t

    Deserializes a byte sequence obtained by calling to_binary_string. The resulting PRNG state will produce the same random numbers as the state that was passed as input to to_binary_string.

    • raises Failure

      if the input is not in the expected format.

      Note that the serialization format may differ across OCaml versions.

      Unlike the functions provided by the Marshal module, this function either produces a valid state or fails cleanly with a Failure exception. It can be safely used on user-provided, untrusted inputs.

    • since 5.1
    \ No newline at end of file +State (ocaml.Stdlib.Random.State)

    Module Random.State

    type t

    The type of PRNG states.

    val make : int array -> t

    Create a new state and initialize it with the given seed.

    val make_self_init : unit -> t

    Create a new state and initialize it with a random seed chosen in a system-dependent way. The seed is obtained as described in Random.self_init.

    val copy : t -> t

    Return a copy of the given state.

    val bits : t -> int
    val int : t -> int -> int
    val full_int : t -> int -> int
    val int32 : t -> Int32.t -> Int32.t
    val nativeint : t -> Nativeint.t -> Nativeint.t
    val int64 : t -> Int64.t -> Int64.t
    val float : t -> float -> float
    val bool : t -> bool
    val bits32 : t -> Int32.t
    val bits64 : t -> Int64.t
    val nativebits : t -> Nativeint.t

    These functions are the same as the basic functions, except that they use (and update) the given PRNG state instead of the default one.

    val split : t -> t

    Draw a fresh PRNG state from the given PRNG state. (The given PRNG state is modified.) The new PRNG is statistically independent from the given PRNG. Data can be drawn from both PRNGs, in any order, without risk of correlation. Both PRNGs can be split later, arbitrarily many times.

    • since 5.0
    val to_binary_string : t -> string

    Serializes the PRNG state into an immutable sequence of bytes. See of_binary_string for deserialization.

    The string type is intended here for serialization only, the encoding is not human-readable and may not be printable.

    Note that the serialization format may differ across OCaml versions.

    • since 5.1
    val of_binary_string : string -> t

    Deserializes a byte sequence obtained by calling to_binary_string. The resulting PRNG state will produce the same random numbers as the state that was passed as input to to_binary_string.

    • raises Failure

      if the input is not in the expected format.

    Note that the serialization format may differ across OCaml versions.

    Unlike the functions provided by the Marshal module, this function either produces a valid state or fails cleanly with a Failure exception. It can be safely used on user-provided, untrusted inputs.

    • since 5.1
    diff --git a/ocaml/Stdlib/Random/index.html b/ocaml/Stdlib/Random/index.html index ea1d67e..d501b73 100644 --- a/ocaml/Stdlib/Random/index.html +++ b/ocaml/Stdlib/Random/index.html @@ -1,2 +1,2 @@ -Random (ocaml.Stdlib.Random)

    Module Stdlib.Random

    Pseudo-random number generators (PRNG).

    With multiple domains, each domain has its own generator that evolves independently of the generators of other domains. When a domain is created, its generator is initialized by splitting the state of the generator associated with the parent domain.

    In contrast, all threads within a domain share the same domain-local generator. Independent generators can be created with the Random.split function and used with the functions from the Random.State module.

    Basic functions

    val init : int -> unit

    Initialize the domain-local generator, using the argument as a seed. The same seed will always yield the same sequence of numbers.

    val full_init : int array -> unit

    Same as Random.init but takes more data as seed.

    val self_init : unit -> unit

    Initialize the domain-local generator with a random seed chosen in a system-dependent way. If /dev/urandom is available on the host machine, it is used to provide a highly random initial seed. Otherwise, a less random seed is computed from system parameters (current time, process IDs, domain-local state).

    val bits : unit -> int

    Return 30 random bits in a nonnegative integer.

    • before 5.0

      used a different algorithm (affects all the following functions)

    val int : int -> int

    Random.int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

    val full_int : int -> int

    Random.full_int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound may be any positive integer.

    If bound is less than 230, Random.full_int bound is equal to Random.int bound. If bound is greater than 230 (on 64-bit systems or non-standard environments, such as JavaScript), Random.full_int returns a value, where Random.int raises Stdlib.Invalid_argument.

    • since 4.13
    val int32 : Int32.t -> Int32.t

    Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val nativeint : Nativeint.t -> Nativeint.t

    Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val int64 : Int64.t -> Int64.t

    Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val float : float -> float

    Random.float bound returns a random floating-point number between 0 and bound (inclusive). If bound is negative, the result is negative or zero. If bound is 0, the result is 0.

    val bool : unit -> bool

    Random.bool () returns true or false with probability 0.5 each.

    val bits32 : unit -> Int32.t

    Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

    • since 4.14
    val bits64 : unit -> Int64.t

    Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

    • since 4.14
    val nativebits : unit -> Nativeint.t

    Random.nativebits () returns 32 or 64 random bits (depending on the bit width of the platform) as an integer between Nativeint.min_int and Nativeint.max_int.

    • since 4.14

    Advanced functions

    The functions from module State manipulate the current state of the random generator explicitly. This allows using one or several deterministic PRNGs, even in a multi-threaded program, without interference from other parts of the program.

    module State : sig ... end
    val get_state : unit -> State.t

    get_state() returns a fresh copy of the current state of the domain-local generator (which is used by the basic functions).

    val set_state : State.t -> unit

    set_state s updates the current state of the domain-local generator (which is used by the basic functions) by copying the state s into it.

    val split : unit -> State.t

    Draw a fresh PRNG state from the current state of the domain-local generator used by the default functions. (The state of the domain-local generator is modified.) See Random.State.split.

    • since 5.0
    \ No newline at end of file +Random (ocaml.Stdlib.Random)

    Module Stdlib.Random

    Pseudo-random number generators (PRNG).

    With multiple domains, each domain has its own generator that evolves independently of the generators of other domains. When a domain is created, its generator is initialized by splitting the state of the generator associated with the parent domain.

    In contrast, all threads within a domain share the same domain-local generator. Independent generators can be created with the Random.split function and used with the functions from the Random.State module.

    Basic functions

    val init : int -> unit

    Initialize the domain-local generator, using the argument as a seed. The same seed will always yield the same sequence of numbers.

    val full_init : int array -> unit

    Same as Random.init but takes more data as seed.

    val self_init : unit -> unit

    Initialize the domain-local generator with a random seed chosen in a system-dependent way. If /dev/urandom is available on the host machine, it is used to provide a highly random initial seed. Otherwise, a less random seed is computed from system parameters (current time, process IDs, domain-local state).

    val bits : unit -> int

    Return 30 random bits in a nonnegative integer.

    • before 5.0

      used a different algorithm (affects all the following functions)

    val int : int -> int

    Random.int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0 and less than 230.

    val full_int : int -> int

    Random.full_int bound returns a random integer between 0 (inclusive) and bound (exclusive). bound may be any positive integer.

    If bound is less than 230, Random.full_int bound is equal to Random.int bound. If bound is greater than 230 (on 64-bit systems or non-standard environments, such as JavaScript), Random.full_int returns a value, where Random.int raises Stdlib.Invalid_argument.

    • since 4.13
    val int32 : Int32.t -> Int32.t

    Random.int32 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val nativeint : Nativeint.t -> Nativeint.t

    Random.nativeint bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val int64 : Int64.t -> Int64.t

    Random.int64 bound returns a random integer between 0 (inclusive) and bound (exclusive). bound must be greater than 0.

    val float : float -> float

    Random.float bound returns a random floating-point number between 0 and bound (inclusive). If bound is negative, the result is negative or zero. If bound is 0, the result is 0.

    val bool : unit -> bool

    Random.bool () returns true or false with probability 0.5 each.

    val bits32 : unit -> Int32.t

    Random.bits32 () returns 32 random bits as an integer between Int32.min_int and Int32.max_int.

    • since 4.14
    val bits64 : unit -> Int64.t

    Random.bits64 () returns 64 random bits as an integer between Int64.min_int and Int64.max_int.

    • since 4.14
    val nativebits : unit -> Nativeint.t

    Random.nativebits () returns 32 or 64 random bits (depending on the bit width of the platform) as an integer between Nativeint.min_int and Nativeint.max_int.

    • since 4.14

    Advanced functions

    The functions from module State manipulate the current state of the random generator explicitly. This allows using one or several deterministic PRNGs, even in a multi-threaded program, without interference from other parts of the program.

    module State : sig ... end
    val get_state : unit -> State.t

    get_state() returns a fresh copy of the current state of the domain-local generator (which is used by the basic functions).

    val set_state : State.t -> unit

    set_state s updates the current state of the domain-local generator (which is used by the basic functions) by copying the state s into it.

    val split : unit -> State.t

    Draw a fresh PRNG state from the current state of the domain-local generator used by the default functions. (The state of the domain-local generator is modified.) See Random.State.split.

    • since 5.0
    diff --git a/ocaml/Stdlib/Result/index.html b/ocaml/Stdlib/Result/index.html index bb27275..611b776 100644 --- a/ocaml/Stdlib/Result/index.html +++ b/ocaml/Stdlib/Result/index.html @@ -1,12 +1,12 @@ -Result (ocaml.Stdlib.Result)

    Module Stdlib.Result

    Result values.

    Result values handle computation results and errors in an explicit and declarative manner without resorting to exceptions.

    • since 4.08

    Results

    type ('a, 'e) t = ('a, 'e) result =
    1. | Ok of 'a
    2. | Error of 'e

    The type for result values. Either a value Ok v or an error Error e.

    val ok : 'a -> ('a, 'e) result

    ok v is Ok v.

    val error : 'e -> ('a, 'e) result

    error e is Error e.

    val value : ('a, 'e) result -> default:'a -> 'a

    value r ~default is v if r is Ok v and default otherwise.

    val get_ok : ('a, 'e) result -> 'a

    get_ok r is v if r is Ok v and raise otherwise.

    • raises Invalid_argument

      if r is Error _.

    val get_error : ('a, 'e) result -> 'e

    get_error r is e if r is Error e and raise otherwise.

    • raises Invalid_argument

      if r is Ok _.

    val bind : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result

    bind r f is f v if r is Ok v and r if r is Error _.

    val join : (('a, 'e) result, 'e) result -> ('a, 'e) result

    join rr is r if rr is Ok r and rr if rr is Error _.

    val map : ('a -> 'b) -> ('a, 'e) result -> ('b, 'e) result

    map f r is Ok (f v) if r is Ok v and r if r is Error _.

    val map_error : ('e -> 'f) -> ('a, 'e) result -> ('a, 'f) result

    map_error f r is Error (f e) if r is Error e and r if r is Ok _.

    val fold : ok:('a -> 'c) -> error:('e -> 'c) -> ('a, 'e) result -> 'c

    fold ~ok ~error r is ok v if r is Ok v and error e if r is Error e.

    val iter : ('a -> unit) -> ('a, 'e) result -> unit

    iter f r is f v if r is Ok v and () otherwise.

    val iter_error : ('e -> unit) -> ('a, 'e) result -> unit

    iter_error f r is f e if r is Error e and () otherwise.

    Predicates and comparisons

    val is_ok : ('a, 'e) result -> bool

    is_ok r is true if and only if r is Ok _.

    val is_error : ('a, 'e) result -> bool

    is_error r is true if and only if r is Error _.

    val equal : - ok:('a -> 'a -> bool) -> - error:('e -> 'e -> bool) -> +Result (ocaml.Stdlib.Result)

    Module Stdlib.Result

    Result values.

    Result values handle computation results and errors in an explicit and declarative manner without resorting to exceptions.

    • since 4.08

    Results

    type ('a, 'e) t = ('a, 'e) result =
    1. | Ok of 'a
    2. | Error of 'e

    The type for result values. Either a value Ok v or an error Error e.

    val ok : 'a -> ('a, 'e) result

    ok v is Ok v.

    val error : 'e -> ('a, 'e) result

    error e is Error e.

    val value : ('a, 'e) result -> default:'a -> 'a

    value r ~default is v if r is Ok v and default otherwise.

    val get_ok : ('a, 'e) result -> 'a

    get_ok r is v if r is Ok v and raise otherwise.

    val get_error : ('a, 'e) result -> 'e

    get_error r is e if r is Error e and raise otherwise.

    val bind : ('a, 'e) result -> ('a -> ('b, 'e) result) -> ('b, 'e) result

    bind r f is f v if r is Ok v and r if r is Error _.

    val join : (('a, 'e) result, 'e) result -> ('a, 'e) result

    join rr is r if rr is Ok r and rr if rr is Error _.

    val map : ('a -> 'b) -> ('a, 'e) result -> ('b, 'e) result

    map f r is Ok (f v) if r is Ok v and r if r is Error _.

    val map_error : ('e -> 'f) -> ('a, 'e) result -> ('a, 'f) result

    map_error f r is Error (f e) if r is Error e and r if r is Ok _.

    val fold : ok:('a -> 'c) -> error:('e -> 'c) -> ('a, 'e) result -> 'c

    fold ~ok ~error r is ok v if r is Ok v and error e if r is Error e.

    val iter : ('a -> unit) -> ('a, 'e) result -> unit

    iter f r is f v if r is Ok v and () otherwise.

    val iter_error : ('e -> unit) -> ('a, 'e) result -> unit

    iter_error f r is f e if r is Error e and () otherwise.

    Predicates and comparisons

    val is_ok : ('a, 'e) result -> bool

    is_ok r is true if and only if r is Ok _.

    val is_error : ('a, 'e) result -> bool

    is_error r is true if and only if r is Error _.

    val equal : + ok:('a -> 'a -> bool) -> + error:('e -> 'e -> bool) -> ('a, 'e) result -> ('a, 'e) result -> bool

    equal ~ok ~error r0 r1 tests equality of r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _.

    val compare : - ok:('a -> 'a -> int) -> - error:('e -> 'e -> int) -> + ok:('a -> 'a -> int) -> + error:('e -> 'e -> int) -> ('a, 'e) result -> ('a, 'e) result -> - int

    compare ~ok ~error r0 r1 totally orders r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _. Ok _ values are smaller than Error _ values.

    Converting

    val to_option : ('a, 'e) result -> 'a option

    to_option r is r as an option, mapping Ok v to Some v and Error _ to None.

    val to_list : ('a, 'e) result -> 'a list

    to_list r is [v] if r is Ok v and [] otherwise.

    val to_seq : ('a, 'e) result -> 'a Seq.t

    to_seq r is r as a sequence. Ok v is the singleton sequence containing v and Error _ is the empty sequence.

    \ No newline at end of file + int

    compare ~ok ~error r0 r1 totally orders r0 and r1 using ok and error to respectively compare values wrapped by Ok _ and Error _. Ok _ values are smaller than Error _ values.

    Converting

    val to_option : ('a, 'e) result -> 'a option

    to_option r is r as an option, mapping Ok v to Some v and Error _ to None.

    val to_list : ('a, 'e) result -> 'a list

    to_list r is [v] if r is Ok v and [] otherwise.

    val to_seq : ('a, 'e) result -> 'a Seq.t

    to_seq r is r as a sequence. Ok v is the singleton sequence containing v and Error _ is the empty sequence.

    diff --git a/ocaml/Stdlib/Scanf/Scanning/index.html b/ocaml/Stdlib/Scanf/Scanning/index.html index 3887833..388bf02 100644 --- a/ocaml/Stdlib/Scanf/Scanning/index.html +++ b/ocaml/Stdlib/Scanf/Scanning/index.html @@ -1,2 +1,2 @@ -Scanning (ocaml.Stdlib.Scanf.Scanning)

    Module Scanf.Scanning

    type in_channel

    The notion of input channel for the Scanf module: those channels provide all the machinery necessary to read from any source of characters, including a Stdlib.in_channel value. A Scanf.Scanning.in_channel value is also called a formatted input channel or equivalently a scanning buffer. The type Scanning.scanbuf below is an alias for Scanning.in_channel. Note that a Scanning.in_channel is not concurrency-safe: concurrent use may produce arbitrary values or exceptions.

    • since 3.12
    type scanbuf = in_channel

    The type of scanning buffers. A scanning buffer is the source from which a formatted input function gets characters. The scanning buffer holds the current state of the scan, plus a function to get the next char from the input, and a token buffer to store the string matched so far.

    Note: a scanning action may often require to examine one character in advance; when this 'lookahead' character does not belong to the token read, it is stored back in the scanning buffer and becomes the next character yet to be read.

    val stdin : in_channel

    The standard input notion for the Scanf module. Scanning.stdin is the Scanning.in_channel formatted input channel attached to Stdlib.stdin.

    Note: in the interactive system, when input is read from Stdlib.stdin, the newline character that triggers evaluation is part of the input; thus, the scanning specifications must properly skip this additional newline character (for instance, simply add a '\n' as the last character of the format string).

    • since 3.12
    type file_name = string

    A convenient alias to designate a file name.

    • since 4.00
    val open_in : file_name -> in_channel

    Scanning.open_in fname returns a Scanning.in_channel formatted input channel for bufferized reading in text mode from file fname.

    Note: open_in returns a formatted input channel that efficiently reads characters in large chunks; in contrast, from_channel below returns formatted input channels that must read one character at a time, leading to a much slower scanning rate.

    • since 3.12
    val open_in_bin : file_name -> in_channel

    Scanning.open_in_bin fname returns a Scanning.in_channel formatted input channel for bufferized reading in binary mode from file fname.

    • since 3.12
    val close_in : in_channel -> unit

    Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

    • since 3.12
    val from_file : file_name -> in_channel

    An alias for Scanning.open_in above.

    val from_file_bin : string -> in_channel

    An alias for Scanning.open_in_bin above.

    val from_string : string -> in_channel

    Scanning.from_string s returns a Scanning.in_channel formatted input channel which reads from the given string. Reading starts from the first character in the string. The end-of-input condition is set when the end of the string is reached.

    val from_function : (unit -> char) -> in_channel

    Scanning.from_function f returns a Scanning.in_channel formatted input channel with the given function as its reading method.

    When scanning needs one more character, the given function is called.

    When the function has no more character to provide, it must signal an end-of-input condition by raising the exception End_of_file.

    val from_channel : in_channel -> in_channel

    Scanning.from_channel ic returns a Scanning.in_channel formatted input channel which reads from the regular Stdlib.in_channel input channel ic argument. Reading starts at current reading position of ic.

    val end_of_input : in_channel -> bool

    Scanning.end_of_input ic tests the end-of-input condition of the given Scanning.in_channel formatted input channel.

    val beginning_of_input : in_channel -> bool

    Scanning.beginning_of_input ic tests the beginning of input condition of the given Scanning.in_channel formatted input channel.

    val name_of_input : in_channel -> string

    Scanning.name_of_input ic returns the name of the character source for the given Scanning.in_channel formatted input channel.

    • since 3.09
    \ No newline at end of file +Scanning (ocaml.Stdlib.Scanf.Scanning)

    Module Scanf.Scanning

    type in_channel

    The notion of input channel for the Scanf module: those channels provide all the machinery necessary to read from any source of characters, including a Stdlib.in_channel value. A Scanf.Scanning.in_channel value is also called a formatted input channel or equivalently a scanning buffer. The type Scanning.scanbuf below is an alias for Scanning.in_channel. Note that a Scanning.in_channel is not concurrency-safe: concurrent use may produce arbitrary values or exceptions.

    • since 3.12
    type scanbuf = in_channel

    The type of scanning buffers. A scanning buffer is the source from which a formatted input function gets characters. The scanning buffer holds the current state of the scan, plus a function to get the next char from the input, and a token buffer to store the string matched so far.

    Note: a scanning action may often require to examine one character in advance; when this 'lookahead' character does not belong to the token read, it is stored back in the scanning buffer and becomes the next character yet to be read.

    val stdin : in_channel

    The standard input notion for the Scanf module. Scanning.stdin is the Scanning.in_channel formatted input channel attached to Stdlib.stdin.

    Note: in the interactive system, when input is read from Stdlib.stdin, the newline character that triggers evaluation is part of the input; thus, the scanning specifications must properly skip this additional newline character (for instance, simply add a '\n' as the last character of the format string).

    • since 3.12
    type file_name = string

    A convenient alias to designate a file name.

    • since 4.00
    val open_in : file_name -> in_channel

    Scanning.open_in fname returns a Scanning.in_channel formatted input channel for bufferized reading in text mode from file fname.

    Note: open_in returns a formatted input channel that efficiently reads characters in large chunks; in contrast, from_channel below returns formatted input channels that must read one character at a time, leading to a much slower scanning rate.

    • since 3.12
    val open_in_bin : file_name -> in_channel

    Scanning.open_in_bin fname returns a Scanning.in_channel formatted input channel for bufferized reading in binary mode from file fname.

    • since 3.12
    val close_in : in_channel -> unit

    Closes the Stdlib.in_channel associated with the given Scanning.in_channel formatted input channel.

    • since 3.12
    val from_file : file_name -> in_channel

    An alias for Scanning.open_in above.

    val from_file_bin : string -> in_channel

    An alias for Scanning.open_in_bin above.

    val from_string : string -> in_channel

    Scanning.from_string s returns a Scanning.in_channel formatted input channel which reads from the given string. Reading starts from the first character in the string. The end-of-input condition is set when the end of the string is reached.

    val from_function : (unit -> char) -> in_channel

    Scanning.from_function f returns a Scanning.in_channel formatted input channel with the given function as its reading method.

    When scanning needs one more character, the given function is called.

    When the function has no more character to provide, it must signal an end-of-input condition by raising the exception End_of_file.

    val from_channel : in_channel -> in_channel

    Scanning.from_channel ic returns a Scanning.in_channel formatted input channel which reads from the regular Stdlib.in_channel input channel ic argument. Reading starts at current reading position of ic.

    val end_of_input : in_channel -> bool

    Scanning.end_of_input ic tests the end-of-input condition of the given Scanning.in_channel formatted input channel.

    val beginning_of_input : in_channel -> bool

    Scanning.beginning_of_input ic tests the beginning of input condition of the given Scanning.in_channel formatted input channel.

    val name_of_input : in_channel -> string

    Scanning.name_of_input ic returns the name of the character source for the given Scanning.in_channel formatted input channel.

    • since 3.09
    diff --git a/ocaml/Stdlib/Scanf/index.html b/ocaml/Stdlib/Scanf/index.html index 4abe687..55db925 100644 --- a/ocaml/Stdlib/Scanf/index.html +++ b/ocaml/Stdlib/Scanf/index.html @@ -1,12 +1,9 @@ -Scanf (ocaml.Stdlib.Scanf)

    Module Stdlib.Scanf

    Formatted input functions.

    Introduction

    Functional input with format strings

    The module Scanf provides formatted input functions or scanners.

    The formatted input functions can read from any kind of input, including strings, files, or anything that can return characters. The more general source of characters is named a formatted input channel (or scanning buffer) and has type Scanning.in_channel. The more general formatted input function reads from any scanning buffer and is named bscanf.

    Generally speaking, the formatted input functions have 3 arguments:

    • the first argument is a source of characters for the input,
    • the second argument is a format string that specifies the values to read,
    • the third argument is a receiver function that is applied to the values read.

    Hence, a typical call to the formatted input function Scanf.bscanf is bscanf ic fmt f, where:

    • ic is a source of characters (typically a formatted input channel with type Scanning.in_channel),
    • fmt is a format string (the same format strings as those used to print material with module Printf or Format),
    • f is a function that has as many arguments as the number of values to read in the input according to fmt.

    A simple example

    As suggested above, the expression bscanf ic "%d" f reads a decimal integer n from the source of characters ic and returns f n.

    For instance,

    • if we use stdin as the source of characters (Scanning.stdin is the predefined formatted input channel that reads from standard input),
    • if we define the receiver f as let f x = x + 1,

    then bscanf Scanning.stdin "%d" f reads an integer n from the standard input and returns f n (that is n + 1). Thus, if we evaluate bscanf stdin "%d" f, and then enter 41 at the keyboard, the result we get is 42.

    Formatted input as a functional feature

    The OCaml scanning facility is reminiscent of the corresponding C feature. However, it is also largely different, simpler, and yet more powerful: the formatted input functions are higher-order functionals and the parameter passing mechanism is just the regular function application not the variable assignment based mechanism which is typical for formatted input in imperative languages; the OCaml format strings also feature useful additions to easily define complex tokens; as expected within a functional programming language, the formatted input functions also support polymorphism, in particular arbitrary interaction with polymorphic user-defined scanners. Furthermore, the OCaml formatted input facility is fully type-checked at compile time.

    Unsynchronized accesses

    Unsynchronized accesses to a Scanning.in_channel may lead to an invalid Scanning.in_channel state. Thus, concurrent accesses to Scanning.in_channels must be synchronized (for instance with a Mutex.t).

    Formatted input channel

    module Scanning : sig ... end

    Type of formatted input functions

    type ('a, 'b, 'c, 'd) scanner = +Scanf (ocaml.Stdlib.Scanf)

    Module Stdlib.Scanf

    Formatted input functions.

    Introduction

    Functional input with format strings

    The module Scanf provides formatted input functions or scanners.

    The formatted input functions can read from any kind of input, including strings, files, or anything that can return characters. The more general source of characters is named a formatted input channel (or scanning buffer) and has type Scanning.in_channel. The more general formatted input function reads from any scanning buffer and is named bscanf.

    Generally speaking, the formatted input functions have 3 arguments:

    • the first argument is a source of characters for the input,
    • the second argument is a format string that specifies the values to read,
    • the third argument is a receiver function that is applied to the values read.

    Hence, a typical call to the formatted input function Scanf.bscanf is bscanf ic fmt f, where:

    • ic is a source of characters (typically a formatted input channel with type Scanning.in_channel),
    • fmt is a format string (the same format strings as those used to print material with module Printf or Format),
    • f is a function that has as many arguments as the number of values to read in the input according to fmt.

    A simple example

    As suggested above, the expression bscanf ic "%d" f reads a decimal integer n from the source of characters ic and returns f n.

    For instance,

    • if we use stdin as the source of characters (Scanning.stdin is the predefined formatted input channel that reads from standard input),
    • if we define the receiver f as let f x = x + 1,

    then bscanf Scanning.stdin "%d" f reads an integer n from the standard input and returns f n (that is n + 1). Thus, if we evaluate bscanf stdin "%d" f, and then enter 41 at the keyboard, the result we get is 42.

    Formatted input as a functional feature

    The OCaml scanning facility is reminiscent of the corresponding C feature. However, it is also largely different, simpler, and yet more powerful: the formatted input functions are higher-order functionals and the parameter passing mechanism is just the regular function application not the variable assignment based mechanism which is typical for formatted input in imperative languages; the OCaml format strings also feature useful additions to easily define complex tokens; as expected within a functional programming language, the formatted input functions also support polymorphism, in particular arbitrary interaction with polymorphic user-defined scanners. Furthermore, the OCaml formatted input facility is fully type-checked at compile time.

    Unsynchronized accesses

    Unsynchronized accesses to a Scanning.in_channel may lead to an invalid Scanning.in_channel state. Thus, concurrent accesses to Scanning.in_channels must be synchronized (for instance with a Mutex.t).

    Formatted input channel

    module Scanning : sig ... end

    Type of formatted input functions

    type ('a, 'b, 'c, 'd) scanner = ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd, 'd) format6 -> - 'c

    The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan - ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

    For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

    If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

    • since 3.10
    type ('a, 'b, 'c, 'd) scanner_opt = + 'c

    The type of formatted input scanners: ('a, 'b, 'c, 'd) scanner is the type of a formatted input function that reads from some formatted input channel according to some format string; more precisely, if scan is some formatted input function, then scan ic fmt f applies f to all the arguments specified by format string fmt, when scan has read those arguments from the Scanning.in_channel formatted input channel ic.

    For instance, the Scanf.scanf function below has type ('a, 'b, 'c, 'd) scanner, since it is a formatted input function that reads from Scanning.stdin: scanf fmt f applies f to the arguments specified by fmt, reading those arguments from Stdlib.stdin as expected.

    If the format fmt has some %r indications, the corresponding formatted input functions must be provided before receiver function f. For instance, if read_elem is an input function for values of type t, then bscanf ic "%r;" read_elem f reads a value v of type t followed by a ';' character, and returns f v.

    • since 3.10
    type ('a, 'b, 'c, 'd) scanner_opt = ('a, Scanning.in_channel, 'b, 'c, 'a -> 'd option, 'd) format6 -> - 'c
    exception Scan_failure of string

    When the input can not be read according to the format string specification, formatted input functions typically raise exception Scan_failure.

    The general formatted input function

    val bscanf : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner

    bscanf ic fmt r1 ... rN f reads characters from the Scanning.in_channel formatted input channel ic and converts them to values according to format string fmt. As a final step, receiver function f is applied to the values read and gives the result of the bscanf call.

    For instance, if f is the function fun s i -> i + 1, then Scanf.sscanf "x = 1" "%s = %i" f returns 2.

    Arguments r1 to rN are user-defined input functions that read the argument corresponding to the %r conversions specified in the format string.

    val bscanf_opt : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.bscanf, but returns None in case of scanning failure.

    • since 5.0

    Format string description

    The format string is a character string which contains three types of objects:

    • plain characters, which are simply matched with the characters of the input (with a special case for space and line feed, see space),
    • conversion specifications, each of which causes reading and conversion of one argument for the function f (see conversion),
    • scanning indications to specify boundaries of tokens (see scanning indication).

    The space character in format strings

    As mentioned above, a plain character in the format string is just matched with the next character of the input; however, two characters are special exceptions to this rule: the space character (' ' or ASCII code 32) and the line feed character ('\n' or ASCII code 10). A space does not match a single space character, but any amount of 'whitespace' in the input. More precisely, a space inside the format string matches any number of tab, space, line feed and carriage return characters. Similarly, a line feed character in the format string matches either a single line feed or a carriage return followed by a line feed.

    Matching any amount of whitespace, a space in the format string also matches no amount of whitespace at all; hence, the call bscanf ib - "Price = %d $" (fun p -> p) succeeds and returns 1 when reading an input with various whitespace in it, such as Price = 1 $, Price = 1 $, or even Price=1$.

    Conversion specifications in format strings

    Conversion specifications consist in the % character, followed by an optional flag, an optional field width, and followed by one or two conversion characters.

    The conversion characters and their meanings are:

    • d: reads an optionally signed decimal integer (0-9+).
    • i: reads an optionally signed integer (usual input conventions for decimal (0-9+), hexadecimal (0x[0-9a-f]+ and 0X[0-9A-F]+), octal (0o[0-7]+), and binary (0b[0-1]+) notations are understood).
    • u: reads an unsigned decimal integer.
    • x or X: reads an unsigned hexadecimal integer ([0-9a-fA-F]+).
    • o: reads an unsigned octal integer ([0-7]+).
    • s: reads a string argument that spreads as much as possible, until the following bounding condition holds:

      • a whitespace has been found (see space),
      • a scanning indication (see scanning indication) has been encountered,
      • the end-of-input has been reached.

      Hence, this conversion always succeeds: it returns an empty string if the bounding condition holds when the scan begins.

    • S: reads a delimited string argument (delimiters and special escaped characters follow the lexical conventions of OCaml).
    • c: reads a single character. To test the current input character without reading it, specify a null field width, i.e. use specification %0c. Raise Invalid_argument, if the field width specification is greater than 1.
    • C: reads a single delimited character (delimiters and special escaped characters follow the lexical conventions of OCaml).
    • f, e, E, g, G: reads an optionally signed floating-point number in decimal notation, in the style dddd.ddd - e/E+-dd.
    • h, H: reads an optionally signed floating-point number in hexadecimal notation.
    • F: reads a floating point number according to the lexical conventions of OCaml (hence the decimal point is mandatory if the exponent part is not mentioned).
    • B: reads a boolean argument (true or false).
    • b: reads a boolean argument (for backward compatibility; do not use in new programs).
    • ld, li, lu, lx, lX, lo: reads an int32 argument to the format specified by the second letter for regular integers.
    • nd, ni, nu, nx, nX, no: reads a nativeint argument to the format specified by the second letter for regular integers.
    • Ld, Li, Lu, Lx, LX, Lo: reads an int64 argument to the format specified by the second letter for regular integers.
    • [ range ]: reads characters that matches one of the characters mentioned in the range of characters range (or not mentioned in it, if the range starts with ^). Reads a string that can be empty, if the next input character does not match the range. The set of characters from c1 to c2 (inclusively) is denoted by c1-c2. Hence, %[0-9] returns a string representing a decimal number or an empty string if no decimal digit is found; similarly, %[0-9a-f] returns a string of hexadecimal digits. If a closing bracket appears in a range, it must occur as the first character of the range (or just after the ^ in case of range negation); hence []] matches a ] character and [^]] matches any character that is not ]. Use %% and %@ to include a % or a @ in a range.
    • r: user-defined reader. Takes the next ri formatted input function and applies it to the scanning buffer ib to read the next argument. The input function ri must therefore have type Scanning.in_channel -> 'a and the argument read has type 'a.
    • { fmt %}: reads a format string argument. The format string read must have the same type as the format string specification fmt. For instance, "%{ %i %}" reads any format string that can read a value of type int; hence, if s is the string "fmt:\"number is %u\"", then Scanf.sscanf s "fmt: %{%i%}" succeeds and returns the format string "number is %u".
    • ( fmt %): scanning sub-format substitution. Reads a format string rf in the input, then goes on scanning with rf instead of scanning with fmt. The format string rf must have the same type as the format string specification fmt that it replaces. For instance, "%( %i %)" reads any format string that can read a value of type int. The conversion returns the format string read rf, and then a value read using rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%(%i%)" (fun fmt i -> fmt, i) evaluates to ("%4d", 1234). This behaviour is not mere format substitution, since the conversion returns the format string read as additional argument. If you need pure format substitution, use special flag _ to discard the extraneous argument: conversion %_( fmt %) reads a format string rf and then behaves the same as format string rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%_(%i%)" is simply equivalent to Scanf.sscanf "1234.00" "%4d".
    • l: returns the number of lines read so far.
    • n: returns the number of characters read so far.
    • N or L: returns the number of tokens read so far.
    • !: matches the end of input condition.
    • %: matches one % character in the input.
    • @: matches one @ character in the input.
    • ,: does nothing.

    Following the % character that introduces a conversion, there may be the special flag _: the conversion that follows occurs as usual, but the resulting value is discarded. For instance, if f is the function fun i -> i + 1, and s is the string "x = 1", then Scanf.sscanf s "%_s = %i" f returns 2.

    The field width is composed of an optional integer literal indicating the maximal width of the token to read. For instance, %6d reads an integer, having at most 6 decimal digits; %4f reads a float with at most 4 characters; and %8[\000-\255] returns the next 8 characters (or all the characters still available, if fewer than 8 characters are available in the input).

    Notes:

    • as mentioned above, a %s conversion always succeeds, even if there is nothing to read in the input: in this case, it simply returns "".
    • in addition to the relevant digits, '_' characters may appear inside numbers (this is reminiscent to the usual OCaml lexical conventions). If stricter scanning is desired, use the range conversion facility instead of the number conversions.
    • the scanf facility is not intended for heavy duty lexical analysis and parsing. If it appears not expressive enough for your needs, several alternative exists: regular expressions (module Str), stream parsers, ocamllex-generated lexers, ocamlyacc-generated parsers.

    Scanning indications in format strings

    Scanning indications appear just after the string conversions %s and %[ range ] to delimit the end of the token. A scanning indication is introduced by a @ character, followed by some plain character c. It means that the string token should end just before the next matching c (which is skipped). If no c character is encountered, the string token spreads as much as possible. For instance, "%s@\t" reads a string up to the next tab character or to the end of input. If a @ character appears anywhere else in the format string, it is treated as a plain character.

    Note:

    • As usual in format strings, % and @ characters must be escaped using %% and %@; this rule still holds within range specifications and scanning indications. For instance, format "%s@%%" reads a string up to the next % character, and format "%s@%@" reads a string up to the next @.
    • The scanning indications introduce slight differences in the syntax of Scanf format strings, compared to those used for the Printf module. However, the scanning indications are similar to those used in the Format module; hence, when producing formatted text to be scanned by Scanf.bscanf, it is wise to use printing functions from the Format module (or, if you need to use functions from Printf, banish or carefully double check the format strings that contain '@' characters).

    Exceptions during scanning

    Scanners may raise the following exceptions when the input cannot be read according to the format string:

    • Raise Failure if a conversion to a number is not possible.
    • Raise End_of_file if the end of input is encountered while some more characters are needed to read the current conversion specification.
    • Raise Invalid_argument if the format string is invalid.

    Note:

    • as a consequence, scanning a %s conversion never raises exception End_of_file: if the end of input is reached the conversion succeeds and simply returns the characters read so far, or "" if none were ever read.

    Specialised formatted input functions

    val sscanf : string -> ('a, 'b, 'c, 'd) scanner

    Same as Scanf.bscanf, but reads from the given string.

    val sscanf_opt : string -> ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.sscanf, but returns None in case of scanning failure.

    • since 5.0
    val scanf : ('a, 'b, 'c, 'd) scanner

    Same as Scanf.bscanf, but reads from the predefined formatted input channel Scanf.Scanning.stdin that is connected to Stdlib.stdin.

    val scanf_opt : ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.scanf, but returns None in case of scanning failure.

    • since 5.0
    val kscanf : + 'c
    exception Scan_failure of string

    When the input can not be read according to the format string specification, formatted input functions typically raise exception Scan_failure.

    The general formatted input function

    val bscanf : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner

    bscanf ic fmt r1 ... rN f reads characters from the Scanning.in_channel formatted input channel ic and converts them to values according to format string fmt. As a final step, receiver function f is applied to the values read and gives the result of the bscanf call.

    For instance, if f is the function fun s i -> i + 1, then Scanf.sscanf "x = 1" "%s = %i" f returns 2.

    Arguments r1 to rN are user-defined input functions that read the argument corresponding to the %r conversions specified in the format string.

    val bscanf_opt : Scanning.in_channel -> ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.bscanf, but returns None in case of scanning failure.

    • since 5.0

    Format string description

    The format string is a character string which contains three types of objects:

    The space character in format strings

    As mentioned above, a plain character in the format string is just matched with the next character of the input; however, two characters are special exceptions to this rule: the space character (' ' or ASCII code 32) and the line feed character ('\n' or ASCII code 10). A space does not match a single space character, but any amount of 'whitespace' in the input. More precisely, a space inside the format string matches any number of tab, space, line feed and carriage return characters. Similarly, a line feed character in the format string matches either a single line feed or a carriage return followed by a line feed.

    Matching any amount of whitespace, a space in the format string also matches no amount of whitespace at all; hence, the call bscanf ib "Price = %d $" (fun p -> p) succeeds and returns 1 when reading an input with various whitespace in it, such as Price = 1 $, Price = 1 $, or even Price=1$.

    Conversion specifications in format strings

    Conversion specifications consist in the % character, followed by an optional flag, an optional field width, and followed by one or two conversion characters.

    The conversion characters and their meanings are:

    • d: reads an optionally signed decimal integer (0-9+).
    • i: reads an optionally signed integer (usual input conventions for decimal (0-9+), hexadecimal (0x[0-9a-f]+ and 0X[0-9A-F]+), octal (0o[0-7]+), and binary (0b[0-1]+) notations are understood).
    • u: reads an unsigned decimal integer.
    • x or X: reads an unsigned hexadecimal integer ([0-9a-fA-F]+).
    • o: reads an unsigned octal integer ([0-7]+).
    • s: reads a string argument that spreads as much as possible, until the following bounding condition holds:

      Hence, this conversion always succeeds: it returns an empty string if the bounding condition holds when the scan begins.

    • S: reads a delimited string argument (delimiters and special escaped characters follow the lexical conventions of OCaml).
    • c: reads a single character. To test the current input character without reading it, specify a null field width, i.e. use specification %0c. Raise Invalid_argument, if the field width specification is greater than 1.
    • C: reads a single delimited character (delimiters and special escaped characters follow the lexical conventions of OCaml).
    • f, e, E, g, G: reads an optionally signed floating-point number in decimal notation, in the style dddd.ddd e/E+-dd.
    • h, H: reads an optionally signed floating-point number in hexadecimal notation.
    • F: reads a floating point number according to the lexical conventions of OCaml (hence the decimal point is mandatory if the exponent part is not mentioned).
    • B: reads a boolean argument (true or false).
    • b: reads a boolean argument (for backward compatibility; do not use in new programs).
    • ld, li, lu, lx, lX, lo: reads an int32 argument to the format specified by the second letter for regular integers.
    • nd, ni, nu, nx, nX, no: reads a nativeint argument to the format specified by the second letter for regular integers.
    • Ld, Li, Lu, Lx, LX, Lo: reads an int64 argument to the format specified by the second letter for regular integers.
    • [ range ]: reads characters that matches one of the characters mentioned in the range of characters range (or not mentioned in it, if the range starts with ^). Reads a string that can be empty, if the next input character does not match the range. The set of characters from c1 to c2 (inclusively) is denoted by c1-c2. Hence, %[0-9] returns a string representing a decimal number or an empty string if no decimal digit is found; similarly, %[0-9a-f] returns a string of hexadecimal digits. If a closing bracket appears in a range, it must occur as the first character of the range (or just after the ^ in case of range negation); hence []] matches a ] character and [^]] matches any character that is not ]. Use %% and %@ to include a % or a @ in a range.
    • r: user-defined reader. Takes the next ri formatted input function and applies it to the scanning buffer ib to read the next argument. The input function ri must therefore have type Scanning.in_channel -> 'a and the argument read has type 'a.
    • { fmt %}: reads a format string argument. The format string read must have the same type as the format string specification fmt. For instance, "%{ %i %}" reads any format string that can read a value of type int; hence, if s is the string "fmt:\"number is %u\"", then Scanf.sscanf s "fmt: %{%i%}" succeeds and returns the format string "number is %u".
    • ( fmt %): scanning sub-format substitution. Reads a format string rf in the input, then goes on scanning with rf instead of scanning with fmt. The format string rf must have the same type as the format string specification fmt that it replaces. For instance, "%( %i %)" reads any format string that can read a value of type int. The conversion returns the format string read rf, and then a value read using rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%(%i%)" (fun fmt i -> fmt, i) evaluates to ("%4d", 1234). This behaviour is not mere format substitution, since the conversion returns the format string read as additional argument. If you need pure format substitution, use special flag _ to discard the extraneous argument: conversion %_( fmt %) reads a format string rf and then behaves the same as format string rf. Hence, if s is the string "\"%4d\"1234.00", then Scanf.sscanf s "%_(%i%)" is simply equivalent to Scanf.sscanf "1234.00" "%4d".
    • l: returns the number of lines read so far.
    • n: returns the number of characters read so far.
    • N or L: returns the number of tokens read so far.
    • !: matches the end of input condition.
    • %: matches one % character in the input.
    • @: matches one @ character in the input.
    • ,: does nothing.

    Following the % character that introduces a conversion, there may be the special flag _: the conversion that follows occurs as usual, but the resulting value is discarded. For instance, if f is the function fun i -> i + 1, and s is the string "x = 1", then Scanf.sscanf s "%_s = %i" f returns 2.

    The field width is composed of an optional integer literal indicating the maximal width of the token to read. For instance, %6d reads an integer, having at most 6 decimal digits; %4f reads a float with at most 4 characters; and %8[\000-\255] returns the next 8 characters (or all the characters still available, if fewer than 8 characters are available in the input).

    Notes:

    • as mentioned above, a %s conversion always succeeds, even if there is nothing to read in the input: in this case, it simply returns "".
    • in addition to the relevant digits, '_' characters may appear inside numbers (this is reminiscent to the usual OCaml lexical conventions). If stricter scanning is desired, use the range conversion facility instead of the number conversions.
    • the scanf facility is not intended for heavy duty lexical analysis and parsing. If it appears not expressive enough for your needs, several alternative exists: regular expressions (module Str), stream parsers, ocamllex-generated lexers, ocamlyacc-generated parsers.

    Scanning indications in format strings

    Scanning indications appear just after the string conversions %s and %[ range ] to delimit the end of the token. A scanning indication is introduced by a @ character, followed by some plain character c. It means that the string token should end just before the next matching c (which is skipped). If no c character is encountered, the string token spreads as much as possible. For instance, "%s@\t" reads a string up to the next tab character or to the end of input. If a @ character appears anywhere else in the format string, it is treated as a plain character.

    Note:

    • As usual in format strings, % and @ characters must be escaped using %% and %@; this rule still holds within range specifications and scanning indications. For instance, format "%s@%%" reads a string up to the next % character, and format "%s@%@" reads a string up to the next @.
    • The scanning indications introduce slight differences in the syntax of Scanf format strings, compared to those used for the Printf module. However, the scanning indications are similar to those used in the Format module; hence, when producing formatted text to be scanned by Scanf.bscanf, it is wise to use printing functions from the Format module (or, if you need to use functions from Printf, banish or carefully double check the format strings that contain '@' characters).

    Exceptions during scanning

    Scanners may raise the following exceptions when the input cannot be read according to the format string:

    • Raise Failure if a conversion to a number is not possible.
    • Raise End_of_file if the end of input is encountered while some more characters are needed to read the current conversion specification.
    • Raise Invalid_argument if the format string is invalid.

    Note:

    • as a consequence, scanning a %s conversion never raises exception End_of_file: if the end of input is reached the conversion succeeds and simply returns the characters read so far, or "" if none were ever read.

    Specialised formatted input functions

    val sscanf : string -> ('a, 'b, 'c, 'd) scanner

    Same as Scanf.bscanf, but reads from the given string.

    val sscanf_opt : string -> ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.sscanf, but returns None in case of scanning failure.

    • since 5.0
    val scanf : ('a, 'b, 'c, 'd) scanner

    Same as Scanf.bscanf, but reads from the predefined formatted input channel Scanf.Scanning.stdin that is connected to Stdlib.stdin.

    val scanf_opt : ('a, 'b, 'c, 'd) scanner_opt

    Same as Scanf.scanf, but returns None in case of scanning failure.

    • since 5.0
    val kscanf : Scanning.in_channel -> (Scanning.in_channel -> exn -> 'd) -> ('a, 'b, 'c, 'd) scanner

    Same as Scanf.bscanf, but takes an additional function argument ef that is called in case of error: if the scanning process or some conversion fails, the scanning function aborts and calls the error handling function ef with the formatted input channel and the exception that aborted the scanning process as arguments.

    val ksscanf : @@ -16,11 +13,11 @@ Scanning.in_channel -> ('a, 'b, 'c, 'd, 'e, 'f) format6 -> (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> - 'g

    bscanf_format ic fmt f reads a format string token from the formatted input channel ic, according to the given format string fmt, and applies f to the resulting format string value.

    • raises Scan_failure

      if the format string value read does not have the same type as fmt.

    • since 3.09
    val sscanf_format : + 'g

    bscanf_format ic fmt f reads a format string token from the formatted input channel ic, according to the given format string fmt, and applies f to the resulting format string value.

    • raises Scan_failure

      if the format string value read does not have the same type as fmt.

    • since 3.09
    val sscanf_format : string -> ('a, 'b, 'c, 'd, 'e, 'f) format6 -> (('a, 'b, 'c, 'd, 'e, 'f) format6 -> 'g) -> 'g

    Same as Scanf.bscanf_format, but reads from the given string.

    • since 3.09
    val format_from_string : string -> ('a, 'b, 'c, 'd, 'e, 'f) format6 -> - ('a, 'b, 'c, 'd, 'e, 'f) format6

    format_from_string s fmt converts a string argument to a format string, according to the given format string fmt.

    • raises Scan_failure

      if s, considered as a format string, does not have the same type as fmt.

    • since 3.10
    val unescaped : string -> string

    unescaped s return a copy of s with escape sequences (according to the lexical conventions of OCaml) replaced by their corresponding special characters. More precisely, Scanf.unescaped has the following property: for all string s, Scanf.unescaped (String.escaped s) = s.

    Always return a copy of the argument, even if there is no escape sequence in the argument.

    • raises Scan_failure

      if s is not properly escaped (i.e. s has invalid escape sequences or special characters that are not properly escaped). For instance, Scanf.unescaped "\"" will fail.

    • since 4.00
    \ No newline at end of file + ('a, 'b, 'c, 'd, 'e, 'f) format6

    format_from_string s fmt converts a string argument to a format string, according to the given format string fmt.

    • raises Scan_failure

      if s, considered as a format string, does not have the same type as fmt.

    • since 3.10
    val unescaped : string -> string

    unescaped s return a copy of s with escape sequences (according to the lexical conventions of OCaml) replaced by their corresponding special characters. More precisely, Scanf.unescaped has the following property: for all string s, Scanf.unescaped (String.escaped s) = s.

    Always return a copy of the argument, even if there is no escape sequence in the argument.

    • raises Scan_failure

      if s is not properly escaped (i.e. s has invalid escape sequences or special characters that are not properly escaped). For instance, Scanf.unescaped "\"" will fail.

    • since 4.00
    diff --git a/ocaml/Stdlib/Semaphore/Binary/index.html b/ocaml/Stdlib/Semaphore/Binary/index.html index 09f5715..32e0346 100644 --- a/ocaml/Stdlib/Semaphore/Binary/index.html +++ b/ocaml/Stdlib/Semaphore/Binary/index.html @@ -1,2 +1,2 @@ -Binary (ocaml.Stdlib.Semaphore.Binary)

    Module Semaphore.Binary

    type t

    The type of binary semaphores.

    val make : bool -> t

    make b returns a new binary semaphore. If b is true, the initial value of the semaphore is 1, meaning "available". If b is false, the initial value of the semaphore is 0, meaning "unavailable".

    val release : t -> unit

    release s sets the value of semaphore s to 1, putting it in the "available" state. If other threads are waiting on s, one of them is restarted.

    val acquire : t -> unit

    acquire s blocks the calling thread until the semaphore s has value 1 (is available), then atomically sets it to 0 and returns.

    val try_acquire : t -> bool

    try_acquire s immediately returns false if the semaphore s has value 0. If s has value 1, its value is atomically set to 0 and try_acquire s returns true.

    \ No newline at end of file +Binary (ocaml.Stdlib.Semaphore.Binary)

    Module Semaphore.Binary

    type t

    The type of binary semaphores.

    val make : bool -> t

    make b returns a new binary semaphore. If b is true, the initial value of the semaphore is 1, meaning "available". If b is false, the initial value of the semaphore is 0, meaning "unavailable".

    val release : t -> unit

    release s sets the value of semaphore s to 1, putting it in the "available" state. If other threads are waiting on s, one of them is restarted.

    val acquire : t -> unit

    acquire s blocks the calling thread until the semaphore s has value 1 (is available), then atomically sets it to 0 and returns.

    val try_acquire : t -> bool

    try_acquire s immediately returns false if the semaphore s has value 0. If s has value 1, its value is atomically set to 0 and try_acquire s returns true.

    diff --git a/ocaml/Stdlib/Semaphore/Counting/index.html b/ocaml/Stdlib/Semaphore/Counting/index.html index 9c81d9d..204bc19 100644 --- a/ocaml/Stdlib/Semaphore/Counting/index.html +++ b/ocaml/Stdlib/Semaphore/Counting/index.html @@ -1,2 +1,2 @@ -Counting (ocaml.Stdlib.Semaphore.Counting)

    Module Semaphore.Counting

    type t

    The type of counting semaphores.

    val make : int -> t

    make n returns a new counting semaphore, with initial value n. The initial value n must be nonnegative.

    • raises Invalid_argument

      if n < 0

    val release : t -> unit

    release s increments the value of semaphore s. If other threads are waiting on s, one of them is restarted. If the current value of s is equal to max_int, the value of the semaphore is unchanged and a Sys_error exception is raised to signal overflow.

    • raises Sys_error

      if the value of the semaphore would overflow max_int

    val acquire : t -> unit

    acquire s blocks the calling thread until the value of semaphore s is not zero, then atomically decrements the value of s and returns.

    val try_acquire : t -> bool

    try_acquire s immediately returns false if the value of semaphore s is zero. Otherwise, the value of s is atomically decremented and try_acquire s returns true.

    val get_value : t -> int

    get_value s returns the current value of semaphore s. The current value can be modified at any time by concurrent release and acquire operations. Hence, the get_value operation is racy, and its result should only be used for debugging or informational messages.

    \ No newline at end of file +Counting (ocaml.Stdlib.Semaphore.Counting)

    Module Semaphore.Counting

    type t

    The type of counting semaphores.

    val make : int -> t

    make n returns a new counting semaphore, with initial value n. The initial value n must be nonnegative.

    val release : t -> unit

    release s increments the value of semaphore s. If other threads are waiting on s, one of them is restarted. If the current value of s is equal to max_int, the value of the semaphore is unchanged and a Sys_error exception is raised to signal overflow.

    • raises Sys_error

      if the value of the semaphore would overflow max_int

    val acquire : t -> unit

    acquire s blocks the calling thread until the value of semaphore s is not zero, then atomically decrements the value of s and returns.

    val try_acquire : t -> bool

    try_acquire s immediately returns false if the value of semaphore s is zero. Otherwise, the value of s is atomically decremented and try_acquire s returns true.

    val get_value : t -> int

    get_value s returns the current value of semaphore s. The current value can be modified at any time by concurrent release and acquire operations. Hence, the get_value operation is racy, and its result should only be used for debugging or informational messages.

    diff --git a/ocaml/Stdlib/Semaphore/index.html b/ocaml/Stdlib/Semaphore/index.html index b4bd597..ab47569 100644 --- a/ocaml/Stdlib/Semaphore/index.html +++ b/ocaml/Stdlib/Semaphore/index.html @@ -1,2 +1,2 @@ -Semaphore (ocaml.Stdlib.Semaphore)

    Module Stdlib.Semaphore

    Semaphores

    A semaphore is a thread synchronization device that can be used to control access to a shared resource.

    Two flavors of semaphores are provided: counting semaphores and binary semaphores.

    • since 4.12

    Counting semaphores

    A counting semaphore is a counter that can be accessed concurrently by several threads. The typical use is to synchronize producers and consumers of a resource by counting how many units of the resource are available.

    The two basic operations on semaphores are:

    • "release" (also called "V", "post", "up", and "signal"), which increments the value of the counter. This corresponds to producing one more unit of the shared resource and making it available to others.
    • "acquire" (also called "P", "wait", "down", and "pend"), which waits until the counter is greater than zero and decrements it. This corresponds to consuming one unit of the shared resource.
    • since 4.12
    module Counting : sig ... end

    Binary semaphores

    Binary semaphores are a variant of counting semaphores where semaphores can only take two values, 0 and 1.

    A binary semaphore can be used to control access to a single shared resource, with value 1 meaning "resource is available" and value 0 meaning "resource is unavailable".

    The "release" operation of a binary semaphore sets its value to 1, and "acquire" waits until the value is 1 and sets it to 0.

    A binary semaphore can be used instead of a mutex (see module Mutex) when the mutex discipline (of unlocking the mutex from the thread that locked it) is too restrictive. The "acquire" operation corresponds to locking the mutex, and the "release" operation to unlocking it, but "release" can be performed in a thread different than the one that performed the "acquire". Likewise, it is safe to release a binary semaphore that is already available.

    • since 4.12
    module Binary : sig ... end
    \ No newline at end of file +Semaphore (ocaml.Stdlib.Semaphore)

    Module Stdlib.Semaphore

    Semaphores

    A semaphore is a thread synchronization device that can be used to control access to a shared resource.

    Two flavors of semaphores are provided: counting semaphores and binary semaphores.

    • since 4.12

    Counting semaphores

    A counting semaphore is a counter that can be accessed concurrently by several threads. The typical use is to synchronize producers and consumers of a resource by counting how many units of the resource are available.

    The two basic operations on semaphores are:

    • "release" (also called "V", "post", "up", and "signal"), which increments the value of the counter. This corresponds to producing one more unit of the shared resource and making it available to others.
    • "acquire" (also called "P", "wait", "down", and "pend"), which waits until the counter is greater than zero and decrements it. This corresponds to consuming one unit of the shared resource.
    • since 4.12
    module Counting : sig ... end

    Binary semaphores

    Binary semaphores are a variant of counting semaphores where semaphores can only take two values, 0 and 1.

    A binary semaphore can be used to control access to a single shared resource, with value 1 meaning "resource is available" and value 0 meaning "resource is unavailable".

    The "release" operation of a binary semaphore sets its value to 1, and "acquire" waits until the value is 1 and sets it to 0.

    A binary semaphore can be used instead of a mutex (see module Mutex) when the mutex discipline (of unlocking the mutex from the thread that locked it) is too restrictive. The "acquire" operation corresponds to locking the mutex, and the "release" operation to unlocking it, but "release" can be performed in a thread different than the one that performed the "acquire". Likewise, it is safe to release a binary semaphore that is already available.

    • since 4.12
    module Binary : sig ... end
    diff --git a/ocaml/Stdlib/Seq/index.html b/ocaml/Stdlib/Seq/index.html index d698e87..2041457 100644 --- a/ocaml/Stdlib/Seq/index.html +++ b/ocaml/Stdlib/Seq/index.html @@ -1,2 +1,2 @@ -Seq (ocaml.Stdlib.Seq)

    Module Stdlib.Seq

    Sequences.

    A sequence of type 'a Seq.t can be thought of as a delayed list, that is, a list whose elements are computed only when they are demanded by a consumer. This allows sequences to be produced and transformed lazily (one element at a time) rather than eagerly (all elements at once). This also allows constructing conceptually infinite sequences.

    The type 'a Seq.t is defined as a synonym for unit -> 'a Seq.node. This is a function type: therefore, it is opaque. The consumer can query a sequence in order to request the next element (if there is one), but cannot otherwise inspect the sequence in any way.

    Because it is opaque, the type 'a Seq.t does not reveal whether a sequence is:

    • persistent, which means that the sequence can be used as many times as desired, producing the same elements every time, just like an immutable list; or
    • ephemeral, which means that the sequence is not persistent. Querying an ephemeral sequence might have an observable side effect, such as incrementing a mutable counter. As a common special case, an ephemeral sequence can be affine, which means that it must be queried at most once.

    It also does not reveal whether the elements of the sequence are:

    • pre-computed and stored in memory, which means that querying the sequence is cheap;
    • computed when first demanded and then stored in memory, which means that querying the sequence once can be expensive, but querying the same sequence again is cheap; or
    • re-computed every time they are demanded, which may or may not be cheap.

    It is up to the programmer to keep these distinctions in mind so as to understand the time and space requirements of sequences.

    For the sake of simplicity, most of the documentation that follows is written under the implicit assumption that the sequences at hand are persistent. We normally do not point out when or how many times each function is invoked, because that would be too verbose. For instance, in the description of map, we write: "if xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ...". If we wished to be more explicit, we could point out that the transformation takes place on demand: that is, the elements of map f xs are computed only when they are demanded. In other words, the definition let ys = map f xs terminates immediately and does not invoke f. The function call f x0 takes place only when the first element of ys is demanded, via the function call ys(). Furthermore, calling ys() twice causes f x0 to be called twice as well. If one wishes for f to be applied at most once to each element of xs, even in scenarios where ys is queried more than once, then one should use let ys = memoize (map f xs).

    As a general rule, the functions that build sequences, such as map, filter, scan, take, etc., produce sequences whose elements are computed only on demand. The functions that eagerly consume sequences, such as is_empty, find, length, iter, fold_left, etc., are the functions that force computation to take place.

    When possible, we recommend using sequences rather than dispensers (functions of type unit -> 'a option that produce elements upon demand). Whereas sequences can be persistent or ephemeral, dispensers are always ephemeral, and are typically more difficult to work with than sequences. Two conversion functions, to_dispenser and of_dispenser, are provided.

    • since 4.07
    type 'a t = unit -> 'a node

    A sequence xs of type 'a t is a delayed list of elements of type 'a. Such a sequence is queried by performing a function application xs(). This function application returns a node, allowing the caller to determine whether the sequence is empty or nonempty, and in the latter case, to obtain its head and tail.

    and +'a node =
    1. | Nil
    2. | Cons of 'a * 'a t

    A node is either Nil, which means that the sequence is empty, or Cons (x, xs), which means that x is the first element of the sequence and that xs is the remainder of the sequence.

    Consuming sequences

    The functions in this section consume their argument, a sequence, either partially or completely:

    • is_empty and uncons consume the sequence down to depth 1. That is, they demand the first argument of the sequence, if there is one.
    • iter, fold_left, length, etc., consume the sequence all the way to its end. They terminate only if the sequence is finite.
    • for_all, exists, find, etc. consume the sequence down to a certain depth, which is a priori unpredictable.

    Similarly, among the functions that consume two sequences, one can distinguish two groups:

    • iter2 and fold_left2 consume both sequences all the way to the end, provided the sequences have the same length.
    • for_all2, exists2, equal, compare consume the sequences down to a certain depth, which is a priori unpredictable.

    The functions that consume two sequences can be applied to two sequences of distinct lengths: in that case, the excess elements in the longer sequence are ignored. (It may be the case that one excess element is demanded, even though this element is not used.)

    None of the functions in this section is lazy. These functions are consumers: they force some computation to take place.

    val is_empty : 'a t -> bool

    is_empty xs determines whether the sequence xs is empty.

    It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

    • since 4.14
    val uncons : 'a t -> ('a * 'a t) option

    If xs is empty, then uncons xs is None.

    If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

    • since 4.14
    val length : 'a t -> int

    length xs is the length of the sequence xs.

    The sequence xs must be finite.

    • since 4.14
    val iter : ('a -> unit) -> 'a t -> unit

    iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

    It terminates only if the sequence xs is finite.

    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

    An accumulator of type 'a is threaded through the calls to f.

    It terminates only if the sequence xs is finite.

    val iteri : (int -> 'a -> unit) -> 'a t -> unit

    iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

    It terminates only if the sequence xs is finite.

    iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

    • since 4.14
    val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

    An accumulator of type 'b is threaded through the calls to f.

    It terminates only if the sequence xs is finite.

    fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

    • since 4.14
    val for_all : ('a -> bool) -> 'a t -> bool

    for_all p xs determines whether all elements x of the sequence xs satisfy p x.

    The sequence xs must be finite.

    • since 4.14
    val exists : ('a -> bool) -> 'a t -> bool

    exists xs p determines whether at least one element x of the sequence xs satisfies p x.

    The sequence xs must be finite.

    • since 4.14
    val find : ('a -> bool) -> 'a t -> 'a option

    find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 4.14
    val find_index : ('a -> bool) -> 'a t -> int option

    find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a t -> 'b option

    find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 4.14
    val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    The sequence xs must be finite.

    • since 5.1
    val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

    iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    Iteration terminates only if at least one of the sequences xs and ys is finite.

    iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

    • since 4.14
    val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

    fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

    An accumulator of type 'a is threaded through the calls to f.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    Iteration terminates only if at least one of the sequences xs and ys is finite.

    fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

    • since 4.14
    val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

    At least one of the sequences xs and ys must be finite.

    for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

    • since 4.14
    val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

    If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    At least one of the sequences xs and ys must be finite.

    exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

    • since 4.14
    val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

    At least one of the sequences xs and ys must be finite.

    • since 4.14
    val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

    Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

    For more details on comparison functions, see Array.sort.

    At least one of the sequences xs and ys must be finite.

    • since 4.14

    Constructing sequences

    The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

    val empty : 'a t

    empty is the empty sequence. It has no elements. Its length is 0.

    val return : 'a -> 'a t

    return x is the sequence whose sole element is x. Its length is 1.

    val cons : 'a -> 'a t -> 'a t

    cons x xs is the sequence that begins with the element x, followed with the sequence xs.

    Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

    • since 4.11
    val init : int -> (int -> 'a) -> 'a t

    init n f is the sequence f 0; f 1; ...; f (n-1).

    n must be nonnegative.

    If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

    • raises Invalid_argument

      if n is negative.

    • since 4.14
    val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

    unfold constructs a sequence out of a step function and an initial state.

    If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

    For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

    • since 4.11
    val repeat : 'a -> 'a t

    repeat x is the infinite sequence where the element x is repeated indefinitely.

    repeat x is equivalent to cycle (return x).

    • since 4.14
    val forever : (unit -> 'a) -> 'a t

    forever f is an infinite sequence where every element is produced (on demand) by the function call f().

    For instance, forever Random.bool is an infinite sequence of random bits.

    forever f is equivalent to map f (repeat ()).

    • since 4.14
    val cycle : 'a t -> 'a t

    cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

    If xs is an empty sequence, then cycle xs is empty as well.

    Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

    • since 4.14
    val iterate : ('a -> 'a) -> 'a -> 'a t

    iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

    In other words, it is the orbit of the function f, starting at x.

    • since 4.14

    Transforming sequences

    The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f xs is the image of the sequence xs through the transformation f.

    If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

    val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

    mapi is analogous to map, but applies the function f to an index and an element.

    mapi f xs is equivalent to map2 f (ints 0) xs.

    • since 4.14
    val filter : ('a -> bool) -> 'a t -> 'a t

    filter p xs is the sequence of the elements x of xs that satisfy p x.

    In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

    val filter_map : ('a -> 'b option) -> 'a t -> 'b t

    filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

    filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

    val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

    If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

    Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

    For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

    If xs has length n then scan f a0 xs has length n+1.

    • since 4.14
    val take : int -> 'a t -> 'a t

    take n xs is the sequence of the first n elements of xs.

    If xs has fewer than n elements, then take n xs is equivalent to xs.

    n must be nonnegative.

    • raises Invalid_argument

      if n is negative.

    • since 4.14
    val drop : int -> 'a t -> 'a t

    drop n xs is the sequence xs, deprived of its first n elements.

    If xs has fewer than n elements, then drop n xs is empty.

    n must be nonnegative.

    drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

    • raises Invalid_argument

      if n is negative.

    • since 4.14
    val take_while : ('a -> bool) -> 'a t -> 'a t

    take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

    • since 4.14
    val drop_while : ('a -> bool) -> 'a t -> 'a t

    drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

    • since 4.14
    val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

    Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

    Every element of group eq xs is a nonempty sequence of equal elements.

    The concatenation concat (group eq xs) is equal to xs.

    Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

    • since 4.14
    val memoize : 'a t -> 'a t

    The sequence memoize xs has the same elements as the sequence xs.

    Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

    The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

    • since 4.14
    exception Forced_twice

    This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

    • since 4.14
    val once : 'a t -> 'a t

    The sequence once xs has the same elements as the sequence xs.

    Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

    • raises Forced_twice

      if once xs, or a suffix of it, is queried more than once.

    • since 4.14
    val transpose : 'a t t -> 'a t t

    If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

    The rows of the matrix xss are not required to have the same length.

    The matrix xss is not required to be finite (in either direction).

    The matrix xss must be persistent.

    • since 4.14

    Combining sequences

    val append : 'a t -> 'a t -> 'a t

    append xs ys is the concatenation of the sequences xs and ys.

    Its elements are the elements of xs, followed by the elements of ys.

    • since 4.11
    val concat : 'a t t -> 'a t

    If xss is a sequence of sequences, then concat xss is its concatenation.

    If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

    • since 4.13
    val flat_map : ('a -> 'b t) -> 'a t -> 'b t

    flat_map f xs is equivalent to concat (map f xs).

    val concat_map : ('a -> 'b t) -> 'a t -> 'b t

    concat_map f xs is equivalent to concat (map f xs).

    concat_map is an alias for flat_map.

    • since 4.13
    val zip : 'a t -> 'b t -> ('a * 'b) t

    zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

    • since 4.14
    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

    map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

    • since 4.14
    val interleave : 'a t -> 'a t -> 'a t

    interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

    When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

    • since 4.14
    val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

    If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

    For more details on comparison functions, see Array.sort.

    • since 4.14
    val product : 'a t -> 'b t -> ('a * 'b) t

    product xs ys is the Cartesian product of the sequences xs and ys.

    For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

    The order in which the pairs appear is unspecified.

    The sequences xs and ys are not required to be finite.

    The sequences xs and ys must be persistent.

    • since 4.14
    val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

    The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

    For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

    The order in which these elements appear is unspecified.

    The sequences xs and ys are not required to be finite.

    The sequences xs and ys must be persistent.

    map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

    • since 4.14

    Splitting a sequence into two sequences

    val unzip : ('a * 'b) t -> 'a t * 'b t

    unzip transforms a sequence of pairs into a pair of sequences.

    unzip xs is equivalent to (map fst xs, map snd xs).

    Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

    • since 4.14
    val split : ('a * 'b) t -> 'a t * 'b t

    split is an alias for unzip.

    • since 4.14
    val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t

    partition_map f xs returns a pair of sequences (ys, zs), where:

    • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
    • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

    partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

    Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

    • since 4.14
    val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

    partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

    partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

    Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

    • since 4.14

    Converting between sequences and dispensers

    A dispenser is a representation of a sequence as a function of type unit -> 'a option. Every time this function is invoked, it returns the next element of the sequence. When there are no more elements, it returns None. A dispenser has mutable internal state, therefore is ephemeral: the sequence that it represents can be consumed at most once.

    val of_dispenser : (unit -> 'a option) -> 'a t

    of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

    • since 4.14
    val to_dispenser : 'a t -> unit -> 'a option

    to_dispenser xs is a fresh dispenser on the sequence xs.

    This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

    • since 4.14

    Sequences of integers

    val ints : int -> int t

    ints i is the infinite sequence of the integers beginning at i and counting up.

    • since 4.14
    \ No newline at end of file +Seq (ocaml.Stdlib.Seq)

    Module Stdlib.Seq

    Sequences.

    A sequence of type 'a Seq.t can be thought of as a delayed list, that is, a list whose elements are computed only when they are demanded by a consumer. This allows sequences to be produced and transformed lazily (one element at a time) rather than eagerly (all elements at once). This also allows constructing conceptually infinite sequences.

    The type 'a Seq.t is defined as a synonym for unit -> 'a Seq.node. This is a function type: therefore, it is opaque. The consumer can query a sequence in order to request the next element (if there is one), but cannot otherwise inspect the sequence in any way.

    Because it is opaque, the type 'a Seq.t does not reveal whether a sequence is:

    • persistent, which means that the sequence can be used as many times as desired, producing the same elements every time, just like an immutable list; or
    • ephemeral, which means that the sequence is not persistent. Querying an ephemeral sequence might have an observable side effect, such as incrementing a mutable counter. As a common special case, an ephemeral sequence can be affine, which means that it must be queried at most once.

    It also does not reveal whether the elements of the sequence are:

    • pre-computed and stored in memory, which means that querying the sequence is cheap;
    • computed when first demanded and then stored in memory, which means that querying the sequence once can be expensive, but querying the same sequence again is cheap; or
    • re-computed every time they are demanded, which may or may not be cheap.

    It is up to the programmer to keep these distinctions in mind so as to understand the time and space requirements of sequences.

    For the sake of simplicity, most of the documentation that follows is written under the implicit assumption that the sequences at hand are persistent. We normally do not point out when or how many times each function is invoked, because that would be too verbose. For instance, in the description of map, we write: "if xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ...". If we wished to be more explicit, we could point out that the transformation takes place on demand: that is, the elements of map f xs are computed only when they are demanded. In other words, the definition let ys = map f xs terminates immediately and does not invoke f. The function call f x0 takes place only when the first element of ys is demanded, via the function call ys(). Furthermore, calling ys() twice causes f x0 to be called twice as well. If one wishes for f to be applied at most once to each element of xs, even in scenarios where ys is queried more than once, then one should use let ys = memoize (map f xs).

    As a general rule, the functions that build sequences, such as map, filter, scan, take, etc., produce sequences whose elements are computed only on demand. The functions that eagerly consume sequences, such as is_empty, find, length, iter, fold_left, etc., are the functions that force computation to take place.

    When possible, we recommend using sequences rather than dispensers (functions of type unit -> 'a option that produce elements upon demand). Whereas sequences can be persistent or ephemeral, dispensers are always ephemeral, and are typically more difficult to work with than sequences. Two conversion functions, to_dispenser and of_dispenser, are provided.

    • since 4.07
    type 'a t = unit -> 'a node

    A sequence xs of type 'a t is a delayed list of elements of type 'a. Such a sequence is queried by performing a function application xs(). This function application returns a node, allowing the caller to determine whether the sequence is empty or nonempty, and in the latter case, to obtain its head and tail.

    and +'a node =
    1. | Nil
    2. | Cons of 'a * 'a t

    A node is either Nil, which means that the sequence is empty, or Cons (x, xs), which means that x is the first element of the sequence and that xs is the remainder of the sequence.

    Consuming sequences

    The functions in this section consume their argument, a sequence, either partially or completely:

    • is_empty and uncons consume the sequence down to depth 1. That is, they demand the first argument of the sequence, if there is one.
    • iter, fold_left, length, etc., consume the sequence all the way to its end. They terminate only if the sequence is finite.
    • for_all, exists, find, etc. consume the sequence down to a certain depth, which is a priori unpredictable.

    Similarly, among the functions that consume two sequences, one can distinguish two groups:

    • iter2 and fold_left2 consume both sequences all the way to the end, provided the sequences have the same length.
    • for_all2, exists2, equal, compare consume the sequences down to a certain depth, which is a priori unpredictable.

    The functions that consume two sequences can be applied to two sequences of distinct lengths: in that case, the excess elements in the longer sequence are ignored. (It may be the case that one excess element is demanded, even though this element is not used.)

    None of the functions in this section is lazy. These functions are consumers: they force some computation to take place.

    val is_empty : 'a t -> bool

    is_empty xs determines whether the sequence xs is empty.

    It is recommended that the sequence xs be persistent. Indeed, is_empty xs demands the head of the sequence xs, so, if xs is ephemeral, it may be the case that xs cannot be used any more after this call has taken place.

    • since 4.14
    val uncons : 'a t -> ('a * 'a t) option

    If xs is empty, then uncons xs is None.

    If xs is nonempty, then uncons xs is Some (x, ys) where x is the head of the sequence and ys its tail.

    • since 4.14
    val length : 'a t -> int

    length xs is the length of the sequence xs.

    The sequence xs must be finite.

    • since 4.14
    val iter : ('a -> unit) -> 'a t -> unit

    iter f xs invokes f x successively for every element x of the sequence xs, from left to right.

    It terminates only if the sequence xs is finite.

    val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold_left f _ xs invokes f _ x successively for every element x of the sequence xs, from left to right.

    An accumulator of type 'a is threaded through the calls to f.

    It terminates only if the sequence xs is finite.

    val iteri : (int -> 'a -> unit) -> 'a t -> unit

    iteri f xs invokes f i x successively for every element x located at index i in the sequence xs.

    It terminates only if the sequence xs is finite.

    iteri f xs is equivalent to iter (fun (i, x) -> f i x) (zip (ints 0) xs).

    • since 4.14
    val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold_lefti f _ xs invokes f _ i x successively for every element x located at index i of the sequence xs.

    An accumulator of type 'b is threaded through the calls to f.

    It terminates only if the sequence xs is finite.

    fold_lefti f accu xs is equivalent to fold_left (fun accu (i, x) -> f accu i x) accu (zip (ints 0) xs).

    • since 4.14
    val for_all : ('a -> bool) -> 'a t -> bool

    for_all p xs determines whether all elements x of the sequence xs satisfy p x.

    The sequence xs must be finite.

    • since 4.14
    val exists : ('a -> bool) -> 'a t -> bool

    exists xs p determines whether at least one element x of the sequence xs satisfies p x.

    The sequence xs must be finite.

    • since 4.14
    val find : ('a -> bool) -> 'a t -> 'a option

    find p xs returns Some x, where x is the first element of the sequence xs that satisfies p x, if there is such an element.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 4.14
    val find_index : ('a -> bool) -> 'a t -> int option

    find_index p xs returns Some i, where i is the index of the first element of the sequence xs that satisfies p x, if there is such an element.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 5.1
    val find_map : ('a -> 'b option) -> 'a t -> 'b option

    find_map f xs returns Some y, where x is the first element of the sequence xs such that f x = Some _, if there is such an element, and where y is defined by f x = Some y.

    It returns None if there is no such element.

    The sequence xs must be finite.

    • since 4.14
    val find_mapi : (int -> 'a -> 'b option) -> 'a t -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    The sequence xs must be finite.

    • since 5.1
    val iter2 : ('a -> 'b -> unit) -> 'a t -> 'b t -> unit

    iter2 f xs ys invokes f x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    Iteration terminates only if at least one of the sequences xs and ys is finite.

    iter2 f xs ys is equivalent to iter (fun (x, y) -> f x y) (zip xs ys).

    • since 4.14
    val fold_left2 : ('acc -> 'a -> 'b -> 'acc) -> 'acc -> 'a t -> 'b t -> 'acc

    fold_left2 f _ xs ys invokes f _ x y successively for every pair (x, y) of elements drawn synchronously from the sequences xs and ys.

    An accumulator of type 'a is threaded through the calls to f.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    Iteration terminates only if at least one of the sequences xs and ys is finite.

    fold_left2 f accu xs ys is equivalent to fold_left (fun accu (x, y) -> f accu x y) (zip xs ys).

    • since 4.14
    val for_all2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    for_all2 p xs ys determines whether all pairs (x, y) of elements drawn synchronously from the sequences xs and ys satisfy p x y.

    If the sequences xs and ys have different lengths, then iteration stops as soon as one sequence is exhausted; the excess elements in the other sequence are ignored. In particular, if xs or ys is empty, then for_all2 p xs ys is true. This is where for_all2 and equal differ: equal eq xs ys can be true only if xs and ys have the same length.

    At least one of the sequences xs and ys must be finite.

    for_all2 p xs ys is equivalent to for_all (fun b -> b) (map2 p xs ys).

    • since 4.14
    val exists2 : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    exists2 p xs ys determines whether some pair (x, y) of elements drawn synchronously from the sequences xs and ys satisfies p x y.

    If the sequences xs and ys have different lengths, then iteration must stop as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    At least one of the sequences xs and ys must be finite.

    exists2 p xs ys is equivalent to exists (fun b -> b) (map2 p xs ys).

    • since 4.14
    val equal : ('a -> 'b -> bool) -> 'a t -> 'b t -> bool

    Provided the function eq defines an equality on elements, equal eq xs ys determines whether the sequences xs and ys are pointwise equal.

    At least one of the sequences xs and ys must be finite.

    • since 4.14
    val compare : ('a -> 'b -> int) -> 'a t -> 'b t -> int

    Provided the function cmp defines a preorder on elements, compare cmp xs ys compares the sequences xs and ys according to the lexicographic preorder.

    For more details on comparison functions, see Array.sort.

    At least one of the sequences xs and ys must be finite.

    • since 4.14

    Constructing sequences

    The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

    val empty : 'a t

    empty is the empty sequence. It has no elements. Its length is 0.

    val return : 'a -> 'a t

    return x is the sequence whose sole element is x. Its length is 1.

    val cons : 'a -> 'a t -> 'a t

    cons x xs is the sequence that begins with the element x, followed with the sequence xs.

    Writing cons (f()) xs causes the function call f() to take place immediately. For this call to be delayed until the sequence is queried, one must instead write (fun () -> Cons(f(), xs)).

    • since 4.11
    val init : int -> (int -> 'a) -> 'a t

    init n f is the sequence f 0; f 1; ...; f (n-1).

    n must be nonnegative.

    If desired, the infinite sequence f 0; f 1; ... can be defined as map f (ints 0).

    • since 4.14
    val unfold : ('b -> ('a * 'b) option) -> 'b -> 'a t

    unfold constructs a sequence out of a step function and an initial state.

    If f u is None then unfold f u is the empty sequence. If f u is Some (x, u') then unfold f u is the nonempty sequence cons x (unfold f u').

    For example, unfold (function [] -> None | h :: t -> Some (h, t)) l is equivalent to List.to_seq l.

    • since 4.11
    val repeat : 'a -> 'a t

    repeat x is the infinite sequence where the element x is repeated indefinitely.

    repeat x is equivalent to cycle (return x).

    • since 4.14
    val forever : (unit -> 'a) -> 'a t

    forever f is an infinite sequence where every element is produced (on demand) by the function call f().

    For instance, forever Random.bool is an infinite sequence of random bits.

    forever f is equivalent to map f (repeat ()).

    • since 4.14
    val cycle : 'a t -> 'a t

    cycle xs is the infinite sequence that consists of an infinite number of repetitions of the sequence xs.

    If xs is an empty sequence, then cycle xs is empty as well.

    Consuming (a prefix of) the sequence cycle xs once can cause the sequence xs to be consumed more than once. Therefore, xs must be persistent.

    • since 4.14
    val iterate : ('a -> 'a) -> 'a -> 'a t

    iterate f x is the infinite sequence whose elements are x, f x, f (f x), and so on.

    In other words, it is the orbit of the function f, starting at x.

    • since 4.14

    Transforming sequences

    The functions in this section are lazy: that is, they return sequences whose elements are computed only when demanded.

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f xs is the image of the sequence xs through the transformation f.

    If xs is the sequence x0; x1; ... then map f xs is the sequence f x0; f x1; ....

    val mapi : (int -> 'a -> 'b) -> 'a t -> 'b t

    mapi is analogous to map, but applies the function f to an index and an element.

    mapi f xs is equivalent to map2 f (ints 0) xs.

    • since 4.14
    val filter : ('a -> bool) -> 'a t -> 'a t

    filter p xs is the sequence of the elements x of xs that satisfy p x.

    In other words, filter p xs is the sequence xs, deprived of the elements x such that p x is false.

    val filter_map : ('a -> 'b option) -> 'a t -> 'b t

    filter_map f xs is the sequence of the elements y such that f x = Some y, where x ranges over xs.

    filter_map f xs is equivalent to map Option.get (filter Option.is_some (map f xs)).

    val scan : ('b -> 'a -> 'b) -> 'b -> 'a t -> 'b t

    If xs is a sequence [x0; x1; x2; ...], then scan f a0 xs is a sequence of accumulators [a0; a1; a2; ...] where a1 is f a0 x0, a2 is f a1 x1, and so on.

    Thus, scan f a0 xs is conceptually related to fold_left f a0 xs. However, instead of performing an eager iteration and immediately returning the final accumulator, it returns a sequence of accumulators.

    For instance, scan (+) 0 transforms a sequence of integers into the sequence of its partial sums.

    If xs has length n then scan f a0 xs has length n+1.

    • since 4.14
    val take : int -> 'a t -> 'a t

    take n xs is the sequence of the first n elements of xs.

    If xs has fewer than n elements, then take n xs is equivalent to xs.

    n must be nonnegative.

    • since 4.14
    val drop : int -> 'a t -> 'a t

    drop n xs is the sequence xs, deprived of its first n elements.

    If xs has fewer than n elements, then drop n xs is empty.

    n must be nonnegative.

    drop is lazy: the first n+1 elements of the sequence xs are demanded only when the first element of drop n xs is demanded. For this reason, drop 1 xs is not equivalent to tail xs, which queries xs immediately.

    • since 4.14
    val take_while : ('a -> bool) -> 'a t -> 'a t

    take_while p xs is the longest prefix of the sequence xs where every element x satisfies p x.

    • since 4.14
    val drop_while : ('a -> bool) -> 'a t -> 'a t

    drop_while p xs is the sequence xs, deprived of the prefix take_while p xs.

    • since 4.14
    val group : ('a -> 'a -> bool) -> 'a t -> 'a t t

    Provided the function eq defines an equality on elements, group eq xs is the sequence of the maximal runs of adjacent duplicate elements of the sequence xs.

    Every element of group eq xs is a nonempty sequence of equal elements.

    The concatenation concat (group eq xs) is equal to xs.

    Consuming group eq xs, and consuming the sequences that it contains, can cause xs to be consumed more than once. Therefore, xs must be persistent.

    • since 4.14
    val memoize : 'a t -> 'a t

    The sequence memoize xs has the same elements as the sequence xs.

    Regardless of whether xs is ephemeral or persistent, memoize xs is persistent: even if it is queried several times, xs is queried at most once.

    The construction of the sequence memoize xs internally relies on suspensions provided by the module Lazy. These suspensions are not thread-safe. Therefore, the sequence memoize xs must not be queried by multiple threads concurrently.

    • since 4.14
    exception Forced_twice

    This exception is raised when a sequence returned by once (or a suffix of it) is queried more than once.

    • since 4.14
    val once : 'a t -> 'a t

    The sequence once xs has the same elements as the sequence xs.

    Regardless of whether xs is ephemeral or persistent, once xs is an ephemeral sequence: it can be queried at most once. If it (or a suffix of it) is queried more than once, then the exception Forced_twice is raised. This can be useful, while debugging or testing, to ensure that a sequence is consumed at most once.

    • raises Forced_twice

      if once xs, or a suffix of it, is queried more than once.

    • since 4.14
    val transpose : 'a t t -> 'a t t

    If xss is a matrix (a sequence of rows), then transpose xss is the sequence of the columns of the matrix xss.

    The rows of the matrix xss are not required to have the same length.

    The matrix xss is not required to be finite (in either direction).

    The matrix xss must be persistent.

    • since 4.14

    Combining sequences

    val append : 'a t -> 'a t -> 'a t

    append xs ys is the concatenation of the sequences xs and ys.

    Its elements are the elements of xs, followed by the elements of ys.

    • since 4.11
    val concat : 'a t t -> 'a t

    If xss is a sequence of sequences, then concat xss is its concatenation.

    If xss is the sequence xs0; xs1; ... then concat xss is the sequence xs0 @ xs1 @ ....

    • since 4.13
    val flat_map : ('a -> 'b t) -> 'a t -> 'b t

    flat_map f xs is equivalent to concat (map f xs).

    val concat_map : ('a -> 'b t) -> 'a t -> 'b t

    concat_map f xs is equivalent to concat (map f xs).

    concat_map is an alias for flat_map.

    • since 4.13
    val zip : 'a t -> 'b t -> ('a * 'b) t

    zip xs ys is the sequence of pairs (x, y) drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    zip xs ys is equivalent to map2 (fun a b -> (a, b)) xs ys.

    • since 4.14
    val map2 : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

    map2 f xs ys is the sequence of the elements f x y, where the pairs (x, y) are drawn synchronously from the sequences xs and ys.

    If the sequences xs and ys have different lengths, then the sequence ends as soon as one sequence is exhausted; the excess elements in the other sequence are ignored.

    map2 f xs ys is equivalent to map (fun (x, y) -> f x y) (zip xs ys).

    • since 4.14
    val interleave : 'a t -> 'a t -> 'a t

    interleave xs ys is the sequence that begins with the first element of xs, continues with the first element of ys, and so on.

    When one of the sequences xs and ys is exhausted, interleave xs ys continues with the rest of the other sequence.

    • since 4.14
    val sorted_merge : ('a -> 'a -> int) -> 'a t -> 'a t -> 'a t

    If the sequences xs and ys are sorted according to the total preorder cmp, then sorted_merge cmp xs ys is the sorted sequence obtained by merging the sequences xs and ys.

    For more details on comparison functions, see Array.sort.

    • since 4.14
    val product : 'a t -> 'b t -> ('a * 'b) t

    product xs ys is the Cartesian product of the sequences xs and ys.

    For every element x of xs and for every element y of ys, the pair (x, y) appears once as an element of product xs ys.

    The order in which the pairs appear is unspecified.

    The sequences xs and ys are not required to be finite.

    The sequences xs and ys must be persistent.

    • since 4.14
    val map_product : ('a -> 'b -> 'c) -> 'a t -> 'b t -> 'c t

    The sequence map_product f xs ys is the image through f of the Cartesian product of the sequences xs and ys.

    For every element x of xs and for every element y of ys, the element f x y appears once as an element of map_product f xs ys.

    The order in which these elements appear is unspecified.

    The sequences xs and ys are not required to be finite.

    The sequences xs and ys must be persistent.

    map_product f xs ys is equivalent to map (fun (x, y) -> f x y) (product xs ys).

    • since 4.14

    Splitting a sequence into two sequences

    val unzip : ('a * 'b) t -> 'a t * 'b t

    unzip transforms a sequence of pairs into a pair of sequences.

    unzip xs is equivalent to (map fst xs, map snd xs).

    Querying either of the sequences returned by unzip xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use unzip (memoize xs).

    • since 4.14
    val split : ('a * 'b) t -> 'a t * 'b t

    split is an alias for unzip.

    • since 4.14
    val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b t * 'c t

    partition_map f xs returns a pair of sequences (ys, zs), where:

    • ys is the sequence of the elements y such that f x = Left y, where x ranges over xs;
    • zs is the sequence of the elements z such that f x = Right z, where x ranges over xs.

    partition_map f xs is equivalent to a pair of filter_map Either.find_left (map f xs) and filter_map Either.find_right (map f xs).

    Querying either of the sequences returned by partition_map f xs causes xs to be queried. Therefore, querying both of them causes xs to be queried twice. Thus, xs must be persistent and cheap. If that is not the case, use partition_map f (memoize xs).

    • since 4.14
    val partition : ('a -> bool) -> 'a t -> 'a t * 'a t

    partition p xs returns a pair of the subsequence of the elements of xs that satisfy p and the subsequence of the elements of xs that do not satisfy p.

    partition p xs is equivalent to filter p xs, filter (fun x -> not (p x)) xs.

    Consuming both of the sequences returned by partition p xs causes xs to be consumed twice and causes the function f to be applied twice to each element of the list. Therefore, f should be pure and cheap. Furthermore, xs should be persistent and cheap. If that is not the case, use partition p (memoize xs).

    • since 4.14

    Converting between sequences and dispensers

    A dispenser is a representation of a sequence as a function of type unit -> 'a option. Every time this function is invoked, it returns the next element of the sequence. When there are no more elements, it returns None. A dispenser has mutable internal state, therefore is ephemeral: the sequence that it represents can be consumed at most once.

    val of_dispenser : (unit -> 'a option) -> 'a t

    of_dispenser it is the sequence of the elements produced by the dispenser it. It is an ephemeral sequence: it can be consumed at most once. If a persistent sequence is needed, use memoize (of_dispenser it).

    • since 4.14
    val to_dispenser : 'a t -> unit -> 'a option

    to_dispenser xs is a fresh dispenser on the sequence xs.

    This dispenser has mutable internal state, which is not protected by a lock; so, it must not be used by several threads concurrently.

    • since 4.14

    Sequences of integers

    val ints : int -> int t

    ints i is the infinite sequence of the integers beginning at i and counting up.

    • since 4.14
    diff --git a/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html b/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html index 249c2f5..e4e68c6 100644 --- a/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html +++ b/ocaml/Stdlib/Set/Make/argument-1-Ord/index.html @@ -1,2 +1,2 @@ -Ord (ocaml.Stdlib.Set.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +Ord (ocaml.Stdlib.Set.Make.Ord)

    Parameter Make.Ord

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/Set/Make/index.html b/ocaml/Stdlib/Set/Make/index.html index 9dad023..dcab752 100644 --- a/ocaml/Stdlib/Set/Make/index.html +++ b/ocaml/Stdlib/Set/Make/index.html @@ -1,3 +1,2 @@ -Make (ocaml.Stdlib.Set.Make)

    Module Set.Make

    Functor building an implementation of the set structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Sets

    type elt = Ord.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Make (ocaml.Stdlib.Set.Make)

    Module Set.Make

    Functor building an implementation of the set structure given a totally ordered type.

    Parameters

    module Ord : OrderedType

    Signature

    Sets

    type elt = Ord.t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/Set/index.html b/ocaml/Stdlib/Set/index.html index aad3f87..c072c46 100644 --- a/ocaml/Stdlib/Set/index.html +++ b/ocaml/Stdlib/Set/index.html @@ -1,13 +1,13 @@ -Set (ocaml.Stdlib.Set)

    Module Stdlib.Set

    Sets over ordered types.

    This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

    The Make functor constructs implementations for any type, given a compare function. For instance:

    module IntPairs =
    -  struct
    -    type t = int * int
    -    let compare (x0,y0) (x1,y1) =
    -      match Stdlib.compare x0 x1 with
    -          0 -> Stdlib.compare y0 y1
    -        | c -> c
    -  end
    +Set (ocaml.Stdlib.Set)

    Module Stdlib.Set

    Sets over ordered types.

    This module implements the set data structure, given a total ordering function over the set elements. All operations over sets are purely applicative (no side-effects). The implementation uses balanced binary trees, and is therefore reasonably efficient: insertion and membership take time logarithmic in the size of the set, for instance.

    The Make functor constructs implementations for any type, given a compare function. For instance:

      module IntPairs =
    +    struct
    +      type t = int * int
    +      let compare (x0,y0) (x1,y1) =
    +        match Stdlib.compare x0 x1 with
    +            0 -> Stdlib.compare y0 y1
    +          | c -> c
    +    end
     
    -module PairsSet = Set.Make(IntPairs)
    +  module PairsSet = Set.Make(IntPairs)
     
    -let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

    This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : S with type elt = Ord.t

    Functor building an implementation of the set structure given a totally ordered type.

    \ No newline at end of file + let m = PairsSet.(empty |> add (2,3) |> add (5,7) |> add (11,13))

    This creates a new module PairsSet, with a new type PairsSet.t of sets of int * int.

    module type OrderedType = sig ... end

    Input signature of the functor Make.

    module type S = sig ... end

    Output signature of the functor Make.

    module Make (Ord : OrderedType) : S with type elt = Ord.t

    Functor building an implementation of the set structure given a totally ordered type.

    diff --git a/ocaml/Stdlib/Set/module-type-OrderedType/index.html b/ocaml/Stdlib/Set/module-type-OrderedType/index.html index 776f181..6cf6a88 100644 --- a/ocaml/Stdlib/Set/module-type-OrderedType/index.html +++ b/ocaml/Stdlib/Set/module-type-OrderedType/index.html @@ -1,2 +1,2 @@ -OrderedType (ocaml.Stdlib.Set.OrderedType)

    Module type Set.OrderedType

    Input signature of the functor Make.

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    \ No newline at end of file +OrderedType (ocaml.Stdlib.Set.OrderedType)

    Module type Set.OrderedType

    Input signature of the functor Make.

    type t

    The type of the set elements.

    val compare : t -> t -> int

    A total ordering function over the set elements. This is a two-argument function f such that f e1 e2 is zero if the elements e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    diff --git a/ocaml/Stdlib/Set/module-type-S/index.html b/ocaml/Stdlib/Set/module-type-S/index.html index 2fbbf39..4669fa0 100644 --- a/ocaml/Stdlib/Set/module-type-S/index.html +++ b/ocaml/Stdlib/Set/module-type-S/index.html @@ -1,3 +1,2 @@ -S (ocaml.Stdlib.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    Sets

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +S (ocaml.Stdlib.Set.S)

    Module type Set.S

    Output signature of the functor Make.

    Sets

    type elt

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Stdlib/Stack/index.html b/ocaml/Stdlib/Stack/index.html index 160aa53..46200b5 100644 --- a/ocaml/Stdlib/Stack/index.html +++ b/ocaml/Stdlib/Stack/index.html @@ -1,2 +1,2 @@ -Stack (ocaml.Stdlib.Stack)

    Module Stdlib.Stack

    Last-in first-out stacks.

    This module implements stacks (LIFOs), with in-place modification.

    Unsynchronized accesses

    Unsynchronized accesses to a stack may lead to an invalid queue state. Thus, concurrent accesses to stacks must be synchronized (for instance with a Mutex.t).

    type !'a t

    The type of stacks containing elements of type 'a.

    exception Empty

    Raised when Stack.pop or Stack.top is applied to an empty stack.

    val create : unit -> 'a t

    Return a new stack, initially empty.

    val push : 'a -> 'a t -> unit

    push x s adds the element x at the top of stack s.

    val pop : 'a t -> 'a

    pop s removes and returns the topmost element in stack s, or raises Empty if the stack is empty.

    val pop_opt : 'a t -> 'a option

    pop_opt s removes and returns the topmost element in stack s, or returns None if the stack is empty.

    • since 4.08
    val drop : 'a t -> unit

    drop s removes the topmost element in stack s, or raises Empty if the stack is empty.

    • since 5.1
    val top : 'a t -> 'a

    top s returns the topmost element in stack s, or raises Empty if the stack is empty.

    val top_opt : 'a t -> 'a option

    top_opt s returns the topmost element in stack s, or None if the stack is empty.

    • since 4.08
    val clear : 'a t -> unit

    Discard all elements from a stack.

    val copy : 'a t -> 'a t

    Return a copy of the given stack.

    val is_empty : 'a t -> bool

    Return true if the given stack is empty, false otherwise.

    val length : 'a t -> int

    Return the number of elements in a stack. Time complexity O(1)

    val iter : ('a -> unit) -> 'a t -> unit

    iter f s applies f in turn to all elements of s, from the element at the top of the stack to the element at the bottom of the stack. The stack itself is unchanged.

    val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold f accu s is (f (... (f (f accu x1) x2) ...) xn) where x1 is the top of the stack, x2 the second element, and xn the bottom element. The stack is unchanged.

    • since 4.03

    Stacks and Sequences

    val to_seq : 'a t -> 'a Seq.t

    Iterate on the stack, top to bottom. It is safe to modify the stack during iteration.

    • since 4.07
    val add_seq : 'a t -> 'a Seq.t -> unit

    Add the elements from the sequence on the top of the stack.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a t

    Create a stack from the sequence.

    • since 4.07
    \ No newline at end of file +Stack (ocaml.Stdlib.Stack)

    Module Stdlib.Stack

    Last-in first-out stacks.

    This module implements stacks (LIFOs), with in-place modification.

    Unsynchronized accesses

    Unsynchronized accesses to a stack may lead to an invalid queue state. Thus, concurrent accesses to stacks must be synchronized (for instance with a Mutex.t).

    type !'a t

    The type of stacks containing elements of type 'a.

    exception Empty

    Raised when Stack.pop or Stack.top is applied to an empty stack.

    val create : unit -> 'a t

    Return a new stack, initially empty.

    val push : 'a -> 'a t -> unit

    push x s adds the element x at the top of stack s.

    val pop : 'a t -> 'a

    pop s removes and returns the topmost element in stack s, or raises Empty if the stack is empty.

    val pop_opt : 'a t -> 'a option

    pop_opt s removes and returns the topmost element in stack s, or returns None if the stack is empty.

    • since 4.08
    val drop : 'a t -> unit

    drop s removes the topmost element in stack s, or raises Empty if the stack is empty.

    • since 5.1
    val top : 'a t -> 'a

    top s returns the topmost element in stack s, or raises Empty if the stack is empty.

    val top_opt : 'a t -> 'a option

    top_opt s returns the topmost element in stack s, or None if the stack is empty.

    • since 4.08
    val clear : 'a t -> unit

    Discard all elements from a stack.

    val copy : 'a t -> 'a t

    Return a copy of the given stack.

    val is_empty : 'a t -> bool

    Return true if the given stack is empty, false otherwise.

    val length : 'a t -> int

    Return the number of elements in a stack. Time complexity O(1)

    val iter : ('a -> unit) -> 'a t -> unit

    iter f s applies f in turn to all elements of s, from the element at the top of the stack to the element at the bottom of the stack. The stack itself is unchanged.

    val fold : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc

    fold f accu s is (f (... (f (f accu x1) x2) ...) xn) where x1 is the top of the stack, x2 the second element, and xn the bottom element. The stack is unchanged.

    • since 4.03

    Stacks and Sequences

    val to_seq : 'a t -> 'a Seq.t

    Iterate on the stack, top to bottom. It is safe to modify the stack during iteration.

    • since 4.07
    val add_seq : 'a t -> 'a Seq.t -> unit

    Add the elements from the sequence on the top of the stack.

    • since 4.07
    val of_seq : 'a Seq.t -> 'a t

    Create a stack from the sequence.

    • since 4.07
    diff --git a/ocaml/Stdlib/StdLabels/index.html b/ocaml/Stdlib/StdLabels/index.html index 11b4024..4e4167e 100644 --- a/ocaml/Stdlib/StdLabels/index.html +++ b/ocaml/Stdlib/StdLabels/index.html @@ -1,6 +1,6 @@ -StdLabels (ocaml.Stdlib.StdLabels)

    Module Stdlib.StdLabels

    Standard labeled libraries.

    This meta-module provides versions of the Array, Bytes, List and String modules where function arguments are systematically labeled. It is intended to be opened at the top of source files, as shown below.

    open StdLabels
    +StdLabels (ocaml.Stdlib.StdLabels)

    Module Stdlib.StdLabels

    Standard labeled libraries.

    This meta-module provides versions of the Array, Bytes, List and String modules where function arguments are systematically labeled. It is intended to be opened at the top of source files, as shown below.

      open StdLabels
     
    -let to_upper = String.map ~f:Char.uppercase_ascii
    -let seq len = List.init ~f:(fun i -> i) ~len
    -let everything = Array.create_matrix ~dimx:42 ~dimy:42 42
    module Array = ArrayLabels
    module Bytes = BytesLabels
    module List = ListLabels
    module String = StringLabels
    \ No newline at end of file + let to_upper = String.map ~f:Char.uppercase_ascii + let seq len = List.init ~f:(fun i -> i) ~len + let everything = Array.create_matrix ~dimx:42 ~dimy:42 42
    module Array = ArrayLabels
    module Bytes = BytesLabels
    module List = ListLabels
    module String = StringLabels
    diff --git a/ocaml/Stdlib/String/index.html b/ocaml/Stdlib/String/index.html index 3add4d2..57594cf 100644 --- a/ocaml/Stdlib/String/index.html +++ b/ocaml/Stdlib/String/index.html @@ -1,6 +1,5 @@ -String (ocaml.Stdlib.String)

    Module Stdlib.String

    Strings.

    A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

    The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

    positions  0   1   2   3   4    n-1    n
    +String (ocaml.Stdlib.String)

    Module Stdlib.String

    Strings.

    A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

    The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

    positions  0   1   2   3   4    n-1    n
                +---+---+---+---+     +-----+
       indices  | 0 | 1 | 2 | 3 | ... | n-1 |
    -           +---+---+---+---+     +-----+
    • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
    • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

    Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

    Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

    Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

    The labeled version of this module can be used as described in the StdLabels module.

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> (int -> char) -> string

    init n f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : string -> int -> bytes -> int -> int -> unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : string -> string list -> string

    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> int -> int -> string

    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val split_on_char : char -> string -> string list

    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) - (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.04 (4.05 in StringLabels)

    Transforming

    val map : (char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : (int -> char -> char) -> string -> string

    mapi f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val for_all : (char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)

    Traversing

    val iter : (char -> unit) -> string -> unit

    iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : (int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    \ No newline at end of file + +---+---+---+---+ +-----+
    • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
    • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

    Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

    Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

    Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

    The labeled version of this module can be used as described in the StdLabels module.

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> (int -> char) -> string

    init n f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : string -> int -> bytes -> int -> int -> unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : string -> string list -> string

    concat sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.03 (4.05 in StringLabels)
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> int -> int -> string

    sub s pos len is a string of length len, containing the substring of s that starts at position pos and has length len.

    val split_on_char : char -> string -> string list

    split_on_char sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.04 (4.05 in StringLabels)

    Transforming

    val map : (char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : (int -> char -> char) -> string -> string

    mapi f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : ('acc -> char -> 'acc) -> 'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : (char -> 'acc -> 'acc) -> string -> 'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val for_all : (char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : (char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.03 (4.05 in StringLabels)

    Traversing

    val iter : (char -> unit) -> string -> unit

    iter f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : (int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    diff --git a/ocaml/Stdlib/StringLabels/index.html b/ocaml/Stdlib/StringLabels/index.html index 76baf8d..f842848 100644 --- a/ocaml/Stdlib/StringLabels/index.html +++ b/ocaml/Stdlib/StringLabels/index.html @@ -1,12 +1,11 @@ -StringLabels (ocaml.Stdlib.StringLabels)

    Module Stdlib.StringLabels

    Strings.

    A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

    The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

    positions  0   1   2   3   4    n-1    n
    +StringLabels (ocaml.Stdlib.StringLabels)

    Module Stdlib.StringLabels

    Strings.

    A string s of length n is an indexable and immutable sequence of n bytes. For historical reasons these bytes are referred to as characters.

    The semantics of string functions is defined in terms of indices and positions. These are depicted and described as follows.

    positions  0   1   2   3   4    n-1    n
                +---+---+---+---+     +-----+
       indices  | 0 | 1 | 2 | 3 | ... | n-1 |
    -           +---+---+---+---+     +-----+
    • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
    • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

    Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

    Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

    Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

    The labeled version of this module can be used as described in the StdLabels module.

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> f:(int -> char) -> string

    init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : - src:string -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : sep:string -> string list -> string

    concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.05
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> pos:int -> len:int -> string

    sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    val split_on_char : sep:char -> string -> string list

    split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) - (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.05

    Transforming

    val map : f:(char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : f:(int -> char -> char) -> string -> string

    mapi ~f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val for_all : f:(char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05

    Traversing

    val iter : f:(char -> unit) -> string -> unit

    iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : f:(int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    \ No newline at end of file + +---+---+---+---+ +-----+
    • An index i of s is an integer in the range [0;n-1]. It represents the ith byte (character) of s which can be accessed using the constant time string indexing operator s.[i].
    • A position i of s is an integer in the range [0;n]. It represents either the point at the beginning of the string, or the point between two indices, or the point at the end of the string. The ith byte index is between position i and i+1.

    Two integers start and len are said to define a valid substring of s if len >= 0 and start, start+len are positions of s.

    Unicode text. Strings being arbitrary sequences of bytes, they can hold any kind of textual encoding. However the recommended encoding for storing Unicode text in OCaml strings is UTF-8. This is the encoding used by Unicode escapes in string literals. For example the string "\u{1F42B}" is the UTF-8 encoding of the Unicode character U+1F42B.

    Past mutability. Before OCaml 4.02, strings used to be modifiable in place like Bytes.t mutable sequences of bytes. OCaml 4 had various compiler flags and configuration options to support the transition period from mutable to immutable strings. Those options are no longer available, and strings are now always immutable.

    The labeled version of this module can be used as described in the StdLabels module.

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    val init : int -> f:(int -> char) -> string

    init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : sep:string -> string list -> string

    concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • since 4.13

    Predicates and comparisons

    val equal : t -> t -> bool

    equal s0 s1 is true if and only if s0 and s1 are character-wise equal.

    • since 4.05
    val compare : t -> t -> int

    compare s0 s1 sorts s0 and s1 in lexicographical order. compare behaves like Stdlib.compare on strings but may be more efficient.

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> pos:int -> len:int -> string

    sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

    val split_on_char : sep:char -> string -> string list

    split_on_char ~sep s is the list of all (possibly empty) substrings of s that are delimited by the character sep.

    The function's result is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a string equal to the input (concat (make 1 sep) (split_on_char sep s) = s).
    • No string in the result contains the sep character.
    • since 4.05

    Transforming

    val map : f:(char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : f:(int -> char -> char) -> string -> string

    mapi ~f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val for_all : f:(char -> bool) -> string -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> string -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : string -> string

    lowercase_ascii s is s with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : string -> string

    capitalize_ascii s is s with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : string -> string

    uncapitalize_ascii s is s with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05

    Traversing

    val iter : f:(char -> unit) -> string -> unit

    iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : f:(int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : string -> int -> char -> int option

    index_from_opt s i c is the index of the first occurrence of c in s after position i (if any).

    • since 4.05
    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : string -> int -> char -> int option

    rindex_from_opt s i c is the index of the last occurrence of c in s before position i+1 (if any).

    • since 4.05
    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val index_opt : string -> char -> int option

    index_opt s c is String.index_from_opt s 0 c.

    • since 4.05
    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    val rindex_opt : string -> char -> int option

    rindex_opt s c is String.rindex_from_opt s (length s - 1) c.

    • since 4.05

    Strings and Sequences

    val to_seq : t -> char Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    diff --git a/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html b/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html index 04661b8..4fb51bc 100644 --- a/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/Make/argument-1-Immediate/index.html @@ -1,2 +1,2 @@ -Immediate (ocaml.Stdlib.Sys.Immediate64.Make.Immediate)

    Parameter Make.Immediate

    type t
    \ No newline at end of file +Immediate (ocaml.Stdlib.Sys.Immediate64.Make.Immediate)

    Parameter Make.Immediate

    type t
    diff --git a/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html b/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html index c3ffd42..5f57980 100644 --- a/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/Make/argument-2-Non_immediate/index.html @@ -1,2 +1,2 @@ -Non_immediate (ocaml.Stdlib.Sys.Immediate64.Make.Non_immediate)

    Parameter Make.Non_immediate

    type t
    \ No newline at end of file +Non_immediate (ocaml.Stdlib.Sys.Immediate64.Make.Non_immediate)

    Parameter Make.Non_immediate

    type t
    diff --git a/ocaml/Stdlib/Sys/Immediate64/Make/index.html b/ocaml/Stdlib/Sys/Immediate64/Make/index.html index aa4fd43..3c990cf 100644 --- a/ocaml/Stdlib/Sys/Immediate64/Make/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Sys.Immediate64.Make)

    Module Immediate64.Make

    Parameters

    Signature

    type t
    type 'a repr =
    1. | Immediate : Immediate.t repr
    2. | Non_immediate : Non_immediate.t repr
    val repr : t repr
    \ No newline at end of file +Make (ocaml.Stdlib.Sys.Immediate64.Make)

    Module Immediate64.Make

    Parameters

    Signature

    type t
    type 'a repr =
    1. | Immediate : Immediate.t repr
    2. | Non_immediate : Non_immediate.t repr
    val repr : t repr
    diff --git a/ocaml/Stdlib/Sys/Immediate64/index.html b/ocaml/Stdlib/Sys/Immediate64/index.html index f044fa2..c29fe3e 100644 --- a/ocaml/Stdlib/Sys/Immediate64/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/index.html @@ -1,5 +1,5 @@ -Immediate64 (ocaml.Stdlib.Sys.Immediate64)

    Module Sys.Immediate64

    This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

    • since 4.10
    module type Non_immediate = sig ... end
    module type Immediate = sig ... end
    module Make +Immediate64 (ocaml.Stdlib.Sys.Immediate64)

    Module Sys.Immediate64

    This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

    • since 4.10
    module type Non_immediate = sig ... end
    module type Immediate = sig ... end
    module Make (Immediate : Immediate) (Non_immediate : Non_immediate) : - sig ... end
    \ No newline at end of file + sig ... end
    diff --git a/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html b/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html index 6076f28..f7f007d 100644 --- a/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/module-type-Immediate/index.html @@ -1,2 +1,2 @@ -Immediate (ocaml.Stdlib.Sys.Immediate64.Immediate)

    Module type Immediate64.Immediate

    type t
    \ No newline at end of file +Immediate (ocaml.Stdlib.Sys.Immediate64.Immediate)

    Module type Immediate64.Immediate

    type t
    diff --git a/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html b/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html index cf6383f..32919ca 100644 --- a/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html +++ b/ocaml/Stdlib/Sys/Immediate64/module-type-Non_immediate/index.html @@ -1,2 +1,2 @@ -Non_immediate (ocaml.Stdlib.Sys.Immediate64.Non_immediate)

    Module type Immediate64.Non_immediate

    type t
    \ No newline at end of file +Non_immediate (ocaml.Stdlib.Sys.Immediate64.Non_immediate)

    Module type Immediate64.Non_immediate

    type t
    diff --git a/ocaml/Stdlib/Sys/index.html b/ocaml/Stdlib/Sys/index.html index 7726257..3bae799 100644 --- a/ocaml/Stdlib/Sys/index.html +++ b/ocaml/Stdlib/Sys/index.html @@ -1,4 +1,4 @@ -Sys (ocaml.Stdlib.Sys)

    Module Stdlib.Sys

    System interface.

    Every function in this module raises Sys_error with an informative message when the underlying system call signal an error.

    val argv : string array

    The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program.

    val executable_name : string

    The name of the file containing the executable currently running. This name may be absolute or relative to the current directory, depending on the platform and whether the program was compiled to bytecode or a native executable.

    val file_exists : string -> bool

    Test if a file with the given name exists.

    val is_directory : string -> bool

    Returns true if the given name refers to a directory, false if it refers to another kind of file.

    • raises Sys_error

      if no file exists with the given name.

    • since 3.10
    val is_regular_file : string -> bool

    Returns true if the given name refers to a regular file, false if it refers to another kind of file.

    • raises Sys_error

      if no file exists with the given name.

    • since 5.1
    val remove : string -> unit

    Remove the given file name from the file system.

    val rename : string -> string -> unit

    Rename a file or directory. rename oldpath newpath renames the file or directory called oldpath, giving it newpath as its new name, moving it between (parent) directories if needed. If a file named newpath already exists, its contents will be replaced with those of oldpath. Depending on the operating system, the metadata (permissions, owner, etc) of newpath can either be preserved or be replaced by those of oldpath.

    • since 4.06 concerning the "replace existing file" behavior
    val getenv : string -> string

    Return the value associated to a variable in the process environment.

    • raises Not_found

      if the variable is unbound.

    val getenv_opt : string -> string option

    Return the value associated to a variable in the process environment or None if the variable is unbound.

    • since 4.05
    val command : string -> int

    Execute the given shell command and return its exit code.

    The argument of Sys.command is generally the name of a command followed by zero, one or several arguments, separated by whitespace. The given argument is interpreted by a shell: either the Windows shell cmd.exe for the Win32 ports of OCaml, or the POSIX shell sh for other ports. It can contain shell builtin commands such as echo, and also special characters such as file redirections > and <, which will be honored by the shell.

    Conversely, whitespace or special shell characters occurring in command names or in their arguments must be quoted or escaped so that the shell does not interpret them. The quoting rules vary between the POSIX shell and the Windows shell. The Filename.quote_command performs the appropriate quoting given a command name, a list of arguments, and optional file redirections.

    val time : unit -> float

    Return the processor time, in seconds, used by the program since the beginning of execution.

    val chdir : string -> unit

    Change the current working directory of the process.

    val mkdir : string -> int -> unit

    Create a directory with the given permissions.

    • since 4.12
    val rmdir : string -> unit

    Remove an empty directory.

    • since 4.12
    val getcwd : unit -> string

    Return the current working directory of the process.

    val readdir : string -> string array

    Return the names of all files present in the given directory. Names denoting the current directory and the parent directory ("." and ".." in Unix) are not returned. Each string in the result is a file name rather than a complete path. There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

    val interactive : bool ref

    This reference is initially set to false in standalone programs and to true if the code is being executed under the interactive toplevel system ocaml.

    • alert unsynchronized_access The interactive status is a mutable global state.
    val os_type : string

    Operating system currently executing the OCaml program. One of

    • "Unix" (for all Unix versions, including Linux and Mac OS X),
    • "Win32" (for MS-Windows, OCaml compiled with MSVC++ or MinGW-w64),
    • "Cygwin" (for MS-Windows, OCaml compiled with Cygwin).
    type backend_type =
    1. | Native
    2. | Bytecode
    3. | Other of string

    Currently, the official distribution only supports Native and Bytecode, but it can be other backends with alternative compilers, for example, javascript.

    • since 4.04
    val backend_type : backend_type

    Backend type currently executing the OCaml program.

    • since 4.04
    val unix : bool

    True if Sys.os_type = "Unix".

    • since 4.01
    val win32 : bool

    True if Sys.os_type = "Win32".

    • since 4.01
    val cygwin : bool

    True if Sys.os_type = "Cygwin".

    • since 4.01
    val word_size : int

    Size of one word on the machine currently executing the OCaml program, in bits: 32 or 64.

    val int_size : int

    Size of int, in bits. It is 31 (resp. 63) when using OCaml on a 32-bit (resp. 64-bit) platform. It may differ for other implementations, e.g. it can be 32 bits when compiling to JavaScript.

    • since 4.03
    val big_endian : bool

    Whether the machine currently executing the Caml program is big-endian.

    • since 4.00
    val max_string_length : int

    Maximum length of strings and byte sequences.

    val max_array_length : int

    Maximum length of a normal array (i.e. any array whose elements are not of type float). The maximum length of a float array is max_floatarray_length if OCaml was configured with --enable-flat-float-array and max_array_length if configured with --disable-flat-float-array.

    val max_floatarray_length : int

    Maximum length of a floatarray. This is also the maximum length of a float array when OCaml is configured with --enable-flat-float-array.

    val runtime_variant : unit -> string

    Return the name of the runtime variant the program is running on. This is normally the argument given to -runtime-variant at compile time, but for byte-code it can be changed after compilation.

    • since 4.03
    val runtime_parameters : unit -> string

    Return the value of the runtime parameters, in the same format as the contents of the OCAMLRUNPARAM environment variable.

    • since 4.03

    Signal handling

    type signal_behavior =
    1. | Signal_default
    2. | Signal_ignore
    3. | Signal_handle of int -> unit

    What to do when receiving a signal:

    • Signal_default: take the default behavior (usually: abort the program)
    • Signal_ignore: ignore the signal
    • Signal_handle f: call function f, giving it the signal number as argument.
    val signal : int -> signal_behavior -> signal_behavior

    Set the behavior of the system on receipt of a given signal. The first argument is the signal number. Return the behavior previously associated with the signal. If the signal number is invalid (or not available on your system), an Invalid_argument exception is raised.

    val set_signal : int -> signal_behavior -> unit

    Same as Sys.signal but return value is ignored.

    Signal numbers for the standard POSIX signals.

    val sigabrt : int

    Abnormal termination

    val sigalrm : int

    Timeout

    val sigfpe : int

    Arithmetic exception

    val sighup : int

    Hangup on controlling terminal

    val sigill : int

    Invalid hardware instruction

    val sigint : int

    Interactive interrupt (ctrl-C)

    val sigkill : int

    Termination (cannot be ignored)

    val sigpipe : int

    Broken pipe

    val sigquit : int

    Interactive termination

    val sigsegv : int

    Invalid memory reference

    val sigterm : int

    Termination

    val sigusr1 : int

    Application-defined signal 1

    val sigusr2 : int

    Application-defined signal 2

    val sigchld : int

    Child process terminated

    val sigcont : int

    Continue

    val sigstop : int

    Stop

    val sigtstp : int

    Interactive stop

    val sigttin : int

    Terminal read from background process

    val sigttou : int

    Terminal write from background process

    val sigvtalrm : int

    Timeout in virtual time

    val sigprof : int

    Profiling interrupt

    val sigbus : int

    Bus error

    • since 4.03
    val sigpoll : int

    Pollable event

    • since 4.03
    val sigsys : int

    Bad argument to routine

    • since 4.03
    val sigtrap : int

    Trace/breakpoint trap

    • since 4.03
    val sigurg : int

    Urgent condition on socket

    • since 4.03
    val sigxcpu : int

    Timeout in cpu time

    • since 4.03
    val sigxfsz : int

    File size limit exceeded

    • since 4.03
    exception Break

    Exception raised on interactive interrupt if Sys.catch_break is on.

    val catch_break : bool -> unit

    catch_break governs whether interactive interrupt (ctrl-C) terminates the program or raises the Break exception. Call catch_break true to enable raising Break, and catch_break false to let the system terminate the program on user interrupt.

    val ocaml_version : string

    ocaml_version is the version of OCaml. It is a string of the form "major.minor[.patchlevel][(+|~)additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The [.patchlevel] part was absent before version 3.08.0 and became mandatory from 3.08.0 onwards. The [(+|~)additional-info] part may be absent.

    val development_version : bool

    true if this is a development version, false otherwise.

    • since 4.14
    type extra_prefix =
    1. | Plus
    2. | Tilde
      (*
      • since 4.14
      *)
    type extra_info = extra_prefix * string
    • since 4.14
    type ocaml_release_info = {
    1. major : int;
    2. minor : int;
    3. patchlevel : int;
    4. extra : extra_info option;
    }
    • since 4.14
    val ocaml_release : ocaml_release_info

    ocaml_release is the version of OCaml.

    • since 4.14
    val enable_runtime_warnings : bool -> unit

    Control whether the OCaml runtime system can emit warnings on stderr. Currently, the only supported warning is triggered when a channel created by open_* functions is finalized without being closed. Runtime warnings are disabled by default.

    • since 4.03
    • alert unsynchronized_access The status of runtime warnings is a mutable global state.
    val runtime_warnings_enabled : unit -> bool

    Return whether runtime warnings are currently enabled.

    • since 4.03
    • alert unsynchronized_access The status of runtime warnings is a mutable global state.

    Optimization

    val opaque_identity : 'a -> 'a

    For the purposes of optimization, opaque_identity behaves like an unknown (and thus possibly side-effecting) function.

    At runtime, opaque_identity disappears altogether.

    A typical use of this function is to prevent pure computations from being optimized away in benchmarking loops. For example:

    for _round = 1 to 100_000 do
    -  ignore (Sys.opaque_identity (my_pure_computation ()))
    -done
    • since 4.03
    module Immediate64 : sig ... end

    This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

    \ No newline at end of file +Sys (ocaml.Stdlib.Sys)

    Module Stdlib.Sys

    System interface.

    Every function in this module raises Sys_error with an informative message when the underlying system call signal an error.

    val argv : string array

    The command line arguments given to the process. The first element is the command name used to invoke the program. The following elements are the command-line arguments given to the program.

    val executable_name : string

    The name of the file containing the executable currently running. This name may be absolute or relative to the current directory, depending on the platform and whether the program was compiled to bytecode or a native executable.

    val file_exists : string -> bool

    Test if a file with the given name exists.

    val is_directory : string -> bool

    Returns true if the given name refers to a directory, false if it refers to another kind of file.

    • raises Sys_error

      if no file exists with the given name.

    • since 3.10
    val is_regular_file : string -> bool

    Returns true if the given name refers to a regular file, false if it refers to another kind of file.

    • raises Sys_error

      if no file exists with the given name.

    • since 5.1
    val remove : string -> unit

    Remove the given file name from the file system.

    val rename : string -> string -> unit

    Rename a file or directory. rename oldpath newpath renames the file or directory called oldpath, giving it newpath as its new name, moving it between (parent) directories if needed. If a file named newpath already exists, its contents will be replaced with those of oldpath. Depending on the operating system, the metadata (permissions, owner, etc) of newpath can either be preserved or be replaced by those of oldpath.

    • since 4.06 concerning the "replace existing file" behavior
    val getenv : string -> string

    Return the value associated to a variable in the process environment.

    val getenv_opt : string -> string option

    Return the value associated to a variable in the process environment or None if the variable is unbound.

    • since 4.05
    val command : string -> int

    Execute the given shell command and return its exit code.

    The argument of Sys.command is generally the name of a command followed by zero, one or several arguments, separated by whitespace. The given argument is interpreted by a shell: either the Windows shell cmd.exe for the Win32 ports of OCaml, or the POSIX shell sh for other ports. It can contain shell builtin commands such as echo, and also special characters such as file redirections > and <, which will be honored by the shell.

    Conversely, whitespace or special shell characters occurring in command names or in their arguments must be quoted or escaped so that the shell does not interpret them. The quoting rules vary between the POSIX shell and the Windows shell. The Filename.quote_command performs the appropriate quoting given a command name, a list of arguments, and optional file redirections.

    val time : unit -> float

    Return the processor time, in seconds, used by the program since the beginning of execution.

    val chdir : string -> unit

    Change the current working directory of the process.

    val mkdir : string -> int -> unit

    Create a directory with the given permissions.

    • since 4.12
    val rmdir : string -> unit

    Remove an empty directory.

    • since 4.12
    val getcwd : unit -> string

    Return the current working directory of the process.

    val readdir : string -> string array

    Return the names of all files present in the given directory. Names denoting the current directory and the parent directory ("." and ".." in Unix) are not returned. Each string in the result is a file name rather than a complete path. There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order.

    val interactive : bool ref

    This reference is initially set to false in standalone programs and to true if the code is being executed under the interactive toplevel system ocaml.

    • alert unsynchronized_access The interactive status is a mutable global state.
    val os_type : string

    Operating system currently executing the OCaml program. One of

    • "Unix" (for all Unix versions, including Linux and Mac OS X),
    • "Win32" (for MS-Windows, OCaml compiled with MSVC++ or MinGW-w64),
    • "Cygwin" (for MS-Windows, OCaml compiled with Cygwin).
    type backend_type =
    1. | Native
    2. | Bytecode
    3. | Other of string

    Currently, the official distribution only supports Native and Bytecode, but it can be other backends with alternative compilers, for example, javascript.

    • since 4.04
    val backend_type : backend_type

    Backend type currently executing the OCaml program.

    • since 4.04
    val unix : bool

    True if Sys.os_type = "Unix".

    • since 4.01
    val win32 : bool

    True if Sys.os_type = "Win32".

    • since 4.01
    val cygwin : bool

    True if Sys.os_type = "Cygwin".

    • since 4.01
    val word_size : int

    Size of one word on the machine currently executing the OCaml program, in bits: 32 or 64.

    val int_size : int

    Size of int, in bits. It is 31 (resp. 63) when using OCaml on a 32-bit (resp. 64-bit) platform. It may differ for other implementations, e.g. it can be 32 bits when compiling to JavaScript.

    • since 4.03
    val big_endian : bool

    Whether the machine currently executing the Caml program is big-endian.

    • since 4.00
    val max_string_length : int

    Maximum length of strings and byte sequences.

    val max_array_length : int

    Maximum length of a normal array (i.e. any array whose elements are not of type float). The maximum length of a float array is max_floatarray_length if OCaml was configured with --enable-flat-float-array and max_array_length if configured with --disable-flat-float-array.

    val max_floatarray_length : int

    Maximum length of a floatarray. This is also the maximum length of a float array when OCaml is configured with --enable-flat-float-array.

    val runtime_variant : unit -> string

    Return the name of the runtime variant the program is running on. This is normally the argument given to -runtime-variant at compile time, but for byte-code it can be changed after compilation.

    • since 4.03
    val runtime_parameters : unit -> string

    Return the value of the runtime parameters, in the same format as the contents of the OCAMLRUNPARAM environment variable.

    • since 4.03

    Signal handling

    type signal_behavior =
    1. | Signal_default
    2. | Signal_ignore
    3. | Signal_handle of int -> unit

    What to do when receiving a signal:

    • Signal_default: take the default behavior (usually: abort the program)
    • Signal_ignore: ignore the signal
    • Signal_handle f: call function f, giving it the signal number as argument.
    val signal : int -> signal_behavior -> signal_behavior

    Set the behavior of the system on receipt of a given signal. The first argument is the signal number. Return the behavior previously associated with the signal. If the signal number is invalid (or not available on your system), an Invalid_argument exception is raised.

    val set_signal : int -> signal_behavior -> unit

    Same as Sys.signal but return value is ignored.

    Signal numbers for the standard POSIX signals.

    val sigabrt : int

    Abnormal termination

    val sigalrm : int

    Timeout

    val sigfpe : int

    Arithmetic exception

    val sighup : int

    Hangup on controlling terminal

    val sigill : int

    Invalid hardware instruction

    val sigint : int

    Interactive interrupt (ctrl-C)

    val sigkill : int

    Termination (cannot be ignored)

    val sigpipe : int

    Broken pipe

    val sigquit : int

    Interactive termination

    val sigsegv : int

    Invalid memory reference

    val sigterm : int

    Termination

    val sigusr1 : int

    Application-defined signal 1

    val sigusr2 : int

    Application-defined signal 2

    val sigchld : int

    Child process terminated

    val sigcont : int

    Continue

    val sigstop : int

    Stop

    val sigtstp : int

    Interactive stop

    val sigttin : int

    Terminal read from background process

    val sigttou : int

    Terminal write from background process

    val sigvtalrm : int

    Timeout in virtual time

    val sigprof : int

    Profiling interrupt

    val sigbus : int

    Bus error

    • since 4.03
    val sigpoll : int

    Pollable event

    • since 4.03
    val sigsys : int

    Bad argument to routine

    • since 4.03
    val sigtrap : int

    Trace/breakpoint trap

    • since 4.03
    val sigurg : int

    Urgent condition on socket

    • since 4.03
    val sigxcpu : int

    Timeout in cpu time

    • since 4.03
    val sigxfsz : int

    File size limit exceeded

    • since 4.03
    exception Break

    Exception raised on interactive interrupt if Sys.catch_break is on.

    val catch_break : bool -> unit

    catch_break governs whether interactive interrupt (ctrl-C) terminates the program or raises the Break exception. Call catch_break true to enable raising Break, and catch_break false to let the system terminate the program on user interrupt.

    val ocaml_version : string

    ocaml_version is the version of OCaml. It is a string of the form "major.minor[.patchlevel][(+|~)additional-info]", where major, minor, and patchlevel are integers, and additional-info is an arbitrary string. The [.patchlevel] part was absent before version 3.08.0 and became mandatory from 3.08.0 onwards. The [(+|~)additional-info] part may be absent.

    val development_version : bool

    true if this is a development version, false otherwise.

    • since 4.14
    type extra_prefix =
    1. | Plus
    2. | Tilde
      (*
      • since 4.14
      *)
    type extra_info = extra_prefix * string
    • since 4.14
    type ocaml_release_info = {
    1. major : int;
    2. minor : int;
    3. patchlevel : int;
    4. extra : extra_info option;
    }
    • since 4.14
    val ocaml_release : ocaml_release_info

    ocaml_release is the version of OCaml.

    • since 4.14
    val enable_runtime_warnings : bool -> unit

    Control whether the OCaml runtime system can emit warnings on stderr. Currently, the only supported warning is triggered when a channel created by open_* functions is finalized without being closed. Runtime warnings are disabled by default.

    • since 4.03
    • alert unsynchronized_access The status of runtime warnings is a mutable global state.
    val runtime_warnings_enabled : unit -> bool

    Return whether runtime warnings are currently enabled.

    • since 4.03
    • alert unsynchronized_access The status of runtime warnings is a mutable global state.

    Optimization

    val opaque_identity : 'a -> 'a

    For the purposes of optimization, opaque_identity behaves like an unknown (and thus possibly side-effecting) function.

    At runtime, opaque_identity disappears altogether.

    A typical use of this function is to prevent pure computations from being optimized away in benchmarking loops. For example:

      for _round = 1 to 100_000 do
    +    ignore (Sys.opaque_identity (my_pure_computation ()))
    +  done
    • since 4.03
    module Immediate64 : sig ... end

    This module allows to define a type t with the immediate64 attribute. This attribute means that the type is immediate on 64 bit architectures. On other architectures, it might or might not be immediate.

    diff --git a/ocaml/Stdlib/Type/Id/index.html b/ocaml/Stdlib/Type/Id/index.html index f06e954..c16b923 100644 --- a/ocaml/Stdlib/Type/Id/index.html +++ b/ocaml/Stdlib/Type/Id/index.html @@ -1,5 +1,5 @@ -Id (ocaml.Stdlib.Type.Id)

    Module Type.Id

    Type identifiers.

    A type identifier is a value that denotes a type. Given two type identifiers, they can be tested for equality to prove they denote the same type. Note that:

    • Unequal identifiers do not imply unequal types: a given type can be denoted by more than one identifier.
    • Type identifiers can be marshalled, but they get a new, distinct, identity on unmarshalling, so the equalities are lost.

    See an example of use.

    Type identifiers

    type !'a t

    The type for identifiers for type 'a.

    val make : unit -> 'a t

    make () is a new type identifier.

    val uid : 'a t -> int

    uid id is a runtime unique identifier for id.

    val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option

    provably_equal i0 i1 is Some Equal if identifier i0 is equal to i1 and None otherwise.

    Example

    The following shows how type identifiers can be used to implement a simple heterogeneous key-value dictionary. In contrast to Stdlib.Map values whose keys map to a single, homogeneous type of values, this dictionary can associate a different type of value to each key.

    (** Heterogeneous dictionaries. *)
    +Id (ocaml.Stdlib.Type.Id)

    Module Type.Id

    Type identifiers.

    A type identifier is a value that denotes a type. Given two type identifiers, they can be tested for equality to prove they denote the same type. Note that:

    • Unequal identifiers do not imply unequal types: a given type can be denoted by more than one identifier.
    • Type identifiers can be marshalled, but they get a new, distinct, identity on unmarshalling, so the equalities are lost.

    See an example of use.

    Type identifiers

    type !'a t

    The type for identifiers for type 'a.

    val make : unit -> 'a t

    make () is a new type identifier.

    val uid : 'a t -> int

    uid id is a runtime unique identifier for id.

    val provably_equal : 'a t -> 'b t -> ('a, 'b) eq option

    provably_equal i0 i1 is Some Equal if identifier i0 is equal to i1 and None otherwise.

    Example

    The following shows how type identifiers can be used to implement a simple heterogeneous key-value dictionary. In contrast to Stdlib.Map values whose keys map to a single, homogeneous type of values, this dictionary can associate a different type of value to each key.

    (** Heterogeneous dictionaries. *)
     module Dict : sig
       type t
       (** The type for dictionaries. *)
    @@ -37,4 +37,4 @@ end = struct
             match Type.Id.provably_equal k k' with
             | Some Type.Equal -> Some v
             | None -> assert false
    -end
    \ No newline at end of file +end
    diff --git a/ocaml/Stdlib/Type/index.html b/ocaml/Stdlib/Type/index.html index ceaa593..18eafd7 100644 --- a/ocaml/Stdlib/Type/index.html +++ b/ocaml/Stdlib/Type/index.html @@ -1,2 +1,2 @@ -Type (ocaml.Stdlib.Type)

    Module Stdlib.Type

    Type introspection.

    • since 5.1

    Type equality witness

    type (_, _) eq =
    1. | Equal : ('a, 'a) eq

    The purpose of eq is to represent type equalities that may not otherwise be known by the type checker (e.g. because they may depend on dynamic data).

    A value of type (a, b) eq represents the fact that types a and b are equal.

    If one has a value eq : (a, b) eq that proves types a and b are equal, one can use it to convert a value of type a to a value of type b by pattern matching on Equal:

    let cast (type a) (type b) (Equal : (a, b) Type.eq) (a : a) : b = a

    At runtime, this function simply returns its second argument unchanged.

    Type identifiers

    module Id : sig ... end

    Type identifiers.

    \ No newline at end of file +Type (ocaml.Stdlib.Type)

    Module Stdlib.Type

    Type introspection.

    • since 5.1

    Type equality witness

    type (_, _) eq =
    1. | Equal : ('a, 'a) eq

    The purpose of eq is to represent type equalities that may not otherwise be known by the type checker (e.g. because they may depend on dynamic data).

    A value of type (a, b) eq represents the fact that types a and b are equal.

    If one has a value eq : (a, b) eq that proves types a and b are equal, one can use it to convert a value of type a to a value of type b by pattern matching on Equal:

      let cast (type a) (type b) (Equal : (a, b) Type.eq) (a : a) : b = a

    At runtime, this function simply returns its second argument unchanged.

    Type identifiers

    module Id : sig ... end

    Type identifiers.

    diff --git a/ocaml/Stdlib/Uchar/index.html b/ocaml/Stdlib/Uchar/index.html index 01f0509..4d4aa80 100644 --- a/ocaml/Stdlib/Uchar/index.html +++ b/ocaml/Stdlib/Uchar/index.html @@ -1,2 +1,2 @@ -Uchar (ocaml.Stdlib.Uchar)

    Module Stdlib.Uchar

    Unicode characters.

    • since 4.03
    type t

    The type for Unicode characters.

    A value of this type represents a Unicode scalar value which is an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF.

    val min : t

    min is U+0000.

    val max : t

    max is U+10FFFF.

    val bom : t

    bom is U+FEFF, the byte order mark (BOM) character.

    • since 4.06
    val rep : t

    rep is U+FFFD, the replacement character.

    • since 4.06
    val succ : t -> t

    succ u is the scalar value after u in the set of Unicode scalar values.

    • raises Invalid_argument

      if u is max.

    val pred : t -> t

    pred u is the scalar value before u in the set of Unicode scalar values.

    • raises Invalid_argument

      if u is min.

    val is_valid : int -> bool

    is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

    val of_int : int -> t

    of_int i is i as a Unicode character.

    • raises Invalid_argument

      if i does not satisfy is_valid.

    val to_int : t -> int

    to_int u is u as an integer.

    val is_char : t -> bool

    is_char u is true if and only if u is a latin1 OCaml character.

    val of_char : char -> t

    of_char c is c as a Unicode character.

    val to_char : t -> char

    to_char u is u as an OCaml latin1 character.

    • raises Invalid_argument

      if u does not satisfy is_char.

    val equal : t -> t -> bool

    equal u u' is u = u'.

    val compare : t -> t -> int

    compare u u' is Stdlib.compare u u'.

    val hash : t -> int

    hash u associates a non-negative integer to u.

    UTF codecs tools

    • since 4.14
    type utf_decode

    The type for UTF decode results. Values of this type represent the result of a Unicode Transformation Format decoding attempt.

    val utf_decode_is_valid : utf_decode -> bool

    utf_decode_is_valid d is true if and only if d holds a valid decode.

    val utf_decode_uchar : utf_decode -> t

    utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

    val utf_decode_length : utf_decode -> int

    utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

    val utf_decode : int -> t -> utf_decode

    utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

    val utf_decode_invalid : int -> utf_decode

    utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

    val utf_8_byte_length : t -> int

    utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

    val utf_16_byte_length : t -> int

    utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

    \ No newline at end of file +Uchar (ocaml.Stdlib.Uchar)

    Module Stdlib.Uchar

    Unicode characters.

    • since 4.03
    type t

    The type for Unicode characters.

    A value of this type represents a Unicode scalar value which is an integer in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF.

    val min : t

    min is U+0000.

    val max : t

    max is U+10FFFF.

    val bom : t

    bom is U+FEFF, the byte order mark (BOM) character.

    • since 4.06
    val rep : t

    rep is U+FFFD, the replacement character.

    • since 4.06
    val succ : t -> t

    succ u is the scalar value after u in the set of Unicode scalar values.

    val pred : t -> t

    pred u is the scalar value before u in the set of Unicode scalar values.

    val is_valid : int -> bool

    is_valid n is true if and only if n is a Unicode scalar value (i.e. in the ranges 0x0000...0xD7FF or 0xE000...0x10FFFF).

    val of_int : int -> t

    of_int i is i as a Unicode character.

    val to_int : t -> int

    to_int u is u as an integer.

    val is_char : t -> bool

    is_char u is true if and only if u is a latin1 OCaml character.

    val of_char : char -> t

    of_char c is c as a Unicode character.

    val to_char : t -> char

    to_char u is u as an OCaml latin1 character.

    val equal : t -> t -> bool

    equal u u' is u = u'.

    val compare : t -> t -> int

    compare u u' is Stdlib.compare u u'.

    val hash : t -> int

    hash u associates a non-negative integer to u.

    UTF codecs tools

    • since 4.14
    type utf_decode

    The type for UTF decode results. Values of this type represent the result of a Unicode Transformation Format decoding attempt.

    val utf_decode_is_valid : utf_decode -> bool

    utf_decode_is_valid d is true if and only if d holds a valid decode.

    val utf_decode_uchar : utf_decode -> t

    utf_decode_uchar d is the Unicode character decoded by d if utf_decode_is_valid d is true and Uchar.rep otherwise.

    val utf_decode_length : utf_decode -> int

    utf_decode_length d is the number of elements from the source that were consumed by the decode d. This is always strictly positive and smaller or equal to 4. The kind of source elements depends on the actual decoder; for the decoders of the standard library this function always returns a length in bytes.

    val utf_decode : int -> t -> utf_decode

    utf_decode n u is a valid UTF decode for u that consumed n elements from the source for decoding. n must be positive and smaller or equal to 4 (this is not checked by the module).

    val utf_decode_invalid : int -> utf_decode

    utf_decode_invalid n is an invalid UTF decode that consumed n elements from the source to error. n must be positive and smaller or equal to 4 (this is not checked by the module). The resulting decode has rep as the decoded Unicode character.

    val utf_8_byte_length : t -> int

    utf_8_byte_length u is the number of bytes needed to encode u in UTF-8.

    val utf_16_byte_length : t -> int

    utf_16_byte_length u is the number of bytes needed to encode u in UTF-16.

    diff --git a/ocaml/Stdlib/Unit/index.html b/ocaml/Stdlib/Unit/index.html index 277be2b..b6ff012 100644 --- a/ocaml/Stdlib/Unit/index.html +++ b/ocaml/Stdlib/Unit/index.html @@ -1,2 +1,2 @@ -Unit (ocaml.Stdlib.Unit)

    Module Stdlib.Unit

    Unit values.

    • since 4.08

    The unit type

    type t = unit =
    1. | ()

    The unit type.

    The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

    val equal : t -> t -> bool

    equal u1 u2 is true.

    val compare : t -> t -> int

    compare u1 u2 is 0.

    val to_string : t -> string

    to_string b is "()".

    \ No newline at end of file +Unit (ocaml.Stdlib.Unit)

    Module Stdlib.Unit

    Unit values.

    • since 4.08

    The unit type

    type t = unit =
    1. | ()

    The unit type.

    The constructor () is included here so that it has a path, but it is not intended to be used in user-defined data types.

    val equal : t -> t -> bool

    equal u1 u2 is true.

    val compare : t -> t -> int

    compare u1 u2 is 0.

    val to_string : t -> string

    to_string b is "()".

    diff --git a/ocaml/Stdlib/Weak/Make/argument-1-H/index.html b/ocaml/Stdlib/Weak/Make/argument-1-H/index.html index fdb5767..57937d1 100644 --- a/ocaml/Stdlib/Weak/Make/argument-1-H/index.html +++ b/ocaml/Stdlib/Weak/Make/argument-1-H/index.html @@ -1,2 +1,2 @@ -H (ocaml.Stdlib.Weak.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    \ No newline at end of file +H (ocaml.Stdlib.Weak.Make.H)

    Parameter Make.H

    type t

    The type of the hashtable keys.

    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    diff --git a/ocaml/Stdlib/Weak/Make/index.html b/ocaml/Stdlib/Weak/Make/index.html index 68a710e..bec5f41 100644 --- a/ocaml/Stdlib/Weak/Make/index.html +++ b/ocaml/Stdlib/Weak/Make/index.html @@ -1,2 +1,2 @@ -Make (ocaml.Stdlib.Weak.Make)

    Module Weak.Make

    Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

    Parameters

    Signature

    type data = H.t

    The type of the elements stored in the table.

    type t

    The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

    val create : int -> t

    create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

    val clear : t -> unit

    Remove all elements from the table.

    val merge : t -> data -> data

    merge t x returns an instance of x found in t if any, or else adds x to t and return x.

    val add : t -> data -> unit

    add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

    val remove : t -> data -> unit

    remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

    val find : t -> data -> data

    find t x returns an instance of x found in t.

    • raises Not_found

      if there is no such element.

    val find_opt : t -> data -> data option

    find_opt t x returns an instance of x found in t or None if there is no such element.

    • since 4.05
    val find_all : t -> data -> data list

    find_all t x returns a list of all the instances of x found in t.

    val mem : t -> data -> bool

    mem t x returns true if there is at least one instance of x in t, false otherwise.

    val iter : (data -> unit) -> t -> unit

    iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

    val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

    val count : t -> int

    Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

    val stats : t -> int * int * int * int * int * int

    Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

    \ No newline at end of file +Make (ocaml.Stdlib.Weak.Make)

    Module Weak.Make

    Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

    Parameters

    Signature

    type data = H.t

    The type of the elements stored in the table.

    type t

    The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

    val create : int -> t

    create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

    val clear : t -> unit

    Remove all elements from the table.

    val merge : t -> data -> data

    merge t x returns an instance of x found in t if any, or else adds x to t and return x.

    val add : t -> data -> unit

    add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

    val remove : t -> data -> unit

    remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

    val find : t -> data -> data

    find t x returns an instance of x found in t.

    • raises Not_found

      if there is no such element.

    val find_opt : t -> data -> data option

    find_opt t x returns an instance of x found in t or None if there is no such element.

    • since 4.05
    val find_all : t -> data -> data list

    find_all t x returns a list of all the instances of x found in t.

    val mem : t -> data -> bool

    mem t x returns true if there is at least one instance of x in t, false otherwise.

    val iter : (data -> unit) -> t -> unit

    iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

    val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

    val count : t -> int

    Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

    val stats : t -> int * int * int * int * int * int

    Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

    diff --git a/ocaml/Stdlib/Weak/index.html b/ocaml/Stdlib/Weak/index.html index 5e6bedc..6259811 100644 --- a/ocaml/Stdlib/Weak/index.html +++ b/ocaml/Stdlib/Weak/index.html @@ -1,2 +1,2 @@ -Weak (ocaml.Stdlib.Weak)

    Module Stdlib.Weak

    Arrays of weak pointers and hash sets of weak pointers.

    Low-level functions

    type !'a t

    The type of arrays of weak pointers (weak arrays). A weak pointer is a value that the garbage collector may erase whenever the value is not used any more (through normal pointers) by the program. Note that finalisation functions are run before the weak pointers are erased, because the finalisation functions can make values alive again (before 4.03 the finalisation functions were run after).

    A weak pointer is said to be full if it points to a value, empty if the value was erased by the GC.

    Notes:

    • Integers are not allocated and cannot be stored in weak arrays.
    • Weak arrays cannot be marshaled using Stdlib.output_value nor the functions of the Marshal module.
    val create : int -> 'a t

    Weak.create n returns a new weak array of length n. All the pointers are initially empty.

    val length : 'a t -> int

    Weak.length ar returns the length (number of elements) of ar.

    val set : 'a t -> int -> 'a option -> unit

    Weak.set ar n (Some el) sets the nth cell of ar to be a (full) pointer to el; Weak.set ar n None sets the nth cell of ar to empty.

    • raises Invalid_argument

      if n is not in the range 0 to Weak.length ar - 1.

    val get : 'a t -> int -> 'a option

    Weak.get ar n returns None if the nth cell of ar is empty, Some x (where x is the value) if it is full.

    • raises Invalid_argument

      if n is not in the range 0 to Weak.length ar - 1.

    val get_copy : 'a t -> int -> 'a option

    Weak.get_copy ar n returns None if the nth cell of ar is empty, Some x (where x is a (shallow) copy of the value) if it is full. In addition to pitfalls with mutable values, the interesting difference with get is that get_copy does not prevent the incremental GC from erasing the value in its current cycle (get may delay the erasure to the next GC cycle).

    • raises Invalid_argument

      if n is not in the range 0 to Weak.length ar - 1.

      If the element is a custom block it is not copied.

    val check : 'a t -> int -> bool

    Weak.check ar n returns true if the nth cell of ar is full, false if it is empty. Note that even if Weak.check ar n returns true, a subsequent Weak.get ar n can return None.

    • raises Invalid_argument

      if n is not in the range 0 to Weak.length ar - 1.

    val fill : 'a t -> int -> int -> 'a option -> unit

    Weak.fill ar ofs len el sets to el all pointers of ar from ofs to ofs + len - 1.

    • raises Invalid_argument

      if ofs and len do not designate a valid subarray of ar.

    val blit : 'a t -> int -> 'a t -> int -> int -> unit

    Weak.blit ar1 off1 ar2 off2 len copies len weak pointers from ar1 (starting at off1) to ar2 (starting at off2). It works correctly even if ar1 and ar2 are the same.

    • raises Invalid_argument

      if off1 and len do not designate a valid subarray of ar1, or if off2 and len do not designate a valid subarray of ar2.

    Weak hash sets

    A weak hash set is a hashed set of values. Each value may magically disappear from the set when it is not used by the rest of the program any more. This is normally used to share data structures without inducing memory leaks. Weak hash sets are defined on values from a Hashtbl.HashedType module; the equal relation and hash function are taken from that module. We will say that v is an instance of x if equal x v is true.

    The equal relation must be able to work on a shallow copy of the values and give the same result as with the values themselves.

    Unsynchronized accesses

    Unsynchronized accesses to weak hash sets are a programming error. Unsynchronized accesses to a weak hash set may lead to an invalid weak hash set state. Thus, concurrent accesses to weak hash sets must be synchronized (for instance with a Mutex.t).

    module type S = sig ... end

    The output signature of the functor Weak.Make.

    module Make (H : Hashtbl.HashedType) : S with type data = H.t

    Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

    \ No newline at end of file +Weak (ocaml.Stdlib.Weak)

    Module Stdlib.Weak

    Arrays of weak pointers and hash sets of weak pointers.

    Low-level functions

    type !'a t

    The type of arrays of weak pointers (weak arrays). A weak pointer is a value that the garbage collector may erase whenever the value is not used any more (through normal pointers) by the program. Note that finalisation functions are run before the weak pointers are erased, because the finalisation functions can make values alive again (before 4.03 the finalisation functions were run after).

    A weak pointer is said to be full if it points to a value, empty if the value was erased by the GC.

    Notes:

    • Integers are not allocated and cannot be stored in weak arrays.
    • Weak arrays cannot be marshaled using Stdlib.output_value nor the functions of the Marshal module.
    val create : int -> 'a t

    Weak.create n returns a new weak array of length n. All the pointers are initially empty.

    val length : 'a t -> int

    Weak.length ar returns the length (number of elements) of ar.

    val set : 'a t -> int -> 'a option -> unit

    Weak.set ar n (Some el) sets the nth cell of ar to be a (full) pointer to el; Weak.set ar n None sets the nth cell of ar to empty.

    val get : 'a t -> int -> 'a option

    Weak.get ar n returns None if the nth cell of ar is empty, Some x (where x is the value) if it is full.

    val get_copy : 'a t -> int -> 'a option

    Weak.get_copy ar n returns None if the nth cell of ar is empty, Some x (where x is a (shallow) copy of the value) if it is full. In addition to pitfalls with mutable values, the interesting difference with get is that get_copy does not prevent the incremental GC from erasing the value in its current cycle (get may delay the erasure to the next GC cycle).

    If the element is a custom block it is not copied.

    val check : 'a t -> int -> bool

    Weak.check ar n returns true if the nth cell of ar is full, false if it is empty. Note that even if Weak.check ar n returns true, a subsequent Weak.get ar n can return None.

    val fill : 'a t -> int -> int -> 'a option -> unit

    Weak.fill ar ofs len el sets to el all pointers of ar from ofs to ofs + len - 1.

    val blit : 'a t -> int -> 'a t -> int -> int -> unit

    Weak.blit ar1 off1 ar2 off2 len copies len weak pointers from ar1 (starting at off1) to ar2 (starting at off2). It works correctly even if ar1 and ar2 are the same.

    • raises Invalid_argument

      if off1 and len do not designate a valid subarray of ar1, or if off2 and len do not designate a valid subarray of ar2.

    Weak hash sets

    A weak hash set is a hashed set of values. Each value may magically disappear from the set when it is not used by the rest of the program any more. This is normally used to share data structures without inducing memory leaks. Weak hash sets are defined on values from a Hashtbl.HashedType module; the equal relation and hash function are taken from that module. We will say that v is an instance of x if equal x v is true.

    The equal relation must be able to work on a shallow copy of the values and give the same result as with the values themselves.

    Unsynchronized accesses

    Unsynchronized accesses to weak hash sets are a programming error. Unsynchronized accesses to a weak hash set may lead to an invalid weak hash set state. Thus, concurrent accesses to weak hash sets must be synchronized (for instance with a Mutex.t).

    module type S = sig ... end

    The output signature of the functor Weak.Make.

    module Make (H : Hashtbl.HashedType) : S with type data = H.t

    Functor building an implementation of the weak hash set structure. H.equal can't be the physical equality, since only shallow copies of the elements in the set are given to it.

    diff --git a/ocaml/Stdlib/Weak/module-type-S/index.html b/ocaml/Stdlib/Weak/module-type-S/index.html index ea9e069..f6b85c9 100644 --- a/ocaml/Stdlib/Weak/module-type-S/index.html +++ b/ocaml/Stdlib/Weak/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Stdlib.Weak.S)

    Module type Weak.S

    The output signature of the functor Weak.Make.

    type data

    The type of the elements stored in the table.

    type t

    The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

    val create : int -> t

    create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

    val clear : t -> unit

    Remove all elements from the table.

    val merge : t -> data -> data

    merge t x returns an instance of x found in t if any, or else adds x to t and return x.

    val add : t -> data -> unit

    add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

    val remove : t -> data -> unit

    remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

    val find : t -> data -> data

    find t x returns an instance of x found in t.

    • raises Not_found

      if there is no such element.

    val find_opt : t -> data -> data option

    find_opt t x returns an instance of x found in t or None if there is no such element.

    • since 4.05
    val find_all : t -> data -> data list

    find_all t x returns a list of all the instances of x found in t.

    val mem : t -> data -> bool

    mem t x returns true if there is at least one instance of x in t, false otherwise.

    val iter : (data -> unit) -> t -> unit

    iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

    val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

    val count : t -> int

    Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

    val stats : t -> int * int * int * int * int * int

    Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

    \ No newline at end of file +S (ocaml.Stdlib.Weak.S)

    Module type Weak.S

    The output signature of the functor Weak.Make.

    type data

    The type of the elements stored in the table.

    type t

    The type of tables that contain elements of type data. Note that weak hash sets cannot be marshaled using Stdlib.output_value or the functions of the Marshal module.

    val create : int -> t

    create n creates a new empty weak hash set, of initial size n. The table will grow as needed.

    val clear : t -> unit

    Remove all elements from the table.

    val merge : t -> data -> data

    merge t x returns an instance of x found in t if any, or else adds x to t and return x.

    val add : t -> data -> unit

    add t x adds x to t. If there is already an instance of x in t, it is unspecified which one will be returned by subsequent calls to find and merge.

    val remove : t -> data -> unit

    remove t x removes from t one instance of x. Does nothing if there is no instance of x in t.

    val find : t -> data -> data

    find t x returns an instance of x found in t.

    • raises Not_found

      if there is no such element.

    val find_opt : t -> data -> data option

    find_opt t x returns an instance of x found in t or None if there is no such element.

    • since 4.05
    val find_all : t -> data -> data list

    find_all t x returns a list of all the instances of x found in t.

    val mem : t -> data -> bool

    mem t x returns true if there is at least one instance of x in t, false otherwise.

    val iter : (data -> unit) -> t -> unit

    iter f t calls f on each element of t, in some unspecified order. It is not specified what happens if f tries to change t itself.

    val fold : (data -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f t init computes (f d1 (... (f dN init))) where d1 ... dN are the elements of t in some unspecified order. It is not specified what happens if f tries to change t itself.

    val count : t -> int

    Count the number of elements in the table. count t gives the same result as fold (fun _ n -> n+1) t 0 but does not delay the deallocation of the dead elements.

    val stats : t -> int * int * int * int * int * int

    Return statistics on the table. The numbers are, in order: table length, number of entries, sum of bucket lengths, smallest bucket length, median bucket length, biggest bucket length.

    diff --git a/ocaml/Stdlib/index.html b/ocaml/Stdlib/index.html index 0ab51fe..36f0471 100644 --- a/ocaml/Stdlib/index.html +++ b/ocaml/Stdlib/index.html @@ -1,8 +1,8 @@ -Stdlib (ocaml.Stdlib)

    Module Stdlib

    The OCaml Standard library.

    This module is automatically opened at the beginning of each compilation. All components of this module can therefore be referred by their short name, without prefixing them by Stdlib.

    In particular, it provides the basic operations over the built-in types (numbers, booleans, byte sequences, strings, exceptions, references, lists, arrays, input-output channels, ...) and the standard library modules.

    Exceptions

    val raise : exn -> 'a

    Raise the given exception value

    val raise_notrace : exn -> 'a

    A faster version raise which does not record the backtrace.

    • since 4.02
    val invalid_arg : string -> 'a

    Raise exception Invalid_argument with the given string.

    val failwith : string -> 'a

    Raise exception Failure with the given string.

    exception Exit

    The Exit exception is not raised by any library function. It is provided for use in your programs.

    exception Match_failure of string * int * int

    Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

    exception Assert_failure of string * int * int

    Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

    exception Invalid_argument of string

    Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

    exception Failure of string

    Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

    exception Not_found

    Exception raised by search functions when the desired object could not be found.

    exception Out_of_memory

    Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

    exception Stack_overflow

    Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

    Before 4.10, it was not fully implemented by the native-code compiler.

    exception Sys_error of string

    Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

    exception End_of_file

    Exception raised by input functions to signal that the end of file has been reached.

    exception Division_by_zero

    Exception raised by integer division and remainder operations when their second argument is zero.

    exception Sys_blocked_io

    A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

    exception Undefined_recursive_module of string * int * int

    Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

    Comparisons

    val (=) : 'a -> 'a -> bool

    e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

    val (<>) : 'a -> 'a -> bool

    Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

    val (<) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (>) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (<=) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (>=) : 'a -> 'a -> bool

    Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

    val compare : 'a -> 'a -> int

    compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

    compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

    The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

    val min : 'a -> 'a -> 'a

    Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

    val max : 'a -> 'a -> 'a

    Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

    val (==) : 'a -> 'a -> bool

    e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

    val (!=) : 'a -> 'a -> bool

    Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

    Boolean operations

    val not : bool -> bool

    The boolean negation.

    val (&&) : bool -> bool -> bool

    The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

    val (||) : bool -> bool -> bool

    The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

    Debugging

    val __LOC__ : string

    __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

    • since 4.02
    val __FILE__ : string

    __FILE__ returns the name of the file currently being parsed by the compiler.

    • since 4.02
    val __LINE__ : int

    __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

    • since 4.02
    val __MODULE__ : string

    __MODULE__ returns the module name of the file being parsed by the compiler.

    • since 4.02
    val __POS__ : string * int * int * int

    __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

    • since 4.02
    val __FUNCTION__ : string

    __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

    • since 4.12
    val __LOC_OF__ : 'a -> string * 'a

    __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

    • since 4.02
    val __LINE_OF__ : 'a -> int * 'a

    __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

    • since 4.02
    val __POS_OF__ : 'a -> (string * int * int * int) * 'a

    __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

    • since 4.02

    Composition operators

    val (|>) : 'a -> ('a -> 'b) -> 'b

    Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

    • since 4.01
    val (@@) : ('a -> 'b) -> 'a -> 'b

    Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

    • since 4.01

    Integer arithmetic

    Integers are Sys.int_size bits wide. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

    val (~-) : int -> int

    Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

    val (~+) : int -> int

    Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

    • since 3.12
    val succ : int -> int

    succ x is x + 1.

    val pred : int -> int

    pred x is x - 1.

    val (+) : int -> int -> int

    Integer addition. Left-associative operator, see Ocaml_operators for more information.

    val (-) : int -> int -> int

    Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

    val (*) : int -> int -> int

    Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

    val (/) : int -> int -> int

    Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

    • raises Division_by_zero

      if the second argument is 0.

    val (mod) : int -> int -> int

    Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

    • raises Division_by_zero

      if y is zero.

    val abs : int -> int

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int

    The greatest representable integer.

    val min_int : int

    The smallest representable integer.

    Bitwise operations

    val (land) : int -> int -> int

    Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

    val (lor) : int -> int -> int

    Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

    val (lxor) : int -> int -> int

    Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

    val lnot : int -> int

    Bitwise logical negation.

    val (lsl) : int -> int -> int

    n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    val (lsr) : int -> int -> int

    n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    val (asr) : int -> int -> int

    n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    Floating-point arithmetic

    OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

    val (~-.) : float -> float

    Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

    val (~+.) : float -> float

    Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

    • since 3.12
    val (+.) : float -> float -> float

    Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

    val (-.) : float -> float -> float

    Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

    val (*.) : float -> float -> float

    Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

    val (/.) : float -> float -> float

    Floating-point division. Left-associative operator, see Ocaml_operators for more information.

    val (**) : float -> float -> float

    Exponentiation. Right-associative operator, see Ocaml_operators for more information.

    val sqrt : float -> float

    Square root.

    val exp : float -> float

    Exponential.

    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val expm1 : float -> float

    expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

    • since 3.12
    val log1p : float -> float

    log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

    • since 3.12
    val cos : float -> float

    Cosine. Argument is in radians.

    val sin : float -> float

    Sine. Argument is in radians.

    val tan : float -> float

    Tangent. Argument is in radians.

    val acos : float -> float

    Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

    val asin : float -> float

    Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

    val atan : float -> float

    Arc tangent. Result is in radians and is between -pi/2 and pi/2.

    val atan2 : float -> float -> float

    atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

    val hypot : float -> float -> float

    hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

    • since 4.00
    val cosh : float -> float

    Hyperbolic cosine. Argument is in radians.

    val sinh : float -> float

    Hyperbolic sine. Argument is in radians.

    val tanh : float -> float

    Hyperbolic tangent. Argument is in radians.

    val acosh : float -> float

    Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

    • since 4.13
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13
    val atanh : float -> float

    Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

    • since 4.13
    val ceil : float -> float

    Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

    val floor : float -> float

    Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

    val abs_float : float -> float

    abs_float f returns the absolute value of f.

    val copysign : float -> float -> float

    copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

    • since 4.00
    val mod_float : float -> float -> float

    mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

    val frexp : float -> float * int

    frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

    val ldexp : float -> int -> float

    ldexp x n returns x *. 2 ** n.

    val modf : float -> float * float

    modf f returns the pair of the fractional and integral part of f.

    val float : int -> float
    val float_of_int : int -> float

    Convert an integer to floating-point.

    val truncate : float -> int
    val int_of_float : float -> int

    Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val infinity : float

    Positive infinity.

    val neg_infinity : float

    Negative infinity.

    val nan : float

    A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    nan is a quiet NaN since 5.1; it was a signaling NaN before.

    val max_float : float

    The largest positive finite value of type float.

    val min_float : float

    The smallest positive, non-zero, non-denormalized value of type float.

    val epsilon_float : float

    The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

    type fpclass =
    1. | FP_normal
      (*

      Normal number, none of the below

      *)
    2. | FP_subnormal
      (*

      Number very close to 0.0, has reduced precision

      *)
    3. | FP_zero
      (*

      Number is 0.0 or -0.0

      *)
    4. | FP_infinite
      (*

      Number is positive or negative infinity

      *)
    5. | FP_nan
      (*

      Not a number: result of an undefined operation

      *)

    The five classes of floating-point numbers, as determined by the Stdlib.classify_float function.

    val classify_float : float -> fpclass

    Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

    String operations

    More string operations are provided in module String.

    val (^) : string -> string -> string

    String concatenation. Right-associative operator, see Ocaml_operators for more information.

    Character operations

    More character operations are provided in module Char.

    val int_of_char : char -> int

    Return the ASCII code of the argument.

    val char_of_int : int -> char

    Return the character with the given ASCII code.

    • raises Invalid_argument

      if the argument is outside the range 0--255.

    Unit operations

    val ignore : 'a -> unit

    Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

    String conversion functions

    val string_of_bool : bool -> string

    Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

    val bool_of_string_opt : string -> bool option

    Convert the given string to a boolean.

    Return None if the string is not "true" or "false".

    • since 4.05
    val bool_of_string : string -> bool

    Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

    val string_of_int : int -> string

    Return the string representation of an integer, in decimal.

    val int_of_string_opt : string -> int option

    Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

    • since 4.05
    val int_of_string : string -> int

    Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

    val string_of_float : float -> string

    Return a string representation of a floating-point number.

    This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

    val float_of_string_opt : string -> float option

    Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

    The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

    The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

    In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

    Return None if the given string is not a valid representation of a float.

    • since 4.05
    val float_of_string : string -> float

    Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

    Pair operations

    val fst : ('a * 'b) -> 'a

    Return the first component of a pair.

    val snd : ('a * 'b) -> 'b

    Return the second component of a pair.

    List operations

    More list operations are provided in module List.

    val (@) : 'a list -> 'a list -> 'a list

    l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

    • since 5.1 this function is tail-recursive.

    Input/output

    Note: all input/output functions can raise Sys_error when the system calls they invoke fail.

    type in_channel

    The type of input channel.

    type out_channel

    The type of output channel.

    val stdin : in_channel

    The standard input for the process.

    val stdout : out_channel

    The standard output for the process.

    val stderr : out_channel

    The standard error output for the process.

    Output functions on standard output

    val print_char : char -> unit

    Print a character on standard output.

    val print_string : string -> unit

    Print a string on standard output.

    val print_bytes : bytes -> unit

    Print a byte sequence on standard output.

    • since 4.02
    val print_int : int -> unit

    Print an integer, in decimal, on standard output.

    val print_float : float -> unit

    Print a floating-point number, in decimal, on standard output.

    The conversion of the number to a string uses string_of_float and can involve a loss of precision.

    val print_endline : string -> unit

    Print a string, followed by a newline character, on standard output and flush standard output.

    val print_newline : unit -> unit

    Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

    Output functions on standard error

    val prerr_char : char -> unit

    Print a character on standard error.

    val prerr_string : string -> unit

    Print a string on standard error.

    val prerr_bytes : bytes -> unit

    Print a byte sequence on standard error.

    • since 4.02
    val prerr_int : int -> unit

    Print an integer, in decimal, on standard error.

    val prerr_float : float -> unit

    Print a floating-point number, in decimal, on standard error.

    The conversion of the number to a string uses string_of_float and can involve a loss of precision.

    val prerr_endline : string -> unit

    Print a string, followed by a newline character on standard error and flush standard error.

    val prerr_newline : unit -> unit

    Print a newline character on standard error, and flush standard error.

    Input functions on standard input

    val read_line : unit -> string

    Flush standard output, then read characters from standard input until a newline character is encountered.

    Return the string of all characters read, without the newline character at the end.

    • raises End_of_file

      if the end of the file is reached at the beginning of line.

    val read_int_opt : unit -> int option

    Flush standard output, then read one line from standard input and convert it to an integer.

    Return None if the line read is not a valid representation of an integer.

    • since 4.05
    val read_int : unit -> int

    Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

    val read_float_opt : unit -> float option

    Flush standard output, then read one line from standard input and convert it to a floating-point number.

    Return None if the line read is not a valid representation of a floating-point number.

    • since 4.05
    val read_float : unit -> float

    Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

    General output functions

    type open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)
    val open_out : string -> out_channel

    Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

    val open_out_bin : string -> out_channel

    Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

    val open_out_gen : open_flag list -> int -> string -> out_channel

    open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

    val flush : out_channel -> unit

    Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

    val flush_all : unit -> unit

    Flush all open output channels; ignore errors.

    val output_char : out_channel -> char -> unit

    Write the character on the given output channel.

    val output_string : out_channel -> string -> unit

    Write the string on the given output channel.

    val output_bytes : out_channel -> bytes -> unit

    Write the byte sequence on the given output channel.

    • since 4.02
    val output : out_channel -> bytes -> int -> int -> unit

    output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    val output_substring : out_channel -> string -> int -> int -> unit

    Same as output but take a string as argument instead of a byte sequence.

    • since 4.02
    val output_byte : out_channel -> int -> unit

    Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

    val output_binary_int : out_channel -> int -> unit

    Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

    val output_value : out_channel -> 'a -> unit

    Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

    val seek_out : out_channel -> int -> unit

    seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

    val pos_out : out_channel -> int

    Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    val out_channel_length : out_channel -> int

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

    val close_out : out_channel -> unit

    Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

    val close_out_noerr : out_channel -> unit

    Same as close_out, but ignore all errors.

    val set_binary_mode_out : out_channel -> bool -> unit

    set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    General input functions

    val open_in : string -> in_channel

    Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

    val open_in_bin : string -> in_channel

    Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

    val open_in_gen : open_flag list -> int -> string -> in_channel

    open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

    val input_char : in_channel -> char

    Read one character from the given input channel.

    • raises End_of_file

      if there are no more characters to read.

    val input_line : in_channel -> string

    Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

    • raises End_of_file

      if the end of the file is reached at the beginning of line.

    val input : in_channel -> bytes -> int -> int -> int

    input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

    val really_input : in_channel -> bytes -> int -> int -> unit

    really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

    • raises End_of_file

      if the end of file is reached before len characters have been read.

    • raises Invalid_argument

      if pos and len do not designate a valid range of buf.

    val really_input_string : in_channel -> int -> string

    really_input_string ic len reads len characters from channel ic and returns them in a new string.

    • raises End_of_file

      if the end of file is reached before len characters have been read.

    • since 4.02
    val input_byte : in_channel -> int

    Same as Stdlib.input_char, but return the 8-bit integer representing the character.

    • raises End_of_file

      if the end of file was reached.

    val input_binary_int : in_channel -> int

    Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

    • raises End_of_file

      if the end of file was reached while reading the integer.

    val input_value : in_channel -> 'a

    Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

    val seek_in : in_channel -> int -> unit

    seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

    val pos_in : in_channel -> int

    Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    val in_channel_length : in_channel -> int

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

    val close_in : in_channel -> unit

    Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

    val close_in_noerr : in_channel -> unit

    Same as close_in, but ignore all errors.

    val set_binary_mode_in : in_channel -> bool -> unit

    set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    Operations on large files

    module LargeFile : sig ... end

    Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

    References

    type 'a ref = {
    1. mutable contents : 'a;
    }

    The type of references (mutable indirection cells) containing a value of type 'a.

    val ref : 'a -> 'a ref

    Return a fresh reference containing the given value.

    val (!) : 'a ref -> 'a

    !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

    val (:=) : 'a ref -> 'a -> unit

    r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

    val incr : int ref -> unit

    Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

    val decr : int ref -> unit

    Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

    Result type

    type ('a, 'b) result =
    1. | Ok of 'a
    2. | Error of 'b
    • since 4.03

    Operations on format strings

    Format strings are character strings with special lexical conventions that defines the functionality of formatted input/output functions. Format strings are used to read data with formatted input functions from module Scanf and to print data with formatted output functions from modules Printf and Format.

    Format strings are made of three kinds of entities:

    • conversions specifications, introduced by the special character '%' followed by one or more characters specifying what kind of argument to read or print,
    • formatting indications, introduced by the special character '@' followed by one or more characters specifying how to read or print the argument,
    • plain characters that are regular characters with usual lexical conventions. Plain characters specify string literals to be read in the input or printed in the output.

    There is an additional lexical rule to escape the special characters '%' and '@' in format strings: if a special character follows a '%' character, it is treated as a plain character. In other words, "%%" is considered as a plain '%' and "%@" as a plain '@'.

    For more information about conversion specifications and formatting indications available, read the documentation of modules Scanf, Printf and Format.

    Format strings have a general and highly polymorphic type ('a, 'b, 'c, 'd, 'e, 'f) format6. The two simplified types, format and format4 below are included for backward compatibility with earlier releases of OCaml.

    The meaning of format string type parameters is as follows:

    • 'a is the type of the parameters of the format for formatted output functions (printf-style functions); 'a is the type of the values read by the format for formatted input functions (scanf-style functions).
    • 'b is the type of input source for formatted input functions and the type of output target for formatted output functions. For printf-style functions from module Printf, 'b is typically out_channel; for printf-style functions from module Format, 'b is typically Format.formatter; for scanf-style functions from module Scanf, 'b is typically Scanf.Scanning.in_channel.

    Type argument 'b is also the type of the first argument given to user's defined printing functions for %a and %t conversions, and user's defined reading functions for %r conversion.

    • 'c is the type of the result of the %a and %t printing functions, and also the type of the argument transmitted to the first argument of kprintf-style functions or to the kscanf-style functions.
    • 'd is the type of parameters for the scanf-style functions.
    • 'e is the type of the receiver function for the scanf-style functions.
    • 'f is the final result type of a formatted input/output function invocation: for the printf-style functions, it is typically unit; for the scanf-style functions, it is typically the result type of the receiver function.
    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = +Stdlib (ocaml.Stdlib)

    Module Stdlib

    The OCaml Standard library.

    This module is automatically opened at the beginning of each compilation. All components of this module can therefore be referred by their short name, without prefixing them by Stdlib.

    In particular, it provides the basic operations over the built-in types (numbers, booleans, byte sequences, strings, exceptions, references, lists, arrays, input-output channels, ...) and the standard library modules.

    Exceptions

    val raise : exn -> 'a

    Raise the given exception value

    val raise_notrace : exn -> 'a

    A faster version raise which does not record the backtrace.

    • since 4.02
    val invalid_arg : string -> 'a

    Raise exception Invalid_argument with the given string.

    val failwith : string -> 'a

    Raise exception Failure with the given string.

    exception Exit

    The Exit exception is not raised by any library function. It is provided for use in your programs.

    exception Match_failure of string * int * int

    Exception raised when none of the cases of a pattern-matching apply. The arguments are the location of the match keyword in the source code (file name, line number, column number).

    exception Assert_failure of string * int * int

    Exception raised when an assertion fails. The arguments are the location of the assert keyword in the source code (file name, line number, column number).

    exception Invalid_argument of string

    Exception raised by library functions to signal that the given arguments do not make sense. The string gives some information to the programmer. As a general rule, this exception should not be caught, it denotes a programming error and the code should be modified not to trigger it.

    exception Failure of string

    Exception raised by library functions to signal that they are undefined on the given arguments. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Failure _ instead).

    exception Not_found

    Exception raised by search functions when the desired object could not be found.

    exception Out_of_memory

    Exception raised by the garbage collector when there is insufficient memory to complete the computation. (Not reliable for allocations on the minor heap.)

    exception Stack_overflow

    Exception raised by the bytecode interpreter when the evaluation stack reaches its maximal size. This often indicates infinite or excessively deep recursion in the user's program.

    Before 4.10, it was not fully implemented by the native-code compiler.

    exception Sys_error of string

    Exception raised by the input/output functions to report an operating system error. The string is meant to give some information to the programmer; you must not pattern match on the string literal because it may change in future versions (use Sys_error _ instead).

    exception End_of_file

    Exception raised by input functions to signal that the end of file has been reached.

    exception Division_by_zero

    Exception raised by integer division and remainder operations when their second argument is zero.

    exception Sys_blocked_io

    A special case of Sys_error raised when no I/O is possible on a non-blocking I/O channel.

    exception Undefined_recursive_module of string * int * int

    Exception raised when an ill-founded recursive module definition is evaluated. The arguments are the location of the definition in the source code (file name, line number, column number).

    Comparisons

    val (=) : 'a -> 'a -> bool

    e1 = e2 tests for structural equality of e1 and e2. Mutable structures (e.g. references and arrays) are equal if and only if their current contents are structurally equal, even if the two mutable objects are not the same physical object. Equality between functional values raises Invalid_argument. Equality between cyclic data structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

    val (<>) : 'a -> 'a -> bool

    Negation of Stdlib.(=). Left-associative operator, see Ocaml_operators for more information.

    val (<) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (>) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (<=) : 'a -> 'a -> bool

    See Stdlib.(>=). Left-associative operator, see Ocaml_operators for more information.

    val (>=) : 'a -> 'a -> bool

    Structural ordering functions. These functions coincide with the usual orderings over integers, characters, strings, byte sequences and floating-point numbers, and extend them to a total ordering over all types. The ordering is compatible with ( = ). As in the case of ( = ), mutable structures are compared by contents. Comparison between functional values raises Invalid_argument. Comparison between cyclic structures may not terminate. Left-associative operator, see Ocaml_operators for more information.

    val compare : 'a -> 'a -> int

    compare x y returns 0 if x is equal to y, a negative integer if x is less than y, and a positive integer if x is greater than y. The ordering implemented by compare is compatible with the comparison predicates =, < and > defined above, with one difference on the treatment of the float value Stdlib.nan. Namely, the comparison predicates treat nan as different from any other float value, including itself; while compare treats nan as equal to itself and less than any other float value. This treatment of nan ensures that compare defines a total ordering relation.

    compare applied to functional values may raise Invalid_argument. compare applied to cyclic structures may not terminate.

    The compare function can be used as the comparison function required by the Set.Make and Map.Make functors, as well as the List.sort and Array.sort functions.

    val min : 'a -> 'a -> 'a

    Return the smaller of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

    val max : 'a -> 'a -> 'a

    Return the greater of the two arguments. The result is unspecified if one of the arguments contains the float value nan.

    val (==) : 'a -> 'a -> bool

    e1 == e2 tests for physical equality of e1 and e2. On mutable types such as references, arrays, byte sequences, records with mutable fields and objects with mutable instance variables, e1 == e2 is true if and only if physical modification of e1 also affects e2. On non-mutable types, the behavior of ( == ) is implementation-dependent; however, it is guaranteed that e1 == e2 implies compare e1 e2 = 0. Left-associative operator, see Ocaml_operators for more information.

    val (!=) : 'a -> 'a -> bool

    Negation of Stdlib.(==). Left-associative operator, see Ocaml_operators for more information.

    Boolean operations

    val not : bool -> bool

    The boolean negation.

    val (&&) : bool -> bool -> bool

    The boolean 'and'. Evaluation is sequential, left-to-right: in e1 && e2, e1 is evaluated first, and if it returns false, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

    val (||) : bool -> bool -> bool

    The boolean 'or'. Evaluation is sequential, left-to-right: in e1 || e2, e1 is evaluated first, and if it returns true, e2 is not evaluated at all. Right-associative operator, see Ocaml_operators for more information.

    Debugging

    val __LOC__ : string

    __LOC__ returns the location at which this expression appears in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

    • since 4.02
    val __FILE__ : string

    __FILE__ returns the name of the file currently being parsed by the compiler.

    • since 4.02
    val __LINE__ : int

    __LINE__ returns the line number at which this expression appears in the file currently being parsed by the compiler.

    • since 4.02
    val __MODULE__ : string

    __MODULE__ returns the module name of the file being parsed by the compiler.

    • since 4.02
    val __POS__ : string * int * int * int

    __POS__ returns a tuple (file,lnum,cnum,enum), corresponding to the location at which this expression appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

    • since 4.02
    val __FUNCTION__ : string

    __FUNCTION__ returns the name of the current function or method, including any enclosing modules or classes.

    • since 4.12
    val __LOC_OF__ : 'a -> string * 'a

    __LOC_OF__ expr returns a pair (loc, expr) where loc is the location of expr in the file currently being parsed by the compiler, with the standard error format of OCaml: "File %S, line %d, characters %d-%d".

    • since 4.02
    val __LINE_OF__ : 'a -> int * 'a

    __LINE_OF__ expr returns a pair (line, expr), where line is the line number at which the expression expr appears in the file currently being parsed by the compiler.

    • since 4.02
    val __POS_OF__ : 'a -> (string * int * int * int) * 'a

    __POS_OF__ expr returns a pair (loc,expr), where loc is a tuple (file,lnum,cnum,enum) corresponding to the location at which the expression expr appears in the file currently being parsed by the compiler. file is the current filename, lnum the line number, cnum the character position in the line and enum the last character position in the line.

    • since 4.02

    Composition operators

    val (|>) : 'a -> ('a -> 'b) -> 'b

    Reverse-application operator: x |> f |> g is exactly equivalent to g (f (x)). Left-associative operator, see Ocaml_operators for more information.

    • since 4.01
    val (@@) : ('a -> 'b) -> 'a -> 'b

    Application operator: g @@ f @@ x is exactly equivalent to g (f (x)). Right-associative operator, see Ocaml_operators for more information.

    • since 4.01

    Integer arithmetic

    Integers are Sys.int_size bits wide. All operations are taken modulo 2Sys.int_size. They do not fail on overflow.

    val (~-) : int -> int

    Unary negation. You can also write - e instead of ~- e. Unary operator, see Ocaml_operators for more information.

    val (~+) : int -> int

    Unary addition. You can also write + e instead of ~+ e. Unary operator, see Ocaml_operators for more information.

    • since 3.12
    val succ : int -> int

    succ x is x + 1.

    val pred : int -> int

    pred x is x - 1.

    val (+) : int -> int -> int

    Integer addition. Left-associative operator, see Ocaml_operators for more information.

    val (-) : int -> int -> int

    Integer subtraction. Left-associative operator, , see Ocaml_operators for more information.

    val (*) : int -> int -> int

    Integer multiplication. Left-associative operator, see Ocaml_operators for more information.

    val (/) : int -> int -> int

    Integer division. Integer division rounds the real quotient of its arguments towards zero. More precisely, if x >= 0 and y > 0, x / y is the greatest integer less than or equal to the real quotient of x by y. Moreover, (- x) / y = x / (- y) = - (x / y). Left-associative operator, see Ocaml_operators for more information.

    val (mod) : int -> int -> int

    Integer remainder. If y is not zero, the result of x mod y satisfies the following properties: x = (x / y) * y + x mod y and abs(x mod y) <= abs(y) - 1. If y = 0, x mod y raises Division_by_zero. Note that x mod y is negative only if x < 0. Left-associative operator, see Ocaml_operators for more information.

    val abs : int -> int

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int

    The greatest representable integer.

    val min_int : int

    The smallest representable integer.

    Bitwise operations

    val (land) : int -> int -> int

    Bitwise logical and. Left-associative operator, see Ocaml_operators for more information.

    val (lor) : int -> int -> int

    Bitwise logical or. Left-associative operator, see Ocaml_operators for more information.

    val (lxor) : int -> int -> int

    Bitwise logical exclusive or. Left-associative operator, see Ocaml_operators for more information.

    val lnot : int -> int

    Bitwise logical negation.

    val (lsl) : int -> int -> int

    n lsl m shifts n to the left by m bits. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    val (lsr) : int -> int -> int

    n lsr m shifts n to the right by m bits. This is a logical shift: zeroes are inserted regardless of the sign of n. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    val (asr) : int -> int -> int

    n asr m shifts n to the right by m bits. This is an arithmetic shift: the sign bit of n is replicated. The result is unspecified if m < 0 or m > Sys.int_size. Right-associative operator, see Ocaml_operators for more information.

    Floating-point arithmetic

    OCaml's floating-point numbers follow the IEEE 754 standard, using double precision (64 bits) numbers. Floating-point operations never raise an exception on overflow, underflow, division by zero, etc. Instead, special IEEE numbers are returned as appropriate, such as infinity for 1.0 /. 0.0, neg_infinity for -1.0 /. 0.0, and nan ('not a number') for 0.0 /. 0.0. These special numbers then propagate through floating-point computations as expected: for instance, 1.0 /. infinity is 0.0, basic arithmetic operations (+., -., *., /.) with nan as an argument return nan, ...

    val (~-.) : float -> float

    Unary negation. You can also write -. e instead of ~-. e. Unary operator, see Ocaml_operators for more information.

    val (~+.) : float -> float

    Unary addition. You can also write +. e instead of ~+. e. Unary operator, see Ocaml_operators for more information.

    • since 3.12
    val (+.) : float -> float -> float

    Floating-point addition. Left-associative operator, see Ocaml_operators for more information.

    val (-.) : float -> float -> float

    Floating-point subtraction. Left-associative operator, see Ocaml_operators for more information.

    val (*.) : float -> float -> float

    Floating-point multiplication. Left-associative operator, see Ocaml_operators for more information.

    val (/.) : float -> float -> float

    Floating-point division. Left-associative operator, see Ocaml_operators for more information.

    val (**) : float -> float -> float

    Exponentiation. Right-associative operator, see Ocaml_operators for more information.

    val sqrt : float -> float

    Square root.

    val exp : float -> float

    Exponential.

    val log : float -> float

    Natural logarithm.

    val log10 : float -> float

    Base 10 logarithm.

    val expm1 : float -> float

    expm1 x computes exp x -. 1.0, giving numerically-accurate results even if x is close to 0.0.

    • since 3.12
    val log1p : float -> float

    log1p x computes log(1.0 +. x) (natural logarithm), giving numerically-accurate results even if x is close to 0.0.

    • since 3.12
    val cos : float -> float

    Cosine. Argument is in radians.

    val sin : float -> float

    Sine. Argument is in radians.

    val tan : float -> float

    Tangent. Argument is in radians.

    val acos : float -> float

    Arc cosine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between 0.0 and pi.

    val asin : float -> float

    Arc sine. The argument must fall within the range [-1.0, 1.0]. Result is in radians and is between -pi/2 and pi/2.

    val atan : float -> float

    Arc tangent. Result is in radians and is between -pi/2 and pi/2.

    val atan2 : float -> float -> float

    atan2 y x returns the arc tangent of y /. x. The signs of x and y are used to determine the quadrant of the result. Result is in radians and is between -pi and pi.

    val hypot : float -> float -> float

    hypot x y returns sqrt(x *. x + y *. y), that is, the length of the hypotenuse of a right-angled triangle with sides of length x and y, or, equivalently, the distance of the point (x,y) to origin. If one of x or y is infinite, returns infinity even if the other is nan.

    • since 4.00
    val cosh : float -> float

    Hyperbolic cosine. Argument is in radians.

    val sinh : float -> float

    Hyperbolic sine. Argument is in radians.

    val tanh : float -> float

    Hyperbolic tangent. Argument is in radians.

    val acosh : float -> float

    Hyperbolic arc cosine. The argument must fall within the range [1.0, inf]. Result is in radians and is between 0.0 and inf.

    • since 4.13
    val asinh : float -> float

    Hyperbolic arc sine. The argument and result range over the entire real line. Result is in radians.

    • since 4.13
    val atanh : float -> float

    Hyperbolic arc tangent. The argument must fall within the range [-1.0, 1.0]. Result is in radians and ranges over the entire real line.

    • since 4.13
    val ceil : float -> float

    Round above to an integer value. ceil f returns the least integer value greater than or equal to f. The result is returned as a float.

    val floor : float -> float

    Round below to an integer value. floor f returns the greatest integer value less than or equal to f. The result is returned as a float.

    val abs_float : float -> float

    abs_float f returns the absolute value of f.

    val copysign : float -> float -> float

    copysign x y returns a float whose absolute value is that of x and whose sign is that of y. If x is nan, returns nan. If y is nan, returns either x or -. x, but it is not specified which.

    • since 4.00
    val mod_float : float -> float -> float

    mod_float a b returns the remainder of a with respect to b. The returned value is a -. n *. b, where n is the quotient a /. b rounded towards zero to an integer.

    val frexp : float -> float * int

    frexp f returns the pair of the significant and the exponent of f. When f is zero, the significant x and the exponent n of f are equal to zero. When f is non-zero, they are defined by f = x *. 2 ** n and 0.5 <= x < 1.0.

    val ldexp : float -> int -> float

    ldexp x n returns x *. 2 ** n.

    val modf : float -> float * float

    modf f returns the pair of the fractional and integral part of f.

    val float : int -> float
    val float_of_int : int -> float

    Convert an integer to floating-point.

    val truncate : float -> int
    val int_of_float : float -> int

    Truncate the given floating-point number to an integer. The result is unspecified if the argument is nan or falls outside the range of representable integers.

    val infinity : float

    Positive infinity.

    val neg_infinity : float

    Negative infinity.

    val nan : float

    A special floating-point value denoting the result of an undefined operation such as 0.0 /. 0.0. Stands for 'not a number'. Any floating-point operation with nan as argument returns nan as result, unless otherwise specified in IEEE 754 standard. As for floating-point comparisons, =, <, <=, > and >= return false and <> returns true if one or both of their arguments is nan.

    nan is a quiet NaN since 5.1; it was a signaling NaN before.

    val max_float : float

    The largest positive finite value of type float.

    val min_float : float

    The smallest positive, non-zero, non-denormalized value of type float.

    val epsilon_float : float

    The difference between 1.0 and the smallest exactly representable floating-point number greater than 1.0.

    type fpclass =
    1. | FP_normal
      (*

      Normal number, none of the below

      *)
    2. | FP_subnormal
      (*

      Number very close to 0.0, has reduced precision

      *)
    3. | FP_zero
      (*

      Number is 0.0 or -0.0

      *)
    4. | FP_infinite
      (*

      Number is positive or negative infinity

      *)
    5. | FP_nan
      (*

      Not a number: result of an undefined operation

      *)

    The five classes of floating-point numbers, as determined by the Stdlib.classify_float function.

    val classify_float : float -> fpclass

    Return the class of the given floating-point number: normal, subnormal, zero, infinite, or not a number.

    String operations

    More string operations are provided in module String.

    val (^) : string -> string -> string

    String concatenation. Right-associative operator, see Ocaml_operators for more information.

    Character operations

    More character operations are provided in module Char.

    val int_of_char : char -> int

    Return the ASCII code of the argument.

    val char_of_int : int -> char

    Return the character with the given ASCII code.

    Unit operations

    val ignore : 'a -> unit

    Discard the value of its argument and return (). For instance, ignore(f x) discards the result of the side-effecting function f. It is equivalent to f x; (), except that the latter may generate a compiler warning; writing ignore(f x) instead avoids the warning.

    String conversion functions

    val string_of_bool : bool -> string

    Return the string representation of a boolean. As the returned values may be shared, the user should not modify them directly.

    val bool_of_string_opt : string -> bool option

    Convert the given string to a boolean.

    Return None if the string is not "true" or "false".

    • since 4.05
    val bool_of_string : string -> bool

    Same as Stdlib.bool_of_string_opt, but raise Invalid_argument "bool_of_string" instead of returning None.

    val string_of_int : int -> string

    Return the string representation of an integer, in decimal.

    val int_of_string_opt : string -> int option

    Convert the given string to an integer. The string is read in decimal (by default, or if the string begins with 0u), in hexadecimal (if it begins with 0x or 0X), in octal (if it begins with 0o or 0O), or in binary (if it begins with 0b or 0B).

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*max_int+1]. If the input exceeds max_int it is converted to the signed integer min_int + input - max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    Return None if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int.

    • since 4.05
    val int_of_string : string -> int

    Same as Stdlib.int_of_string_opt, but raise Failure "int_of_string" instead of returning None.

    val string_of_float : float -> string

    Return a string representation of a floating-point number.

    This conversion can involve a loss of precision. For greater control over the manner in which the number is printed, see Printf.

    val float_of_string_opt : string -> float option

    Convert the given string to a float. The string is read in decimal (by default) or in hexadecimal (marked by 0x or 0X).

    The format of decimal floating-point numbers is [-] dd.ddd (e|E) [+|-] dd , where d stands for a decimal digit.

    The format of hexadecimal floating-point numbers is [-] 0(x|X) hh.hhh (p|P) [+|-] dd , where h stands for an hexadecimal digit and d for a decimal digit.

    In both cases, at least one of the integer and fractional parts must be given; the exponent part is optional.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    Depending on the execution platforms, other representations of floating-point numbers can be accepted, but should not be relied upon.

    Return None if the given string is not a valid representation of a float.

    • since 4.05
    val float_of_string : string -> float

    Same as Stdlib.float_of_string_opt, but raise Failure "float_of_string" instead of returning None.

    Pair operations

    val fst : ('a * 'b) -> 'a

    Return the first component of a pair.

    val snd : ('a * 'b) -> 'b

    Return the second component of a pair.

    List operations

    More list operations are provided in module List.

    val (@) : 'a list -> 'a list -> 'a list

    l0 @ l1 appends l1 to l0. Same function as List.append. Right-associative operator, see Ocaml_operators for more information.

    • since 5.1 this function is tail-recursive.

    Input/output

    Note: all input/output functions can raise Sys_error when the system calls they invoke fail.

    type in_channel

    The type of input channel.

    type out_channel

    The type of output channel.

    val stdin : in_channel

    The standard input for the process.

    val stdout : out_channel

    The standard output for the process.

    val stderr : out_channel

    The standard error output for the process.

    Output functions on standard output

    val print_char : char -> unit

    Print a character on standard output.

    val print_string : string -> unit

    Print a string on standard output.

    val print_bytes : bytes -> unit

    Print a byte sequence on standard output.

    • since 4.02
    val print_int : int -> unit

    Print an integer, in decimal, on standard output.

    val print_float : float -> unit

    Print a floating-point number, in decimal, on standard output.

    The conversion of the number to a string uses string_of_float and can involve a loss of precision.

    val print_endline : string -> unit

    Print a string, followed by a newline character, on standard output and flush standard output.

    val print_newline : unit -> unit

    Print a newline character on standard output, and flush standard output. This can be used to simulate line buffering of standard output.

    Output functions on standard error

    val prerr_char : char -> unit

    Print a character on standard error.

    val prerr_string : string -> unit

    Print a string on standard error.

    val prerr_bytes : bytes -> unit

    Print a byte sequence on standard error.

    • since 4.02
    val prerr_int : int -> unit

    Print an integer, in decimal, on standard error.

    val prerr_float : float -> unit

    Print a floating-point number, in decimal, on standard error.

    The conversion of the number to a string uses string_of_float and can involve a loss of precision.

    val prerr_endline : string -> unit

    Print a string, followed by a newline character on standard error and flush standard error.

    val prerr_newline : unit -> unit

    Print a newline character on standard error, and flush standard error.

    Input functions on standard input

    val read_line : unit -> string

    Flush standard output, then read characters from standard input until a newline character is encountered.

    Return the string of all characters read, without the newline character at the end.

    • raises End_of_file

      if the end of the file is reached at the beginning of line.

    val read_int_opt : unit -> int option

    Flush standard output, then read one line from standard input and convert it to an integer.

    Return None if the line read is not a valid representation of an integer.

    • since 4.05
    val read_int : unit -> int

    Same as Stdlib.read_int_opt, but raise Failure "int_of_string" instead of returning None.

    val read_float_opt : unit -> float option

    Flush standard output, then read one line from standard input and convert it to a floating-point number.

    Return None if the line read is not a valid representation of a floating-point number.

    • since 4.05
    val read_float : unit -> float

    Same as Stdlib.read_float_opt, but raise Failure "float_of_string" instead of returning None.

    General output functions

    type open_flag =
    1. | Open_rdonly
      (*

      open for reading.

      *)
    2. | Open_wronly
      (*

      open for writing.

      *)
    3. | Open_append
      (*

      open for appending: always write at end of file.

      *)
    4. | Open_creat
      (*

      create the file if it does not exist.

      *)
    5. | Open_trunc
      (*

      empty the file if it already exists.

      *)
    6. | Open_excl
      (*

      fail if Open_creat and the file already exists.

      *)
    7. | Open_binary
      (*

      open in binary mode (no conversion).

      *)
    8. | Open_text
      (*

      open in text mode (may perform conversions).

      *)
    9. | Open_nonblock
      (*

      open in non-blocking mode.

      *)
    val open_out : string -> out_channel

    Open the named file for writing, and return a new output channel on that file, positioned at the beginning of the file. The file is truncated to zero length if it already exists. It is created if it does not already exists.

    val open_out_bin : string -> out_channel

    Same as Stdlib.open_out, but the file is opened in binary mode, so that no translation takes place during writes. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_out.

    val open_out_gen : open_flag list -> int -> string -> out_channel

    open_out_gen mode perm filename opens the named file for writing, as described above. The extra argument mode specifies the opening mode. The extra argument perm specifies the file permissions, in case the file must be created. Stdlib.open_out and Stdlib.open_out_bin are special cases of this function.

    val flush : out_channel -> unit

    Flush the buffer associated with the given output channel, performing all pending writes on that channel. Interactive programs must be careful about flushing standard output and standard error at the right time.

    val flush_all : unit -> unit

    Flush all open output channels; ignore errors.

    val output_char : out_channel -> char -> unit

    Write the character on the given output channel.

    val output_string : out_channel -> string -> unit

    Write the string on the given output channel.

    val output_bytes : out_channel -> bytes -> unit

    Write the byte sequence on the given output channel.

    • since 4.02
    val output : out_channel -> bytes -> int -> int -> unit

    output oc buf pos len writes len characters from byte sequence buf, starting at offset pos, to the given output channel oc.

    val output_substring : out_channel -> string -> int -> int -> unit

    Same as output but take a string as argument instead of a byte sequence.

    • since 4.02
    val output_byte : out_channel -> int -> unit

    Write one 8-bit integer (as the single character with that code) on the given output channel. The given integer is taken modulo 256.

    val output_binary_int : out_channel -> int -> unit

    Write one integer in binary format (4 bytes, big-endian) on the given output channel. The given integer is taken modulo 232. The only reliable way to read it back is through the Stdlib.input_binary_int function. The format is compatible across all machines for a given version of OCaml.

    val output_value : out_channel -> 'a -> unit

    Write the representation of a structured value of any type to a channel. Circularities and sharing inside the value are detected and preserved. The object can be read back, by the function Stdlib.input_value. See the description of module Marshal for more information. Stdlib.output_value is equivalent to Marshal.to_channel with an empty list of flags.

    val seek_out : out_channel -> int -> unit

    seek_out chan pos sets the current writing position to pos for channel chan. This works only for regular files. On files of other kinds (such as terminals, pipes and sockets), the behavior is unspecified.

    val pos_out : out_channel -> int

    Return the current writing position for the given channel. Does not work on channels opened with the Open_append flag (returns unspecified results). For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_out, then going back to this position using seek_out will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    val out_channel_length : out_channel -> int

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless.

    val close_out : out_channel -> unit

    Close the given channel, flushing all buffered write operations. Output functions raise a Sys_error exception when they are applied to a closed output channel, except close_out and flush, which do nothing when applied to an already closed channel. Note that close_out may raise Sys_error if the operating system signals an error when flushing or closing.

    val close_out_noerr : out_channel -> unit

    Same as close_out, but ignore all errors.

    val set_binary_mode_out : out_channel -> bool -> unit

    set_binary_mode_out oc true sets the channel oc to binary mode: no translations take place during output. set_binary_mode_out oc false sets the channel oc to text mode: depending on the operating system, some translations may take place during output. For instance, under Windows, end-of-lines will be translated from \n to \r\n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    General input functions

    val open_in : string -> in_channel

    Open the named file for reading, and return a new input channel on that file, positioned at the beginning of the file.

    val open_in_bin : string -> in_channel

    Same as Stdlib.open_in, but the file is opened in binary mode, so that no translation takes place during reads. On operating systems that do not distinguish between text mode and binary mode, this function behaves like Stdlib.open_in.

    val open_in_gen : open_flag list -> int -> string -> in_channel

    open_in_gen mode perm filename opens the named file for reading, as described above. The extra arguments mode and perm specify the opening mode and file permissions. Stdlib.open_in and Stdlib.open_in_bin are special cases of this function.

    val input_char : in_channel -> char

    Read one character from the given input channel.

    • raises End_of_file

      if there are no more characters to read.

    val input_line : in_channel -> string

    Read characters from the given input channel, until a newline character is encountered. Return the string of all characters read, without the newline character at the end.

    • raises End_of_file

      if the end of the file is reached at the beginning of line.

    val input : in_channel -> bytes -> int -> int -> int

    input ic buf pos len reads up to len characters from the given channel ic, storing them in byte sequence buf, starting at character number pos. It returns the actual number of characters read, between 0 and len (inclusive). A return value of 0 means that the end of file was reached. A return value between 0 and len exclusive means that not all requested len characters were read, either because no more characters were available at that time, or because the implementation found it convenient to do a partial read; input must be called again to read the remaining characters, if desired. (See also Stdlib.really_input for reading exactly len characters.) Exception Invalid_argument "input" is raised if pos and len do not designate a valid range of buf.

    val really_input : in_channel -> bytes -> int -> int -> unit

    really_input ic buf pos len reads len characters from channel ic, storing them in byte sequence buf, starting at character number pos.

    • raises End_of_file

      if the end of file is reached before len characters have been read.

    val really_input_string : in_channel -> int -> string

    really_input_string ic len reads len characters from channel ic and returns them in a new string.

    • raises End_of_file

      if the end of file is reached before len characters have been read.

    • since 4.02
    val input_byte : in_channel -> int

    Same as Stdlib.input_char, but return the 8-bit integer representing the character.

    val input_binary_int : in_channel -> int

    Read an integer encoded in binary format (4 bytes, big-endian) from the given input channel. See Stdlib.output_binary_int.

    • raises End_of_file

      if the end of file was reached while reading the integer.

    val input_value : in_channel -> 'a

    Read the representation of a structured value, as produced by Stdlib.output_value, and return the corresponding value. This function is identical to Marshal.from_channel; see the description of module Marshal for more information, in particular concerning the lack of type safety.

    val seek_in : in_channel -> int -> unit

    seek_in chan pos sets the current reading position to pos for channel chan. This works only for regular files. On files of other kinds, the behavior is unspecified.

    val pos_in : in_channel -> int

    Return the current reading position for the given channel. For files opened in text mode under Windows, the returned position is approximate (owing to end-of-line conversion); in particular, saving the current position with pos_in, then going back to this position using seek_in will not work. For this programming idiom to work reliably and portably, the file must be opened in binary mode.

    val in_channel_length : in_channel -> int

    Return the size (number of characters) of the regular file on which the given channel is opened. If the channel is opened on a file that is not a regular file, the result is meaningless. The returned size does not take into account the end-of-line translations that can be performed when reading from a channel opened in text mode.

    val close_in : in_channel -> unit

    Close the given channel. Input functions raise a Sys_error exception when they are applied to a closed input channel, except close_in, which does nothing when applied to an already closed channel.

    val close_in_noerr : in_channel -> unit

    Same as close_in, but ignore all errors.

    val set_binary_mode_in : in_channel -> bool -> unit

    set_binary_mode_in ic true sets the channel ic to binary mode: no translations take place during input. set_binary_mode_out ic false sets the channel ic to text mode: depending on the operating system, some translations may take place during input. For instance, under Windows, end-of-lines will be translated from \r\n to \n. This function has no effect under operating systems that do not distinguish between text mode and binary mode.

    Operations on large files

    module LargeFile : sig ... end

    Operations on large files. This sub-module provides 64-bit variants of the channel functions that manipulate file positions and file sizes. By representing positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), these alternate functions allow operating on files whose sizes are greater than max_int.

    References

    type 'a ref = {
    1. mutable contents : 'a;
    }

    The type of references (mutable indirection cells) containing a value of type 'a.

    val ref : 'a -> 'a ref

    Return a fresh reference containing the given value.

    val (!) : 'a ref -> 'a

    !r returns the current contents of reference r. Equivalent to fun r -> r.contents. Unary operator, see Ocaml_operators for more information.

    val (:=) : 'a ref -> 'a -> unit

    r := a stores the value of a in reference r. Equivalent to fun r v -> r.contents <- v. Right-associative operator, see Ocaml_operators for more information.

    val incr : int ref -> unit

    Increment the integer contained in the given reference. Equivalent to fun r -> r := succ !r.

    val decr : int ref -> unit

    Decrement the integer contained in the given reference. Equivalent to fun r -> r := pred !r.

    Result type

    type ('a, 'b) result =
    1. | Ok of 'a
    2. | Error of 'b
    • since 4.03

    Operations on format strings

    Format strings are character strings with special lexical conventions that defines the functionality of formatted input/output functions. Format strings are used to read data with formatted input functions from module Scanf and to print data with formatted output functions from modules Printf and Format.

    Format strings are made of three kinds of entities:

    • conversions specifications, introduced by the special character '%' followed by one or more characters specifying what kind of argument to read or print,
    • formatting indications, introduced by the special character '@' followed by one or more characters specifying how to read or print the argument,
    • plain characters that are regular characters with usual lexical conventions. Plain characters specify string literals to be read in the input or printed in the output.

    There is an additional lexical rule to escape the special characters '%' and '@' in format strings: if a special character follows a '%' character, it is treated as a plain character. In other words, "%%" is considered as a plain '%' and "%@" as a plain '@'.

    For more information about conversion specifications and formatting indications available, read the documentation of modules Scanf, Printf and Format.

    Format strings have a general and highly polymorphic type ('a, 'b, 'c, 'd, 'e, 'f) format6. The two simplified types, format and format4 below are included for backward compatibility with earlier releases of OCaml.

    The meaning of format string type parameters is as follows:

    • 'a is the type of the parameters of the format for formatted output functions (printf-style functions); 'a is the type of the values read by the format for formatted input functions (scanf-style functions).
    • 'b is the type of input source for formatted input functions and the type of output target for formatted output functions. For printf-style functions from module Printf, 'b is typically out_channel; for printf-style functions from module Format, 'b is typically Format.formatter; for scanf-style functions from module Scanf, 'b is typically Scanf.Scanning.in_channel.

    Type argument 'b is also the type of the first argument given to user's defined printing functions for %a and %t conversions, and user's defined reading functions for %r conversion.

    • 'c is the type of the result of the %a and %t printing functions, and also the type of the argument transmitted to the first argument of kprintf-style functions or to the kscanf-style functions.
    • 'd is the type of parameters for the scanf-style functions.
    • 'e is the type of the receiver function for the scanf-style functions.
    • 'f is the final result type of a formatted input/output function invocation: for the printf-style functions, it is typically unit; for the scanf-style functions, it is typically the result type of the receiver function.
    type ('a, 'b, 'c, 'd, 'e, 'f) format6 = ('a, 'b, 'c, 'd, 'e, 'f) CamlinternalFormatBasics.format6
    type ('a, 'b, 'c, 'd) format4 = ('a, 'b, 'c, 'c, 'c, 'd) format6
    type ('a, 'b, 'c) format = ('a, 'b, 'c, 'c) format4
    val string_of_format : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> string

    Converts a format string into a string.

    val format_of_string : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('a, 'b, 'c, 'd, 'e, 'f) format6

    format_of_string s returns a format string read from the string literal s. Note: format_of_string can not convert a string argument that is not a literal. If you need this functionality, use the more general Scanf.format_from_string function.

    val (^^) : ('a, 'b, 'c, 'd, 'e, 'f) format6 -> ('f, 'b, 'c, 'e, 'g, 'h) format6 -> - ('a, 'b, 'c, 'd, 'g, 'h) format6

    f1 ^^ f2 catenates format strings f1 and f2. The result is a format string that behaves as the concatenation of format strings f1 and f2: in case of formatted output, it accepts arguments from f1, then arguments from f2; in case of formatted input, it returns results from f1, then results from f2. Right-associative operator, see Ocaml_operators for more information.

    Program termination

    val exit : int -> 'a

    Terminate the process, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. All open output channels are flushed with flush_all. The callbacks registered with Domain.at_exit are called followed by those registered with Stdlib.at_exit.

    An implicit exit 0 is performed each time a program terminates normally. An implicit exit 2 is performed if the program terminates early because of an uncaught exception.

    val at_exit : (unit -> unit) -> unit

    Register the given function to be called at program termination time. The functions registered with at_exit will be called when the program does any of the following:

    • executes Stdlib.exit
    • terminates, either normally or because of an uncaught exception
    • executes the C function caml_shutdown. The functions are called in 'last in, first out' order: the function most recently added with at_exit is called first.

    Standard library modules

    module Arg : sig ... end

    Parsing of command line arguments.

    module Array : sig ... end

    Array operations.

    module ArrayLabels : sig ... end

    Array operations.

    module Atomic : sig ... end

    Atomic references.

    module Bigarray : sig ... end

    Large, multi-dimensional, numerical arrays.

    module Bool : sig ... end

    Boolean values.

    module Buffer : sig ... end

    Extensible buffers.

    module Bytes : sig ... end

    Byte sequence operations.

    module BytesLabels : sig ... end

    Byte sequence operations.

    module Callback : sig ... end

    Registering OCaml values with the C runtime.

    module Char : sig ... end

    Character operations.

    module Complex : sig ... end

    Complex numbers.

    module Condition : sig ... end

    Condition variables.

    module Digest : sig ... end

    MD5 message digest.

    module Domain : sig ... end
    module Effect : sig ... end
    module Either : sig ... end

    Either type.

    module Ephemeron : sig ... end

    Ephemerons and weak hash tables.

    module Filename : sig ... end

    Operations on file names.

    module Float : sig ... end

    Floating-point arithmetic.

    module Format : sig ... end

    Pretty-printing.

    module Fun : sig ... end

    Function manipulation.

    module Gc : sig ... end

    Memory management control and statistics; finalised values.

    module Hashtbl : sig ... end

    Hash tables and hash functions.

    module In_channel : sig ... end

    Input channels.

    module Int : sig ... end

    Integer values.

    module Int32 : sig ... end

    32-bit integers.

    module Int64 : sig ... end

    64-bit integers.

    module Lazy : sig ... end

    Deferred computations.

    module Lexing : sig ... end

    The run-time library for lexers generated by ocamllex.

    module List : sig ... end

    List operations.

    module ListLabels : sig ... end

    List operations.

    module Map : sig ... end

    Association tables over ordered types.

    module Marshal : sig ... end

    Marshaling of data structures.

    module MoreLabels : sig ... end

    Extra labeled libraries.

    module Mutex : sig ... end

    Locks for mutual exclusion.

    module Nativeint : sig ... end

    Processor-native integers.

    module Obj : sig ... end

    Operations on internal representations of values.

    module Oo : sig ... end

    Operations on objects

    module Option : sig ... end

    Option values.

    module Out_channel : sig ... end

    Output channels.

    module Parsing : sig ... end

    The run-time library for parsers generated by ocamlyacc.

    module Printexc : sig ... end

    Facilities for printing exceptions and inspecting current call stack.

    module Printf : sig ... end

    Formatted output functions.

    module Queue : sig ... end

    First-in first-out queues.

    module Random : sig ... end

    Pseudo-random number generators (PRNG).

    module Result : sig ... end

    Result values.

    module Scanf : sig ... end

    Formatted input functions.

    module Semaphore : sig ... end

    Semaphores

    module Seq : sig ... end

    Sequences.

    module Set : sig ... end

    Sets over ordered types.

    module Stack : sig ... end

    Last-in first-out stacks.

    module StdLabels : sig ... end

    Standard labeled libraries.

    module String : sig ... end

    Strings.

    module StringLabels : sig ... end

    Strings.

    module Sys : sig ... end

    System interface.

    module Type : sig ... end

    Type introspection.

    module Uchar : sig ... end

    Unicode characters.

    module Unit : sig ... end

    Unit values.

    module Weak : sig ... end

    Arrays of weak pointers and hash sets of weak pointers.

    \ No newline at end of file + ('a, 'b, 'c, 'd, 'g, 'h) format6

    f1 ^^ f2 catenates format strings f1 and f2. The result is a format string that behaves as the concatenation of format strings f1 and f2: in case of formatted output, it accepts arguments from f1, then arguments from f2; in case of formatted input, it returns results from f1, then results from f2. Right-associative operator, see Ocaml_operators for more information.

    Program termination

    val exit : int -> 'a

    Terminate the process, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. All open output channels are flushed with flush_all. The callbacks registered with Domain.at_exit are called followed by those registered with Stdlib.at_exit.

    An implicit exit 0 is performed each time a program terminates normally. An implicit exit 2 is performed if the program terminates early because of an uncaught exception.

    val at_exit : (unit -> unit) -> unit

    Register the given function to be called at program termination time. The functions registered with at_exit will be called when the program does any of the following:

    • executes Stdlib.exit
    • terminates, either normally or because of an uncaught exception
    • executes the C function caml_shutdown. The functions are called in 'last in, first out' order: the function most recently added with at_exit is called first.

    Standard library modules

    module Arg : sig ... end

    Parsing of command line arguments.

    module Array : sig ... end

    Array operations.

    module ArrayLabels : sig ... end

    Array operations.

    module Atomic : sig ... end

    Atomic references.

    module Bigarray : sig ... end

    Large, multi-dimensional, numerical arrays.

    module Bool : sig ... end

    Boolean values.

    module Buffer : sig ... end

    Extensible buffers.

    module Bytes : sig ... end

    Byte sequence operations.

    module BytesLabels : sig ... end

    Byte sequence operations.

    module Callback : sig ... end

    Registering OCaml values with the C runtime.

    module Char : sig ... end

    Character operations.

    module Complex : sig ... end

    Complex numbers.

    module Condition : sig ... end

    Condition variables.

    module Digest : sig ... end

    MD5 message digest.

    module Domain : sig ... end
    module Effect : sig ... end
    module Either : sig ... end

    Either type.

    module Ephemeron : sig ... end

    Ephemerons and weak hash tables.

    module Filename : sig ... end

    Operations on file names.

    module Float : sig ... end

    Floating-point arithmetic.

    module Format : sig ... end

    Pretty-printing.

    module Fun : sig ... end

    Function manipulation.

    module Gc : sig ... end

    Memory management control and statistics; finalised values.

    module Hashtbl : sig ... end

    Hash tables and hash functions.

    module In_channel : sig ... end

    Input channels.

    module Int : sig ... end

    Integer values.

    module Int32 : sig ... end

    32-bit integers.

    module Int64 : sig ... end

    64-bit integers.

    module Lazy : sig ... end

    Deferred computations.

    module Lexing : sig ... end

    The run-time library for lexers generated by ocamllex.

    module List : sig ... end

    List operations.

    module ListLabels : sig ... end

    List operations.

    module Map : sig ... end

    Association tables over ordered types.

    module Marshal : sig ... end

    Marshaling of data structures.

    module MoreLabels : sig ... end

    Extra labeled libraries.

    module Mutex : sig ... end

    Locks for mutual exclusion.

    module Nativeint : sig ... end

    Processor-native integers.

    module Obj : sig ... end

    Operations on internal representations of values.

    module Oo : sig ... end

    Operations on objects

    module Option : sig ... end

    Option values.

    module Out_channel : sig ... end

    Output channels.

    module Parsing : sig ... end

    The run-time library for parsers generated by ocamlyacc.

    module Printexc : sig ... end

    Facilities for printing exceptions and inspecting current call stack.

    module Printf : sig ... end

    Formatted output functions.

    module Queue : sig ... end

    First-in first-out queues.

    module Random : sig ... end

    Pseudo-random number generators (PRNG).

    module Result : sig ... end

    Result values.

    module Scanf : sig ... end

    Formatted input functions.

    module Semaphore : sig ... end

    Semaphores

    module Seq : sig ... end

    Sequences.

    module Set : sig ... end

    Sets over ordered types.

    module Stack : sig ... end

    Last-in first-out stacks.

    module StdLabels : sig ... end

    Standard labeled libraries.

    module String : sig ... end

    Strings.

    module StringLabels : sig ... end

    Strings.

    module Sys : sig ... end

    System interface.

    module Type : sig ... end

    Type introspection.

    module Uchar : sig ... end

    Unicode characters.

    module Unit : sig ... end

    Unit values.

    module Weak : sig ... end

    Arrays of weak pointers and hash sets of weak pointers.

    diff --git a/ocaml/Stdlib__Arg/index.html b/ocaml/Stdlib__Arg/index.html index f6686ab..b948465 100644 --- a/ocaml/Stdlib__Arg/index.html +++ b/ocaml/Stdlib__Arg/index.html @@ -1,2 +1,2 @@ -Stdlib__Arg (ocaml.Stdlib__Arg)

    Module Stdlib__Arg

    \ No newline at end of file +Stdlib__Arg (ocaml.Stdlib__Arg)

    Module Stdlib__Arg

    This module is hidden.

    diff --git a/ocaml/Stdlib__Array/index.html b/ocaml/Stdlib__Array/index.html index bc7b1f1..a847037 100644 --- a/ocaml/Stdlib__Array/index.html +++ b/ocaml/Stdlib__Array/index.html @@ -1,2 +1,2 @@ -Stdlib__Array (ocaml.Stdlib__Array)

    Module Stdlib__Array

    \ No newline at end of file +Stdlib__Array (ocaml.Stdlib__Array)

    Module Stdlib__Array

    This module is hidden.

    diff --git a/ocaml/Stdlib__ArrayLabels/index.html b/ocaml/Stdlib__ArrayLabels/index.html index 6194b11..8a70f7d 100644 --- a/ocaml/Stdlib__ArrayLabels/index.html +++ b/ocaml/Stdlib__ArrayLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__ArrayLabels (ocaml.Stdlib__ArrayLabels)

    Module Stdlib__ArrayLabels

    \ No newline at end of file +Stdlib__ArrayLabels (ocaml.Stdlib__ArrayLabels)

    Module Stdlib__ArrayLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__Atomic/index.html b/ocaml/Stdlib__Atomic/index.html index 83b7343..34fa55f 100644 --- a/ocaml/Stdlib__Atomic/index.html +++ b/ocaml/Stdlib__Atomic/index.html @@ -1,2 +1,2 @@ -Stdlib__Atomic (ocaml.Stdlib__Atomic)

    Module Stdlib__Atomic

    \ No newline at end of file +Stdlib__Atomic (ocaml.Stdlib__Atomic)

    Module Stdlib__Atomic

    This module is hidden.

    diff --git a/ocaml/Stdlib__Bigarray/index.html b/ocaml/Stdlib__Bigarray/index.html index cee7911..f30674a 100644 --- a/ocaml/Stdlib__Bigarray/index.html +++ b/ocaml/Stdlib__Bigarray/index.html @@ -1,2 +1,2 @@ -Stdlib__Bigarray (ocaml.Stdlib__Bigarray)

    Module Stdlib__Bigarray

    \ No newline at end of file +Stdlib__Bigarray (ocaml.Stdlib__Bigarray)

    Module Stdlib__Bigarray

    This module is hidden.

    diff --git a/ocaml/Stdlib__Bool/index.html b/ocaml/Stdlib__Bool/index.html index 527d543..903958d 100644 --- a/ocaml/Stdlib__Bool/index.html +++ b/ocaml/Stdlib__Bool/index.html @@ -1,2 +1,2 @@ -Stdlib__Bool (ocaml.Stdlib__Bool)

    Module Stdlib__Bool

    \ No newline at end of file +Stdlib__Bool (ocaml.Stdlib__Bool)

    Module Stdlib__Bool

    This module is hidden.

    diff --git a/ocaml/Stdlib__Buffer/index.html b/ocaml/Stdlib__Buffer/index.html index 8d6e228..0b21861 100644 --- a/ocaml/Stdlib__Buffer/index.html +++ b/ocaml/Stdlib__Buffer/index.html @@ -1,2 +1,2 @@ -Stdlib__Buffer (ocaml.Stdlib__Buffer)

    Module Stdlib__Buffer

    \ No newline at end of file +Stdlib__Buffer (ocaml.Stdlib__Buffer)

    Module Stdlib__Buffer

    This module is hidden.

    diff --git a/ocaml/Stdlib__Bytes/index.html b/ocaml/Stdlib__Bytes/index.html index f6b9bee..d3b750b 100644 --- a/ocaml/Stdlib__Bytes/index.html +++ b/ocaml/Stdlib__Bytes/index.html @@ -1,2 +1,2 @@ -Stdlib__Bytes (ocaml.Stdlib__Bytes)

    Module Stdlib__Bytes

    \ No newline at end of file +Stdlib__Bytes (ocaml.Stdlib__Bytes)

    Module Stdlib__Bytes

    This module is hidden.

    diff --git a/ocaml/Stdlib__BytesLabels/index.html b/ocaml/Stdlib__BytesLabels/index.html index d71c5ac..ca6ad99 100644 --- a/ocaml/Stdlib__BytesLabels/index.html +++ b/ocaml/Stdlib__BytesLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__BytesLabels (ocaml.Stdlib__BytesLabels)

    Module Stdlib__BytesLabels

    \ No newline at end of file +Stdlib__BytesLabels (ocaml.Stdlib__BytesLabels)

    Module Stdlib__BytesLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__Callback/index.html b/ocaml/Stdlib__Callback/index.html index 60041ae..bf95c5d 100644 --- a/ocaml/Stdlib__Callback/index.html +++ b/ocaml/Stdlib__Callback/index.html @@ -1,2 +1,2 @@ -Stdlib__Callback (ocaml.Stdlib__Callback)

    Module Stdlib__Callback

    \ No newline at end of file +Stdlib__Callback (ocaml.Stdlib__Callback)

    Module Stdlib__Callback

    This module is hidden.

    diff --git a/ocaml/Stdlib__Char/index.html b/ocaml/Stdlib__Char/index.html index 3150aa2..290bce5 100644 --- a/ocaml/Stdlib__Char/index.html +++ b/ocaml/Stdlib__Char/index.html @@ -1,2 +1,2 @@ -Stdlib__Char (ocaml.Stdlib__Char)

    Module Stdlib__Char

    \ No newline at end of file +Stdlib__Char (ocaml.Stdlib__Char)

    Module Stdlib__Char

    This module is hidden.

    diff --git a/ocaml/Stdlib__Complex/index.html b/ocaml/Stdlib__Complex/index.html index de5879c..e060386 100644 --- a/ocaml/Stdlib__Complex/index.html +++ b/ocaml/Stdlib__Complex/index.html @@ -1,2 +1,2 @@ -Stdlib__Complex (ocaml.Stdlib__Complex)

    Module Stdlib__Complex

    \ No newline at end of file +Stdlib__Complex (ocaml.Stdlib__Complex)

    Module Stdlib__Complex

    This module is hidden.

    diff --git a/ocaml/Stdlib__Condition/index.html b/ocaml/Stdlib__Condition/index.html index 7bae0a6..46136d1 100644 --- a/ocaml/Stdlib__Condition/index.html +++ b/ocaml/Stdlib__Condition/index.html @@ -1,2 +1,2 @@ -Stdlib__Condition (ocaml.Stdlib__Condition)

    Module Stdlib__Condition

    \ No newline at end of file +Stdlib__Condition (ocaml.Stdlib__Condition)

    Module Stdlib__Condition

    This module is hidden.

    diff --git a/ocaml/Stdlib__Digest/index.html b/ocaml/Stdlib__Digest/index.html index e72dafa..4b9e533 100644 --- a/ocaml/Stdlib__Digest/index.html +++ b/ocaml/Stdlib__Digest/index.html @@ -1,2 +1,2 @@ -Stdlib__Digest (ocaml.Stdlib__Digest)

    Module Stdlib__Digest

    \ No newline at end of file +Stdlib__Digest (ocaml.Stdlib__Digest)

    Module Stdlib__Digest

    This module is hidden.

    diff --git a/ocaml/Stdlib__Domain/index.html b/ocaml/Stdlib__Domain/index.html index e07ac97..d807590 100644 --- a/ocaml/Stdlib__Domain/index.html +++ b/ocaml/Stdlib__Domain/index.html @@ -1,2 +1,2 @@ -Stdlib__Domain (ocaml.Stdlib__Domain)

    Module Stdlib__Domain

    \ No newline at end of file +Stdlib__Domain (ocaml.Stdlib__Domain)

    Module Stdlib__Domain

    This module is hidden.

    diff --git a/ocaml/Stdlib__Effect/index.html b/ocaml/Stdlib__Effect/index.html index c880b0b..4d07965 100644 --- a/ocaml/Stdlib__Effect/index.html +++ b/ocaml/Stdlib__Effect/index.html @@ -1,2 +1,2 @@ -Stdlib__Effect (ocaml.Stdlib__Effect)

    Module Stdlib__Effect

    \ No newline at end of file +Stdlib__Effect (ocaml.Stdlib__Effect)

    Module Stdlib__Effect

    This module is hidden.

    diff --git a/ocaml/Stdlib__Either/index.html b/ocaml/Stdlib__Either/index.html index eb0124f..b474785 100644 --- a/ocaml/Stdlib__Either/index.html +++ b/ocaml/Stdlib__Either/index.html @@ -1,2 +1,2 @@ -Stdlib__Either (ocaml.Stdlib__Either)

    Module Stdlib__Either

    \ No newline at end of file +Stdlib__Either (ocaml.Stdlib__Either)

    Module Stdlib__Either

    This module is hidden.

    diff --git a/ocaml/Stdlib__Ephemeron/index.html b/ocaml/Stdlib__Ephemeron/index.html index 186296e..997ba7d 100644 --- a/ocaml/Stdlib__Ephemeron/index.html +++ b/ocaml/Stdlib__Ephemeron/index.html @@ -1,2 +1,2 @@ -Stdlib__Ephemeron (ocaml.Stdlib__Ephemeron)

    Module Stdlib__Ephemeron

    \ No newline at end of file +Stdlib__Ephemeron (ocaml.Stdlib__Ephemeron)

    Module Stdlib__Ephemeron

    This module is hidden.

    diff --git a/ocaml/Stdlib__Filename/index.html b/ocaml/Stdlib__Filename/index.html index 3bdf539..416a41e 100644 --- a/ocaml/Stdlib__Filename/index.html +++ b/ocaml/Stdlib__Filename/index.html @@ -1,2 +1,2 @@ -Stdlib__Filename (ocaml.Stdlib__Filename)

    Module Stdlib__Filename

    \ No newline at end of file +Stdlib__Filename (ocaml.Stdlib__Filename)

    Module Stdlib__Filename

    This module is hidden.

    diff --git a/ocaml/Stdlib__Float/index.html b/ocaml/Stdlib__Float/index.html index 8399250..69efaf7 100644 --- a/ocaml/Stdlib__Float/index.html +++ b/ocaml/Stdlib__Float/index.html @@ -1,2 +1,2 @@ -Stdlib__Float (ocaml.Stdlib__Float)

    Module Stdlib__Float

    \ No newline at end of file +Stdlib__Float (ocaml.Stdlib__Float)

    Module Stdlib__Float

    This module is hidden.

    diff --git a/ocaml/Stdlib__Format/index.html b/ocaml/Stdlib__Format/index.html index 1a019a5..bdcb12a 100644 --- a/ocaml/Stdlib__Format/index.html +++ b/ocaml/Stdlib__Format/index.html @@ -1,2 +1,2 @@ -Stdlib__Format (ocaml.Stdlib__Format)

    Module Stdlib__Format

    \ No newline at end of file +Stdlib__Format (ocaml.Stdlib__Format)

    Module Stdlib__Format

    This module is hidden.

    diff --git a/ocaml/Stdlib__Fun/index.html b/ocaml/Stdlib__Fun/index.html index 8cc27df..66353c6 100644 --- a/ocaml/Stdlib__Fun/index.html +++ b/ocaml/Stdlib__Fun/index.html @@ -1,2 +1,2 @@ -Stdlib__Fun (ocaml.Stdlib__Fun)

    Module Stdlib__Fun

    \ No newline at end of file +Stdlib__Fun (ocaml.Stdlib__Fun)

    Module Stdlib__Fun

    This module is hidden.

    diff --git a/ocaml/Stdlib__Gc/index.html b/ocaml/Stdlib__Gc/index.html index 9ca59f7..7d1d166 100644 --- a/ocaml/Stdlib__Gc/index.html +++ b/ocaml/Stdlib__Gc/index.html @@ -1,2 +1,2 @@ -Stdlib__Gc (ocaml.Stdlib__Gc)

    Module Stdlib__Gc

    \ No newline at end of file +Stdlib__Gc (ocaml.Stdlib__Gc)

    Module Stdlib__Gc

    This module is hidden.

    diff --git a/ocaml/Stdlib__Hashtbl/index.html b/ocaml/Stdlib__Hashtbl/index.html index bff8639..678a548 100644 --- a/ocaml/Stdlib__Hashtbl/index.html +++ b/ocaml/Stdlib__Hashtbl/index.html @@ -1,2 +1,2 @@ -Stdlib__Hashtbl (ocaml.Stdlib__Hashtbl)

    Module Stdlib__Hashtbl

    \ No newline at end of file +Stdlib__Hashtbl (ocaml.Stdlib__Hashtbl)

    Module Stdlib__Hashtbl

    This module is hidden.

    diff --git a/ocaml/Stdlib__In_channel/index.html b/ocaml/Stdlib__In_channel/index.html index c91b38f..ed0e4b1 100644 --- a/ocaml/Stdlib__In_channel/index.html +++ b/ocaml/Stdlib__In_channel/index.html @@ -1,2 +1,2 @@ -Stdlib__In_channel (ocaml.Stdlib__In_channel)

    Module Stdlib__In_channel

    \ No newline at end of file +Stdlib__In_channel (ocaml.Stdlib__In_channel)

    Module Stdlib__In_channel

    This module is hidden.

    diff --git a/ocaml/Stdlib__Int/index.html b/ocaml/Stdlib__Int/index.html index 7b794b6..5800414 100644 --- a/ocaml/Stdlib__Int/index.html +++ b/ocaml/Stdlib__Int/index.html @@ -1,2 +1,2 @@ -Stdlib__Int (ocaml.Stdlib__Int)

    Module Stdlib__Int

    \ No newline at end of file +Stdlib__Int (ocaml.Stdlib__Int)

    Module Stdlib__Int

    This module is hidden.

    diff --git a/ocaml/Stdlib__Int32/index.html b/ocaml/Stdlib__Int32/index.html index 64b3417..13706b7 100644 --- a/ocaml/Stdlib__Int32/index.html +++ b/ocaml/Stdlib__Int32/index.html @@ -1,2 +1,2 @@ -Stdlib__Int32 (ocaml.Stdlib__Int32)

    Module Stdlib__Int32

    \ No newline at end of file +Stdlib__Int32 (ocaml.Stdlib__Int32)

    Module Stdlib__Int32

    This module is hidden.

    diff --git a/ocaml/Stdlib__Int64/index.html b/ocaml/Stdlib__Int64/index.html index a38fc07..c22e976 100644 --- a/ocaml/Stdlib__Int64/index.html +++ b/ocaml/Stdlib__Int64/index.html @@ -1,2 +1,2 @@ -Stdlib__Int64 (ocaml.Stdlib__Int64)

    Module Stdlib__Int64

    \ No newline at end of file +Stdlib__Int64 (ocaml.Stdlib__Int64)

    Module Stdlib__Int64

    This module is hidden.

    diff --git a/ocaml/Stdlib__Lazy/index.html b/ocaml/Stdlib__Lazy/index.html index 602cdab..7b4637d 100644 --- a/ocaml/Stdlib__Lazy/index.html +++ b/ocaml/Stdlib__Lazy/index.html @@ -1,2 +1,2 @@ -Stdlib__Lazy (ocaml.Stdlib__Lazy)

    Module Stdlib__Lazy

    \ No newline at end of file +Stdlib__Lazy (ocaml.Stdlib__Lazy)

    Module Stdlib__Lazy

    This module is hidden.

    diff --git a/ocaml/Stdlib__Lexing/index.html b/ocaml/Stdlib__Lexing/index.html index cb74595..438ef22 100644 --- a/ocaml/Stdlib__Lexing/index.html +++ b/ocaml/Stdlib__Lexing/index.html @@ -1,2 +1,2 @@ -Stdlib__Lexing (ocaml.Stdlib__Lexing)

    Module Stdlib__Lexing

    \ No newline at end of file +Stdlib__Lexing (ocaml.Stdlib__Lexing)

    Module Stdlib__Lexing

    This module is hidden.

    diff --git a/ocaml/Stdlib__List/index.html b/ocaml/Stdlib__List/index.html index 33b3dbd..9aa107d 100644 --- a/ocaml/Stdlib__List/index.html +++ b/ocaml/Stdlib__List/index.html @@ -1,2 +1,2 @@ -Stdlib__List (ocaml.Stdlib__List)

    Module Stdlib__List

    \ No newline at end of file +Stdlib__List (ocaml.Stdlib__List)

    Module Stdlib__List

    This module is hidden.

    diff --git a/ocaml/Stdlib__ListLabels/index.html b/ocaml/Stdlib__ListLabels/index.html index 194c0a0..a459ef5 100644 --- a/ocaml/Stdlib__ListLabels/index.html +++ b/ocaml/Stdlib__ListLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__ListLabels (ocaml.Stdlib__ListLabels)

    Module Stdlib__ListLabels

    \ No newline at end of file +Stdlib__ListLabels (ocaml.Stdlib__ListLabels)

    Module Stdlib__ListLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__Map/index.html b/ocaml/Stdlib__Map/index.html index 331efdf..b0606bb 100644 --- a/ocaml/Stdlib__Map/index.html +++ b/ocaml/Stdlib__Map/index.html @@ -1,2 +1,2 @@ -Stdlib__Map (ocaml.Stdlib__Map)

    Module Stdlib__Map

    \ No newline at end of file +Stdlib__Map (ocaml.Stdlib__Map)

    Module Stdlib__Map

    This module is hidden.

    diff --git a/ocaml/Stdlib__Marshal/index.html b/ocaml/Stdlib__Marshal/index.html index 7ccfc64..906daf0 100644 --- a/ocaml/Stdlib__Marshal/index.html +++ b/ocaml/Stdlib__Marshal/index.html @@ -1,2 +1,2 @@ -Stdlib__Marshal (ocaml.Stdlib__Marshal)

    Module Stdlib__Marshal

    \ No newline at end of file +Stdlib__Marshal (ocaml.Stdlib__Marshal)

    Module Stdlib__Marshal

    This module is hidden.

    diff --git a/ocaml/Stdlib__MoreLabels/index.html b/ocaml/Stdlib__MoreLabels/index.html index 2cc57c7..09dd661 100644 --- a/ocaml/Stdlib__MoreLabels/index.html +++ b/ocaml/Stdlib__MoreLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__MoreLabels (ocaml.Stdlib__MoreLabels)

    Module Stdlib__MoreLabels

    \ No newline at end of file +Stdlib__MoreLabels (ocaml.Stdlib__MoreLabels)

    Module Stdlib__MoreLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__Mutex/index.html b/ocaml/Stdlib__Mutex/index.html index b6d184c..ecea7a2 100644 --- a/ocaml/Stdlib__Mutex/index.html +++ b/ocaml/Stdlib__Mutex/index.html @@ -1,2 +1,2 @@ -Stdlib__Mutex (ocaml.Stdlib__Mutex)

    Module Stdlib__Mutex

    \ No newline at end of file +Stdlib__Mutex (ocaml.Stdlib__Mutex)

    Module Stdlib__Mutex

    This module is hidden.

    diff --git a/ocaml/Stdlib__Nativeint/index.html b/ocaml/Stdlib__Nativeint/index.html index 9df0ba1..b4fa776 100644 --- a/ocaml/Stdlib__Nativeint/index.html +++ b/ocaml/Stdlib__Nativeint/index.html @@ -1,2 +1,2 @@ -Stdlib__Nativeint (ocaml.Stdlib__Nativeint)

    Module Stdlib__Nativeint

    \ No newline at end of file +Stdlib__Nativeint (ocaml.Stdlib__Nativeint)

    Module Stdlib__Nativeint

    This module is hidden.

    diff --git a/ocaml/Stdlib__Obj/index.html b/ocaml/Stdlib__Obj/index.html index b9607bc..2edf180 100644 --- a/ocaml/Stdlib__Obj/index.html +++ b/ocaml/Stdlib__Obj/index.html @@ -1,2 +1,2 @@ -Stdlib__Obj (ocaml.Stdlib__Obj)

    Module Stdlib__Obj

    \ No newline at end of file +Stdlib__Obj (ocaml.Stdlib__Obj)

    Module Stdlib__Obj

    This module is hidden.

    diff --git a/ocaml/Stdlib__Oo/index.html b/ocaml/Stdlib__Oo/index.html index d993bf8..4ed32fa 100644 --- a/ocaml/Stdlib__Oo/index.html +++ b/ocaml/Stdlib__Oo/index.html @@ -1,2 +1,2 @@ -Stdlib__Oo (ocaml.Stdlib__Oo)

    Module Stdlib__Oo

    \ No newline at end of file +Stdlib__Oo (ocaml.Stdlib__Oo)

    Module Stdlib__Oo

    This module is hidden.

    diff --git a/ocaml/Stdlib__Option/index.html b/ocaml/Stdlib__Option/index.html index dd1841e..398d4ac 100644 --- a/ocaml/Stdlib__Option/index.html +++ b/ocaml/Stdlib__Option/index.html @@ -1,2 +1,2 @@ -Stdlib__Option (ocaml.Stdlib__Option)

    Module Stdlib__Option

    \ No newline at end of file +Stdlib__Option (ocaml.Stdlib__Option)

    Module Stdlib__Option

    This module is hidden.

    diff --git a/ocaml/Stdlib__Out_channel/index.html b/ocaml/Stdlib__Out_channel/index.html index e40b1dc..6775e6f 100644 --- a/ocaml/Stdlib__Out_channel/index.html +++ b/ocaml/Stdlib__Out_channel/index.html @@ -1,2 +1,2 @@ -Stdlib__Out_channel (ocaml.Stdlib__Out_channel)

    Module Stdlib__Out_channel

    \ No newline at end of file +Stdlib__Out_channel (ocaml.Stdlib__Out_channel)

    Module Stdlib__Out_channel

    This module is hidden.

    diff --git a/ocaml/Stdlib__Parsing/index.html b/ocaml/Stdlib__Parsing/index.html index a11f769..53e282e 100644 --- a/ocaml/Stdlib__Parsing/index.html +++ b/ocaml/Stdlib__Parsing/index.html @@ -1,2 +1,2 @@ -Stdlib__Parsing (ocaml.Stdlib__Parsing)

    Module Stdlib__Parsing

    \ No newline at end of file +Stdlib__Parsing (ocaml.Stdlib__Parsing)

    Module Stdlib__Parsing

    This module is hidden.

    diff --git a/ocaml/Stdlib__Printexc/index.html b/ocaml/Stdlib__Printexc/index.html index 26d5e3d..e40dfc9 100644 --- a/ocaml/Stdlib__Printexc/index.html +++ b/ocaml/Stdlib__Printexc/index.html @@ -1,2 +1,2 @@ -Stdlib__Printexc (ocaml.Stdlib__Printexc)

    Module Stdlib__Printexc

    \ No newline at end of file +Stdlib__Printexc (ocaml.Stdlib__Printexc)

    Module Stdlib__Printexc

    This module is hidden.

    diff --git a/ocaml/Stdlib__Printf/index.html b/ocaml/Stdlib__Printf/index.html index a7cb981..50f6ab9 100644 --- a/ocaml/Stdlib__Printf/index.html +++ b/ocaml/Stdlib__Printf/index.html @@ -1,2 +1,2 @@ -Stdlib__Printf (ocaml.Stdlib__Printf)

    Module Stdlib__Printf

    \ No newline at end of file +Stdlib__Printf (ocaml.Stdlib__Printf)

    Module Stdlib__Printf

    This module is hidden.

    diff --git a/ocaml/Stdlib__Queue/index.html b/ocaml/Stdlib__Queue/index.html index 547e87f..fa083e0 100644 --- a/ocaml/Stdlib__Queue/index.html +++ b/ocaml/Stdlib__Queue/index.html @@ -1,2 +1,2 @@ -Stdlib__Queue (ocaml.Stdlib__Queue)

    Module Stdlib__Queue

    \ No newline at end of file +Stdlib__Queue (ocaml.Stdlib__Queue)

    Module Stdlib__Queue

    This module is hidden.

    diff --git a/ocaml/Stdlib__Random/index.html b/ocaml/Stdlib__Random/index.html index 0719a75..e74984e 100644 --- a/ocaml/Stdlib__Random/index.html +++ b/ocaml/Stdlib__Random/index.html @@ -1,2 +1,2 @@ -Stdlib__Random (ocaml.Stdlib__Random)

    Module Stdlib__Random

    \ No newline at end of file +Stdlib__Random (ocaml.Stdlib__Random)

    Module Stdlib__Random

    This module is hidden.

    diff --git a/ocaml/Stdlib__Result/index.html b/ocaml/Stdlib__Result/index.html index 3785eb5..c769b9f 100644 --- a/ocaml/Stdlib__Result/index.html +++ b/ocaml/Stdlib__Result/index.html @@ -1,2 +1,2 @@ -Stdlib__Result (ocaml.Stdlib__Result)

    Module Stdlib__Result

    \ No newline at end of file +Stdlib__Result (ocaml.Stdlib__Result)

    Module Stdlib__Result

    This module is hidden.

    diff --git a/ocaml/Stdlib__Scanf/index.html b/ocaml/Stdlib__Scanf/index.html index 8a039eb..6388010 100644 --- a/ocaml/Stdlib__Scanf/index.html +++ b/ocaml/Stdlib__Scanf/index.html @@ -1,2 +1,2 @@ -Stdlib__Scanf (ocaml.Stdlib__Scanf)

    Module Stdlib__Scanf

    \ No newline at end of file +Stdlib__Scanf (ocaml.Stdlib__Scanf)

    Module Stdlib__Scanf

    This module is hidden.

    diff --git a/ocaml/Stdlib__Semaphore/index.html b/ocaml/Stdlib__Semaphore/index.html index 72075e3..65c381a 100644 --- a/ocaml/Stdlib__Semaphore/index.html +++ b/ocaml/Stdlib__Semaphore/index.html @@ -1,2 +1,2 @@ -Stdlib__Semaphore (ocaml.Stdlib__Semaphore)

    Module Stdlib__Semaphore

    \ No newline at end of file +Stdlib__Semaphore (ocaml.Stdlib__Semaphore)

    Module Stdlib__Semaphore

    This module is hidden.

    diff --git a/ocaml/Stdlib__Seq/index.html b/ocaml/Stdlib__Seq/index.html index d2c6af6..8da81cd 100644 --- a/ocaml/Stdlib__Seq/index.html +++ b/ocaml/Stdlib__Seq/index.html @@ -1,2 +1,2 @@ -Stdlib__Seq (ocaml.Stdlib__Seq)

    Module Stdlib__Seq

    \ No newline at end of file +Stdlib__Seq (ocaml.Stdlib__Seq)

    Module Stdlib__Seq

    This module is hidden.

    diff --git a/ocaml/Stdlib__Set/index.html b/ocaml/Stdlib__Set/index.html index de4fa18..7977f24 100644 --- a/ocaml/Stdlib__Set/index.html +++ b/ocaml/Stdlib__Set/index.html @@ -1,2 +1,2 @@ -Stdlib__Set (ocaml.Stdlib__Set)

    Module Stdlib__Set

    \ No newline at end of file +Stdlib__Set (ocaml.Stdlib__Set)

    Module Stdlib__Set

    This module is hidden.

    diff --git a/ocaml/Stdlib__Stack/index.html b/ocaml/Stdlib__Stack/index.html index 31bdf3f..cc91c43 100644 --- a/ocaml/Stdlib__Stack/index.html +++ b/ocaml/Stdlib__Stack/index.html @@ -1,2 +1,2 @@ -Stdlib__Stack (ocaml.Stdlib__Stack)

    Module Stdlib__Stack

    \ No newline at end of file +Stdlib__Stack (ocaml.Stdlib__Stack)

    Module Stdlib__Stack

    This module is hidden.

    diff --git a/ocaml/Stdlib__StdLabels/index.html b/ocaml/Stdlib__StdLabels/index.html index e1f25cd..4778f76 100644 --- a/ocaml/Stdlib__StdLabels/index.html +++ b/ocaml/Stdlib__StdLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__StdLabels (ocaml.Stdlib__StdLabels)

    Module Stdlib__StdLabels

    \ No newline at end of file +Stdlib__StdLabels (ocaml.Stdlib__StdLabels)

    Module Stdlib__StdLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__String/index.html b/ocaml/Stdlib__String/index.html index ce1a628..c3b2902 100644 --- a/ocaml/Stdlib__String/index.html +++ b/ocaml/Stdlib__String/index.html @@ -1,2 +1,2 @@ -Stdlib__String (ocaml.Stdlib__String)

    Module Stdlib__String

    \ No newline at end of file +Stdlib__String (ocaml.Stdlib__String)

    Module Stdlib__String

    This module is hidden.

    diff --git a/ocaml/Stdlib__StringLabels/index.html b/ocaml/Stdlib__StringLabels/index.html index d2e8151..bfdc8b3 100644 --- a/ocaml/Stdlib__StringLabels/index.html +++ b/ocaml/Stdlib__StringLabels/index.html @@ -1,2 +1,2 @@ -Stdlib__StringLabels (ocaml.Stdlib__StringLabels)

    Module Stdlib__StringLabels

    \ No newline at end of file +Stdlib__StringLabels (ocaml.Stdlib__StringLabels)

    Module Stdlib__StringLabels

    This module is hidden.

    diff --git a/ocaml/Stdlib__Sys/index.html b/ocaml/Stdlib__Sys/index.html index 9ac6686..4fdf401 100644 --- a/ocaml/Stdlib__Sys/index.html +++ b/ocaml/Stdlib__Sys/index.html @@ -1,2 +1,2 @@ -Stdlib__Sys (ocaml.Stdlib__Sys)

    Module Stdlib__Sys

    \ No newline at end of file +Stdlib__Sys (ocaml.Stdlib__Sys)

    Module Stdlib__Sys

    This module is hidden.

    diff --git a/ocaml/Stdlib__Type/index.html b/ocaml/Stdlib__Type/index.html index df85c29..3553c7f 100644 --- a/ocaml/Stdlib__Type/index.html +++ b/ocaml/Stdlib__Type/index.html @@ -1,2 +1,2 @@ -Stdlib__Type (ocaml.Stdlib__Type)

    Module Stdlib__Type

    \ No newline at end of file +Stdlib__Type (ocaml.Stdlib__Type)

    Module Stdlib__Type

    This module is hidden.

    diff --git a/ocaml/Stdlib__Uchar/index.html b/ocaml/Stdlib__Uchar/index.html index 65763c9..4cfc6c3 100644 --- a/ocaml/Stdlib__Uchar/index.html +++ b/ocaml/Stdlib__Uchar/index.html @@ -1,2 +1,2 @@ -Stdlib__Uchar (ocaml.Stdlib__Uchar)

    Module Stdlib__Uchar

    \ No newline at end of file +Stdlib__Uchar (ocaml.Stdlib__Uchar)

    Module Stdlib__Uchar

    This module is hidden.

    diff --git a/ocaml/Stdlib__Unit/index.html b/ocaml/Stdlib__Unit/index.html index a3994d0..a34fad2 100644 --- a/ocaml/Stdlib__Unit/index.html +++ b/ocaml/Stdlib__Unit/index.html @@ -1,2 +1,2 @@ -Stdlib__Unit (ocaml.Stdlib__Unit)

    Module Stdlib__Unit

    \ No newline at end of file +Stdlib__Unit (ocaml.Stdlib__Unit)

    Module Stdlib__Unit

    This module is hidden.

    diff --git a/ocaml/Stdlib__Weak/index.html b/ocaml/Stdlib__Weak/index.html index a213f66..3adee11 100644 --- a/ocaml/Stdlib__Weak/index.html +++ b/ocaml/Stdlib__Weak/index.html @@ -1,2 +1,2 @@ -Stdlib__Weak (ocaml.Stdlib__Weak)

    Module Stdlib__Weak

    \ No newline at end of file +Stdlib__Weak (ocaml.Stdlib__Weak)

    Module Stdlib__Weak

    This module is hidden.

    diff --git a/ocaml/Str/index.html b/ocaml/Str/index.html index f15c0a4..83ce581 100644 --- a/ocaml/Str/index.html +++ b/ocaml/Str/index.html @@ -1,4 +1,4 @@ -Str (ocaml.Str)

    Module Str

    Regular expressions and high-level string processing

    Regular expressions

    The Str library provides regular expressions on sequences of bytes. It is, in general, unsuitable to match Unicode characters.

    type regexp

    The type of compiled regular expressions.

    val regexp : string -> regexp

    Compile a regular expression. The following constructs are recognized:

    • . Matches any character except newline.
    • * (postfix) Matches the preceding expression zero, one or several times
    • + (postfix) Matches the preceding expression one or several times
    • ? (postfix) Matches the preceding expression once or not at all
    • [..] Character set. Ranges are denoted with -, as in [a-z]. An initial ^, as in [^0-9], complements the set. To include a ] character in a set, make it the first character of the set. To include a - character in a set, make it the first or the last character of the set.
    • ^ Matches at beginning of line: either at the beginning of the matched string, or just after a '\n' character.
    • $ Matches at end of line: either at the end of the matched string, or just before a '\n' character.
    • \| (infix) Alternative between two expressions.
    • \(..\) Grouping and naming of the enclosed expression.
    • \1 The text matched by the first \(...\) expression (\2 for the second expression, and so on up to \9).
    • \b Matches word boundaries.
    • \ Quotes special characters. The special characters are $^\.*+?[].

    In regular expressions you will often use backslash characters; it's easier to use a quoted string literal {|...|} to avoid having to escape backslashes.

    For example, the following expression:

    let r = Str.regexp {|hello \([A-Za-z]+\)|} in
    -Str.replace_first r {|\1|} "hello world" 

    returns the string "world".

    If you want a regular expression that matches a literal backslash character, you need to double it: Str.regexp {|\\|}.

    You can use regular string literals "..." too, however you will have to escape backslashes. The example above can be rewritten with a regular string literal as:

    let r = Str.regexp "hello \\([A-Za-z]+\\)" in
    -Str.replace_first r "\\1" "hello world" 

    And the regular expression for matching a backslash becomes a quadruple backslash: Str.regexp "\\\\".

    val regexp_case_fold : string -> regexp

    Same as regexp, but the compiled expression will match text in a case-insensitive way: uppercase and lowercase letters will be considered equivalent.

    val quote : string -> string

    Str.quote s returns a regexp string that matches exactly s and nothing else.

    val regexp_string : string -> regexp

    Str.regexp_string s returns a regular expression that matches exactly s and nothing else.

    val regexp_string_case_fold : string -> regexp

    Str.regexp_string_case_fold is similar to Str.regexp_string, but the regexp matches in a case-insensitive way.

    String matching and searching

    val string_match : regexp -> string -> int -> bool

    string_match r s start tests whether a substring of s that starts at position start matches the regular expression r. The first character of a string has position 0, as usual.

    val search_forward : regexp -> string -> int -> int

    search_forward r s start searches the string s for a substring matching the regular expression r. The search starts at position start and proceeds towards the end of the string. Return the position of the first character of the matched substring.

    • raises Not_found

      if no substring matches.

    val search_backward : regexp -> string -> int -> int

    search_backward r s last searches the string s for a substring matching the regular expression r. The search first considers substrings that start at position last and proceeds towards the beginning of string. Return the position of the first character of the matched substring.

    • raises Not_found

      if no substring matches.

    val string_partial_match : regexp -> string -> int -> bool

    Similar to Str.string_match, but also returns true if the argument string is a prefix of a string that matches. This includes the case of a true complete match.

    val matched_string : string -> string

    matched_string s returns the substring of s that was matched by the last call to one of the following matching or searching functions:

    provided that none of the following functions was called in between:

    Note: in the case of global_substitute and substitute_first, a call to matched_string is only valid within the subst argument, not after global_substitute or substitute_first returns.

    The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

    val match_beginning : unit -> int

    match_beginning() returns the position of the first character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    val match_end : unit -> int

    match_end() returns the position of the character following the last character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    val matched_group : int -> string -> string

    matched_group n s returns the substring of s that was matched by the nth group \(...\) of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). When n is 0, it returns the substring matched by the whole regular expression. The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

    • raises Not_found

      if the nth group of the regular expression was not matched. This can happen with groups inside alternatives \|, options ? or repetitions *. For instance, the empty string will match \(a\)*, but matched_group 1 "" will raise Not_found because the first group itself was not matched.

    val group_beginning : int -> int

    group_beginning n returns the position of the first character of the substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    • raises Not_found

      if the nth group of the regular expression was not matched.

    • raises Invalid_argument

      if there are fewer than n groups in the regular expression.

    val group_end : int -> int

    group_end n returns the position of the character following the last character of substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    • raises Not_found

      if the nth group of the regular expression was not matched.

    • raises Invalid_argument

      if there are fewer than n groups in the regular expression.

    Replacement

    val global_replace : regexp -> string -> string -> string

    global_replace regexp templ s returns a string identical to s, except that all substrings of s that match regexp have been replaced by templ. The replacement template templ can contain \1, \2, etc; these sequences will be replaced by the text matched by the corresponding group in the regular expression. \0 stands for the text matched by the whole regular expression.

    val replace_first : regexp -> string -> string -> string

    Same as Str.global_replace, except that only the first substring matching the regular expression is replaced.

    val global_substitute : regexp -> (string -> string) -> string -> string

    global_substitute regexp subst s returns a string identical to s, except that all substrings of s that match regexp have been replaced by the result of function subst. The function subst is called once for each matching substring, and receives s (the whole text) as argument.

    val substitute_first : regexp -> (string -> string) -> string -> string

    Same as Str.global_substitute, except that only the first substring matching the regular expression is replaced.

    val replace_matched : string -> string -> string

    replace_matched repl s returns the replacement text repl in which \1, \2, etc. have been replaced by the text matched by the corresponding groups in the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). s must be the same string that was passed to the matching or searching function.

    Splitting

    val split : regexp -> string -> string list

    split r s splits s into substrings, taking as delimiters the substrings that match r, and returns the list of substrings. For instance, split (regexp "[ \t]+") s splits s into blank-separated words. An occurrence of the delimiter at the beginning or at the end of the string is ignored.

    val bounded_split : regexp -> string -> int -> string list

    Same as Str.split, but splits into at most n substrings, where n is the extra integer parameter.

    val split_delim : regexp -> string -> string list

    Same as Str.split but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result. For instance, split_delim (regexp " ") " abc " returns [""; "abc"; ""], while split with the same arguments returns ["abc"].

    val bounded_split_delim : regexp -> string -> int -> string list

    Same as Str.bounded_split, but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result.

    type split_result =
    1. | Text of string
    2. | Delim of string
    val full_split : regexp -> string -> split_result list

    Same as Str.split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text. For instance, full_split (regexp "[{}]") "{ab}" returns [Delim "{"; Text "ab"; Delim "}"].

    val bounded_full_split : regexp -> string -> int -> split_result list

    Same as Str.bounded_split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text.

    Extracting substrings

    val string_before : string -> int -> string

    string_before s n returns the substring of all characters of s that precede position n (excluding the character at position n).

    val string_after : string -> int -> string

    string_after s n returns the substring of all characters of s that follow position n (including the character at position n).

    val first_chars : string -> int -> string

    first_chars s n returns the first n characters of s. This is the same function as Str.string_before.

    val last_chars : string -> int -> string

    last_chars s n returns the last n characters of s.

    \ No newline at end of file +Str (ocaml.Str)

    Module Str

    Regular expressions and high-level string processing

    Regular expressions

    The Str library provides regular expressions on sequences of bytes. It is, in general, unsuitable to match Unicode characters.

    type regexp

    The type of compiled regular expressions.

    val regexp : string -> regexp

    Compile a regular expression. The following constructs are recognized:

    • . Matches any character except newline.
    • * (postfix) Matches the preceding expression zero, one or several times
    • + (postfix) Matches the preceding expression one or several times
    • ? (postfix) Matches the preceding expression once or not at all
    • [..] Character set. Ranges are denoted with -, as in [a-z]. An initial ^, as in [^0-9], complements the set. To include a ] character in a set, make it the first character of the set. To include a - character in a set, make it the first or the last character of the set.
    • ^ Matches at beginning of line: either at the beginning of the matched string, or just after a '\n' character.
    • $ Matches at end of line: either at the end of the matched string, or just before a '\n' character.
    • \| (infix) Alternative between two expressions.
    • \(..\) Grouping and naming of the enclosed expression.
    • \1 The text matched by the first \(...\) expression (\2 for the second expression, and so on up to \9).
    • \b Matches word boundaries.
    • \ Quotes special characters. The special characters are $^\.*+?[].

    In regular expressions you will often use backslash characters; it's easier to use a quoted string literal {|...|} to avoid having to escape backslashes.

    For example, the following expression:

     let r = Str.regexp {|hello \([A-Za-z]+\)|} in
    +   Str.replace_first r {|\1|} "hello world" 

    returns the string "world".

    If you want a regular expression that matches a literal backslash character, you need to double it: Str.regexp {|\\|}.

    You can use regular string literals "..." too, however you will have to escape backslashes. The example above can be rewritten with a regular string literal as:

     let r = Str.regexp "hello \\([A-Za-z]+\\)" in
    +   Str.replace_first r "\\1" "hello world" 

    And the regular expression for matching a backslash becomes a quadruple backslash: Str.regexp "\\\\".

    val regexp_case_fold : string -> regexp

    Same as regexp, but the compiled expression will match text in a case-insensitive way: uppercase and lowercase letters will be considered equivalent.

    val quote : string -> string

    Str.quote s returns a regexp string that matches exactly s and nothing else.

    val regexp_string : string -> regexp

    Str.regexp_string s returns a regular expression that matches exactly s and nothing else.

    val regexp_string_case_fold : string -> regexp

    Str.regexp_string_case_fold is similar to Str.regexp_string, but the regexp matches in a case-insensitive way.

    String matching and searching

    val string_match : regexp -> string -> int -> bool

    string_match r s start tests whether a substring of s that starts at position start matches the regular expression r. The first character of a string has position 0, as usual.

    val search_forward : regexp -> string -> int -> int

    search_forward r s start searches the string s for a substring matching the regular expression r. The search starts at position start and proceeds towards the end of the string. Return the position of the first character of the matched substring.

    • raises Not_found

      if no substring matches.

    val search_backward : regexp -> string -> int -> int

    search_backward r s last searches the string s for a substring matching the regular expression r. The search first considers substrings that start at position last and proceeds towards the beginning of string. Return the position of the first character of the matched substring.

    • raises Not_found

      if no substring matches.

    val string_partial_match : regexp -> string -> int -> bool

    Similar to Str.string_match, but also returns true if the argument string is a prefix of a string that matches. This includes the case of a true complete match.

    val matched_string : string -> string

    matched_string s returns the substring of s that was matched by the last call to one of the following matching or searching functions:

    provided that none of the following functions was called in between:

    Note: in the case of global_substitute and substitute_first, a call to matched_string is only valid within the subst argument, not after global_substitute or substitute_first returns.

    The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

    val match_beginning : unit -> int

    match_beginning() returns the position of the first character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    val match_end : unit -> int

    match_end() returns the position of the character following the last character of the substring that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    val matched_group : int -> string -> string

    matched_group n s returns the substring of s that was matched by the nth group \(...\) of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). When n is 0, it returns the substring matched by the whole regular expression. The user must make sure that the parameter s is the same string that was passed to the matching or searching function.

    • raises Not_found

      if the nth group of the regular expression was not matched. This can happen with groups inside alternatives \|, options ? or repetitions *. For instance, the empty string will match \(a\)*, but matched_group 1 "" will raise Not_found because the first group itself was not matched.

    val group_beginning : int -> int

    group_beginning n returns the position of the first character of the substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    • raises Not_found

      if the nth group of the regular expression was not matched.

    • raises Invalid_argument

      if there are fewer than n groups in the regular expression.

    val group_end : int -> int

    group_end n returns the position of the character following the last character of substring that was matched by the nth group of the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details).

    • raises Not_found

      if the nth group of the regular expression was not matched.

    • raises Invalid_argument

      if there are fewer than n groups in the regular expression.

    Replacement

    val global_replace : regexp -> string -> string -> string

    global_replace regexp templ s returns a string identical to s, except that all substrings of s that match regexp have been replaced by templ. The replacement template templ can contain \1, \2, etc; these sequences will be replaced by the text matched by the corresponding group in the regular expression. \0 stands for the text matched by the whole regular expression.

    val replace_first : regexp -> string -> string -> string

    Same as Str.global_replace, except that only the first substring matching the regular expression is replaced.

    val global_substitute : regexp -> (string -> string) -> string -> string

    global_substitute regexp subst s returns a string identical to s, except that all substrings of s that match regexp have been replaced by the result of function subst. The function subst is called once for each matching substring, and receives s (the whole text) as argument.

    val substitute_first : regexp -> (string -> string) -> string -> string

    Same as Str.global_substitute, except that only the first substring matching the regular expression is replaced.

    val replace_matched : string -> string -> string

    replace_matched repl s returns the replacement text repl in which \1, \2, etc. have been replaced by the text matched by the corresponding groups in the regular expression that was matched by the last call to a matching or searching function (see Str.matched_string for details). s must be the same string that was passed to the matching or searching function.

    Splitting

    val split : regexp -> string -> string list

    split r s splits s into substrings, taking as delimiters the substrings that match r, and returns the list of substrings. For instance, split (regexp "[ \t]+") s splits s into blank-separated words. An occurrence of the delimiter at the beginning or at the end of the string is ignored.

    val bounded_split : regexp -> string -> int -> string list

    Same as Str.split, but splits into at most n substrings, where n is the extra integer parameter.

    val split_delim : regexp -> string -> string list

    Same as Str.split but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result. For instance, split_delim (regexp " ") " abc " returns [""; "abc"; ""], while split with the same arguments returns ["abc"].

    val bounded_split_delim : regexp -> string -> int -> string list

    Same as Str.bounded_split, but occurrences of the delimiter at the beginning and at the end of the string are recognized and returned as empty strings in the result.

    type split_result =
    1. | Text of string
    2. | Delim of string
    val full_split : regexp -> string -> split_result list

    Same as Str.split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text. For instance, full_split (regexp "[{}]") "{ab}" returns [Delim "{"; Text "ab"; Delim "}"].

    val bounded_full_split : regexp -> string -> int -> split_result list

    Same as Str.bounded_split_delim, but returns the delimiters as well as the substrings contained between delimiters. The former are tagged Delim in the result list; the latter are tagged Text.

    Extracting substrings

    val string_before : string -> int -> string

    string_before s n returns the substring of all characters of s that precede position n (excluding the character at position n).

    val string_after : string -> int -> string

    string_after s n returns the substring of all characters of s that follow position n (including the character at position n).

    val first_chars : string -> int -> string

    first_chars s n returns the first n characters of s. This is the same function as Str.string_before.

    val last_chars : string -> int -> string

    last_chars s n returns the last n characters of s.

    diff --git a/ocaml/Strmatch/Make/argument-1-_/index.html b/ocaml/Strmatch/Make/argument-1-_/index.html index 356d480..9abc37f 100644 --- a/ocaml/Strmatch/Make/argument-1-_/index.html +++ b/ocaml/Strmatch/Make/argument-1-_/index.html @@ -1,9 +1,9 @@ -_ (ocaml.Strmatch.Make._)

    Parameter Make._

    val string_block_length : Cmm.expression -> Cmm.expression
    val transl_switch : +_ (ocaml.Strmatch.Make._)

    Parameter Make._

    val string_block_length : Cmm.expression -> Cmm.expression
    val transl_switch : Debuginfo.t -> Cmm.expression -> int -> int -> (int * Cmm.expression) list -> Cmm.expression -> - Cmm.expression
    \ No newline at end of file + Cmm.expression
    diff --git a/ocaml/Strmatch/Make/index.html b/ocaml/Strmatch/Make/index.html index 6680ef1..5920424 100644 --- a/ocaml/Strmatch/Make/index.html +++ b/ocaml/Strmatch/Make/index.html @@ -1,7 +1,7 @@ -Make (ocaml.Strmatch.Make)

    Module Strmatch.Make

    Parameters

    module _ : I

    Signature

    val compile : +Make (ocaml.Strmatch.Make)

    Module Strmatch.Make

    Parameters

    module _ : I

    Signature

    val compile : Debuginfo.t -> Cmm.expression -> Cmm.expression option -> (string * Cmm.expression) list -> - Cmm.expression
    \ No newline at end of file + Cmm.expression
    diff --git a/ocaml/Strmatch/index.html b/ocaml/Strmatch/index.html index a96d3bb..38c6458 100644 --- a/ocaml/Strmatch/index.html +++ b/ocaml/Strmatch/index.html @@ -1,2 +1,2 @@ -Strmatch (ocaml.Strmatch)

    Module Strmatch

    module type I = sig ... end
    module Make (_ : I) : sig ... end
    \ No newline at end of file +Strmatch (ocaml.Strmatch)

    Module Strmatch

    module type I = sig ... end
    module Make (_ : I) : sig ... end
    diff --git a/ocaml/Strmatch/module-type-I/index.html b/ocaml/Strmatch/module-type-I/index.html index 5ff0edf..59b7487 100644 --- a/ocaml/Strmatch/module-type-I/index.html +++ b/ocaml/Strmatch/module-type-I/index.html @@ -1,9 +1,9 @@ -I (ocaml.Strmatch.I)

    Module type Strmatch.I

    val string_block_length : Cmm.expression -> Cmm.expression
    val transl_switch : +I (ocaml.Strmatch.I)

    Module type Strmatch.I

    val string_block_length : Cmm.expression -> Cmm.expression
    val transl_switch : Debuginfo.t -> Cmm.expression -> int -> int -> (int * Cmm.expression) list -> Cmm.expression -> - Cmm.expression
    \ No newline at end of file + Cmm.expression
    diff --git a/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html b/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html index 48df5a1..edd0ae0 100644 --- a/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html +++ b/ocaml/Strongly_connected_components/Make/argument-1-Id/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Strongly_connected_components.Make.Id.Map)

    Module Id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Strongly_connected_components.Make.Id.Map)

    Module Id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html b/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html index a189428..debf4dd 100644 --- a/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html +++ b/ocaml/Strongly_connected_components/Make/argument-1-Id/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Strongly_connected_components.Make.Id.Set)

    Module Id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Strongly_connected_components.Make.Id.Set)

    Module Id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html b/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html index dac67c1..aa5b3bb 100644 --- a/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html +++ b/ocaml/Strongly_connected_components/Make/argument-1-Id/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Strongly_connected_components.Make.Id.T)

    Module Id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Strongly_connected_components.Make.Id.T)

    Module Id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html b/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html index 8ab0854..a16f554 100644 --- a/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html +++ b/ocaml/Strongly_connected_components/Make/argument-1-Id/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Strongly_connected_components.Make.Id.Tbl)

    Module Id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Strongly_connected_components.Make.Id.Tbl)

    Module Id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html b/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html index 615e814..b5a0287 100644 --- a/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html +++ b/ocaml/Strongly_connected_components/Make/argument-1-Id/index.html @@ -1,2 +1,2 @@ -Id (ocaml.Strongly_connected_components.Make.Id)

    Parameter Make.Id

    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Id (ocaml.Strongly_connected_components.Make.Id)

    Parameter Make.Id

    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Strongly_connected_components/Make/index.html b/ocaml/Strongly_connected_components/Make/index.html index 82f965a..4d99416 100644 --- a/ocaml/Strongly_connected_components/Make/index.html +++ b/ocaml/Strongly_connected_components/Make/index.html @@ -1,4 +1,4 @@ -Make (ocaml.Strongly_connected_components.Make)

    Module Strongly_connected_components.Make

    Parameters

    Signature

    type directed_graph = Id.Set.t Id.Map.t

    If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

    type component =
    1. | Has_loop of Id.t list
    2. | No_loop of Id.t
    val connected_components_sorted_from_roots_to_leaf : +Make (ocaml.Strongly_connected_components.Make)

    Module Strongly_connected_components.Make

    Parameters

    Signature

    type directed_graph = Id.Set.t Id.Map.t

    If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

    type component =
    1. | Has_loop of Id.t list
    2. | No_loop of Id.t
    val connected_components_sorted_from_roots_to_leaf : directed_graph -> - component array
    val component_graph : directed_graph -> (component * int list) array
    \ No newline at end of file + component array
    val component_graph : directed_graph -> (component * int list) array
    diff --git a/ocaml/Strongly_connected_components/index.html b/ocaml/Strongly_connected_components/index.html index 002bf17..34f350b 100644 --- a/ocaml/Strongly_connected_components/index.html +++ b/ocaml/Strongly_connected_components/index.html @@ -1,2 +1,2 @@ -Strongly_connected_components (ocaml.Strongly_connected_components)

    Module Strongly_connected_components

    Kosaraju's algorithm for strongly connected components.

    Warning: this module is unstable and part of compiler-libs.

    module type S = sig ... end
    module Make (Id : Identifiable.S) : S with module Id := Id
    \ No newline at end of file +Strongly_connected_components (ocaml.Strongly_connected_components)

    Module Strongly_connected_components

    Kosaraju's algorithm for strongly connected components.

    Warning: this module is unstable and part of compiler-libs.

    module type S = sig ... end
    module Make (Id : Identifiable.S) : S with module Id := Id
    diff --git a/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html b/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html index bb4376d..6818feb 100644 --- a/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/Id/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Strongly_connected_components.S.Id.Map)

    Module Id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Strongly_connected_components.S.Id.Map)

    Module Id.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html b/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html index 0b4c167..ac26b0e 100644 --- a/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/Id/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Strongly_connected_components.S.Id.Set)

    Module Id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Strongly_connected_components.S.Id.Set)

    Module Id.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html b/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html index 5414b93..cfb3bbf 100644 --- a/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/Id/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Strongly_connected_components.S.Id.T)

    Module Id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Strongly_connected_components.S.Id.T)

    Module Id.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html b/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html index a2ddd09..0496a43 100644 --- a/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/Id/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Strongly_connected_components.S.Id.Tbl)

    Module Id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Strongly_connected_components.S.Id.Tbl)

    Module Id.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Strongly_connected_components/module-type-S/Id/index.html b/ocaml/Strongly_connected_components/module-type-S/Id/index.html index f414652..8f39ffa 100644 --- a/ocaml/Strongly_connected_components/module-type-S/Id/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/Id/index.html @@ -1,2 +1,2 @@ -Id (ocaml.Strongly_connected_components.S.Id)

    Module S.Id

    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Id (ocaml.Strongly_connected_components.S.Id)

    Module S.Id

    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Strongly_connected_components/module-type-S/index.html b/ocaml/Strongly_connected_components/module-type-S/index.html index 8a97290..380c7e8 100644 --- a/ocaml/Strongly_connected_components/module-type-S/index.html +++ b/ocaml/Strongly_connected_components/module-type-S/index.html @@ -1,4 +1,4 @@ -S (ocaml.Strongly_connected_components.S)

    Module type Strongly_connected_components.S

    type directed_graph = Id.Set.t Id.Map.t

    If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

    type component =
    1. | Has_loop of Id.t list
    2. | No_loop of Id.t
    val connected_components_sorted_from_roots_to_leaf : +S (ocaml.Strongly_connected_components.S)

    Module type Strongly_connected_components.S

    type directed_graph = Id.Set.t Id.Map.t

    If (a -> set) belongs to the map, it means that there are edges from a to every element of set. It is assumed that no edge points to a vertex not represented in the map.

    type component =
    1. | Has_loop of Id.t list
    2. | No_loop of Id.t
    val connected_components_sorted_from_roots_to_leaf : directed_graph -> - component array
    val component_graph : directed_graph -> (component * int list) array
    \ No newline at end of file + component array
    val component_graph : directed_graph -> (component * int list) array
    diff --git a/ocaml/Stypes/index.html b/ocaml/Stypes/index.html index ed86f8d..710c4a6 100644 --- a/ocaml/Stypes/index.html +++ b/ocaml/Stypes/index.html @@ -1,3 +1,3 @@ -Stypes (ocaml.Stypes)

    Module Stypes

    type annotation =
    1. | Ti_pat : 'k Typedtree.pattern_category - * 'k Typedtree.general_pattern -> annotation
    2. | Ti_expr of Typedtree.expression
    3. | Ti_class of Typedtree.class_expr
    4. | Ti_mod of Typedtree.module_expr
    5. | An_call of Location.t * Annot.call
    6. | An_ident of Location.t * string * Annot.ident
    val record : annotation -> unit
    val record_phrase : Location.t -> unit
    val dump : string option -> unit
    val get_location : annotation -> Location.t
    val get_info : unit -> annotation list
    \ No newline at end of file +Stypes (ocaml.Stypes)

    Module Stypes

    type annotation =
    1. | Ti_pat : 'k Typedtree.pattern_category + * 'k Typedtree.general_pattern -> annotation
    2. | Ti_expr of Typedtree.expression
    3. | Ti_class of Typedtree.class_expr
    4. | Ti_mod of Typedtree.module_expr
    5. | An_call of Location.t * Annot.call
    6. | An_ident of Location.t * string * Annot.ident
    val record : annotation -> unit
    val record_phrase : Location.t -> unit
    val dump : string option -> unit
    val get_location : annotation -> Location.t
    val get_info : unit -> annotation list
    diff --git a/ocaml/Subst/Lazy/index.html b/ocaml/Subst/Lazy/index.html index f814875..64457ad 100644 --- a/ocaml/Subst/Lazy/index.html +++ b/ocaml/Subst/Lazy/index.html @@ -1,5 +1,5 @@ -Lazy (ocaml.Subst.Lazy)

    Module Subst.Lazy

    type module_decl = {
    1. mdl_type : modtype;
    2. mdl_attributes : Parsetree.attributes;
    3. mdl_loc : Location.t;
    4. mdl_uid : Types.Uid.t;
    }
    and modtype =
    1. | MtyL_ident of Path.t
    2. | MtyL_signature of signature
    3. | MtyL_functor of functor_parameter * modtype
    4. | MtyL_alias of Path.t
    and modtype_declaration = {
    1. mtdl_type : modtype option;
    2. mtdl_attributes : Parsetree.attributes;
    3. mtdl_loc : Location.t;
    4. mtdl_uid : Types.Uid.t;
    }
    and signature
    and signature_item =
    1. | SigL_value of Ident.t * Types.value_description * Types.visibility
    2. | SigL_type of Ident.t +Lazy (ocaml.Subst.Lazy)

      Module Subst.Lazy

      type module_decl = {
      1. mdl_type : modtype;
      2. mdl_attributes : Parsetree.attributes;
      3. mdl_loc : Location.t;
      4. mdl_uid : Types.Uid.t;
      }
      and modtype =
      1. | MtyL_ident of Path.t
      2. | MtyL_signature of signature
      3. | MtyL_functor of functor_parameter * modtype
      4. | MtyL_alias of Path.t
      and modtype_declaration = {
      1. mtdl_type : modtype option;
      2. mtdl_attributes : Parsetree.attributes;
      3. mtdl_loc : Location.t;
      4. mtdl_uid : Types.Uid.t;
      }
      and signature
      and signature_item =
      1. | SigL_value of Ident.t * Types.value_description * Types.visibility
      2. | SigL_type of Ident.t * Types.type_declaration * Types.rec_status * Types.visibility
      3. | SigL_typext of Ident.t @@ -15,4 +15,4 @@ * Types.visibility
      4. | SigL_class_type of Ident.t * Types.class_type_declaration * Types.rec_status - * Types.visibility
      and functor_parameter =
      1. | Unit
      2. | Named of Ident.t option * modtype
      val of_module_decl : Types.module_declaration -> module_decl
      val of_modtype : Types.module_type -> modtype
      val of_signature : Types.signature -> signature
      val of_signature_items : signature_item list -> signature
      val of_signature_item : Types.signature_item -> signature_item
      val module_decl : scoping -> t -> module_decl -> module_decl
      val modtype : scoping -> t -> modtype -> modtype
      val modtype_decl : scoping -> t -> modtype_declaration -> modtype_declaration
      val signature : scoping -> t -> signature -> signature
      val signature_item : scoping -> t -> signature_item -> signature_item
      val force_module_decl : module_decl -> Types.module_declaration
      val force_modtype : modtype -> Types.module_type
      val force_signature : signature -> Types.signature
      val force_signature_once : signature -> signature_item list
      val force_signature_item : signature_item -> Types.signature_item
      \ No newline at end of file + * Types.visibility
    and functor_parameter =
    1. | Unit
    2. | Named of Ident.t option * modtype
    val of_module_decl : Types.module_declaration -> module_decl
    val of_modtype : Types.module_type -> modtype
    val of_signature : Types.signature -> signature
    val of_signature_items : signature_item list -> signature
    val of_signature_item : Types.signature_item -> signature_item
    val module_decl : scoping -> t -> module_decl -> module_decl
    val modtype : scoping -> t -> modtype -> modtype
    val modtype_decl : scoping -> t -> modtype_declaration -> modtype_declaration
    val signature : scoping -> t -> signature -> signature
    val signature_item : scoping -> t -> signature_item -> signature_item
    val force_module_decl : module_decl -> Types.module_declaration
    val force_modtype : modtype -> Types.module_type
    val force_signature : signature -> Types.signature
    val force_signature_once : signature -> signature_item list
    val force_signature_item : signature_item -> Types.signature_item
    diff --git a/ocaml/Subst/index.html b/ocaml/Subst/index.html index 6b8a504..6bd8775 100644 --- a/ocaml/Subst/index.html +++ b/ocaml/Subst/index.html @@ -1,8 +1,8 @@ -Subst (ocaml.Subst)

    Module Subst

    type t
    val identity : t
    val add_type : Ident.t -> Path.t -> t -> t
    val add_type_path : Path.t -> Path.t -> t -> t
    val add_type_function : +Subst (ocaml.Subst)

    Module Subst

    type t
    val identity : t
    val add_type : Ident.t -> Path.t -> t -> t
    val add_type_path : Path.t -> Path.t -> t -> t
    val add_type_function : Path.t -> - params:Types.type_expr list -> - body:Types.type_expr -> + params:Types.type_expr list -> + body:Types.type_expr -> t -> t
    val add_module : Ident.t -> Path.t -> t -> t
    val add_module_path : Path.t -> Path.t -> t -> t
    val add_modtype : Ident.t -> Types.module_type -> t -> t
    val add_modtype_path : Path.t -> Types.module_type -> t -> t
    val for_saving : t -> t
    val reset_for_saving : unit -> unit
    val change_locs : t -> Location.t -> t
    val module_path : t -> Path.t -> Path.t
    val type_path : t -> Path.t -> Path.t
    val modtype_path : t -> Path.t -> Path.t
    val type_expr : t -> Types.type_expr -> Types.type_expr
    val class_type : t -> Types.class_type -> Types.class_type
    val value_description : t -> Types.value_description -> Types.value_description
    val type_declaration : t -> Types.type_declaration -> Types.type_declaration
    val extension_constructor : t -> @@ -27,4 +27,4 @@ Types.type_expr -> Types.type_expr list -> Types.type_expr) - ref
    module Lazy : sig ... end
    \ No newline at end of file + ref
    module Lazy : sig ... end
    diff --git a/ocaml/Switch/CtxStore/argument-1-A/index.html b/ocaml/Switch/CtxStore/argument-1-A/index.html index 4e44467..593836f 100644 --- a/ocaml/Switch/CtxStore/argument-1-A/index.html +++ b/ocaml/Switch/CtxStore/argument-1-A/index.html @@ -1,2 +1,2 @@ -A (ocaml.Switch.CtxStore.A)

    Parameter CtxStore.A

    include Stored
    type t
    type key
    val compare_key : key -> key -> int
    type context
    val make_key : context -> t -> key option
    \ No newline at end of file +A (ocaml.Switch.CtxStore.A)

    Parameter CtxStore.A

    include Stored
    type t
    type key
    val compare_key : key -> key -> int
    type context
    val make_key : context -> t -> key option
    diff --git a/ocaml/Switch/CtxStore/index.html b/ocaml/Switch/CtxStore/index.html index 1b1a31f..873c814 100644 --- a/ocaml/Switch/CtxStore/index.html +++ b/ocaml/Switch/CtxStore/index.html @@ -1,2 +1,2 @@ -CtxStore (ocaml.Switch.CtxStore)

    Module Switch.CtxStore

    Parameters

    module A : CtxStored

    Signature

    val mk_store : unit -> (A.t, A.context) t_store
    \ No newline at end of file +CtxStore (ocaml.Switch.CtxStore)

    Module Switch.CtxStore

    Parameters

    module A : CtxStored

    Signature

    val mk_store : unit -> (A.t, A.context) t_store
    diff --git a/ocaml/Switch/Make/argument-1-Arg/index.html b/ocaml/Switch/Make/argument-1-Arg/index.html index 2e55325..8b729eb 100644 --- a/ocaml/Switch/Make/argument-1-Arg/index.html +++ b/ocaml/Switch/Make/argument-1-Arg/index.html @@ -1,2 +1,2 @@ -Arg (ocaml.Switch.Make.Arg)

    Parameter Make.Arg

    type primitive
    val eqint : primitive
    val neint : primitive
    val leint : primitive
    val ltint : primitive
    val geint : primitive
    val gtint : primitive
    type loc
    type arg
    type test
    type act
    val bind : arg -> (arg -> act) -> act
    val make_const : int -> arg
    val make_offset : arg -> int -> arg
    val make_prim : primitive -> arg list -> test
    val make_isout : arg -> arg -> test
    val make_isin : arg -> arg -> test
    val make_is_nonzero : arg -> test
    val arg_as_test : arg -> test
    val make_if : test -> act -> act -> act
    val make_switch : loc -> arg -> int array -> act array -> act
    val make_catch : act -> int * (act -> act)
    val make_exit : int -> act
    \ No newline at end of file +Arg (ocaml.Switch.Make.Arg)

    Parameter Make.Arg

    type primitive
    val eqint : primitive
    val neint : primitive
    val leint : primitive
    val ltint : primitive
    val geint : primitive
    val gtint : primitive
    type loc
    type arg
    type test
    type act
    val bind : arg -> (arg -> act) -> act
    val make_const : int -> arg
    val make_offset : arg -> int -> arg
    val make_prim : primitive -> arg list -> test
    val make_isout : arg -> arg -> test
    val make_isin : arg -> arg -> test
    val make_is_nonzero : arg -> test
    val arg_as_test : arg -> test
    val make_if : test -> act -> act -> act
    val make_switch : loc -> arg -> int array -> act array -> act
    val make_catch : act -> int * (act -> act)
    val make_exit : int -> act
    diff --git a/ocaml/Switch/Make/index.html b/ocaml/Switch/Make/index.html index 0704b85..7e83045 100644 --- a/ocaml/Switch/Make/index.html +++ b/ocaml/Switch/Make/index.html @@ -1,5 +1,5 @@ -Make (ocaml.Switch.Make)

    Module Switch.Make

    Parameters

    module Arg : S

    Signature

    val zyva : +Make (ocaml.Switch.Make)

    Module Switch.Make

    Parameters

    module Arg : S

    Signature

    val zyva : Arg.loc -> (int * int) -> Arg.arg -> @@ -9,4 +9,4 @@ Arg.arg -> (int * int * int) array -> (Arg.act, _) t_store -> - Arg.act
    \ No newline at end of file + Arg.act
    diff --git a/ocaml/Switch/Store/argument-1-A/index.html b/ocaml/Switch/Store/argument-1-A/index.html index a82956b..6aa69a6 100644 --- a/ocaml/Switch/Store/argument-1-A/index.html +++ b/ocaml/Switch/Store/argument-1-A/index.html @@ -1,2 +1,2 @@ -A (ocaml.Switch.Store.A)

    Parameter Store.A

    type t
    type key
    val compare_key : key -> key -> int
    val make_key : t -> key option
    \ No newline at end of file +A (ocaml.Switch.Store.A)

    Parameter Store.A

    type t
    type key
    val compare_key : key -> key -> int
    val make_key : t -> key option
    diff --git a/ocaml/Switch/Store/index.html b/ocaml/Switch/Store/index.html index 77fd163..44397dd 100644 --- a/ocaml/Switch/Store/index.html +++ b/ocaml/Switch/Store/index.html @@ -1,2 +1,2 @@ -Store (ocaml.Switch.Store)

    Module Switch.Store

    Parameters

    module A : Stored

    Signature

    val mk_store : unit -> (A.t, unit) t_store
    \ No newline at end of file +Store (ocaml.Switch.Store)

    Module Switch.Store

    Parameters

    module A : Stored

    Signature

    val mk_store : unit -> (A.t, unit) t_store
    diff --git a/ocaml/Switch/index.html b/ocaml/Switch/index.html index 75415e7..0249760 100644 --- a/ocaml/Switch/index.html +++ b/ocaml/Switch/index.html @@ -1,2 +1,2 @@ -Switch (ocaml.Switch)

    Module Switch

    type 'a shared =
    1. | Shared of 'a
    2. | Single of 'a
    type ('a, 'ctx) t_store = {
    1. act_get : unit -> 'a array;
    2. act_get_shared : unit -> 'a shared array;
    3. act_store : 'ctx -> 'a -> int;
    4. act_store_shared : 'ctx -> 'a -> int;
    }
    module type Stored = sig ... end
    module type CtxStored = sig ... end
    module CtxStore (A : CtxStored) : sig ... end
    module Store (A : Stored) : sig ... end
    module type S = sig ... end
    module Make (Arg : S) : sig ... end
    \ No newline at end of file +Switch (ocaml.Switch)

    Module Switch

    type 'a shared =
    1. | Shared of 'a
    2. | Single of 'a
    type ('a, 'ctx) t_store = {
    1. act_get : unit -> 'a array;
    2. act_get_shared : unit -> 'a shared array;
    3. act_store : 'ctx -> 'a -> int;
    4. act_store_shared : 'ctx -> 'a -> int;
    }
    module type Stored = sig ... end
    module type CtxStored = sig ... end
    module CtxStore (A : CtxStored) : sig ... end
    module Store (A : Stored) : sig ... end
    module type S = sig ... end
    module Make (Arg : S) : sig ... end
    diff --git a/ocaml/Switch/module-type-CtxStored/index.html b/ocaml/Switch/module-type-CtxStored/index.html index f4c8822..f92db5a 100644 --- a/ocaml/Switch/module-type-CtxStored/index.html +++ b/ocaml/Switch/module-type-CtxStored/index.html @@ -1,2 +1,2 @@ -CtxStored (ocaml.Switch.CtxStored)

    Module type Switch.CtxStored

    include Stored
    type t
    type key
    val compare_key : key -> key -> int
    type context
    val make_key : context -> t -> key option
    \ No newline at end of file +CtxStored (ocaml.Switch.CtxStored)

    Module type Switch.CtxStored

    include Stored
    type t
    type key
    val compare_key : key -> key -> int
    type context
    val make_key : context -> t -> key option
    diff --git a/ocaml/Switch/module-type-S/index.html b/ocaml/Switch/module-type-S/index.html index 97d0b13..b6555ea 100644 --- a/ocaml/Switch/module-type-S/index.html +++ b/ocaml/Switch/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ocaml.Switch.S)

    Module type Switch.S

    type primitive
    val eqint : primitive
    val neint : primitive
    val leint : primitive
    val ltint : primitive
    val geint : primitive
    val gtint : primitive
    type loc
    type arg
    type test
    type act
    val bind : arg -> (arg -> act) -> act
    val make_const : int -> arg
    val make_offset : arg -> int -> arg
    val make_prim : primitive -> arg list -> test
    val make_isout : arg -> arg -> test
    val make_isin : arg -> arg -> test
    val make_is_nonzero : arg -> test
    val arg_as_test : arg -> test
    val make_if : test -> act -> act -> act
    val make_switch : loc -> arg -> int array -> act array -> act
    val make_catch : act -> int * (act -> act)
    val make_exit : int -> act
    \ No newline at end of file +S (ocaml.Switch.S)

    Module type Switch.S

    type primitive
    val eqint : primitive
    val neint : primitive
    val leint : primitive
    val ltint : primitive
    val geint : primitive
    val gtint : primitive
    type loc
    type arg
    type test
    type act
    val bind : arg -> (arg -> act) -> act
    val make_const : int -> arg
    val make_offset : arg -> int -> arg
    val make_prim : primitive -> arg list -> test
    val make_isout : arg -> arg -> test
    val make_isin : arg -> arg -> test
    val make_is_nonzero : arg -> test
    val arg_as_test : arg -> test
    val make_if : test -> act -> act -> act
    val make_switch : loc -> arg -> int array -> act array -> act
    val make_catch : act -> int * (act -> act)
    val make_exit : int -> act
    diff --git a/ocaml/Switch/module-type-Stored/index.html b/ocaml/Switch/module-type-Stored/index.html index b842f01..fec91da 100644 --- a/ocaml/Switch/module-type-Stored/index.html +++ b/ocaml/Switch/module-type-Stored/index.html @@ -1,2 +1,2 @@ -Stored (ocaml.Switch.Stored)

    Module type Switch.Stored

    type t
    type key
    val compare_key : key -> key -> int
    val make_key : t -> key option
    \ No newline at end of file +Stored (ocaml.Switch.Stored)

    Module type Switch.Stored

    type t
    type key
    val compare_key : key -> key -> int
    val make_key : t -> key option
    diff --git a/ocaml/Symbol/Map/index.html b/ocaml/Symbol/Map/index.html index 61b2450..83fa43d 100644 --- a/ocaml/Symbol/Map/index.html +++ b/ocaml/Symbol/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Symbol.Map)

    Module Symbol.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Symbol.Map)

    Module Symbol.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Symbol/Set/index.html b/ocaml/Symbol/Set/index.html index ab3a64e..32cb381 100644 --- a/ocaml/Symbol/Set/index.html +++ b/ocaml/Symbol/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Symbol.Set)

    Module Symbol.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Symbol.Set)

    Module Symbol.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Symbol/T/index.html b/ocaml/Symbol/T/index.html index 82ffeff..23625d9 100644 --- a/ocaml/Symbol/T/index.html +++ b/ocaml/Symbol/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Symbol.T)

    Module Symbol.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Symbol.T)

    Module Symbol.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Symbol/Tbl/index.html b/ocaml/Symbol/Tbl/index.html index 43d08e5..658269a 100644 --- a/ocaml/Symbol/Tbl/index.html +++ b/ocaml/Symbol/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Symbol.Tbl)

    Module Symbol.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Symbol.Tbl)

    Module Symbol.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Symbol/index.html b/ocaml/Symbol/index.html index 85ec77c..af70736 100644 --- a/ocaml/Symbol/index.html +++ b/ocaml/Symbol/index.html @@ -1,2 +1,2 @@ -Symbol (ocaml.Symbol)

    Module Symbol

    A symbol identifies a constant provided by either:

    • another compilation unit; or
    • a top-level module.

    * sym_unit is the compilation unit containing the value. * sym_label is the linkage name of the variable.

    The label must be globally unique: two compilation units linked in the same program must not share labels.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val of_variable : Variable.t -> t
    val of_global_linkage : Compilation_unit.t -> Linkage_name.t -> t
    val import_for_pack : pack:Compilation_unit.t -> t -> t
    val compilation_unit : t -> Compilation_unit.t
    val label : t -> Linkage_name.t
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val compare_lists : t list -> t list -> int
    \ No newline at end of file +Symbol (ocaml.Symbol)

    Module Symbol

    A symbol identifies a constant provided by either:

    • another compilation unit; or
    • a top-level module.

    * sym_unit is the compilation unit containing the value. * sym_label is the linkage name of the variable.

    The label must be globally unique: two compilation units linked in the same program must not share labels.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val of_variable : Variable.t -> t
    val of_global_linkage : Compilation_unit.t -> Linkage_name.t -> t
    val import_for_pack : pack:Compilation_unit.t -> t -> t
    val compilation_unit : t -> Compilation_unit.t
    val label : t -> Linkage_name.t
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val compare_lists : t list -> t list -> int
    diff --git a/ocaml/Symtable/index.html b/ocaml/Symtable/index.html index 7f902e3..68ff206 100644 --- a/ocaml/Symtable/index.html +++ b/ocaml/Symtable/index.html @@ -1,5 +1,5 @@ -Symtable (ocaml.Symtable)

    Module Symtable

    val init : unit -> unit
    val patch_object : +Symtable (ocaml.Symtable)

    Module Symtable

    val init : unit -> unit
    val patch_object : Misc.LongString.t -> (Cmo_format.reloc_info * int) list -> - unit
    val require_primitive : string -> unit
    val initial_global_table : unit -> Stdlib.Obj.t array
    val output_global_map : out_channel -> unit
    val output_primitive_names : out_channel -> unit
    val output_primitive_table : out_channel -> unit
    val data_global_map : unit -> Stdlib.Obj.t
    val data_primitive_names : unit -> string
    val init_toplevel : unit -> (string * Stdlib.Digest.t option) list
    val update_global_table : unit -> unit
    val get_global_value : Ident.t -> Stdlib.Obj.t
    val is_global_defined : Ident.t -> bool
    val assign_global_value : Ident.t -> Stdlib.Obj.t -> unit
    val get_global_position : Ident.t -> int
    val check_global_initialized : (Cmo_format.reloc_info * int) list -> unit
    val defined_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
    val required_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
    type global_map
    val empty_global_map : global_map
    val current_state : unit -> global_map
    val restore_state : global_map -> unit
    val hide_additions : global_map -> unit
    val filter_global_map : (Ident.t -> bool) -> global_map -> global_map
    val iter_global_map : (Ident.t -> int -> unit) -> global_map -> unit
    val is_defined_in_global_map : global_map -> Ident.t -> bool
    type error =
    1. | Undefined_global of string
    2. | Unavailable_primitive of string
    3. | Wrong_vm of string
    4. | Uninitialized_global of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    val reset : unit -> unit
    \ No newline at end of file + unit
    val require_primitive : string -> unit
    val initial_global_table : unit -> Stdlib.Obj.t array
    val output_global_map : out_channel -> unit
    val output_primitive_names : out_channel -> unit
    val output_primitive_table : out_channel -> unit
    val data_global_map : unit -> Stdlib.Obj.t
    val data_primitive_names : unit -> string
    val init_toplevel : unit -> (string * Stdlib.Digest.t option) list
    val update_global_table : unit -> unit
    val get_global_value : Ident.t -> Stdlib.Obj.t
    val is_global_defined : Ident.t -> bool
    val assign_global_value : Ident.t -> Stdlib.Obj.t -> unit
    val get_global_position : Ident.t -> int
    val check_global_initialized : (Cmo_format.reloc_info * int) list -> unit
    val defined_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
    val required_globals : (Cmo_format.reloc_info * int) list -> Ident.t list
    type global_map
    val empty_global_map : global_map
    val current_state : unit -> global_map
    val restore_state : global_map -> unit
    val hide_additions : global_map -> unit
    val filter_global_map : (Ident.t -> bool) -> global_map -> global_map
    val iter_global_map : (Ident.t -> int -> unit) -> global_map -> unit
    val is_defined_in_global_map : global_map -> Ident.t -> bool
    type error =
    1. | Undefined_global of string
    2. | Unavailable_primitive of string
    3. | Wrong_vm of string
    4. | Uninitialized_global of string
    exception Error of error
    val report_error : Stdlib.Format.formatter -> error -> unit
    val reset : unit -> unit
    diff --git a/ocaml/Syntaxerr/index.html b/ocaml/Syntaxerr/index.html index 8158119..a37fa68 100644 --- a/ocaml/Syntaxerr/index.html +++ b/ocaml/Syntaxerr/index.html @@ -1,2 +1,2 @@ -Syntaxerr (ocaml.Syntaxerr)

    Module Syntaxerr

    Auxiliary type for reporting syntax errors

    Warning: this module is unstable and part of compiler-libs.

    type error =
    1. | Unclosed of Location.t * string * Location.t * string
    2. | Expecting of Location.t * string
    3. | Not_expecting of Location.t * string
    4. | Applicative_path of Location.t
    5. | Variable_in_scope of Location.t * string
    6. | Other of Location.t
    7. | Ill_formed_ast of Location.t * string
    8. | Invalid_package_type of Location.t * string
    9. | Removed_string_set of Location.t
    exception Error of error
    exception Escape_error
    val location_of_error : error -> Location.t
    val ill_formed_ast : Location.t -> string -> 'a
    \ No newline at end of file +Syntaxerr (ocaml.Syntaxerr)

    Module Syntaxerr

    Auxiliary type for reporting syntax errors

    Warning: this module is unstable and part of compiler-libs.

    type error =
    1. | Unclosed of Location.t * string * Location.t * string
    2. | Expecting of Location.t * string
    3. | Not_expecting of Location.t * string
    4. | Applicative_path of Location.t
    5. | Variable_in_scope of Location.t * string
    6. | Other of Location.t
    7. | Ill_formed_ast of Location.t * string
    8. | Invalid_package_type of Location.t * string
    9. | Removed_string_set of Location.t
    exception Error of error
    exception Escape_error
    val location_of_error : error -> Location.t
    val ill_formed_ast : Location.t -> string -> 'a
    diff --git a/ocaml/Tag/Map/index.html b/ocaml/Tag/Map/index.html index 6211a1f..f59a838 100644 --- a/ocaml/Tag/Map/index.html +++ b/ocaml/Tag/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Tag.Map)

    Module Tag.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Tag.Map)

    Module Tag.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Tag/Set/index.html b/ocaml/Tag/Set/index.html index 28240b3..650e0f0 100644 --- a/ocaml/Tag/Set/index.html +++ b/ocaml/Tag/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Tag.Set)

    Module Tag.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Tag.Set)

    Module Tag.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Tag/T/index.html b/ocaml/Tag/T/index.html index ff4ab33..7b72fd0 100644 --- a/ocaml/Tag/T/index.html +++ b/ocaml/Tag/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Tag.T)

    Module Tag.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Tag.T)

    Module Tag.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Tag/Tbl/index.html b/ocaml/Tag/Tbl/index.html index d1a6de9..66fb15a 100644 --- a/ocaml/Tag/Tbl/index.html +++ b/ocaml/Tag/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Tag.Tbl)

    Module Tag.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Tag.Tbl)

    Module Tag.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Tag/index.html b/ocaml/Tag/index.html index ef78915..14a4a4e 100644 --- a/ocaml/Tag/index.html +++ b/ocaml/Tag/index.html @@ -1,2 +1,2 @@ -Tag (ocaml.Tag)

    Module Tag

    Tags on runtime boxed values.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create_exn : int -> t
    val to_int : t -> int
    val zero : t
    val object_tag : t
    val compare : t -> t -> int
    \ No newline at end of file +Tag (ocaml.Tag)

    Module Tag

    Tags on runtime boxed values.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create_exn : int -> t
    val to_int : t -> int
    val zero : t
    val object_tag : t
    val compare : t -> t -> int
    diff --git a/ocaml/Targetint/index.html b/ocaml/Targetint/index.html index 7c7d6ba..cb59e48 100644 --- a/ocaml/Targetint/index.html +++ b/ocaml/Targetint/index.html @@ -1,3 +1,2 @@ -Targetint (ocaml.Targetint)

    Module Targetint

    Target processor-native integers.

    This module provides operations on the type of signed 32-bit integers (on 32-bit target platforms) or signed 64-bit integers (on 64-bit target platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over are taken modulo 232 or 264 depending on the word size of the target architecture.

    Warning: this module is unstable and part of compiler-libs.

    type t

    The type of target integers.

    val zero : t

    The target integer 0.

    val one : t

    The target integer 1.

    val minus_one : t

    The target integer -1.

    val neg : t -> t

    Unary negation.

    val add : t -> t -> t

    Addition.

    val sub : t -> t -> t

    Subtraction.

    val mul : t -> t -> t

    Multiplication.

    val div : t -> t -> t

    Integer division. Raise Division_by_zero if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : t -> t -> t

    Same as div, except that arguments and result are interpreted as unsigned integers.

    val rem : t -> t -> t

    Integer remainder. If y is not zero, the result of Targetint.rem x y satisfies the following properties: Targetint.zero <= Nativeint.rem x y < Targetint.abs y and x = Targetint.add (Targetint.mul (Targetint.div x y) y) - (Targetint.rem x y). If y = 0, Targetint.rem x y raises Division_by_zero.

    val unsigned_rem : t -> t -> t

    Same as rem, except that arguments and result are interpreted as unsigned integers.

    val succ : t -> t

    Successor. Targetint.succ x is Targetint.add x Targetint.one.

    val pred : t -> t

    Predecessor. Targetint.pred x is Targetint.sub x Targetint.one.

    val abs : t -> t

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val size : int

    The size in bits of a target native integer.

    val max_int : t

    The greatest representable target integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

    val min_int : t

    The smallest representable target integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

    val logand : t -> t -> t

    Bitwise logical and.

    val logor : t -> t -> t

    Bitwise logical or.

    val logxor : t -> t -> t

    Bitwise logical exclusive or.

    val lognot : t -> t

    Bitwise logical negation.

    val shift_left : t -> int -> t

    Targetint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

    val shift_right : t -> int -> t

    Targetint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

    val shift_right_logical : t -> int -> t

    Targetint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

    val of_int : int -> t

    Convert the given integer (type int) to a target integer (type t), module the target word size.

    val of_int_exn : int -> t

    Convert the given integer (type int) to a target integer (type t). Raises a fatal error if the conversion is not exact.

    val to_int : t -> int

    Convert the given target integer (type t) to an integer (type int). The high-order bit is lost during the conversion.

    val of_float : float -> t

    Convert the given floating-point number to a target integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range [Targetint.min_int, Targetint.max_int].

    val to_float : t -> float

    Convert the given target integer to a floating-point number.

    val of_int32 : int32 -> t

    Convert the given 32-bit integer (type int32) to a target integer.

    val to_int32 : t -> int32

    Convert the given target integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

    val of_int64 : int64 -> t

    Convert the given 64-bit integer (type int64) to a target integer.

    val to_int64 : t -> int64

    Convert the given target integer to a 64-bit integer (type int64).

    val of_string : string -> t

    Convert the given string to a target integer. The string is read in decimal (by default) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively. Raise Failure "int_of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

    val to_string : t -> string

    Return the string representation of its argument, in decimal.

    val compare : t -> t -> int

    The comparison function for target integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Targetint to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned integers.

    val equal : t -> t -> bool

    The equal function for target ints.

    type repr =
    1. | Int32 of int32
    2. | Int64 of int64
    val repr : t -> repr

    The concrete representation of a native integer.

    val print : Stdlib.Format.formatter -> t -> unit

    Print a target integer to a formatter.

    \ No newline at end of file +Targetint (ocaml.Targetint)

    Module Targetint

    Target processor-native integers.

    This module provides operations on the type of signed 32-bit integers (on 32-bit target platforms) or signed 64-bit integers (on 64-bit target platforms). This integer type has exactly the same width as that of a pointer type in the C compiler. All arithmetic operations over are taken modulo 232 or 264 depending on the word size of the target architecture.

    Warning: this module is unstable and part of compiler-libs.

    type t

    The type of target integers.

    val zero : t

    The target integer 0.

    val one : t

    The target integer 1.

    val minus_one : t

    The target integer -1.

    val neg : t -> t

    Unary negation.

    val add : t -> t -> t

    Addition.

    val sub : t -> t -> t

    Subtraction.

    val mul : t -> t -> t

    Multiplication.

    val div : t -> t -> t

    Integer division. Raise Division_by_zero if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : t -> t -> t

    Same as div, except that arguments and result are interpreted as unsigned integers.

    val rem : t -> t -> t

    Integer remainder. If y is not zero, the result of Targetint.rem x y satisfies the following properties: Targetint.zero <= Nativeint.rem x y < Targetint.abs y and x = Targetint.add (Targetint.mul (Targetint.div x y) y) (Targetint.rem x y). If y = 0, Targetint.rem x y raises Division_by_zero.

    val unsigned_rem : t -> t -> t

    Same as rem, except that arguments and result are interpreted as unsigned integers.

    val succ : t -> t

    Successor. Targetint.succ x is Targetint.add x Targetint.one.

    val pred : t -> t

    Predecessor. Targetint.pred x is Targetint.sub x Targetint.one.

    val abs : t -> t

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val size : int

    The size in bits of a target native integer.

    val max_int : t

    The greatest representable target integer, either 231 - 1 on a 32-bit platform, or 263 - 1 on a 64-bit platform.

    val min_int : t

    The smallest representable target integer, either -231 on a 32-bit platform, or -263 on a 64-bit platform.

    val logand : t -> t -> t

    Bitwise logical and.

    val logor : t -> t -> t

    Bitwise logical or.

    val logxor : t -> t -> t

    Bitwise logical exclusive or.

    val lognot : t -> t

    Bitwise logical negation.

    val shift_left : t -> int -> t

    Targetint.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= bitsize, where bitsize is 32 on a 32-bit platform and 64 on a 64-bit platform.

    val shift_right : t -> int -> t

    Targetint.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= bitsize.

    val shift_right_logical : t -> int -> t

    Targetint.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= bitsize.

    val of_int : int -> t

    Convert the given integer (type int) to a target integer (type t), module the target word size.

    val of_int_exn : int -> t

    Convert the given integer (type int) to a target integer (type t). Raises a fatal error if the conversion is not exact.

    val to_int : t -> int

    Convert the given target integer (type t) to an integer (type int). The high-order bit is lost during the conversion.

    val of_float : float -> t

    Convert the given floating-point number to a target integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range [Targetint.min_int, Targetint.max_int].

    val to_float : t -> float

    Convert the given target integer to a floating-point number.

    val of_int32 : int32 -> t

    Convert the given 32-bit integer (type int32) to a target integer.

    val to_int32 : t -> int32

    Convert the given target integer to a 32-bit integer (type int32). On 64-bit platforms, the 64-bit native integer is taken modulo 232, i.e. the top 32 bits are lost. On 32-bit platforms, the conversion is exact.

    val of_int64 : int64 -> t

    Convert the given 64-bit integer (type int64) to a target integer.

    val to_int64 : t -> int64

    Convert the given target integer to a 64-bit integer (type int64).

    val of_string : string -> t

    Convert the given string to a target integer. The string is read in decimal (by default) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively. Raise Failure "int_of_string" if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type nativeint.

    val to_string : t -> string

    Return the string representation of its argument, in decimal.

    val compare : t -> t -> int

    The comparison function for target integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Targetint to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned integers.

    val equal : t -> t -> bool

    The equal function for target ints.

    type repr =
    1. | Int32 of int32
    2. | Int64 of int64
    val repr : t -> repr

    The concrete representation of a native integer.

    val print : Stdlib.Format.formatter -> t -> unit

    Print a target integer to a formatter.

    diff --git a/ocaml/Tast_iterator/index.html b/ocaml/Tast_iterator/index.html index 4341e7c..ca967f4 100644 --- a/ocaml/Tast_iterator/index.html +++ b/ocaml/Tast_iterator/index.html @@ -1,8 +1,8 @@ -Tast_iterator (ocaml.Tast_iterator)

    Module Tast_iterator

    Allows the implementation of typed tree inspection using open recursion

    type iterator = {
    1. attribute : iterator -> Typedtree.attribute -> unit;
    2. attributes : iterator -> Typedtree.attributes -> unit;
    3. binding_op : iterator -> Typedtree.binding_op -> unit;
    4. case : 'k. iterator -> 'k Typedtree.case -> unit;
    5. class_declaration : iterator -> Typedtree.class_declaration -> unit;
    6. class_description : iterator -> Typedtree.class_description -> unit;
    7. class_expr : iterator -> Typedtree.class_expr -> unit;
    8. class_field : iterator -> Typedtree.class_field -> unit;
    9. class_signature : iterator -> Typedtree.class_signature -> unit;
    10. class_structure : iterator -> Typedtree.class_structure -> unit;
    11. class_type : iterator -> Typedtree.class_type -> unit;
    12. class_type_declaration : iterator -> Typedtree.class_type_declaration -> unit;
    13. class_type_field : iterator -> Typedtree.class_type_field -> unit;
    14. env : iterator -> Env.t -> unit;
    15. expr : iterator -> Typedtree.expression -> unit;
    16. extension_constructor : iterator -> Typedtree.extension_constructor -> unit;
    17. location : iterator -> Location.t -> unit;
    18. module_binding : iterator -> Typedtree.module_binding -> unit;
    19. module_coercion : iterator -> Typedtree.module_coercion -> unit;
    20. module_declaration : iterator -> Typedtree.module_declaration -> unit;
    21. module_substitution : iterator -> Typedtree.module_substitution -> unit;
    22. module_expr : iterator -> Typedtree.module_expr -> unit;
    23. module_type : iterator -> Typedtree.module_type -> unit;
    24. module_type_declaration : iterator -> +Tast_iterator (ocaml.Tast_iterator)

      Module Tast_iterator

      Allows the implementation of typed tree inspection using open recursion

      type iterator = {
      1. attribute : iterator -> Typedtree.attribute -> unit;
      2. attributes : iterator -> Typedtree.attributes -> unit;
      3. binding_op : iterator -> Typedtree.binding_op -> unit;
      4. case : 'k. iterator -> 'k Typedtree.case -> unit;
      5. class_declaration : iterator -> Typedtree.class_declaration -> unit;
      6. class_description : iterator -> Typedtree.class_description -> unit;
      7. class_expr : iterator -> Typedtree.class_expr -> unit;
      8. class_field : iterator -> Typedtree.class_field -> unit;
      9. class_signature : iterator -> Typedtree.class_signature -> unit;
      10. class_structure : iterator -> Typedtree.class_structure -> unit;
      11. class_type : iterator -> Typedtree.class_type -> unit;
      12. class_type_declaration : iterator -> Typedtree.class_type_declaration -> unit;
      13. class_type_field : iterator -> Typedtree.class_type_field -> unit;
      14. env : iterator -> Env.t -> unit;
      15. expr : iterator -> Typedtree.expression -> unit;
      16. extension_constructor : iterator -> Typedtree.extension_constructor -> unit;
      17. location : iterator -> Location.t -> unit;
      18. module_binding : iterator -> Typedtree.module_binding -> unit;
      19. module_coercion : iterator -> Typedtree.module_coercion -> unit;
      20. module_declaration : iterator -> Typedtree.module_declaration -> unit;
      21. module_substitution : iterator -> Typedtree.module_substitution -> unit;
      22. module_expr : iterator -> Typedtree.module_expr -> unit;
      23. module_type : iterator -> Typedtree.module_type -> unit;
      24. module_type_declaration : iterator -> Typedtree.module_type_declaration -> unit;
      25. package_type : iterator -> Typedtree.package_type -> unit;
      26. pat : 'k. iterator -> 'k Typedtree.general_pattern -> unit;
      27. row_field : iterator -> Typedtree.row_field -> unit;
      28. object_field : iterator -> Typedtree.object_field -> unit;
      29. open_declaration : iterator -> Typedtree.open_declaration -> unit;
      30. open_description : iterator -> Typedtree.open_description -> unit;
      31. signature : iterator -> Typedtree.signature -> unit;
      32. signature_item : iterator -> Typedtree.signature_item -> unit;
      33. structure : iterator -> Typedtree.structure -> unit;
      34. structure_item : iterator -> Typedtree.structure_item -> unit;
      35. typ : iterator -> Typedtree.core_type -> unit;
      36. type_declaration : iterator -> Typedtree.type_declaration -> unit;
      37. type_declarations : iterator -> (Asttypes.rec_flag * Typedtree.type_declaration list) -> unit;
      38. type_extension : iterator -> Typedtree.type_extension -> unit;
      39. type_exception : iterator -> Typedtree.type_exception -> unit;
      40. type_kind : iterator -> Typedtree.type_kind -> unit;
      41. value_binding : iterator -> Typedtree.value_binding -> unit;
      42. value_bindings : iterator -> (Asttypes.rec_flag * Typedtree.value_binding list) -> - unit;
      43. value_description : iterator -> Typedtree.value_description -> unit;
      44. with_constraint : iterator -> Typedtree.with_constraint -> unit;
      }
      val default_iterator : iterator
      \ No newline at end of file + unit;
    25. value_description : iterator -> Typedtree.value_description -> unit;
    26. with_constraint : iterator -> Typedtree.with_constraint -> unit;
    }
    val default_iterator : iterator
    diff --git a/ocaml/Tast_mapper/index.html b/ocaml/Tast_mapper/index.html index 7807305..70dcdc3 100644 --- a/ocaml/Tast_mapper/index.html +++ b/ocaml/Tast_mapper/index.html @@ -1,5 +1,5 @@ -Tast_mapper (ocaml.Tast_mapper)

    Module Tast_mapper

    A generic Typedtree mapper

    type mapper = {
    1. attribute : mapper -> Typedtree.attribute -> Typedtree.attribute;
    2. attributes : mapper -> Typedtree.attributes -> Typedtree.attributes;
    3. binding_op : mapper -> Typedtree.binding_op -> Typedtree.binding_op;
    4. case : 'k. mapper -> 'k Typedtree.case -> 'k Typedtree.case;
    5. class_declaration : mapper -> +Tast_mapper (ocaml.Tast_mapper)

      Module Tast_mapper

      A generic Typedtree mapper

      val default : mapper
      \ No newline at end of file + Typedtree.with_constraint;
    }
    val default : mapper
    diff --git a/ocaml/Terminfo/index.html b/ocaml/Terminfo/index.html index c136453..c26ebba 100644 --- a/ocaml/Terminfo/index.html +++ b/ocaml/Terminfo/index.html @@ -1,2 +1,2 @@ -Terminfo (ocaml.Terminfo)

    Module Terminfo

    Basic interface to the terminfo database

    Warning: this module is unstable and part of compiler-libs.

    type status =
    1. | Uninitialised
    2. | Bad_term
    3. | Good_term
    val setup : out_channel -> status
    val num_lines : out_channel -> int
    val backup : out_channel -> int -> unit
    val standout : out_channel -> bool -> unit
    val resume : out_channel -> int -> unit
    \ No newline at end of file +Terminfo (ocaml.Terminfo)

    Module Terminfo

    Basic interface to the terminfo database

    Warning: this module is unstable and part of compiler-libs.

    type status =
    1. | Uninitialised
    2. | Bad_term
    3. | Good_term
    val setup : out_channel -> status
    val num_lines : out_channel -> int
    val backup : out_channel -> int -> unit
    val standout : out_channel -> bool -> unit
    val resume : out_channel -> int -> unit
    diff --git a/ocaml/Thread/index.html b/ocaml/Thread/index.html index 149b8ab..03fcdfc 100644 --- a/ocaml/Thread/index.html +++ b/ocaml/Thread/index.html @@ -1,7 +1,7 @@ -Thread (ocaml.Thread)

    Module Thread

    Lightweight threads for Posix 1003.1c and Win32.

    type t

    The type of thread handles.

    Thread creation and termination

    val create : ('a -> 'b) -> 'a -> t

    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

    See also Domain.spawn if you want parallel execution instead.

    val self : unit -> t

    Return the handle for the thread currently executing.

    val id : t -> int

    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

    exception Exit

    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

    val exit : unit -> unit

    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

    • before 5.0

      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

    • deprecated Use 'raise Thread.Exit' instead.

    Suspending threads

    val delay : float -> unit

    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

    val join : t -> unit

    join th suspends the execution of the calling thread until the thread th has terminated.

    val yield : unit -> unit

    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

    Waiting for file descriptors or processes

    The functions below are leftovers from an earlier, VM-based threading system. The Unix module provides equivalent functionality, in a more general and more standard-conformant manner. It is recommended to use Unix functions directly.

    val wait_timed_read : Unix.file_descr -> float -> bool

    See Thread.wait_timed_write.

    • deprecated Use Unix.select instead.
    val wait_timed_write : Unix.file_descr -> float -> bool

    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

    • deprecated Use Unix.select instead.
    val select : +Thread (ocaml.Thread)

    Module Thread

    Lightweight threads for Posix 1003.1c and Win32.

    type t

    The type of thread handles.

    Thread creation and termination

    val create : ('a -> 'b) -> 'a -> t

    Thread.create funct arg creates a new thread of control, in which the function application funct arg is executed concurrently with the other threads of the domain. The application of Thread.create returns the handle of the newly created thread. The new thread terminates when the application funct arg returns, either normally or by raising the Thread.Exit exception or by raising any other uncaught exception. In the last case, the uncaught exception is printed on standard error, but not propagated back to the parent thread. Similarly, the result of the application funct arg is discarded and not directly accessible to the parent thread.

    See also Domain.spawn if you want parallel execution instead.

    val self : unit -> t

    Return the handle for the thread currently executing.

    val id : t -> int

    Return the identifier of the given thread. A thread identifier is an integer that identifies uniquely the thread. It can be used to build data structures indexed by threads.

    exception Exit

    Exception raised by user code to initiate termination of the current thread. In a thread created by Thread.create funct arg, if the Thread.Exit exception reaches the top of the application funct arg, it has the effect of terminating the current thread silently. In other contexts, there is no implicit handling of the Thread.Exit exception.

    val exit : unit -> unit

    Raise the Thread.Exit exception. In a thread created by Thread.create, this will cause the thread to terminate prematurely, unless the thread function handles the exception itself. Fun.protect finalizers and catch-all exception handlers will be executed.

    To make it clear that an exception is raised and will trigger finalizers and catch-all exception handlers, it is recommended to write raise Thread.Exit instead of Thread.exit ().

    • before 5.0

      A different implementation was used, not based on raising an exception, and not running finalizers and catch-all handlers. The previous implementation had a different behavior when called outside of a thread created by Thread.create.

    • deprecated Use 'raise Thread.Exit' instead.

    Suspending threads

    val delay : float -> unit

    delay d suspends the execution of the calling thread for d seconds. The other program threads continue to run during this time.

    val join : t -> unit

    join th suspends the execution of the calling thread until the thread th has terminated.

    val yield : unit -> unit

    Re-schedule the calling thread without suspending it. This function can be used to give scheduling hints, telling the scheduler that now is a good time to switch to other threads.

    Waiting for file descriptors or processes

    The functions below are leftovers from an earlier, VM-based threading system. The Unix module provides equivalent functionality, in a more general and more standard-conformant manner. It is recommended to use Unix functions directly.

    val wait_timed_read : Unix.file_descr -> float -> bool

    See Thread.wait_timed_write.

    • deprecated Use Unix.select instead.
    val wait_timed_write : Unix.file_descr -> float -> bool

    Suspend the execution of the calling thread until at least one character or EOF is available for reading (wait_timed_read) or one character can be written without blocking (wait_timed_write) on the given Unix file descriptor. Wait for at most the amount of time given as second argument (in seconds). Return true if the file descriptor is ready for input/output and false if the timeout expired. The same functionality can be achieved with Unix.select.

    • deprecated Use Unix.select instead.
    val select : Unix.file_descr list -> Unix.file_descr list -> Unix.file_descr list -> float -> - Unix.file_descr list * Unix.file_descr list * Unix.file_descr list

    Same function as Unix.select. Suspend the execution of the calling thread until input/output becomes possible on the given Unix file descriptors. The arguments and results have the same meaning as for Unix.select.

    • deprecated Use Unix.select instead.
    val wait_pid : int -> int * Unix.process_status

    Same function as Unix.waitpid. wait_pid p suspends the execution of the calling thread until the process specified by the process identifier p terminates. Returns the pid of the child caught and its termination status, as per Unix.wait.

    • deprecated Use Unix.waitpid instead.

    Management of signals

    Signal handling follows the POSIX thread model: signals generated by a thread are delivered to that thread; signals generated externally are delivered to one of the threads that does not block it. Each thread possesses a set of blocked signals, which can be modified using Thread.sigmask. This set is inherited at thread creation time. Per-thread signal masks are supported only by the system thread library under Unix, but not under Win32, nor by the VM thread library.

    val sigmask : Unix.sigprocmask_command -> int list -> int list

    sigmask cmd sigs changes the set of blocked signals for the calling thread. If cmd is SIG_SETMASK, blocked signals are set to those in the list sigs. If cmd is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If cmd is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigmask returns the set of previously blocked signals for the thread.

    val wait_signal : int list -> int

    wait_signal sigs suspends the execution of the calling thread until the process receives one of the signals specified in the list sigs. It then returns the number of the signal received. Signal handlers attached to the signals in sigs will not be invoked. The signals sigs are expected to be blocked before calling wait_signal.

    Uncaught exceptions

    val default_uncaught_exception_handler : exn -> unit

    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

    val set_uncaught_exception_handler : (exn -> unit) -> unit

    Thread.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions.

    If the newly set uncaught exception handler raise an exception, default_uncaught_exception_handler will be called.

    \ No newline at end of file + Unix.file_descr list * Unix.file_descr list * Unix.file_descr list

    Same function as Unix.select. Suspend the execution of the calling thread until input/output becomes possible on the given Unix file descriptors. The arguments and results have the same meaning as for Unix.select.

    • deprecated Use Unix.select instead.
    val wait_pid : int -> int * Unix.process_status

    Same function as Unix.waitpid. wait_pid p suspends the execution of the calling thread until the process specified by the process identifier p terminates. Returns the pid of the child caught and its termination status, as per Unix.wait.

    • deprecated Use Unix.waitpid instead.

    Management of signals

    Signal handling follows the POSIX thread model: signals generated by a thread are delivered to that thread; signals generated externally are delivered to one of the threads that does not block it. Each thread possesses a set of blocked signals, which can be modified using Thread.sigmask. This set is inherited at thread creation time. Per-thread signal masks are supported only by the system thread library under Unix, but not under Win32, nor by the VM thread library.

    val sigmask : Unix.sigprocmask_command -> int list -> int list

    sigmask cmd sigs changes the set of blocked signals for the calling thread. If cmd is SIG_SETMASK, blocked signals are set to those in the list sigs. If cmd is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If cmd is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigmask returns the set of previously blocked signals for the thread.

    val wait_signal : int list -> int

    wait_signal sigs suspends the execution of the calling thread until the process receives one of the signals specified in the list sigs. It then returns the number of the signal received. Signal handlers attached to the signals in sigs will not be invoked. The signals sigs are expected to be blocked before calling wait_signal.

    Uncaught exceptions

    val default_uncaught_exception_handler : exn -> unit

    Thread.default_uncaught_exception_handler will print the thread's id, exception and backtrace (if available).

    val set_uncaught_exception_handler : (exn -> unit) -> unit

    Thread.set_uncaught_exception_handler fn registers fn as the handler for uncaught exceptions.

    If the newly set uncaught exception handler raise an exception, default_uncaught_exception_handler will be called.

    diff --git a/ocaml/Tmc/index.html b/ocaml/Tmc/index.html index f879d4b..7bde484 100644 --- a/ocaml/Tmc/index.html +++ b/ocaml/Tmc/index.html @@ -1,5 +1,5 @@ -Tmc (ocaml.Tmc)

    Module Tmc

    Tail-modulo-cons optimization.

    Warning: this module is unstable and part of compiler-libs.

    TMC (Tail Modulo Cons) is a code transformation that rewrites transformed functions in destination-passing-style, in such a way that certain calls that were not in tail position in the original program become tail-calls in the transformed program.

    As a classic example, the following program | +Tmc (ocaml.Tmc)

    Module Tmc

    Tail-modulo-cons optimization.

    Warning: this module is unstable and part of compiler-libs.

    TMC (Tail Modulo Cons) is a code transformation that rewrites transformed functions in destination-passing-style, in such a way that certain calls that were not in tail position in the original program become tail-calls in the transformed program.

    As a classic example, the following program | let[@tail_mod_cons] rec map f = function | [] -> [] | x :: xs -> @@ -20,4 +20,4 @@ let dst' = y :: Placeholder in dst.offset <- dst'; map_dps dst 1 f fx - |

    In this example, the expression (y :: map f xs) had a call in non-tail-position, and it gets rewritten into tail-calls. TMC handles all such cases where the continuation of the call (what needs to be done after the return) is a "construction", the creation of a (possibly nested) data block.

    The code transformation generates two versions of the input function, the "direct" version with the same type and behavior as the original one (here just map), and the "destination-passing-style" version (here map_dps).

    Any call to the original function from outside the let..rec declaration gets transformed into a call into the direct version, which will itself call the destination-passing-style versions on recursive calls that may benefit from it (they are in tail-position modulo constructors).

    Because of this inherent code duplication, the transformation may not always improve performance. In this implementation, TMC is opt-in, we only transform functions that the user has annotated with an attribute to request the transformation.

    val rewrite : Lambda.lambda -> Lambda.lambda
    \ No newline at end of file + |

    In this example, the expression (y :: map f xs) had a call in non-tail-position, and it gets rewritten into tail-calls. TMC handles all such cases where the continuation of the call (what needs to be done after the return) is a "construction", the creation of a (possibly nested) data block.

    The code transformation generates two versions of the input function, the "direct" version with the same type and behavior as the original one (here just map), and the "destination-passing-style" version (here map_dps).

    Any call to the original function from outside the let..rec declaration gets transformed into a call into the direct version, which will itself call the destination-passing-style versions on recursive calls that may benefit from it (they are in tail-position modulo constructors).

    Because of this inherent code duplication, the transformation may not always improve performance. In this implementation, TMC is opt-in, we only transform functions that the user has annotated with an attribute to request the transformation.

    val rewrite : Lambda.lambda -> Lambda.lambda
    diff --git a/ocaml/Topcommon/index.html b/ocaml/Topcommon/index.html index 930b256..adc7b8b 100644 --- a/ocaml/Topcommon/index.html +++ b/ocaml/Topcommon/index.html @@ -1,5 +1,5 @@ -Topcommon (ocaml.Topcommon)

    Module Topcommon

    This module provides common implementations for internals of Toploop, for bytecode and native code (see Topeval for the diverging parts of the implementation).

    You should not use it directly, refer to the functions in Toploop instead.

    type evaluation_outcome =
    1. | Result of Stdlib.Obj.t
    2. | Exception of exn
    val backtrace : string option ref
    val parse_mod_use_file : +Topcommon (ocaml.Topcommon)

    Module Topcommon

    This module provides common implementations for internals of Toploop, for bytecode and native code (see Topeval for the diverging parts of the implementation).

    You should not use it directly, refer to the functions in Toploop instead.

    type evaluation_outcome =
    1. | Result of Stdlib.Obj.t
    2. | Exception of exn
    val backtrace : string option ref
    val parse_mod_use_file : string -> Stdlib.Lexing.lexbuf -> - Parsetree.toplevel_phrase list
    val refill_lexbuf : bytes -> int -> int
    \ No newline at end of file + Parsetree.toplevel_phrase list
    val refill_lexbuf : bytes -> int -> int
    diff --git a/ocaml/Topdirs/index.html b/ocaml/Topdirs/index.html index 136bac0..1ea4776 100644 --- a/ocaml/Topdirs/index.html +++ b/ocaml/Topdirs/index.html @@ -1,2 +1,2 @@ -Topdirs (ocaml.Topdirs)

    Module Topdirs

    val dir_quit : unit -> unit
    val dir_directory : string -> unit
    val dir_remove_directory : string -> unit
    val dir_cd : string -> unit
    val dir_load : Stdlib.Format.formatter -> string -> unit
    val dir_use : Stdlib.Format.formatter -> string -> unit
    val dir_use_output : Stdlib.Format.formatter -> string -> unit
    val dir_install_printer : Stdlib.Format.formatter -> Longident.t -> unit
    val dir_remove_printer : Stdlib.Format.formatter -> Longident.t -> unit
    val section_general : string
    val section_run : string
    val section_env : string
    val section_print : string
    val section_trace : string
    val section_options : string
    val section_undocumented : string
    val load_file : Stdlib.Format.formatter -> string -> bool
    • deprecated
    \ No newline at end of file +Topdirs (ocaml.Topdirs)

    Module Topdirs

    val dir_quit : unit -> unit
    val dir_directory : string -> unit
    val dir_remove_directory : string -> unit
    val dir_cd : string -> unit
    val dir_load : Stdlib.Format.formatter -> string -> unit
    val dir_use : Stdlib.Format.formatter -> string -> unit
    val dir_use_output : Stdlib.Format.formatter -> string -> unit
    val dir_install_printer : Stdlib.Format.formatter -> Longident.t -> unit
    val dir_remove_printer : Stdlib.Format.formatter -> Longident.t -> unit
    val section_general : string
    val section_run : string
    val section_env : string
    val section_print : string
    val section_trace : string
    val section_options : string
    val section_undocumented : string
    val load_file : Stdlib.Format.formatter -> string -> bool
    • deprecated
    diff --git a/ocaml/Topeval/index.html b/ocaml/Topeval/index.html index 5b49d5f..06c2595 100644 --- a/ocaml/Topeval/index.html +++ b/ocaml/Topeval/index.html @@ -1,2 +1,2 @@ -Topeval (ocaml.Topeval)

    Module Topeval

    This module provides two alternative implementations for internals of Toploop, for bytecode and native code.

    You should not use it directly, refer to the functions in Toploop instead.

    \ No newline at end of file +Topeval (ocaml.Topeval)

    Module Topeval

    This module provides two alternative implementations for internals of Toploop, for bytecode and native code.

    You should not use it directly, refer to the functions in Toploop instead.

    diff --git a/ocaml/Tophooks/index.html b/ocaml/Tophooks/index.html index cb9d9a0..0ff3e71 100644 --- a/ocaml/Tophooks/index.html +++ b/ocaml/Tophooks/index.html @@ -1,6 +1,6 @@ -Tophooks (ocaml.Tophooks)

    Module Tophooks

    type lookup_fn = string -> Stdlib.Obj.t option
    type load_fn = +Tophooks (ocaml.Tophooks)

    Module Tophooks

    type lookup_fn = string -> Stdlib.Obj.t option
    val lookup : lookup_fn
    val load : load_fn
    val register_loader : lookup:lookup_fn -> load:load_fn -> unit
    \ No newline at end of file + Topcommon.evaluation_outcome
    val lookup : lookup_fn
    val load : load_fn
    val register_loader : lookup:lookup_fn -> load:load_fn -> unit
    diff --git a/ocaml/Toploop/index.html b/ocaml/Toploop/index.html index 86eabfe..ec4c000 100644 --- a/ocaml/Toploop/index.html +++ b/ocaml/Toploop/index.html @@ -1,5 +1,5 @@ -Toploop (ocaml.Toploop)

    Module Toploop

    type input =
    1. | Stdin
    2. | File of string
    3. | String of string
    val getvalue : string -> Stdlib.Obj.t
    val setvalue : string -> Stdlib.Obj.t -> unit
    val filename_of_input : input -> string
    val set_paths : ?auto_include:Load_path.auto_include_callback -> unit -> unit
    val loop : Stdlib.Format.formatter -> unit
    val run_script : Stdlib.Format.formatter -> input -> string array -> bool
    type directive_fun =
    1. | Directive_none of unit -> unit
    2. | Directive_string of string -> unit
    3. | Directive_int of int -> unit
    4. | Directive_ident of Longident.t -> unit
    5. | Directive_bool of bool -> unit
    type directive_info = {
    1. section : string;
    2. doc : string;
    }
    val add_directive : string -> directive_fun -> directive_info -> unit
    val get_directive : string -> directive_fun option
    val get_directive_info : string -> directive_info option
    val all_directive_names : unit -> string list
    val directive_table : (string, directive_fun) Stdlib.Hashtbl.t
    • deprecated
    val directive_info_table : (string, directive_info) Stdlib.Hashtbl.t
    • deprecated
    val toplevel_env : Env.t ref
    val initialize_toplevel_env : unit -> unit
    val print_exception_outcome : Stdlib.Format.formatter -> exn -> unit
    val execute_phrase : +Toploop (ocaml.Toploop)

    Module Toploop

    type input =
    1. | Stdin
    2. | File of string
    3. | String of string
    val getvalue : string -> Stdlib.Obj.t
    val setvalue : string -> Stdlib.Obj.t -> unit
    val filename_of_input : input -> string
    val set_paths : ?auto_include:Load_path.auto_include_callback -> unit -> unit
    val loop : Stdlib.Format.formatter -> unit
    val run_script : Stdlib.Format.formatter -> input -> string array -> bool
    type directive_fun =
    1. | Directive_none of unit -> unit
    2. | Directive_string of string -> unit
    3. | Directive_int of int -> unit
    4. | Directive_ident of Longident.t -> unit
    5. | Directive_bool of bool -> unit
    type directive_info = {
    1. section : string;
    2. doc : string;
    }
    val add_directive : string -> directive_fun -> directive_info -> unit
    val get_directive : string -> directive_fun option
    val get_directive_info : string -> directive_info option
    val all_directive_names : unit -> string list
    val directive_table : (string, directive_fun) Stdlib.Hashtbl.t
    • deprecated
    val directive_info_table : (string, directive_info) Stdlib.Hashtbl.t
    • deprecated
    val toplevel_env : Env.t ref
    val initialize_toplevel_env : unit -> unit
    val print_exception_outcome : Stdlib.Format.formatter -> exn -> unit
    val execute_phrase : bool -> Stdlib.Format.formatter -> Parsetree.toplevel_phrase -> @@ -45,4 +45,4 @@ (Stdlib.Format.formatter -> Outcometree.out_type_extension -> unit) ref
    val print_out_sig_item : (Stdlib.Format.formatter -> Outcometree.out_sig_item -> unit) ref
    val print_out_signature : (Stdlib.Format.formatter -> Outcometree.out_sig_item list -> unit) ref
    val print_out_phrase : - (Stdlib.Format.formatter -> Outcometree.out_phrase -> unit) ref
    val read_interactive_input : (string -> bytes -> int -> int * bool) ref
    val toplevel_startup_hook : (unit -> unit) ref
    type event = ..
    type event +=
    1. | Startup
    2. | After_setup
    val add_hook : (event -> unit) -> unit
    val run_hooks : event -> unit
    val may_trace : bool ref
    val override_sys_argv : string array -> unit
    \ No newline at end of file + (Stdlib.Format.formatter -> Outcometree.out_phrase -> unit) ref
    val read_interactive_input : (string -> bytes -> int -> int * bool) ref
    val toplevel_startup_hook : (unit -> unit) ref
    type event = ..
    type event +=
    1. | Startup
    2. | After_setup
    val add_hook : (event -> unit) -> unit
    val run_hooks : event -> unit
    val may_trace : bool ref
    val override_sys_argv : string array -> unit
    diff --git a/ocaml/Topmain/index.html b/ocaml/Topmain/index.html index 0e0054e..83183dc 100644 --- a/ocaml/Topmain/index.html +++ b/ocaml/Topmain/index.html @@ -1,2 +1,2 @@ -Topmain (ocaml.Topmain)

    Module Topmain

    val main : unit -> int
    \ No newline at end of file +Topmain (ocaml.Topmain)

    Module Topmain

    val main : unit -> int
    diff --git a/ocaml/Topprinters/index.html b/ocaml/Topprinters/index.html index bd182cd..50b5b0d 100644 --- a/ocaml/Topprinters/index.html +++ b/ocaml/Topprinters/index.html @@ -1,2 +1,2 @@ -Topprinters (ocaml.Topprinters)

    Module Topprinters

    type printer_type = Types.type_expr -> Types.type_expr
    val printer_type_new : printer_type
    val printer_type_old : printer_type
    \ No newline at end of file +Topprinters (ocaml.Topprinters)

    Module Topprinters

    type printer_type = Types.type_expr -> Types.type_expr
    val printer_type_new : printer_type
    val printer_type_old : printer_type
    diff --git a/ocaml/Topstart/index.html b/ocaml/Topstart/index.html index 9c866fa..45f17b4 100644 --- a/ocaml/Topstart/index.html +++ b/ocaml/Topstart/index.html @@ -1,2 +1,2 @@ -Topstart (ocaml.Topstart)

    Module Topstart

    \ No newline at end of file +Topstart (ocaml.Topstart)

    Module Topstart

    diff --git a/ocaml/Trace/index.html b/ocaml/Trace/index.html index cc7c34e..852ffd1 100644 --- a/ocaml/Trace/index.html +++ b/ocaml/Trace/index.html @@ -1,5 +1,5 @@ -Trace (ocaml.Trace)

    Module Trace

    type codeptr
    type traced_function = {
    1. path : Path.t;
    2. closure : Stdlib.Obj.t;
    3. actual_code : codeptr;
    4. instrumented_fun : codeptr -> Stdlib.Obj.t -> Stdlib.Obj.t -> Stdlib.Obj.t;
    }
    val traced_functions : traced_function list ref
    val is_traced : Stdlib.Obj.t -> Path.t option
    val get_code_pointer : Stdlib.Obj.t -> codeptr
    val set_code_pointer : Stdlib.Obj.t -> codeptr -> unit
    val instrument_closure : +Trace (ocaml.Trace)

    Module Trace

    type codeptr
    type traced_function = {
    1. path : Path.t;
    2. closure : Stdlib.Obj.t;
    3. actual_code : codeptr;
    4. instrumented_fun : codeptr -> Stdlib.Obj.t -> Stdlib.Obj.t -> Stdlib.Obj.t;
    }
    val traced_functions : traced_function list ref
    val is_traced : Stdlib.Obj.t -> Path.t option
    val get_code_pointer : Stdlib.Obj.t -> codeptr
    val set_code_pointer : Stdlib.Obj.t -> codeptr -> unit
    val instrument_closure : Env.t -> Longident.t -> Stdlib.Format.formatter -> @@ -7,4 +7,4 @@ codeptr -> Stdlib.Obj.t -> Stdlib.Obj.t -> - Stdlib.Obj.t
    val print_trace : Stdlib.Obj.t -> Stdlib.Obj.t -> Stdlib.Obj.t
    \ No newline at end of file + Stdlib.Obj.t
    val print_trace : Stdlib.Obj.t -> Stdlib.Obj.t -> Stdlib.Obj.t
    diff --git a/ocaml/Translattribute/index.html b/ocaml/Translattribute/index.html index fee2ebb..4dbe637 100644 --- a/ocaml/Translattribute/index.html +++ b/ocaml/Translattribute/index.html @@ -1,5 +1,5 @@ -Translattribute (ocaml.Translattribute)

    Module Translattribute

    val check_attribute : Typedtree.expression -> Parsetree.attribute -> unit
    val check_attribute_on_module : +Translattribute (ocaml.Translattribute)

    Module Translattribute

    val check_attribute : Typedtree.expression -> Parsetree.attribute -> unit
    val check_attribute_on_module : Typedtree.module_expr -> Parsetree.attribute -> unit
    val add_inline_attribute : @@ -28,4 +28,4 @@ Lambda.lambda -> Location.t -> Parsetree.attributes -> - Lambda.lambda
    \ No newline at end of file + Lambda.lambda
    diff --git a/ocaml/Translclass/index.html b/ocaml/Translclass/index.html index 8468263..9d7c24b 100644 --- a/ocaml/Translclass/index.html +++ b/ocaml/Translclass/index.html @@ -1,9 +1,9 @@ -Translclass (ocaml.Translclass)

    Module Translclass

    val transl_class : - scopes:Debuginfo.Scoped_location.scopes -> +Translclass (ocaml.Translclass)

    Module Translclass

    val transl_class : + scopes:Debuginfo.Scoped_location.scopes -> Ident.t list -> Ident.t -> string list -> Typedtree.class_expr -> Asttypes.virtual_flag -> - Lambda.lambda
    type error =
    1. | Tags of string * string
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file + Lambda.lambda
    type error =
    1. | Tags of string * string
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Translcore/index.html b/ocaml/Translcore/index.html index 3fd28f2..e93d2f0 100644 --- a/ocaml/Translcore/index.html +++ b/ocaml/Translcore/index.html @@ -1,39 +1,39 @@ -Translcore (ocaml.Translcore)

    Module Translcore

    val transl_exp : - scopes:Debuginfo.Scoped_location.scopes -> +Translcore (ocaml.Translcore)

    Module Translcore

    val transl_let : - scopes:Debuginfo.Scoped_location.scopes -> - ?in_structure:bool -> + scopes:Debuginfo.Scoped_location.scopes -> + ?in_structure:bool -> Asttypes.rec_flag -> Typedtree.value_binding list -> Lambda.lambda -> Lambda.lambda
    val transl_extension_constructor : - scopes:Debuginfo.Scoped_location.scopes -> + scopes:Debuginfo.Scoped_location.scopes -> Env.t -> Path.t option -> Typedtree.extension_constructor -> Lambda.lambda
    type error =
    1. | Free_super_var
    2. | Unreachable_reached
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    val transl_object : - (scopes:Debuginfo.Scoped_location.scopes -> + (scopes:Debuginfo.Scoped_location.scopes -> Ident.t -> string list -> Typedtree.class_expr -> Lambda.lambda) - ref
    \ No newline at end of file + ref
    diff --git a/ocaml/Translmod/index.html b/ocaml/Translmod/index.html index b715070..f97dd99 100644 --- a/ocaml/Translmod/index.html +++ b/ocaml/Translmod/index.html @@ -1,5 +1,5 @@ -Translmod (ocaml.Translmod)

    Module Translmod

    val transl_implementation : +Translmod (ocaml.Translmod)

    Module Translmod

    val transl_implementation : string -> (Typedtree.structure * Typedtree.module_coercion) -> Lambda.program
    val transl_store_phrases : string -> Typedtree.structure -> int * Lambda.lambda
    val transl_store_implementation : @@ -19,4 +19,4 @@ int * Lambda.lambda
    val transl_package_flambda : Ident.t option list -> Typedtree.module_coercion -> - int * Lambda.lambda
    val toplevel_name : Ident.t -> string
    val nat_toplevel_name : Ident.t -> Ident.t * int
    val primitive_declarations : Primitive.description list ref
    type unsafe_component =
    1. | Unsafe_module_binding
    2. | Unsafe_functor
    3. | Unsafe_non_function
    4. | Unsafe_typext
    type unsafe_info =
    1. | Unsafe of {
      1. reason : unsafe_component;
      2. loc : Location.t;
      3. subid : Ident.t;
      }
    2. | Unnamed
    type error =
    1. | Circular_dependency of (Ident.t * unsafe_info) list
    2. | Conflicting_inline_attributes
    exception Error of Location.t * error
    val report_error : Location.t -> error -> Location.error
    val reset : unit -> unit
    \ No newline at end of file + int * Lambda.lambda
    val toplevel_name : Ident.t -> string
    val nat_toplevel_name : Ident.t -> Ident.t * int
    val primitive_declarations : Primitive.description list ref
    type unsafe_component =
    1. | Unsafe_module_binding
    2. | Unsafe_functor
    3. | Unsafe_non_function
    4. | Unsafe_typext
    type unsafe_info =
    1. | Unsafe of {
      1. reason : unsafe_component;
      2. loc : Location.t;
      3. subid : Ident.t;
      }
    2. | Unnamed
    type error =
    1. | Circular_dependency of (Ident.t * unsafe_info) list
    2. | Conflicting_inline_attributes
    exception Error of Location.t * error
    val report_error : Location.t -> error -> Location.error
    val reset : unit -> unit
    diff --git a/ocaml/Translobj/index.html b/ocaml/Translobj/index.html index c0f1506..2761988 100644 --- a/ocaml/Translobj/index.html +++ b/ocaml/Translobj/index.html @@ -1,7 +1,7 @@ -Translobj (ocaml.Translobj)

    Module Translobj

    val oo_prim : string -> Lambda.lambda
    val meth : Lambda.lambda -> string -> Lambda.lambda * Lambda.lambda list
    val reset_labels : unit -> unit
    val transl_label_init : (unit -> Lambda.lambda * 'a) -> Lambda.lambda * 'a
    val transl_store_label_init : +Translobj (ocaml.Translobj)

    Module Translobj

    val oo_prim : string -> Lambda.lambda
    val meth : Lambda.lambda -> string -> Lambda.lambda * Lambda.lambda list
    val reset_labels : unit -> unit
    val transl_label_init : (unit -> Lambda.lambda * 'a) -> Lambda.lambda * 'a
    val transl_store_label_init : Ident.t -> int -> ('a -> Lambda.lambda) -> 'a -> - int * Lambda.lambda
    val method_ids : Ident.Set.t ref
    val oo_wrap : Env.t -> bool -> ('a -> Lambda.lambda) -> 'a -> Lambda.lambda
    val oo_add_class : Ident.t -> Env.t * bool
    val reset : unit -> unit
    \ No newline at end of file + int * Lambda.lambda
    val method_ids : Ident.Set.t ref
    val oo_wrap : Env.t -> bool -> ('a -> Lambda.lambda) -> 'a -> Lambda.lambda
    val oo_add_class : Ident.t -> Env.t * bool
    val reset : unit -> unit
    diff --git a/ocaml/Translprim/index.html b/ocaml/Translprim/index.html index 1ac5635..1e4218a 100644 --- a/ocaml/Translprim/index.html +++ b/ocaml/Translprim/index.html @@ -1,5 +1,5 @@ -Translprim (ocaml.Translprim)

    Module Translprim

    val event_before : +Translprim (ocaml.Translprim)

    Module Translprim

    type error =
    1. | Unknown_builtin_primitive of string
    2. | Wrong_arity_builtin_primitive of string
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file + Lambda.lambda
    type error =
    1. | Unknown_builtin_primitive of string
    2. | Wrong_arity_builtin_primitive of string
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Traverse_for_exported_symbols/index.html b/ocaml/Traverse_for_exported_symbols/index.html index 65e3c81..4ee6a1d 100644 --- a/ocaml/Traverse_for_exported_symbols/index.html +++ b/ocaml/Traverse_for_exported_symbols/index.html @@ -1,10 +1,10 @@ -Traverse_for_exported_symbols (ocaml.Traverse_for_exported_symbols)

    Module Traverse_for_exported_symbols

    type symbols_to_export = {
    1. symbols : Symbol.Set.t;
    2. export_ids : Export_id.Set.t;
    3. set_of_closure_ids : Set_of_closures_id.Set.t;
    4. set_of_closure_ids_keep_declaration : Set_of_closures_id.Set.t;
    5. relevant_imported_closure_ids : Closure_id.Set.t;
    6. relevant_local_closure_ids : Closure_id.Set.t;
    7. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
    8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
    }
    val traverse : - sets_of_closures_map:Flambda.set_of_closures Set_of_closures_id.Map.t -> - closure_id_to_set_of_closures_id:Set_of_closures_id.t Closure_id.Map.t -> - function_declarations_map: +Traverse_for_exported_symbols (ocaml.Traverse_for_exported_symbols)

    Module Traverse_for_exported_symbols

    type symbols_to_export = {
    1. symbols : Symbol.Set.t;
    2. export_ids : Export_id.Set.t;
    3. set_of_closure_ids : Set_of_closures_id.Set.t;
    4. set_of_closure_ids_keep_declaration : Set_of_closures_id.Set.t;
    5. relevant_imported_closure_ids : Closure_id.Set.t;
    6. relevant_local_closure_ids : Closure_id.Set.t;
    7. relevant_imported_vars_within_closure : Var_within_closure.Set.t;
    8. relevant_local_vars_within_closure : Var_within_closure.Set.t;
    }
    val traverse : + sets_of_closures_map:Flambda.set_of_closures Set_of_closures_id.Map.t -> + closure_id_to_set_of_closures_id:Set_of_closures_id.t Closure_id.Map.t -> + function_declarations_map: Simple_value_approx.function_declarations Set_of_closures_id.Map.t -> - values:Export_info.descr Export_id.Map.t -> - symbol_id:Export_id.t Symbol.Map.t -> - root_symbol:Symbol.t -> - symbols_to_export

    Computes the transitive closure in Symbol.t, Closure_id.t and Set_of_closures_id.t and determines which ones of those should be exported (i.e: included in the cmx files). *

    \ No newline at end of file + values:Export_info.descr Export_id.Map.t -> + symbol_id:Export_id.t Symbol.Map.t -> + root_symbol:Symbol.t -> + symbols_to_export

    Computes the transitive closure in Symbol.t, Closure_id.t and Set_of_closures_id.t and determines which ones of those should be exported (i.e: included in the cmx files). *

    diff --git a/ocaml/Type_immediacy/Violation/index.html b/ocaml/Type_immediacy/Violation/index.html index 98cb676..3173c95 100644 --- a/ocaml/Type_immediacy/Violation/index.html +++ b/ocaml/Type_immediacy/Violation/index.html @@ -1,2 +1,2 @@ -Violation (ocaml.Type_immediacy.Violation)

    Module Type_immediacy.Violation

    type t =
    1. | Not_always_immediate
    2. | Not_always_immediate_on_64bits
    \ No newline at end of file +Violation (ocaml.Type_immediacy.Violation)

    Module Type_immediacy.Violation

    type t =
    1. | Not_always_immediate
    2. | Not_always_immediate_on_64bits
    diff --git a/ocaml/Type_immediacy/index.html b/ocaml/Type_immediacy/index.html index 3a0a0c7..1614ad4 100644 --- a/ocaml/Type_immediacy/index.html +++ b/ocaml/Type_immediacy/index.html @@ -1,2 +1,2 @@ -Type_immediacy (ocaml.Type_immediacy)

    Module Type_immediacy

    Immediacy status of a type

    type t =
    1. | Unknown
      (*

      We don't know anything

      *)
    2. | Always
      (*

      We know for sure that values of this type are always immediate

      *)
    3. | Always_on_64bits
      (*

      We know for sure that values of this type are always immediate on 64 bit platforms. For other platforms, we know nothing.

      *)
    module Violation : sig ... end
    val coerce : t -> as_:t -> (unit, Violation.t) result

    coerce t ~as_ returns Ok () iff t can be seen as type immediacy as_. For instance, Always can be seen as Always_on_64bits but the opposite is not true. Return Error _ if the coercion is not possible.

    val of_attributes : Parsetree.attributes -> t

    Return the immediateness of a type as indicated by the user via attributes

    \ No newline at end of file +Type_immediacy (ocaml.Type_immediacy)

    Module Type_immediacy

    Immediacy status of a type

    type t =
    1. | Unknown
      (*

      We don't know anything

      *)
    2. | Always
      (*

      We know for sure that values of this type are always immediate

      *)
    3. | Always_on_64bits
      (*

      We know for sure that values of this type are always immediate on 64 bit platforms. For other platforms, we know nothing.

      *)
    module Violation : sig ... end
    val coerce : t -> as_:t -> (unit, Violation.t) result

    coerce t ~as_ returns Ok () iff t can be seen as type immediacy as_. For instance, Always can be seen as Always_on_64bits but the opposite is not true. Return Error _ if the coercion is not possible.

    val of_attributes : Parsetree.attributes -> t

    Return the immediateness of a type as indicated by the user via attributes

    diff --git a/ocaml/Typeclass/index.html b/ocaml/Typeclass/index.html index f13daeb..c6b8e6c 100644 --- a/ocaml/Typeclass/index.html +++ b/ocaml/Typeclass/index.html @@ -1,5 +1,5 @@ -Typeclass (ocaml.Typeclass)

    Module Typeclass

    type 'a class_info = {
    1. cls_id : Ident.t;
    2. cls_id_loc : string Asttypes.loc;
    3. cls_decl : Types.class_declaration;
    4. cls_ty_id : Ident.t;
    5. cls_ty_decl : Types.class_type_declaration;
    6. cls_obj_id : Ident.t;
    7. cls_obj_abbr : Types.type_declaration;
    8. cls_abbr : Types.type_declaration;
    9. cls_arity : int;
    10. cls_pub_methods : string list;
    11. cls_info : 'a;
    }
    type class_type_info = {
    1. clsty_ty_id : Ident.t;
    2. clsty_id_loc : string Asttypes.loc;
    3. clsty_ty_decl : Types.class_type_declaration;
    4. clsty_obj_id : Ident.t;
    5. clsty_obj_abbr : Types.type_declaration;
    6. clsty_abbr : Types.type_declaration;
    7. clsty_info : Typedtree.class_type_declaration;
    }
    val class_declarations : +Typeclass (ocaml.Typeclass)

    Module Typeclass

    type 'a class_info = {
    1. cls_id : Ident.t;
    2. cls_id_loc : string Asttypes.loc;
    3. cls_decl : Types.class_declaration;
    4. cls_ty_id : Ident.t;
    5. cls_ty_decl : Types.class_type_declaration;
    6. cls_obj_id : Ident.t;
    7. cls_obj_abbr : Types.type_declaration;
    8. cls_abbr : Types.type_declaration;
    9. cls_arity : int;
    10. cls_pub_methods : string list;
    11. cls_info : 'a;
    }
    type class_type_info = {
    1. clsty_ty_id : Ident.t;
    2. clsty_id_loc : string Asttypes.loc;
    3. clsty_ty_decl : Types.class_type_declaration;
    4. clsty_obj_id : Ident.t;
    5. clsty_obj_abbr : Types.type_declaration;
    6. clsty_abbr : Types.type_declaration;
    7. clsty_info : Typedtree.class_type_declaration;
    }
    val class_descriptions : @@ -18,8 +18,8 @@ * Ctype.closed_class_failure
  • | Non_generalizable_class of {
    1. id : Ident.t;
    2. clty : Types.class_declaration;
    3. nongen_vars : Types.type_expr list;
    }
  • | Cannot_coerce_self of Types.type_expr
  • | Non_collapsable_conjunction of Ident.t * Types.class_declaration * Errortrace.unification_error
  • | Self_clash of Errortrace.unification_error
  • | Mutability_mismatch of string * Asttypes.mutable_flag
  • | No_overriding of string * string
  • | Duplicate of string * string
  • | Closing_self_type of Types.class_signature
  • exception Error of Location.t * Env.t * error
    exception Error_forward of Location.error
    val report_error : Env.t -> Stdlib.Format.formatter -> error -> unit
    val type_open_descr : - (?used_slot:bool ref -> + (?used_slot:bool ref -> Env.t -> Parsetree.open_description -> Typedtree.open_description * Env.t) - ref
    \ No newline at end of file + ref
    diff --git a/ocaml/Typecore/Datatype_kind/index.html b/ocaml/Typecore/Datatype_kind/index.html index fa41158..6dc4764 100644 --- a/ocaml/Typecore/Datatype_kind/index.html +++ b/ocaml/Typecore/Datatype_kind/index.html @@ -1,2 +1,2 @@ -Datatype_kind (ocaml.Typecore.Datatype_kind)

    Module Typecore.Datatype_kind

    type t =
    1. | Record
    2. | Variant
    val type_name : t -> string
    val label_name : t -> string
    \ No newline at end of file +Datatype_kind (ocaml.Typecore.Datatype_kind)

    Module Typecore.Datatype_kind

    type t =
    1. | Record
    2. | Variant
    val type_name : t -> string
    val label_name : t -> string
    diff --git a/ocaml/Typecore/index.html b/ocaml/Typecore/index.html index 48f58b2..3361688 100644 --- a/ocaml/Typecore/index.html +++ b/ocaml/Typecore/index.html @@ -1,6 +1,6 @@ -Typecore (ocaml.Typecore)

    Module Typecore

    type type_forcing_context =
    1. | If_conditional
    2. | If_no_else_branch
    3. | While_loop_conditional
    4. | While_loop_body
    5. | For_loop_start_index
    6. | For_loop_stop_index
    7. | For_loop_body
    8. | Assert_condition
    9. | Sequence_left_hand_side
    10. | When_guard
    type type_expected = private {
    1. ty : Types.type_expr;
    2. explanation : type_forcing_context option;
    }
    type pattern_variable = {
    1. pv_id : Ident.t;
    2. pv_type : Types.type_expr;
    3. pv_loc : Location.t;
    4. pv_as_var : bool;
    5. pv_attributes : Typedtree.attributes;
    }
    val mk_expected : - ?explanation:type_forcing_context -> +Typecore (ocaml.Typecore)

    Module Typecore

    type type_forcing_context =
    1. | If_conditional
    2. | If_no_else_branch
    3. | While_loop_conditional
    4. | While_loop_body
    5. | For_loop_start_index
    6. | For_loop_stop_index
    7. | For_loop_body
    8. | Assert_condition
    9. | Sequence_left_hand_side
    10. | When_guard
    type type_expected = private {
    1. ty : Types.type_expr;
    2. explanation : type_forcing_context option;
    }
    type pattern_variable = {
    1. pv_id : Ident.t;
    2. pv_type : Types.type_expr;
    3. pv_loc : Location.t;
    4. pv_as_var : bool;
    5. pv_attributes : Typedtree.attributes;
    }
    val mk_expected : + ?explanation:type_forcing_context -> Types.type_expr -> type_expected
    val is_nonexpansive : Typedtree.expression -> bool
    module Datatype_kind : sig ... end
    type wrong_name = {
    1. type_path : Path.t;
    2. kind : Datatype_kind.t;
    3. name : string Asttypes.loc;
    4. valid_names : string list;
    }
    type wrong_kind_context =
    1. | Pattern
    2. | Expression of type_forcing_context option
    type wrong_kind_sort =
    1. | Constructor
    2. | Record
    3. | Boolean
    4. | List
    5. | Unit
    type existential_restriction =
    1. | At_toplevel
      (*

      no existential types at the toplevel

      *)
    2. | In_group
      (*

      nor with let ... and ...

      *)
    3. | In_rec
      (*

      or recursive definition

      *)
    4. | With_attributes
      (*

      or let[@any_attribute] = ...

      *)
    5. | In_class_args
      (*

      or in class arguments class c (...) = ...

      *)
    6. | In_class_def
      (*

      or in class c = let ... in ...

      *)
    7. | In_self_pattern
      (*

      or in self pattern

      *)
    type module_patterns_restriction =
    1. | Modules_allowed of {
      1. scope : int;
      }
    2. | Modules_rejected
    val type_binding : Env.t -> @@ -24,14 +24,14 @@ Env.t -> Parsetree.pattern -> Typedtree.pattern * pattern_variable list
    val check_partial : - ?lev:int -> + ?lev:int -> module_patterns_restriction -> Env.t -> Types.type_expr -> Location.t -> Typedtree.value Typedtree.case list -> Typedtree.partial
    val type_expect : - ?in_function:(Location.t * Types.type_expr) -> + ?in_function:(Location.t * Types.type_expr) -> Env.t -> Parsetree.expression -> type_expected -> @@ -52,16 +52,16 @@ * Path.t * Path.t * (Path.t * Path.t) list
  • | Invalid_format of string
  • | Not_an_object of Types.type_expr * type_forcing_context option
  • | Undefined_method of Types.type_expr * string * string list option
  • | Undefined_self_method of string * string list
  • | Virtual_class of Longident.t
  • | Private_type of Types.type_expr
  • | Private_label of Longident.t * Types.type_expr
  • | Private_constructor of Types.constructor_description * Types.type_expr
  • | Unbound_instance_variable of string * string list
  • | Instance_variable_not_mutable of string
  • | Not_subtype of Errortrace.Subtype.error
  • | Outside_class
  • | Value_multiply_overridden of string
  • | Coercion_failure of Errortrace.expanded_type * Errortrace.unification_error - * bool
  • | Not_a_function of Types.type_expr * type_forcing_context option
  • | Too_many_arguments of Types.type_expr * type_forcing_context option
  • | Abstract_wrong_label of {
    1. got : Asttypes.arg_label;
    2. expected : Asttypes.arg_label;
    3. expected_type : Types.type_expr;
    4. explanation : type_forcing_context option;
    }
  • | Scoping_let_module of string * Types.type_expr
  • | Not_a_polymorphic_variant_type of Longident.t
  • | Incoherent_label_order
  • | Less_general of string * Errortrace.unification_error
  • | Modules_not_allowed
  • | Cannot_infer_signature
  • | Not_a_packed_module of Types.type_expr
  • | Unexpected_existential of existential_restriction * string * string list
  • | Invalid_interval
  • | Invalid_for_loop_index
  • | No_value_clauses
  • | Exception_pattern_disallowed
  • | Mixed_value_and_exception_patterns_under_guard
  • | Inlined_record_escape
  • | Inlined_record_expected
  • | Unrefuted_pattern of Typedtree.pattern
  • | Invalid_extension_constructor_payload
  • | Not_an_extension_constructor
  • | Literal_overflow of string
  • | Unknown_literal of string * char
  • | Illegal_letrec_pat
  • | Illegal_letrec_expr
  • | Illegal_class_expr
  • | Letop_type_clash of string * Errortrace.unification_error
  • | Andop_type_clash of string * Errortrace.unification_error
  • | Bindings_type_clash of Errortrace.unification_error
  • | Unbound_existential of Ident.t list * Types.type_expr
  • | Missing_type_constraint
  • | Wrong_expected_kind of wrong_kind_sort * wrong_kind_context * Types.type_expr
  • | Expr_not_a_record_type of Types.type_expr
  • exception Error of Location.t * Env.t * error
    exception Error_forward of Location.error
    val report_error : loc:Location.t -> Env.t -> error -> Location.error
    val type_module : + * bool
  • | Not_a_function of Types.type_expr * type_forcing_context option
  • | Too_many_arguments of Types.type_expr * type_forcing_context option
  • | Abstract_wrong_label of {
    1. got : Asttypes.arg_label;
    2. expected : Asttypes.arg_label;
    3. expected_type : Types.type_expr;
    4. explanation : type_forcing_context option;
    }
  • | Scoping_let_module of string * Types.type_expr
  • | Not_a_polymorphic_variant_type of Longident.t
  • | Incoherent_label_order
  • | Less_general of string * Errortrace.unification_error
  • | Modules_not_allowed
  • | Cannot_infer_signature
  • | Not_a_packed_module of Types.type_expr
  • | Unexpected_existential of existential_restriction * string * string list
  • | Invalid_interval
  • | Invalid_for_loop_index
  • | No_value_clauses
  • | Exception_pattern_disallowed
  • | Mixed_value_and_exception_patterns_under_guard
  • | Inlined_record_escape
  • | Inlined_record_expected
  • | Unrefuted_pattern of Typedtree.pattern
  • | Invalid_extension_constructor_payload
  • | Not_an_extension_constructor
  • | Literal_overflow of string
  • | Unknown_literal of string * char
  • | Illegal_letrec_pat
  • | Illegal_letrec_expr
  • | Illegal_class_expr
  • | Letop_type_clash of string * Errortrace.unification_error
  • | Andop_type_clash of string * Errortrace.unification_error
  • | Bindings_type_clash of Errortrace.unification_error
  • | Unbound_existential of Ident.t list * Types.type_expr
  • | Missing_type_constraint
  • | Wrong_expected_kind of wrong_kind_sort * wrong_kind_context * Types.type_expr
  • | Expr_not_a_record_type of Types.type_expr
  • exception Error of Location.t * Env.t * error
    exception Error_forward of Location.error
    val report_error : loc:Location.t -> Env.t -> error -> Location.error
    val type_open : - (?used_slot:bool ref -> + (?used_slot:bool ref -> Asttypes.override_flag -> Env.t -> Location.t -> Longident.t Asttypes.loc -> Path.t * Env.t) ref
    val type_open_decl : - (?used_slot:bool ref -> + (?used_slot:bool ref -> Env.t -> Parsetree.open_declaration -> Typedtree.open_declaration * Types.signature * Env.t) @@ -80,4 +80,4 @@ Env.t -> Ident.t list -> Typedtree.class_expr list -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Typedecl/index.html b/ocaml/Typedecl/index.html index 17845c4..cbba5ce 100644 --- a/ocaml/Typedecl/index.html +++ b/ocaml/Typedecl/index.html @@ -1,5 +1,5 @@ -Typedecl (ocaml.Typedecl)

    Module Typedecl

    val transl_type_decl : +Typedecl (ocaml.Typedecl)

    Module Typedecl

    val transl_with_constraint : Ident.t -> - ?fixed_row_path:Path.t -> - sig_env:Env.t -> - sig_decl:Types.type_declaration -> - outer_env:Env.t -> + ?fixed_row_path:Path.t -> + sig_env:Env.t -> + sig_decl:Types.type_declaration -> + outer_env:Env.t -> Parsetree.type_declaration -> - Typedtree.type_declaration
    val abstract_type_decl : injective:bool -> int -> Types.type_declaration
    val approx_type_decl : + Typedtree.type_declaration
    val abstract_type_decl : injective:bool -> int -> Types.type_declaration
    val approx_type_decl : Parsetree.type_declaration list -> (Ident.t * Types.type_declaration) list
    val check_recmod_typedecl : Env.t -> @@ -40,4 +40,4 @@ Types.type_declaration -> unit
    val is_fixed_type : Parsetree.type_declaration -> bool
    type native_repr_kind =
    1. | Unboxed
    2. | Untagged
    type reaching_type_path = reaching_type_step list
    and reaching_type_step =
    1. | Expands_to of Types.type_expr * Types.type_expr
    2. | Contains of Types.type_expr * Types.type_expr
    type error =
    1. | Repeated_parameter
    2. | Duplicate_constructor of string
    3. | Too_many_constructors
    4. | Duplicate_label of string
    5. | Recursive_abbrev of string * Env.t * reaching_type_path
    6. | Cycle_in_def of string * Env.t * reaching_type_path
    7. | Definition_mismatch of Types.type_expr * Env.t - * Includecore.type_mismatch option
    8. | Constraint_failed of Env.t * Errortrace.unification_error
    9. | Inconsistent_constraint of Env.t * Errortrace.unification_error
    10. | Type_clash of Env.t * Errortrace.unification_error
    11. | Non_regular of {
      1. definition : Path.t;
      2. used_as : Types.type_expr;
      3. defined_as : Types.type_expr;
      4. reaching_path : reaching_type_path;
      }
    12. | Null_arity_external
    13. | Missing_native_external
    14. | Unbound_type_var of Types.type_expr * Types.type_declaration
    15. | Cannot_extend_private_type of Path.t
    16. | Not_extensible_type of Path.t
    17. | Extension_mismatch of Path.t * Env.t * Includecore.type_mismatch
    18. | Rebind_wrong_type of Longident.t * Env.t * Errortrace.unification_error
    19. | Rebind_mismatch of Longident.t * Path.t * Path.t
    20. | Rebind_private of Longident.t
    21. | Variance of Typedecl_variance.error
    22. | Unavailable_type_constructor of Path.t
    23. | Unbound_type_var_ext of Types.type_expr * Types.extension_constructor
    24. | Val_in_structure
    25. | Multiple_native_repr_attributes
    26. | Cannot_unbox_or_untag_type of native_repr_kind
    27. | Deep_unbox_or_untag_attribute of native_repr_kind
    28. | Immediacy of Typedecl_immediacy.error
    29. | Separability of Typedecl_separability.error
    30. | Bad_unboxed_attribute of string
    31. | Boxed_and_unboxed
    32. | Nonrec_gadt
    33. | Invalid_private_row_declaration of Types.type_expr
    exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    \ No newline at end of file + * Includecore.type_mismatch option
  • | Constraint_failed of Env.t * Errortrace.unification_error
  • | Inconsistent_constraint of Env.t * Errortrace.unification_error
  • | Type_clash of Env.t * Errortrace.unification_error
  • | Non_regular of {
    1. definition : Path.t;
    2. used_as : Types.type_expr;
    3. defined_as : Types.type_expr;
    4. reaching_path : reaching_type_path;
    }
  • | Null_arity_external
  • | Missing_native_external
  • | Unbound_type_var of Types.type_expr * Types.type_declaration
  • | Cannot_extend_private_type of Path.t
  • | Not_extensible_type of Path.t
  • | Extension_mismatch of Path.t * Env.t * Includecore.type_mismatch
  • | Rebind_wrong_type of Longident.t * Env.t * Errortrace.unification_error
  • | Rebind_mismatch of Longident.t * Path.t * Path.t
  • | Rebind_private of Longident.t
  • | Variance of Typedecl_variance.error
  • | Unavailable_type_constructor of Path.t
  • | Unbound_type_var_ext of Types.type_expr * Types.extension_constructor
  • | Val_in_structure
  • | Multiple_native_repr_attributes
  • | Cannot_unbox_or_untag_type of native_repr_kind
  • | Deep_unbox_or_untag_attribute of native_repr_kind
  • | Immediacy of Typedecl_immediacy.error
  • | Separability of Typedecl_separability.error
  • | Bad_unboxed_attribute of string
  • | Boxed_and_unboxed
  • | Nonrec_gadt
  • | Invalid_private_row_declaration of Types.type_expr
  • exception Error of Location.t * error
    val report_error : Stdlib.Format.formatter -> error -> unit
    diff --git a/ocaml/Typedecl_immediacy/index.html b/ocaml/Typedecl_immediacy/index.html index 4305d2e..2bdb920 100644 --- a/ocaml/Typedecl_immediacy/index.html +++ b/ocaml/Typedecl_immediacy/index.html @@ -1,5 +1,5 @@ -Typedecl_immediacy (ocaml.Typedecl_immediacy)

    Module Typedecl_immediacy

    type error =
    1. | Bad_immediacy_attribute of Type_immediacy.Violation.t
    exception Error of Location.t * error
    val update_decls : +Typedecl_immediacy (ocaml.Typedecl_immediacy)

    Module Typedecl_immediacy

    type error =
    1. | Bad_immediacy_attribute of Type_immediacy.Violation.t
    exception Error of Location.t * error
    val update_decls : Env.t -> (Ident.t * Typedecl_properties.decl) list -> - (Ident.t * Typedecl_properties.decl) list
    \ No newline at end of file + (Ident.t * Typedecl_properties.decl) list
    diff --git a/ocaml/Typedecl_properties/index.html b/ocaml/Typedecl_properties/index.html index 76e98b3..e6cb5e4 100644 --- a/ocaml/Typedecl_properties/index.html +++ b/ocaml/Typedecl_properties/index.html @@ -1,5 +1,5 @@ -Typedecl_properties (ocaml.Typedecl_properties)

    Module Typedecl_properties

    An abstract interface for properties of type definitions, such as variance and immediacy, that are computed by a fixpoint on mutually-recursive type declarations. This interface contains all the operations needed to initialize and run the fixpoint computation, and then (optionally) check that the result is consistent with the declaration or user expectations.

    type ('prop, 'req) property = {
    1. eq : 'prop -> 'prop -> bool;
    2. merge : prop:'prop -> new_prop:'prop -> 'prop;
    3. default : decl -> 'prop;
    4. compute : Env.t -> decl -> 'req -> 'prop;
    5. update_decl : decl -> 'prop -> decl;
    6. check : Env.t -> Ident.t -> decl -> 'req -> unit;
    }

    'prop represents the type of property values (Types.Variance.t, just 'bool' for immediacy, etc).

    'req represents the property value required by the author of the declaration, if they gave an expectation: type +'a t = ....

    Some properties have no natural notion of user requirement, or their requirement is global, or already stored in type_declaration; they can just use unit as 'req parameter.

    val compute_property : +Typedecl_properties (ocaml.Typedecl_properties)

    Module Typedecl_properties

    An abstract interface for properties of type definitions, such as variance and immediacy, that are computed by a fixpoint on mutually-recursive type declarations. This interface contains all the operations needed to initialize and run the fixpoint computation, and then (optionally) check that the result is consistent with the declaration or user expectations.

    type ('prop, 'req) property = {
    1. eq : 'prop -> 'prop -> bool;
    2. merge : prop:'prop -> new_prop:'prop -> 'prop;
    3. default : decl -> 'prop;
    4. compute : Env.t -> decl -> 'req -> 'prop;
    5. update_decl : decl -> 'prop -> decl;
    6. check : Env.t -> Ident.t -> decl -> 'req -> unit;
    }

    'prop represents the type of property values (Types.Variance.t, just 'bool' for immediacy, etc).

    'req represents the property value required by the author of the declaration, if they gave an expectation: type +'a t = ....

    Some properties have no natural notion of user requirement, or their requirement is global, or already stored in type_declaration; they can just use unit as 'req parameter.

    val compute_property : ('prop, 'req) property -> Env.t -> (Ident.t * decl) list -> @@ -8,4 +8,4 @@ ('prop, unit) property -> Env.t -> (Ident.t * decl) list -> - (Ident.t * decl) list
    \ No newline at end of file + (Ident.t * decl) list
    diff --git a/ocaml/Typedecl_separability/index.html b/ocaml/Typedecl_separability/index.html index 9e8b398..72e94c6 100644 --- a/ocaml/Typedecl_separability/index.html +++ b/ocaml/Typedecl_separability/index.html @@ -1,7 +1,6 @@ -Typedecl_separability (ocaml.Typedecl_separability)

    Module Typedecl_separability

    The OCaml runtime assumes for type-directed optimizations that all types are "separable". A type is "separable" if either all its inhabitants (the values of this type) are floating-point numbers, or none of them are.

    (Note: This assumption is required for the dynamic float array optimization; it is only made if Config.flat_float_array is set, otherwise the code in this module becomes trivial -- see compute_decl.)

    This soundness requirement could be broken by type declarations mixing existentials and the "@@unboxed" annotation. Consider the declaration

    type any = Any : 'a -> any [@@unboxed]

    which corresponds to the existential type "exists a. a". If this type is allowed to be unboxed, then it is inhabited by both float values and non-float values. On the contrary, if unboxing is disallowed, the inhabitants are all blocks with the Any constructors pointing to its parameter: they may point to a float, but they are not floats.

    The present module contains a static analysis ensuring that declarations annotated with "@@unboxed" can be safely unboxed. The idea is to check the "separability" (in the above sense) of the argument type that would be unboxed, and reject the unboxed declaration if it would create a non-separable type.

    Checking mutually-recursive type declarations is a bit subtle. Consider, for example, the following declarations.

    type foo = Foo : 'a t -> foo   [@@unboxed]
    -and 'a t = ...

    Deciding whether the type foo should be accepted requires inspecting the declaration of 'a t, which may itself refer to foo in turn. In general, the analysis performs a fixpoint computation. It is somewhat similar to what is done for inferring the variance of type parameters.

    Our analysis is defined using inference rules for our judgment Def; Gamma |- t : m, in which a type expression t is checked against a "mode" m. This "mode" describes the separability requirement on the type expression (see below for more details). The mode Gamma maps type variables to modes and Def records the "mode signature" of the mutually-recursive type declarations that are being checked.

    The "mode signature" of a type with parameters ('a, 'b) t is of the form ('a : m1, 'b : m2) t, where m1 and m2 are modes. Its meaning is the following: a concrete instance (foo, bar) t of the type is separable if foo has mode m1 and bar has mode m2.

    type error =
    1. | Non_separable_evar of string option
    exception Error of Location.t * error

    Exception raised when a type declaration is not separable, or when its separability cannot be established.

    type mode = Types.Separability.t =
    1. | Ind
    2. | Sep
    3. | Deepsep
      (*

      The mode Sep ("separable") characterizes types that are indeed separable: either they only contain floating-point values, or none of the values at this type are floating-point values. On a type parameter, it indicates that this parameter must be separable for the whole type definition to be separable. For example, the mode signature for the type declaration type 'a - t = 'a is ('a : Sep) t. For the right-hand side to be separable, the parameter 'a must be separable.

      The mode Ind ("indifferent") characterizes any type -- separable or not. On a type parameter, it indicates that this parameter needs not be separable for the whole type definition to be separable. For example, type 'a t = 'a * bool does not require its parameter 'a to be separable as 'a * bool can never contain float values. Its mode signature is thus ('a : Ind) t.

      Finally, the mode Deepsep ("deeply separable") characterizes types that are separable, and whose type sub-expressions are also separable. This advanced feature is only used in the presence of constraints. For example, type 'a t = 'b constraint 'a = 'b * bool may not be separable even if 'a is (its separately depends on 'b, a fragment of 'a), so its mode signature is ('a : Deepsep) t.

      The different modes are ordered as Ind < Sep < Deepsep (from the least demanding to the most demanding).

      *)
    val compute_decl : Env.t -> Types.type_declaration -> mode list

    compute_decl env def returns the signature required for the type definition def in the typing environment env -- including signatures for the current recursive block.

    The Error exception is raised if no such signature exists -- the definition will always be invalid. This only happens when the definition is marked to be unboxed.

    Variant (or record) declarations that are not marked with the "@@unboxed" annotation, including those that contain several variants (or labels), are always separable. In particular, their mode signatures do not require anything of their type parameters, which are marked Ind.

    Finally, if Config.flat_float_array is not set, then separability is not required anymore; we just use Ind as the mode of each parameter without any check.

    Property interface (see Typedecl_properties). These functions rely on compute_decl and raise the Error exception on error.

    val property : (prop, unit) Typedecl_properties.property
    val update_decls : +Typedecl_separability (ocaml.Typedecl_separability)

    Module Typedecl_separability

    The OCaml runtime assumes for type-directed optimizations that all types are "separable". A type is "separable" if either all its inhabitants (the values of this type) are floating-point numbers, or none of them are.

    (Note: This assumption is required for the dynamic float array optimization; it is only made if Config.flat_float_array is set, otherwise the code in this module becomes trivial -- see compute_decl.)

    This soundness requirement could be broken by type declarations mixing existentials and the "@@unboxed" annotation. Consider the declaration

       type any = Any : 'a -> any [@@unboxed]

    which corresponds to the existential type "exists a. a". If this type is allowed to be unboxed, then it is inhabited by both float values and non-float values. On the contrary, if unboxing is disallowed, the inhabitants are all blocks with the Any constructors pointing to its parameter: they may point to a float, but they are not floats.

    The present module contains a static analysis ensuring that declarations annotated with "@@unboxed" can be safely unboxed. The idea is to check the "separability" (in the above sense) of the argument type that would be unboxed, and reject the unboxed declaration if it would create a non-separable type.

    Checking mutually-recursive type declarations is a bit subtle. Consider, for example, the following declarations.

       type foo = Foo : 'a t -> foo   [@@unboxed]
    +   and 'a t = ...

    Deciding whether the type foo should be accepted requires inspecting the declaration of 'a t, which may itself refer to foo in turn. In general, the analysis performs a fixpoint computation. It is somewhat similar to what is done for inferring the variance of type parameters.

    Our analysis is defined using inference rules for our judgment Def; Gamma |- t : m, in which a type expression t is checked against a "mode" m. This "mode" describes the separability requirement on the type expression (see below for more details). The mode Gamma maps type variables to modes and Def records the "mode signature" of the mutually-recursive type declarations that are being checked.

    The "mode signature" of a type with parameters ('a, 'b) t is of the form ('a : m1, 'b : m2) t, where m1 and m2 are modes. Its meaning is the following: a concrete instance (foo, bar) t of the type is separable if foo has mode m1 and bar has mode m2.

    type error =
    1. | Non_separable_evar of string option
    exception Error of Location.t * error

    Exception raised when a type declaration is not separable, or when its separability cannot be established.

    type mode = Types.Separability.t =
    1. | Ind
    2. | Sep
    3. | Deepsep
      (*

      The mode Sep ("separable") characterizes types that are indeed separable: either they only contain floating-point values, or none of the values at this type are floating-point values. On a type parameter, it indicates that this parameter must be separable for the whole type definition to be separable. For example, the mode signature for the type declaration type 'a t = 'a is ('a : Sep) t. For the right-hand side to be separable, the parameter 'a must be separable.

      The mode Ind ("indifferent") characterizes any type -- separable or not. On a type parameter, it indicates that this parameter needs not be separable for the whole type definition to be separable. For example, type 'a t = 'a * bool does not require its parameter 'a to be separable as 'a * bool can never contain float values. Its mode signature is thus ('a : Ind) t.

      Finally, the mode Deepsep ("deeply separable") characterizes types that are separable, and whose type sub-expressions are also separable. This advanced feature is only used in the presence of constraints. For example, type 'a t = 'b constraint 'a = 'b * bool may not be separable even if 'a is (its separately depends on 'b, a fragment of 'a), so its mode signature is ('a : Deepsep) t.

      The different modes are ordered as Ind < Sep < Deepsep (from the least demanding to the most demanding).

      *)
    val compute_decl : Env.t -> Types.type_declaration -> mode list

    compute_decl env def returns the signature required for the type definition def in the typing environment env -- including signatures for the current recursive block.

    The Error exception is raised if no such signature exists -- the definition will always be invalid. This only happens when the definition is marked to be unboxed.

    Variant (or record) declarations that are not marked with the "@@unboxed" annotation, including those that contain several variants (or labels), are always separable. In particular, their mode signatures do not require anything of their type parameters, which are marked Ind.

    Finally, if Config.flat_float_array is not set, then separability is not required anymore; we just use Ind as the mode of each parameter without any check.

    Property interface (see Typedecl_properties). These functions rely on compute_decl and raise the Error exception on error.

    val property : (prop, unit) Typedecl_properties.property
    val update_decls : Env.t -> (Ident.t * Typedecl_properties.decl) list -> - (Ident.t * Typedecl_properties.decl) list
    \ No newline at end of file + (Ident.t * Typedecl_properties.decl) list
    diff --git a/ocaml/Typedecl_unboxed/index.html b/ocaml/Typedecl_unboxed/index.html index acd6595..8880cd7 100644 --- a/ocaml/Typedecl_unboxed/index.html +++ b/ocaml/Typedecl_unboxed/index.html @@ -1,5 +1,5 @@ -Typedecl_unboxed (ocaml.Typedecl_unboxed)

    Module Typedecl_unboxed

    val get_unboxed_type_representation : +Typedecl_unboxed (ocaml.Typedecl_unboxed)

    Module Typedecl_unboxed

    val get_unboxed_type_representation : Env.t -> Types.type_expr -> - Types.type_expr option
    \ No newline at end of file + Types.type_expr option
    diff --git a/ocaml/Typedecl_variance/index.html b/ocaml/Typedecl_variance/index.html index c9e482c..323de34 100644 --- a/ocaml/Typedecl_variance/index.html +++ b/ocaml/Typedecl_variance/index.html @@ -1,5 +1,5 @@ -Typedecl_variance (ocaml.Typedecl_variance)

    Module Typedecl_variance

    type surface_variance = bool * bool * bool
    val variance_of_params : +Typedecl_variance (ocaml.Typedecl_variance)

    Module Typedecl_variance

    type surface_variance = bool * bool * bool
    val variance_of_params : (Parsetree.core_type * (Asttypes.variance * Asttypes.injectivity)) list -> surface_variance list
    val variance_of_sdecl : Parsetree.type_declaration -> surface_variance list
    type prop = Types.Variance.t list
    type req = surface_variance list
    type variance_variable_context =
    1. | Type_declaration of Ident.t * Types.type_declaration
    2. | Gadt_constructor of Types.constructor_declaration
    3. | Extension_constructor of Ident.t * Types.extension_constructor
    type variance_variable_error =
    1. | No_variable
    2. | Variance_not_reflected
    3. | Variance_not_deducible
    type variance_error =
    1. | Variance_not_satisfied of int
    2. | Variance_variable_error of {
      1. error : variance_variable_error;
      2. context : variance_variable_context;
      3. variable : Types.type_expr;
      }
    type error =
    1. | Bad_variance of variance_error * surface_variance * surface_variance
    2. | Varying_anonymous
    exception Error of Location.t * error
    val check_variance_extension : Env.t -> @@ -8,7 +8,7 @@ (req * Location.t) -> unit
    val compute_decl : Env.t -> - check:Ident.t option -> + check:Ident.t option -> Types.type_declaration -> req -> prop
    val update_decls : @@ -26,4 +26,4 @@ (Typedecl_properties.decl * Types.class_declaration * Types.class_type_declaration) - list
    \ No newline at end of file + list
    diff --git a/ocaml/Typedtree/index.html b/ocaml/Typedtree/index.html index 4c2401f..29964d3 100644 --- a/ocaml/Typedtree/index.html +++ b/ocaml/Typedtree/index.html @@ -1,5 +1,5 @@ -Typedtree (ocaml.Typedtree)

    Module Typedtree

    Abstract syntax tree after typing

    By comparison with Parsetree:

    • Every Longindent.t is accompanied by a resolved Path.t.
    type partial =
    1. | Partial
    2. | Total

    Extension points

    type attribute = Parsetree.attribute
    type attributes = attribute list

    Core language

    type value =
    1. | Value_pattern
    type computation =
    1. | Computation_pattern
    type _ pattern_category =
    1. | Value : value pattern_category
    2. | Computation : computation pattern_category
    type pattern = value general_pattern
    and 'k general_pattern = 'k pattern_desc pattern_data
    and 'a pattern_data = {
    1. pat_desc : 'a;
    2. pat_loc : Location.t;
    3. pat_extra : (pat_extra * Location.t * attributes) list;
    4. pat_type : Types.type_expr;
    5. pat_env : Env.t;
    6. pat_attributes : attributes;
    }
    and pat_extra =
    1. | Tpat_constraint of core_type
      (*

      P : T pat_desc = P +Typedtree (ocaml.Typedtree)

      Module Typedtree

      Abstract syntax tree after typing

      By comparison with Parsetree:

      • Every Longindent.t is accompanied by a resolved Path.t.
      type partial =
      1. | Partial
      2. | Total

      Extension points

      type attribute = Parsetree.attribute
      type attributes = attribute list

      Core language

      type value =
      1. | Value_pattern
      type computation =
      1. | Computation_pattern
      type _ pattern_category =
      1. | Value : value pattern_category
      2. | Computation : computation pattern_category
      type pattern = value general_pattern
      and 'k general_pattern = 'k pattern_desc pattern_data
      and 'a pattern_data = {
      1. pat_desc : 'a;
      2. pat_loc : Location.t;
      3. pat_extra : (pat_extra * Location.t * attributes) list;
      4. pat_type : Types.type_expr;
      5. pat_env : Env.t;
      6. pat_attributes : attributes;
      }
      and pat_extra =
      1. | Tpat_constraint of core_type
        (*

        P : T pat_desc = P ; pat_extra = (Tpat_constraint T, _, _) :: ...

        *)
      2. | Tpat_type of Path.t * Longident.t Asttypes.loc
        (*

        #tconst pat_desc = disjunction ; pat_extra = (Tpat_type (P, "tconst"), _, _) :: ...

        where disjunction is a Tpat_or _ representing the branches of tconst.

        *)
      3. | Tpat_open of Path.t * Longident.t Asttypes.loc * Env.t
      4. | Tpat_unpack
        (*

        (module P) pat_desc = Tpat_var "P" ; pat_extra = (Tpat_unpack, _, _) :: ... (module _) pat_desc = Tpat_any @@ -16,10 +16,7 @@ list * Asttypes.closed_flag -> value pattern_desc

        (*

        l1=P1; ...; ln=Pn (flag = Closed) l1=P1; ...; ln=Pn; _ (flag = Open)

        Invariant: n > 0

        *)
      5. | Tpat_array : value general_pattern list -> value pattern_desc
        (*

        | P1; ...; Pn |

        *)
      6. | Tpat_lazy : value general_pattern -> value pattern_desc
        (*

        lazy P

        *)
      7. | Tpat_value : tpat_value_argument -> computation pattern_desc
        (*

        P

        Invariant: Tpat_value pattern should not carry pat_attributes or pat_extra metadata coming from user syntax, which must be on the inner pattern node -- to facilitate searching for a certain value pattern constructor with a specific attributed.

        To enforce this restriction, we made the argument of the Tpat_value constructor a private synonym of pattern, requiring you to use the as_computation_pattern function below instead of using the Tpat_value constructor directly.

        *)
      8. | Tpat_exception : value general_pattern -> computation pattern_desc
        (*

        exception P

        *)
      9. | Tpat_or : 'k general_pattern * 'k general_pattern - * Types.row_desc option -> 'k pattern_desc
        (*

        P1 | P2

        row_desc = Some _ when translating Ppat_type _, None otherwise.

        *)
      and tpat_value_argument = private value general_pattern
      and expression = {
      1. exp_desc : expression_desc;
      2. exp_loc : Location.t;
      3. exp_extra : (exp_extra * Location.t * attributes) list;
      4. exp_type : Types.type_expr;
      5. exp_env : Env.t;
      6. exp_attributes : attributes;
      }
      and exp_extra =
      1. | Texp_constraint of core_type
        (*

        E : T

        *)
      2. | Texp_coerce of core_type option * core_type
        (*

        E :> T Texp_coerce (None, T) E : T0 :> T Texp_coerce (Some T0, T)

        *)
      3. | Texp_poly of core_type option
        (*

        Used for method bodies.

        *)
      4. | Texp_newtype of string
        (*

        fun (type t) ->

        *)
      and expression_desc =
      1. | Texp_ident of Path.t * Longident.t Asttypes.loc * Types.value_description
        (*

        x M.x

        *)
      2. | Texp_constant of Asttypes.constant
        (*

        1, 'a', "true", 1.0, 1l, 1L, 1n

        *)
      3. | Texp_let of Asttypes.rec_flag * value_binding list * expression
        (*

        let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive) let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive)

        *)
      4. | Texp_function of {
        1. arg_label : Asttypes.arg_label;
        2. param : Ident.t;
        3. cases : value case list;
        4. partial : partial;
        }
        (*

        Pexp_fun and Pexp_function both translate to Texp_function. See Parsetree for more details.

        param is the identifier that is to be used to name the parameter of the function.

        partial = Partial if the pattern match is partial Total otherwise.

        *)
      5. | Texp_apply of expression * (Asttypes.arg_label * expression option) list
        (*

        E0 ~l1:E1 ... ~ln:En

        The expression can be None if the expression is abstracted over this argument. It currently appears when a label is applied.

        For example: let f x ~y = x + y in f ~y:3

        The resulting typedtree for the application is: Texp_apply (Texp_ident "f/1037", (Nolabel, None); - (Labelled "y", Some (Texp_constant Const_int 3)) - )

        *)
      6. | Texp_match of expression * computation case list * partial
        (*

        match E0 with | P1 -> E1 | P2 | exception P3 -> E2 | exception P4 -> E3

        Texp_match (E0, [(P1, E1); (P2 | exception P3, E2); - (exception P4, E3)], _)

        *)
      7. | Texp_try of expression * value case list
        (*

        try E with P1 -> E1 | ... | PN -> EN

        *)
      8. | Texp_tuple of expression list
        (*

        (E1, ..., EN)

        *)
      9. | Texp_construct of Longident.t Asttypes.loc + * Types.row_desc option -> 'k pattern_desc
        (*

        P1 | P2

        row_desc = Some _ when translating Ppat_type _, None otherwise.

        *)
      and tpat_value_argument = private value general_pattern
      and expression = {
      1. exp_desc : expression_desc;
      2. exp_loc : Location.t;
      3. exp_extra : (exp_extra * Location.t * attributes) list;
      4. exp_type : Types.type_expr;
      5. exp_env : Env.t;
      6. exp_attributes : attributes;
      }
      and exp_extra =
      1. | Texp_constraint of core_type
        (*

        E : T

        *)
      2. | Texp_coerce of core_type option * core_type
        (*

        E :> T Texp_coerce (None, T) E : T0 :> T Texp_coerce (Some T0, T)

        *)
      3. | Texp_poly of core_type option
        (*

        Used for method bodies.

        *)
      4. | Texp_newtype of string
        (*

        fun (type t) ->

        *)
      and expression_desc =
      1. | Texp_ident of Path.t * Longident.t Asttypes.loc * Types.value_description
        (*

        x M.x

        *)
      2. | Texp_constant of Asttypes.constant
        (*

        1, 'a', "true", 1.0, 1l, 1L, 1n

        *)
      3. | Texp_let of Asttypes.rec_flag * value_binding list * expression
        (*

        let P1 = E1 and ... and Pn = EN in E (flag = Nonrecursive) let rec P1 = E1 and ... and Pn = EN in E (flag = Recursive)

        *)
      4. | Texp_function of {
        1. arg_label : Asttypes.arg_label;
        2. param : Ident.t;
        3. cases : value case list;
        4. partial : partial;
        }
        (*

        Pexp_fun and Pexp_function both translate to Texp_function. See Parsetree for more details.

        param is the identifier that is to be used to name the parameter of the function.

        partial = Partial if the pattern match is partial Total otherwise.

        *)
      5. | Texp_apply of expression * (Asttypes.arg_label * expression option) list
        (*

        E0 ~l1:E1 ... ~ln:En

        The expression can be None if the expression is abstracted over this argument. It currently appears when a label is applied.

        For example: let f x ~y = x + y in f ~y:3

        The resulting typedtree for the application is: Texp_apply (Texp_ident "f/1037", (Nolabel, None); (Labelled "y", Some (Texp_constant Const_int 3)) )

        *)
      6. | Texp_match of expression * computation case list * partial
        (*

        match E0 with | P1 -> E1 | P2 | exception P3 -> E2 | exception P4 -> E3

        Texp_match (E0, [(P1, E1); (P2 | exception P3, E2); (exception P4, E3)], _)

        *)
      7. | Texp_try of expression * value case list
        (*

        try E with P1 -> E1 | ... | PN -> EN

        *)
      8. | Texp_tuple of expression list
        (*

        (E1, ..., EN)

        *)
      9. | Texp_construct of Longident.t Asttypes.loc * Types.constructor_description * expression list
        (*

        C C E E C (E1, ..., En) E1;...;En

        *)
      10. | Texp_variant of Asttypes.label * expression option
      11. | Texp_record of {
        1. fields : (Types.label_description * record_label_definition) array;
        2. representation : Types.record_representation;
        3. extended_expression : expression option;
        }
        (*

        l1=P1; ...; ln=Pn (extended_expression = None) E0 with l1=P1; ...; ln=Pn (extended_expression = Some E0)

        Invariant: n > 0

        If the type is l1: t1; l2: t2 , the expression E0 with t2=P2 is represented as Texp_record fields = [| l1, Kept t1; l2 Override P2 |]; representation; extended_expression = Some E0

        *)
      12. | Texp_field of expression * Longident.t Asttypes.loc * Types.label_description
      13. | Texp_setfield of expression @@ -78,4 +75,4 @@ 'k general_pattern -> (Ident.t * string Asttypes.loc * Types.type_expr) list
      val split_pattern : computation general_pattern -> - pattern option * pattern option

      Splits an or pattern into its value (left) and exception (right) parts.

      val exp_is_nominal : expression -> bool

      Whether an expression looks nice as the subject of a sentence in a error message.

      \ No newline at end of file + pattern option * pattern option

      Splits an or pattern into its value (left) and exception (right) parts.

    val exp_is_nominal : expression -> bool

    Whether an expression looks nice as the subject of a sentence in a error message.

    diff --git a/ocaml/Typemod/Sig_component_kind/index.html b/ocaml/Typemod/Sig_component_kind/index.html index 36185f9..c264f2e 100644 --- a/ocaml/Typemod/Sig_component_kind/index.html +++ b/ocaml/Typemod/Sig_component_kind/index.html @@ -1,2 +1,2 @@ -Sig_component_kind (ocaml.Typemod.Sig_component_kind)

    Module Typemod.Sig_component_kind

    type t =
    1. | Value
    2. | Type
    3. | Module
    4. | Module_type
    5. | Extension_constructor
    6. | Class
    7. | Class_type
    val to_string : t -> string
    \ No newline at end of file +Sig_component_kind (ocaml.Typemod.Sig_component_kind)

    Module Typemod.Sig_component_kind

    type t =
    1. | Value
    2. | Type
    3. | Module
    4. | Module_type
    5. | Extension_constructor
    6. | Class
    7. | Class_type
    val to_string : t -> string
    diff --git a/ocaml/Typemod/Signature_names/index.html b/ocaml/Typemod/Signature_names/index.html index 5c13aad..5729e32 100644 --- a/ocaml/Typemod/Signature_names/index.html +++ b/ocaml/Typemod/Signature_names/index.html @@ -1,2 +1,2 @@ -Signature_names (ocaml.Typemod.Signature_names)

    Module Typemod.Signature_names

    type t
    val simplify : Env.t -> t -> Types.signature -> Types.signature
    \ No newline at end of file +Signature_names (ocaml.Typemod.Signature_names)

    Module Typemod.Signature_names

    type t
    val simplify : Env.t -> t -> Types.signature -> Types.signature
    diff --git a/ocaml/Typemod/index.html b/ocaml/Typemod/index.html index c1ffb23..8b0a598 100644 --- a/ocaml/Typemod/index.html +++ b/ocaml/Typemod/index.html @@ -1,5 +1,5 @@ -Typemod (ocaml.Typemod)

    Module Typemod

    Type-checking of the module language and typed ast hooks

    Warning: this module is unstable and part of compiler-libs.

    module Signature_names : sig ... end
    val type_module : +Typemod (ocaml.Typemod)

    Module Typemod

    Type-checking of the module language and typed ast hooks

    Warning: this module is unstable and part of compiler-libs.

    module Signature_names : sig ... end
    val type_structure : @@ -32,9 +32,9 @@ string -> string -> Typedtree.module_coercion
    val initial_env : - loc:Location.t -> - initially_opened_module:string option -> - open_implicit_modules:string list -> + loc:Location.t -> + initially_opened_module:string option -> + open_implicit_modules:string list -> Env.t
    module Sig_component_kind : sig ... end
    type hiding_error =
    1. | Illegal_shadowing of {
      1. shadowed_item_id : Ident.t;
      2. shadowed_item_kind : Sig_component_kind.t;
      3. shadowed_item_loc : Location.t;
      4. shadower_id : Ident.t;
      5. user_id : Ident.t;
      6. user_kind : Sig_component_kind.t;
      7. user_loc : Location.t;
      }
    2. | Appears_in_signature of {
      1. opened_item_id : Ident.t;
      2. opened_item_kind : Sig_component_kind.t;
      3. user_id : Ident.t;
      4. user_kind : Sig_component_kind.t;
      5. user_loc : Location.t;
      }
    type error =
    1. | Cannot_apply of Types.module_type
    2. | Not_included of Includemod.explanation
    3. | Cannot_eliminate_dependency of Types.module_type
    4. | Signature_expected
    5. | Structure_expected of Types.module_type
    6. | With_no_component of Longident.t
    7. | With_mismatch of Longident.t * Includemod.explanation
    8. | With_makes_applicative_functor_ill_typed of Longident.t * Path.t - * Includemod.explanation
    9. | With_changes_module_alias of Longident.t * Ident.t * Path.t
    10. | With_cannot_remove_constrained_type
    11. | Repeated_name of Sig_component_kind.t * string
    12. | Non_generalizable of {
      1. vars : Types.type_expr list;
      2. expression : Types.type_expr;
      }
    13. | Non_generalizable_module of {
      1. vars : Types.type_expr list;
      2. item : Types.value_description;
      3. mty : Types.module_type;
      }
    14. | Implementation_is_required of string
    15. | Interface_not_compiled of string
    16. | Not_allowed_in_functor_body
    17. | Not_a_packed_module of Types.type_expr
    18. | Incomplete_packed_module of Types.type_expr
    19. | Scoping_pack of Longident.t * Types.type_expr
    20. | Recursive_module_require_explicit_type
    21. | Apply_generative
    22. | Cannot_scrape_alias of Path.t
    23. | Cannot_scrape_package_type of Path.t
    24. | Badly_formed_signature of string * Typedecl.error
    25. | Cannot_hide_id of hiding_error
    26. | Invalid_type_subst_rhs
    27. | Unpackable_local_modtype_subst of Path.t
    28. | With_cannot_remove_packed_modtype of Path.t * Types.module_type
    exception Error of Location.t * Env.t * error
    exception Error_forward of Location.error
    val report_error : Env.t -> loc:Location.t -> error -> Location.error
    \ No newline at end of file + * Includemod.explanation
  • | With_changes_module_alias of Longident.t * Ident.t * Path.t
  • | With_cannot_remove_constrained_type
  • | Repeated_name of Sig_component_kind.t * string
  • | Non_generalizable of {
    1. vars : Types.type_expr list;
    2. expression : Types.type_expr;
    }
  • | Non_generalizable_module of {
    1. vars : Types.type_expr list;
    2. item : Types.value_description;
    3. mty : Types.module_type;
    }
  • | Implementation_is_required of string
  • | Interface_not_compiled of string
  • | Not_allowed_in_functor_body
  • | Not_a_packed_module of Types.type_expr
  • | Incomplete_packed_module of Types.type_expr
  • | Scoping_pack of Longident.t * Types.type_expr
  • | Recursive_module_require_explicit_type
  • | Apply_generative
  • | Cannot_scrape_alias of Path.t
  • | Cannot_scrape_package_type of Path.t
  • | Badly_formed_signature of string * Typedecl.error
  • | Cannot_hide_id of hiding_error
  • | Invalid_type_subst_rhs
  • | Unpackable_local_modtype_subst of Path.t
  • | With_cannot_remove_packed_modtype of Path.t * Types.module_type
  • exception Error of Location.t * Env.t * error
    exception Error_forward of Location.error
    val report_error : Env.t -> loc:Location.t -> error -> Location.error
    diff --git a/ocaml/Typeopt/index.html b/ocaml/Typeopt/index.html index 5af0a17..413e060 100644 --- a/ocaml/Typeopt/index.html +++ b/ocaml/Typeopt/index.html @@ -1,5 +1,5 @@ -Typeopt (ocaml.Typeopt)

    Module Typeopt

    val is_function_type : +Typeopt (ocaml.Typeopt)

    Module Typeopt

    val is_function_type : Env.t -> Types.type_expr -> (Types.type_expr * Types.type_expr) option
    val is_base_type : Env.t -> Types.type_expr -> Path.t -> bool
    val maybe_pointer_type : @@ -16,4 +16,4 @@ | `Other ]

    value_kind_union k1 k2 is a value_kind at least as general as k1 and k2

    \ No newline at end of file + Lambda.value_kind

    value_kind_union k1 k2 is a value_kind at least as general as k1 and k2

    diff --git a/ocaml/Types/MethSet/index.html b/ocaml/Types/MethSet/index.html index 4ce5a2a..debcd13 100644 --- a/ocaml/Types/MethSet/index.html +++ b/ocaml/Types/MethSet/index.html @@ -1,3 +1,2 @@ -MethSet (ocaml.Types.MethSet)

    Module Types.MethSet

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +MethSet (ocaml.Types.MethSet)

    Module Types.MethSet

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Types/Meths/index.html b/ocaml/Types/Meths/index.html index ff367dc..b87b09a 100644 --- a/ocaml/Types/Meths/index.html +++ b/ocaml/Types/Meths/index.html @@ -1,8 +1,8 @@ -Meths (ocaml.Types.Meths)

    Module Types.Meths

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Meths (ocaml.Types.Meths)

    Module Types.Meths

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Types/Separability/index.html b/ocaml/Types/Separability/index.html index 12d7fab..9a1b845 100644 --- a/ocaml/Types/Separability/index.html +++ b/ocaml/Types/Separability/index.html @@ -1,2 +1,2 @@ -Separability (ocaml.Types.Separability)

    Module Types.Separability

    see Typedecl_separability for an explanation of separability and separability modes.

    type t =
    1. | Ind
    2. | Sep
    3. | Deepsep
    val eq : t -> t -> bool
    val print : Stdlib.Format.formatter -> t -> unit
    val rank : t -> int

    Modes are ordered from the least to the most demanding: Ind < Sep < Deepsep. 'rank' maps them to integers in an order-respecting way: m1 < m2 <=> rank m1 < rank m2

    val compare : t -> t -> int

    Compare two mode according to their mode ordering.

    val max : t -> t -> t

    max_mode m1 m2 returns the most demanding mode. It is used to express the conjunction of two parameter mode constraints.

    type signature = t list

    The 'separability signature' of a type assigns a mode for each of its parameters. ('a, 'b) t has mode (m1, m2) if (t1, t2) t is separable whenever t1, t2 have mode m1, m2.

    val print_signature : Stdlib.Format.formatter -> signature -> unit
    val default_signature : arity:int -> signature

    The most pessimistic separability for a completely unknown type.

    \ No newline at end of file +Separability (ocaml.Types.Separability)

    Module Types.Separability

    see Typedecl_separability for an explanation of separability and separability modes.

    type t =
    1. | Ind
    2. | Sep
    3. | Deepsep
    val eq : t -> t -> bool
    val print : Stdlib.Format.formatter -> t -> unit
    val rank : t -> int

    Modes are ordered from the least to the most demanding: Ind < Sep < Deepsep. 'rank' maps them to integers in an order-respecting way: m1 < m2 <=> rank m1 < rank m2

    val compare : t -> t -> int

    Compare two mode according to their mode ordering.

    val max : t -> t -> t

    max_mode m1 m2 returns the most demanding mode. It is used to express the conjunction of two parameter mode constraints.

    type signature = t list

    The 'separability signature' of a type assigns a mode for each of its parameters. ('a, 'b) t has mode (m1, m2) if (t1, t2) t is separable whenever t1, t2 have mode m1, m2.

    val print_signature : Stdlib.Format.formatter -> signature -> unit
    val default_signature : arity:int -> signature

    The most pessimistic separability for a completely unknown type.

    diff --git a/ocaml/Types/TransientTypeOps/index.html b/ocaml/Types/TransientTypeOps/index.html index c38304d..7cc6c00 100644 --- a/ocaml/Types/TransientTypeOps/index.html +++ b/ocaml/Types/TransientTypeOps/index.html @@ -1,2 +1,2 @@ -TransientTypeOps (ocaml.Types.TransientTypeOps)

    Module Types.TransientTypeOps

    Comparisons for functors

    val compare : t -> t -> int
    val equal : t -> t -> bool
    val hash : t -> int
    \ No newline at end of file +TransientTypeOps (ocaml.Types.TransientTypeOps)

    Module Types.TransientTypeOps

    Comparisons for functors

    val compare : t -> t -> int
    val equal : t -> t -> bool
    val hash : t -> int
    diff --git a/ocaml/Types/Transient_expr/index.html b/ocaml/Types/Transient_expr/index.html index f22a3ae..bd5815a 100644 --- a/ocaml/Types/Transient_expr/index.html +++ b/ocaml/Types/Transient_expr/index.html @@ -1,2 +1,2 @@ -Transient_expr (ocaml.Types.Transient_expr)

    Module Types.Transient_expr

    Operations on transient_expr

    val create : type_desc -> level:int -> scope:int -> id:int -> transient_expr
    val set_desc : transient_expr -> type_desc -> unit
    val set_level : transient_expr -> int -> unit
    val set_scope : transient_expr -> int -> unit
    val type_expr : transient_expr -> type_expr
    val coerce : type_expr -> transient_expr

    Coerce without normalizing with repr

    val set_stub_desc : type_expr -> type_desc -> unit

    Instantiate a not yet instantiated stub. Fail if already instantiated.

    \ No newline at end of file +Transient_expr (ocaml.Types.Transient_expr)

    Module Types.Transient_expr

    Operations on transient_expr

    val create : type_desc -> level:int -> scope:int -> id:int -> transient_expr
    val set_desc : transient_expr -> type_desc -> unit
    val set_level : transient_expr -> int -> unit
    val set_scope : transient_expr -> int -> unit
    val type_expr : transient_expr -> type_expr
    val coerce : type_expr -> transient_expr

    Coerce without normalizing with repr

    val set_stub_desc : type_expr -> type_desc -> unit

    Instantiate a not yet instantiated stub. Fail if already instantiated.

    diff --git a/ocaml/Types/VarSet/index.html b/ocaml/Types/VarSet/index.html index 42ec5ee..66864c5 100644 --- a/ocaml/Types/VarSet/index.html +++ b/ocaml/Types/VarSet/index.html @@ -1,3 +1,2 @@ -VarSet (ocaml.Types.VarSet)

    Module Types.VarSet

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +VarSet (ocaml.Types.VarSet)

    Module Types.VarSet

    Sets

    type elt = string

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ocaml/Types/Variance/index.html b/ocaml/Types/Variance/index.html index db5b2c6..0ab36f2 100644 --- a/ocaml/Types/Variance/index.html +++ b/ocaml/Types/Variance/index.html @@ -1,2 +1,2 @@ -Variance (ocaml.Types.Variance)

    Module Types.Variance

    type t
    type f =
    1. | May_pos
    2. | May_neg
    3. | May_weak
    4. | Inj
    5. | Pos
    6. | Neg
    7. | Inv
    val null : t
    val full : t
    val covariant : t
    val unknown : t
    val union : t -> t -> t
    val inter : t -> t -> t
    val subset : t -> t -> bool
    val eq : t -> t -> bool
    val set : f -> t -> t
    val set_if : bool -> f -> t -> t
    val mem : f -> t -> bool
    val conjugate : t -> t
    val compose : t -> t -> t
    val strengthen : t -> t
    val get_upper : t -> bool * bool
    val get_lower : t -> bool * bool * bool
    val unknown_signature : injective:bool -> arity:int -> t list

    The most pessimistic variance for a completely unknown type.

    \ No newline at end of file +Variance (ocaml.Types.Variance)

    Module Types.Variance

    type t
    type f =
    1. | May_pos
    2. | May_neg
    3. | May_weak
    4. | Inj
    5. | Pos
    6. | Neg
    7. | Inv
    val null : t
    val full : t
    val covariant : t
    val unknown : t
    val union : t -> t -> t
    val inter : t -> t -> t
    val subset : t -> t -> bool
    val eq : t -> t -> bool
    val set : f -> t -> t
    val set_if : bool -> f -> t -> t
    val mem : f -> t -> bool
    val conjugate : t -> t
    val compose : t -> t -> t
    val strengthen : t -> t
    val get_upper : t -> bool * bool
    val get_lower : t -> bool * bool * bool
    val unknown_signature : injective:bool -> arity:int -> t list

    The most pessimistic variance for a completely unknown type.

    diff --git a/ocaml/Types/Vars/index.html b/ocaml/Types/Vars/index.html index e3b564a..8852153 100644 --- a/ocaml/Types/Vars/index.html +++ b/ocaml/Types/Vars/index.html @@ -1,8 +1,8 @@ -Vars (ocaml.Types.Vars)

    Module Types.Vars

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Vars (ocaml.Types.Vars)

    Module Types.Vars

    Maps

    type key = string

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ocaml/Types/index.html b/ocaml/Types/index.html index 0b7d2bd..aa73b3b 100644 --- a/ocaml/Types/index.html +++ b/ocaml/Types/index.html @@ -1,26 +1,25 @@ -Types (ocaml.Types)

    Module Types

    Representation of types and declarations

    Types defines the representation of types and declarations (that is, the content of module signatures).

    CMI files are made of marshalled types.

    Asttypes exposes basic definitions shared both by Parsetree and Types.

    type type_expr

    Type expressions for the core language.

    The type_desc variant defines all the possible type expressions one can find in OCaml. type_expr wraps this with some annotations.

    The level field tracks the level of polymorphism associated to a type, guiding the generalization algorithm. Put shortly, when referring to a type in a given environment, both the type and the environment have a level. If the type has an higher level, then it can be considered fully polymorphic (type variables will be printed as 'a), otherwise it'll be weakly polymorphic, or non generalized (type variables printed as '_a). See http://okmij.org/ftp/ML/generalization.html for more information.

    Note about type_declaration: one should not make the confusion between type_expr and type_declaration.

    type_declaration refers specifically to the type construct in OCaml language, where you create and name a new type or type alias.

    type_expr is used when you refer to existing types, e.g. when annotating the expected type of a value.

    Also, as the type system of OCaml is generative, a type_declaration can have the side-effect of introducing a new type constructor, different from all other known types. Whereas type_expr is a pure construct which allows referring to existing types.

    Note on mutability: TBD.

    type row_desc
    type row_field
    type field_kind
    type commutable
    type type_desc =
    1. | Tvar of string option
      (*

      Tvar (Some "a") ==> 'a or '_a Tvar None ==> _

      *)
    2. | Tarrow of Asttypes.arg_label * type_expr * type_expr * commutable
      (*

      Tarrow (Nolabel, e1, e2, c) ==> e1 -> e2 Tarrow (Labelled "l", e1, e2, c) ==> l:e1 -> e2 Tarrow (Optional "l", e1, e2, c) ==> ?l:e1 -> e2

      See commutable for the last argument.

      *)
    3. | Ttuple of type_expr list
      (*

      Ttuple [t1;...;tn] ==> (t1 * ... * tn)

      *)
    4. | Tconstr of Path.t * type_expr list * abbrev_memo ref
      (*

      Tconstr (`A.B.t', [t1;...;tn], _) ==> (t1,...,tn) A.B.t The last parameter keep tracks of known expansions, see abbrev_memo.

      *)
    5. | Tobject of type_expr * (Path.t * type_expr list) option ref
      (*

      Tobject (`f1:t1;...;fn: tn', `None') ==> < f1: t1; ...; fn: tn > f1, fn are represented as a linked list of types using Tfield and Tnil constructors.

      Tobject (_, `Some (`A.ct', [t1;...;tn]') ==> (t1, ..., tn) A.ct. where A.ct is the type of some class.

      There are also special cases for so-called "class-types", cf. Typeclass and Ctype.set_object_name:

      Tobject (Tfield(_,_,...(Tfield(_,_,rv)...), - Some(`A.#ct`, [rv;t1;...;tn]) ==> (t1, ..., tn) #A.ct Tobject (_, Some(`A.#ct`, [Tnil;t1;...;tn]) ==> (t1, ..., tn) A.ct

      where rv is the hidden row variable.

      *)
    6. | Tfield of string * field_kind * type_expr * type_expr
      (*

      Tfield ("foo", field_public, t, ts) ==> <...; foo : t; ts>

      *)
    7. | Tnil
      (*

      Tnil ==> <...; >

      *)
    8. | Tsubst of type_expr * type_expr option
      (*

      Tsubst is used temporarily to store information in low-level functions manipulating representation of types, such as instantiation or copy. The first argument contains a copy of the original node. The second is available only when the first is the row variable of a polymorphic variant. It then contains a copy of the whole variant. This constructor should not appear outside of these cases.

      *)
    9. | Tvariant of row_desc
      (*

      Representation of polymorphic variants, see row_desc.

      *)
    10. | Tunivar of string option
      (*

      Occurrence of a type variable introduced by a forall quantifier / Tpoly.

      *)
    11. | Tpoly of type_expr * type_expr list
      (*

      Tpoly (ty,tyl) ==> 'a1... 'an. ty, where 'a1 ... 'an are names given to types in tyl and occurrences of those types in ty.

      *)
    12. | Tpackage of Path.t * (Longident.t * type_expr) list
      (*

      Type of a first-class module (a.k.a package).

      *)
    and fixed_explanation =
    1. | Univar of type_expr
      (*

      The row type was bound to an univar

      *)
    2. | Fixed_private
      (*

      The row type is private

      *)
    3. | Reified of Path.t
      (*

      The row was reified

      *)
    4. | Rigid
      (*

      The row type was made rigid during constraint verification

      *)
    and abbrev_memo =
    1. | Mnil
      (*

      No known abbreviation

      *)
    2. | Mcons of Asttypes.private_flag * Path.t * type_expr * type_expr * abbrev_memo
      (*

      Found one abbreviation. A valid abbreviation should be at least as visible and reachable by the same path. The first expression is the abbreviation and the second the expansion.

      *)

    abbrev_memo allows one to keep track of different expansions of a type alias. This is done for performance purposes.

    For instance, when defining type 'a pair = 'a * 'a, when one refers to an 'a pair, it is just a shortcut for the 'a * 'a type. This expansion will be stored in the abbrev_memo of the corresponding Tconstr node.

    In practice, abbrev_memo behaves like list of expansions with a mutable tail.

    Note on marshalling: abbrev_memo must not appear in saved types. Btype, with cleanup_abbrev and memo, takes care of tracking and removing abbreviations.

    commutable is a flag appended to every arrow type.

    When typing an application, if the type of the functional is known, its type is instantiated with commu_ok arrows, otherwise as commu_var ().

    When the type is not known, the application will be used to infer the actual type. This is fragile in presence of labels where there is no principal type.

    Two incompatible applications must rely on is_commu_ok arrows, otherwise they will trigger an error.

    let f g = g ~a:() ~b:(); g ~b:() ~a:();

    Error: This function is applied to arguments in an order different from other calls. This is only allowed when the real type is known.

    val is_commu_ok : commutable -> bool
    val commu_ok : commutable
    val commu_var : unit -> commutable

    field_kind indicates the accessibility of a method.

    An Fprivate field may become Fpublic or Fabsent during unification, but not the other way round.

    The same field_kind is kept shared when copying Tfield nodes so that the copies of the self-type of a class share the same accessibility (see also PR#10539).

    type field_kind_view =
    1. | Fprivate
    2. | Fpublic
    3. | Fabsent
    val field_kind_repr : field_kind -> field_kind_view
    val field_public : field_kind
    val field_absent : field_kind
    val field_private : unit -> field_kind
    val field_kind_internal_repr : field_kind -> field_kind

    Getters for type_expr; calls repr before answering a value

    val get_desc : type_expr -> type_desc
    val get_level : type_expr -> int
    val get_scope : type_expr -> int
    val get_id : type_expr -> int
    type transient_expr = private {
    1. mutable desc : type_desc;
    2. mutable level : int;
    3. mutable scope : int;
    4. id : int;
    }

    Transient type_expr. Should only be used immediately after Transient_expr.repr

    module Transient_expr : sig ... end

    Operations on transient_expr

    val create_expr : type_desc -> level:int -> scope:int -> id:int -> type_expr

    Functions and definitions moved from Btype

    val newty3 : level:int -> scope:int -> type_desc -> type_expr

    Create a type with a fresh id

    val newty2 : level:int -> type_desc -> type_expr

    Create a type with a fresh id and no scope

    module TransientTypeOps : sig ... end

    Comparisons for functors

    Comparisons for type_expr; cannot be used for functors

    val eq_type : type_expr -> type_expr -> bool
    val compare_type : type_expr -> type_expr -> int

    Constructor and accessors for row_desc

    `X | `Y (row_closed = true) < `X | `Y (row_closed = true) > `X | `Y (row_closed = false) < `X | `Y > `X (row_closed = true)

    type t = > `X as 'a (row_more = Tvar a) type t = private > `X (row_more = Tconstr ("t#row", , ref Mnil))

    And for:

    let f = function `X -> `X -> | `Y -> `X

    the type of "f" will be a Tarrow whose lhs will (basically) be:

    Tvariant row_fields = [("X", _)]; +Types (ocaml.Types)

    Module Types

    Representation of types and declarations

    Types defines the representation of types and declarations (that is, the content of module signatures).

    CMI files are made of marshalled types.

    Asttypes exposes basic definitions shared both by Parsetree and Types.

    type type_expr

    Type expressions for the core language.

    The type_desc variant defines all the possible type expressions one can find in OCaml. type_expr wraps this with some annotations.

    The level field tracks the level of polymorphism associated to a type, guiding the generalization algorithm. Put shortly, when referring to a type in a given environment, both the type and the environment have a level. If the type has an higher level, then it can be considered fully polymorphic (type variables will be printed as 'a), otherwise it'll be weakly polymorphic, or non generalized (type variables printed as '_a). See http://okmij.org/ftp/ML/generalization.html for more information.

    Note about type_declaration: one should not make the confusion between type_expr and type_declaration.

    type_declaration refers specifically to the type construct in OCaml language, where you create and name a new type or type alias.

    type_expr is used when you refer to existing types, e.g. when annotating the expected type of a value.

    Also, as the type system of OCaml is generative, a type_declaration can have the side-effect of introducing a new type constructor, different from all other known types. Whereas type_expr is a pure construct which allows referring to existing types.

    Note on mutability: TBD.

    type row_desc
    type row_field
    type field_kind
    type commutable
    type type_desc =
    1. | Tvar of string option
      (*

      Tvar (Some "a") ==> 'a or '_a Tvar None ==> _

      *)
    2. | Tarrow of Asttypes.arg_label * type_expr * type_expr * commutable
      (*

      Tarrow (Nolabel, e1, e2, c) ==> e1 -> e2 Tarrow (Labelled "l", e1, e2, c) ==> l:e1 -> e2 Tarrow (Optional "l", e1, e2, c) ==> ?l:e1 -> e2

      See commutable for the last argument.

      *)
    3. | Ttuple of type_expr list
      (*

      Ttuple [t1;...;tn] ==> (t1 * ... * tn)

      *)
    4. | Tconstr of Path.t * type_expr list * abbrev_memo ref
      (*

      Tconstr (`A.B.t', [t1;...;tn], _) ==> (t1,...,tn) A.B.t The last parameter keep tracks of known expansions, see abbrev_memo.

      *)
    5. | Tobject of type_expr * (Path.t * type_expr list) option ref
      (*

      Tobject (`f1:t1;...;fn: tn', `None') ==> < f1: t1; ...; fn: tn > f1, fn are represented as a linked list of types using Tfield and Tnil constructors.

      Tobject (_, `Some (`A.ct', [t1;...;tn]') ==> (t1, ..., tn) A.ct. where A.ct is the type of some class.

      There are also special cases for so-called "class-types", cf. Typeclass and Ctype.set_object_name:

      Tobject (Tfield(_,_,...(Tfield(_,_,rv)...), Some(`A.#ct`, [rv;t1;...;tn]) ==> (t1, ..., tn) #A.ct Tobject (_, Some(`A.#ct`, [Tnil;t1;...;tn]) ==> (t1, ..., tn) A.ct

      where rv is the hidden row variable.

      *)
    6. | Tfield of string * field_kind * type_expr * type_expr
      (*

      Tfield ("foo", field_public, t, ts) ==> <...; foo : t; ts>

      *)
    7. | Tnil
      (*

      Tnil ==> <...; >

      *)
    8. | Tsubst of type_expr * type_expr option
      (*

      Tsubst is used temporarily to store information in low-level functions manipulating representation of types, such as instantiation or copy. The first argument contains a copy of the original node. The second is available only when the first is the row variable of a polymorphic variant. It then contains a copy of the whole variant. This constructor should not appear outside of these cases.

      *)
    9. | Tvariant of row_desc
      (*

      Representation of polymorphic variants, see row_desc.

      *)
    10. | Tunivar of string option
      (*

      Occurrence of a type variable introduced by a forall quantifier / Tpoly.

      *)
    11. | Tpoly of type_expr * type_expr list
      (*

      Tpoly (ty,tyl) ==> 'a1... 'an. ty, where 'a1 ... 'an are names given to types in tyl and occurrences of those types in ty.

      *)
    12. | Tpackage of Path.t * (Longident.t * type_expr) list
      (*

      Type of a first-class module (a.k.a package).

      *)
    and fixed_explanation =
    1. | Univar of type_expr
      (*

      The row type was bound to an univar

      *)
    2. | Fixed_private
      (*

      The row type is private

      *)
    3. | Reified of Path.t
      (*

      The row was reified

      *)
    4. | Rigid
      (*

      The row type was made rigid during constraint verification

      *)
    and abbrev_memo =
    1. | Mnil
      (*

      No known abbreviation

      *)
    2. | Mcons of Asttypes.private_flag * Path.t * type_expr * type_expr * abbrev_memo
      (*

      Found one abbreviation. A valid abbreviation should be at least as visible and reachable by the same path. The first expression is the abbreviation and the second the expansion.

      *)

    abbrev_memo allows one to keep track of different expansions of a type alias. This is done for performance purposes.

    For instance, when defining type 'a pair = 'a * 'a, when one refers to an 'a pair, it is just a shortcut for the 'a * 'a type. This expansion will be stored in the abbrev_memo of the corresponding Tconstr node.

    In practice, abbrev_memo behaves like list of expansions with a mutable tail.

    Note on marshalling: abbrev_memo must not appear in saved types. Btype, with cleanup_abbrev and memo, takes care of tracking and removing abbreviations.

    commutable is a flag appended to every arrow type.

    When typing an application, if the type of the functional is known, its type is instantiated with commu_ok arrows, otherwise as commu_var ().

    When the type is not known, the application will be used to infer the actual type. This is fragile in presence of labels where there is no principal type.

    Two incompatible applications must rely on is_commu_ok arrows, otherwise they will trigger an error.

    let f g = g ~a:() ~b:(); g ~b:() ~a:();

    Error: This function is applied to arguments in an order different from other calls. This is only allowed when the real type is known.

    val is_commu_ok : commutable -> bool
    val commu_ok : commutable
    val commu_var : unit -> commutable

    field_kind indicates the accessibility of a method.

    An Fprivate field may become Fpublic or Fabsent during unification, but not the other way round.

    The same field_kind is kept shared when copying Tfield nodes so that the copies of the self-type of a class share the same accessibility (see also PR#10539).

    type field_kind_view =
    1. | Fprivate
    2. | Fpublic
    3. | Fabsent
    val field_kind_repr : field_kind -> field_kind_view
    val field_public : field_kind
    val field_absent : field_kind
    val field_private : unit -> field_kind
    val field_kind_internal_repr : field_kind -> field_kind

    Getters for type_expr; calls repr before answering a value

    val get_desc : type_expr -> type_desc
    val get_level : type_expr -> int
    val get_scope : type_expr -> int
    val get_id : type_expr -> int
    type transient_expr = private {
    1. mutable desc : type_desc;
    2. mutable level : int;
    3. mutable scope : int;
    4. id : int;
    }

    Transient type_expr. Should only be used immediately after Transient_expr.repr

    module Transient_expr : sig ... end

    Operations on transient_expr

    val create_expr : type_desc -> level:int -> scope:int -> id:int -> type_expr

    Functions and definitions moved from Btype

    val newty3 : level:int -> scope:int -> type_desc -> type_expr

    Create a type with a fresh id

    val newty2 : level:int -> type_desc -> type_expr

    Create a type with a fresh id and no scope

    module TransientTypeOps : sig ... end

    Comparisons for functors

    Comparisons for type_expr; cannot be used for functors

    val eq_type : type_expr -> type_expr -> bool
    val compare_type : type_expr -> type_expr -> int

    Constructor and accessors for row_desc

    `X | `Y (row_closed = true) < `X | `Y (row_closed = true) > `X | `Y (row_closed = false) < `X | `Y > `X (row_closed = true)

    type t = > `X as 'a (row_more = Tvar a) type t = private > `X (row_more = Tconstr ("t#row", , ref Mnil))

    And for:

    let f = function `X -> `X -> | `Y -> `X

    the type of "f" will be a Tarrow whose lhs will (basically) be:

    Tvariant row_fields = [("X", _)]; row_more = Tvariant { row_fields = [("Y", _)]; row_more = Tvariant { row_fields = []; row_more = _; _ ; _

    }

    ; _

    }

    val create_row : - fields:(Asttypes.label * row_field) list -> - more:type_expr -> - closed:bool -> - fixed:fixed_explanation option -> - name:(Path.t * type_expr list) option -> + fields:(Asttypes.label * row_field) list -> + more:type_expr -> + closed:bool -> + fixed:fixed_explanation option -> + name:(Path.t * type_expr list) option -> row_desc
    val row_fields : row_desc -> (Asttypes.label * row_field) list
    val row_more : row_desc -> type_expr
    val row_closed : row_desc -> bool
    val row_fixed : row_desc -> fixed_explanation option
    val row_name : row_desc -> (Path.t * type_expr list) option
    val set_row_name : row_desc -> (Path.t * type_expr list) option -> row_desc
    val get_row_field : Asttypes.label -> row_desc -> row_field
    type row_desc_repr =
    1. | Row of {
      1. fields : (Asttypes.label * row_field) list;
      2. more : type_expr;
      3. closed : bool;
      4. fixed : fixed_explanation option;
      5. name : (Path.t * type_expr list) option;
      }

    get all fields at once; different from the old row_repr

    val row_repr : row_desc -> row_desc_repr
    type row_field_view =
    1. | Rpresent of type_expr option
    2. | Reither of bool * type_expr list * bool
    3. | Rabsent

    Current contents of a row field

    val row_field_repr : row_field -> row_field_view
    val rf_present : type_expr option -> row_field
    val rf_absent : row_field
    val rf_either : - ?use_ext_of:row_field -> - no_arg:bool -> + ?use_ext_of:row_field -> + no_arg:bool -> type_expr list -> - matched:bool -> + matched:bool -> row_field
    val rf_either_of : type_expr option -> row_field
    val eq_row_field_ext : row_field -> row_field -> bool
    val changed_row_field_exts : row_field list -> (unit -> unit) -> bool
    val match_row_field : - present:(type_expr option -> 'a) -> - absent:(unit -> 'a) -> - either:(bool -> type_expr list -> bool -> row_field option -> 'a) -> + present:(type_expr option -> 'a) -> + absent:(unit -> 'a) -> + either:(bool -> type_expr list -> bool -> row_field option -> 'a) -> row_field -> 'a
    module Uid = Shape.Uid
    module MethSet : Set.S with type elt = string
    module VarSet : Set.S with type elt = string
    module Meths : Map.S with type key = string
    module Vars : Map.S with type key = string
    type value_description = {
    1. val_type : type_expr;
    2. val_kind : value_kind;
    3. val_loc : Location.t;
    4. val_attributes : Parsetree.attributes;
    5. val_uid : Uid.t;
    }
    and value_kind =
    1. | Val_reg
    2. | Val_prim of Primitive.description
    3. | Val_ivar of Asttypes.mutable_flag * string
    4. | Val_self of class_signature * self_meths * Ident.t Vars.t * string
    5. | Val_anc of class_signature * Ident.t Meths.t * string
    and self_meths =
    1. | Self_concrete of Ident.t Meths.t
    2. | Self_virtual of Ident.t Meths.t ref
    and class_signature = {
    1. csig_self : type_expr;
    2. mutable csig_self_row : type_expr;
    3. mutable csig_vars : (Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) Vars.t;
    4. mutable csig_meths : (method_privacy * Asttypes.virtual_flag * type_expr) @@ -31,7 +30,7 @@ * visibility
    5. | Sig_modtype of Ident.t * modtype_declaration * visibility
    6. | Sig_class of Ident.t * class_declaration * rec_status * visibility
    7. | Sig_class_type of Ident.t * class_type_declaration * rec_status * visibility
    and module_declaration = {
    1. md_type : module_type;
    2. md_attributes : Parsetree.attributes;
    3. md_loc : Location.t;
    4. md_uid : Uid.t;
    }
    and modtype_declaration = {
    1. mtd_type : module_type option;
    2. mtd_attributes : Parsetree.attributes;
    3. mtd_loc : Location.t;
    4. mtd_uid : Uid.t;
    }
    and rec_status =
    1. | Trec_not
    2. | Trec_first
    3. | Trec_next
    and ext_status =
    1. | Text_first
    2. | Text_next
    3. | Text_exception
    val item_visibility : signature_item -> visibility
    type constructor_description = {
    1. cstr_name : string;
    2. cstr_res : type_expr;
    3. cstr_existentials : type_expr list;
    4. cstr_args : type_expr list;
    5. cstr_arity : int;
    6. cstr_tag : constructor_tag;
    7. cstr_consts : int;
    8. cstr_nonconsts : int;
    9. cstr_generalized : bool;
    10. cstr_private : Asttypes.private_flag;
    11. cstr_loc : Location.t;
    12. cstr_attributes : Parsetree.attributes;
    13. cstr_inlined : type_declaration option;
    14. cstr_uid : Uid.t;
    }
    and constructor_tag =
    1. | Cstr_constant of int
    2. | Cstr_block of int
    3. | Cstr_unboxed
    4. | Cstr_extension of Path.t * bool
    val equal_tag : constructor_tag -> constructor_tag -> bool
    val may_equal_constr : constructor_description -> constructor_description -> - bool
    type label_description = {
    1. lbl_name : string;
    2. lbl_res : type_expr;
    3. lbl_arg : type_expr;
    4. lbl_mut : Asttypes.mutable_flag;
    5. lbl_pos : int;
    6. lbl_all : label_description array;
    7. lbl_repres : record_representation;
    8. lbl_private : Asttypes.private_flag;
    9. lbl_loc : Location.t;
    10. lbl_attributes : Parsetree.attributes;
    11. lbl_uid : Uid.t;
    }
    val bound_value_identifiers : signature -> Ident.t list

    Extracts the list of "value" identifiers bound by a signature. "Value" identifiers are identifiers for signature components that correspond to a run-time value: values, extensions, modules, classes. Note: manifest primitives do not correspond to a run-time value!

    val signature_item_id : signature_item -> Ident.t
    type snapshot
    val snapshot : unit -> snapshot
    val backtrack : cleanup_abbrev:(unit -> unit) -> snapshot -> unit
    val undo_first_change_after : snapshot -> unit
    val undo_compress : snapshot -> unit

    Functions to use when modifying a type (only Ctype?). The old values are logged and reverted on backtracking.

    val set_type_desc : type_expr -> type_desc -> unit
    val set_level : type_expr -> int -> unit
    val set_scope : type_expr -> int -> unit
    val set_name : + bool
    type label_description = {
    1. lbl_name : string;
    2. lbl_res : type_expr;
    3. lbl_arg : type_expr;
    4. lbl_mut : Asttypes.mutable_flag;
    5. lbl_pos : int;
    6. lbl_all : label_description array;
    7. lbl_repres : record_representation;
    8. lbl_private : Asttypes.private_flag;
    9. lbl_loc : Location.t;
    10. lbl_attributes : Parsetree.attributes;
    11. lbl_uid : Uid.t;
    }
    val bound_value_identifiers : signature -> Ident.t list

    Extracts the list of "value" identifiers bound by a signature. "Value" identifiers are identifiers for signature components that correspond to a run-time value: values, extensions, modules, classes. Note: manifest primitives do not correspond to a run-time value!

    val signature_item_id : signature_item -> Ident.t
    type snapshot
    val snapshot : unit -> snapshot
    val backtrack : cleanup_abbrev:(unit -> unit) -> snapshot -> unit
    val undo_first_change_after : snapshot -> unit
    val undo_compress : snapshot -> unit

    Functions to use when modifying a type (only Ctype?). The old values are logged and reverted on backtracking.

    val set_type_desc : type_expr -> type_desc -> unit
    val set_level : type_expr -> int -> unit
    val set_scope : type_expr -> int -> unit
    val set_name : (Path.t * type_expr list) option ref -> (Path.t * type_expr list) option -> - unit
    val set_univar : type_expr option ref -> type_expr -> unit
    val set_commu_ok : commutable -> unit
    \ No newline at end of file + unit
    val set_univar : type_expr option ref -> type_expr -> unit
    val set_commu_ok : commutable -> unit
    diff --git a/ocaml/Typetexp/TyVarEnv/index.html b/ocaml/Typetexp/TyVarEnv/index.html index 3ff898f..1f2eacd 100644 --- a/ocaml/Typetexp/TyVarEnv/index.html +++ b/ocaml/Typetexp/TyVarEnv/index.html @@ -1,5 +1,5 @@ -TyVarEnv (ocaml.Typetexp.TyVarEnv)

    Module Typetexp.TyVarEnv

    val reset : unit -> unit

    removes all type variables from scope

    val with_local_scope : (unit -> 'a) -> 'a

    Evaluate in a narrowed type-variable scope

    type poly_univars
    val make_poly_univars : string list -> poly_univars

    remember that a list of strings connotes univars; this must always be paired with a check_poly_univars.

    val check_poly_univars : +TyVarEnv (ocaml.Typetexp.TyVarEnv)

    Module Typetexp.TyVarEnv

    val reset : unit -> unit

    removes all type variables from scope

    val with_local_scope : (unit -> 'a) -> 'a

    Evaluate in a narrowed type-variable scope

    type poly_univars
    val make_poly_univars : string list -> poly_univars

    remember that a list of strings connotes univars; this must always be paired with a check_poly_univars.

    val check_poly_univars : Env.t -> Location.t -> poly_univars -> @@ -7,4 +7,4 @@ Env.t -> Location.t -> poly_univars -> - Types.type_expr list

    Same as check_poly_univars, but instantiates the resulting type scheme (i.e. variables become Tvar rather than Tunivar)

    \ No newline at end of file + Types.type_expr list

    Same as check_poly_univars, but instantiates the resulting type scheme (i.e. variables become Tvar rather than Tunivar)

    diff --git a/ocaml/Typetexp/index.html b/ocaml/Typetexp/index.html index d1daca4..f7c403c 100644 --- a/ocaml/Typetexp/index.html +++ b/ocaml/Typetexp/index.html @@ -1,8 +1,8 @@ -Typetexp (ocaml.Typetexp)

    Module Typetexp

    module TyVarEnv : sig ... end
    val valid_tyvar_name : string -> bool
    val transl_simple_type : +Typetexp (ocaml.Typetexp)

    Module Typetexp

    module TyVarEnv : sig ... end
    val valid_tyvar_name : string -> bool
    val transl_simple_type : Env.t -> - ?univars:TyVarEnv.poly_univars -> - closed:bool -> + ?univars:TyVarEnv.poly_univars -> + closed:bool -> Parsetree.core_type -> Typedtree.core_type
    val transl_simple_type_univars : Env.t -> @@ -12,4 +12,4 @@ Parsetree.core_type -> Typedtree.core_type * Types.type_expr * (unit -> unit)
    val transl_type_scheme : Env.t -> Parsetree.core_type -> Typedtree.core_type
    val transl_type_param : Env.t -> Parsetree.core_type -> Typedtree.core_type
    exception Already_bound
    type error =
    1. | Unbound_type_variable of string * string list
    2. | No_type_wildcards
    3. | Undefined_type_constructor of Path.t
    4. | Type_arity_mismatch of Longident.t * int * int
    5. | Bound_type_variable of string
    6. | Recursive_type
    7. | Unbound_row_variable of Longident.t
    8. | Type_mismatch of Errortrace.unification_error
    9. | Alias_type_mismatch of Errortrace.unification_error
    10. | Present_has_conjunction of string
    11. | Present_has_no_type of string
    12. | Constructor_mismatch of Types.type_expr * Types.type_expr
    13. | Not_a_variant of Types.type_expr
    14. | Variant_tags of string * string
    15. | Invalid_variable_name of string
    16. | Cannot_quantify of string * Types.type_expr
    17. | Multiple_constraints_on_type of Longident.t
    18. | Method_mismatch of string * Types.type_expr * Types.type_expr
    19. | Opened_object of Path.t option
    20. | Not_an_object of Types.type_expr
    exception Error of Location.t * Env.t * error
    val report_error : Env.t -> Stdlib.Format.formatter -> error -> unit
    val transl_modtype_longident : (Location.t -> Env.t -> Longident.t -> Path.t) ref
    val transl_modtype : - (Env.t -> Parsetree.module_type -> Typedtree.module_type) ref
    \ No newline at end of file + (Env.t -> Parsetree.module_type -> Typedtree.module_type) ref
    diff --git a/ocaml/Un_anf/index.html b/ocaml/Un_anf/index.html index 61be57d..2d34541 100644 --- a/ocaml/Un_anf/index.html +++ b/ocaml/Un_anf/index.html @@ -1,6 +1,6 @@ -Un_anf (ocaml.Un_anf)

    Module Un_anf

    val apply : - what:Symbol.t -> - ppf_dump:Stdlib.Format.formatter -> +Un_anf (ocaml.Un_anf)

    Module Un_anf

    val apply : + what:Symbol.t -> + ppf_dump:Stdlib.Format.formatter -> Clambda.ulambda -> - Clambda.ulambda

    Expand ANF-like constructs so that pattern matches in Cmmgen will work correctly.

    \ No newline at end of file + Clambda.ulambda

    Expand ANF-like constructs so that pattern matches in Cmmgen will work correctly.

    diff --git a/ocaml/Unbox_closures/index.html b/ocaml/Unbox_closures/index.html index ff2c7f2..568f65e 100644 --- a/ocaml/Unbox_closures/index.html +++ b/ocaml/Unbox_closures/index.html @@ -1,11 +1,11 @@ -Unbox_closures (ocaml.Unbox_closures)

    Module Unbox_closures

    Turn free variables of closures into specialised arguments. The aim is to cause the closure to become closed.

    val rewrite_set_of_closures : - env:Inline_and_simplify_aux.Env.t -> - duplicate_function: - (env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - fun_var:Variable.t -> - new_fun_var:Variable.t -> +Unbox_closures (ocaml.Unbox_closures)

    Module Unbox_closures

    Turn free variables of closures into specialised arguments. The aim is to cause the closure to become closed.

    val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> - set_of_closures:Flambda.set_of_closures -> - (Flambda.expr * Inlining_cost.Benefit.t) option
    \ No newline at end of file + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option
    diff --git a/ocaml/Unbox_free_vars_of_closures/index.html b/ocaml/Unbox_free_vars_of_closures/index.html index 6ec1a90..83743b1 100644 --- a/ocaml/Unbox_free_vars_of_closures/index.html +++ b/ocaml/Unbox_free_vars_of_closures/index.html @@ -1,5 +1,5 @@ -Unbox_free_vars_of_closures (ocaml.Unbox_free_vars_of_closures)

    Module Unbox_free_vars_of_closures

    When approximations of free variables of closures indicate that they are closures or blocks, rewrite projections from such blocks to new variables (which become free in the closures), with the defining expressions of the projections lifted out of the corresponding sets of closures.

    \ No newline at end of file +Unbox_free_vars_of_closures (ocaml.Unbox_free_vars_of_closures)

    Module Unbox_free_vars_of_closures

    When approximations of free variables of closures indicate that they are closures or blocks, rewrite projections from such blocks to new variables (which become free in the closures), with the defining expressions of the projections lifted out of the corresponding sets of closures.

    diff --git a/ocaml/Unbox_specialised_args/index.html b/ocaml/Unbox_specialised_args/index.html index 350bf5c..d17d860 100644 --- a/ocaml/Unbox_specialised_args/index.html +++ b/ocaml/Unbox_specialised_args/index.html @@ -1,11 +1,11 @@ -Unbox_specialised_args (ocaml.Unbox_specialised_args)

    Module Unbox_specialised_args

    When approximations of specialised arguments indicate that they are closures or blocks, add more specialised arguments corresponding to the projections from such blocks (with definitions of such projections lifted out), such that the original specialised arguments may later be eliminated.

    This in particular enables elimination of closure allocations in examples such as:

    let rec map f = function | -> | a::l -> let r = f a in r :: map f l

    let g x = map (fun y -> x + y) 1; 2; 3; 4

    Here, the specialised version of map initially has a specialised argument f; and upon inlining there will be a projection of x from the closure of f. This pass adds a new specialised argument to carry that projection, at which point the closure of f is redundant.

    val rewrite_set_of_closures : - env:Inline_and_simplify_aux.Env.t -> - duplicate_function: - (env:Inline_and_simplify_aux.Env.t -> - set_of_closures:Flambda.set_of_closures -> - fun_var:Variable.t -> - new_fun_var:Variable.t -> +Unbox_specialised_args (ocaml.Unbox_specialised_args)

    Module Unbox_specialised_args

    When approximations of specialised arguments indicate that they are closures or blocks, add more specialised arguments corresponding to the projections from such blocks (with definitions of such projections lifted out), such that the original specialised arguments may later be eliminated.

    This in particular enables elimination of closure allocations in examples such as:

    let rec map f = function | -> | a::l -> let r = f a in r :: map f l

    let g x = map (fun y -> x + y) 1; 2; 3; 4

    Here, the specialised version of map initially has a specialised argument f; and upon inlining there will be a projection of x from the closure of f. This pass adds a new specialised argument to carry that projection, at which point the closure of f is redundant.

    val rewrite_set_of_closures : + env:Inline_and_simplify_aux.Env.t -> + duplicate_function: + (env:Inline_and_simplify_aux.Env.t -> + set_of_closures:Flambda.set_of_closures -> + fun_var:Variable.t -> + new_fun_var:Variable.t -> Flambda.function_declaration * Flambda.specialised_to Variable.Map.t) -> - set_of_closures:Flambda.set_of_closures -> - (Flambda.expr * Inlining_cost.Benefit.t) option
    \ No newline at end of file + set_of_closures:Flambda.set_of_closures -> + (Flambda.expr * Inlining_cost.Benefit.t) option
    diff --git a/ocaml/Unix/LargeFile/index.html b/ocaml/Unix/LargeFile/index.html index 9de3604..f0ab7c5 100644 --- a/ocaml/Unix/LargeFile/index.html +++ b/ocaml/Unix/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (ocaml.Unix.LargeFile)

    Module Unix.LargeFile

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    val lseek : file_descr -> int64 -> seek_command -> int64

    See lseek.

    val truncate : string -> int64 -> unit

    See truncate.

    val ftruncate : file_descr -> int64 -> unit

    See ftruncate.

    type stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int64;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }
    val stat : string -> stats
    val lstat : string -> stats
    val fstat : file_descr -> stats
    \ No newline at end of file +LargeFile (ocaml.Unix.LargeFile)

    Module Unix.LargeFile

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    val lseek : file_descr -> int64 -> seek_command -> int64

    See lseek.

    val truncate : string -> int64 -> unit

    See truncate.

    val ftruncate : file_descr -> int64 -> unit

    See ftruncate.

    type stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int64;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }
    val stat : string -> stats
    val lstat : string -> stats
    val fstat : file_descr -> stats
    diff --git a/ocaml/Unix/index.html b/ocaml/Unix/index.html index e727b46..69a99bc 100644 --- a/ocaml/Unix/index.html +++ b/ocaml/Unix/index.html @@ -1,12 +1,12 @@ -Unix (ocaml.Unix)

    Module Unix

    Interface to the Unix system.

    To use the labeled version of this module, add module Unix = UnixLabels in your implementation.

    Note: all the functions of this module (except error_message and handle_unix_error) are liable to raise the Unix_error exception whenever the underlying system call signals an error.

    Error report

    type error =
    1. | E2BIG
      (*

      Argument list too long

      *)
    2. | EACCES
      (*

      Permission denied

      *)
    3. | EAGAIN
      (*

      Resource temporarily unavailable; try again

      *)
    4. | EBADF
      (*

      Bad file descriptor

      *)
    5. | EBUSY
      (*

      Resource unavailable

      *)
    6. | ECHILD
      (*

      No child process

      *)
    7. | EDEADLK
      (*

      Resource deadlock would occur

      *)
    8. | EDOM
      (*

      Domain error for math functions, etc.

      *)
    9. | EEXIST
      (*

      File exists

      *)
    10. | EFAULT
      (*

      Bad address

      *)
    11. | EFBIG
      (*

      File too large

      *)
    12. | EINTR
      (*

      Function interrupted by signal

      *)
    13. | EINVAL
      (*

      Invalid argument

      *)
    14. | EIO
      (*

      Hardware I/O error

      *)
    15. | EISDIR
      (*

      Is a directory

      *)
    16. | EMFILE
      (*

      Too many open files by the process

      *)
    17. | ENAMETOOLONG
      (*

      Filename too long

      *)
    18. | ENFILE
      (*

      Too many open files in the system

      *)
    19. | ENODEV
      (*

      No such device

      *)
    20. | ENOENT
      (*

      No such file or directory

      *)
    21. | ENOEXEC
      (*

      Not an executable file

      *)
    22. | ENOLCK
      (*

      No locks available

      *)
    23. | ENOMEM
      (*

      Not enough memory

      *)
    24. | ENOSPC
      (*

      No space left on device

      *)
    25. | ENOSYS
      (*

      Function not supported

      *)
    26. | ENOTDIR
      (*

      Not a directory

      *)
    27. | ENOTEMPTY
      (*

      Directory not empty

      *)
    28. | ENOTTY
      (*

      Inappropriate I/O control operation

      *)
    29. | ENXIO
      (*

      No such device or address

      *)
    30. | EPERM
      (*

      Operation not permitted

      *)
    31. | EPIPE
      (*

      Broken pipe

      *)
    32. | ERANGE
      (*

      Result too large

      *)
    33. | EROFS
      (*

      Read-only file system

      *)
    34. | ESPIPE
      (*

      Invalid seek e.g. on a pipe

      *)
    35. | ESRCH
      (*

      No such process

      *)
    36. | EXDEV
      (*

      Invalid link

      *)
    37. | EWOULDBLOCK
      (*

      Operation would block

      *)
    38. | EINPROGRESS
      (*

      Operation now in progress

      *)
    39. | EALREADY
      (*

      Operation already in progress

      *)
    40. | ENOTSOCK
      (*

      Socket operation on non-socket

      *)
    41. | EDESTADDRREQ
      (*

      Destination address required

      *)
    42. | EMSGSIZE
      (*

      Message too long

      *)
    43. | EPROTOTYPE
      (*

      Protocol wrong type for socket

      *)
    44. | ENOPROTOOPT
      (*

      Protocol not available

      *)
    45. | EPROTONOSUPPORT
      (*

      Protocol not supported

      *)
    46. | ESOCKTNOSUPPORT
      (*

      Socket type not supported

      *)
    47. | EOPNOTSUPP
      (*

      Operation not supported on socket

      *)
    48. | EPFNOSUPPORT
      (*

      Protocol family not supported

      *)
    49. | EAFNOSUPPORT
      (*

      Address family not supported by protocol family

      *)
    50. | EADDRINUSE
      (*

      Address already in use

      *)
    51. | EADDRNOTAVAIL
      (*

      Can't assign requested address

      *)
    52. | ENETDOWN
      (*

      Network is down

      *)
    53. | ENETUNREACH
      (*

      Network is unreachable

      *)
    54. | ENETRESET
      (*

      Network dropped connection on reset

      *)
    55. | ECONNABORTED
      (*

      Software caused connection abort

      *)
    56. | ECONNRESET
      (*

      Connection reset by peer

      *)
    57. | ENOBUFS
      (*

      No buffer space available

      *)
    58. | EISCONN
      (*

      Socket is already connected

      *)
    59. | ENOTCONN
      (*

      Socket is not connected

      *)
    60. | ESHUTDOWN
      (*

      Can't send after socket shutdown

      *)
    61. | ETOOMANYREFS
      (*

      Too many references: can't splice

      *)
    62. | ETIMEDOUT
      (*

      Connection timed out

      *)
    63. | ECONNREFUSED
      (*

      Connection refused

      *)
    64. | EHOSTDOWN
      (*

      Host is down

      *)
    65. | EHOSTUNREACH
      (*

      No route to host

      *)
    66. | ELOOP
      (*

      Too many levels of symbolic links

      *)
    67. | EOVERFLOW
      (*

      File size or position not representable

      *)
    68. | EUNKNOWNERR of int
      (*

      Unknown error

      *)

    The type of error codes. Errors defined in the POSIX standard and additional errors from UNIX98 and BSD. All other errors are mapped to EUNKNOWNERR.

    exception Unix_error of error * string * string

    Raised by the system calls below when an error is encountered. The first component is the error code; the second component is the function name; the third component is the string parameter to the function, if it has one, or the empty string otherwise.

    UnixLabels.Unix_error and Unix.Unix_error are the same, and catching one will catch the other.

    val error_message : error -> string

    Return a string describing the given error code.

    val handle_unix_error : ('a -> 'b) -> 'a -> 'b

    handle_unix_error f x applies f to x and returns the result. If the exception Unix_error is raised, it prints a message describing the error and exits with code 2.

    Access to the process environment

    val environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. The returned array is empty if the process has special privileges.

    val unsafe_environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. Unlike environment, this function returns a populated array even if the process has special privileges. See the documentation for unsafe_getenv for more details.

    • since 4.06 (4.12 in UnixLabels)
    val getenv : string -> string

    Return the value associated to a variable in the process environment, unless the process has special privileges.

    • raises Not_found

      if the variable is unbound or the process has special privileges.

      This function is identical to Sys.getenv.

    val unsafe_getenv : string -> string

    Return the value associated to a variable in the process environment.

    Unlike getenv, this function returns the value even if the process has special privileges. It is considered unsafe because the programmer of a setuid or setgid program must be careful to avoid using maliciously crafted environment variables in the search path for executables, the locations for temporary files or logs, and the like.

    • raises Not_found

      if the variable is unbound.

    • since 4.06
    val putenv : string -> string -> unit

    putenv name value sets the value associated to a variable in the process environment. name is the name of the environment variable, and value its new associated value.

    Process handling

    type process_status =
    1. | WEXITED of int
      (*

      The process terminated normally by exit; the argument is the return code.

      *)
    2. | WSIGNALED of int
      (*

      The process was killed by a signal; the argument is the signal number.

      *)
    3. | WSTOPPED of int
      (*

      The process was stopped by a signal; the argument is the signal number.

      *)

    The termination status of a process. See module Sys for the definitions of the standard signal numbers. Note that they are not the numbers used by the OS.

    On Windows: only WEXITED is used (as there are no inter-process signals) but with specific return codes to indicate special termination causes. Look for NTSTATUS values in the Windows documentation to decode such error return codes. In particular, STATUS_ACCESS_VIOLATION error code is the 32-bit 0xC0000005: as Int32.of_int 0xC0000005 is -1073741819, WEXITED -1073741819 is the Windows equivalent of WSIGNALED Sys.sigsegv.

    type wait_flag =
    1. | WNOHANG
      (*

      Do not block if no child has died yet, but immediately return with a pid equal to 0.

      *)
    2. | WUNTRACED
      (*

      Report also the children that receive stop signals.

      *)

    Flags for waitpid.

    val execv : string -> string array -> 'a

    execv prog args execute the program in file prog, with the arguments args, and the current process environment. These execv* functions never return: on success, the current program is replaced by the new one.

    On Windows: the CRT simply spawns a new process and exits the current one. This will have unwanted consequences if e.g. another process is waiting on the current one. Using create_process or one of the open_process_* functions instead is recommended.

    • raises Unix_error

      on failure

    val execve : string -> string array -> string array -> 'a

    Same as execv, except that the third argument provides the environment to the program executed.

    val execvp : string -> string array -> 'a

    Same as execv, except that the program is searched in the path.

    val execvpe : string -> string array -> string array -> 'a

    Same as execve, except that the program is searched in the path.

    val fork : unit -> int

    Fork a new process. The returned integer is 0 for the child process, the pid of the child process for the parent process.

    • raises Invalid_argument

      on Windows. Use create_process or threads instead.

    val wait : unit -> int * process_status

    Wait until one of the children processes die, and return its pid and termination status.

    • raises Invalid_argument

      on Windows. Use waitpid instead.

    val waitpid : wait_flag list -> int -> int * process_status

    Same as wait, but waits for the child process whose pid is given. A pid of -1 means wait for any child. A pid of 0 means wait for any child in the same process group as the current process. Negative pid arguments represent process groups. The list of options indicates whether waitpid should return immediately without waiting, and whether it should report stopped children.

    On Windows: can only wait for a given PID, not any child process.

    val system : string -> process_status

    Execute the given command, wait until it terminates, and return its termination status. The string is interpreted by the shell /bin/sh (or the command interpreter cmd.exe on Windows) and therefore can contain redirections, quotes, variables, etc. To properly quote whitespace and shell special characters occurring in file names or command arguments, the use of Filename.quote_command is recommended. The result WEXITED 127 indicates that the shell couldn't be executed.

    val _exit : int -> 'a

    Terminate the calling process immediately, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. Unlike Stdlib.exit, Unix._exit performs no finalization whatsoever: functions registered with Stdlib.at_exit are not called, input/output channels are not flushed, and the C run-time system is not finalized either.

    The typical use of Unix._exit is after a Unix.fork operation, when the child process runs into a fatal error and must exit. In this case, it is preferable to not perform any finalization action in the child process, as these actions could interfere with similar actions performed by the parent process. For example, output channels should not be flushed by the child process, as the parent process may flush them again later, resulting in duplicate output.

    • since 4.12
    val getpid : unit -> int

    Return the pid of the process.

    val getppid : unit -> int

    Return the pid of the parent process.

    • raises Invalid_argument

      on Windows (because it is meaningless)

    val nice : int -> int

    Change the process priority. The integer argument is added to the ``nice'' value. (Higher values of the ``nice'' value mean lower priorities.) Return the new nice value.

    • raises Invalid_argument

      on Windows

    Basic file input/output

    type file_descr

    The abstract type of file descriptors.

    val stdin : file_descr

    File descriptor for standard input.

    val stdout : file_descr

    File descriptor for standard output.

    val stderr : file_descr

    File descriptor for standard error.

    type open_flag =
    1. | O_RDONLY
      (*

      Open for reading

      *)
    2. | O_WRONLY
      (*

      Open for writing

      *)
    3. | O_RDWR
      (*

      Open for reading and writing

      *)
    4. | O_NONBLOCK
      (*

      Open in non-blocking mode

      *)
    5. | O_APPEND
      (*

      Open for append

      *)
    6. | O_CREAT
      (*

      Create if nonexistent

      *)
    7. | O_TRUNC
      (*

      Truncate to 0 length if existing

      *)
    8. | O_EXCL
      (*

      Fail if existing

      *)
    9. | O_NOCTTY
      (*

      Don't make this dev a controlling tty

      *)
    10. | O_DSYNC
      (*

      Writes complete as `Synchronised I/O data integrity completion'

      *)
    11. | O_SYNC
      (*

      Writes complete as `Synchronised I/O file integrity completion'

      *)
    12. | O_RSYNC
      (*

      Reads complete as writes (depending on O_SYNC/O_DSYNC)

      *)
    13. | O_SHARE_DELETE
      (*

      Windows only: allow the file to be deleted while still open

      *)
    14. | O_CLOEXEC
      (*

      Set the close-on-exec flag on the descriptor returned by openfile. See set_close_on_exec for more information.

      *)
    15. | O_KEEPEXEC
      (*

      Clear the close-on-exec flag. This is currently the default.

      *)

    The flags to openfile.

    type file_perm = int

    The type of file access rights, e.g. 0o640 is read and write for user, read for group, none for others

    val openfile : string -> open_flag list -> file_perm -> file_descr

    Open the named file with the given flags. Third argument is the permissions to give to the file if it is created (see umask). Return a file descriptor on the named file.

    val close : file_descr -> unit

    Close a file descriptor.

    val fsync : file_descr -> unit

    Flush file buffers to disk.

    • since 4.08 (4.12 in UnixLabels)
    val read : file_descr -> bytes -> int -> int -> int

    read fd buf pos len reads len bytes from descriptor fd, storing them in byte sequence buf, starting at position pos in buf. Return the number of bytes actually read.

    val write : file_descr -> bytes -> int -> int -> int

    write fd buf pos len writes len bytes to descriptor fd, taking them from byte sequence buf, starting at position pos in buff. Return the number of bytes actually written. write repeats the writing operation until all bytes have been written or an error occurs.

    val single_write : file_descr -> bytes -> int -> int -> int

    Same as write, but attempts to write only once. Thus, if an error occurs, single_write guarantees that no data has been written.

    val write_substring : file_descr -> string -> int -> int -> int

    Same as write, but take the data from a string instead of a byte sequence.

    • since 4.02
    val single_write_substring : file_descr -> string -> int -> int -> int

    Same as single_write, but take the data from a string instead of a byte sequence.

    • since 4.02

    Interfacing with the standard input/output library

    val in_channel_of_descr : file_descr -> in_channel

    Create an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.

    Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.

    Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.

    val out_channel_of_descr : file_descr -> out_channel

    Create an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.

    Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.

    Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.

    val descr_of_in_channel : in_channel -> file_descr

    Return the descriptor corresponding to an input channel.

    val descr_of_out_channel : out_channel -> file_descr

    Return the descriptor corresponding to an output channel.

    Seeking and truncating

    type seek_command =
    1. | SEEK_SET
      (*

      indicates positions relative to the beginning of the file

      *)
    2. | SEEK_CUR
      (*

      indicates positions relative to the current position

      *)
    3. | SEEK_END
      (*

      indicates positions relative to the end of the file

      *)

    Positioning modes for lseek.

    val lseek : file_descr -> int -> seek_command -> int

    Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

    val truncate : string -> int -> unit

    Truncates the named file to the given size.

    val ftruncate : file_descr -> int -> unit

    Truncates the file corresponding to the given descriptor to the given size.

    File status

    type file_kind =
    1. | S_REG
      (*

      Regular file

      *)
    2. | S_DIR
      (*

      Directory

      *)
    3. | S_CHR
      (*

      Character device

      *)
    4. | S_BLK
      (*

      Block device

      *)
    5. | S_LNK
      (*

      Symbolic link

      *)
    6. | S_FIFO
      (*

      Named pipe

      *)
    7. | S_SOCK
      (*

      Socket

      *)
    type stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }

    The information returned by the stat calls.

    val stat : string -> stats

    Return the information for the named file.

    val lstat : string -> stats

    Same as stat, but in case the file is a symbolic link, return the information for the link itself.

    val fstat : file_descr -> stats

    Return the information for the file associated with the given descriptor.

    val isatty : file_descr -> bool

    Return true if the given file descriptor refers to a terminal or console window, false otherwise.

    File operations on large files

    module LargeFile : sig ... end

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    Mapping files into memory

    val map_file : +Unix (ocaml.Unix)

    Module Unix

    Interface to the Unix system.

    To use the labeled version of this module, add module Unix = UnixLabels in your implementation.

    Note: all the functions of this module (except error_message and handle_unix_error) are liable to raise the Unix_error exception whenever the underlying system call signals an error.

    Error report

    type error =
    1. | E2BIG
      (*

      Argument list too long

      *)
    2. | EACCES
      (*

      Permission denied

      *)
    3. | EAGAIN
      (*

      Resource temporarily unavailable; try again

      *)
    4. | EBADF
      (*

      Bad file descriptor

      *)
    5. | EBUSY
      (*

      Resource unavailable

      *)
    6. | ECHILD
      (*

      No child process

      *)
    7. | EDEADLK
      (*

      Resource deadlock would occur

      *)
    8. | EDOM
      (*

      Domain error for math functions, etc.

      *)
    9. | EEXIST
      (*

      File exists

      *)
    10. | EFAULT
      (*

      Bad address

      *)
    11. | EFBIG
      (*

      File too large

      *)
    12. | EINTR
      (*

      Function interrupted by signal

      *)
    13. | EINVAL
      (*

      Invalid argument

      *)
    14. | EIO
      (*

      Hardware I/O error

      *)
    15. | EISDIR
      (*

      Is a directory

      *)
    16. | EMFILE
      (*

      Too many open files by the process

      *)
    17. | ENAMETOOLONG
      (*

      Filename too long

      *)
    18. | ENFILE
      (*

      Too many open files in the system

      *)
    19. | ENODEV
      (*

      No such device

      *)
    20. | ENOENT
      (*

      No such file or directory

      *)
    21. | ENOEXEC
      (*

      Not an executable file

      *)
    22. | ENOLCK
      (*

      No locks available

      *)
    23. | ENOMEM
      (*

      Not enough memory

      *)
    24. | ENOSPC
      (*

      No space left on device

      *)
    25. | ENOSYS
      (*

      Function not supported

      *)
    26. | ENOTDIR
      (*

      Not a directory

      *)
    27. | ENOTEMPTY
      (*

      Directory not empty

      *)
    28. | ENOTTY
      (*

      Inappropriate I/O control operation

      *)
    29. | ENXIO
      (*

      No such device or address

      *)
    30. | EPERM
      (*

      Operation not permitted

      *)
    31. | EPIPE
      (*

      Broken pipe

      *)
    32. | ERANGE
      (*

      Result too large

      *)
    33. | EROFS
      (*

      Read-only file system

      *)
    34. | ESPIPE
      (*

      Invalid seek e.g. on a pipe

      *)
    35. | ESRCH
      (*

      No such process

      *)
    36. | EXDEV
      (*

      Invalid link

      *)
    37. | EWOULDBLOCK
      (*

      Operation would block

      *)
    38. | EINPROGRESS
      (*

      Operation now in progress

      *)
    39. | EALREADY
      (*

      Operation already in progress

      *)
    40. | ENOTSOCK
      (*

      Socket operation on non-socket

      *)
    41. | EDESTADDRREQ
      (*

      Destination address required

      *)
    42. | EMSGSIZE
      (*

      Message too long

      *)
    43. | EPROTOTYPE
      (*

      Protocol wrong type for socket

      *)
    44. | ENOPROTOOPT
      (*

      Protocol not available

      *)
    45. | EPROTONOSUPPORT
      (*

      Protocol not supported

      *)
    46. | ESOCKTNOSUPPORT
      (*

      Socket type not supported

      *)
    47. | EOPNOTSUPP
      (*

      Operation not supported on socket

      *)
    48. | EPFNOSUPPORT
      (*

      Protocol family not supported

      *)
    49. | EAFNOSUPPORT
      (*

      Address family not supported by protocol family

      *)
    50. | EADDRINUSE
      (*

      Address already in use

      *)
    51. | EADDRNOTAVAIL
      (*

      Can't assign requested address

      *)
    52. | ENETDOWN
      (*

      Network is down

      *)
    53. | ENETUNREACH
      (*

      Network is unreachable

      *)
    54. | ENETRESET
      (*

      Network dropped connection on reset

      *)
    55. | ECONNABORTED
      (*

      Software caused connection abort

      *)
    56. | ECONNRESET
      (*

      Connection reset by peer

      *)
    57. | ENOBUFS
      (*

      No buffer space available

      *)
    58. | EISCONN
      (*

      Socket is already connected

      *)
    59. | ENOTCONN
      (*

      Socket is not connected

      *)
    60. | ESHUTDOWN
      (*

      Can't send after socket shutdown

      *)
    61. | ETOOMANYREFS
      (*

      Too many references: can't splice

      *)
    62. | ETIMEDOUT
      (*

      Connection timed out

      *)
    63. | ECONNREFUSED
      (*

      Connection refused

      *)
    64. | EHOSTDOWN
      (*

      Host is down

      *)
    65. | EHOSTUNREACH
      (*

      No route to host

      *)
    66. | ELOOP
      (*

      Too many levels of symbolic links

      *)
    67. | EOVERFLOW
      (*

      File size or position not representable

      *)
    68. | EUNKNOWNERR of int
      (*

      Unknown error

      *)

    The type of error codes. Errors defined in the POSIX standard and additional errors from UNIX98 and BSD. All other errors are mapped to EUNKNOWNERR.

    exception Unix_error of error * string * string

    Raised by the system calls below when an error is encountered. The first component is the error code; the second component is the function name; the third component is the string parameter to the function, if it has one, or the empty string otherwise.

    UnixLabels.Unix_error and Unix.Unix_error are the same, and catching one will catch the other.

    val error_message : error -> string

    Return a string describing the given error code.

    val handle_unix_error : ('a -> 'b) -> 'a -> 'b

    handle_unix_error f x applies f to x and returns the result. If the exception Unix_error is raised, it prints a message describing the error and exits with code 2.

    Access to the process environment

    val environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. The returned array is empty if the process has special privileges.

    val unsafe_environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. Unlike environment, this function returns a populated array even if the process has special privileges. See the documentation for unsafe_getenv for more details.

    • since 4.06 (4.12 in UnixLabels)
    val getenv : string -> string

    Return the value associated to a variable in the process environment, unless the process has special privileges.

    • raises Not_found

      if the variable is unbound or the process has special privileges.

    This function is identical to Sys.getenv.

    val unsafe_getenv : string -> string

    Return the value associated to a variable in the process environment.

    Unlike getenv, this function returns the value even if the process has special privileges. It is considered unsafe because the programmer of a setuid or setgid program must be careful to avoid using maliciously crafted environment variables in the search path for executables, the locations for temporary files or logs, and the like.

    • raises Not_found

      if the variable is unbound.

    • since 4.06
    val putenv : string -> string -> unit

    putenv name value sets the value associated to a variable in the process environment. name is the name of the environment variable, and value its new associated value.

    Process handling

    type process_status =
    1. | WEXITED of int
      (*

      The process terminated normally by exit; the argument is the return code.

      *)
    2. | WSIGNALED of int
      (*

      The process was killed by a signal; the argument is the signal number.

      *)
    3. | WSTOPPED of int
      (*

      The process was stopped by a signal; the argument is the signal number.

      *)

    The termination status of a process. See module Sys for the definitions of the standard signal numbers. Note that they are not the numbers used by the OS.

    On Windows: only WEXITED is used (as there are no inter-process signals) but with specific return codes to indicate special termination causes. Look for NTSTATUS values in the Windows documentation to decode such error return codes. In particular, STATUS_ACCESS_VIOLATION error code is the 32-bit 0xC0000005: as Int32.of_int 0xC0000005 is -1073741819, WEXITED -1073741819 is the Windows equivalent of WSIGNALED Sys.sigsegv.

    type wait_flag =
    1. | WNOHANG
      (*

      Do not block if no child has died yet, but immediately return with a pid equal to 0.

      *)
    2. | WUNTRACED
      (*

      Report also the children that receive stop signals.

      *)

    Flags for waitpid.

    val execv : string -> string array -> 'a

    execv prog args execute the program in file prog, with the arguments args, and the current process environment. These execv* functions never return: on success, the current program is replaced by the new one.

    On Windows: the CRT simply spawns a new process and exits the current one. This will have unwanted consequences if e.g. another process is waiting on the current one. Using create_process or one of the open_process_* functions instead is recommended.

    val execve : string -> string array -> string array -> 'a

    Same as execv, except that the third argument provides the environment to the program executed.

    val execvp : string -> string array -> 'a

    Same as execv, except that the program is searched in the path.

    val execvpe : string -> string array -> string array -> 'a

    Same as execve, except that the program is searched in the path.

    val fork : unit -> int

    Fork a new process. The returned integer is 0 for the child process, the pid of the child process for the parent process.

    • raises Invalid_argument

      on Windows. Use create_process or threads instead.

    val wait : unit -> int * process_status

    Wait until one of the children processes die, and return its pid and termination status.

    • raises Invalid_argument

      on Windows. Use waitpid instead.

    val waitpid : wait_flag list -> int -> int * process_status

    Same as wait, but waits for the child process whose pid is given. A pid of -1 means wait for any child. A pid of 0 means wait for any child in the same process group as the current process. Negative pid arguments represent process groups. The list of options indicates whether waitpid should return immediately without waiting, and whether it should report stopped children.

    On Windows: can only wait for a given PID, not any child process.

    val system : string -> process_status

    Execute the given command, wait until it terminates, and return its termination status. The string is interpreted by the shell /bin/sh (or the command interpreter cmd.exe on Windows) and therefore can contain redirections, quotes, variables, etc. To properly quote whitespace and shell special characters occurring in file names or command arguments, the use of Filename.quote_command is recommended. The result WEXITED 127 indicates that the shell couldn't be executed.

    val _exit : int -> 'a

    Terminate the calling process immediately, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. Unlike Stdlib.exit, Unix._exit performs no finalization whatsoever: functions registered with Stdlib.at_exit are not called, input/output channels are not flushed, and the C run-time system is not finalized either.

    The typical use of Unix._exit is after a Unix.fork operation, when the child process runs into a fatal error and must exit. In this case, it is preferable to not perform any finalization action in the child process, as these actions could interfere with similar actions performed by the parent process. For example, output channels should not be flushed by the child process, as the parent process may flush them again later, resulting in duplicate output.

    • since 4.12
    val getpid : unit -> int

    Return the pid of the process.

    val getppid : unit -> int

    Return the pid of the parent process.

    • raises Invalid_argument

      on Windows (because it is meaningless)

    val nice : int -> int

    Change the process priority. The integer argument is added to the ``nice'' value. (Higher values of the ``nice'' value mean lower priorities.) Return the new nice value.

    • raises Invalid_argument

      on Windows

    Basic file input/output

    type file_descr

    The abstract type of file descriptors.

    val stdin : file_descr

    File descriptor for standard input.

    val stdout : file_descr

    File descriptor for standard output.

    val stderr : file_descr

    File descriptor for standard error.

    type open_flag =
    1. | O_RDONLY
      (*

      Open for reading

      *)
    2. | O_WRONLY
      (*

      Open for writing

      *)
    3. | O_RDWR
      (*

      Open for reading and writing

      *)
    4. | O_NONBLOCK
      (*

      Open in non-blocking mode

      *)
    5. | O_APPEND
      (*

      Open for append

      *)
    6. | O_CREAT
      (*

      Create if nonexistent

      *)
    7. | O_TRUNC
      (*

      Truncate to 0 length if existing

      *)
    8. | O_EXCL
      (*

      Fail if existing

      *)
    9. | O_NOCTTY
      (*

      Don't make this dev a controlling tty

      *)
    10. | O_DSYNC
      (*

      Writes complete as `Synchronised I/O data integrity completion'

      *)
    11. | O_SYNC
      (*

      Writes complete as `Synchronised I/O file integrity completion'

      *)
    12. | O_RSYNC
      (*

      Reads complete as writes (depending on O_SYNC/O_DSYNC)

      *)
    13. | O_SHARE_DELETE
      (*

      Windows only: allow the file to be deleted while still open

      *)
    14. | O_CLOEXEC
      (*

      Set the close-on-exec flag on the descriptor returned by openfile. See set_close_on_exec for more information.

      *)
    15. | O_KEEPEXEC
      (*

      Clear the close-on-exec flag. This is currently the default.

      *)

    The flags to openfile.

    type file_perm = int

    The type of file access rights, e.g. 0o640 is read and write for user, read for group, none for others

    val openfile : string -> open_flag list -> file_perm -> file_descr

    Open the named file with the given flags. Third argument is the permissions to give to the file if it is created (see umask). Return a file descriptor on the named file.

    val close : file_descr -> unit

    Close a file descriptor.

    val fsync : file_descr -> unit

    Flush file buffers to disk.

    • since 4.08 (4.12 in UnixLabels)
    val read : file_descr -> bytes -> int -> int -> int

    read fd buf pos len reads len bytes from descriptor fd, storing them in byte sequence buf, starting at position pos in buf. Return the number of bytes actually read.

    val write : file_descr -> bytes -> int -> int -> int

    write fd buf pos len writes len bytes to descriptor fd, taking them from byte sequence buf, starting at position pos in buff. Return the number of bytes actually written. write repeats the writing operation until all bytes have been written or an error occurs.

    val single_write : file_descr -> bytes -> int -> int -> int

    Same as write, but attempts to write only once. Thus, if an error occurs, single_write guarantees that no data has been written.

    val write_substring : file_descr -> string -> int -> int -> int

    Same as write, but take the data from a string instead of a byte sequence.

    • since 4.02
    val single_write_substring : file_descr -> string -> int -> int -> int

    Same as single_write, but take the data from a string instead of a byte sequence.

    • since 4.02

    Interfacing with the standard input/output library

    val in_channel_of_descr : file_descr -> in_channel

    Create an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.

    Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.

    Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.

    val out_channel_of_descr : file_descr -> out_channel

    Create an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.

    Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.

    Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.

    val descr_of_in_channel : in_channel -> file_descr

    Return the descriptor corresponding to an input channel.

    val descr_of_out_channel : out_channel -> file_descr

    Return the descriptor corresponding to an output channel.

    Seeking and truncating

    type seek_command =
    1. | SEEK_SET
      (*

      indicates positions relative to the beginning of the file

      *)
    2. | SEEK_CUR
      (*

      indicates positions relative to the current position

      *)
    3. | SEEK_END
      (*

      indicates positions relative to the end of the file

      *)

    Positioning modes for lseek.

    val lseek : file_descr -> int -> seek_command -> int

    Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

    val truncate : string -> int -> unit

    Truncates the named file to the given size.

    val ftruncate : file_descr -> int -> unit

    Truncates the file corresponding to the given descriptor to the given size.

    File status

    type file_kind =
    1. | S_REG
      (*

      Regular file

      *)
    2. | S_DIR
      (*

      Directory

      *)
    3. | S_CHR
      (*

      Character device

      *)
    4. | S_BLK
      (*

      Block device

      *)
    5. | S_LNK
      (*

      Symbolic link

      *)
    6. | S_FIFO
      (*

      Named pipe

      *)
    7. | S_SOCK
      (*

      Socket

      *)
    type stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }

    The information returned by the stat calls.

    val stat : string -> stats

    Return the information for the named file.

    val lstat : string -> stats

    Same as stat, but in case the file is a symbolic link, return the information for the link itself.

    val fstat : file_descr -> stats

    Return the information for the file associated with the given descriptor.

    val isatty : file_descr -> bool

    Return true if the given file descriptor refers to a terminal or console window, false otherwise.

    File operations on large files

    module LargeFile : sig ... end

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    Mapping files into memory

    val map_file : file_descr -> - ?pos:int64 -> + ?pos:int64 -> ('a, 'b) Stdlib.Bigarray.kind -> 'c Stdlib.Bigarray.layout -> bool -> int array -> - ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t

    Memory mapping of a file as a Bigarray. map_file fd kind layout shared dims returns a Bigarray of kind kind, layout layout, and dimensions as specified in dims. The data contained in this Bigarray are the contents of the file referred to by the file descriptor fd (as opened previously with openfile, for example). The optional pos parameter is the byte offset in the file of the data being mapped; it defaults to 0 (map from the beginning of the file).

    If shared is true, all modifications performed on the array are reflected in the file. This requires that fd be opened with write permissions. If shared is false, modifications performed on the array are done in memory only, using copy-on-write of the modified pages; the underlying file is not affected.

    map_file is much more efficient than reading the whole file in a Bigarray, modifying that Bigarray, and writing it afterwards.

    To adjust automatically the dimensions of the Bigarray to the actual size of the file, the major dimension (that is, the first dimension for an array with C layout, and the last dimension for an array with Fortran layout) can be given as -1. map_file then determines the major dimension from the size of the file. The file must contain an integral number of sub-arrays as determined by the non-major dimensions, otherwise Failure is raised.

    If all dimensions of the Bigarray are given, the file size is matched against the size of the Bigarray. If the file is larger than the Bigarray, only the initial portion of the file is mapped to the Bigarray. If the file is smaller than the big array, the file is automatically grown to the size of the Bigarray. This requires write permissions on fd.

    Array accesses are bounds-checked, but the bounds are determined by the initial call to map_file. Therefore, you should make sure no other process modifies the mapped file while you're accessing it, or a SIGBUS signal may be raised. This happens, for instance, if the file is shrunk.

    Invalid_argument or Failure may be raised in cases where argument validation fails.

    • since 4.06

    Operations on file names

    Removes the named file.

    If the named file is a directory, raises:

    • EPERM on POSIX compliant system
    • EISDIR on Linux >= 2.1.132
    • EACCESS on Windows
    val rename : string -> string -> unit

    rename src dst changes the name of a file from src to dst, moving it between directories if needed. If dst already exists, its contents will be replaced with those of src. Depending on the operating system, the metadata (permissions, owner, etc) of dst can either be preserved or be replaced by those of src.

    link ?follow src dst creates a hard link named dst to the file named src.

    • parameter follow

      indicates whether a src symlink is followed or a hardlink to src itself will be created. On Unix systems this is done using the linkat(2) function. If ?follow is not provided, then the link(2) function is used whose behaviour is OS-dependent, but more widely available.

    • raises ENOSYS

      On Unix if ~follow:_ is requested, but linkat is unavailable.

    • raises ENOSYS

      On Windows if ~follow:false is requested.

    val realpath : string -> string

    realpath p is an absolute pathname for p obtained by resolving all extra / characters, relative path segments and symbolic links.

    • since 4.13

    File permissions and ownership

    type access_permission =
    1. | R_OK
      (*

      Read permission

      *)
    2. | W_OK
      (*

      Write permission

      *)
    3. | X_OK
      (*

      Execution permission

      *)
    4. | F_OK
      (*

      File exists

      *)

    Flags for the access call.

    val chmod : string -> file_perm -> unit

    Change the permissions of the named file.

    val fchmod : file_descr -> file_perm -> unit

    Change the permissions of an opened file.

    • raises Invalid_argument

      on Windows

    val chown : string -> int -> int -> unit

    Change the owner uid and owner gid of the named file.

    • raises Invalid_argument

      on Windows

    val fchown : file_descr -> int -> int -> unit

    Change the owner uid and owner gid of an opened file.

    • raises Invalid_argument

      on Windows

    val umask : file_perm -> file_perm

    Set the process's file mode creation mask, and return the previous mask.

    • raises Invalid_argument

      on Windows

    val access : string -> access_permission list -> unit

    Check that the process has the given permissions over the named file.

    On Windows: execute permission X_OK cannot be tested, just tests for read permission instead.

    • raises Unix_error

      otherwise.

    Operations on file descriptors

    val dup : ?cloexec:bool -> file_descr -> file_descr

    Return a new file descriptor referencing the same file as the given descriptor. See set_close_on_exec for documentation on the cloexec optional argument.

    val dup2 : ?cloexec:bool -> file_descr -> file_descr -> unit

    dup2 src dst duplicates src to dst, closing dst if already opened. See set_close_on_exec for documentation on the cloexec optional argument.

    val set_nonblock : file_descr -> unit

    Set the ``non-blocking'' flag on the given descriptor. When the non-blocking flag is set, reading on a descriptor on which there is temporarily no data available raises the EAGAIN or EWOULDBLOCK error instead of blocking; writing on a descriptor on which there is temporarily no room for writing also raises EAGAIN or EWOULDBLOCK.

    val clear_nonblock : file_descr -> unit

    Clear the ``non-blocking'' flag on the given descriptor. See set_nonblock.

    val set_close_on_exec : file_descr -> unit

    Set the ``close-on-exec'' flag on the given descriptor. A descriptor with the close-on-exec flag is automatically closed when the current process starts another program with one of the exec, create_process and open_process functions.

    It is often a security hole to leak file descriptors opened on, say, a private file to an external program: the program, then, gets access to the private file and can do bad things with it. Hence, it is highly recommended to set all file descriptors ``close-on-exec'', except in the very few cases where a file descriptor actually needs to be transmitted to another program.

    The best way to set a file descriptor ``close-on-exec'' is to create it in this state. To this end, the openfile function has O_CLOEXEC and O_KEEPEXEC flags to enforce ``close-on-exec'' mode or ``keep-on-exec'' mode, respectively. All other operations in the Unix module that create file descriptors have an optional argument ?cloexec:bool to indicate whether the file descriptor should be created in ``close-on-exec'' mode (by writing ~cloexec:true) or in ``keep-on-exec'' mode (by writing ~cloexec:false). For historical reasons, the default file descriptor creation mode is ``keep-on-exec'', if no cloexec optional argument is given. This is not a safe default, hence it is highly recommended to pass explicit cloexec arguments to operations that create file descriptors.

    The cloexec optional arguments and the O_KEEPEXEC flag were introduced in OCaml 4.05. Earlier, the common practice was to create file descriptors in the default, ``keep-on-exec'' mode, then call set_close_on_exec on those freshly-created file descriptors. This is not as safe as creating the file descriptor in ``close-on-exec'' mode because, in multithreaded programs, a window of vulnerability exists between the time when the file descriptor is created and the time set_close_on_exec completes. If another thread spawns another program during this window, the descriptor will leak, as it is still in the ``keep-on-exec'' mode.

    Regarding the atomicity guarantees given by ~cloexec:true or by the use of the O_CLOEXEC flag: on all platforms it is guaranteed that a concurrently-executing Caml thread cannot leak the descriptor by starting a new process. On Linux, this guarantee extends to concurrently-executing C threads. As of Feb 2017, other operating systems lack the necessary system calls and still expose a window of vulnerability during which a C thread can see the newly-created file descriptor in ``keep-on-exec'' mode.

    val clear_close_on_exec : file_descr -> unit

    Clear the ``close-on-exec'' flag on the given descriptor. See set_close_on_exec.

    Directories

    val mkdir : string -> file_perm -> unit

    Create a directory with the given permissions (see umask).

    val rmdir : string -> unit

    Remove an empty directory.

    val chdir : string -> unit

    Change the process working directory.

    val getcwd : unit -> string

    Return the name of the current working directory.

    val chroot : string -> unit

    Change the process root directory.

    • raises Invalid_argument

      on Windows

    type dir_handle

    The type of descriptors over opened directories.

    val opendir : string -> dir_handle

    Open a descriptor on a directory

    val readdir : dir_handle -> string

    Return the next entry in a directory.

    • raises End_of_file

      when the end of the directory has been reached.

    val rewinddir : dir_handle -> unit

    Reposition the descriptor to the beginning of the directory

    val closedir : dir_handle -> unit

    Close a directory descriptor.

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> file_descr * file_descr

    Create a pipe. The first component of the result is opened for reading, that's the exit to the pipe. The second component is opened for writing, that's the entrance to the pipe. See set_close_on_exec for documentation on the cloexec optional argument.

    val mkfifo : string -> file_perm -> unit

    Create a named pipe with the given permissions (see umask).

    • raises Invalid_argument

      on Windows

    High-level process and redirection management

    val create_process : + ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t

    Memory mapping of a file as a Bigarray. map_file fd kind layout shared dims returns a Bigarray of kind kind, layout layout, and dimensions as specified in dims. The data contained in this Bigarray are the contents of the file referred to by the file descriptor fd (as opened previously with openfile, for example). The optional pos parameter is the byte offset in the file of the data being mapped; it defaults to 0 (map from the beginning of the file).

    If shared is true, all modifications performed on the array are reflected in the file. This requires that fd be opened with write permissions. If shared is false, modifications performed on the array are done in memory only, using copy-on-write of the modified pages; the underlying file is not affected.

    map_file is much more efficient than reading the whole file in a Bigarray, modifying that Bigarray, and writing it afterwards.

    To adjust automatically the dimensions of the Bigarray to the actual size of the file, the major dimension (that is, the first dimension for an array with C layout, and the last dimension for an array with Fortran layout) can be given as -1. map_file then determines the major dimension from the size of the file. The file must contain an integral number of sub-arrays as determined by the non-major dimensions, otherwise Failure is raised.

    If all dimensions of the Bigarray are given, the file size is matched against the size of the Bigarray. If the file is larger than the Bigarray, only the initial portion of the file is mapped to the Bigarray. If the file is smaller than the big array, the file is automatically grown to the size of the Bigarray. This requires write permissions on fd.

    Array accesses are bounds-checked, but the bounds are determined by the initial call to map_file. Therefore, you should make sure no other process modifies the mapped file while you're accessing it, or a SIGBUS signal may be raised. This happens, for instance, if the file is shrunk.

    Invalid_argument or Failure may be raised in cases where argument validation fails.

    • since 4.06

    Operations on file names

    Removes the named file.

    If the named file is a directory, raises:

    • EPERM on POSIX compliant system
    • EISDIR on Linux >= 2.1.132
    • EACCESS on Windows
    val rename : string -> string -> unit

    rename src dst changes the name of a file from src to dst, moving it between directories if needed. If dst already exists, its contents will be replaced with those of src. Depending on the operating system, the metadata (permissions, owner, etc) of dst can either be preserved or be replaced by those of src.

    link ?follow src dst creates a hard link named dst to the file named src.

    • parameter follow

      indicates whether a src symlink is followed or a hardlink to src itself will be created. On Unix systems this is done using the linkat(2) function. If ?follow is not provided, then the link(2) function is used whose behaviour is OS-dependent, but more widely available.

    • raises ENOSYS

      On Unix if ~follow:_ is requested, but linkat is unavailable.

    • raises ENOSYS

      On Windows if ~follow:false is requested.

    val realpath : string -> string

    realpath p is an absolute pathname for p obtained by resolving all extra / characters, relative path segments and symbolic links.

    • since 4.13

    File permissions and ownership

    type access_permission =
    1. | R_OK
      (*

      Read permission

      *)
    2. | W_OK
      (*

      Write permission

      *)
    3. | X_OK
      (*

      Execution permission

      *)
    4. | F_OK
      (*

      File exists

      *)

    Flags for the access call.

    val chmod : string -> file_perm -> unit

    Change the permissions of the named file.

    val fchmod : file_descr -> file_perm -> unit

    Change the permissions of an opened file.

    • raises Invalid_argument

      on Windows

    val chown : string -> int -> int -> unit

    Change the owner uid and owner gid of the named file.

    • raises Invalid_argument

      on Windows

    val fchown : file_descr -> int -> int -> unit

    Change the owner uid and owner gid of an opened file.

    • raises Invalid_argument

      on Windows

    val umask : file_perm -> file_perm

    Set the process's file mode creation mask, and return the previous mask.

    • raises Invalid_argument

      on Windows

    val access : string -> access_permission list -> unit

    Check that the process has the given permissions over the named file.

    On Windows: execute permission X_OK cannot be tested, just tests for read permission instead.

    Operations on file descriptors

    val dup : ?cloexec:bool -> file_descr -> file_descr

    Return a new file descriptor referencing the same file as the given descriptor. See set_close_on_exec for documentation on the cloexec optional argument.

    val dup2 : ?cloexec:bool -> file_descr -> file_descr -> unit

    dup2 src dst duplicates src to dst, closing dst if already opened. See set_close_on_exec for documentation on the cloexec optional argument.

    val set_nonblock : file_descr -> unit

    Set the ``non-blocking'' flag on the given descriptor. When the non-blocking flag is set, reading on a descriptor on which there is temporarily no data available raises the EAGAIN or EWOULDBLOCK error instead of blocking; writing on a descriptor on which there is temporarily no room for writing also raises EAGAIN or EWOULDBLOCK.

    val clear_nonblock : file_descr -> unit

    Clear the ``non-blocking'' flag on the given descriptor. See set_nonblock.

    val set_close_on_exec : file_descr -> unit

    Set the ``close-on-exec'' flag on the given descriptor. A descriptor with the close-on-exec flag is automatically closed when the current process starts another program with one of the exec, create_process and open_process functions.

    It is often a security hole to leak file descriptors opened on, say, a private file to an external program: the program, then, gets access to the private file and can do bad things with it. Hence, it is highly recommended to set all file descriptors ``close-on-exec'', except in the very few cases where a file descriptor actually needs to be transmitted to another program.

    The best way to set a file descriptor ``close-on-exec'' is to create it in this state. To this end, the openfile function has O_CLOEXEC and O_KEEPEXEC flags to enforce ``close-on-exec'' mode or ``keep-on-exec'' mode, respectively. All other operations in the Unix module that create file descriptors have an optional argument ?cloexec:bool to indicate whether the file descriptor should be created in ``close-on-exec'' mode (by writing ~cloexec:true) or in ``keep-on-exec'' mode (by writing ~cloexec:false). For historical reasons, the default file descriptor creation mode is ``keep-on-exec'', if no cloexec optional argument is given. This is not a safe default, hence it is highly recommended to pass explicit cloexec arguments to operations that create file descriptors.

    The cloexec optional arguments and the O_KEEPEXEC flag were introduced in OCaml 4.05. Earlier, the common practice was to create file descriptors in the default, ``keep-on-exec'' mode, then call set_close_on_exec on those freshly-created file descriptors. This is not as safe as creating the file descriptor in ``close-on-exec'' mode because, in multithreaded programs, a window of vulnerability exists between the time when the file descriptor is created and the time set_close_on_exec completes. If another thread spawns another program during this window, the descriptor will leak, as it is still in the ``keep-on-exec'' mode.

    Regarding the atomicity guarantees given by ~cloexec:true or by the use of the O_CLOEXEC flag: on all platforms it is guaranteed that a concurrently-executing Caml thread cannot leak the descriptor by starting a new process. On Linux, this guarantee extends to concurrently-executing C threads. As of Feb 2017, other operating systems lack the necessary system calls and still expose a window of vulnerability during which a C thread can see the newly-created file descriptor in ``keep-on-exec'' mode.

    val clear_close_on_exec : file_descr -> unit

    Clear the ``close-on-exec'' flag on the given descriptor. See set_close_on_exec.

    Directories

    val mkdir : string -> file_perm -> unit

    Create a directory with the given permissions (see umask).

    val rmdir : string -> unit

    Remove an empty directory.

    val chdir : string -> unit

    Change the process working directory.

    val getcwd : unit -> string

    Return the name of the current working directory.

    val chroot : string -> unit

    Change the process root directory.

    • raises Invalid_argument

      on Windows

    type dir_handle

    The type of descriptors over opened directories.

    val opendir : string -> dir_handle

    Open a descriptor on a directory

    val readdir : dir_handle -> string

    Return the next entry in a directory.

    • raises End_of_file

      when the end of the directory has been reached.

    val rewinddir : dir_handle -> unit

    Reposition the descriptor to the beginning of the directory

    val closedir : dir_handle -> unit

    Close a directory descriptor.

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> file_descr * file_descr

    Create a pipe. The first component of the result is opened for reading, that's the exit to the pipe. The second component is opened for writing, that's the entrance to the pipe. See set_close_on_exec for documentation on the cloexec optional argument.

    val mkfifo : string -> file_perm -> unit

    Create a named pipe with the given permissions (see umask).

    • raises Invalid_argument

      on Windows

    High-level process and redirection management

    val create_process : string -> string array -> file_descr -> @@ -19,7 +19,7 @@ file_descr -> file_descr -> file_descr -> - int

    create_process_env prog args env stdin stdout stderr works as create_process, except that the extra argument env specifies the environment passed to the program.

    val open_process_in : string -> in_channel

    High-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.

    val open_process_out : string -> out_channel

    Same as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.

    val open_process : string -> in_channel * out_channel

    Same as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.

    val open_process_full : + int

    create_process_env prog args env stdin stdout stderr works as create_process, except that the extra argument env specifies the environment passed to the program.

    val open_process_in : string -> in_channel

    High-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.

    val open_process_out : string -> out_channel

    Same as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.

    val open_process : string -> in_channel * out_channel

    Same as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.

    val open_process_full : string -> string array -> in_channel * out_channel * in_channel

    Similar to open_process, but the second argument specifies the environment passed to the command. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the command. If the command does not need to be run through the shell, open_process_args_full can be used instead of open_process_full.

    val open_process_args : string -> string array -> in_channel * out_channel

    open_process_args prog args runs the program prog with arguments args. Note that the first argument is by convention the filename of the program being executed, just like Sys.argv.(0). The new process executes concurrently with the current process. The standard input and output of the new process are redirected to pipes, which can be respectively read and written via the returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.

    Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization.

    The executable file prog is searched for in the path. This behaviour changed in 4.12; previously prog was looked up only in the current directory.

    The new process has the same environment as the current process.

    • since 4.08
    val open_process_args_in : string -> string array -> in_channel

    Same as open_process_args, but redirects only the standard output of the new process.

    • since 4.08
    val open_process_args_out : string -> string array -> out_channel

    Same as open_process_args, but redirects only the standard input of the new process.

    • since 4.08
    val open_process_args_full : @@ -28,20 +28,20 @@ string array -> in_channel * out_channel * in_channel

    Similar to open_process_args, but the third argument specifies the environment passed to the new process. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the program.

    • since 4.08
    val process_in_pid : in_channel -> int

    Return the pid of a process opened via open_process_in or open_process_args_in.

    • since 4.08 (4.12 in UnixLabels)
    val process_out_pid : out_channel -> int

    Return the pid of a process opened via open_process_out or open_process_args_out.

    • since 4.08 (4.12 in UnixLabels)
    val process_pid : (in_channel * out_channel) -> int

    Return the pid of a process opened via open_process or open_process_args.

    • since 4.08 (4.12 in UnixLabels)
    val process_full_pid : (in_channel * out_channel * in_channel) -> int

    Return the pid of a process opened via open_process_full or open_process_args_full.

    • since 4.08 (4.12 in UnixLabels)
    val close_process_in : in_channel -> process_status

    Close channels opened by open_process_in, wait for the associated command to terminate, and return its termination status.

    val close_process_out : out_channel -> process_status

    Close channels opened by open_process_out, wait for the associated command to terminate, and return its termination status.

    val close_process : (in_channel * out_channel) -> process_status

    Close channels opened by open_process, wait for the associated command to terminate, and return its termination status.

    val close_process_full : (in_channel * out_channel * in_channel) -> - process_status

    Close channels opened by open_process_full, wait for the associated command to terminate, and return its termination status.

    symlink ?to_dir src dst creates the file dst as a symbolic link to the file src. On Windows, ~to_dir indicates if the symbolic link points to a directory or a file; if omitted, symlink examines src using stat and picks appropriately, if src does not exist then false is assumed (for this reason, it is recommended that the ~to_dir parameter be specified in new code). On Unix, ~to_dir is ignored.

    Windows symbolic links are available in Windows Vista onwards. There are some important differences between Windows symlinks and their POSIX counterparts.

    Windows symbolic links come in two flavours: directory and regular, which designate whether the symbolic link points to a directory or a file. The type must be correct - a directory symlink which actually points to a file cannot be selected with chdir and a file symlink which actually points to a directory cannot be read or written (note that Cygwin's emulation layer ignores this distinction).

    When symbolic links are created to existing targets, this distinction doesn't matter and symlink will automatically create the correct kind of symbolic link. The distinction matters when a symbolic link is created to a non-existent target.

    The other caveat is that by default symbolic links are a privileged operation. Administrators will always need to be running elevated (or with UAC disabled) and by default normal user accounts need to be granted the SeCreateSymbolicLinkPrivilege via Local Security Policy (secpol.msc) or via Active Directory.

    has_symlink can be used to check that a process is able to create symbolic links.

    Returns true if the user is able to create symbolic links. On Windows, this indicates that the user not only has the SeCreateSymbolicLinkPrivilege but is also running elevated, if necessary. On other platforms, this is simply indicates that the symlink system call is available.

    • since 4.03

    Read the contents of a symbolic link.

    Polling

    val select : + process_status

    Close channels opened by open_process_full, wait for the associated command to terminate, and return its termination status.

    symlink ?to_dir src dst creates the file dst as a symbolic link to the file src. On Windows, ~to_dir indicates if the symbolic link points to a directory or a file; if omitted, symlink examines src using stat and picks appropriately, if src does not exist then false is assumed (for this reason, it is recommended that the ~to_dir parameter be specified in new code). On Unix, ~to_dir is ignored.

    Windows symbolic links are available in Windows Vista onwards. There are some important differences between Windows symlinks and their POSIX counterparts.

    Windows symbolic links come in two flavours: directory and regular, which designate whether the symbolic link points to a directory or a file. The type must be correct - a directory symlink which actually points to a file cannot be selected with chdir and a file symlink which actually points to a directory cannot be read or written (note that Cygwin's emulation layer ignores this distinction).

    When symbolic links are created to existing targets, this distinction doesn't matter and symlink will automatically create the correct kind of symbolic link. The distinction matters when a symbolic link is created to a non-existent target.

    The other caveat is that by default symbolic links are a privileged operation. Administrators will always need to be running elevated (or with UAC disabled) and by default normal user accounts need to be granted the SeCreateSymbolicLinkPrivilege via Local Security Policy (secpol.msc) or via Active Directory.

    has_symlink can be used to check that a process is able to create symbolic links.

    Returns true if the user is able to create symbolic links. On Windows, this indicates that the user not only has the SeCreateSymbolicLinkPrivilege but is also running elevated, if necessary. On other platforms, this is simply indicates that the symlink system call is available.

    • since 4.03

    Read the contents of a symbolic link.

    Polling

    val select : file_descr list -> file_descr list -> file_descr list -> float -> - file_descr list * file_descr list * file_descr list

    Wait until some input/output operations become possible on some channels. The three list arguments are, respectively, a set of descriptors to check for reading (first argument), for writing (second argument), or for exceptional conditions (third argument). The fourth argument is the maximal timeout, in seconds; a negative fourth argument means no timeout (unbounded wait). The result is composed of three sets of descriptors: those ready for reading (first component), ready for writing (second component), and over which an exceptional condition is pending (third component).

    Locking

    type lock_command =
    1. | F_ULOCK
      (*

      Unlock a region

      *)
    2. | F_LOCK
      (*

      Lock a region for writing, and block if already locked

      *)
    3. | F_TLOCK
      (*

      Lock a region for writing, or fail if already locked

      *)
    4. | F_TEST
      (*

      Test a region for other process locks

      *)
    5. | F_RLOCK
      (*

      Lock a region for reading, and block if already locked

      *)
    6. | F_TRLOCK
      (*

      Lock a region for reading, or fail if already locked

      *)

    Commands for lockf.

    val lockf : file_descr -> lock_command -> int -> unit

    lockf fd mode len puts a lock on a region of the file opened as fd. The region starts at the current read/write position for fd (as set by lseek), and extends len bytes forward if len is positive, len bytes backwards if len is negative, or to the end of the file if len is zero. A write lock prevents any other process from acquiring a read or write lock on the region. A read lock prevents any other process from acquiring a write lock on the region, but lets other processes acquire read locks on it.

    The F_LOCK and F_TLOCK commands attempts to put a write lock on the specified region. The F_RLOCK and F_TRLOCK commands attempts to put a read lock on the specified region. If one or several locks put by another process prevent the current process from acquiring the lock, F_LOCK and F_RLOCK block until these locks are removed, while F_TLOCK and F_TRLOCK fail immediately with an exception. The F_ULOCK removes whatever locks the current process has on the specified region. Finally, the F_TEST command tests whether a write lock can be acquired on the specified region, without actually putting a lock. It returns immediately if successful, or fails otherwise.

    What happens when a process tries to lock a region of a file that is already locked by the same process depends on the OS. On POSIX-compliant systems, the second lock operation succeeds and may "promote" the older lock from read lock to write lock. On Windows, the second lock operation will block or fail.

    Signals

    Note: installation of signal handlers is performed via the functions Sys.signal and Sys.set_signal.

    val kill : int -> int -> unit

    kill pid signal sends signal number signal to the process with id pid.

    On Windows: only the Sys.sigkill signal is emulated.

    type sigprocmask_command =
    1. | SIG_SETMASK
    2. | SIG_BLOCK
    3. | SIG_UNBLOCK
    val sigprocmask : sigprocmask_command -> int list -> int list

    sigprocmask mode sigs changes the set of blocked signals. If mode is SIG_SETMASK, blocked signals are set to those in the list sigs. If mode is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If mode is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigprocmask returns the set of previously blocked signals.

    When the systhreads version of the Thread module is loaded, this function redirects to Thread.sigmask. I.e., sigprocmask only changes the mask of the current thread.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigpending : unit -> int list

    Return the set of blocked signals that are currently pending.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigsuspend : int list -> unit

    sigsuspend sigs atomically sets the blocked signals to sigs and waits for a non-ignored, non-blocked signal to be delivered. On return, the blocked signals are reset to their initial value.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val pause : unit -> unit

    Wait until a non-ignored, non-blocked signal is delivered.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    Time functions

    type process_times = {
    1. tms_utime : float;
      (*

      User time for the process

      *)
    2. tms_stime : float;
      (*

      System time for the process

      *)
    3. tms_cutime : float;
      (*

      User time for the children processes

      *)
    4. tms_cstime : float;
      (*

      System time for the children processes

      *)
    }

    The execution times (CPU times) of a process.

    type tm = {
    1. tm_sec : int;
      (*

      Seconds 0..60

      *)
    2. tm_min : int;
      (*

      Minutes 0..59

      *)
    3. tm_hour : int;
      (*

      Hours 0..23

      *)
    4. tm_mday : int;
      (*

      Day of month 1..31

      *)
    5. tm_mon : int;
      (*

      Month of year 0..11

      *)
    6. tm_year : int;
      (*

      Year - 1900

      *)
    7. tm_wday : int;
      (*

      Day of week (Sunday is 0)

      *)
    8. tm_yday : int;
      (*

      Day of year 0..365

      *)
    9. tm_isdst : bool;
      (*

      Daylight time savings in effect

      *)
    }

    The type representing wallclock time and calendar date.

    val time : unit -> float

    Return the current time since 00:00:00 GMT, Jan. 1, 1970, in seconds.

    val gettimeofday : unit -> float

    Same as time, but with resolution better than 1 second.

    val gmtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT. To perform the inverse conversion, set the TZ environment variable to "UTC", use mktime, and then restore the original value of TZ.

    val localtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes the local time zone. The function performing the inverse conversion is mktime.

    val mktime : tm -> float * tm

    Convert a date and time, specified by the tm argument, into a time in seconds, as returned by time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone.

    val alarm : int -> int

    Schedule a SIGALRM signal after the given number of seconds.

    • raises Invalid_argument

      on Windows

    val sleep : int -> unit

    Stop execution for the given number of seconds.

    val sleepf : float -> unit

    Stop execution for the given number of seconds. Like sleep, but fractions of seconds are supported.

    • since 4.03 (4.12 in UnixLabels)
    val times : unit -> process_times

    Return the execution times of the process.

    On Windows: partially implemented, will not report timings for child processes.

    val utimes : string -> float -> float -> unit

    Set the last access time (second arg) and last modification time (third arg) for a file. Times are expressed in seconds from 00:00:00 GMT, Jan. 1, 1970. If both times are 0.0, the access and last modification times are both set to the current time.

    type interval_timer =
    1. | ITIMER_REAL
      (*

      decrements in real time, and sends the signal SIGALRM when expired.

      *)
    2. | ITIMER_VIRTUAL
      (*

      decrements in process virtual time, and sends SIGVTALRM when expired.

      *)
    3. | ITIMER_PROF
      (*

      (for profiling) decrements both when the process is running and when the system is running on behalf of the process; it sends SIGPROF when expired.

      *)

    The three kinds of interval timers.

    type interval_timer_status = {
    1. it_interval : float;
      (*

      Period

      *)
    2. it_value : float;
      (*

      Current value of the timer

      *)
    }

    The type describing the status of an interval timer

    Return the current status of the given interval timer.

    • raises Invalid_argument

      on Windows

    val setitimer : + file_descr list * file_descr list * file_descr list

    Wait until some input/output operations become possible on some channels. The three list arguments are, respectively, a set of descriptors to check for reading (first argument), for writing (second argument), or for exceptional conditions (third argument). The fourth argument is the maximal timeout, in seconds; a negative fourth argument means no timeout (unbounded wait). The result is composed of three sets of descriptors: those ready for reading (first component), ready for writing (second component), and over which an exceptional condition is pending (third component).

    Locking

    type lock_command =
    1. | F_ULOCK
      (*

      Unlock a region

      *)
    2. | F_LOCK
      (*

      Lock a region for writing, and block if already locked

      *)
    3. | F_TLOCK
      (*

      Lock a region for writing, or fail if already locked

      *)
    4. | F_TEST
      (*

      Test a region for other process locks

      *)
    5. | F_RLOCK
      (*

      Lock a region for reading, and block if already locked

      *)
    6. | F_TRLOCK
      (*

      Lock a region for reading, or fail if already locked

      *)

    Commands for lockf.

    val lockf : file_descr -> lock_command -> int -> unit

    lockf fd mode len puts a lock on a region of the file opened as fd. The region starts at the current read/write position for fd (as set by lseek), and extends len bytes forward if len is positive, len bytes backwards if len is negative, or to the end of the file if len is zero. A write lock prevents any other process from acquiring a read or write lock on the region. A read lock prevents any other process from acquiring a write lock on the region, but lets other processes acquire read locks on it.

    The F_LOCK and F_TLOCK commands attempts to put a write lock on the specified region. The F_RLOCK and F_TRLOCK commands attempts to put a read lock on the specified region. If one or several locks put by another process prevent the current process from acquiring the lock, F_LOCK and F_RLOCK block until these locks are removed, while F_TLOCK and F_TRLOCK fail immediately with an exception. The F_ULOCK removes whatever locks the current process has on the specified region. Finally, the F_TEST command tests whether a write lock can be acquired on the specified region, without actually putting a lock. It returns immediately if successful, or fails otherwise.

    What happens when a process tries to lock a region of a file that is already locked by the same process depends on the OS. On POSIX-compliant systems, the second lock operation succeeds and may "promote" the older lock from read lock to write lock. On Windows, the second lock operation will block or fail.

    Signals

    Note: installation of signal handlers is performed via the functions Sys.signal and Sys.set_signal.

    val kill : int -> int -> unit

    kill pid signal sends signal number signal to the process with id pid.

    On Windows: only the Sys.sigkill signal is emulated.

    type sigprocmask_command =
    1. | SIG_SETMASK
    2. | SIG_BLOCK
    3. | SIG_UNBLOCK
    val sigprocmask : sigprocmask_command -> int list -> int list

    sigprocmask mode sigs changes the set of blocked signals. If mode is SIG_SETMASK, blocked signals are set to those in the list sigs. If mode is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If mode is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigprocmask returns the set of previously blocked signals.

    When the systhreads version of the Thread module is loaded, this function redirects to Thread.sigmask. I.e., sigprocmask only changes the mask of the current thread.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigpending : unit -> int list

    Return the set of blocked signals that are currently pending.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigsuspend : int list -> unit

    sigsuspend sigs atomically sets the blocked signals to sigs and waits for a non-ignored, non-blocked signal to be delivered. On return, the blocked signals are reset to their initial value.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val pause : unit -> unit

    Wait until a non-ignored, non-blocked signal is delivered.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    Time functions

    type process_times = {
    1. tms_utime : float;
      (*

      User time for the process

      *)
    2. tms_stime : float;
      (*

      System time for the process

      *)
    3. tms_cutime : float;
      (*

      User time for the children processes

      *)
    4. tms_cstime : float;
      (*

      System time for the children processes

      *)
    }

    The execution times (CPU times) of a process.

    type tm = {
    1. tm_sec : int;
      (*

      Seconds 0..60

      *)
    2. tm_min : int;
      (*

      Minutes 0..59

      *)
    3. tm_hour : int;
      (*

      Hours 0..23

      *)
    4. tm_mday : int;
      (*

      Day of month 1..31

      *)
    5. tm_mon : int;
      (*

      Month of year 0..11

      *)
    6. tm_year : int;
      (*

      Year - 1900

      *)
    7. tm_wday : int;
      (*

      Day of week (Sunday is 0)

      *)
    8. tm_yday : int;
      (*

      Day of year 0..365

      *)
    9. tm_isdst : bool;
      (*

      Daylight time savings in effect

      *)
    }

    The type representing wallclock time and calendar date.

    val time : unit -> float

    Return the current time since 00:00:00 GMT, Jan. 1, 1970, in seconds.

    val gettimeofday : unit -> float

    Same as time, but with resolution better than 1 second.

    val gmtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT. To perform the inverse conversion, set the TZ environment variable to "UTC", use mktime, and then restore the original value of TZ.

    val localtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes the local time zone. The function performing the inverse conversion is mktime.

    val mktime : tm -> float * tm

    Convert a date and time, specified by the tm argument, into a time in seconds, as returned by time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone.

    val alarm : int -> int

    Schedule a SIGALRM signal after the given number of seconds.

    • raises Invalid_argument

      on Windows

    val sleep : int -> unit

    Stop execution for the given number of seconds.

    val sleepf : float -> unit

    Stop execution for the given number of seconds. Like sleep, but fractions of seconds are supported.

    • since 4.03 (4.12 in UnixLabels)
    val times : unit -> process_times

    Return the execution times of the process.

    On Windows: partially implemented, will not report timings for child processes.

    val utimes : string -> float -> float -> unit

    Set the last access time (second arg) and last modification time (third arg) for a file. Times are expressed in seconds from 00:00:00 GMT, Jan. 1, 1970. If both times are 0.0, the access and last modification times are both set to the current time.

    type interval_timer =
    1. | ITIMER_REAL
      (*

      decrements in real time, and sends the signal SIGALRM when expired.

      *)
    2. | ITIMER_VIRTUAL
      (*

      decrements in process virtual time, and sends SIGVTALRM when expired.

      *)
    3. | ITIMER_PROF
      (*

      (for profiling) decrements both when the process is running and when the system is running on behalf of the process; it sends SIGPROF when expired.

      *)

    The three kinds of interval timers.

    type interval_timer_status = {
    1. it_interval : float;
      (*

      Period

      *)
    2. it_value : float;
      (*

      Current value of the timer

      *)
    }

    The type describing the status of an interval timer

    Return the current status of the given interval timer.

    • raises Invalid_argument

      on Windows

    setitimer t s sets the interval timer t and returns its previous status. The s argument is interpreted as follows: s.it_value, if nonzero, is the time to the next timer expiration; s.it_interval, if nonzero, specifies a value to be used in reloading it_value when the timer expires. Setting s.it_value to zero disables the timer. Setting s.it_interval to zero causes the timer to be disabled after its next expiration.

    • raises Invalid_argument

      on Windows

    User id, group id

    val getuid : unit -> int

    Return the user id of the user executing the process.

    On Windows: always returns 1.

    val geteuid : unit -> int

    Return the effective user id under which the process runs.

    On Windows: always returns 1.

    val setuid : int -> unit

    Set the real user id and effective user id for the process.

    • raises Invalid_argument

      on Windows

    val getgid : unit -> int

    Return the group id of the user executing the process.

    On Windows: always returns 1.

    val getegid : unit -> int

    Return the effective group id under which the process runs.

    On Windows: always returns 1.

    val setgid : int -> unit

    Set the real group id and effective group id for the process.

    • raises Invalid_argument

      on Windows

    val getgroups : unit -> int array

    Return the list of groups to which the user executing the process belongs.

    On Windows: always returns [|1|].

    val setgroups : int array -> unit

    setgroups groups sets the supplementary group IDs for the calling process. Appropriate privileges are required.

    • raises Invalid_argument

      on Windows

    val initgroups : string -> int -> unit

    initgroups user group initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list.

    • raises Invalid_argument

      on Windows

    type passwd_entry = {
    1. pw_name : string;
    2. pw_passwd : string;
    3. pw_uid : int;
    4. pw_gid : int;
    5. pw_gecos : string;
    6. pw_dir : string;
    7. pw_shell : string;
    }

    Structure of entries in the passwd database.

    type group_entry = {
    1. gr_name : string;
    2. gr_passwd : string;
    3. gr_gid : int;
    4. gr_mem : string array;
    }

    Structure of entries in the groups database.

    val getlogin : unit -> string

    Return the login name of the user executing the process.

    val getpwnam : string -> passwd_entry

    Find an entry in passwd with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrnam : string -> group_entry

    Find an entry in group with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getpwuid : int -> passwd_entry

    Find an entry in passwd with the given user id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrgid : int -> group_entry

    Find an entry in group with the given group id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    Internet addresses

    type inet_addr

    The abstract type of Internet addresses.

    val inet_addr_of_string : string -> inet_addr

    Conversion from the printable representation of an Internet address to its internal representation. The argument string consists of 4 numbers separated by periods (XXX.YYY.ZZZ.TTT) for IPv4 addresses, and up to 8 numbers separated by colons for IPv6 addresses.

    • raises Failure

      when given a string that does not match these formats.

    val string_of_inet_addr : inet_addr -> string

    Return the printable representation of the given Internet address. See inet_addr_of_string for a description of the printable representation.

    val inet_addr_any : inet_addr

    A special IPv4 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet_addr_loopback : inet_addr

    A special IPv4 address representing the host machine (127.0.0.1).

    val inet6_addr_any : inet_addr

    A special IPv6 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet6_addr_loopback : inet_addr

    A special IPv6 address representing the host machine (::1).

    val is_inet6_addr : inet_addr -> bool

    Whether the given inet_addr is an IPv6 address.

    • since 4.12

    Sockets

    type socket_domain =
    1. | PF_UNIX
      (*

      Unix domain

      *)
    2. | PF_INET
      (*

      Internet domain (IPv4)

      *)
    3. | PF_INET6
      (*

      Internet domain (IPv6)

      *)

    The type of socket domains. Not all platforms support IPv6 sockets (type PF_INET6).

    On Windows: PF_UNIX supported since 4.14.0 on Windows 10 1803 and later.

    type socket_type =
    1. | SOCK_STREAM
      (*

      Stream socket

      *)
    2. | SOCK_DGRAM
      (*

      Datagram socket

      *)
    3. | SOCK_RAW
      (*

      Raw socket

      *)
    4. | SOCK_SEQPACKET
      (*

      Sequenced packets socket

      *)

    The type of socket kinds, specifying the semantics of communications. SOCK_SEQPACKET is included for completeness, but is rarely supported by the OS, and needs system calls that are not available in this library.

    type sockaddr =
    1. | ADDR_UNIX of string
    2. | ADDR_INET of inet_addr * int

    The type of socket addresses. ADDR_UNIX name is a socket address in the Unix domain; name is a file name in the file system. ADDR_INET(addr,port) is a socket address in the Internet domain; addr is the Internet address of the machine, and port is the port number.

    val socket : ?cloexec:bool -> socket_domain -> socket_type -> int -> file_descr

    Create a new socket in the given domain, and with the given kind. The third argument is the protocol type; 0 selects the default protocol for that kind of sockets. See set_close_on_exec for documentation on the cloexec optional argument.

    val domain_of_sockaddr : sockaddr -> socket_domain

    Return the socket domain adequate for the given socket address.

    val socketpair : - ?cloexec:bool -> + interval_timer_status

    setitimer t s sets the interval timer t and returns its previous status. The s argument is interpreted as follows: s.it_value, if nonzero, is the time to the next timer expiration; s.it_interval, if nonzero, specifies a value to be used in reloading it_value when the timer expires. Setting s.it_value to zero disables the timer. Setting s.it_interval to zero causes the timer to be disabled after its next expiration.

    • raises Invalid_argument

      on Windows

    User id, group id

    val getuid : unit -> int

    Return the user id of the user executing the process.

    On Windows: always returns 1.

    val geteuid : unit -> int

    Return the effective user id under which the process runs.

    On Windows: always returns 1.

    val setuid : int -> unit

    Set the real user id and effective user id for the process.

    • raises Invalid_argument

      on Windows

    val getgid : unit -> int

    Return the group id of the user executing the process.

    On Windows: always returns 1.

    val getegid : unit -> int

    Return the effective group id under which the process runs.

    On Windows: always returns 1.

    val setgid : int -> unit

    Set the real group id and effective group id for the process.

    • raises Invalid_argument

      on Windows

    val getgroups : unit -> int array

    Return the list of groups to which the user executing the process belongs.

    On Windows: always returns [|1|].

    val setgroups : int array -> unit

    setgroups groups sets the supplementary group IDs for the calling process. Appropriate privileges are required.

    • raises Invalid_argument

      on Windows

    val initgroups : string -> int -> unit

    initgroups user group initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list.

    • raises Invalid_argument

      on Windows

    type passwd_entry = {
    1. pw_name : string;
    2. pw_passwd : string;
    3. pw_uid : int;
    4. pw_gid : int;
    5. pw_gecos : string;
    6. pw_dir : string;
    7. pw_shell : string;
    }

    Structure of entries in the passwd database.

    type group_entry = {
    1. gr_name : string;
    2. gr_passwd : string;
    3. gr_gid : int;
    4. gr_mem : string array;
    }

    Structure of entries in the groups database.

    val getlogin : unit -> string

    Return the login name of the user executing the process.

    val getpwnam : string -> passwd_entry

    Find an entry in passwd with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrnam : string -> group_entry

    Find an entry in group with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getpwuid : int -> passwd_entry

    Find an entry in passwd with the given user id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrgid : int -> group_entry

    Find an entry in group with the given group id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    Internet addresses

    type inet_addr

    The abstract type of Internet addresses.

    val inet_addr_of_string : string -> inet_addr

    Conversion from the printable representation of an Internet address to its internal representation. The argument string consists of 4 numbers separated by periods (XXX.YYY.ZZZ.TTT) for IPv4 addresses, and up to 8 numbers separated by colons for IPv6 addresses.

    • raises Failure

      when given a string that does not match these formats.

    val string_of_inet_addr : inet_addr -> string

    Return the printable representation of the given Internet address. See inet_addr_of_string for a description of the printable representation.

    val inet_addr_any : inet_addr

    A special IPv4 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet_addr_loopback : inet_addr

    A special IPv4 address representing the host machine (127.0.0.1).

    val inet6_addr_any : inet_addr

    A special IPv6 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet6_addr_loopback : inet_addr

    A special IPv6 address representing the host machine (::1).

    val is_inet6_addr : inet_addr -> bool

    Whether the given inet_addr is an IPv6 address.

    • since 4.12

    Sockets

    type socket_domain =
    1. | PF_UNIX
      (*

      Unix domain

      *)
    2. | PF_INET
      (*

      Internet domain (IPv4)

      *)
    3. | PF_INET6
      (*

      Internet domain (IPv6)

      *)

    The type of socket domains. Not all platforms support IPv6 sockets (type PF_INET6).

    On Windows: PF_UNIX supported since 4.14.0 on Windows 10 1803 and later.

    type socket_type =
    1. | SOCK_STREAM
      (*

      Stream socket

      *)
    2. | SOCK_DGRAM
      (*

      Datagram socket

      *)
    3. | SOCK_RAW
      (*

      Raw socket

      *)
    4. | SOCK_SEQPACKET
      (*

      Sequenced packets socket

      *)

    The type of socket kinds, specifying the semantics of communications. SOCK_SEQPACKET is included for completeness, but is rarely supported by the OS, and needs system calls that are not available in this library.

    type sockaddr =
    1. | ADDR_UNIX of string
    2. | ADDR_INET of inet_addr * int

    The type of socket addresses. ADDR_UNIX name is a socket address in the Unix domain; name is a file name in the file system. ADDR_INET(addr,port) is a socket address in the Internet domain; addr is the Internet address of the machine, and port is the port number.

    val socket : ?cloexec:bool -> socket_domain -> socket_type -> int -> file_descr

    Create a new socket in the given domain, and with the given kind. The third argument is the protocol type; 0 selects the default protocol for that kind of sockets. See set_close_on_exec for documentation on the cloexec optional argument.

    val domain_of_sockaddr : sockaddr -> socket_domain

    Return the socket domain adequate for the given socket address.

    val socketpair : + ?cloexec:bool -> socket_domain -> socket_type -> int -> - file_descr * file_descr

    Create a pair of unnamed sockets, connected together. See set_close_on_exec for documentation on the cloexec optional argument.

    val accept : ?cloexec:bool -> file_descr -> file_descr * sockaddr

    Accept connections on the given socket. The returned descriptor is a socket connected to the client; the returned address is the address of the connecting client. See set_close_on_exec for documentation on the cloexec optional argument.

    val bind : file_descr -> sockaddr -> unit

    Bind a socket to an address.

    val connect : file_descr -> sockaddr -> unit

    Connect a socket to an address.

    val listen : file_descr -> int -> unit

    Set up a socket for receiving connection requests. The integer argument is the maximal number of pending requests.

    type shutdown_command =
    1. | SHUTDOWN_RECEIVE
      (*

      Close for receiving

      *)
    2. | SHUTDOWN_SEND
      (*

      Close for sending

      *)
    3. | SHUTDOWN_ALL
      (*

      Close both

      *)

    The type of commands for shutdown.

    val shutdown : file_descr -> shutdown_command -> unit

    Shutdown a socket connection. SHUTDOWN_SEND as second argument causes reads on the other end of the connection to return an end-of-file condition. SHUTDOWN_RECEIVE causes writes on the other end of the connection to return a closed pipe condition (SIGPIPE signal).

    val getsockname : file_descr -> sockaddr

    Return the address of the given socket.

    val getpeername : file_descr -> sockaddr

    Return the address of the host connected to the given socket.

    type msg_flag =
    1. | MSG_OOB
    2. | MSG_DONTROUTE
    3. | MSG_PEEK

    The flags for recv, recvfrom, send and sendto.

    val recv : file_descr -> bytes -> int -> int -> msg_flag list -> int

    Receive data from a connected socket.

    val recvfrom : + file_descr * file_descr

    Create a pair of unnamed sockets, connected together. See set_close_on_exec for documentation on the cloexec optional argument.

    val accept : ?cloexec:bool -> file_descr -> file_descr * sockaddr

    Accept connections on the given socket. The returned descriptor is a socket connected to the client; the returned address is the address of the connecting client. See set_close_on_exec for documentation on the cloexec optional argument.

    val bind : file_descr -> sockaddr -> unit

    Bind a socket to an address.

    val connect : file_descr -> sockaddr -> unit

    Connect a socket to an address.

    val listen : file_descr -> int -> unit

    Set up a socket for receiving connection requests. The integer argument is the maximal number of pending requests.

    type shutdown_command =
    1. | SHUTDOWN_RECEIVE
      (*

      Close for receiving

      *)
    2. | SHUTDOWN_SEND
      (*

      Close for sending

      *)
    3. | SHUTDOWN_ALL
      (*

      Close both

      *)

    The type of commands for shutdown.

    val shutdown : file_descr -> shutdown_command -> unit

    Shutdown a socket connection. SHUTDOWN_SEND as second argument causes reads on the other end of the connection to return an end-of-file condition. SHUTDOWN_RECEIVE causes writes on the other end of the connection to return a closed pipe condition (SIGPIPE signal).

    val getsockname : file_descr -> sockaddr

    Return the address of the given socket.

    val getpeername : file_descr -> sockaddr

    Return the address of the host connected to the given socket.

    type msg_flag =
    1. | MSG_OOB
    2. | MSG_DONTROUTE
    3. | MSG_PEEK

    The flags for recv, recvfrom, send and sendto.

    val recv : file_descr -> bytes -> int -> int -> msg_flag list -> int

    Receive data from a connected socket.

    val recvfrom : file_descr -> bytes -> int -> @@ -65,4 +65,4 @@ file_descr -> socket_optint_option -> int option -> - unit

    Same as setsockopt for a socket option whose value is an int option.

    val getsockopt_float : file_descr -> socket_float_option -> float

    Same as getsockopt for a socket option whose value is a floating-point number.

    val setsockopt_float : file_descr -> socket_float_option -> float -> unit

    Same as setsockopt for a socket option whose value is a floating-point number.

    val getsockopt_error : file_descr -> error option

    Return the error condition associated with the given socket, and clear it.

    High-level network connection functions

    val open_connection : sockaddr -> in_channel * out_channel

    Connect to a server at the given address. Return a pair of buffered channels connected to the server. Remember to call Stdlib.flush on the output channel at the right times to ensure correct synchronization.

    The two channels returned by open_connection share a descriptor to a socket. Therefore, when the connection is over, you should call Stdlib.close_out on the output channel, which will also close the underlying socket. Do not call Stdlib.close_in on the input channel; it will be collected by the GC eventually.

    val shutdown_connection : in_channel -> unit

    ``Shut down'' a connection established with open_connection; that is, transmit an end-of-file condition to the server reading on the other side of the connection. This does not close the socket and the channels used by the connection. See Unix.open_connection for how to close them once the connection is over.

    val establish_server : (in_channel -> out_channel -> unit) -> sockaddr -> unit

    Establish a server on the given address. The function given as first argument is called for each connection with two buffered channels connected to the client. A new process is created for each connection. The function establish_server never returns normally.

    The two channels given to the function share a descriptor to a socket. The function does not need to close the channels, since this occurs automatically when the function returns. If the function prefers explicit closing, it should close the output channel using Stdlib.close_out and leave the input channel unclosed, for reasons explained in Unix.in_channel_of_descr.

    • raises Invalid_argument

      on Windows. Use threads instead.

    Host and protocol databases

    type host_entry = {
    1. h_name : string;
    2. h_aliases : string array;
    3. h_addrtype : socket_domain;
    4. h_addr_list : inet_addr array;
    }

    Structure of entries in the hosts database.

    type protocol_entry = {
    1. p_name : string;
    2. p_aliases : string array;
    3. p_proto : int;
    }

    Structure of entries in the protocols database.

    type service_entry = {
    1. s_name : string;
    2. s_aliases : string array;
    3. s_port : int;
    4. s_proto : string;
    }

    Structure of entries in the services database.

    val gethostname : unit -> string

    Return the name of the local host.

    val gethostbyname : string -> host_entry

    Find an entry in hosts with the given name.

    • raises Not_found

      if no such entry exists.

    val gethostbyaddr : inet_addr -> host_entry

    Find an entry in hosts with the given address.

    • raises Not_found

      if no such entry exists.

    val getprotobyname : string -> protocol_entry

    Find an entry in protocols with the given name.

    • raises Not_found

      if no such entry exists.

    val getprotobynumber : int -> protocol_entry

    Find an entry in protocols with the given protocol number.

    • raises Not_found

      if no such entry exists.

    val getservbyname : string -> string -> service_entry

    Find an entry in services with the given name.

    • raises Not_found

      if no such entry exists.

    val getservbyport : int -> string -> service_entry

    Find an entry in services with the given service number.

    • raises Not_found

      if no such entry exists.

    type addr_info = {
    1. ai_family : socket_domain;
      (*

      Socket domain

      *)
    2. ai_socktype : socket_type;
      (*

      Socket type

      *)
    3. ai_protocol : int;
      (*

      Socket protocol number

      *)
    4. ai_addr : sockaddr;
      (*

      Address

      *)
    5. ai_canonname : string;
      (*

      Canonical host name

      *)
    }

    Address information returned by getaddrinfo.

    type getaddrinfo_option =
    1. | AI_FAMILY of socket_domain
      (*

      Impose the given socket domain

      *)
    2. | AI_SOCKTYPE of socket_type
      (*

      Impose the given socket type

      *)
    3. | AI_PROTOCOL of int
      (*

      Impose the given protocol

      *)
    4. | AI_NUMERICHOST
      (*

      Do not call name resolver, expect numeric IP address

      *)
    5. | AI_CANONNAME
      (*

      Fill the ai_canonname field of the result

      *)
    6. | AI_PASSIVE
      (*

      Set address to ``any'' address for use with bind

      *)

    Options to getaddrinfo.

    val getaddrinfo : string -> string -> getaddrinfo_option list -> addr_info list

    getaddrinfo host service opts returns a list of addr_info records describing socket parameters and addresses suitable for communicating with the given host and service. The empty list is returned if the host or service names are unknown, or the constraints expressed in opts cannot be satisfied.

    host is either a host name or the string representation of an IP address. host can be given as the empty string; in this case, the ``any'' address or the ``loopback'' address are used, depending whether opts contains AI_PASSIVE. service is either a service name or the string representation of a port number. service can be given as the empty string; in this case, the port field of the returned addresses is set to 0. opts is a possibly empty list of options that allows the caller to force a particular socket domain (e.g. IPv6 only or IPv4 only) or a particular socket type (e.g. TCP only or UDP only).

    type name_info = {
    1. ni_hostname : string;
      (*

      Name or IP address of host

      *)
    2. ni_service : string;
      (*

      Name of service or port number

      *)
    }

    Host and service information returned by getnameinfo.

    type getnameinfo_option =
    1. | NI_NOFQDN
      (*

      Do not qualify local host names

      *)
    2. | NI_NUMERICHOST
      (*

      Always return host as IP address

      *)
    3. | NI_NAMEREQD
      (*

      Fail if host name cannot be determined

      *)
    4. | NI_NUMERICSERV
      (*

      Always return service as port number

      *)
    5. | NI_DGRAM
      (*

      Consider the service as UDP-based instead of the default TCP

      *)

    Options to getnameinfo.

    val getnameinfo : sockaddr -> getnameinfo_option list -> name_info

    getnameinfo addr opts returns the host name and service name corresponding to the socket address addr. opts is a possibly empty list of options that governs how these names are obtained.

    • raises Not_found

      if an error occurs.

    Terminal interface

    The following functions implement the POSIX standard terminal interface. They provide control over asynchronous communication ports and pseudo-terminals. Refer to the termios man page for a complete description.

    type terminal_io = {
    1. mutable c_ignbrk : bool;
      (*

      Ignore the break condition.

      *)
    2. mutable c_brkint : bool;
      (*

      Signal interrupt on break condition.

      *)
    3. mutable c_ignpar : bool;
      (*

      Ignore characters with parity errors.

      *)
    4. mutable c_parmrk : bool;
      (*

      Mark parity errors.

      *)
    5. mutable c_inpck : bool;
      (*

      Enable parity check on input.

      *)
    6. mutable c_istrip : bool;
      (*

      Strip 8th bit on input characters.

      *)
    7. mutable c_inlcr : bool;
      (*

      Map NL to CR on input.

      *)
    8. mutable c_igncr : bool;
      (*

      Ignore CR on input.

      *)
    9. mutable c_icrnl : bool;
      (*

      Map CR to NL on input.

      *)
    10. mutable c_ixon : bool;
      (*

      Recognize XON/XOFF characters on input.

      *)
    11. mutable c_ixoff : bool;
      (*

      Emit XON/XOFF chars to control input flow.

      *)
    12. mutable c_opost : bool;
      (*

      Enable output processing.

      *)
    13. mutable c_obaud : int;
      (*

      Output baud rate (0 means close connection).

      *)
    14. mutable c_ibaud : int;
      (*

      Input baud rate.

      *)
    15. mutable c_csize : int;
      (*

      Number of bits per character (5-8).

      *)
    16. mutable c_cstopb : int;
      (*

      Number of stop bits (1-2).

      *)
    17. mutable c_cread : bool;
      (*

      Reception is enabled.

      *)
    18. mutable c_parenb : bool;
      (*

      Enable parity generation and detection.

      *)
    19. mutable c_parodd : bool;
      (*

      Specify odd parity instead of even.

      *)
    20. mutable c_hupcl : bool;
      (*

      Hang up on last close.

      *)
    21. mutable c_clocal : bool;
      (*

      Ignore modem status lines.

      *)
    22. mutable c_isig : bool;
      (*

      Generate signal on INTR, QUIT, SUSP.

      *)
    23. mutable c_icanon : bool;
      (*

      Enable canonical processing (line buffering and editing)

      *)
    24. mutable c_noflsh : bool;
      (*

      Disable flush after INTR, QUIT, SUSP.

      *)
    25. mutable c_echo : bool;
      (*

      Echo input characters.

      *)
    26. mutable c_echoe : bool;
      (*

      Echo ERASE (to erase previous character).

      *)
    27. mutable c_echok : bool;
      (*

      Echo KILL (to erase the current line).

      *)
    28. mutable c_echonl : bool;
      (*

      Echo NL even if c_echo is not set.

      *)
    29. mutable c_vintr : char;
      (*

      Interrupt character (usually ctrl-C).

      *)
    30. mutable c_vquit : char;
      (*

      Quit character (usually ctrl-\).

      *)
    31. mutable c_verase : char;
      (*

      Erase character (usually DEL or ctrl-H).

      *)
    32. mutable c_vkill : char;
      (*

      Kill line character (usually ctrl-U).

      *)
    33. mutable c_veof : char;
      (*

      End-of-file character (usually ctrl-D).

      *)
    34. mutable c_veol : char;
      (*

      Alternate end-of-line char. (usually none).

      *)
    35. mutable c_vmin : int;
      (*

      Minimum number of characters to read before the read request is satisfied.

      *)
    36. mutable c_vtime : int;
      (*

      Maximum read wait (in 0.1s units).

      *)
    37. mutable c_vstart : char;
      (*

      Start character (usually ctrl-Q).

      *)
    38. mutable c_vstop : char;
      (*

      Stop character (usually ctrl-S).

      *)
    }
    val tcgetattr : file_descr -> terminal_io

    Return the status of the terminal referred to by the given file descriptor.

    • raises Invalid_argument

      on Windows

    type setattr_when =
    1. | TCSANOW
    2. | TCSADRAIN
    3. | TCSAFLUSH
    val tcsetattr : file_descr -> setattr_when -> terminal_io -> unit

    Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.

    • raises Invalid_argument

      on Windows

    val tcsendbreak : file_descr -> int -> unit

    Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).

    • raises Invalid_argument

      on Windows

    val tcdrain : file_descr -> unit

    Waits until all output written on the given file descriptor has been transmitted.

    • raises Invalid_argument

      on Windows

    type flush_queue =
    1. | TCIFLUSH
    2. | TCOFLUSH
    3. | TCIOFLUSH
    val tcflush : file_descr -> flush_queue -> unit

    Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.

    • raises Invalid_argument

      on Windows

    type flow_action =
    1. | TCOOFF
    2. | TCOON
    3. | TCIOFF
    4. | TCION
    val tcflow : file_descr -> flow_action -> unit

    Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.

    • raises Invalid_argument

      on Windows

    val setsid : unit -> int

    Put the calling process in a new session and detach it from its controlling terminal.

    • raises Invalid_argument

      on Windows

    \ No newline at end of file + unit

    Same as setsockopt for a socket option whose value is an int option.

    val getsockopt_float : file_descr -> socket_float_option -> float

    Same as getsockopt for a socket option whose value is a floating-point number.

    val setsockopt_float : file_descr -> socket_float_option -> float -> unit

    Same as setsockopt for a socket option whose value is a floating-point number.

    val getsockopt_error : file_descr -> error option

    Return the error condition associated with the given socket, and clear it.

    High-level network connection functions

    val open_connection : sockaddr -> in_channel * out_channel

    Connect to a server at the given address. Return a pair of buffered channels connected to the server. Remember to call Stdlib.flush on the output channel at the right times to ensure correct synchronization.

    The two channels returned by open_connection share a descriptor to a socket. Therefore, when the connection is over, you should call Stdlib.close_out on the output channel, which will also close the underlying socket. Do not call Stdlib.close_in on the input channel; it will be collected by the GC eventually.

    val shutdown_connection : in_channel -> unit

    ``Shut down'' a connection established with open_connection; that is, transmit an end-of-file condition to the server reading on the other side of the connection. This does not close the socket and the channels used by the connection. See Unix.open_connection for how to close them once the connection is over.

    val establish_server : (in_channel -> out_channel -> unit) -> sockaddr -> unit

    Establish a server on the given address. The function given as first argument is called for each connection with two buffered channels connected to the client. A new process is created for each connection. The function establish_server never returns normally.

    The two channels given to the function share a descriptor to a socket. The function does not need to close the channels, since this occurs automatically when the function returns. If the function prefers explicit closing, it should close the output channel using Stdlib.close_out and leave the input channel unclosed, for reasons explained in Unix.in_channel_of_descr.

    • raises Invalid_argument

      on Windows. Use threads instead.

    Host and protocol databases

    type host_entry = {
    1. h_name : string;
    2. h_aliases : string array;
    3. h_addrtype : socket_domain;
    4. h_addr_list : inet_addr array;
    }

    Structure of entries in the hosts database.

    type protocol_entry = {
    1. p_name : string;
    2. p_aliases : string array;
    3. p_proto : int;
    }

    Structure of entries in the protocols database.

    type service_entry = {
    1. s_name : string;
    2. s_aliases : string array;
    3. s_port : int;
    4. s_proto : string;
    }

    Structure of entries in the services database.

    val gethostname : unit -> string

    Return the name of the local host.

    val gethostbyname : string -> host_entry

    Find an entry in hosts with the given name.

    • raises Not_found

      if no such entry exists.

    val gethostbyaddr : inet_addr -> host_entry

    Find an entry in hosts with the given address.

    • raises Not_found

      if no such entry exists.

    val getprotobyname : string -> protocol_entry

    Find an entry in protocols with the given name.

    • raises Not_found

      if no such entry exists.

    val getprotobynumber : int -> protocol_entry

    Find an entry in protocols with the given protocol number.

    • raises Not_found

      if no such entry exists.

    val getservbyname : string -> string -> service_entry

    Find an entry in services with the given name.

    • raises Not_found

      if no such entry exists.

    val getservbyport : int -> string -> service_entry

    Find an entry in services with the given service number.

    • raises Not_found

      if no such entry exists.

    type addr_info = {
    1. ai_family : socket_domain;
      (*

      Socket domain

      *)
    2. ai_socktype : socket_type;
      (*

      Socket type

      *)
    3. ai_protocol : int;
      (*

      Socket protocol number

      *)
    4. ai_addr : sockaddr;
      (*

      Address

      *)
    5. ai_canonname : string;
      (*

      Canonical host name

      *)
    }

    Address information returned by getaddrinfo.

    type getaddrinfo_option =
    1. | AI_FAMILY of socket_domain
      (*

      Impose the given socket domain

      *)
    2. | AI_SOCKTYPE of socket_type
      (*

      Impose the given socket type

      *)
    3. | AI_PROTOCOL of int
      (*

      Impose the given protocol

      *)
    4. | AI_NUMERICHOST
      (*

      Do not call name resolver, expect numeric IP address

      *)
    5. | AI_CANONNAME
      (*

      Fill the ai_canonname field of the result

      *)
    6. | AI_PASSIVE
      (*

      Set address to ``any'' address for use with bind

      *)

    Options to getaddrinfo.

    val getaddrinfo : string -> string -> getaddrinfo_option list -> addr_info list

    getaddrinfo host service opts returns a list of addr_info records describing socket parameters and addresses suitable for communicating with the given host and service. The empty list is returned if the host or service names are unknown, or the constraints expressed in opts cannot be satisfied.

    host is either a host name or the string representation of an IP address. host can be given as the empty string; in this case, the ``any'' address or the ``loopback'' address are used, depending whether opts contains AI_PASSIVE. service is either a service name or the string representation of a port number. service can be given as the empty string; in this case, the port field of the returned addresses is set to 0. opts is a possibly empty list of options that allows the caller to force a particular socket domain (e.g. IPv6 only or IPv4 only) or a particular socket type (e.g. TCP only or UDP only).

    type name_info = {
    1. ni_hostname : string;
      (*

      Name or IP address of host

      *)
    2. ni_service : string;
      (*

      Name of service or port number

      *)
    }

    Host and service information returned by getnameinfo.

    type getnameinfo_option =
    1. | NI_NOFQDN
      (*

      Do not qualify local host names

      *)
    2. | NI_NUMERICHOST
      (*

      Always return host as IP address

      *)
    3. | NI_NAMEREQD
      (*

      Fail if host name cannot be determined

      *)
    4. | NI_NUMERICSERV
      (*

      Always return service as port number

      *)
    5. | NI_DGRAM
      (*

      Consider the service as UDP-based instead of the default TCP

      *)

    Options to getnameinfo.

    val getnameinfo : sockaddr -> getnameinfo_option list -> name_info

    getnameinfo addr opts returns the host name and service name corresponding to the socket address addr. opts is a possibly empty list of options that governs how these names are obtained.

    • raises Not_found

      if an error occurs.

    Terminal interface

    The following functions implement the POSIX standard terminal interface. They provide control over asynchronous communication ports and pseudo-terminals. Refer to the termios man page for a complete description.

    type terminal_io = {
    1. mutable c_ignbrk : bool;
      (*

      Ignore the break condition.

      *)
    2. mutable c_brkint : bool;
      (*

      Signal interrupt on break condition.

      *)
    3. mutable c_ignpar : bool;
      (*

      Ignore characters with parity errors.

      *)
    4. mutable c_parmrk : bool;
      (*

      Mark parity errors.

      *)
    5. mutable c_inpck : bool;
      (*

      Enable parity check on input.

      *)
    6. mutable c_istrip : bool;
      (*

      Strip 8th bit on input characters.

      *)
    7. mutable c_inlcr : bool;
      (*

      Map NL to CR on input.

      *)
    8. mutable c_igncr : bool;
      (*

      Ignore CR on input.

      *)
    9. mutable c_icrnl : bool;
      (*

      Map CR to NL on input.

      *)
    10. mutable c_ixon : bool;
      (*

      Recognize XON/XOFF characters on input.

      *)
    11. mutable c_ixoff : bool;
      (*

      Emit XON/XOFF chars to control input flow.

      *)
    12. mutable c_opost : bool;
      (*

      Enable output processing.

      *)
    13. mutable c_obaud : int;
      (*

      Output baud rate (0 means close connection).

      *)
    14. mutable c_ibaud : int;
      (*

      Input baud rate.

      *)
    15. mutable c_csize : int;
      (*

      Number of bits per character (5-8).

      *)
    16. mutable c_cstopb : int;
      (*

      Number of stop bits (1-2).

      *)
    17. mutable c_cread : bool;
      (*

      Reception is enabled.

      *)
    18. mutable c_parenb : bool;
      (*

      Enable parity generation and detection.

      *)
    19. mutable c_parodd : bool;
      (*

      Specify odd parity instead of even.

      *)
    20. mutable c_hupcl : bool;
      (*

      Hang up on last close.

      *)
    21. mutable c_clocal : bool;
      (*

      Ignore modem status lines.

      *)
    22. mutable c_isig : bool;
      (*

      Generate signal on INTR, QUIT, SUSP.

      *)
    23. mutable c_icanon : bool;
      (*

      Enable canonical processing (line buffering and editing)

      *)
    24. mutable c_noflsh : bool;
      (*

      Disable flush after INTR, QUIT, SUSP.

      *)
    25. mutable c_echo : bool;
      (*

      Echo input characters.

      *)
    26. mutable c_echoe : bool;
      (*

      Echo ERASE (to erase previous character).

      *)
    27. mutable c_echok : bool;
      (*

      Echo KILL (to erase the current line).

      *)
    28. mutable c_echonl : bool;
      (*

      Echo NL even if c_echo is not set.

      *)
    29. mutable c_vintr : char;
      (*

      Interrupt character (usually ctrl-C).

      *)
    30. mutable c_vquit : char;
      (*

      Quit character (usually ctrl-\).

      *)
    31. mutable c_verase : char;
      (*

      Erase character (usually DEL or ctrl-H).

      *)
    32. mutable c_vkill : char;
      (*

      Kill line character (usually ctrl-U).

      *)
    33. mutable c_veof : char;
      (*

      End-of-file character (usually ctrl-D).

      *)
    34. mutable c_veol : char;
      (*

      Alternate end-of-line char. (usually none).

      *)
    35. mutable c_vmin : int;
      (*

      Minimum number of characters to read before the read request is satisfied.

      *)
    36. mutable c_vtime : int;
      (*

      Maximum read wait (in 0.1s units).

      *)
    37. mutable c_vstart : char;
      (*

      Start character (usually ctrl-Q).

      *)
    38. mutable c_vstop : char;
      (*

      Stop character (usually ctrl-S).

      *)
    }
    val tcgetattr : file_descr -> terminal_io

    Return the status of the terminal referred to by the given file descriptor.

    • raises Invalid_argument

      on Windows

    type setattr_when =
    1. | TCSANOW
    2. | TCSADRAIN
    3. | TCSAFLUSH
    val tcsetattr : file_descr -> setattr_when -> terminal_io -> unit

    Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.

    • raises Invalid_argument

      on Windows

    val tcsendbreak : file_descr -> int -> unit

    Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).

    • raises Invalid_argument

      on Windows

    val tcdrain : file_descr -> unit

    Waits until all output written on the given file descriptor has been transmitted.

    • raises Invalid_argument

      on Windows

    type flush_queue =
    1. | TCIFLUSH
    2. | TCOFLUSH
    3. | TCIOFLUSH
    val tcflush : file_descr -> flush_queue -> unit

    Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.

    • raises Invalid_argument

      on Windows

    type flow_action =
    1. | TCOOFF
    2. | TCOON
    3. | TCIOFF
    4. | TCION
    val tcflow : file_descr -> flow_action -> unit

    Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.

    • raises Invalid_argument

      on Windows

    val setsid : unit -> int

    Put the calling process in a new session and detach it from its controlling terminal.

    • raises Invalid_argument

      on Windows

    diff --git a/ocaml/UnixLabels/LargeFile/index.html b/ocaml/UnixLabels/LargeFile/index.html index c30629a..b2593fe 100644 --- a/ocaml/UnixLabels/LargeFile/index.html +++ b/ocaml/UnixLabels/LargeFile/index.html @@ -1,2 +1,2 @@ -LargeFile (ocaml.UnixLabels.LargeFile)

    Module UnixLabels.LargeFile

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    val lseek : file_descr -> int64 -> mode:seek_command -> int64

    See lseek.

    val truncate : string -> len:int64 -> unit

    See truncate.

    val ftruncate : file_descr -> len:int64 -> unit

    See ftruncate.

    type stats = Unix.LargeFile.stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int64;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }
    val stat : string -> stats
    val lstat : string -> stats
    val fstat : file_descr -> stats
    \ No newline at end of file +LargeFile (ocaml.UnixLabels.LargeFile)

    Module UnixLabels.LargeFile

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    val lseek : file_descr -> int64 -> mode:seek_command -> int64

    See lseek.

    val truncate : string -> len:int64 -> unit

    See truncate.

    val ftruncate : file_descr -> len:int64 -> unit

    See ftruncate.

    type stats = Unix.LargeFile.stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int64;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }
    val stat : string -> stats
    val lstat : string -> stats
    val fstat : file_descr -> stats
    diff --git a/ocaml/UnixLabels/index.html b/ocaml/UnixLabels/index.html index 81e6e5f..08b7eac 100644 --- a/ocaml/UnixLabels/index.html +++ b/ocaml/UnixLabels/index.html @@ -1,93 +1,93 @@ -UnixLabels (ocaml.UnixLabels)

    Module UnixLabels

    Interface to the Unix system.

    To use the labeled version of this module, add module Unix = UnixLabels in your implementation.

    Note: all the functions of this module (except error_message and handle_unix_error) are liable to raise the Unix_error exception whenever the underlying system call signals an error.

    Error report

    type error = Unix.error =
    1. | E2BIG
      (*

      Argument list too long

      *)
    2. | EACCES
      (*

      Permission denied

      *)
    3. | EAGAIN
      (*

      Resource temporarily unavailable; try again

      *)
    4. | EBADF
      (*

      Bad file descriptor

      *)
    5. | EBUSY
      (*

      Resource unavailable

      *)
    6. | ECHILD
      (*

      No child process

      *)
    7. | EDEADLK
      (*

      Resource deadlock would occur

      *)
    8. | EDOM
      (*

      Domain error for math functions, etc.

      *)
    9. | EEXIST
      (*

      File exists

      *)
    10. | EFAULT
      (*

      Bad address

      *)
    11. | EFBIG
      (*

      File too large

      *)
    12. | EINTR
      (*

      Function interrupted by signal

      *)
    13. | EINVAL
      (*

      Invalid argument

      *)
    14. | EIO
      (*

      Hardware I/O error

      *)
    15. | EISDIR
      (*

      Is a directory

      *)
    16. | EMFILE
      (*

      Too many open files by the process

      *)
    17. | ENAMETOOLONG
      (*

      Filename too long

      *)
    18. | ENFILE
      (*

      Too many open files in the system

      *)
    19. | ENODEV
      (*

      No such device

      *)
    20. | ENOENT
      (*

      No such file or directory

      *)
    21. | ENOEXEC
      (*

      Not an executable file

      *)
    22. | ENOLCK
      (*

      No locks available

      *)
    23. | ENOMEM
      (*

      Not enough memory

      *)
    24. | ENOSPC
      (*

      No space left on device

      *)
    25. | ENOSYS
      (*

      Function not supported

      *)
    26. | ENOTDIR
      (*

      Not a directory

      *)
    27. | ENOTEMPTY
      (*

      Directory not empty

      *)
    28. | ENOTTY
      (*

      Inappropriate I/O control operation

      *)
    29. | ENXIO
      (*

      No such device or address

      *)
    30. | EPERM
      (*

      Operation not permitted

      *)
    31. | EPIPE
      (*

      Broken pipe

      *)
    32. | ERANGE
      (*

      Result too large

      *)
    33. | EROFS
      (*

      Read-only file system

      *)
    34. | ESPIPE
      (*

      Invalid seek e.g. on a pipe

      *)
    35. | ESRCH
      (*

      No such process

      *)
    36. | EXDEV
      (*

      Invalid link

      *)
    37. | EWOULDBLOCK
      (*

      Operation would block

      *)
    38. | EINPROGRESS
      (*

      Operation now in progress

      *)
    39. | EALREADY
      (*

      Operation already in progress

      *)
    40. | ENOTSOCK
      (*

      Socket operation on non-socket

      *)
    41. | EDESTADDRREQ
      (*

      Destination address required

      *)
    42. | EMSGSIZE
      (*

      Message too long

      *)
    43. | EPROTOTYPE
      (*

      Protocol wrong type for socket

      *)
    44. | ENOPROTOOPT
      (*

      Protocol not available

      *)
    45. | EPROTONOSUPPORT
      (*

      Protocol not supported

      *)
    46. | ESOCKTNOSUPPORT
      (*

      Socket type not supported

      *)
    47. | EOPNOTSUPP
      (*

      Operation not supported on socket

      *)
    48. | EPFNOSUPPORT
      (*

      Protocol family not supported

      *)
    49. | EAFNOSUPPORT
      (*

      Address family not supported by protocol family

      *)
    50. | EADDRINUSE
      (*

      Address already in use

      *)
    51. | EADDRNOTAVAIL
      (*

      Can't assign requested address

      *)
    52. | ENETDOWN
      (*

      Network is down

      *)
    53. | ENETUNREACH
      (*

      Network is unreachable

      *)
    54. | ENETRESET
      (*

      Network dropped connection on reset

      *)
    55. | ECONNABORTED
      (*

      Software caused connection abort

      *)
    56. | ECONNRESET
      (*

      Connection reset by peer

      *)
    57. | ENOBUFS
      (*

      No buffer space available

      *)
    58. | EISCONN
      (*

      Socket is already connected

      *)
    59. | ENOTCONN
      (*

      Socket is not connected

      *)
    60. | ESHUTDOWN
      (*

      Can't send after socket shutdown

      *)
    61. | ETOOMANYREFS
      (*

      Too many references: can't splice

      *)
    62. | ETIMEDOUT
      (*

      Connection timed out

      *)
    63. | ECONNREFUSED
      (*

      Connection refused

      *)
    64. | EHOSTDOWN
      (*

      Host is down

      *)
    65. | EHOSTUNREACH
      (*

      No route to host

      *)
    66. | ELOOP
      (*

      Too many levels of symbolic links

      *)
    67. | EOVERFLOW
      (*

      File size or position not representable

      *)
    68. | EUNKNOWNERR of int
      (*

      Unknown error

      *)

    The type of error codes. Errors defined in the POSIX standard and additional errors from UNIX98 and BSD. All other errors are mapped to EUNKNOWNERR.

    exception Unix_error of error * string * string

    Raised by the system calls below when an error is encountered. The first component is the error code; the second component is the function name; the third component is the string parameter to the function, if it has one, or the empty string otherwise.

    UnixLabels.Unix_error and Unix.Unix_error are the same, and catching one will catch the other.

    val error_message : error -> string

    Return a string describing the given error code.

    val handle_unix_error : ('a -> 'b) -> 'a -> 'b

    handle_unix_error f x applies f to x and returns the result. If the exception Unix_error is raised, it prints a message describing the error and exits with code 2.

    Access to the process environment

    val environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. The returned array is empty if the process has special privileges.

    val unsafe_environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. Unlike environment, this function returns a populated array even if the process has special privileges. See the documentation for unsafe_getenv for more details.

    • since 4.12
    val getenv : string -> string

    Return the value associated to a variable in the process environment, unless the process has special privileges.

    • raises Not_found

      if the variable is unbound or the process has special privileges.

      This function is identical to Sys.getenv.

    val unsafe_getenv : string -> string

    Return the value associated to a variable in the process environment.

    Unlike getenv, this function returns the value even if the process has special privileges. It is considered unsafe because the programmer of a setuid or setgid program must be careful to avoid using maliciously crafted environment variables in the search path for executables, the locations for temporary files or logs, and the like.

    • raises Not_found

      if the variable is unbound.

    • since 4.06
    val putenv : string -> string -> unit

    putenv name value sets the value associated to a variable in the process environment. name is the name of the environment variable, and value its new associated value.

    Process handling

    type process_status = Unix.process_status =
    1. | WEXITED of int
      (*

      The process terminated normally by exit; the argument is the return code.

      *)
    2. | WSIGNALED of int
      (*

      The process was killed by a signal; the argument is the signal number.

      *)
    3. | WSTOPPED of int
      (*

      The process was stopped by a signal; the argument is the signal number.

      *)

    The termination status of a process. See module Sys for the definitions of the standard signal numbers. Note that they are not the numbers used by the OS.

    On Windows: only WEXITED is used (as there are no inter-process signals) but with specific return codes to indicate special termination causes. Look for NTSTATUS values in the Windows documentation to decode such error return codes. In particular, STATUS_ACCESS_VIOLATION error code is the 32-bit 0xC0000005: as Int32.of_int 0xC0000005 is -1073741819, WEXITED -1073741819 is the Windows equivalent of WSIGNALED Sys.sigsegv.

    type wait_flag = Unix.wait_flag =
    1. | WNOHANG
      (*

      Do not block if no child has died yet, but immediately return with a pid equal to 0.

      *)
    2. | WUNTRACED
      (*

      Report also the children that receive stop signals.

      *)

    Flags for waitpid.

    val execv : prog:string -> args:string array -> 'a

    execv ~prog ~args execute the program in file prog, with the arguments args, and the current process environment. These execv* functions never return: on success, the current program is replaced by the new one.

    On Windows: the CRT simply spawns a new process and exits the current one. This will have unwanted consequences if e.g. another process is waiting on the current one. Using create_process or one of the open_process_* functions instead is recommended.

    • raises Unix_error

      on failure

    val execve : prog:string -> args:string array -> env:string array -> 'a

    Same as execv, except that the third argument provides the environment to the program executed.

    val execvp : prog:string -> args:string array -> 'a

    Same as execv, except that the program is searched in the path.

    val execvpe : prog:string -> args:string array -> env:string array -> 'a

    Same as execve, except that the program is searched in the path.

    val fork : unit -> int

    Fork a new process. The returned integer is 0 for the child process, the pid of the child process for the parent process.

    • raises Invalid_argument

      on Windows. Use create_process or threads instead.

    val wait : unit -> int * process_status

    Wait until one of the children processes die, and return its pid and termination status.

    • raises Invalid_argument

      on Windows. Use waitpid instead.

    val waitpid : mode:wait_flag list -> int -> int * process_status

    Same as wait, but waits for the child process whose pid is given. A pid of -1 means wait for any child. A pid of 0 means wait for any child in the same process group as the current process. Negative pid arguments represent process groups. The list of options indicates whether waitpid should return immediately without waiting, and whether it should report stopped children.

    On Windows: can only wait for a given PID, not any child process.

    val system : string -> process_status

    Execute the given command, wait until it terminates, and return its termination status. The string is interpreted by the shell /bin/sh (or the command interpreter cmd.exe on Windows) and therefore can contain redirections, quotes, variables, etc. To properly quote whitespace and shell special characters occurring in file names or command arguments, the use of Filename.quote_command is recommended. The result WEXITED 127 indicates that the shell couldn't be executed.

    val _exit : int -> 'a

    Terminate the calling process immediately, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. Unlike Stdlib.exit, Unix._exit performs no finalization whatsoever: functions registered with Stdlib.at_exit are not called, input/output channels are not flushed, and the C run-time system is not finalized either.

    The typical use of Unix._exit is after a Unix.fork operation, when the child process runs into a fatal error and must exit. In this case, it is preferable to not perform any finalization action in the child process, as these actions could interfere with similar actions performed by the parent process. For example, output channels should not be flushed by the child process, as the parent process may flush them again later, resulting in duplicate output.

    • since 4.12
    val getpid : unit -> int

    Return the pid of the process.

    val getppid : unit -> int

    Return the pid of the parent process.

    • raises Invalid_argument

      on Windows (because it is meaningless)

    val nice : int -> int

    Change the process priority. The integer argument is added to the ``nice'' value. (Higher values of the ``nice'' value mean lower priorities.) Return the new nice value.

    • raises Invalid_argument

      on Windows

    Basic file input/output

    type file_descr = Unix.file_descr

    The abstract type of file descriptors.

    val stdin : file_descr

    File descriptor for standard input.

    val stdout : file_descr

    File descriptor for standard output.

    val stderr : file_descr

    File descriptor for standard error.

    type open_flag = Unix.open_flag =
    1. | O_RDONLY
      (*

      Open for reading

      *)
    2. | O_WRONLY
      (*

      Open for writing

      *)
    3. | O_RDWR
      (*

      Open for reading and writing

      *)
    4. | O_NONBLOCK
      (*

      Open in non-blocking mode

      *)
    5. | O_APPEND
      (*

      Open for append

      *)
    6. | O_CREAT
      (*

      Create if nonexistent

      *)
    7. | O_TRUNC
      (*

      Truncate to 0 length if existing

      *)
    8. | O_EXCL
      (*

      Fail if existing

      *)
    9. | O_NOCTTY
      (*

      Don't make this dev a controlling tty

      *)
    10. | O_DSYNC
      (*

      Writes complete as `Synchronised I/O data integrity completion'

      *)
    11. | O_SYNC
      (*

      Writes complete as `Synchronised I/O file integrity completion'

      *)
    12. | O_RSYNC
      (*

      Reads complete as writes (depending on O_SYNC/O_DSYNC)

      *)
    13. | O_SHARE_DELETE
      (*

      Windows only: allow the file to be deleted while still open

      *)
    14. | O_CLOEXEC
      (*

      Set the close-on-exec flag on the descriptor returned by openfile. See set_close_on_exec for more information.

      *)
    15. | O_KEEPEXEC
      (*

      Clear the close-on-exec flag. This is currently the default.

      *)

    The flags to openfile.

    type file_perm = int

    The type of file access rights, e.g. 0o640 is read and write for user, read for group, none for others

    val openfile : string -> mode:open_flag list -> perm:file_perm -> file_descr

    Open the named file with the given flags. Third argument is the permissions to give to the file if it is created (see umask). Return a file descriptor on the named file.

    val close : file_descr -> unit

    Close a file descriptor.

    val fsync : file_descr -> unit

    Flush file buffers to disk.

    • since 4.12
    val read : file_descr -> buf:bytes -> pos:int -> len:int -> int

    read fd ~buf ~pos ~len reads len bytes from descriptor fd, storing them in byte sequence buf, starting at position pos in buf. Return the number of bytes actually read.

    val write : file_descr -> buf:bytes -> pos:int -> len:int -> int

    write fd ~buf ~pos ~len writes len bytes to descriptor fd, taking them from byte sequence buf, starting at position pos in buff. Return the number of bytes actually written. write repeats the writing operation until all bytes have been written or an error occurs.

    val single_write : file_descr -> buf:bytes -> pos:int -> len:int -> int

    Same as write, but attempts to write only once. Thus, if an error occurs, single_write guarantees that no data has been written.

    val write_substring : file_descr -> buf:string -> pos:int -> len:int -> int

    Same as write, but take the data from a string instead of a byte sequence.

    • since 4.02
    val single_write_substring : +UnixLabels (ocaml.UnixLabels)

    Module UnixLabels

    Interface to the Unix system.

    To use the labeled version of this module, add module Unix = UnixLabels in your implementation.

    Note: all the functions of this module (except error_message and handle_unix_error) are liable to raise the Unix_error exception whenever the underlying system call signals an error.

    Error report

    type error = Unix.error =
    1. | E2BIG
      (*

      Argument list too long

      *)
    2. | EACCES
      (*

      Permission denied

      *)
    3. | EAGAIN
      (*

      Resource temporarily unavailable; try again

      *)
    4. | EBADF
      (*

      Bad file descriptor

      *)
    5. | EBUSY
      (*

      Resource unavailable

      *)
    6. | ECHILD
      (*

      No child process

      *)
    7. | EDEADLK
      (*

      Resource deadlock would occur

      *)
    8. | EDOM
      (*

      Domain error for math functions, etc.

      *)
    9. | EEXIST
      (*

      File exists

      *)
    10. | EFAULT
      (*

      Bad address

      *)
    11. | EFBIG
      (*

      File too large

      *)
    12. | EINTR
      (*

      Function interrupted by signal

      *)
    13. | EINVAL
      (*

      Invalid argument

      *)
    14. | EIO
      (*

      Hardware I/O error

      *)
    15. | EISDIR
      (*

      Is a directory

      *)
    16. | EMFILE
      (*

      Too many open files by the process

      *)
    17. | ENAMETOOLONG
      (*

      Filename too long

      *)
    18. | ENFILE
      (*

      Too many open files in the system

      *)
    19. | ENODEV
      (*

      No such device

      *)
    20. | ENOENT
      (*

      No such file or directory

      *)
    21. | ENOEXEC
      (*

      Not an executable file

      *)
    22. | ENOLCK
      (*

      No locks available

      *)
    23. | ENOMEM
      (*

      Not enough memory

      *)
    24. | ENOSPC
      (*

      No space left on device

      *)
    25. | ENOSYS
      (*

      Function not supported

      *)
    26. | ENOTDIR
      (*

      Not a directory

      *)
    27. | ENOTEMPTY
      (*

      Directory not empty

      *)
    28. | ENOTTY
      (*

      Inappropriate I/O control operation

      *)
    29. | ENXIO
      (*

      No such device or address

      *)
    30. | EPERM
      (*

      Operation not permitted

      *)
    31. | EPIPE
      (*

      Broken pipe

      *)
    32. | ERANGE
      (*

      Result too large

      *)
    33. | EROFS
      (*

      Read-only file system

      *)
    34. | ESPIPE
      (*

      Invalid seek e.g. on a pipe

      *)
    35. | ESRCH
      (*

      No such process

      *)
    36. | EXDEV
      (*

      Invalid link

      *)
    37. | EWOULDBLOCK
      (*

      Operation would block

      *)
    38. | EINPROGRESS
      (*

      Operation now in progress

      *)
    39. | EALREADY
      (*

      Operation already in progress

      *)
    40. | ENOTSOCK
      (*

      Socket operation on non-socket

      *)
    41. | EDESTADDRREQ
      (*

      Destination address required

      *)
    42. | EMSGSIZE
      (*

      Message too long

      *)
    43. | EPROTOTYPE
      (*

      Protocol wrong type for socket

      *)
    44. | ENOPROTOOPT
      (*

      Protocol not available

      *)
    45. | EPROTONOSUPPORT
      (*

      Protocol not supported

      *)
    46. | ESOCKTNOSUPPORT
      (*

      Socket type not supported

      *)
    47. | EOPNOTSUPP
      (*

      Operation not supported on socket

      *)
    48. | EPFNOSUPPORT
      (*

      Protocol family not supported

      *)
    49. | EAFNOSUPPORT
      (*

      Address family not supported by protocol family

      *)
    50. | EADDRINUSE
      (*

      Address already in use

      *)
    51. | EADDRNOTAVAIL
      (*

      Can't assign requested address

      *)
    52. | ENETDOWN
      (*

      Network is down

      *)
    53. | ENETUNREACH
      (*

      Network is unreachable

      *)
    54. | ENETRESET
      (*

      Network dropped connection on reset

      *)
    55. | ECONNABORTED
      (*

      Software caused connection abort

      *)
    56. | ECONNRESET
      (*

      Connection reset by peer

      *)
    57. | ENOBUFS
      (*

      No buffer space available

      *)
    58. | EISCONN
      (*

      Socket is already connected

      *)
    59. | ENOTCONN
      (*

      Socket is not connected

      *)
    60. | ESHUTDOWN
      (*

      Can't send after socket shutdown

      *)
    61. | ETOOMANYREFS
      (*

      Too many references: can't splice

      *)
    62. | ETIMEDOUT
      (*

      Connection timed out

      *)
    63. | ECONNREFUSED
      (*

      Connection refused

      *)
    64. | EHOSTDOWN
      (*

      Host is down

      *)
    65. | EHOSTUNREACH
      (*

      No route to host

      *)
    66. | ELOOP
      (*

      Too many levels of symbolic links

      *)
    67. | EOVERFLOW
      (*

      File size or position not representable

      *)
    68. | EUNKNOWNERR of int
      (*

      Unknown error

      *)

    The type of error codes. Errors defined in the POSIX standard and additional errors from UNIX98 and BSD. All other errors are mapped to EUNKNOWNERR.

    exception Unix_error of error * string * string

    Raised by the system calls below when an error is encountered. The first component is the error code; the second component is the function name; the third component is the string parameter to the function, if it has one, or the empty string otherwise.

    UnixLabels.Unix_error and Unix.Unix_error are the same, and catching one will catch the other.

    val error_message : error -> string

    Return a string describing the given error code.

    val handle_unix_error : ('a -> 'b) -> 'a -> 'b

    handle_unix_error f x applies f to x and returns the result. If the exception Unix_error is raised, it prints a message describing the error and exits with code 2.

    Access to the process environment

    val environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. The returned array is empty if the process has special privileges.

    val unsafe_environment : unit -> string array

    Return the process environment, as an array of strings with the format ``variable=value''. Unlike environment, this function returns a populated array even if the process has special privileges. See the documentation for unsafe_getenv for more details.

    • since 4.12
    val getenv : string -> string

    Return the value associated to a variable in the process environment, unless the process has special privileges.

    • raises Not_found

      if the variable is unbound or the process has special privileges.

    This function is identical to Sys.getenv.

    val unsafe_getenv : string -> string

    Return the value associated to a variable in the process environment.

    Unlike getenv, this function returns the value even if the process has special privileges. It is considered unsafe because the programmer of a setuid or setgid program must be careful to avoid using maliciously crafted environment variables in the search path for executables, the locations for temporary files or logs, and the like.

    • raises Not_found

      if the variable is unbound.

    • since 4.06
    val putenv : string -> string -> unit

    putenv name value sets the value associated to a variable in the process environment. name is the name of the environment variable, and value its new associated value.

    Process handling

    type process_status = Unix.process_status =
    1. | WEXITED of int
      (*

      The process terminated normally by exit; the argument is the return code.

      *)
    2. | WSIGNALED of int
      (*

      The process was killed by a signal; the argument is the signal number.

      *)
    3. | WSTOPPED of int
      (*

      The process was stopped by a signal; the argument is the signal number.

      *)

    The termination status of a process. See module Sys for the definitions of the standard signal numbers. Note that they are not the numbers used by the OS.

    On Windows: only WEXITED is used (as there are no inter-process signals) but with specific return codes to indicate special termination causes. Look for NTSTATUS values in the Windows documentation to decode such error return codes. In particular, STATUS_ACCESS_VIOLATION error code is the 32-bit 0xC0000005: as Int32.of_int 0xC0000005 is -1073741819, WEXITED -1073741819 is the Windows equivalent of WSIGNALED Sys.sigsegv.

    type wait_flag = Unix.wait_flag =
    1. | WNOHANG
      (*

      Do not block if no child has died yet, but immediately return with a pid equal to 0.

      *)
    2. | WUNTRACED
      (*

      Report also the children that receive stop signals.

      *)

    Flags for waitpid.

    val execv : prog:string -> args:string array -> 'a

    execv ~prog ~args execute the program in file prog, with the arguments args, and the current process environment. These execv* functions never return: on success, the current program is replaced by the new one.

    On Windows: the CRT simply spawns a new process and exits the current one. This will have unwanted consequences if e.g. another process is waiting on the current one. Using create_process or one of the open_process_* functions instead is recommended.

    val execve : prog:string -> args:string array -> env:string array -> 'a

    Same as execv, except that the third argument provides the environment to the program executed.

    val execvp : prog:string -> args:string array -> 'a

    Same as execv, except that the program is searched in the path.

    val execvpe : prog:string -> args:string array -> env:string array -> 'a

    Same as execve, except that the program is searched in the path.

    val fork : unit -> int

    Fork a new process. The returned integer is 0 for the child process, the pid of the child process for the parent process.

    • raises Invalid_argument

      on Windows. Use create_process or threads instead.

    val wait : unit -> int * process_status

    Wait until one of the children processes die, and return its pid and termination status.

    • raises Invalid_argument

      on Windows. Use waitpid instead.

    val waitpid : mode:wait_flag list -> int -> int * process_status

    Same as wait, but waits for the child process whose pid is given. A pid of -1 means wait for any child. A pid of 0 means wait for any child in the same process group as the current process. Negative pid arguments represent process groups. The list of options indicates whether waitpid should return immediately without waiting, and whether it should report stopped children.

    On Windows: can only wait for a given PID, not any child process.

    val system : string -> process_status

    Execute the given command, wait until it terminates, and return its termination status. The string is interpreted by the shell /bin/sh (or the command interpreter cmd.exe on Windows) and therefore can contain redirections, quotes, variables, etc. To properly quote whitespace and shell special characters occurring in file names or command arguments, the use of Filename.quote_command is recommended. The result WEXITED 127 indicates that the shell couldn't be executed.

    val _exit : int -> 'a

    Terminate the calling process immediately, returning the given status code to the operating system: usually 0 to indicate no errors, and a small positive integer to indicate failure. Unlike Stdlib.exit, Unix._exit performs no finalization whatsoever: functions registered with Stdlib.at_exit are not called, input/output channels are not flushed, and the C run-time system is not finalized either.

    The typical use of Unix._exit is after a Unix.fork operation, when the child process runs into a fatal error and must exit. In this case, it is preferable to not perform any finalization action in the child process, as these actions could interfere with similar actions performed by the parent process. For example, output channels should not be flushed by the child process, as the parent process may flush them again later, resulting in duplicate output.

    • since 4.12
    val getpid : unit -> int

    Return the pid of the process.

    val getppid : unit -> int

    Return the pid of the parent process.

    • raises Invalid_argument

      on Windows (because it is meaningless)

    val nice : int -> int

    Change the process priority. The integer argument is added to the ``nice'' value. (Higher values of the ``nice'' value mean lower priorities.) Return the new nice value.

    • raises Invalid_argument

      on Windows

    Basic file input/output

    type file_descr = Unix.file_descr

    The abstract type of file descriptors.

    val stdin : file_descr

    File descriptor for standard input.

    val stdout : file_descr

    File descriptor for standard output.

    val stderr : file_descr

    File descriptor for standard error.

    type open_flag = Unix.open_flag =
    1. | O_RDONLY
      (*

      Open for reading

      *)
    2. | O_WRONLY
      (*

      Open for writing

      *)
    3. | O_RDWR
      (*

      Open for reading and writing

      *)
    4. | O_NONBLOCK
      (*

      Open in non-blocking mode

      *)
    5. | O_APPEND
      (*

      Open for append

      *)
    6. | O_CREAT
      (*

      Create if nonexistent

      *)
    7. | O_TRUNC
      (*

      Truncate to 0 length if existing

      *)
    8. | O_EXCL
      (*

      Fail if existing

      *)
    9. | O_NOCTTY
      (*

      Don't make this dev a controlling tty

      *)
    10. | O_DSYNC
      (*

      Writes complete as `Synchronised I/O data integrity completion'

      *)
    11. | O_SYNC
      (*

      Writes complete as `Synchronised I/O file integrity completion'

      *)
    12. | O_RSYNC
      (*

      Reads complete as writes (depending on O_SYNC/O_DSYNC)

      *)
    13. | O_SHARE_DELETE
      (*

      Windows only: allow the file to be deleted while still open

      *)
    14. | O_CLOEXEC
      (*

      Set the close-on-exec flag on the descriptor returned by openfile. See set_close_on_exec for more information.

      *)
    15. | O_KEEPEXEC
      (*

      Clear the close-on-exec flag. This is currently the default.

      *)

    The flags to openfile.

    type file_perm = int

    The type of file access rights, e.g. 0o640 is read and write for user, read for group, none for others

    val openfile : string -> mode:open_flag list -> perm:file_perm -> file_descr

    Open the named file with the given flags. Third argument is the permissions to give to the file if it is created (see umask). Return a file descriptor on the named file.

    val close : file_descr -> unit

    Close a file descriptor.

    val fsync : file_descr -> unit

    Flush file buffers to disk.

    • since 4.12
    val read : file_descr -> buf:bytes -> pos:int -> len:int -> int

    read fd ~buf ~pos ~len reads len bytes from descriptor fd, storing them in byte sequence buf, starting at position pos in buf. Return the number of bytes actually read.

    val write : file_descr -> buf:bytes -> pos:int -> len:int -> int

    write fd ~buf ~pos ~len writes len bytes to descriptor fd, taking them from byte sequence buf, starting at position pos in buff. Return the number of bytes actually written. write repeats the writing operation until all bytes have been written or an error occurs.

    val single_write : file_descr -> buf:bytes -> pos:int -> len:int -> int

    Same as write, but attempts to write only once. Thus, if an error occurs, single_write guarantees that no data has been written.

    val write_substring : file_descr -> buf:string -> pos:int -> len:int -> int

    Same as write, but take the data from a string instead of a byte sequence.

    • since 4.02
    val single_write_substring : file_descr -> - buf:string -> - pos:int -> - len:int -> - int

    Same as single_write, but take the data from a string instead of a byte sequence.

    • since 4.02

    Interfacing with the standard input/output library

    val in_channel_of_descr : file_descr -> in_channel

    Create an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.

    Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.

    Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.

    val out_channel_of_descr : file_descr -> out_channel

    Create an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.

    Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.

    Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.

    val descr_of_in_channel : in_channel -> file_descr

    Return the descriptor corresponding to an input channel.

    val descr_of_out_channel : out_channel -> file_descr

    Return the descriptor corresponding to an output channel.

    Seeking and truncating

    type seek_command = Unix.seek_command =
    1. | SEEK_SET
      (*

      indicates positions relative to the beginning of the file

      *)
    2. | SEEK_CUR
      (*

      indicates positions relative to the current position

      *)
    3. | SEEK_END
      (*

      indicates positions relative to the end of the file

      *)

    Positioning modes for lseek.

    val lseek : file_descr -> int -> mode:seek_command -> int

    Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

    val truncate : string -> len:int -> unit

    Truncates the named file to the given size.

    val ftruncate : file_descr -> len:int -> unit

    Truncates the file corresponding to the given descriptor to the given size.

    File status

    type file_kind = Unix.file_kind =
    1. | S_REG
      (*

      Regular file

      *)
    2. | S_DIR
      (*

      Directory

      *)
    3. | S_CHR
      (*

      Character device

      *)
    4. | S_BLK
      (*

      Block device

      *)
    5. | S_LNK
      (*

      Symbolic link

      *)
    6. | S_FIFO
      (*

      Named pipe

      *)
    7. | S_SOCK
      (*

      Socket

      *)
    type stats = Unix.stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }

    The information returned by the stat calls.

    val stat : string -> stats

    Return the information for the named file.

    val lstat : string -> stats

    Same as stat, but in case the file is a symbolic link, return the information for the link itself.

    val fstat : file_descr -> stats

    Return the information for the file associated with the given descriptor.

    val isatty : file_descr -> bool

    Return true if the given file descriptor refers to a terminal or console window, false otherwise.

    File operations on large files

    module LargeFile : sig ... end

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    Mapping files into memory

    val map_file : + buf:string -> + pos:int -> + len:int -> + int

    Same as single_write, but take the data from a string instead of a byte sequence.

    • since 4.02

    Interfacing with the standard input/output library

    val in_channel_of_descr : file_descr -> in_channel

    Create an input channel reading from the given descriptor. The channel is initially in binary mode; use set_binary_mode_in ic false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_in always fails on channels created with this function.

    Beware that input channels are buffered, so more characters may have been read from the descriptor than those accessed using channel functions. Channels also keep a copy of the current position in the file.

    Closing the channel ic returned by in_channel_of_descr fd using close_in ic also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    If several channels are created on the same descriptor, one of the channels must be closed, but not the others. Consider for example a descriptor s connected to a socket and two channels ic = in_channel_of_descr s and oc = out_channel_of_descr s. The recommended closing protocol is to perform close_out oc, which flushes buffered output to the socket then closes the socket. The ic channel must not be closed and will be collected by the GC eventually.

    val out_channel_of_descr : file_descr -> out_channel

    Create an output channel writing on the given descriptor. The channel is initially in binary mode; use set_binary_mode_out oc false if text mode is desired. Text mode is supported only if the descriptor refers to a file or pipe, but is not supported if it refers to a socket.

    On Windows: Stdlib.set_binary_mode_out always fails on channels created with this function.

    Beware that output channels are buffered, so you may have to call Stdlib.flush to ensure that all data has been sent to the descriptor. Channels also keep a copy of the current position in the file.

    Closing the channel oc returned by out_channel_of_descr fd using close_out oc also closes the underlying descriptor fd. It is incorrect to close both the channel ic and the descriptor fd.

    See Unix.in_channel_of_descr for a discussion of the closing protocol when several channels are created on the same descriptor.

    val descr_of_in_channel : in_channel -> file_descr

    Return the descriptor corresponding to an input channel.

    val descr_of_out_channel : out_channel -> file_descr

    Return the descriptor corresponding to an output channel.

    Seeking and truncating

    type seek_command = Unix.seek_command =
    1. | SEEK_SET
      (*

      indicates positions relative to the beginning of the file

      *)
    2. | SEEK_CUR
      (*

      indicates positions relative to the current position

      *)
    3. | SEEK_END
      (*

      indicates positions relative to the end of the file

      *)

    Positioning modes for lseek.

    val lseek : file_descr -> int -> mode:seek_command -> int

    Set the current position for a file descriptor, and return the resulting offset (from the beginning of the file).

    val truncate : string -> len:int -> unit

    Truncates the named file to the given size.

    val ftruncate : file_descr -> len:int -> unit

    Truncates the file corresponding to the given descriptor to the given size.

    File status

    type file_kind = Unix.file_kind =
    1. | S_REG
      (*

      Regular file

      *)
    2. | S_DIR
      (*

      Directory

      *)
    3. | S_CHR
      (*

      Character device

      *)
    4. | S_BLK
      (*

      Block device

      *)
    5. | S_LNK
      (*

      Symbolic link

      *)
    6. | S_FIFO
      (*

      Named pipe

      *)
    7. | S_SOCK
      (*

      Socket

      *)
    type stats = Unix.stats = {
    1. st_dev : int;
      (*

      Device number

      *)
    2. st_ino : int;
      (*

      Inode number

      *)
    3. st_kind : file_kind;
      (*

      Kind of the file

      *)
    4. st_perm : file_perm;
      (*

      Access rights

      *)
    5. st_uid : int;
      (*

      User id of the owner

      *)
    6. st_gid : int;
      (*

      Group ID of the file's group

      *)
    7. st_rdev : int;
      (*

      Device ID (if special file)

      *)
    8. st_size : int;
      (*

      Size in bytes

      *)
    9. st_atime : float;
      (*

      Last access time

      *)
    10. st_mtime : float;
      (*

      Last modification time

      *)
    11. st_ctime : float;
      (*

      Last status change time

      *)
    }

    The information returned by the stat calls.

    val stat : string -> stats

    Return the information for the named file.

    val lstat : string -> stats

    Same as stat, but in case the file is a symbolic link, return the information for the link itself.

    val fstat : file_descr -> stats

    Return the information for the file associated with the given descriptor.

    val isatty : file_descr -> bool

    Return true if the given file descriptor refers to a terminal or console window, false otherwise.

    File operations on large files

    module LargeFile : sig ... end

    File operations on large files. This sub-module provides 64-bit variants of the functions lseek (for positioning a file descriptor), truncate and ftruncate (for changing the size of a file), and stat, lstat and fstat (for obtaining information on files). These alternate functions represent positions and sizes by 64-bit integers (type int64) instead of regular integers (type int), thus allowing operating on files whose sizes are greater than max_int.

    Mapping files into memory

    val map_file : file_descr -> - ?pos:int64 -> - kind:('a, 'b) Stdlib.Bigarray.kind -> - layout:'c Stdlib.Bigarray.layout -> - shared:bool -> - dims:int array -> - ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t

    Memory mapping of a file as a Bigarray. map_file fd ~kind ~layout ~shared ~dims returns a Bigarray of kind kind, layout layout, and dimensions as specified in dims. The data contained in this Bigarray are the contents of the file referred to by the file descriptor fd (as opened previously with openfile, for example). The optional pos parameter is the byte offset in the file of the data being mapped; it defaults to 0 (map from the beginning of the file).

    If shared is true, all modifications performed on the array are reflected in the file. This requires that fd be opened with write permissions. If shared is false, modifications performed on the array are done in memory only, using copy-on-write of the modified pages; the underlying file is not affected.

    map_file is much more efficient than reading the whole file in a Bigarray, modifying that Bigarray, and writing it afterwards.

    To adjust automatically the dimensions of the Bigarray to the actual size of the file, the major dimension (that is, the first dimension for an array with C layout, and the last dimension for an array with Fortran layout) can be given as -1. map_file then determines the major dimension from the size of the file. The file must contain an integral number of sub-arrays as determined by the non-major dimensions, otherwise Failure is raised.

    If all dimensions of the Bigarray are given, the file size is matched against the size of the Bigarray. If the file is larger than the Bigarray, only the initial portion of the file is mapped to the Bigarray. If the file is smaller than the big array, the file is automatically grown to the size of the Bigarray. This requires write permissions on fd.

    Array accesses are bounds-checked, but the bounds are determined by the initial call to map_file. Therefore, you should make sure no other process modifies the mapped file while you're accessing it, or a SIGBUS signal may be raised. This happens, for instance, if the file is shrunk.

    Invalid_argument or Failure may be raised in cases where argument validation fails.

    • since 4.06

    Operations on file names

    Removes the named file.

    If the named file is a directory, raises:

    • EPERM on POSIX compliant system
    • EISDIR on Linux >= 2.1.132
    • EACCESS on Windows
    val rename : src:string -> dst:string -> unit

    rename ~src ~dst changes the name of a file from src to dst, moving it between directories if needed. If dst already exists, its contents will be replaced with those of src. Depending on the operating system, the metadata (permissions, owner, etc) of dst can either be preserved or be replaced by those of src.

    link ?follow ~src ~dst creates a hard link named dst to the file named src.

    • parameter follow

      indicates whether a src symlink is followed or a hardlink to src itself will be created. On Unix systems this is done using the linkat(2) function. If ?follow is not provided, then the link(2) function is used whose behaviour is OS-dependent, but more widely available.

    • raises ENOSYS

      On Unix if ~follow:_ is requested, but linkat is unavailable.

    • raises ENOSYS

      On Windows if ~follow:false is requested.

    val realpath : string -> string

    realpath p is an absolute pathname for p obtained by resolving all extra / characters, relative path segments and symbolic links.

    • since 4.13

    File permissions and ownership

    type access_permission = Unix.access_permission =
    1. | R_OK
      (*

      Read permission

      *)
    2. | W_OK
      (*

      Write permission

      *)
    3. | X_OK
      (*

      Execution permission

      *)
    4. | F_OK
      (*

      File exists

      *)

    Flags for the access call.

    val chmod : string -> perm:file_perm -> unit

    Change the permissions of the named file.

    val fchmod : file_descr -> perm:file_perm -> unit

    Change the permissions of an opened file.

    • raises Invalid_argument

      on Windows

    val chown : string -> uid:int -> gid:int -> unit

    Change the owner uid and owner gid of the named file.

    • raises Invalid_argument

      on Windows

    val fchown : file_descr -> uid:int -> gid:int -> unit

    Change the owner uid and owner gid of an opened file.

    • raises Invalid_argument

      on Windows

    val umask : file_perm -> file_perm

    Set the process's file mode creation mask, and return the previous mask.

    • raises Invalid_argument

      on Windows

    val access : string -> perm:access_permission list -> unit

    Check that the process has the given permissions over the named file.

    On Windows: execute permission X_OK cannot be tested, just tests for read permission instead.

    • raises Unix_error

      otherwise.

    Operations on file descriptors

    val dup : ?cloexec:bool -> file_descr -> file_descr

    Return a new file descriptor referencing the same file as the given descriptor. See set_close_on_exec for documentation on the cloexec optional argument.

    val dup2 : ?cloexec:bool -> src:file_descr -> dst:file_descr -> unit

    dup2 ~src ~dst duplicates src to dst, closing dst if already opened. See set_close_on_exec for documentation on the cloexec optional argument.

    val set_nonblock : file_descr -> unit

    Set the ``non-blocking'' flag on the given descriptor. When the non-blocking flag is set, reading on a descriptor on which there is temporarily no data available raises the EAGAIN or EWOULDBLOCK error instead of blocking; writing on a descriptor on which there is temporarily no room for writing also raises EAGAIN or EWOULDBLOCK.

    val clear_nonblock : file_descr -> unit

    Clear the ``non-blocking'' flag on the given descriptor. See set_nonblock.

    val set_close_on_exec : file_descr -> unit

    Set the ``close-on-exec'' flag on the given descriptor. A descriptor with the close-on-exec flag is automatically closed when the current process starts another program with one of the exec, create_process and open_process functions.

    It is often a security hole to leak file descriptors opened on, say, a private file to an external program: the program, then, gets access to the private file and can do bad things with it. Hence, it is highly recommended to set all file descriptors ``close-on-exec'', except in the very few cases where a file descriptor actually needs to be transmitted to another program.

    The best way to set a file descriptor ``close-on-exec'' is to create it in this state. To this end, the openfile function has O_CLOEXEC and O_KEEPEXEC flags to enforce ``close-on-exec'' mode or ``keep-on-exec'' mode, respectively. All other operations in the Unix module that create file descriptors have an optional argument ?cloexec:bool to indicate whether the file descriptor should be created in ``close-on-exec'' mode (by writing ~cloexec:true) or in ``keep-on-exec'' mode (by writing ~cloexec:false). For historical reasons, the default file descriptor creation mode is ``keep-on-exec'', if no cloexec optional argument is given. This is not a safe default, hence it is highly recommended to pass explicit cloexec arguments to operations that create file descriptors.

    The cloexec optional arguments and the O_KEEPEXEC flag were introduced in OCaml 4.05. Earlier, the common practice was to create file descriptors in the default, ``keep-on-exec'' mode, then call set_close_on_exec on those freshly-created file descriptors. This is not as safe as creating the file descriptor in ``close-on-exec'' mode because, in multithreaded programs, a window of vulnerability exists between the time when the file descriptor is created and the time set_close_on_exec completes. If another thread spawns another program during this window, the descriptor will leak, as it is still in the ``keep-on-exec'' mode.

    Regarding the atomicity guarantees given by ~cloexec:true or by the use of the O_CLOEXEC flag: on all platforms it is guaranteed that a concurrently-executing Caml thread cannot leak the descriptor by starting a new process. On Linux, this guarantee extends to concurrently-executing C threads. As of Feb 2017, other operating systems lack the necessary system calls and still expose a window of vulnerability during which a C thread can see the newly-created file descriptor in ``keep-on-exec'' mode.

    val clear_close_on_exec : file_descr -> unit

    Clear the ``close-on-exec'' flag on the given descriptor. See set_close_on_exec.

    Directories

    val mkdir : string -> perm:file_perm -> unit

    Create a directory with the given permissions (see umask).

    val rmdir : string -> unit

    Remove an empty directory.

    val chdir : string -> unit

    Change the process working directory.

    val getcwd : unit -> string

    Return the name of the current working directory.

    val chroot : string -> unit

    Change the process root directory.

    • raises Invalid_argument

      on Windows

    type dir_handle = Unix.dir_handle

    The type of descriptors over opened directories.

    val opendir : string -> dir_handle

    Open a descriptor on a directory

    val readdir : dir_handle -> string

    Return the next entry in a directory.

    • raises End_of_file

      when the end of the directory has been reached.

    val rewinddir : dir_handle -> unit

    Reposition the descriptor to the beginning of the directory

    val closedir : dir_handle -> unit

    Close a directory descriptor.

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> file_descr * file_descr

    Create a pipe. The first component of the result is opened for reading, that's the exit to the pipe. The second component is opened for writing, that's the entrance to the pipe. See set_close_on_exec for documentation on the cloexec optional argument.

    val mkfifo : string -> perm:file_perm -> unit

    Create a named pipe with the given permissions (see umask).

    • raises Invalid_argument

      on Windows

    High-level process and redirection management

    val create_process : - prog:string -> - args:string array -> - stdin:file_descr -> - stdout:file_descr -> - stderr:file_descr -> + ?pos:int64 -> + kind:('a, 'b) Stdlib.Bigarray.kind -> + layout:'c Stdlib.Bigarray.layout -> + shared:bool -> + dims:int array -> + ('a, 'b, 'c) Stdlib.Bigarray.Genarray.t

    Memory mapping of a file as a Bigarray. map_file fd ~kind ~layout ~shared ~dims returns a Bigarray of kind kind, layout layout, and dimensions as specified in dims. The data contained in this Bigarray are the contents of the file referred to by the file descriptor fd (as opened previously with openfile, for example). The optional pos parameter is the byte offset in the file of the data being mapped; it defaults to 0 (map from the beginning of the file).

    If shared is true, all modifications performed on the array are reflected in the file. This requires that fd be opened with write permissions. If shared is false, modifications performed on the array are done in memory only, using copy-on-write of the modified pages; the underlying file is not affected.

    map_file is much more efficient than reading the whole file in a Bigarray, modifying that Bigarray, and writing it afterwards.

    To adjust automatically the dimensions of the Bigarray to the actual size of the file, the major dimension (that is, the first dimension for an array with C layout, and the last dimension for an array with Fortran layout) can be given as -1. map_file then determines the major dimension from the size of the file. The file must contain an integral number of sub-arrays as determined by the non-major dimensions, otherwise Failure is raised.

    If all dimensions of the Bigarray are given, the file size is matched against the size of the Bigarray. If the file is larger than the Bigarray, only the initial portion of the file is mapped to the Bigarray. If the file is smaller than the big array, the file is automatically grown to the size of the Bigarray. This requires write permissions on fd.

    Array accesses are bounds-checked, but the bounds are determined by the initial call to map_file. Therefore, you should make sure no other process modifies the mapped file while you're accessing it, or a SIGBUS signal may be raised. This happens, for instance, if the file is shrunk.

    Invalid_argument or Failure may be raised in cases where argument validation fails.

    • since 4.06

    Operations on file names

    Removes the named file.

    If the named file is a directory, raises:

    • EPERM on POSIX compliant system
    • EISDIR on Linux >= 2.1.132
    • EACCESS on Windows
    val rename : src:string -> dst:string -> unit

    rename ~src ~dst changes the name of a file from src to dst, moving it between directories if needed. If dst already exists, its contents will be replaced with those of src. Depending on the operating system, the metadata (permissions, owner, etc) of dst can either be preserved or be replaced by those of src.

    link ?follow ~src ~dst creates a hard link named dst to the file named src.

    • parameter follow

      indicates whether a src symlink is followed or a hardlink to src itself will be created. On Unix systems this is done using the linkat(2) function. If ?follow is not provided, then the link(2) function is used whose behaviour is OS-dependent, but more widely available.

    • raises ENOSYS

      On Unix if ~follow:_ is requested, but linkat is unavailable.

    • raises ENOSYS

      On Windows if ~follow:false is requested.

    val realpath : string -> string

    realpath p is an absolute pathname for p obtained by resolving all extra / characters, relative path segments and symbolic links.

    • since 4.13

    File permissions and ownership

    type access_permission = Unix.access_permission =
    1. | R_OK
      (*

      Read permission

      *)
    2. | W_OK
      (*

      Write permission

      *)
    3. | X_OK
      (*

      Execution permission

      *)
    4. | F_OK
      (*

      File exists

      *)

    Flags for the access call.

    val chmod : string -> perm:file_perm -> unit

    Change the permissions of the named file.

    val fchmod : file_descr -> perm:file_perm -> unit

    Change the permissions of an opened file.

    • raises Invalid_argument

      on Windows

    val chown : string -> uid:int -> gid:int -> unit

    Change the owner uid and owner gid of the named file.

    • raises Invalid_argument

      on Windows

    val fchown : file_descr -> uid:int -> gid:int -> unit

    Change the owner uid and owner gid of an opened file.

    • raises Invalid_argument

      on Windows

    val umask : file_perm -> file_perm

    Set the process's file mode creation mask, and return the previous mask.

    • raises Invalid_argument

      on Windows

    val access : string -> perm:access_permission list -> unit

    Check that the process has the given permissions over the named file.

    On Windows: execute permission X_OK cannot be tested, just tests for read permission instead.

    Operations on file descriptors

    val dup : ?cloexec:bool -> file_descr -> file_descr

    Return a new file descriptor referencing the same file as the given descriptor. See set_close_on_exec for documentation on the cloexec optional argument.

    val dup2 : ?cloexec:bool -> src:file_descr -> dst:file_descr -> unit

    dup2 ~src ~dst duplicates src to dst, closing dst if already opened. See set_close_on_exec for documentation on the cloexec optional argument.

    val set_nonblock : file_descr -> unit

    Set the ``non-blocking'' flag on the given descriptor. When the non-blocking flag is set, reading on a descriptor on which there is temporarily no data available raises the EAGAIN or EWOULDBLOCK error instead of blocking; writing on a descriptor on which there is temporarily no room for writing also raises EAGAIN or EWOULDBLOCK.

    val clear_nonblock : file_descr -> unit

    Clear the ``non-blocking'' flag on the given descriptor. See set_nonblock.

    val set_close_on_exec : file_descr -> unit

    Set the ``close-on-exec'' flag on the given descriptor. A descriptor with the close-on-exec flag is automatically closed when the current process starts another program with one of the exec, create_process and open_process functions.

    It is often a security hole to leak file descriptors opened on, say, a private file to an external program: the program, then, gets access to the private file and can do bad things with it. Hence, it is highly recommended to set all file descriptors ``close-on-exec'', except in the very few cases where a file descriptor actually needs to be transmitted to another program.

    The best way to set a file descriptor ``close-on-exec'' is to create it in this state. To this end, the openfile function has O_CLOEXEC and O_KEEPEXEC flags to enforce ``close-on-exec'' mode or ``keep-on-exec'' mode, respectively. All other operations in the Unix module that create file descriptors have an optional argument ?cloexec:bool to indicate whether the file descriptor should be created in ``close-on-exec'' mode (by writing ~cloexec:true) or in ``keep-on-exec'' mode (by writing ~cloexec:false). For historical reasons, the default file descriptor creation mode is ``keep-on-exec'', if no cloexec optional argument is given. This is not a safe default, hence it is highly recommended to pass explicit cloexec arguments to operations that create file descriptors.

    The cloexec optional arguments and the O_KEEPEXEC flag were introduced in OCaml 4.05. Earlier, the common practice was to create file descriptors in the default, ``keep-on-exec'' mode, then call set_close_on_exec on those freshly-created file descriptors. This is not as safe as creating the file descriptor in ``close-on-exec'' mode because, in multithreaded programs, a window of vulnerability exists between the time when the file descriptor is created and the time set_close_on_exec completes. If another thread spawns another program during this window, the descriptor will leak, as it is still in the ``keep-on-exec'' mode.

    Regarding the atomicity guarantees given by ~cloexec:true or by the use of the O_CLOEXEC flag: on all platforms it is guaranteed that a concurrently-executing Caml thread cannot leak the descriptor by starting a new process. On Linux, this guarantee extends to concurrently-executing C threads. As of Feb 2017, other operating systems lack the necessary system calls and still expose a window of vulnerability during which a C thread can see the newly-created file descriptor in ``keep-on-exec'' mode.

    val clear_close_on_exec : file_descr -> unit

    Clear the ``close-on-exec'' flag on the given descriptor. See set_close_on_exec.

    Directories

    val mkdir : string -> perm:file_perm -> unit

    Create a directory with the given permissions (see umask).

    val rmdir : string -> unit

    Remove an empty directory.

    val chdir : string -> unit

    Change the process working directory.

    val getcwd : unit -> string

    Return the name of the current working directory.

    val chroot : string -> unit

    Change the process root directory.

    • raises Invalid_argument

      on Windows

    type dir_handle = Unix.dir_handle

    The type of descriptors over opened directories.

    val opendir : string -> dir_handle

    Open a descriptor on a directory

    val readdir : dir_handle -> string

    Return the next entry in a directory.

    • raises End_of_file

      when the end of the directory has been reached.

    val rewinddir : dir_handle -> unit

    Reposition the descriptor to the beginning of the directory

    val closedir : dir_handle -> unit

    Close a directory descriptor.

    Pipes and redirections

    val pipe : ?cloexec:bool -> unit -> file_descr * file_descr

    Create a pipe. The first component of the result is opened for reading, that's the exit to the pipe. The second component is opened for writing, that's the entrance to the pipe. See set_close_on_exec for documentation on the cloexec optional argument.

    val mkfifo : string -> perm:file_perm -> unit

    Create a named pipe with the given permissions (see umask).

    • raises Invalid_argument

      on Windows

    High-level process and redirection management

    val create_process : + prog:string -> + args:string array -> + stdin:file_descr -> + stdout:file_descr -> + stderr:file_descr -> int

    create_process ~prog ~args ~stdin ~stdout ~stderr creates a new process that executes the program in file prog, with arguments args. The pid of the new process is returned immediately; the new process executes concurrently with the current process. The standard input and outputs of the new process are connected to the descriptors stdin, stdout and stderr. Passing e.g. Unix.stdout for stdout prevents the redirection and causes the new process to have the same standard output as the current process. The executable file prog is searched in the path. The new process has the same environment as the current process.

    val create_process_env : - prog:string -> - args:string array -> - env:string array -> - stdin:file_descr -> - stdout:file_descr -> - stderr:file_descr -> - int

    create_process_env ~prog ~args ~env ~stdin ~stdout ~stderr works as create_process, except that the extra argument env specifies the environment passed to the program.

    val open_process_in : string -> in_channel

    High-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.

    val open_process_out : string -> out_channel

    Same as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.

    val open_process : string -> in_channel * out_channel

    Same as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.

    val open_process_full : + prog:string -> + args:string array -> + env:string array -> + stdin:file_descr -> + stdout:file_descr -> + stderr:file_descr -> + int

    create_process_env ~prog ~args ~env ~stdin ~stdout ~stderr works as create_process, except that the extra argument env specifies the environment passed to the program.

    val open_process_in : string -> in_channel

    High-level pipe and process management. This function runs the given command in parallel with the program. The standard output of the command is redirected to a pipe, which can be read via the returned input channel. The command is interpreted by the shell /bin/sh (or cmd.exe on Windows), cf. system. The Filename.quote_command function can be used to quote the command and its arguments as appropriate for the shell being used. If the command does not need to be run through the shell, open_process_args_in can be used as a more robust and more efficient alternative to open_process_in.

    val open_process_out : string -> out_channel

    Same as open_process_in, but redirect the standard input of the command to a pipe. Data written to the returned output channel is sent to the standard input of the command. Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization. If the command does not need to be run through the shell, open_process_args_out can be used instead of open_process_out.

    val open_process : string -> in_channel * out_channel

    Same as open_process_out, but redirects both the standard input and standard output of the command to pipes connected to the two returned channels. The input channel is connected to the output of the command, and the output channel to the input of the command. If the command does not need to be run through the shell, open_process_args can be used instead of open_process.

    val open_process_full : string -> - env:string array -> + env:string array -> in_channel * out_channel * in_channel

    Similar to open_process, but the second argument specifies the environment passed to the command. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the command. If the command does not need to be run through the shell, open_process_args_full can be used instead of open_process_full.

    val open_process_args : string -> string array -> in_channel * out_channel

    open_process_args prog args runs the program prog with arguments args. Note that the first argument is by convention the filename of the program being executed, just like Sys.argv.(0). The new process executes concurrently with the current process. The standard input and output of the new process are redirected to pipes, which can be respectively read and written via the returned channels. The input channel is connected to the output of the program, and the output channel to the input of the program.

    Warning: writes on output channels are buffered, hence be careful to call Stdlib.flush at the right times to ensure correct synchronization.

    The executable file prog is searched for in the path. This behaviour changed in 4.12; previously prog was looked up only in the current directory.

    The new process has the same environment as the current process.

    • since 4.08
    val open_process_args_in : string -> string array -> in_channel

    Same as open_process_args, but redirects only the standard output of the new process.

    • since 4.08
    val open_process_args_out : string -> string array -> out_channel

    Same as open_process_args, but redirects only the standard input of the new process.

    • since 4.08
    val open_process_args_full : string -> string array -> string array -> in_channel * out_channel * in_channel

    Similar to open_process_args, but the third argument specifies the environment passed to the new process. The result is a triple of channels connected respectively to the standard output, standard input, and standard error of the program.

    • since 4.08
    val process_in_pid : in_channel -> int

    Return the pid of a process opened via open_process_in or open_process_args_in.

    • since 4.12
    val process_out_pid : out_channel -> int

    Return the pid of a process opened via open_process_out or open_process_args_out.

    • since 4.12
    val process_pid : (in_channel * out_channel) -> int

    Return the pid of a process opened via open_process or open_process_args.

    • since 4.12
    val process_full_pid : (in_channel * out_channel * in_channel) -> int

    Return the pid of a process opened via open_process_full or open_process_args_full.

    • since 4.12
    val close_process_in : in_channel -> process_status

    Close channels opened by open_process_in, wait for the associated command to terminate, and return its termination status.

    val close_process_out : out_channel -> process_status

    Close channels opened by open_process_out, wait for the associated command to terminate, and return its termination status.

    val close_process : (in_channel * out_channel) -> process_status

    Close channels opened by open_process, wait for the associated command to terminate, and return its termination status.

    val close_process_full : (in_channel * out_channel * in_channel) -> - process_status

    Close channels opened by open_process_full, wait for the associated command to terminate, and return its termination status.

    symlink ?to_dir ~src ~dst creates the file dst as a symbolic link to the file src. On Windows, ~to_dir indicates if the symbolic link points to a directory or a file; if omitted, symlink examines src using stat and picks appropriately, if src does not exist then false is assumed (for this reason, it is recommended that the ~to_dir parameter be specified in new code). On Unix, ~to_dir is ignored.

    Windows symbolic links are available in Windows Vista onwards. There are some important differences between Windows symlinks and their POSIX counterparts.

    Windows symbolic links come in two flavours: directory and regular, which designate whether the symbolic link points to a directory or a file. The type must be correct - a directory symlink which actually points to a file cannot be selected with chdir and a file symlink which actually points to a directory cannot be read or written (note that Cygwin's emulation layer ignores this distinction).

    When symbolic links are created to existing targets, this distinction doesn't matter and symlink will automatically create the correct kind of symbolic link. The distinction matters when a symbolic link is created to a non-existent target.

    The other caveat is that by default symbolic links are a privileged operation. Administrators will always need to be running elevated (or with UAC disabled) and by default normal user accounts need to be granted the SeCreateSymbolicLinkPrivilege via Local Security Policy (secpol.msc) or via Active Directory.

    has_symlink can be used to check that a process is able to create symbolic links.

    Returns true if the user is able to create symbolic links. On Windows, this indicates that the user not only has the SeCreateSymbolicLinkPrivilege but is also running elevated, if necessary. On other platforms, this is simply indicates that the symlink system call is available.

    • since 4.03

    Read the contents of a symbolic link.

    Polling

    val select : - read:file_descr list -> - write:file_descr list -> - except:file_descr list -> - timeout:float -> - file_descr list * file_descr list * file_descr list

    Wait until some input/output operations become possible on some channels. The three list arguments are, respectively, a set of descriptors to check for reading (first argument), for writing (second argument), or for exceptional conditions (third argument). The fourth argument is the maximal timeout, in seconds; a negative fourth argument means no timeout (unbounded wait). The result is composed of three sets of descriptors: those ready for reading (first component), ready for writing (second component), and over which an exceptional condition is pending (third component).

    Locking

    type lock_command = Unix.lock_command =
    1. | F_ULOCK
      (*

      Unlock a region

      *)
    2. | F_LOCK
      (*

      Lock a region for writing, and block if already locked

      *)
    3. | F_TLOCK
      (*

      Lock a region for writing, or fail if already locked

      *)
    4. | F_TEST
      (*

      Test a region for other process locks

      *)
    5. | F_RLOCK
      (*

      Lock a region for reading, and block if already locked

      *)
    6. | F_TRLOCK
      (*

      Lock a region for reading, or fail if already locked

      *)

    Commands for lockf.

    val lockf : file_descr -> mode:lock_command -> len:int -> unit

    lockf fd ~mode ~len puts a lock on a region of the file opened as fd. The region starts at the current read/write position for fd (as set by lseek), and extends len bytes forward if len is positive, len bytes backwards if len is negative, or to the end of the file if len is zero. A write lock prevents any other process from acquiring a read or write lock on the region. A read lock prevents any other process from acquiring a write lock on the region, but lets other processes acquire read locks on it.

    The F_LOCK and F_TLOCK commands attempts to put a write lock on the specified region. The F_RLOCK and F_TRLOCK commands attempts to put a read lock on the specified region. If one or several locks put by another process prevent the current process from acquiring the lock, F_LOCK and F_RLOCK block until these locks are removed, while F_TLOCK and F_TRLOCK fail immediately with an exception. The F_ULOCK removes whatever locks the current process has on the specified region. Finally, the F_TEST command tests whether a write lock can be acquired on the specified region, without actually putting a lock. It returns immediately if successful, or fails otherwise.

    What happens when a process tries to lock a region of a file that is already locked by the same process depends on the OS. On POSIX-compliant systems, the second lock operation succeeds and may "promote" the older lock from read lock to write lock. On Windows, the second lock operation will block or fail.

    Signals

    Note: installation of signal handlers is performed via the functions Sys.signal and Sys.set_signal.

    val kill : pid:int -> signal:int -> unit

    kill ~pid ~signal sends signal number signal to the process with id pid.

    On Windows: only the Sys.sigkill signal is emulated.

    type sigprocmask_command = Unix.sigprocmask_command =
    1. | SIG_SETMASK
    2. | SIG_BLOCK
    3. | SIG_UNBLOCK
    val sigprocmask : mode:sigprocmask_command -> int list -> int list

    sigprocmask ~mode sigs changes the set of blocked signals. If mode is SIG_SETMASK, blocked signals are set to those in the list sigs. If mode is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If mode is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigprocmask returns the set of previously blocked signals.

    When the systhreads version of the Thread module is loaded, this function redirects to Thread.sigmask. I.e., sigprocmask only changes the mask of the current thread.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigpending : unit -> int list

    Return the set of blocked signals that are currently pending.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigsuspend : int list -> unit

    sigsuspend sigs atomically sets the blocked signals to sigs and waits for a non-ignored, non-blocked signal to be delivered. On return, the blocked signals are reset to their initial value.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val pause : unit -> unit

    Wait until a non-ignored, non-blocked signal is delivered.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    Time functions

    type process_times = Unix.process_times = {
    1. tms_utime : float;
      (*

      User time for the process

      *)
    2. tms_stime : float;
      (*

      System time for the process

      *)
    3. tms_cutime : float;
      (*

      User time for the children processes

      *)
    4. tms_cstime : float;
      (*

      System time for the children processes

      *)
    }

    The execution times (CPU times) of a process.

    type tm = Unix.tm = {
    1. tm_sec : int;
      (*

      Seconds 0..60

      *)
    2. tm_min : int;
      (*

      Minutes 0..59

      *)
    3. tm_hour : int;
      (*

      Hours 0..23

      *)
    4. tm_mday : int;
      (*

      Day of month 1..31

      *)
    5. tm_mon : int;
      (*

      Month of year 0..11

      *)
    6. tm_year : int;
      (*

      Year - 1900

      *)
    7. tm_wday : int;
      (*

      Day of week (Sunday is 0)

      *)
    8. tm_yday : int;
      (*

      Day of year 0..365

      *)
    9. tm_isdst : bool;
      (*

      Daylight time savings in effect

      *)
    }

    The type representing wallclock time and calendar date.

    val time : unit -> float

    Return the current time since 00:00:00 GMT, Jan. 1, 1970, in seconds.

    val gettimeofday : unit -> float

    Same as time, but with resolution better than 1 second.

    val gmtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT. To perform the inverse conversion, set the TZ environment variable to "UTC", use mktime, and then restore the original value of TZ.

    val localtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes the local time zone. The function performing the inverse conversion is mktime.

    val mktime : tm -> float * tm

    Convert a date and time, specified by the tm argument, into a time in seconds, as returned by time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone.

    val alarm : int -> int

    Schedule a SIGALRM signal after the given number of seconds.

    • raises Invalid_argument

      on Windows

    val sleep : int -> unit

    Stop execution for the given number of seconds.

    val sleepf : float -> unit

    Stop execution for the given number of seconds. Like sleep, but fractions of seconds are supported.

    • since 4.12
    val times : unit -> process_times

    Return the execution times of the process.

    On Windows: partially implemented, will not report timings for child processes.

    val utimes : string -> access:float -> modif:float -> unit

    Set the last access time (second arg) and last modification time (third arg) for a file. Times are expressed in seconds from 00:00:00 GMT, Jan. 1, 1970. If both times are 0.0, the access and last modification times are both set to the current time.

    type interval_timer = Unix.interval_timer =
    1. | ITIMER_REAL
      (*

      decrements in real time, and sends the signal SIGALRM when expired.

      *)
    2. | ITIMER_VIRTUAL
      (*

      decrements in process virtual time, and sends SIGVTALRM when expired.

      *)
    3. | ITIMER_PROF
      (*

      (for profiling) decrements both when the process is running and when the system is running on behalf of the process; it sends SIGPROF when expired.

      *)

    The three kinds of interval timers.

    type interval_timer_status = Unix.interval_timer_status = {
    1. it_interval : float;
      (*

      Period

      *)
    2. it_value : float;
      (*

      Current value of the timer

      *)
    }

    The type describing the status of an interval timer

    Return the current status of the given interval timer.

    • raises Invalid_argument

      on Windows

    val setitimer : + process_status

    Close channels opened by open_process_full, wait for the associated command to terminate, and return its termination status.

    symlink ?to_dir ~src ~dst creates the file dst as a symbolic link to the file src. On Windows, ~to_dir indicates if the symbolic link points to a directory or a file; if omitted, symlink examines src using stat and picks appropriately, if src does not exist then false is assumed (for this reason, it is recommended that the ~to_dir parameter be specified in new code). On Unix, ~to_dir is ignored.

    Windows symbolic links are available in Windows Vista onwards. There are some important differences between Windows symlinks and their POSIX counterparts.

    Windows symbolic links come in two flavours: directory and regular, which designate whether the symbolic link points to a directory or a file. The type must be correct - a directory symlink which actually points to a file cannot be selected with chdir and a file symlink which actually points to a directory cannot be read or written (note that Cygwin's emulation layer ignores this distinction).

    When symbolic links are created to existing targets, this distinction doesn't matter and symlink will automatically create the correct kind of symbolic link. The distinction matters when a symbolic link is created to a non-existent target.

    The other caveat is that by default symbolic links are a privileged operation. Administrators will always need to be running elevated (or with UAC disabled) and by default normal user accounts need to be granted the SeCreateSymbolicLinkPrivilege via Local Security Policy (secpol.msc) or via Active Directory.

    has_symlink can be used to check that a process is able to create symbolic links.

    Returns true if the user is able to create symbolic links. On Windows, this indicates that the user not only has the SeCreateSymbolicLinkPrivilege but is also running elevated, if necessary. On other platforms, this is simply indicates that the symlink system call is available.

    • since 4.03

    Read the contents of a symbolic link.

    Polling

    val select : + read:file_descr list -> + write:file_descr list -> + except:file_descr list -> + timeout:float -> + file_descr list * file_descr list * file_descr list

    Wait until some input/output operations become possible on some channels. The three list arguments are, respectively, a set of descriptors to check for reading (first argument), for writing (second argument), or for exceptional conditions (third argument). The fourth argument is the maximal timeout, in seconds; a negative fourth argument means no timeout (unbounded wait). The result is composed of three sets of descriptors: those ready for reading (first component), ready for writing (second component), and over which an exceptional condition is pending (third component).

    Locking

    type lock_command = Unix.lock_command =
    1. | F_ULOCK
      (*

      Unlock a region

      *)
    2. | F_LOCK
      (*

      Lock a region for writing, and block if already locked

      *)
    3. | F_TLOCK
      (*

      Lock a region for writing, or fail if already locked

      *)
    4. | F_TEST
      (*

      Test a region for other process locks

      *)
    5. | F_RLOCK
      (*

      Lock a region for reading, and block if already locked

      *)
    6. | F_TRLOCK
      (*

      Lock a region for reading, or fail if already locked

      *)

    Commands for lockf.

    val lockf : file_descr -> mode:lock_command -> len:int -> unit

    lockf fd ~mode ~len puts a lock on a region of the file opened as fd. The region starts at the current read/write position for fd (as set by lseek), and extends len bytes forward if len is positive, len bytes backwards if len is negative, or to the end of the file if len is zero. A write lock prevents any other process from acquiring a read or write lock on the region. A read lock prevents any other process from acquiring a write lock on the region, but lets other processes acquire read locks on it.

    The F_LOCK and F_TLOCK commands attempts to put a write lock on the specified region. The F_RLOCK and F_TRLOCK commands attempts to put a read lock on the specified region. If one or several locks put by another process prevent the current process from acquiring the lock, F_LOCK and F_RLOCK block until these locks are removed, while F_TLOCK and F_TRLOCK fail immediately with an exception. The F_ULOCK removes whatever locks the current process has on the specified region. Finally, the F_TEST command tests whether a write lock can be acquired on the specified region, without actually putting a lock. It returns immediately if successful, or fails otherwise.

    What happens when a process tries to lock a region of a file that is already locked by the same process depends on the OS. On POSIX-compliant systems, the second lock operation succeeds and may "promote" the older lock from read lock to write lock. On Windows, the second lock operation will block or fail.

    Signals

    Note: installation of signal handlers is performed via the functions Sys.signal and Sys.set_signal.

    val kill : pid:int -> signal:int -> unit

    kill ~pid ~signal sends signal number signal to the process with id pid.

    On Windows: only the Sys.sigkill signal is emulated.

    type sigprocmask_command = Unix.sigprocmask_command =
    1. | SIG_SETMASK
    2. | SIG_BLOCK
    3. | SIG_UNBLOCK
    val sigprocmask : mode:sigprocmask_command -> int list -> int list

    sigprocmask ~mode sigs changes the set of blocked signals. If mode is SIG_SETMASK, blocked signals are set to those in the list sigs. If mode is SIG_BLOCK, the signals in sigs are added to the set of blocked signals. If mode is SIG_UNBLOCK, the signals in sigs are removed from the set of blocked signals. sigprocmask returns the set of previously blocked signals.

    When the systhreads version of the Thread module is loaded, this function redirects to Thread.sigmask. I.e., sigprocmask only changes the mask of the current thread.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigpending : unit -> int list

    Return the set of blocked signals that are currently pending.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val sigsuspend : int list -> unit

    sigsuspend sigs atomically sets the blocked signals to sigs and waits for a non-ignored, non-blocked signal to be delivered. On return, the blocked signals are reset to their initial value.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    val pause : unit -> unit

    Wait until a non-ignored, non-blocked signal is delivered.

    • raises Invalid_argument

      on Windows (no inter-process signals on Windows)

    Time functions

    type process_times = Unix.process_times = {
    1. tms_utime : float;
      (*

      User time for the process

      *)
    2. tms_stime : float;
      (*

      System time for the process

      *)
    3. tms_cutime : float;
      (*

      User time for the children processes

      *)
    4. tms_cstime : float;
      (*

      System time for the children processes

      *)
    }

    The execution times (CPU times) of a process.

    type tm = Unix.tm = {
    1. tm_sec : int;
      (*

      Seconds 0..60

      *)
    2. tm_min : int;
      (*

      Minutes 0..59

      *)
    3. tm_hour : int;
      (*

      Hours 0..23

      *)
    4. tm_mday : int;
      (*

      Day of month 1..31

      *)
    5. tm_mon : int;
      (*

      Month of year 0..11

      *)
    6. tm_year : int;
      (*

      Year - 1900

      *)
    7. tm_wday : int;
      (*

      Day of week (Sunday is 0)

      *)
    8. tm_yday : int;
      (*

      Day of year 0..365

      *)
    9. tm_isdst : bool;
      (*

      Daylight time savings in effect

      *)
    }

    The type representing wallclock time and calendar date.

    val time : unit -> float

    Return the current time since 00:00:00 GMT, Jan. 1, 1970, in seconds.

    val gettimeofday : unit -> float

    Same as time, but with resolution better than 1 second.

    val gmtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes UTC (Coordinated Universal Time), also known as GMT. To perform the inverse conversion, set the TZ environment variable to "UTC", use mktime, and then restore the original value of TZ.

    val localtime : float -> tm

    Convert a time in seconds, as returned by time, into a date and a time. Assumes the local time zone. The function performing the inverse conversion is mktime.

    val mktime : tm -> float * tm

    Convert a date and time, specified by the tm argument, into a time in seconds, as returned by time. The tm_isdst, tm_wday and tm_yday fields of tm are ignored. Also return a normalized copy of the given tm record, with the tm_wday, tm_yday, and tm_isdst fields recomputed from the other fields, and the other fields normalized (so that, e.g., 40 October is changed into 9 November). The tm argument is interpreted in the local time zone.

    val alarm : int -> int

    Schedule a SIGALRM signal after the given number of seconds.

    • raises Invalid_argument

      on Windows

    val sleep : int -> unit

    Stop execution for the given number of seconds.

    val sleepf : float -> unit

    Stop execution for the given number of seconds. Like sleep, but fractions of seconds are supported.

    • since 4.12
    val times : unit -> process_times

    Return the execution times of the process.

    On Windows: partially implemented, will not report timings for child processes.

    val utimes : string -> access:float -> modif:float -> unit

    Set the last access time (second arg) and last modification time (third arg) for a file. Times are expressed in seconds from 00:00:00 GMT, Jan. 1, 1970. If both times are 0.0, the access and last modification times are both set to the current time.

    type interval_timer = Unix.interval_timer =
    1. | ITIMER_REAL
      (*

      decrements in real time, and sends the signal SIGALRM when expired.

      *)
    2. | ITIMER_VIRTUAL
      (*

      decrements in process virtual time, and sends SIGVTALRM when expired.

      *)
    3. | ITIMER_PROF
      (*

      (for profiling) decrements both when the process is running and when the system is running on behalf of the process; it sends SIGPROF when expired.

      *)

    The three kinds of interval timers.

    type interval_timer_status = Unix.interval_timer_status = {
    1. it_interval : float;
      (*

      Period

      *)
    2. it_value : float;
      (*

      Current value of the timer

      *)
    }

    The type describing the status of an interval timer

    Return the current status of the given interval timer.

    • raises Invalid_argument

      on Windows

    setitimer t s sets the interval timer t and returns its previous status. The s argument is interpreted as follows: s.it_value, if nonzero, is the time to the next timer expiration; s.it_interval, if nonzero, specifies a value to be used in reloading it_value when the timer expires. Setting s.it_value to zero disables the timer. Setting s.it_interval to zero causes the timer to be disabled after its next expiration.

    • raises Invalid_argument

      on Windows

    User id, group id

    val getuid : unit -> int

    Return the user id of the user executing the process.

    On Windows: always returns 1.

    val geteuid : unit -> int

    Return the effective user id under which the process runs.

    On Windows: always returns 1.

    val setuid : int -> unit

    Set the real user id and effective user id for the process.

    • raises Invalid_argument

      on Windows

    val getgid : unit -> int

    Return the group id of the user executing the process.

    On Windows: always returns 1.

    val getegid : unit -> int

    Return the effective group id under which the process runs.

    On Windows: always returns 1.

    val setgid : int -> unit

    Set the real group id and effective group id for the process.

    • raises Invalid_argument

      on Windows

    val getgroups : unit -> int array

    Return the list of groups to which the user executing the process belongs.

    On Windows: always returns [|1|].

    val setgroups : int array -> unit

    setgroups groups sets the supplementary group IDs for the calling process. Appropriate privileges are required.

    • raises Invalid_argument

      on Windows

    val initgroups : string -> int -> unit

    initgroups user group initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list.

    • raises Invalid_argument

      on Windows

    type passwd_entry = Unix.passwd_entry = {
    1. pw_name : string;
    2. pw_passwd : string;
    3. pw_uid : int;
    4. pw_gid : int;
    5. pw_gecos : string;
    6. pw_dir : string;
    7. pw_shell : string;
    }

    Structure of entries in the passwd database.

    type group_entry = Unix.group_entry = {
    1. gr_name : string;
    2. gr_passwd : string;
    3. gr_gid : int;
    4. gr_mem : string array;
    }

    Structure of entries in the groups database.

    val getlogin : unit -> string

    Return the login name of the user executing the process.

    val getpwnam : string -> passwd_entry

    Find an entry in passwd with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrnam : string -> group_entry

    Find an entry in group with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getpwuid : int -> passwd_entry

    Find an entry in passwd with the given user id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrgid : int -> group_entry

    Find an entry in group with the given group id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    Internet addresses

    type inet_addr = Unix.inet_addr

    The abstract type of Internet addresses.

    val inet_addr_of_string : string -> inet_addr

    Conversion from the printable representation of an Internet address to its internal representation. The argument string consists of 4 numbers separated by periods (XXX.YYY.ZZZ.TTT) for IPv4 addresses, and up to 8 numbers separated by colons for IPv6 addresses.

    • raises Failure

      when given a string that does not match these formats.

    val string_of_inet_addr : inet_addr -> string

    Return the printable representation of the given Internet address. See inet_addr_of_string for a description of the printable representation.

    val inet_addr_any : inet_addr

    A special IPv4 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet_addr_loopback : inet_addr

    A special IPv4 address representing the host machine (127.0.0.1).

    val inet6_addr_any : inet_addr

    A special IPv6 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet6_addr_loopback : inet_addr

    A special IPv6 address representing the host machine (::1).

    val is_inet6_addr : inet_addr -> bool

    Whether the given inet_addr is an IPv6 address.

    • since 4.12

    Sockets

    type socket_domain = Unix.socket_domain =
    1. | PF_UNIX
      (*

      Unix domain

      *)
    2. | PF_INET
      (*

      Internet domain (IPv4)

      *)
    3. | PF_INET6
      (*

      Internet domain (IPv6)

      *)

    The type of socket domains. Not all platforms support IPv6 sockets (type PF_INET6).

    On Windows: PF_UNIX supported since 4.14.0 on Windows 10 1803 and later.

    type socket_type = Unix.socket_type =
    1. | SOCK_STREAM
      (*

      Stream socket

      *)
    2. | SOCK_DGRAM
      (*

      Datagram socket

      *)
    3. | SOCK_RAW
      (*

      Raw socket

      *)
    4. | SOCK_SEQPACKET
      (*

      Sequenced packets socket

      *)

    The type of socket kinds, specifying the semantics of communications. SOCK_SEQPACKET is included for completeness, but is rarely supported by the OS, and needs system calls that are not available in this library.

    type sockaddr = Unix.sockaddr =
    1. | ADDR_UNIX of string
    2. | ADDR_INET of inet_addr * int

    The type of socket addresses. ADDR_UNIX name is a socket address in the Unix domain; name is a file name in the file system. ADDR_INET(addr,port) is a socket address in the Internet domain; addr is the Internet address of the machine, and port is the port number.

    val socket : - ?cloexec:bool -> - domain:socket_domain -> - kind:socket_type -> - protocol:int -> + interval_timer_status

    setitimer t s sets the interval timer t and returns its previous status. The s argument is interpreted as follows: s.it_value, if nonzero, is the time to the next timer expiration; s.it_interval, if nonzero, specifies a value to be used in reloading it_value when the timer expires. Setting s.it_value to zero disables the timer. Setting s.it_interval to zero causes the timer to be disabled after its next expiration.

    • raises Invalid_argument

      on Windows

    User id, group id

    val getuid : unit -> int

    Return the user id of the user executing the process.

    On Windows: always returns 1.

    val geteuid : unit -> int

    Return the effective user id under which the process runs.

    On Windows: always returns 1.

    val setuid : int -> unit

    Set the real user id and effective user id for the process.

    • raises Invalid_argument

      on Windows

    val getgid : unit -> int

    Return the group id of the user executing the process.

    On Windows: always returns 1.

    val getegid : unit -> int

    Return the effective group id under which the process runs.

    On Windows: always returns 1.

    val setgid : int -> unit

    Set the real group id and effective group id for the process.

    • raises Invalid_argument

      on Windows

    val getgroups : unit -> int array

    Return the list of groups to which the user executing the process belongs.

    On Windows: always returns [|1|].

    val setgroups : int array -> unit

    setgroups groups sets the supplementary group IDs for the calling process. Appropriate privileges are required.

    • raises Invalid_argument

      on Windows

    val initgroups : string -> int -> unit

    initgroups user group initializes the group access list by reading the group database /etc/group and using all groups of which user is a member. The additional group group is also added to the list.

    • raises Invalid_argument

      on Windows

    type passwd_entry = Unix.passwd_entry = {
    1. pw_name : string;
    2. pw_passwd : string;
    3. pw_uid : int;
    4. pw_gid : int;
    5. pw_gecos : string;
    6. pw_dir : string;
    7. pw_shell : string;
    }

    Structure of entries in the passwd database.

    type group_entry = Unix.group_entry = {
    1. gr_name : string;
    2. gr_passwd : string;
    3. gr_gid : int;
    4. gr_mem : string array;
    }

    Structure of entries in the groups database.

    val getlogin : unit -> string

    Return the login name of the user executing the process.

    val getpwnam : string -> passwd_entry

    Find an entry in passwd with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrnam : string -> group_entry

    Find an entry in group with the given name.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getpwuid : int -> passwd_entry

    Find an entry in passwd with the given user id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    val getgrgid : int -> group_entry

    Find an entry in group with the given group id.

    • raises Not_found

      if no such entry exists, or always on Windows.

    Internet addresses

    type inet_addr = Unix.inet_addr

    The abstract type of Internet addresses.

    val inet_addr_of_string : string -> inet_addr

    Conversion from the printable representation of an Internet address to its internal representation. The argument string consists of 4 numbers separated by periods (XXX.YYY.ZZZ.TTT) for IPv4 addresses, and up to 8 numbers separated by colons for IPv6 addresses.

    • raises Failure

      when given a string that does not match these formats.

    val string_of_inet_addr : inet_addr -> string

    Return the printable representation of the given Internet address. See inet_addr_of_string for a description of the printable representation.

    val inet_addr_any : inet_addr

    A special IPv4 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet_addr_loopback : inet_addr

    A special IPv4 address representing the host machine (127.0.0.1).

    val inet6_addr_any : inet_addr

    A special IPv6 address, for use only with bind, representing all the Internet addresses that the host machine possesses.

    val inet6_addr_loopback : inet_addr

    A special IPv6 address representing the host machine (::1).

    val is_inet6_addr : inet_addr -> bool

    Whether the given inet_addr is an IPv6 address.

    • since 4.12

    Sockets

    type socket_domain = Unix.socket_domain =
    1. | PF_UNIX
      (*

      Unix domain

      *)
    2. | PF_INET
      (*

      Internet domain (IPv4)

      *)
    3. | PF_INET6
      (*

      Internet domain (IPv6)

      *)

    The type of socket domains. Not all platforms support IPv6 sockets (type PF_INET6).

    On Windows: PF_UNIX supported since 4.14.0 on Windows 10 1803 and later.

    type socket_type = Unix.socket_type =
    1. | SOCK_STREAM
      (*

      Stream socket

      *)
    2. | SOCK_DGRAM
      (*

      Datagram socket

      *)
    3. | SOCK_RAW
      (*

      Raw socket

      *)
    4. | SOCK_SEQPACKET
      (*

      Sequenced packets socket

      *)

    The type of socket kinds, specifying the semantics of communications. SOCK_SEQPACKET is included for completeness, but is rarely supported by the OS, and needs system calls that are not available in this library.

    type sockaddr = Unix.sockaddr =
    1. | ADDR_UNIX of string
    2. | ADDR_INET of inet_addr * int

    The type of socket addresses. ADDR_UNIX name is a socket address in the Unix domain; name is a file name in the file system. ADDR_INET(addr,port) is a socket address in the Internet domain; addr is the Internet address of the machine, and port is the port number.

    val socket : + ?cloexec:bool -> + domain:socket_domain -> + kind:socket_type -> + protocol:int -> file_descr

    Create a new socket in the given domain, and with the given kind. The third argument is the protocol type; 0 selects the default protocol for that kind of sockets. See set_close_on_exec for documentation on the cloexec optional argument.

    val domain_of_sockaddr : sockaddr -> socket_domain

    Return the socket domain adequate for the given socket address.

    val socketpair : - ?cloexec:bool -> - domain:socket_domain -> - kind:socket_type -> - protocol:int -> - file_descr * file_descr

    Create a pair of unnamed sockets, connected together. See set_close_on_exec for documentation on the cloexec optional argument.

    val accept : ?cloexec:bool -> file_descr -> file_descr * sockaddr

    Accept connections on the given socket. The returned descriptor is a socket connected to the client; the returned address is the address of the connecting client. See set_close_on_exec for documentation on the cloexec optional argument.

    val bind : file_descr -> addr:sockaddr -> unit

    Bind a socket to an address.

    val connect : file_descr -> addr:sockaddr -> unit

    Connect a socket to an address.

    val listen : file_descr -> max:int -> unit

    Set up a socket for receiving connection requests. The integer argument is the maximal number of pending requests.

    type shutdown_command = Unix.shutdown_command =
    1. | SHUTDOWN_RECEIVE
      (*

      Close for receiving

      *)
    2. | SHUTDOWN_SEND
      (*

      Close for sending

      *)
    3. | SHUTDOWN_ALL
      (*

      Close both

      *)

    The type of commands for shutdown.

    val shutdown : file_descr -> mode:shutdown_command -> unit

    Shutdown a socket connection. SHUTDOWN_SEND as second argument causes reads on the other end of the connection to return an end-of-file condition. SHUTDOWN_RECEIVE causes writes on the other end of the connection to return a closed pipe condition (SIGPIPE signal).

    val getsockname : file_descr -> sockaddr

    Return the address of the given socket.

    val getpeername : file_descr -> sockaddr

    Return the address of the host connected to the given socket.

    type msg_flag = Unix.msg_flag =
    1. | MSG_OOB
    2. | MSG_DONTROUTE
    3. | MSG_PEEK

    The flags for recv, recvfrom, send and sendto.

    val recv : + ?cloexec:bool -> + domain:socket_domain -> + kind:socket_type -> + protocol:int -> + file_descr * file_descr

    Create a pair of unnamed sockets, connected together. See set_close_on_exec for documentation on the cloexec optional argument.

    val accept : ?cloexec:bool -> file_descr -> file_descr * sockaddr

    Accept connections on the given socket. The returned descriptor is a socket connected to the client; the returned address is the address of the connecting client. See set_close_on_exec for documentation on the cloexec optional argument.

    val bind : file_descr -> addr:sockaddr -> unit

    Bind a socket to an address.

    val connect : file_descr -> addr:sockaddr -> unit

    Connect a socket to an address.

    val listen : file_descr -> max:int -> unit

    Set up a socket for receiving connection requests. The integer argument is the maximal number of pending requests.

    type shutdown_command = Unix.shutdown_command =
    1. | SHUTDOWN_RECEIVE
      (*

      Close for receiving

      *)
    2. | SHUTDOWN_SEND
      (*

      Close for sending

      *)
    3. | SHUTDOWN_ALL
      (*

      Close both

      *)

    The type of commands for shutdown.

    val shutdown : file_descr -> mode:shutdown_command -> unit

    Shutdown a socket connection. SHUTDOWN_SEND as second argument causes reads on the other end of the connection to return an end-of-file condition. SHUTDOWN_RECEIVE causes writes on the other end of the connection to return a closed pipe condition (SIGPIPE signal).

    val getsockname : file_descr -> sockaddr

    Return the address of the given socket.

    val getpeername : file_descr -> sockaddr

    Return the address of the host connected to the given socket.

    type msg_flag = Unix.msg_flag =
    1. | MSG_OOB
    2. | MSG_DONTROUTE
    3. | MSG_PEEK

    The flags for recv, recvfrom, send and sendto.

    val recv : file_descr -> - buf:bytes -> - pos:int -> - len:int -> - mode:msg_flag list -> + buf:bytes -> + pos:int -> + len:int -> + mode:msg_flag list -> int

    Receive data from a connected socket.

    val recvfrom : file_descr -> - buf:bytes -> - pos:int -> - len:int -> - mode:msg_flag list -> + buf:bytes -> + pos:int -> + len:int -> + mode:msg_flag list -> int * sockaddr

    Receive data from an unconnected socket.

    val send : file_descr -> - buf:bytes -> - pos:int -> - len:int -> - mode:msg_flag list -> + buf:bytes -> + pos:int -> + len:int -> + mode:msg_flag list -> int

    Send data over a connected socket.

    val send_substring : file_descr -> - buf:string -> - pos:int -> - len:int -> - mode:msg_flag list -> + buf:string -> + pos:int -> + len:int -> + mode:msg_flag list -> int

    Same as send, but take the data from a string instead of a byte sequence.

    • since 4.02
    val sendto : file_descr -> - buf:bytes -> - pos:int -> - len:int -> - mode:msg_flag list -> - addr:sockaddr -> + buf:bytes -> + pos:int -> + len:int -> + mode:msg_flag list -> + addr:sockaddr -> int

    Send data over an unconnected socket.

    val sendto_substring : file_descr -> - buf:string -> - pos:int -> - len:int -> - mode:msg_flag list -> + buf:string -> + pos:int -> + len:int -> + mode:msg_flag list -> sockaddr -> int

    Same as sendto, but take the data from a string instead of a byte sequence.

    • since 4.02

    Socket options

    type socket_bool_option = Unix.socket_bool_option =
    1. | SO_DEBUG
      (*

      Record debugging information

      *)
    2. | SO_BROADCAST
      (*

      Permit sending of broadcast messages

      *)
    3. | SO_REUSEADDR
      (*

      Allow reuse of local addresses for bind

      *)
    4. | SO_KEEPALIVE
      (*

      Keep connection active

      *)
    5. | SO_DONTROUTE
      (*

      Bypass the standard routing algorithms

      *)
    6. | SO_OOBINLINE
      (*

      Leave out-of-band data in line

      *)
    7. | SO_ACCEPTCONN
      (*

      Report whether socket listening is enabled

      *)
    8. | TCP_NODELAY
      (*

      Control the Nagle algorithm for TCP sockets

      *)
    9. | IPV6_ONLY
      (*

      Forbid binding an IPv6 socket to an IPv4 address

      *)
    10. | SO_REUSEPORT
      (*

      Allow reuse of address and port bindings

      *)

    The socket options that can be consulted with getsockopt and modified with setsockopt. These options have a boolean (true/false) value.

    type socket_int_option = Unix.socket_int_option =
    1. | SO_SNDBUF
      (*

      Size of send buffer

      *)
    2. | SO_RCVBUF
      (*

      Size of received buffer

      *)
    3. | SO_ERROR
      (*

      Deprecated. Use getsockopt_error instead.

      • deprecated Use Unix.getsockopt_error instead.
      *)
    4. | SO_TYPE
      (*

      Report the socket type

      *)
    5. | SO_RCVLOWAT
      (*

      Minimum number of bytes to process for input operations

      *)
    6. | SO_SNDLOWAT
      (*

      Minimum number of bytes to process for output operations

      *)

    The socket options that can be consulted with getsockopt_int and modified with setsockopt_int. These options have an integer value.

    type socket_optint_option = Unix.socket_optint_option =
    1. | SO_LINGER
      (*

      Whether to linger on closed connections that have data present, and for how long (in seconds)

      *)

    The socket options that can be consulted with getsockopt_optint and modified with setsockopt_optint. These options have a value of type int option, with None meaning ``disabled''.

    type socket_float_option = Unix.socket_float_option =
    1. | SO_RCVTIMEO
      (*

      Timeout for input operations

      *)
    2. | SO_SNDTIMEO
      (*

      Timeout for output operations

      *)

    The socket options that can be consulted with getsockopt_float and modified with setsockopt_float. These options have a floating-point value representing a time in seconds. The value 0 means infinite timeout.

    val getsockopt : file_descr -> socket_bool_option -> bool

    Return the current status of a boolean-valued option in the given socket.

    val setsockopt : file_descr -> socket_bool_option -> bool -> unit

    Set or clear a boolean-valued option in the given socket.

    val getsockopt_int : file_descr -> socket_int_option -> int

    Same as getsockopt for an integer-valued socket option.

    val setsockopt_int : file_descr -> socket_int_option -> int -> unit

    Same as setsockopt for an integer-valued socket option.

    val getsockopt_optint : file_descr -> socket_optint_option -> int option

    Same as getsockopt for a socket option whose value is an int option.

    val setsockopt_optint : file_descr -> @@ -95,5 +95,5 @@ int option -> unit

    Same as setsockopt for a socket option whose value is an int option.

    val getsockopt_float : file_descr -> socket_float_option -> float

    Same as getsockopt for a socket option whose value is a floating-point number.

    val setsockopt_float : file_descr -> socket_float_option -> float -> unit

    Same as setsockopt for a socket option whose value is a floating-point number.

    val getsockopt_error : file_descr -> error option

    Return the error condition associated with the given socket, and clear it.

    High-level network connection functions

    val open_connection : sockaddr -> in_channel * out_channel

    Connect to a server at the given address. Return a pair of buffered channels connected to the server. Remember to call Stdlib.flush on the output channel at the right times to ensure correct synchronization.

    The two channels returned by open_connection share a descriptor to a socket. Therefore, when the connection is over, you should call Stdlib.close_out on the output channel, which will also close the underlying socket. Do not call Stdlib.close_in on the input channel; it will be collected by the GC eventually.

    val shutdown_connection : in_channel -> unit

    ``Shut down'' a connection established with open_connection; that is, transmit an end-of-file condition to the server reading on the other side of the connection. This does not close the socket and the channels used by the connection. See Unix.open_connection for how to close them once the connection is over.

    val establish_server : (in_channel -> out_channel -> unit) -> - addr:sockaddr -> - unit

    Establish a server on the given address. The function given as first argument is called for each connection with two buffered channels connected to the client. A new process is created for each connection. The function establish_server never returns normally.

    The two channels given to the function share a descriptor to a socket. The function does not need to close the channels, since this occurs automatically when the function returns. If the function prefers explicit closing, it should close the output channel using Stdlib.close_out and leave the input channel unclosed, for reasons explained in Unix.in_channel_of_descr.

    • raises Invalid_argument

      on Windows. Use threads instead.

    Host and protocol databases

    type host_entry = Unix.host_entry = {
    1. h_name : string;
    2. h_aliases : string array;
    3. h_addrtype : socket_domain;
    4. h_addr_list : inet_addr array;
    }

    Structure of entries in the hosts database.

    type protocol_entry = Unix.protocol_entry = {
    1. p_name : string;
    2. p_aliases : string array;
    3. p_proto : int;
    }

    Structure of entries in the protocols database.

    type service_entry = Unix.service_entry = {
    1. s_name : string;
    2. s_aliases : string array;
    3. s_port : int;
    4. s_proto : string;
    }

    Structure of entries in the services database.

    val gethostname : unit -> string

    Return the name of the local host.

    val gethostbyname : string -> host_entry

    Find an entry in hosts with the given name.

    • raises Not_found

      if no such entry exists.

    val gethostbyaddr : inet_addr -> host_entry

    Find an entry in hosts with the given address.

    • raises Not_found

      if no such entry exists.

    val getprotobyname : string -> protocol_entry

    Find an entry in protocols with the given name.

    • raises Not_found

      if no such entry exists.

    val getprotobynumber : int -> protocol_entry

    Find an entry in protocols with the given protocol number.

    • raises Not_found

      if no such entry exists.

    val getservbyname : string -> protocol:string -> service_entry

    Find an entry in services with the given name.

    • raises Not_found

      if no such entry exists.

    val getservbyport : int -> protocol:string -> service_entry

    Find an entry in services with the given service number.

    • raises Not_found

      if no such entry exists.

    type addr_info = Unix.addr_info = {
    1. ai_family : socket_domain;
      (*

      Socket domain

      *)
    2. ai_socktype : socket_type;
      (*

      Socket type

      *)
    3. ai_protocol : int;
      (*

      Socket protocol number

      *)
    4. ai_addr : sockaddr;
      (*

      Address

      *)
    5. ai_canonname : string;
      (*

      Canonical host name

      *)
    }

    Address information returned by getaddrinfo.

    type getaddrinfo_option = Unix.getaddrinfo_option =
    1. | AI_FAMILY of socket_domain
      (*

      Impose the given socket domain

      *)
    2. | AI_SOCKTYPE of socket_type
      (*

      Impose the given socket type

      *)
    3. | AI_PROTOCOL of int
      (*

      Impose the given protocol

      *)
    4. | AI_NUMERICHOST
      (*

      Do not call name resolver, expect numeric IP address

      *)
    5. | AI_CANONNAME
      (*

      Fill the ai_canonname field of the result

      *)
    6. | AI_PASSIVE
      (*

      Set address to ``any'' address for use with bind

      *)

    Options to getaddrinfo.

    val getaddrinfo : string -> string -> getaddrinfo_option list -> addr_info list

    getaddrinfo host service opts returns a list of addr_info records describing socket parameters and addresses suitable for communicating with the given host and service. The empty list is returned if the host or service names are unknown, or the constraints expressed in opts cannot be satisfied.

    host is either a host name or the string representation of an IP address. host can be given as the empty string; in this case, the ``any'' address or the ``loopback'' address are used, depending whether opts contains AI_PASSIVE. service is either a service name or the string representation of a port number. service can be given as the empty string; in this case, the port field of the returned addresses is set to 0. opts is a possibly empty list of options that allows the caller to force a particular socket domain (e.g. IPv6 only or IPv4 only) or a particular socket type (e.g. TCP only or UDP only).

    type name_info = Unix.name_info = {
    1. ni_hostname : string;
      (*

      Name or IP address of host

      *)
    2. ni_service : string;
      (*

      Name of service or port number

      *)
    }

    Host and service information returned by getnameinfo.

    type getnameinfo_option = Unix.getnameinfo_option =
    1. | NI_NOFQDN
      (*

      Do not qualify local host names

      *)
    2. | NI_NUMERICHOST
      (*

      Always return host as IP address

      *)
    3. | NI_NAMEREQD
      (*

      Fail if host name cannot be determined

      *)
    4. | NI_NUMERICSERV
      (*

      Always return service as port number

      *)
    5. | NI_DGRAM
      (*

      Consider the service as UDP-based instead of the default TCP

      *)

    Options to getnameinfo.

    val getnameinfo : sockaddr -> getnameinfo_option list -> name_info

    getnameinfo addr opts returns the host name and service name corresponding to the socket address addr. opts is a possibly empty list of options that governs how these names are obtained.

    • raises Not_found

      if an error occurs.

    Terminal interface

    The following functions implement the POSIX standard terminal interface. They provide control over asynchronous communication ports and pseudo-terminals. Refer to the termios man page for a complete description.

    type terminal_io = Unix.terminal_io = {
    1. mutable c_ignbrk : bool;
      (*

      Ignore the break condition.

      *)
    2. mutable c_brkint : bool;
      (*

      Signal interrupt on break condition.

      *)
    3. mutable c_ignpar : bool;
      (*

      Ignore characters with parity errors.

      *)
    4. mutable c_parmrk : bool;
      (*

      Mark parity errors.

      *)
    5. mutable c_inpck : bool;
      (*

      Enable parity check on input.

      *)
    6. mutable c_istrip : bool;
      (*

      Strip 8th bit on input characters.

      *)
    7. mutable c_inlcr : bool;
      (*

      Map NL to CR on input.

      *)
    8. mutable c_igncr : bool;
      (*

      Ignore CR on input.

      *)
    9. mutable c_icrnl : bool;
      (*

      Map CR to NL on input.

      *)
    10. mutable c_ixon : bool;
      (*

      Recognize XON/XOFF characters on input.

      *)
    11. mutable c_ixoff : bool;
      (*

      Emit XON/XOFF chars to control input flow.

      *)
    12. mutable c_opost : bool;
      (*

      Enable output processing.

      *)
    13. mutable c_obaud : int;
      (*

      Output baud rate (0 means close connection).

      *)
    14. mutable c_ibaud : int;
      (*

      Input baud rate.

      *)
    15. mutable c_csize : int;
      (*

      Number of bits per character (5-8).

      *)
    16. mutable c_cstopb : int;
      (*

      Number of stop bits (1-2).

      *)
    17. mutable c_cread : bool;
      (*

      Reception is enabled.

      *)
    18. mutable c_parenb : bool;
      (*

      Enable parity generation and detection.

      *)
    19. mutable c_parodd : bool;
      (*

      Specify odd parity instead of even.

      *)
    20. mutable c_hupcl : bool;
      (*

      Hang up on last close.

      *)
    21. mutable c_clocal : bool;
      (*

      Ignore modem status lines.

      *)
    22. mutable c_isig : bool;
      (*

      Generate signal on INTR, QUIT, SUSP.

      *)
    23. mutable c_icanon : bool;
      (*

      Enable canonical processing (line buffering and editing)

      *)
    24. mutable c_noflsh : bool;
      (*

      Disable flush after INTR, QUIT, SUSP.

      *)
    25. mutable c_echo : bool;
      (*

      Echo input characters.

      *)
    26. mutable c_echoe : bool;
      (*

      Echo ERASE (to erase previous character).

      *)
    27. mutable c_echok : bool;
      (*

      Echo KILL (to erase the current line).

      *)
    28. mutable c_echonl : bool;
      (*

      Echo NL even if c_echo is not set.

      *)
    29. mutable c_vintr : char;
      (*

      Interrupt character (usually ctrl-C).

      *)
    30. mutable c_vquit : char;
      (*

      Quit character (usually ctrl-\).

      *)
    31. mutable c_verase : char;
      (*

      Erase character (usually DEL or ctrl-H).

      *)
    32. mutable c_vkill : char;
      (*

      Kill line character (usually ctrl-U).

      *)
    33. mutable c_veof : char;
      (*

      End-of-file character (usually ctrl-D).

      *)
    34. mutable c_veol : char;
      (*

      Alternate end-of-line char. (usually none).

      *)
    35. mutable c_vmin : int;
      (*

      Minimum number of characters to read before the read request is satisfied.

      *)
    36. mutable c_vtime : int;
      (*

      Maximum read wait (in 0.1s units).

      *)
    37. mutable c_vstart : char;
      (*

      Start character (usually ctrl-Q).

      *)
    38. mutable c_vstop : char;
      (*

      Stop character (usually ctrl-S).

      *)
    }
    val tcgetattr : file_descr -> terminal_io

    Return the status of the terminal referred to by the given file descriptor.

    • raises Invalid_argument

      on Windows

    type setattr_when = Unix.setattr_when =
    1. | TCSANOW
    2. | TCSADRAIN
    3. | TCSAFLUSH
    val tcsetattr : file_descr -> mode:setattr_when -> terminal_io -> unit

    Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.

    • raises Invalid_argument

      on Windows

    val tcsendbreak : file_descr -> duration:int -> unit

    Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).

    • raises Invalid_argument

      on Windows

    val tcdrain : file_descr -> unit

    Waits until all output written on the given file descriptor has been transmitted.

    • raises Invalid_argument

      on Windows

    type flush_queue = Unix.flush_queue =
    1. | TCIFLUSH
    2. | TCOFLUSH
    3. | TCIOFLUSH
    val tcflush : file_descr -> mode:flush_queue -> unit

    Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.

    • raises Invalid_argument

      on Windows

    type flow_action = Unix.flow_action =
    1. | TCOOFF
    2. | TCOON
    3. | TCIOFF
    4. | TCION
    val tcflow : file_descr -> mode:flow_action -> unit

    Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.

    • raises Invalid_argument

      on Windows

    val setsid : unit -> int

    Put the calling process in a new session and detach it from its controlling terminal.

    • raises Invalid_argument

      on Windows

    \ No newline at end of file + addr:sockaddr -> + unit

    Establish a server on the given address. The function given as first argument is called for each connection with two buffered channels connected to the client. A new process is created for each connection. The function establish_server never returns normally.

    The two channels given to the function share a descriptor to a socket. The function does not need to close the channels, since this occurs automatically when the function returns. If the function prefers explicit closing, it should close the output channel using Stdlib.close_out and leave the input channel unclosed, for reasons explained in Unix.in_channel_of_descr.

    • raises Invalid_argument

      on Windows. Use threads instead.

    Host and protocol databases

    type host_entry = Unix.host_entry = {
    1. h_name : string;
    2. h_aliases : string array;
    3. h_addrtype : socket_domain;
    4. h_addr_list : inet_addr array;
    }

    Structure of entries in the hosts database.

    type protocol_entry = Unix.protocol_entry = {
    1. p_name : string;
    2. p_aliases : string array;
    3. p_proto : int;
    }

    Structure of entries in the protocols database.

    type service_entry = Unix.service_entry = {
    1. s_name : string;
    2. s_aliases : string array;
    3. s_port : int;
    4. s_proto : string;
    }

    Structure of entries in the services database.

    val gethostname : unit -> string

    Return the name of the local host.

    val gethostbyname : string -> host_entry

    Find an entry in hosts with the given name.

    • raises Not_found

      if no such entry exists.

    val gethostbyaddr : inet_addr -> host_entry

    Find an entry in hosts with the given address.

    • raises Not_found

      if no such entry exists.

    val getprotobyname : string -> protocol_entry

    Find an entry in protocols with the given name.

    • raises Not_found

      if no such entry exists.

    val getprotobynumber : int -> protocol_entry

    Find an entry in protocols with the given protocol number.

    • raises Not_found

      if no such entry exists.

    val getservbyname : string -> protocol:string -> service_entry

    Find an entry in services with the given name.

    • raises Not_found

      if no such entry exists.

    val getservbyport : int -> protocol:string -> service_entry

    Find an entry in services with the given service number.

    • raises Not_found

      if no such entry exists.

    type addr_info = Unix.addr_info = {
    1. ai_family : socket_domain;
      (*

      Socket domain

      *)
    2. ai_socktype : socket_type;
      (*

      Socket type

      *)
    3. ai_protocol : int;
      (*

      Socket protocol number

      *)
    4. ai_addr : sockaddr;
      (*

      Address

      *)
    5. ai_canonname : string;
      (*

      Canonical host name

      *)
    }

    Address information returned by getaddrinfo.

    type getaddrinfo_option = Unix.getaddrinfo_option =
    1. | AI_FAMILY of socket_domain
      (*

      Impose the given socket domain

      *)
    2. | AI_SOCKTYPE of socket_type
      (*

      Impose the given socket type

      *)
    3. | AI_PROTOCOL of int
      (*

      Impose the given protocol

      *)
    4. | AI_NUMERICHOST
      (*

      Do not call name resolver, expect numeric IP address

      *)
    5. | AI_CANONNAME
      (*

      Fill the ai_canonname field of the result

      *)
    6. | AI_PASSIVE
      (*

      Set address to ``any'' address for use with bind

      *)

    Options to getaddrinfo.

    val getaddrinfo : string -> string -> getaddrinfo_option list -> addr_info list

    getaddrinfo host service opts returns a list of addr_info records describing socket parameters and addresses suitable for communicating with the given host and service. The empty list is returned if the host or service names are unknown, or the constraints expressed in opts cannot be satisfied.

    host is either a host name or the string representation of an IP address. host can be given as the empty string; in this case, the ``any'' address or the ``loopback'' address are used, depending whether opts contains AI_PASSIVE. service is either a service name or the string representation of a port number. service can be given as the empty string; in this case, the port field of the returned addresses is set to 0. opts is a possibly empty list of options that allows the caller to force a particular socket domain (e.g. IPv6 only or IPv4 only) or a particular socket type (e.g. TCP only or UDP only).

    type name_info = Unix.name_info = {
    1. ni_hostname : string;
      (*

      Name or IP address of host

      *)
    2. ni_service : string;
      (*

      Name of service or port number

      *)
    }

    Host and service information returned by getnameinfo.

    type getnameinfo_option = Unix.getnameinfo_option =
    1. | NI_NOFQDN
      (*

      Do not qualify local host names

      *)
    2. | NI_NUMERICHOST
      (*

      Always return host as IP address

      *)
    3. | NI_NAMEREQD
      (*

      Fail if host name cannot be determined

      *)
    4. | NI_NUMERICSERV
      (*

      Always return service as port number

      *)
    5. | NI_DGRAM
      (*

      Consider the service as UDP-based instead of the default TCP

      *)

    Options to getnameinfo.

    val getnameinfo : sockaddr -> getnameinfo_option list -> name_info

    getnameinfo addr opts returns the host name and service name corresponding to the socket address addr. opts is a possibly empty list of options that governs how these names are obtained.

    • raises Not_found

      if an error occurs.

    Terminal interface

    The following functions implement the POSIX standard terminal interface. They provide control over asynchronous communication ports and pseudo-terminals. Refer to the termios man page for a complete description.

    type terminal_io = Unix.terminal_io = {
    1. mutable c_ignbrk : bool;
      (*

      Ignore the break condition.

      *)
    2. mutable c_brkint : bool;
      (*

      Signal interrupt on break condition.

      *)
    3. mutable c_ignpar : bool;
      (*

      Ignore characters with parity errors.

      *)
    4. mutable c_parmrk : bool;
      (*

      Mark parity errors.

      *)
    5. mutable c_inpck : bool;
      (*

      Enable parity check on input.

      *)
    6. mutable c_istrip : bool;
      (*

      Strip 8th bit on input characters.

      *)
    7. mutable c_inlcr : bool;
      (*

      Map NL to CR on input.

      *)
    8. mutable c_igncr : bool;
      (*

      Ignore CR on input.

      *)
    9. mutable c_icrnl : bool;
      (*

      Map CR to NL on input.

      *)
    10. mutable c_ixon : bool;
      (*

      Recognize XON/XOFF characters on input.

      *)
    11. mutable c_ixoff : bool;
      (*

      Emit XON/XOFF chars to control input flow.

      *)
    12. mutable c_opost : bool;
      (*

      Enable output processing.

      *)
    13. mutable c_obaud : int;
      (*

      Output baud rate (0 means close connection).

      *)
    14. mutable c_ibaud : int;
      (*

      Input baud rate.

      *)
    15. mutable c_csize : int;
      (*

      Number of bits per character (5-8).

      *)
    16. mutable c_cstopb : int;
      (*

      Number of stop bits (1-2).

      *)
    17. mutable c_cread : bool;
      (*

      Reception is enabled.

      *)
    18. mutable c_parenb : bool;
      (*

      Enable parity generation and detection.

      *)
    19. mutable c_parodd : bool;
      (*

      Specify odd parity instead of even.

      *)
    20. mutable c_hupcl : bool;
      (*

      Hang up on last close.

      *)
    21. mutable c_clocal : bool;
      (*

      Ignore modem status lines.

      *)
    22. mutable c_isig : bool;
      (*

      Generate signal on INTR, QUIT, SUSP.

      *)
    23. mutable c_icanon : bool;
      (*

      Enable canonical processing (line buffering and editing)

      *)
    24. mutable c_noflsh : bool;
      (*

      Disable flush after INTR, QUIT, SUSP.

      *)
    25. mutable c_echo : bool;
      (*

      Echo input characters.

      *)
    26. mutable c_echoe : bool;
      (*

      Echo ERASE (to erase previous character).

      *)
    27. mutable c_echok : bool;
      (*

      Echo KILL (to erase the current line).

      *)
    28. mutable c_echonl : bool;
      (*

      Echo NL even if c_echo is not set.

      *)
    29. mutable c_vintr : char;
      (*

      Interrupt character (usually ctrl-C).

      *)
    30. mutable c_vquit : char;
      (*

      Quit character (usually ctrl-\).

      *)
    31. mutable c_verase : char;
      (*

      Erase character (usually DEL or ctrl-H).

      *)
    32. mutable c_vkill : char;
      (*

      Kill line character (usually ctrl-U).

      *)
    33. mutable c_veof : char;
      (*

      End-of-file character (usually ctrl-D).

      *)
    34. mutable c_veol : char;
      (*

      Alternate end-of-line char. (usually none).

      *)
    35. mutable c_vmin : int;
      (*

      Minimum number of characters to read before the read request is satisfied.

      *)
    36. mutable c_vtime : int;
      (*

      Maximum read wait (in 0.1s units).

      *)
    37. mutable c_vstart : char;
      (*

      Start character (usually ctrl-Q).

      *)
    38. mutable c_vstop : char;
      (*

      Stop character (usually ctrl-S).

      *)
    }
    val tcgetattr : file_descr -> terminal_io

    Return the status of the terminal referred to by the given file descriptor.

    • raises Invalid_argument

      on Windows

    type setattr_when = Unix.setattr_when =
    1. | TCSANOW
    2. | TCSADRAIN
    3. | TCSAFLUSH
    val tcsetattr : file_descr -> mode:setattr_when -> terminal_io -> unit

    Set the status of the terminal referred to by the given file descriptor. The second argument indicates when the status change takes place: immediately (TCSANOW), when all pending output has been transmitted (TCSADRAIN), or after flushing all input that has been received but not read (TCSAFLUSH). TCSADRAIN is recommended when changing the output parameters; TCSAFLUSH, when changing the input parameters.

    • raises Invalid_argument

      on Windows

    val tcsendbreak : file_descr -> duration:int -> unit

    Send a break condition on the given file descriptor. The second argument is the duration of the break, in 0.1s units; 0 means standard duration (0.25s).

    • raises Invalid_argument

      on Windows

    val tcdrain : file_descr -> unit

    Waits until all output written on the given file descriptor has been transmitted.

    • raises Invalid_argument

      on Windows

    type flush_queue = Unix.flush_queue =
    1. | TCIFLUSH
    2. | TCOFLUSH
    3. | TCIOFLUSH
    val tcflush : file_descr -> mode:flush_queue -> unit

    Discard data written on the given file descriptor but not yet transmitted, or data received but not yet read, depending on the second argument: TCIFLUSH flushes data received but not read, TCOFLUSH flushes data written but not transmitted, and TCIOFLUSH flushes both.

    • raises Invalid_argument

      on Windows

    type flow_action = Unix.flow_action =
    1. | TCOOFF
    2. | TCOON
    3. | TCIOFF
    4. | TCION
    val tcflow : file_descr -> mode:flow_action -> unit

    Suspend or restart reception or transmission of data on the given file descriptor, depending on the second argument: TCOOFF suspends output, TCOON restarts output, TCIOFF transmits a STOP character to suspend input, and TCION transmits a START character to restart input.

    • raises Invalid_argument

      on Windows

    val setsid : unit -> int

    Put the calling process in a new session and detach it from its controlling terminal.

    • raises Invalid_argument

      on Windows

    diff --git a/ocaml/Untypeast/index.html b/ocaml/Untypeast/index.html index e94db27..eacb03a 100644 --- a/ocaml/Untypeast/index.html +++ b/ocaml/Untypeast/index.html @@ -1,5 +1,5 @@ -Untypeast (ocaml.Untypeast)

    Module Untypeast

    val lident_of_path : Path.t -> Longident.t
    type mapper = {
    1. attribute : mapper -> Typedtree.attribute -> Parsetree.attribute;
    2. attributes : mapper -> Typedtree.attribute list -> Parsetree.attribute list;
    3. binding_op : mapper -> +Untypeast (ocaml.Untypeast)

      Module Untypeast

      val lident_of_path : Path.t -> Longident.t
      val default_mapper : mapper
      val untype_structure : - ?mapper:mapper -> + ?mapper:mapper -> Typedtree.structure -> Parsetree.structure
      val untype_signature : - ?mapper:mapper -> + ?mapper:mapper -> Typedtree.signature -> Parsetree.signature
      val untype_expression : - ?mapper:mapper -> + ?mapper:mapper -> Typedtree.expression -> Parsetree.expression
      val untype_pattern : - ?mapper:mapper -> + ?mapper:mapper -> _ Typedtree.general_pattern -> - Parsetree.pattern
      \ No newline at end of file + Parsetree.pattern
    diff --git a/ocaml/Var_within_closure/Map/index.html b/ocaml/Var_within_closure/Map/index.html index fd74680..e37e52c 100644 --- a/ocaml/Var_within_closure/Map/index.html +++ b/ocaml/Var_within_closure/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Var_within_closure.Map)

    Module Var_within_closure.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Var_within_closure.Map)

    Module Var_within_closure.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Var_within_closure/Set/index.html b/ocaml/Var_within_closure/Set/index.html index e68df1d..8f22ef3 100644 --- a/ocaml/Var_within_closure/Set/index.html +++ b/ocaml/Var_within_closure/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Var_within_closure.Set)

    Module Var_within_closure.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Var_within_closure.Set)

    Module Var_within_closure.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Var_within_closure/T/index.html b/ocaml/Var_within_closure/T/index.html index 7e47450..4e37ab9 100644 --- a/ocaml/Var_within_closure/T/index.html +++ b/ocaml/Var_within_closure/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Var_within_closure.T)

    Module Var_within_closure.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Var_within_closure.T)

    Module Var_within_closure.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Var_within_closure/Tbl/index.html b/ocaml/Var_within_closure/Tbl/index.html index 8bb25b7..b4bd0e4 100644 --- a/ocaml/Var_within_closure/Tbl/index.html +++ b/ocaml/Var_within_closure/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Var_within_closure.Tbl)

    Module Var_within_closure.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Var_within_closure.Tbl)

    Module Var_within_closure.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Var_within_closure/index.html b/ocaml/Var_within_closure/index.html index 3e61282..1ca4717 100644 --- a/ocaml/Var_within_closure/index.html +++ b/ocaml/Var_within_closure/index.html @@ -1,2 +1,2 @@ -Var_within_closure (ocaml.Var_within_closure)

    Module Var_within_closure

    An identifier, unique across the whole program, that identifies a particular variable within a particular closure. Only Project_var, and not Var, nodes are tagged with these identifiers.

    include module type of Closure_element
    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    \ No newline at end of file +Var_within_closure (ocaml.Var_within_closure)

    Module Var_within_closure

    An identifier, unique across the whole program, that identifies a particular variable within a particular closure. Only Project_var, and not Var, nodes are tagged with these identifiers.

    include module type of Closure_element
    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val wrap : Variable.t -> t
    val unwrap : t -> Variable.t
    val wrap_map : 'a Variable.Map.t -> 'a Map.t
    val unwrap_set : Set.t -> Variable.Set.t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val get_compilation_unit : t -> Compilation_unit.t
    val unique_name : t -> string
    val output_full : out_channel -> t -> unit
    diff --git a/ocaml/Variable/Map/index.html b/ocaml/Variable/Map/index.html index f906cbf..7da8f5a 100644 --- a/ocaml/Variable/Map/index.html +++ b/ocaml/Variable/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Variable.Map)

    Module Variable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Variable.Map)

    Module Variable.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Variable/Pair/Map/index.html b/ocaml/Variable/Pair/Map/index.html index 58cb96a..289a695 100644 --- a/ocaml/Variable/Pair/Map/index.html +++ b/ocaml/Variable/Pair/Map/index.html @@ -1,17 +1,17 @@ -Map (ocaml.Variable.Pair.Map)

    Module Pair.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ocaml.Variable.Pair.Map)

    Module Pair.Map

    include Map.S with type key = T.t and type 'a t = 'a Map.Make(T).t

    Maps

    type key = T.t

    The type of the map keys.

    type 'a t = 'a Stdlib.Map.Make(T).t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
       m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    val of_list : (key * 'a) list -> 'a t
    val disjoint_union : - ?eq:('a -> 'a -> bool) -> - ?print:(Stdlib.Format.formatter -> 'a -> unit) -> + ?eq:('a -> 'a -> bool) -> + ?print:(Stdlib.Format.formatter -> 'a -> unit) -> 'a t -> 'a t -> 'a t

    disjoint_union m1 m2 contains all bindings from m1 and m2. If some binding is present in both and the associated value is not equal, a Fatal_error is raised

    val union_right : 'a t -> 'a t -> 'a t

    union_right m1 m2 contains all bindings from m1 and m2. If some binding is present in both, the one from m2 is taken

    val union_left : 'a t -> 'a t -> 'a t

    union_left m1 m2 = union_right m2 m1

    val union_merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
    val rename : key t -> key -> key
    val map_keys : (key -> key) -> 'a t -> 'a t
    val keys : 'a t -> Stdlib.Set.Make(T).t
    val data : 'a t -> 'a list
    val of_set : (key -> 'a) -> Stdlib.Set.Make(T).t -> 'a t
    val transpose_keys_and_data : key t -> key t
    val transpose_keys_and_data_set : key t -> Stdlib.Set.Make(T).t t
    val print : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a t -> - unit
    \ No newline at end of file + unit
    diff --git a/ocaml/Variable/Pair/Set/index.html b/ocaml/Variable/Pair/Set/index.html index 0b3fa85..4360a5d 100644 --- a/ocaml/Variable/Pair/Set/index.html +++ b/ocaml/Variable/Pair/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Variable.Pair.Set)

    Module Pair.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Variable.Pair.Set)

    Module Pair.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Variable/Pair/T/index.html b/ocaml/Variable/Pair/T/index.html index c6886b9..866cdb8 100644 --- a/ocaml/Variable/Pair/T/index.html +++ b/ocaml/Variable/Pair/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Variable.Pair.T)

    Module Pair.T

    type t = pair
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Variable.Pair.T)

    Module Pair.T

    type t = pair
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Variable/Pair/Tbl/index.html b/ocaml/Variable/Pair/Tbl/index.html index 1ea42c4..8d9af1f 100644 --- a/ocaml/Variable/Pair/Tbl/index.html +++ b/ocaml/Variable/Pair/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Variable.Pair.Tbl)

    Module Pair.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Variable.Pair.Tbl)

    Module Pair.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Variable/Pair/index.html b/ocaml/Variable/Pair/index.html index 49b9c22..9c73d43 100644 --- a/ocaml/Variable/Pair/index.html +++ b/ocaml/Variable/Pair/index.html @@ -1,2 +1,2 @@ -Pair (ocaml.Variable.Pair)

    Module Variable.Pair

    module T : Identifiable.Thing with type t = pair
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    \ No newline at end of file +Pair (ocaml.Variable.Pair)

    Module Variable.Pair

    module T : Identifiable.Thing with type t = pair
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    diff --git a/ocaml/Variable/Set/index.html b/ocaml/Variable/Set/index.html index bea9b81..28538dd 100644 --- a/ocaml/Variable/Set/index.html +++ b/ocaml/Variable/Set/index.html @@ -1,2 +1,2 @@ -Set (ocaml.Variable.Set)

    Module Variable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    \ No newline at end of file +Set (ocaml.Variable.Set)

    Module Variable.Set

    include Set.S with type elt = T.t and type t = Set.Make(T).t

    Sets

    type elt = T.t

    The type of the set elements.

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Stdlib.Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Stdlib.Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Stdlib.Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    val to_string : t -> string
    val of_list : elt list -> t
    val map : (elt -> elt) -> t -> t
    diff --git a/ocaml/Variable/T/index.html b/ocaml/Variable/T/index.html index f7ebd4b..41f4b7a 100644 --- a/ocaml/Variable/T/index.html +++ b/ocaml/Variable/T/index.html @@ -1,2 +1,2 @@ -T (ocaml.Variable.T)

    Module Variable.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    \ No newline at end of file +T (ocaml.Variable.T)

    Module Variable.T

    type t = t
    include Hashtbl.HashedType with type t := t
    val equal : t -> t -> bool

    The equality predicate used to compare keys.

    val hash : t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := t
    val compare : t -> t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> t -> unit
    val print : Stdlib.Format.formatter -> t -> unit
    diff --git a/ocaml/Variable/Tbl/index.html b/ocaml/Variable/Tbl/index.html index e3f764d..51730f9 100644 --- a/ocaml/Variable/Tbl/index.html +++ b/ocaml/Variable/Tbl/index.html @@ -1,2 +1,2 @@ -Tbl (ocaml.Variable.Tbl)

    Module Variable.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    \ No newline at end of file +Tbl (ocaml.Variable.Tbl)

    Module Variable.Tbl

    include Hashtbl.S with type key = T.t and type 'a t = 'a Hashtbl.Make(T).t
    type key = T.t
    val create : int -> 'a t
    val clear : 'a t -> unit
    val reset : 'a t -> unit
    • since 4.00
    val copy : 'a t -> 'a t
    val add : 'a t -> key -> 'a -> unit
    val remove : 'a t -> key -> unit
    val find : 'a t -> key -> 'a
    val find_opt : 'a t -> key -> 'a option
    • since 4.05
    val find_all : 'a t -> key -> 'a list
    val replace : 'a t -> key -> 'a -> unit
    val mem : 'a t -> key -> bool
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit
    • since 4.03
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val length : 'a t -> int
    val stats : 'a t -> Stdlib.Hashtbl.statistics
    • since 4.00
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    • since 4.07
    val to_seq_keys : _ t -> key Stdlib.Seq.t
    • since 4.07
    val to_seq_values : 'a t -> 'a Stdlib.Seq.t
    • since 4.07
    val add_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val replace_seq : 'a t -> (key * 'a) Stdlib.Seq.t -> unit
    • since 4.07
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    • since 4.07
    val to_list : 'a t -> (T.t * 'a) list
    val of_list : (T.t * 'a) list -> 'a t
    val to_map : 'a t -> 'a Stdlib.Map.Make(T).t
    val of_map : 'a Stdlib.Map.Make(T).t -> 'a t
    val memoize : 'a t -> (key -> 'a) -> key -> 'a
    val map : 'a t -> ('a -> 'b) -> 'b t
    diff --git a/ocaml/Variable/index.html b/ocaml/Variable/index.html index d3f99d2..9ebe57d 100644 --- a/ocaml/Variable/index.html +++ b/ocaml/Variable/index.html @@ -1,5 +1,5 @@ -Variable (ocaml.Variable)

    Module Variable

    Variable.t is the equivalent of a non-persistent Ident.t in the Flambda tree. It wraps an Ident.t together with its source compilation_unit. As such, it is unique within a whole program, not just one compilation unit.

    Introducing a new type helps in tracing the source of identifiers when debugging the inliner. It also avoids Ident renaming when importing cmx files.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : - ?current_compilation_unit:Compilation_unit.t -> +Variable (ocaml.Variable)

    Module Variable

    Variable.t is the equivalent of a non-persistent Ident.t in the Flambda tree. It wraps an Ident.t together with its source compilation_unit. As such, it is unique within a whole program, not just one compilation unit.

    Introducing a new type helps in tracing the source of identifiers when debugging the inliner. It also avoids Ident renaming when importing cmx files.

    include Identifiable.S
    type t
    module T : Identifiable.Thing with type t = t
    include Identifiable.Thing with type t := T.t
    include Hashtbl.HashedType with type t := T.t
    val equal : T.t -> T.t -> bool

    The equality predicate used to compare keys.

    val hash : T.t -> int

    A hashing function on keys. It must be such that if two keys are equal according to equal, then they have identical hash values as computed by hash. Examples: suitable (equal, hash) pairs for arbitrary key types include

    • ((=), hash) for comparing objects by structure (provided objects do not contain floats)
    • ((fun x y -> compare x y = 0), hash) for comparing objects by structure and handling Stdlib.nan correctly
    • ((==), hash) for comparing objects by physical equality (e.g. for mutable or cyclic objects).
    include Map.OrderedType with type t := T.t
    val compare : T.t -> T.t -> int

    A total ordering function over the keys. This is a two-argument function f such that f e1 e2 is zero if the keys e1 and e2 are equal, f e1 e2 is strictly negative if e1 is smaller than e2, and f e1 e2 is strictly positive if e1 is greater than e2. Example: a suitable ordering function is the generic structural comparison function Stdlib.compare.

    val output : out_channel -> T.t -> unit
    val print : Stdlib.Format.formatter -> T.t -> unit
    module Set : Identifiable.Set with module T := T
    module Map : Identifiable.Map with module T := T
    module Tbl : Identifiable.Tbl with module T := T
    val create : + ?current_compilation_unit:Compilation_unit.t -> Internal_variable_names.t -> - t
    val create_with_same_name_as_ident : Ident.t -> t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val name : t -> string
    val unique_name : t -> string
    val get_compilation_unit : t -> Compilation_unit.t
    val print_list : Stdlib.Format.formatter -> t list -> unit
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val debug_when_stamp_matches : t -> stamp:int -> f:(unit -> unit) -> unit

    If the given variable has the given stamp, call the user-supplied function. For debugging purposes only.

    type pair = t * t
    module Pair : Identifiable.S with type t := pair
    val compare_lists : t list -> t list -> int
    val output_full : out_channel -> t -> unit

    Unlike output, output_full includes the compilation unit.

    \ No newline at end of file + t
    val create_with_same_name_as_ident : Ident.t -> t
    val rename : ?current_compilation_unit:Compilation_unit.t -> t -> t
    val in_compilation_unit : t -> Compilation_unit.t -> bool
    val name : t -> string
    val unique_name : t -> string
    val get_compilation_unit : t -> Compilation_unit.t
    val print_list : Stdlib.Format.formatter -> t list -> unit
    val print_opt : Stdlib.Format.formatter -> t option -> unit
    val debug_when_stamp_matches : t -> stamp:int -> f:(unit -> unit) -> unit

    If the given variable has the given stamp, call the user-supplied function. For debugging purposes only.

    type pair = t * t
    module Pair : Identifiable.S with type t := pair
    val compare_lists : t list -> t list -> int
    val output_full : out_channel -> t -> unit

    Unlike output, output_full includes the compilation unit.

    diff --git a/ocaml/Warnings/index.html b/ocaml/Warnings/index.html index e0d92f5..38a4c3c 100644 --- a/ocaml/Warnings/index.html +++ b/ocaml/Warnings/index.html @@ -1,2 +1,2 @@ -Warnings (ocaml.Warnings)

    Module Warnings

    Warning definitions

    Warning: this module is unstable and part of compiler-libs.

    type loc = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }
    val ghost_loc_in_file : string -> loc

    Return an empty ghost range located in a given file

    type field_usage_warning =
    1. | Unused
    2. | Not_read
    3. | Not_mutated
    type constructor_usage_warning =
    1. | Unused
    2. | Not_constructed
    3. | Only_exported_private
    type t =
    1. | Comment_start
    2. | Comment_not_end
    3. | Fragile_match of string
    4. | Ignored_partial_application
    5. | Labels_omitted of string list
    6. | Method_override of string list
    7. | Partial_match of string
    8. | Missing_record_field_pattern of string
    9. | Non_unit_statement
    10. | Redundant_case
    11. | Redundant_subpat
    12. | Instance_variable_override of string list
    13. | Illegal_backslash
    14. | Implicit_public_methods of string list
    15. | Unerasable_optional_argument
    16. | Undeclared_virtual_method of string
    17. | Not_principal of string
    18. | Non_principal_labels of string
    19. | Ignored_extra_argument
    20. | Nonreturning_statement
    21. | Preprocessor of string
    22. | Useless_record_with
    23. | Bad_module_name of string
    24. | All_clauses_guarded
    25. | Unused_var of string
    26. | Unused_var_strict of string
    27. | Wildcard_arg_to_constant_constr
    28. | Eol_in_string
    29. | Duplicate_definitions of string * string * string * string
    30. | Unused_value_declaration of string
    31. | Unused_open of string
    32. | Unused_type_declaration of string
    33. | Unused_for_index of string
    34. | Unused_ancestor of string
    35. | Unused_constructor of string * constructor_usage_warning
    36. | Unused_extension of string * bool * constructor_usage_warning
    37. | Unused_rec_flag
    38. | Name_out_of_scope of string * string list * bool
    39. | Ambiguous_name of string list * string list * bool * string
    40. | Disambiguated_name of string
    41. | Nonoptional_label of string
    42. | Open_shadow_identifier of string * string
    43. | Open_shadow_label_constructor of string * string
    44. | Bad_env_variable of string * string
    45. | Attribute_payload of string * string
    46. | Eliminated_optional_arguments of string list
    47. | No_cmi_file of string * string option
    48. | Unexpected_docstring of bool
    49. | Wrong_tailcall_expectation of bool
    50. | Fragile_literal_pattern
    51. | Misplaced_attribute of string
    52. | Duplicated_attribute of string
    53. | Inlining_impossible of string
    54. | Unreachable_case
    55. | Ambiguous_var_in_pattern_guard of string list
    56. | No_cmx_file of string
    57. | Flambda_assignment_to_non_mutable_value
    58. | Unused_module of string
    59. | Unboxable_type_in_prim_decl of string
    60. | Constraint_on_gadt
    61. | Erroneous_printed_signature of string
    62. | Unsafe_array_syntax_without_parsing
    63. | Redefining_unit of string
    64. | Unused_open_bang of string
    65. | Unused_functor_parameter of string
    66. | Match_on_mutable_state_prevent_uncurry
    67. | Unused_field of string * field_usage_warning
    68. | Missing_mli
    69. | Unused_tmc_attribute
    70. | Tmc_breaks_tailcall
    71. | Generative_application_expects_unit
    type alert = {
    1. kind : string;
    2. message : string;
    3. def : loc;
    4. use : loc;
    }
    val parse_options : bool -> string -> alert option
    val parse_alert_option : string -> unit

    Disable/enable alerts based on the parameter to the -alert command-line option. Raises Arg.Bad if the string is not a valid specification.

    val without_warnings : (unit -> 'a) -> 'a

    Run the thunk with all warnings and alerts disabled.

    val is_active : t -> bool
    val is_error : t -> bool
    val defaults_w : string
    val defaults_warn_error : string
    type reporting_information = {
    1. id : string;
    2. message : string;
    3. is_error : bool;
    4. sub_locs : (loc * string) list;
    }
    val report : t -> [ `Active of reporting_information | `Inactive ]
    val report_alert : alert -> [ `Active of reporting_information | `Inactive ]
    exception Errors
    val check_fatal : unit -> unit
    val reset_fatal : unit -> unit
    val help_warnings : unit -> unit
    type state
    val backup : unit -> state
    val restore : state -> unit
    val with_state : state -> (unit -> 'a) -> 'a
    val mk_lazy : (unit -> 'a) -> 'a Stdlib.Lazy.t

    Like Lazy.of_fun, but the function is applied with the warning/alert settings at the time mk_lazy is called.

    type description = {
    1. number : int;
    2. names : string list;
    3. description : string;
    4. since : Stdlib.Sys.ocaml_release_info option;
    }
    val descriptions : description list
    \ No newline at end of file +Warnings (ocaml.Warnings)

    Module Warnings

    Warning definitions

    Warning: this module is unstable and part of compiler-libs.

    type loc = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }
    val ghost_loc_in_file : string -> loc

    Return an empty ghost range located in a given file

    type field_usage_warning =
    1. | Unused
    2. | Not_read
    3. | Not_mutated
    type constructor_usage_warning =
    1. | Unused
    2. | Not_constructed
    3. | Only_exported_private
    type t =
    1. | Comment_start
    2. | Comment_not_end
    3. | Fragile_match of string
    4. | Ignored_partial_application
    5. | Labels_omitted of string list
    6. | Method_override of string list
    7. | Partial_match of string
    8. | Missing_record_field_pattern of string
    9. | Non_unit_statement
    10. | Redundant_case
    11. | Redundant_subpat
    12. | Instance_variable_override of string list
    13. | Illegal_backslash
    14. | Implicit_public_methods of string list
    15. | Unerasable_optional_argument
    16. | Undeclared_virtual_method of string
    17. | Not_principal of string
    18. | Non_principal_labels of string
    19. | Ignored_extra_argument
    20. | Nonreturning_statement
    21. | Preprocessor of string
    22. | Useless_record_with
    23. | Bad_module_name of string
    24. | All_clauses_guarded
    25. | Unused_var of string
    26. | Unused_var_strict of string
    27. | Wildcard_arg_to_constant_constr
    28. | Eol_in_string
    29. | Duplicate_definitions of string * string * string * string
    30. | Unused_value_declaration of string
    31. | Unused_open of string
    32. | Unused_type_declaration of string
    33. | Unused_for_index of string
    34. | Unused_ancestor of string
    35. | Unused_constructor of string * constructor_usage_warning
    36. | Unused_extension of string * bool * constructor_usage_warning
    37. | Unused_rec_flag
    38. | Name_out_of_scope of string * string list * bool
    39. | Ambiguous_name of string list * string list * bool * string
    40. | Disambiguated_name of string
    41. | Nonoptional_label of string
    42. | Open_shadow_identifier of string * string
    43. | Open_shadow_label_constructor of string * string
    44. | Bad_env_variable of string * string
    45. | Attribute_payload of string * string
    46. | Eliminated_optional_arguments of string list
    47. | No_cmi_file of string * string option
    48. | Unexpected_docstring of bool
    49. | Wrong_tailcall_expectation of bool
    50. | Fragile_literal_pattern
    51. | Misplaced_attribute of string
    52. | Duplicated_attribute of string
    53. | Inlining_impossible of string
    54. | Unreachable_case
    55. | Ambiguous_var_in_pattern_guard of string list
    56. | No_cmx_file of string
    57. | Flambda_assignment_to_non_mutable_value
    58. | Unused_module of string
    59. | Unboxable_type_in_prim_decl of string
    60. | Constraint_on_gadt
    61. | Erroneous_printed_signature of string
    62. | Unsafe_array_syntax_without_parsing
    63. | Redefining_unit of string
    64. | Unused_open_bang of string
    65. | Unused_functor_parameter of string
    66. | Match_on_mutable_state_prevent_uncurry
    67. | Unused_field of string * field_usage_warning
    68. | Missing_mli
    69. | Unused_tmc_attribute
    70. | Tmc_breaks_tailcall
    71. | Generative_application_expects_unit
    type alert = {
    1. kind : string;
    2. message : string;
    3. def : loc;
    4. use : loc;
    }
    val parse_options : bool -> string -> alert option
    val parse_alert_option : string -> unit

    Disable/enable alerts based on the parameter to the -alert command-line option. Raises Arg.Bad if the string is not a valid specification.

    val without_warnings : (unit -> 'a) -> 'a

    Run the thunk with all warnings and alerts disabled.

    val is_active : t -> bool
    val is_error : t -> bool
    val defaults_w : string
    val defaults_warn_error : string
    type reporting_information = {
    1. id : string;
    2. message : string;
    3. is_error : bool;
    4. sub_locs : (loc * string) list;
    }
    val report : t -> [ `Active of reporting_information | `Inactive ]
    val report_alert : alert -> [ `Active of reporting_information | `Inactive ]
    exception Errors
    val check_fatal : unit -> unit
    val reset_fatal : unit -> unit
    val help_warnings : unit -> unit
    type state
    val backup : unit -> state
    val restore : state -> unit
    val with_state : state -> (unit -> 'a) -> 'a
    val mk_lazy : (unit -> 'a) -> 'a Stdlib.Lazy.t

    Like Lazy.of_fun, but the function is applied with the warning/alert settings at the time mk_lazy is called.

    type description = {
    1. number : int;
    2. names : string list;
    3. description : string;
    4. since : Stdlib.Sys.ocaml_release_info option;
    }
    val descriptions : description list
    diff --git a/ocaml/X86_ast/index.html b/ocaml/X86_ast/index.html index d117c95..7ed9d2c 100644 --- a/ocaml/X86_ast/index.html +++ b/ocaml/X86_ast/index.html @@ -1,2 +1,2 @@ -X86_ast (ocaml.X86_ast)

    Module X86_ast

    Structured representation of Intel assembly language (32 and 64 bit).

    type condition =
    1. | L
    2. | GE
    3. | LE
    4. | G
    5. | B
    6. | AE
    7. | BE
    8. | A
    9. | E
    10. | NE
    11. | O
    12. | NO
    13. | S
    14. | NS
    15. | P
    16. | NP
    type float_condition =
    1. | EQf
    2. | LTf
    3. | LEf
    4. | UNORDf
    5. | NEQf
    6. | NLTf
    7. | NLEf
    8. | ORDf
    type rounding =
    1. | RoundUp
    2. | RoundDown
    3. | RoundNearest
    4. | RoundTruncate
    type constant =
    1. | Const of int64
    2. | ConstThis
    3. | ConstLabel of string
    4. | ConstAdd of constant * constant
    5. | ConstSub of constant * constant
    type data_type =
    1. | NONE
    2. | REAL4
    3. | REAL8
    4. | BYTE
    5. | WORD
    6. | DWORD
    7. | QWORD
    8. | OWORD
    9. | NEAR
    10. | PROC
    type reg64 =
    1. | RAX
    2. | RBX
    3. | RCX
    4. | RDX
    5. | RSP
    6. | RBP
    7. | RSI
    8. | RDI
    9. | R8
    10. | R9
    11. | R10
    12. | R11
    13. | R12
    14. | R13
    15. | R14
    16. | R15
    type reg8h =
    1. | AH
    2. | BH
    3. | CH
    4. | DH
    type registerf =
    1. | XMM of int
    2. | TOS
    3. | ST of int
    type arch =
    1. | X64
    2. | X86
    type addr = {
    1. arch : arch;
    2. typ : data_type;
    3. idx : reg64;
    4. scale : int;
    5. base : reg64 option;
    6. sym : string option;
    7. displ : int;
    }

    Addressing modes: displ + sym + base + idx * scale (if scale = 0, idx is ignored and base must be None)

    type arg =
    1. | Imm of int64
      (*

      Operand is an immediate constant integer

      *)
    2. | Sym of string
      (*

      Address of a symbol (absolute address except for call/jmp target where it is interpreted as a relative displacement

      *)
    3. | Reg8L of reg64
    4. | Reg8H of reg8h
    5. | Reg16 of reg64
    6. | Reg32 of reg64
    7. | Reg64 of reg64
    8. | Regf of registerf
    9. | Mem of addr
    10. | Mem64_RIP of data_type * string * int
    type instruction =
    1. | ADD of arg * arg
    2. | ADDSD of arg * arg
    3. | AND of arg * arg
    4. | ANDPD of arg * arg
    5. | BSWAP of arg
    6. | CALL of arg
    7. | CDQ
    8. | CMOV of condition * arg * arg
    9. | CMP of arg * arg
    10. | CMPSD of float_condition * arg * arg
    11. | COMISD of arg * arg
    12. | CQO
    13. | CVTSD2SI of arg * arg
    14. | CVTSD2SS of arg * arg
    15. | CVTSI2SD of arg * arg
    16. | CVTSS2SD of arg * arg
    17. | CVTTSD2SI of arg * arg
    18. | DEC of arg
    19. | DIVSD of arg * arg
    20. | FABS
    21. | FADD of arg
    22. | FADDP of arg * arg
    23. | FCHS
    24. | FCOMP of arg
    25. | FCOMPP
    26. | FCOS
    27. | FDIV of arg
    28. | FDIVP of arg * arg
    29. | FDIVR of arg
    30. | FDIVRP of arg * arg
    31. | FILD of arg
    32. | FISTP of arg
    33. | FLD of arg
    34. | FLD1
    35. | FLDCW of arg
    36. | FLDLG2
    37. | FLDLN2
    38. | FLDZ
    39. | FMUL of arg
    40. | FMULP of arg * arg
    41. | FNSTCW of arg
    42. | FNSTSW of arg
    43. | FPATAN
    44. | FPTAN
    45. | FSIN
    46. | FSQRT
    47. | FSTP of arg
    48. | FSUB of arg
    49. | FSUBP of arg * arg
    50. | FSUBR of arg
    51. | FSUBRP of arg * arg
    52. | FXCH of arg
    53. | FYL2X
    54. | HLT
    55. | IDIV of arg
    56. | IMUL of arg * arg option
    57. | INC of arg
    58. | J of condition * arg
    59. | JMP of arg
    60. | LEA of arg * arg
    61. | LEAVE
    62. | MOV of arg * arg
    63. | MOVAPD of arg * arg
    64. | MOVD of arg * arg
    65. | MOVLPD of arg * arg
    66. | MOVSD of arg * arg
    67. | MOVSS of arg * arg
    68. | MOVSX of arg * arg
    69. | MOVSXD of arg * arg
    70. | MOVZX of arg * arg
    71. | MULSD of arg * arg
    72. | NEG of arg
    73. | NOP
    74. | OR of arg * arg
    75. | POP of arg
    76. | PUSH of arg
    77. | RET
    78. | ROUNDSD of rounding * arg * arg
    79. | SAL of arg * arg
    80. | SAR of arg * arg
    81. | SET of condition * arg
    82. | SHR of arg * arg
    83. | SQRTSD of arg * arg
    84. | SUB of arg * arg
    85. | SUBSD of arg * arg
    86. | TEST of arg * arg
    87. | UCOMISD of arg * arg
    88. | XCHG of arg * arg
    89. | XOR of arg * arg
    90. | XORPD of arg * arg
    type asm_line =
    1. | Ins of instruction
    2. | Align of bool * int
    3. | Byte of constant
    4. | Bytes of string
    5. | Comment of string
    6. | Global of string
    7. | Long of constant
    8. | NewLabel of string * data_type
    9. | Quad of constant
    10. | Section of string list * string option * string list
    11. | Space of int
    12. | Word of constant
    13. | External of string * data_type
    14. | Mode386
    15. | Model of string
    16. | Cfi_adjust_cfa_offset of int
    17. | Cfi_endproc
    18. | Cfi_startproc
    19. | Cfi_remember_state
    20. | Cfi_restore_state
    21. | Cfi_def_cfa_register of string
    22. | Cfi_def_cfa_offset of int
    23. | File of int * string
    24. | Indirect_symbol of string
    25. | Loc of int * int * int
    26. | Private_extern of string
    27. | Set of string * constant
    28. | Size of string * constant
    29. | Type of string * string
    type asm_program = asm_line list
    \ No newline at end of file +X86_ast (ocaml.X86_ast)

    Module X86_ast

    Structured representation of Intel assembly language (32 and 64 bit).

    type condition =
    1. | L
    2. | GE
    3. | LE
    4. | G
    5. | B
    6. | AE
    7. | BE
    8. | A
    9. | E
    10. | NE
    11. | O
    12. | NO
    13. | S
    14. | NS
    15. | P
    16. | NP
    type float_condition =
    1. | EQf
    2. | LTf
    3. | LEf
    4. | UNORDf
    5. | NEQf
    6. | NLTf
    7. | NLEf
    8. | ORDf
    type rounding =
    1. | RoundUp
    2. | RoundDown
    3. | RoundNearest
    4. | RoundTruncate
    type constant =
    1. | Const of int64
    2. | ConstThis
    3. | ConstLabel of string
    4. | ConstAdd of constant * constant
    5. | ConstSub of constant * constant
    type data_type =
    1. | NONE
    2. | REAL4
    3. | REAL8
    4. | BYTE
    5. | WORD
    6. | DWORD
    7. | QWORD
    8. | OWORD
    9. | NEAR
    10. | PROC
    type reg64 =
    1. | RAX
    2. | RBX
    3. | RCX
    4. | RDX
    5. | RSP
    6. | RBP
    7. | RSI
    8. | RDI
    9. | R8
    10. | R9
    11. | R10
    12. | R11
    13. | R12
    14. | R13
    15. | R14
    16. | R15
    type reg8h =
    1. | AH
    2. | BH
    3. | CH
    4. | DH
    type registerf =
    1. | XMM of int
    2. | TOS
    3. | ST of int
    type arch =
    1. | X64
    2. | X86
    type addr = {
    1. arch : arch;
    2. typ : data_type;
    3. idx : reg64;
    4. scale : int;
    5. base : reg64 option;
    6. sym : string option;
    7. displ : int;
    }

    Addressing modes: displ + sym + base + idx * scale (if scale = 0, idx is ignored and base must be None)

    type arg =
    1. | Imm of int64
      (*

      Operand is an immediate constant integer

      *)
    2. | Sym of string
      (*

      Address of a symbol (absolute address except for call/jmp target where it is interpreted as a relative displacement

      *)
    3. | Reg8L of reg64
    4. | Reg8H of reg8h
    5. | Reg16 of reg64
    6. | Reg32 of reg64
    7. | Reg64 of reg64
    8. | Regf of registerf
    9. | Mem of addr
    10. | Mem64_RIP of data_type * string * int
    type instruction =
    1. | ADD of arg * arg
    2. | ADDSD of arg * arg
    3. | AND of arg * arg
    4. | ANDPD of arg * arg
    5. | BSWAP of arg
    6. | CALL of arg
    7. | CDQ
    8. | CMOV of condition * arg * arg
    9. | CMP of arg * arg
    10. | CMPSD of float_condition * arg * arg
    11. | COMISD of arg * arg
    12. | CQO
    13. | CVTSD2SI of arg * arg
    14. | CVTSD2SS of arg * arg
    15. | CVTSI2SD of arg * arg
    16. | CVTSS2SD of arg * arg
    17. | CVTTSD2SI of arg * arg
    18. | DEC of arg
    19. | DIVSD of arg * arg
    20. | FABS
    21. | FADD of arg
    22. | FADDP of arg * arg
    23. | FCHS
    24. | FCOMP of arg
    25. | FCOMPP
    26. | FCOS
    27. | FDIV of arg
    28. | FDIVP of arg * arg
    29. | FDIVR of arg
    30. | FDIVRP of arg * arg
    31. | FILD of arg
    32. | FISTP of arg
    33. | FLD of arg
    34. | FLD1
    35. | FLDCW of arg
    36. | FLDLG2
    37. | FLDLN2
    38. | FLDZ
    39. | FMUL of arg
    40. | FMULP of arg * arg
    41. | FNSTCW of arg
    42. | FNSTSW of arg
    43. | FPATAN
    44. | FPTAN
    45. | FSIN
    46. | FSQRT
    47. | FSTP of arg
    48. | FSUB of arg
    49. | FSUBP of arg * arg
    50. | FSUBR of arg
    51. | FSUBRP of arg * arg
    52. | FXCH of arg
    53. | FYL2X
    54. | HLT
    55. | IDIV of arg
    56. | IMUL of arg * arg option
    57. | INC of arg
    58. | J of condition * arg
    59. | JMP of arg
    60. | LEA of arg * arg
    61. | LEAVE
    62. | MOV of arg * arg
    63. | MOVAPD of arg * arg
    64. | MOVD of arg * arg
    65. | MOVLPD of arg * arg
    66. | MOVSD of arg * arg
    67. | MOVSS of arg * arg
    68. | MOVSX of arg * arg
    69. | MOVSXD of arg * arg
    70. | MOVZX of arg * arg
    71. | MULSD of arg * arg
    72. | NEG of arg
    73. | NOP
    74. | OR of arg * arg
    75. | POP of arg
    76. | PUSH of arg
    77. | RET
    78. | ROUNDSD of rounding * arg * arg
    79. | SAL of arg * arg
    80. | SAR of arg * arg
    81. | SET of condition * arg
    82. | SHR of arg * arg
    83. | SQRTSD of arg * arg
    84. | SUB of arg * arg
    85. | SUBSD of arg * arg
    86. | TEST of arg * arg
    87. | UCOMISD of arg * arg
    88. | XCHG of arg * arg
    89. | XOR of arg * arg
    90. | XORPD of arg * arg
    type asm_line =
    1. | Ins of instruction
    2. | Align of bool * int
    3. | Byte of constant
    4. | Bytes of string
    5. | Comment of string
    6. | Global of string
    7. | Long of constant
    8. | NewLabel of string * data_type
    9. | Quad of constant
    10. | Section of string list * string option * string list
    11. | Space of int
    12. | Word of constant
    13. | External of string * data_type
    14. | Mode386
    15. | Model of string
    16. | Cfi_adjust_cfa_offset of int
    17. | Cfi_endproc
    18. | Cfi_startproc
    19. | Cfi_remember_state
    20. | Cfi_restore_state
    21. | Cfi_def_cfa_register of string
    22. | Cfi_def_cfa_offset of int
    23. | File of int * string
    24. | Indirect_symbol of string
    25. | Loc of int * int * int
    26. | Private_extern of string
    27. | Set of string * constant
    28. | Size of string * constant
    29. | Type of string * string
    type asm_program = asm_line list
    diff --git a/ocaml/X86_dsl/D/index.html b/ocaml/X86_dsl/D/index.html index 8044272..d480fe1 100644 --- a/ocaml/X86_dsl/D/index.html +++ b/ocaml/X86_dsl/D/index.html @@ -1,2 +1,2 @@ -D (ocaml.X86_dsl.D)

    Module X86_dsl.D

    Directives

    val align : int -> unit
    val byte : X86_ast.constant -> unit
    val bytes : string -> unit
    val cfi_adjust_cfa_offset : int -> unit
    val cfi_endproc : unit -> unit
    val cfi_startproc : unit -> unit
    val cfi_remember_state : unit -> unit
    val cfi_restore_state : unit -> unit
    val cfi_def_cfa_register : string -> unit
    val cfi_def_cfa_offset : int -> unit
    val comment : string -> unit
    val data : unit -> unit
    val extrn : string -> X86_ast.data_type -> unit
    val file : file_num:int -> file_name:string -> unit
    val global : string -> unit
    val indirect_symbol : string -> unit
    val label : ?typ:X86_ast.data_type -> string -> unit
    val loc : file_num:int -> line:int -> col:int -> unit
    val long : X86_ast.constant -> unit
    val mode386 : unit -> unit
    val model : string -> unit
    val private_extern : string -> unit
    val qword : X86_ast.constant -> unit
    val section : string list -> string option -> string list -> unit
    val setvar : (string * X86_ast.constant) -> unit
    val size : string -> X86_ast.constant -> unit
    val space : int -> unit
    val text : unit -> unit
    val type_ : string -> string -> unit
    val word : X86_ast.constant -> unit
    \ No newline at end of file +D (ocaml.X86_dsl.D)

    Module X86_dsl.D

    Directives

    val align : int -> unit
    val byte : X86_ast.constant -> unit
    val bytes : string -> unit
    val cfi_adjust_cfa_offset : int -> unit
    val cfi_endproc : unit -> unit
    val cfi_startproc : unit -> unit
    val cfi_remember_state : unit -> unit
    val cfi_restore_state : unit -> unit
    val cfi_def_cfa_register : string -> unit
    val cfi_def_cfa_offset : int -> unit
    val comment : string -> unit
    val data : unit -> unit
    val extrn : string -> X86_ast.data_type -> unit
    val file : file_num:int -> file_name:string -> unit
    val global : string -> unit
    val indirect_symbol : string -> unit
    val label : ?typ:X86_ast.data_type -> string -> unit
    val loc : file_num:int -> line:int -> col:int -> unit
    val long : X86_ast.constant -> unit
    val mode386 : unit -> unit
    val model : string -> unit
    val private_extern : string -> unit
    val qword : X86_ast.constant -> unit
    val section : string list -> string option -> string list -> unit
    val setvar : (string * X86_ast.constant) -> unit
    val size : string -> X86_ast.constant -> unit
    val space : int -> unit
    val text : unit -> unit
    val type_ : string -> string -> unit
    val word : X86_ast.constant -> unit
    diff --git a/ocaml/X86_dsl/I/index.html b/ocaml/X86_dsl/I/index.html index 1a61fcf..cd29616 100644 --- a/ocaml/X86_dsl/I/index.html +++ b/ocaml/X86_dsl/I/index.html @@ -1,2 +1,2 @@ -I (ocaml.X86_dsl.I)

    Module X86_dsl.I

    val add : X86_ast.arg -> X86_ast.arg -> unit
    val addsd : X86_ast.arg -> X86_ast.arg -> unit
    val and_ : X86_ast.arg -> X86_ast.arg -> unit
    val andpd : X86_ast.arg -> X86_ast.arg -> unit
    val bswap : X86_ast.arg -> unit
    val call : X86_ast.arg -> unit
    val cdq : unit -> unit
    val cmp : X86_ast.arg -> X86_ast.arg -> unit
    val comisd : X86_ast.arg -> X86_ast.arg -> unit
    val cqo : unit -> unit
    val cvtsd2ss : X86_ast.arg -> X86_ast.arg -> unit
    val cvtsi2sd : X86_ast.arg -> X86_ast.arg -> unit
    val cvtss2sd : X86_ast.arg -> X86_ast.arg -> unit
    val cvttsd2si : X86_ast.arg -> X86_ast.arg -> unit
    val dec : X86_ast.arg -> unit
    val divsd : X86_ast.arg -> X86_ast.arg -> unit
    val fabs : unit -> unit
    val fadd : X86_ast.arg -> unit
    val faddp : X86_ast.arg -> X86_ast.arg -> unit
    val fchs : unit -> unit
    val fcomp : X86_ast.arg -> unit
    val fcompp : unit -> unit
    val fcos : unit -> unit
    val fdiv : X86_ast.arg -> unit
    val fdivp : X86_ast.arg -> X86_ast.arg -> unit
    val fdivr : X86_ast.arg -> unit
    val fdivrp : X86_ast.arg -> X86_ast.arg -> unit
    val fild : X86_ast.arg -> unit
    val fistp : X86_ast.arg -> unit
    val fld1 : unit -> unit
    val fld : X86_ast.arg -> unit
    val fldcw : X86_ast.arg -> unit
    val fldlg2 : unit -> unit
    val fldln2 : unit -> unit
    val fldz : unit -> unit
    val fmul : X86_ast.arg -> unit
    val fmulp : X86_ast.arg -> X86_ast.arg -> unit
    val fnstcw : X86_ast.arg -> unit
    val fnstsw : X86_ast.arg -> unit
    val fpatan : unit -> unit
    val fptan : unit -> unit
    val fsin : unit -> unit
    val fsqrt : unit -> unit
    val fstp : X86_ast.arg -> unit
    val fsub : X86_ast.arg -> unit
    val fsubp : X86_ast.arg -> X86_ast.arg -> unit
    val fsubr : X86_ast.arg -> unit
    val fsubrp : X86_ast.arg -> X86_ast.arg -> unit
    val fxch : X86_ast.arg -> unit
    val fyl2x : unit -> unit
    val hlt : unit -> unit
    val idiv : X86_ast.arg -> unit
    val imul : X86_ast.arg -> X86_ast.arg option -> unit
    val inc : X86_ast.arg -> unit
    val j : X86_ast.condition -> X86_ast.arg -> unit
    val ja : X86_ast.arg -> unit
    val jae : X86_ast.arg -> unit
    val jb : X86_ast.arg -> unit
    val jbe : X86_ast.arg -> unit
    val je : X86_ast.arg -> unit
    val jg : X86_ast.arg -> unit
    val jmp : X86_ast.arg -> unit
    val jne : X86_ast.arg -> unit
    val jp : X86_ast.arg -> unit
    val lea : X86_ast.arg -> X86_ast.arg -> unit
    val mov : X86_ast.arg -> X86_ast.arg -> unit
    val movapd : X86_ast.arg -> X86_ast.arg -> unit
    val movd : X86_ast.arg -> X86_ast.arg -> unit
    val movsd : X86_ast.arg -> X86_ast.arg -> unit
    val movss : X86_ast.arg -> X86_ast.arg -> unit
    val movsx : X86_ast.arg -> X86_ast.arg -> unit
    val movsxd : X86_ast.arg -> X86_ast.arg -> unit
    val movzx : X86_ast.arg -> X86_ast.arg -> unit
    val mulsd : X86_ast.arg -> X86_ast.arg -> unit
    val neg : X86_ast.arg -> unit
    val nop : unit -> unit
    val or_ : X86_ast.arg -> X86_ast.arg -> unit
    val pop : X86_ast.arg -> unit
    val push : X86_ast.arg -> unit
    val ret : unit -> unit
    val sal : X86_ast.arg -> X86_ast.arg -> unit
    val sar : X86_ast.arg -> X86_ast.arg -> unit
    val set : X86_ast.condition -> X86_ast.arg -> unit
    val shr : X86_ast.arg -> X86_ast.arg -> unit
    val sqrtsd : X86_ast.arg -> X86_ast.arg -> unit
    val sub : X86_ast.arg -> X86_ast.arg -> unit
    val subsd : X86_ast.arg -> X86_ast.arg -> unit
    val test : X86_ast.arg -> X86_ast.arg -> unit
    val ucomisd : X86_ast.arg -> X86_ast.arg -> unit
    val xchg : X86_ast.arg -> X86_ast.arg -> unit
    val xor : X86_ast.arg -> X86_ast.arg -> unit
    val xorpd : X86_ast.arg -> X86_ast.arg -> unit
    \ No newline at end of file +I (ocaml.X86_dsl.I)

    Module X86_dsl.I

    val add : X86_ast.arg -> X86_ast.arg -> unit
    val addsd : X86_ast.arg -> X86_ast.arg -> unit
    val and_ : X86_ast.arg -> X86_ast.arg -> unit
    val andpd : X86_ast.arg -> X86_ast.arg -> unit
    val bswap : X86_ast.arg -> unit
    val call : X86_ast.arg -> unit
    val cdq : unit -> unit
    val cmp : X86_ast.arg -> X86_ast.arg -> unit
    val comisd : X86_ast.arg -> X86_ast.arg -> unit
    val cqo : unit -> unit
    val cvtsd2ss : X86_ast.arg -> X86_ast.arg -> unit
    val cvtsi2sd : X86_ast.arg -> X86_ast.arg -> unit
    val cvtss2sd : X86_ast.arg -> X86_ast.arg -> unit
    val cvttsd2si : X86_ast.arg -> X86_ast.arg -> unit
    val dec : X86_ast.arg -> unit
    val divsd : X86_ast.arg -> X86_ast.arg -> unit
    val fabs : unit -> unit
    val fadd : X86_ast.arg -> unit
    val faddp : X86_ast.arg -> X86_ast.arg -> unit
    val fchs : unit -> unit
    val fcomp : X86_ast.arg -> unit
    val fcompp : unit -> unit
    val fcos : unit -> unit
    val fdiv : X86_ast.arg -> unit
    val fdivp : X86_ast.arg -> X86_ast.arg -> unit
    val fdivr : X86_ast.arg -> unit
    val fdivrp : X86_ast.arg -> X86_ast.arg -> unit
    val fild : X86_ast.arg -> unit
    val fistp : X86_ast.arg -> unit
    val fld1 : unit -> unit
    val fld : X86_ast.arg -> unit
    val fldcw : X86_ast.arg -> unit
    val fldlg2 : unit -> unit
    val fldln2 : unit -> unit
    val fldz : unit -> unit
    val fmul : X86_ast.arg -> unit
    val fmulp : X86_ast.arg -> X86_ast.arg -> unit
    val fnstcw : X86_ast.arg -> unit
    val fnstsw : X86_ast.arg -> unit
    val fpatan : unit -> unit
    val fptan : unit -> unit
    val fsin : unit -> unit
    val fsqrt : unit -> unit
    val fstp : X86_ast.arg -> unit
    val fsub : X86_ast.arg -> unit
    val fsubp : X86_ast.arg -> X86_ast.arg -> unit
    val fsubr : X86_ast.arg -> unit
    val fsubrp : X86_ast.arg -> X86_ast.arg -> unit
    val fxch : X86_ast.arg -> unit
    val fyl2x : unit -> unit
    val hlt : unit -> unit
    val idiv : X86_ast.arg -> unit
    val imul : X86_ast.arg -> X86_ast.arg option -> unit
    val inc : X86_ast.arg -> unit
    val j : X86_ast.condition -> X86_ast.arg -> unit
    val ja : X86_ast.arg -> unit
    val jae : X86_ast.arg -> unit
    val jb : X86_ast.arg -> unit
    val jbe : X86_ast.arg -> unit
    val je : X86_ast.arg -> unit
    val jg : X86_ast.arg -> unit
    val jmp : X86_ast.arg -> unit
    val jne : X86_ast.arg -> unit
    val jp : X86_ast.arg -> unit
    val lea : X86_ast.arg -> X86_ast.arg -> unit
    val mov : X86_ast.arg -> X86_ast.arg -> unit
    val movapd : X86_ast.arg -> X86_ast.arg -> unit
    val movd : X86_ast.arg -> X86_ast.arg -> unit
    val movsd : X86_ast.arg -> X86_ast.arg -> unit
    val movss : X86_ast.arg -> X86_ast.arg -> unit
    val movsx : X86_ast.arg -> X86_ast.arg -> unit
    val movsxd : X86_ast.arg -> X86_ast.arg -> unit
    val movzx : X86_ast.arg -> X86_ast.arg -> unit
    val mulsd : X86_ast.arg -> X86_ast.arg -> unit
    val neg : X86_ast.arg -> unit
    val nop : unit -> unit
    val or_ : X86_ast.arg -> X86_ast.arg -> unit
    val pop : X86_ast.arg -> unit
    val push : X86_ast.arg -> unit
    val ret : unit -> unit
    val sal : X86_ast.arg -> X86_ast.arg -> unit
    val sar : X86_ast.arg -> X86_ast.arg -> unit
    val set : X86_ast.condition -> X86_ast.arg -> unit
    val shr : X86_ast.arg -> X86_ast.arg -> unit
    val sqrtsd : X86_ast.arg -> X86_ast.arg -> unit
    val sub : X86_ast.arg -> X86_ast.arg -> unit
    val subsd : X86_ast.arg -> X86_ast.arg -> unit
    val test : X86_ast.arg -> X86_ast.arg -> unit
    val ucomisd : X86_ast.arg -> X86_ast.arg -> unit
    val xchg : X86_ast.arg -> X86_ast.arg -> unit
    val xor : X86_ast.arg -> X86_ast.arg -> unit
    val xorpd : X86_ast.arg -> X86_ast.arg -> unit
    diff --git a/ocaml/X86_dsl/index.html b/ocaml/X86_dsl/index.html index 746cdcf..3c89219 100644 --- a/ocaml/X86_dsl/index.html +++ b/ocaml/X86_dsl/index.html @@ -1,16 +1,16 @@ -X86_dsl (ocaml.X86_dsl)

    Module X86_dsl

    Helpers for Intel code generators

    val sym : string -> X86_ast.arg
    val nat : nativeint -> X86_ast.arg
    val int : int -> X86_ast.arg
    val const_32 : int32 -> X86_ast.constant
    val const_nat : nativeint -> X86_ast.constant
    val const : int -> X86_ast.constant
    val al : X86_ast.arg
    val ah : X86_ast.arg
    val cl : X86_ast.arg
    val ax : X86_ast.arg
    val rax : X86_ast.arg
    val rbx : X86_ast.arg
    val rdx : X86_ast.arg
    val r10 : X86_ast.arg
    val r11 : X86_ast.arg
    val r12 : X86_ast.arg
    val r13 : X86_ast.arg
    val r14 : X86_ast.arg
    val r15 : X86_ast.arg
    val rsp : X86_ast.arg
    val rbp : X86_ast.arg
    val xmm15 : X86_ast.arg
    val eax : X86_ast.arg
    val ebx : X86_ast.arg
    val ecx : X86_ast.arg
    val edx : X86_ast.arg
    val ebp : X86_ast.arg
    val esp : X86_ast.arg
    val st0 : X86_ast.arg
    val st1 : X86_ast.arg
    val mem32 : +X86_dsl (ocaml.X86_dsl)

    Module X86_dsl

    Helpers for Intel code generators

    val sym : string -> X86_ast.arg
    val nat : nativeint -> X86_ast.arg
    val int : int -> X86_ast.arg
    val const_32 : int32 -> X86_ast.constant
    val const_nat : nativeint -> X86_ast.constant
    val const : int -> X86_ast.constant
    val al : X86_ast.arg
    val ah : X86_ast.arg
    val cl : X86_ast.arg
    val ax : X86_ast.arg
    val rax : X86_ast.arg
    val rbx : X86_ast.arg
    val rdx : X86_ast.arg
    val r10 : X86_ast.arg
    val r11 : X86_ast.arg
    val r12 : X86_ast.arg
    val r13 : X86_ast.arg
    val r14 : X86_ast.arg
    val r15 : X86_ast.arg
    val rsp : X86_ast.arg
    val rbp : X86_ast.arg
    val xmm15 : X86_ast.arg
    val eax : X86_ast.arg
    val ebx : X86_ast.arg
    val ecx : X86_ast.arg
    val edx : X86_ast.arg
    val ebp : X86_ast.arg
    val esp : X86_ast.arg
    val st0 : X86_ast.arg
    val st1 : X86_ast.arg
    val mem32 : X86_ast.data_type -> - ?scale:int -> - ?base:X86_ast.reg64 -> - ?sym:string -> + ?scale:int -> + ?base:X86_ast.reg64 -> + ?sym:string -> int -> X86_ast.reg64 -> X86_ast.arg
    val mem64 : X86_ast.data_type -> - ?scale:int -> - ?base:X86_ast.reg64 -> - ?sym:string -> + ?scale:int -> + ?base:X86_ast.reg64 -> + ?sym:string -> int -> X86_ast.reg64 -> - X86_ast.arg
    val mem64_rip : X86_ast.data_type -> ?ofs:int -> string -> X86_ast.arg
    module D : sig ... end

    Directives

    module I : sig ... end
    \ No newline at end of file + X86_ast.arg
    val mem64_rip : X86_ast.data_type -> ?ofs:int -> string -> X86_ast.arg
    module D : sig ... end

    Directives

    module I : sig ... end
    diff --git a/ocaml/X86_gas/index.html b/ocaml/X86_gas/index.html index cd47342..9109560 100644 --- a/ocaml/X86_gas/index.html +++ b/ocaml/X86_gas/index.html @@ -1,2 +1,2 @@ -X86_gas (ocaml.X86_gas)

    Module X86_gas

    Emit assembly instructions for gas.

    val generate_asm : out_channel -> X86_ast.asm_line list -> unit
    \ No newline at end of file +X86_gas (ocaml.X86_gas)

    Module X86_gas

    Emit assembly instructions for gas.

    val generate_asm : out_channel -> X86_ast.asm_line list -> unit
    diff --git a/ocaml/X86_masm/index.html b/ocaml/X86_masm/index.html index 0f57588..131d3f6 100644 --- a/ocaml/X86_masm/index.html +++ b/ocaml/X86_masm/index.html @@ -1,2 +1,2 @@ -X86_masm (ocaml.X86_masm)

    Module X86_masm

    Emit assembly instructions for MASM (Intel syntax).

    val generate_asm : out_channel -> X86_ast.asm_line list -> unit
    \ No newline at end of file +X86_masm (ocaml.X86_masm)

    Module X86_masm

    Emit assembly instructions for MASM (Intel syntax).

    val generate_asm : out_channel -> X86_ast.asm_line list -> unit
    diff --git a/ocaml/X86_proc/index.html b/ocaml/X86_proc/index.html index 1c03f5b..9806e39 100644 --- a/ocaml/X86_proc/index.html +++ b/ocaml/X86_proc/index.html @@ -1,7 +1,7 @@ -X86_proc (ocaml.X86_proc)

    Module X86_proc

    Definitions shared between the 32 and 64 bit Intel backends.

    Helpers for textual emitters

    val string_of_reg8l : X86_ast.reg64 -> string
    val string_of_reg8h : X86_ast.reg8h -> string
    val string_of_reg16 : X86_ast.reg64 -> string
    val string_of_reg32 : X86_ast.reg64 -> string
    val string_of_reg64 : X86_ast.reg64 -> string
    val string_of_registerf : X86_ast.registerf -> string
    val string_of_string_literal : string -> string
    val string_of_condition : X86_ast.condition -> string
    val string_of_float_condition : X86_ast.float_condition -> string
    val string_of_symbol : string -> string -> string
    val string_of_rounding : X86_ast.rounding -> string
    val buf_bytes_directive : Stdlib.Buffer.t -> string -> string -> unit

    Buffer of assembly code

    val emit : X86_ast.instruction -> unit
    val directive : X86_ast.asm_line -> unit
    val reset_asm_code : unit -> unit

    Code emission

    val generate_code : (X86_ast.asm_line list -> unit) option -> unit

    Post-process the stream of instructions. Dump it (using the provided syntax emitter) in a file (if provided) and compile it with an internal assembler (if registered through register_internal_assembler).

    val assemble_file : string -> string -> int

    Generate an object file corresponding to the last call to generate_code. An internal assembler is used if available (and the input file is ignored). Otherwise, the source asm file with an external assembler.

    System detection

    type system =
    1. | S_macosx
    2. | S_gnu
    3. | S_cygwin
    4. | S_solaris
    5. | S_win32
    6. | S_linux_elf
    7. | S_bsd_elf
    8. | S_beos
    9. | S_mingw
    10. | S_win64
    11. | S_linux
    12. | S_mingw64
    13. | S_freebsd
    14. | S_netbsd
    15. | S_openbsd
    16. | S_unknown
    val system : system
    val masm : bool
    val windows : bool
    val use_plt : bool

    Whether calls need to go via the PLT.

    Support for plumbing a binary code emitter

    val register_internal_assembler : +X86_proc (ocaml.X86_proc)

    Module X86_proc

    Definitions shared between the 32 and 64 bit Intel backends.

    Helpers for textual emitters

    val string_of_reg8l : X86_ast.reg64 -> string
    val string_of_reg8h : X86_ast.reg8h -> string
    val string_of_reg16 : X86_ast.reg64 -> string
    val string_of_reg32 : X86_ast.reg64 -> string
    val string_of_reg64 : X86_ast.reg64 -> string
    val string_of_registerf : X86_ast.registerf -> string
    val string_of_string_literal : string -> string
    val string_of_condition : X86_ast.condition -> string
    val string_of_float_condition : X86_ast.float_condition -> string
    val string_of_symbol : string -> string -> string
    val string_of_rounding : X86_ast.rounding -> string
    val buf_bytes_directive : Stdlib.Buffer.t -> string -> string -> unit

    Buffer of assembly code

    val emit : X86_ast.instruction -> unit
    val directive : X86_ast.asm_line -> unit
    val reset_asm_code : unit -> unit

    Code emission

    val generate_code : (X86_ast.asm_line list -> unit) option -> unit

    Post-process the stream of instructions. Dump it (using the provided syntax emitter) in a file (if provided) and compile it with an internal assembler (if registered through register_internal_assembler).

    val assemble_file : string -> string -> int

    Generate an object file corresponding to the last call to generate_code. An internal assembler is used if available (and the input file is ignored). Otherwise, the source asm file with an external assembler.

    System detection

    type system =
    1. | S_macosx
    2. | S_gnu
    3. | S_cygwin
    4. | S_solaris
    5. | S_win32
    6. | S_linux_elf
    7. | S_bsd_elf
    8. | S_beos
    9. | S_mingw
    10. | S_win64
    11. | S_linux
    12. | S_mingw64
    13. | S_freebsd
    14. | S_netbsd
    15. | S_openbsd
    16. | S_unknown
    val system : system
    val masm : bool
    val windows : bool
    val use_plt : bool

    Whether calls need to go via the PLT.

    Support for plumbing a binary code emitter

    val register_internal_assembler : (X86_ast.asm_program -> string -> unit) -> unit
    val with_internal_assembler : (X86_ast.asm_program -> string -> unit) -> (unit -> 'a) -> - 'a
    \ No newline at end of file + 'a
    diff --git a/ocaml/index.html b/ocaml/index.html index 782ebee..48a2455 100644 --- a/ocaml/index.html +++ b/ocaml/index.html @@ -1,2 +1,2 @@ -index (ocaml.index)

    Package ocaml

    Stdlib

    Threads

    • Event First-class synchronous communication.
    • Thread Lightweight threads for Posix 1003.1c and Win32.

    Compiler libs

    Package info

    changes-files
    license-files
    readme-files
    \ No newline at end of file +index (ocaml.index)

    Package ocaml

    Stdlib

    Threads

    • Event First-class synchronous communication.
    • Thread Lightweight threads for Posix 1003.1c and Win32.

    Compiler libs

    Package info

    changes-files
    license-files
    readme-files
    diff --git a/odoc.css b/odoc.css index 8b0ed5a..21df5d3 100644 --- a/odoc.css +++ b/odoc.css @@ -1,126 +1,262 @@ @charset "UTF-8"; /* Copyright (c) 2016 The odoc contributors. All rights reserved. Distributed under the ISC license, see terms at the end of the file. - odoc 2.2.0 */ + odoc 3.1.0 */ /* Fonts */ -@import url('https://fonts.googleapis.com/css?family=Fira+Mono:400,500'); -@import url('https://fonts.googleapis.com/css?family=Noticia+Text:400,400i,700'); -@import url('https://fonts.googleapis.com/css?family=Fira+Sans:400,400i,500,500i,600,600i,700,700i'); +/* noticia-text-regular - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-italic - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: italic; + font-weight: 400; + src: url('fonts/noticia-text-v15-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* noticia-text-700 - latin */ +@font-face { + font-family: 'Noticia Text'; + font-style: normal; + font-weight: 700; + src: url('fonts/noticia-text-v15-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-regular - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-mono-v14-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-mono-500 - latin */ +@font-face { + font-family: 'Fira Mono'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-mono-v14-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-regular - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 400; + src: url('fonts/fira-sans-v17-latin-italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-500italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 500; + src: url('fonts/fira-sans-v17-latin-500italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700 - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: normal; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + +/* fira-sans-700italic - latin */ +@font-face { + font-family: 'Fira Sans'; + font-style: italic; + font-weight: 700; + src: url('fonts/fira-sans-v17-latin-700italic.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */ +} + :root, .light:root { - --main-background: #FFFFFF; - --color: #333333; - --link-color: #2C94BD; - --anchor-hover: #555; - --anchor-color: #d5d5d5; - --xref-shadow: #cc6666; - --header-shadow: #ddd; - --by-name-version-color: #aaa; - --by-name-nav-link-color: #222; - --target-background: rgba(187, 239, 253, 0.3); - --target-shadow: rgba(187, 239, 253, 0.8); - --pre-border-color: #eee; - --code-background: #f6f8fa; + scroll-padding-top: calc(var(--search-bar-height) + var(--search-padding-top) + 1em); - --li-code-background: #f6f8fa; - --li-code-color: #0d2b3e; - --toc-color: #1F2D3D; - --toc-before-color: #777; - --toc-background: #f6f8fa; - --toc-list-border: #ccc; + /* light gruvbox theme colors */ + --bg_h: #f9f5d7; + --bg: #f6f8fa; /*#fbf1c7;*/ + --bg_s: #f2e5bc; + --bg1: #ebdbb2; + --bg2: #d5c4a1; + --bg3: #bdae93; + --bg4: #a89984; - --spec-summary-border-color: #5c9cf5; - --spec-summary-background: var(--code-background); - --spec-summary-hover-background: #ebeff2; - --spec-details-after-background: rgba(0, 4, 15, 0.05); - --spec-details-after-shadow: rgba(204, 204, 204, 0.53); -} + --fg: #282828; + --fg1: #3c3836; + --fg2: #504945; + --fg3: #665c54; + --fg4: #7c6f64; -.dark:root { - --main-background: #202020; - --code-background: #222; - --line-numbers-background: rgba(0, 0, 0, 0.125); - --navbar-background: #202020; + --red: #9d0006; + --green: #79740e; + --yellow: #b57614; + --blue: #076678; + --purple: #8f3f71; + --aqua: #427b58; + --orange: #af3a03; + --gray: #928374; - --color: #bebebe; - --dirname-color: #666; - --underline-color: #444; - --visited-color: #002800; - --visited-number-color: #252; - --unvisited-color: #380000; - --unvisited-number-color: #622; - --somevisited-color: #303000; - --highlight-color: #303e3f; - --line-number-color: rgba(230, 230, 230, 0.3); - --unvisited-margin-color: #622; - --border: #333; - --navbar-border: #333; - --code-color: #ccc; + --red-dim: #cc2412; + --green-dim: #98971a; + --yellow-dim: #d79921; + --blue-dim: #458598; + --purple-dim: #b16286; + --aqua-dim: #689d6a; + --orange-dim: #d65d0e; + --gray-dim: #7c6f64; - --li-code-background: #373737; - --li-code-color: #999; - --toc-color: #777; - --toc-background: #252525; + /* odoc colors */ + --odoc-blue: #5c9cf5; + --odoc-bg: #FFFFFF; + --odoc-bg1: #f6f8fa; + --odoc-fg: #333333; + --odoc-fg1: #1F2D3D; - --hljs-link: #999; - --hljs-keyword: #cda869; - --hljs-regexp: #f9ee98; - --hljs-title: #dcdcaa; - --hljs-type: #ac885b; - --hljs-meta: #82aaff; - --hljs-variable: #cf6a4c; } @media (prefers-color-scheme: dark) { :root { - --main-background: #202020; - --code-background: #333; - --line-numbers-background: rgba(0, 0, 0, 0.125); - --navbar-background: #202020; + /* dark gruvbox theme colors */ + --bg_h: #1d2021; + --bg: #282828; + --bg_s: #32302f; + --bg1: #3c3836; + --bg2: #504945; + --bg3: #665c54; + --bg4: #7c6f64; - --meter-unvisited-color: #622; - --meter-visited-color: #252; - --meter-separator-color: black; + --fg: #fbf1c7; + --fg1: #ebdbb2; + --fg2: #d5c4a1; + --fg3: #bdae93; + --fg4: #a89984; - --color: #bebebe; - --dirname-color: #666; - --underline-color: #444; - --visited-color: #002800; - --visited-number-color: #252; - --unvisited-color: #380000; - --unvisited-number-color: #622; - --somevisited-color: #303000; - --highlight-color: #303e3f; - --line-number-color: rgba(230, 230, 230, 0.3); - --unvisited-margin-color: #622; - --border: #333; - --navbar-border: #333; - --code-color: #ccc; - --by-name-nav-link-color: var(--color); + --red: #fb4934; + --green: #b8bb26; + --yellow: #fabd2f; + --blue: #83a598; + --purple: #d3869b; + --aqua: #8ec07c; + --gray: #928374; + --orange: #fe8019; - --li-code-background: #373737; - --li-code-color: #999; - --toc-color: #777; - --toc-before-color: #777; - --toc-background: #252525; - --toc-list-border: #ccc; - --spec-summary-hover-background: #ebeff2; - --spec-details-after-background: rgba(0, 4, 15, 0.05); - --spec-details-after-shadow: rgba(204, 204, 204, 0.53); + --red-dim: #cc2412; + --green-dim: #98971a; + --yellow-dim: #d79921; + --blue-dim: #458588; + --purple-dim: #b16286; + --aqua-dim: #689d6a; + --gray-dim: #a89984; + --orange-dim: #d65d0e; - --hljs-link: #999; - --hljs-keyword: #cda869; - --hljs-regexp: #f9ee98; - --hljs-title: #dcdcaa; - --hljs-type: #ac885b; - --hljs-meta: #82aaff; - --hljs-variable: #cf6a4c; + /* odoc colors */ + --odoc-blue: #5c9cf5; + --odoc-bg: #202020; + --odoc-bg1: #252525; + --odoc-fg: #bebebe; + --odoc-fg1: #777; } } +:root { + --main-background: var(--odoc-bg); + --color: var(--odoc-fg); + --anchor-hover: var(--fg1); + --anchor-color: var(--bg2); + --xref-shadow: var(--red-dim); + --xref-unresolved: var(--blue-dim); + --header-shadow: var(--bg3); + --by-name-version-color: var(--bg4); + --by-name-nav-link-color: var(--fg2); + --target-background: color-mix(in srgb, var(--main-background) 70%, var(--odoc-blue) 30%); + --target-border: var(--odoc-blue); + --pre-border-color: var(--fg4); + --link-color: var(--odoc-blue); + --source-link-color: var(--fg4); + + + --toc-color: var(--fg); + --toc-before-color: var(--odoc-fg1); + --toc-background: var(--odoc-bg1); + --toc-list-border: var(--fg1); + + --hljs-bg: var(--code-background); + --hljs-link: var(--fg2); + --source-code-keyword: var(--orange); + --hljs-regexp: var(--yellow); + --hljs-title: var(--yellow-dim); + + --spec-label-color: var(--aqua); + --spec-summary-background: var(--code-background); + --spec-summary-border-color: var(--odoc-blue); + --spec-summary-hover-background: var(--odoc-bg1); + --spec-details-after-background: var(--odoc-bg1); + --spec-details-after-border: var(--fg3); + --search-results-border: var(--fg1); + --search-results-shadow: var(--bg3); + --search-highlight-color: var(--odoc-blue); + --search-snake-color: var(--odoc-blue); + /* code colors */ + --code-color: var(--fg); + --code-background: var(--bg); + --li-code-background: var(--bg); + --li-code-color: var(--fg); + + + --source-line-column: var(--fg3); + --source-line-column-bg: var(--bg_h); + + --source-code-comment: var(--gray); + --source-code-docstring: var(--green-dim); + --source-code-lident: var(--fg1); + --source-code-uident: var(--blue); + --source-code-literal: var(--yellow); + --source-code-keyword: var(--red); + --source-code-underscore: var(--fg3); + --source-code-operator: var(--purple); + --source-code-parens: var(--orange-dim); + --source-code-separator: var(--orange-dim); + + --hljs-variable: var(--yellow); + --hljs-literal: var(--red); + --hljs-name: var(--green-dim); + --hljs-tag: var(--fg4); + --hljs-attr: var(--purple); + --hljs-addition: var(--green-dim); + --hljs-addition-bg: color-mix(in srgb, var(--hljs-addition) 10%, var(--hljs-bg) 90%); + --hljs-deletion: var(--red-dim); + --hljs-deletion-bg: color-mix(in srgb, var(--hljs-deletion) 10%, var(--hljs-bg) 90%); + + + +} + /* Reset a few things. */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { @@ -142,31 +278,109 @@ table { html { font-size: 15px; + scroll-behavior: smooth; } body { text-align: left; - background: #FFFFFF; color: var(--color); background-color: var(--main-background); -} - -body { - max-width: 100ex; - margin-left: calc(10vw + 20ex); - margin-right: 4ex; - margin-top: 20px; - margin-bottom: 50px; font-family: "Noticia Text", Georgia, serif; line-height: 1.5; } -header { +body { + margin-left: auto; + margin-right: auto; + padding: 0 4ex; + margin-top: 0; +} + +body.odoc { + max-width: 181ex; + display: grid; + grid-template-columns: min-content 1fr min-content; + grid-template-areas: + "search-bar nav ." + "toc-global preamble toc-local" + "toc-global content toc-local"; + column-gap: 4ex; + grid-template-rows: auto auto 1fr; +} + +body.odoc:has(> .odoc-search:focus-within) { + grid-template-areas: + "search-bar search-bar search-bar" + ". nav ." + "toc-global preamble toc-local" + "toc-global content toc-local"; +} + +body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) { + grid-template-areas: + "search-bar search-bar" + "nav ." + "preamble toc-local" + "content toc-local"; + grid-template-columns: 1fr min-content; +} + +/* When there is no global sidebar */ +body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) nav.odoc-nav { + padding-top: 0; +} + +/* When there is no global sidebbar and the searchbar is focused */ +body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) nav.odoc-nav:has(+ .odoc-search:focus-within) { + padding-top: var(--search-padding-top); +} + +nav.odoc-nav:has(+ .odoc-search:focus-within) { + padding-top: 0; +} + +body.odoc-src { + display: grid; + grid-template-columns: min-content 1fr; + grid-template-areas: + "search-bar nav " + "toc-global preamble" + "toc-global content "; + column-gap: 4ex; + grid-template-rows: auto auto 1fr; +} + +.odoc-content { + grid-area: content; +} + +.odoc-content > *:first-child { + margin-top: 0; +} + +.odoc-preamble > *:first-child { + /* This make the first thing in the preamble align with the sidebar */ + padding-top: 0; + margin-top: 0; +} + +/* Add margin after the preamble if it contains more than one element. */ +header.odoc-preamble:has(> :nth-child(2)) { margin-bottom: 30px; } +header.odoc-preamble { + grid-area: preamble; +} + nav { - font-family: "Fira Sans", Helvetica, Arial, sans-serif; + font-family: "Fira Sans", sans-serif; +} + +nav.odoc-nav { + grid-area: nav; + padding-top: var(--search-padding-top); + padding-bottom: var(--search-padding-top); } /* Basic markup elements */ @@ -238,15 +452,19 @@ a { color: var(--link-color); } -a:hover { +.odoc-src pre a { + color: inherit; +} + +a:hover:not(.img-link) { box-shadow: 0 1px 0 0 var(--link-color); } /* Linked highlight */ -*:target { +*:target, .current_unit { background-color: var(--target-background) !important; - box-shadow: 0 0px 0 1px var(--target-shadow) !important; border-radius: 1px; + border: var(--target-border) 1px solid !important; } *:hover > a.anchor { @@ -283,24 +501,36 @@ a.anchor { } .xref-unresolved { - color: #2C94BD; + color: var(--xref-unresolved); } .xref-unresolved:hover { box-shadow: 0 1px 0 0 var(--xref-shadow); } +/* Source links float inside preformated text or headings. */ +a.source_link { + float: right; + color: var(--source-link-color); + font-family: "Fira Sans", sans-serif; + font-size: initial; +} + /* Section and document divisions. Until at least 4.03 many of the modules of the stdlib start at .h7, we restart the sequence there like h2 */ h1, h2, h3, h4, h5, h6, .h7, .h8, .h9, .h10 { - font-family: "Fira Sans", Helvetica, Arial, sans-serif; + font-family: "Fira Sans", sans-serif; font-weight: 400; padding-top: 0.1em; line-height: 1.2; overflow-wrap: break-word; } +.odoc-preamble h1 { + margin-top: 10px; +} + h1 { font-weight: 500; font-size: 2.441em; @@ -348,7 +578,7 @@ h4 { font-size: 1.12em; } -/* Comment delimiters, hidden but accessible to screen readers and +/* Comment delimiters, hidden but accessible to screen readers and selected for copy/pasting */ /* Taken from bootstrap */ @@ -368,36 +598,37 @@ h4 { /* Preformatted and code */ tt, code, pre { - font-family: "Fira Mono", courier; + font-family: "Fira Mono", monospace; font-weight: 400; } -pre { +.odoc pre { padding: 0.1em; border: 1px solid var(--pre-border-color); border-radius: 5px; overflow-x: auto; + text-indent: initial; } -p code, -li code { +.odoc p code, +.odoc li code { background-color: var(--li-code-background); color: var(--li-code-color); border-radius: 3px; padding: 0 0.3ex; } -p a > code { +p a > code, li a > code { color: var(--link-color); } -code { +.odoc code { white-space: pre-wrap; } /* Code blocks (e.g. Examples) */ -pre code { +.odoc pre code { font-size: 0.893rem; } @@ -419,6 +650,10 @@ pre code { padding: 0.35em 0.5em; } +.spec .label, .spec .optlabel { + color: var(--spec-label-color); +} + li:not(:last-child) > .def-doc { margin-bottom: 15px; } @@ -434,10 +669,10 @@ div.odoc-spec,.odoc-include { .spec.type .variant, .spec.type .record { margin-left: 2ch; +} + +.spec.type li.variant, .spec.type li.record { list-style: none; - display: flex; - flex-wrap: wrap; - row-gap: 4px; } .spec.type .record > code, .spec.type .variant > code { @@ -454,9 +689,8 @@ div.odoc-spec,.odoc-include { padding: 0.25em 0.5em; margin-left: 10%; border-radius: 3px; - flex-grow:1; background: var(--main-background); - box-shadow: 2px 2px 4px lightgrey; + box-shadow: 1px 1px 2px lightgrey; } div.def { @@ -490,7 +724,7 @@ div.def-doc>*:first-child { bottom: 1px; width: 15px; background: var(--spec-details-after-background, rgba(0, 4, 15, 0.05)); - box-shadow: 0 0px 0 1px var(--spec-details-after-shadow, rgba(204, 204, 204, 0.53)); + box-shadow: 0 0px 0 1px var(--spec-details-after-border, rgba(204, 204, 204, 0.53)); } .odoc-include summary { @@ -506,7 +740,7 @@ div.def-doc>*:first-child { /* FIXME: Does not work in Firefox. */ .odoc-include summary::-webkit-details-marker { - color: #888; + color: #888; /* todo : use color from palette */ transform: scaleX(-1); position: absolute; top: calc(50% - 5px); @@ -536,6 +770,18 @@ td.def-doc *:first-child { .at-tags li { padding-left: 3ex; text-indent: -3ex; } .at-tags .at-tag { text-transform: capitalize } +/* Alert emoji */ + +.alert::before, .deprecated::before { + content: '⚠️ ' / ''; +} + +/* Since emoji */ + +.since::before { + content: '🕚 ' / ''; +} + /* Lists of modules */ .modules { list-style-type: none; margin-left: -3ex; } @@ -570,13 +816,13 @@ td.def-doc *:first-child { /* Odig package page */ -.package nav { +.package nav, h1 nav { display: inline; font-size: 14px; font-weight: normal; } -.package .version { +.package .version, h1 .version { font-size: 14px; } @@ -618,19 +864,49 @@ td.def-doc *:first-child { line-height: 1.2; } +.odoc-toc.odoc-local-toc:has(~ .odoc-global-toc):before { + content: "Local content"; + +} +.odoc-toc.odoc-global-toc:has(~ .odoc-local-toc):before { + content: "Global content"; +} + +/* When a search bar is present, we need the sticky sidebar to be a bit lower, + so `top` is higher */ + +body.odoc:has( .odoc-search) .odoc-toc { + --toc-top: calc(var(--search-bar-height) + 2 * var(--search-padding-top)); + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) +} + +.odoc-tocs { + display: contents; +} + +.odoc-local-toc { + grid-area: toc-local; +} + +.odoc-global-toc { + grid-area: toc-global; +} + .odoc-toc { - position: fixed; - top: 0px; - bottom: 0px; - left: 0px; - max-width: 30ex; - min-width: 26ex; - width: 20%; + --toc-top: 20px; + width: 42ex; background: var(--toc-background); overflow: auto; color: var(--toc-color); padding-left: 2ex; padding-right: 2ex; + height: fit-content; + border: solid 1px var(--border); + border-radius: 5px; + position:sticky; + max-height: calc(100vh - 2 * var(--toc-top)); + top: var(--toc-top) } .odoc-toc ul li a { @@ -638,13 +914,320 @@ td.def-doc *:first-child { font-size: 0.95em; color: var(--color); font-weight: 400; - line-height: 1.6em; + line-height: 1.2em; display: block; } -.odoc-toc ul li a:hover { +.odoc-toc.odoc-global-toc > ul > li { + margin-left:0; +} + +.odoc-toc.odoc-global-toc > ul > li > ul > li { + margin-left:0; + padding-left:0; + border: 0; + margin-top: 10px; + margin-bottom: 10px; +} + +.odoc-toc.odoc-global-toc > ul > li > ul > li { + font-weight: 500; +} + +.odoc-toc.odoc-global-toc > ul > li > ul > li > a { + font-weight: inherit; + font-size: inherit; +} + +.odoc-toc.odoc-global-toc > ul > li > a { + font-size: 1.2em; +} + +:root { + --search-bar-height: 25px; + --search-padding-top: 1rem; +} + +.odoc-search { + position: sticky; + top: 0; + background: var(--main-background); + /* This amounts to fit-content when the search is not active, but when you + have the search results displayed, you do not want the height of the search + container to change. */ + height: calc(var(--search-bar-height) + 2 * var(--search-padding-top)); + width: 100%; + padding-top: var(--search-padding-top); + padding-bottom: var(--search-padding-top); + z-index: 1; + grid-area: search-bar; + +} + + +.odoc-search .search-inner { + width: 100%; + position: relative; + left: 0; + display: grid; + /* The second column is for the search snake, which has 0 width */ + grid-template-columns: 1fr 0fr; + grid-row-gap: 1rem; + /* The second row is for the search results. It has a width, but only */ + grid-template-rows: min-content 0px; + background: transparent; +} + +.odoc-search .search-bar { + position: relative; + z-index: 2; + font-size: 1em; + transition: font-size 0.3s; + box-shadow: 0px 0px 0.2rem 0.3em var(--main-background); + height: var(--search-bar-height); + border: 1px solid var(--fg4); + /* inputs are of fixed size by default, even if you display:block them */ + width: 100%; + color: var(--odoc-fg); + background: var(--odoc-bg1); + border-radius: 5px; + outline: none; +} + +.odoc-search:focus-within { + width: 100%; +} + +.odoc-search:focus-within .search-bar { + font-size: 1.1em; + border-color: var(--search-highlight-color); +} + +.search-bar:focus-visible { + outline: 2px solid var(--search-highlight-color); +} + +.search-bar::placeholder { + color: var(--fg3); +} + +.odoc-search:not(:focus-within) .search-result { + display: none; +} + +.odoc-search .search-result:empty { + display: none; +} + +.odoc-search .search-result { + grid-row: 2; + background: var(--toc-background); + position: absolute; + left: 0; + right: 0; + border: solid; + border-color: var(--search-results-border); + border-width: 1px; + border-radius: 6px; + box-shadow: 0 3px 10px 2px var(--search-results-shadow), 0 0 3px 4px var(--main-background), 0px -1rem 0px 0px var(--main-background); + /* Works better on smallish screens with this */ + max-height: calc(min(40rem, 50vh)); + overflow-y: auto; +} + + +.odoc-search .search-no-result { + color: var(--color); + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 10px; + padding-right: 0.5rem; +} + +.search-bar-container { + display: flex; + align-items: stretch; + border-bottom: 1rem solid var(--main-background); +} + +.search-snake { + grid-row: 1; + grid-column: 2; + display: flex; + align-items: center; + width: 0; + z-index: 2; + position: relative; + left: 0; + margin-top: 4px; + margin-bottom: 4px; + /* Otherwise the search snake flickers for very fast searches. */ + transition: opacity 0.2s; + opacity: 0; +} + +.search-snake.search-busy { + opacity: 1; +} + +.search-snake:before { + content: " "; + display: block; + aspect-ratio: 1 / 1; + height: 100%; + margin-right: 4px; + border-radius: 50%; + border: 3px solid #aaa; + border-color: var(--search-snake-color) transparent var(--search-snake-color) transparent; + animation: search-snake 1.2s linear infinite; + position: absolute; + right: 0; +} + +@keyframes search-snake { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } +} + +:root { + --kind-font-size-factor: 0.8; +} + +.odoc-search .search-entry { + color: var(--color); + display: grid; + /* Possible kinds are the following : + "doc" "type" "mod" "exn" "class" "meth" "cons" "sig" "cons" "field" "val" + and "ext". + As the longest is 5 characters (and the font monospace), we give 5 + character size to the column. However the font used for kind is a little + smaller, so we adjust by this factor. + */ + grid-template-columns: [kinds] calc(var(--kind-font-size-factor) * 5ch) [titles] 1fr; + column-gap: 0.5rem; + border-bottom: var(--search-results-border) solid 1px; + background-color: inherit; + outline: 0; + padding: 0.4rem 0.4rem 0.7rem 0.7rem; +} +.odoc-search .search-entry p { + margin: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.odoc-search .search-result .search-entry:focus-visible { box-shadow: none; - text-decoration: underline; + background-color: var(--target-background); +} + +.odoc-search .search-entry:hover { + box-shadow: none; + background-color: var(--main-background); +} + +.odoc-search .search-entry .entry-kind { + grid-row: 1/2; + grid-column: 1/2; + line-height: 1.4rem; + font-size: calc(var(--kind-font-size-factor) * 1em); + font-weight: bold; + text-align: right; + position: relative; + bottom: 0; +} + +.odoc-search .search-entry pre { + border: none; + margin: 0; +} + +.odoc-search .search-entry pre code { + font-size: 1em; + background-color: var(--code-background); + color: var(--code-color); + border-radius: 3px; + padding: 0 0.3ex; +} + +.odoc-search .search-entry .entry-title { + width: 100%; + display: block; + grid-column: 2/2; + grid-row: 1/2; + align-self: end; + line-height: 1.4rem; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.odoc-search .entry-name { + font-weight: bold; +} + +.odoc-search .prefix-name { + font-weight: bold; +} + +.odoc-search .search-entry .prefix-name { + opacity: 0.7; +} + +.odoc-search .entry-rhs { + white-space: nowrap; +} + +.odoc-search .search-entry .entry-content { + flex-grow: 1; + flex-shrink: 1; + min-width: 0; +} + +.odoc-search .search-entry .entry-comment { + max-height: 1.5em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 0.95em; + grid-row: 2/2; + grid-column: 2/2; +} + +.odoc-search .search-entry .entry-comment ul { + white-space: nowrap; + display: inline; +} + +.odoc-search .search-entry .entry-comment li { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment ul>li::before { + content: '•'; +} + +.odoc-search .search-entry .entry-comment div { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment p { + display: inline; + white-space: nowrap; +} + +.odoc-search .search-entry .entry-comment code { + display: inline; + white-space: nowrap; } /* First level titles */ @@ -653,8 +1236,9 @@ td.def-doc *:first-child { font-weight: 500; } -.odoc-toc li ul { +.odoc-toc ul li ul { margin: 0px; + padding-top: 0.25em; } .odoc-toc ul { @@ -662,9 +1246,11 @@ td.def-doc *:first-child { } .odoc-toc ul li { - margin: 0; + padding: 0.25em 0; } + .odoc-toc>ul>li { + margin-left: 0; margin-bottom: 0.3em; } @@ -674,17 +1260,111 @@ td.def-doc *:first-child { padding-left: 12px; } +/* Tables */ + +.odoc-table { + margin: 1em; +} + +.odoc-table td, +.odoc-table th { + padding-left: 0.5em; + padding-right: 0.5em; + border: 1px solid black; +} + +.odoc-table th { + font-weight: bold; +} + /* Mobile adjustements. */ -@media only screen and (max-width: 95ex) { +@media only screen and (max-width: 210ex) { + body.odoc { + max-width: 132ex; + grid-template-areas: + "search-bar nav" + "sidebar preamble" + "sidebar content"; + } + body.odoc .odoc-tocs { + display: flex; + grid-area: sidebar; + flex-direction : column; + gap: 20px; + } + body.odoc .odoc-tocs .odoc-toc { + position: unset; + max-height: unset; + } + body.odoc:has(.odoc-search:focus-within) { + grid-template-areas: + "search-bar search-bar" + ". nav" + "sidebar preamble" + "sidebar content"; + } + body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) { + grid-template-areas: + "search-bar nav" + "sidebar preamble" + "sidebar content"; + grid-template-columns: min-content 1fr; + } +} + +@media only screen and (max-width: 110ex) { body.odoc { margin: 2em; + padding: 0; + grid-template-areas: + "search-bar" + "nav" + "preamble" + "toc-local" + "content" + "toc-global"; + grid-template-columns: 1fr; } - .odoc-toc { + body.odoc:has(> .odoc-search:focus-within) { + /* This is the same as when there is no focus on the search bar, this is + just to prevent the default "wide layout" rule from changing anything. */ + grid-template-areas: + "search-bar" + "nav" + "preamble" + "toc-local" + "content" + "toc-global"; + grid-template-columns: 1fr; + } + body.odoc:not(:has(> .odoc-tocs .odoc-global-toc)) { + grid-template-areas: + "search-bar" + "nav" + "preamble" + "toc-local" + "content" + "toc-global"; + grid-template-columns: 1fr; + } + body.odoc .odoc-search { + position: relative; + height: calc(var(--search-bar-height) + 2 * var(--search-padding-top)); + } + body.odoc nav.odoc-nav { + padding-top: 0; + padding-bottom: var(--search-padding-top); + } + body.odoc .odoc-tocs { + display: contents; + } + body.odoc .odoc-tocs .odoc-toc { position: static; width: auto; min-width: unset; max-width: unset; + max-height: unset; border: none; padding: 0.2em 1em; border-radius: 5px; @@ -699,11 +1379,56 @@ td.def-doc *:first-child { color: black; background: white; } + body nav:first-child { visibility: hidden; } } +/* Source code. */ + +.source_container { + display: flex; + grid-area: content; + margin-top: 0; +} + +.source_line_column { + padding-right: 0.5em; + text-align: right; + color: var(--source-line-column); + background: var(--source-line-column-bg); +} + +.source_line { + padding: 0 1em; +} + +.source_code { + flex-grow: 1; + background: var(--code-background); + padding: 0 0.3em; + color: var(--code-color); +} + +/* Source directories */ + +.odoc-directory::before { + content: "📁"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-file::before { + content: "📄"; + margin: 0.3em; + font-size: 1.3em; +} + +.odoc-folder-list { + list-style: none; +} + /* Syntax highlighting (based on github-gist) */ .hljs { @@ -716,7 +1441,7 @@ td.def-doc *:first-child { .hljs-comment, .hljs-meta { - color: #969896; + color: var(--source-code-comment); } .hljs-string, @@ -724,35 +1449,35 @@ td.def-doc *:first-child { .hljs-template-variable, .hljs-strong, .hljs-emphasis, -.hljs-quote { - color: #df5000; +.hljs-quote, +.hljs-literal { + color: var(--source-code-literal); } .hljs-keyword, .hljs-selector-tag { - color: #a71d5d; + color: var(--source-code-keyword); } .hljs-type, .hljs-class .hljs-title { - color: #458; + color: var(--source-code-uident); font-weight: 500; } -.hljs-literal, .hljs-symbol, .hljs-bullet, .hljs-attribute { - color: #0086b3; + color: var(--hljs-literal); } .hljs-section, .hljs-name { - color: #63a35c; + color: var(--hljs-name); } .hljs-tag { - color: #333333; + color: var(--hljs-tag); } .hljs-attr, @@ -760,23 +1485,131 @@ td.def-doc *:first-child { .hljs-selector-class, .hljs-selector-attr, .hljs-selector-pseudo { - color: #795da3; + color: var(--hljs-attr); } .hljs-addition { - color: #55a532; - background-color: #eaffea; + color: var(--hljs-addition); + background-color: var(--hljs-addition-bg); } .hljs-deletion { - color: #bd2c00; - background-color: #ffecec; + color: var(--hljs-deletion); + background-color: var(--hljs-deletion-bg); } .hljs-link { text-decoration: underline; } +/* Keywords */ +.AND, .ANDOP, .AS, .ASSERT, +.BAR, .BEGIN, +.CLASS, .CONSTRAINT, +.DO, .DONE, .DOWNTO, +.ELSE, .END, .EXCEPTION, .EXTERNAL, +.FOR, .FUN, .FUNCTION, .FUNCTOR, +.IF, .IN, .INCLUDE, .INHERIT, .INITIALIZER, +.LAZY, .LESSMINUS, .LET, .LETOP, +.MATCH, .METHOD, .MINUSGREATER, .MODULE, .MUTABLE, +.NEW, .NONREC, +.OBJECT, .OF, .OPEN, +.PERCENT, .PRIVATE, +.REC, +.SEMISEMI, .SIG, .STRUCT, +.THEN, .TO, .TRY, .TYPE, +.VAL, .VIRTUAL, +.WHEN, .WITH, .WHILE +{ + color: var(--source-code-keyword);; +} + +/* Separators */ +.COMMA, .COLON, .COLONGREATER, .SEMI { + color: var(--source-code-separator); +} + +/* Parens + `begin` and `end ` are excluded because `end` is used in other, more + keyword-y contexts*/ +.BARRBRACKET, +.LBRACE, +.LBRACELESS, +.LBRACKET, +.LBRACKETAT, +.LBRACKETATAT, +.LBRACKETATATAT, +.LBRACKETBAR, +.LBRACKETGREATER, +.LBRACKETLESS, +.LBRACKETPERCENT, +.LBRACKETPERCENTPERCENT, +.LPAREN, +.RBRACE, +.RBRACKET, +.RPAREN +{ + color: var(--source-code-parens); +} + +/* Prefix operators */ +.ASSERT, .BANG, .PREFIXOP, +/* Infix operators. + A choice had to be made for equal `=` which is both a keyword and an operator. + It looked better having it as an operator, because when it is a keyword, + there are already loads of keyword around. + It would look even nicer if there was a way to distinguish between these + two cases.*/ +.INFIXOP0, .INFIXOP1, .INFIXOP2, .INFIXOP3, .INFIXOP4, +.BARBAR, .PLUS, .STAR, .AMPERAMPER, .AMPERAND, .COLONEQUAL, .GREATER, .LESS, +.MINUS, .MINUSDOT, .MINUSGREATER, .OR, .PLUSDOT, .PLUSEQ, .EQUAL +{ + color: var(--source-code-operator); +} + +/* Upper case ident + `true` and `false` are considered uident here, because you can bind them in a + constructor defintion : + ```ocaml + type my_bool = + | true of string + | false + | Other of int + ``` +*/ +.UIDENT, .COLONCOLON, .TRUE, .FALSE { + color: var(--source-code-uident); + +} + +/* Lower case idents. + Quotes are here because of `type 'a t = 'a list`, + and question mark and tildes because of + ```ocaml + let f ~a ?b () = Option.map a b + ``` +*/ +.LIDENT, .QUESTION, .QUOTE, .TILDE { + color: var(--source-code-lident); +} + +/* Litterals */ + .STRING, .CHAR, .INT, .FLOAT, .QUOTED_STRING_EXPR, .QUOTED_STRING_ITEM { + color: var(--source-code-literal); +} + +.UNDERSCORE { + color: var(--source-code-underscore); +} + +.DOCSTRING { + color: var(--source-code-docstring); +} + +.COMMENT { + color: var(--source-code-comment); +} + /*--------------------------------------------------------------------------- Copyright (c) 2016 The odoc contributors diff --git a/odoc_search.js b/odoc_search.js new file mode 100644 index 0000000..79b86bd --- /dev/null +++ b/odoc_search.js @@ -0,0 +1,150 @@ +/* The browsers interpretation of the CORS origin policy prevents to run + webworkers from javascript files fetched from the file:// protocol. This hack + is to workaround this restriction. */ +function createWebWorker() { + var searchs = search_urls.map((search_url) => { + let parts = document.location.href.split("/"); + parts[parts.length - 1] = search_url; + return '"' + parts.join("/") + '"'; + }); + blobContents = ["importScripts(" + searchs.join(",") + ");"]; + var blob = new Blob(blobContents, { type: "application/javascript" }); + var blobUrl = URL.createObjectURL(blob); + + var worker = new Worker(blobUrl); + URL.revokeObjectURL(blobUrl); + + return worker; +} + +var worker; +var waiting = 0; + +function wait() { + waiting = waiting + 1; + document.querySelector(".search-snake").classList.add("search-busy"); +} + +function stop_waiting() { + if (waiting > 0) waiting = waiting - 1; + else waiting = 0; + if (waiting == 0) { + document.querySelector(".search-snake").classList.remove("search-busy"); + } +} + +document.querySelector(".search-bar").addEventListener("focus", (ev) => { + if (typeof worker == "undefined") { + worker = createWebWorker(); + worker.onmessage = (e) => { + stop_waiting(); + let results = e.data; + let search_results = document.querySelector(".search-result"); + search_results.innerHTML = ""; + let f = (entry) => { + let search_result = document.createElement("a"); + search_result.classList.add("search-entry"); + search_result.href = base_url + entry.url; + search_result.innerHTML = entry.html; + search_results.appendChild(search_result); + }; + results.forEach(f); + let search_request = document.querySelector(".search-bar").value; + if (results.length == 0 && search_request != "") { + let no_result = document.createElement("div"); + no_result.classList.add("search-no-result"); + no_result.innerText = "No result..."; + search_results.appendChild(no_result); + } + }; + } +}); + +document.querySelector(".search-bar").addEventListener("input", (ev) => { + wait(); + worker.postMessage(ev.target.value); +}); + + +/** Navigation */ + +let search_result_elt = document.querySelector(".search-result") + +function search_results() { + return search_result_elt.children; +} + +function enter_search() { + document.querySelector(".search-bar").focus(); +} + +function escape_search() { + document.activeElement.blur() +} + +function focus_previous_result() { + let results = Array.from(search_results()); + let current_focus = results.findIndex((elt) => (document.activeElement === elt)); + if (current_focus === -1) + return; + else if (current_focus === 0) + enter_search(); + else + results[current_focus - 1].focus(); +} + +function focus_next_result() { + let results = Array.from(search_results()); + if (results.length === 0) return; + let current_focus = results.findIndex((elt) => (document.activeElement === elt)); + if (current_focus === -1) + results[0].focus(); + else if (current_focus + 1 === results.length) + return; + else + results[current_focus + 1].focus(); +} + + +function is_searching() { + return (document.querySelectorAll(".odoc-search:focus-within").length > 0); +} + +function is_typing() { + return (document.activeElement === document.querySelector(".search-bar")); +} + +function handle_key_down(event) { + if (is_searching()) { + if (event.key === "ArrowUp") { + event.preventDefault(); + focus_previous_result(); + } + if (event.key === "ArrowDown") { + event.preventDefault(); + focus_next_result(); + } + if (event.key === "Escape") { + event.preventDefault(); + escape_search(); + } + } + if (!(is_typing())) { + let ascii = event.key.charCodeAt(0); + if (event.key === "/") { + event.preventDefault(); + enter_search(); + } + else if ( is_searching() + && event.key.length === 1 + && ( (ascii >= 65 && ascii <= 90) // lowercase letter + || (ascii >= 97 && ascii <= 122) // uppercase letter + || (ascii >= 48 && ascii <= 57) // numbers + || (ascii >= 32 && ascii <= 46) // ` ` to `.` + || (ascii >= 58 && ascii <= 64)) // `:` to `@` + ) + // We do not prevent default because we want the char to be added to the input + enter_search (); + } +} +document.addEventListener("keydown", handle_key_down); diff --git a/ppx_trace/Ppx_trace/index.html b/ppx_trace/Ppx_trace/index.html index 103791b..9575e86 100644 --- a/ppx_trace/Ppx_trace/index.html +++ b/ppx_trace/Ppx_trace/index.html @@ -1,14 +1,14 @@ -Ppx_trace (ppx_trace.Ppx_trace)

    Module Ppx_trace

    val location_errorf : - loc:Ocaml_common.Location.t -> +Ppx_trace (ppx_trace.Ppx_trace)

    Module Ppx_trace

    val location_errorf : + loc:Ocaml_common.Location.t -> ('a, Stdlib.Format.formatter, unit, 'b) format4 -> - 'c

    let expression

    val expand_let : - ctxt:Ppxlib.Expansion_context.Extension.t -> + 'a

    let expression

    val extension_let : Ppxlib.Extension.V3.t

    Toplevel binding

    val extension_top_let : Ppxlib.Extension.V3.t
    val rule_top_let : Ppxlib.Context_free.Rule.t
    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item
    val extension_top_let : Ppxlib.Extension.V3.t
    val rule_top_let : Ppxlib.Context_free.Rule.t
    diff --git a/ppx_trace/index.html b/ppx_trace/index.html index 18851b5..4491eb3 100644 --- a/ppx_trace/index.html +++ b/ppx_trace/index.html @@ -1,2 +1,2 @@ -index (ppx_trace.index)

    Package ppx_trace

    Package info

    changes-files
    readme-files
    \ No newline at end of file +index (ppx_trace.index)

    Package ppx_trace

    Package info

    changes-files
    readme-files
    diff --git a/ppxlib/Astlib/Ast_408/Asttypes/index.html b/ppxlib/Astlib/Ast_408/Asttypes/index.html index 17f637d..df4f396 100644 --- a/ppxlib/Astlib/Ast_408/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_408/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_408.Asttypes)

    Module Ast_408.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_408.Asttypes)

    Module Ast_408.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    diff --git a/ppxlib/Astlib/Ast_408/Config/index.html b/ppxlib/Astlib/Ast_408/Config/index.html index e1d69eb..5e98578 100644 --- a/ppxlib/Astlib/Ast_408/Config/index.html +++ b/ppxlib/Astlib/Ast_408/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_408.Config)

    Module Ast_408.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_408.Config)

    Module Ast_408.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_408/Parsetree/index.html b/ppxlib/Astlib/Ast_408/Parsetree/index.html index f29cc00..592c924 100644 --- a/ppxlib/Astlib/Ast_408/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_408/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_408.Parsetree)

    Module Ast_408.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * string option
    4. | Pconst_float of string * char option

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : Location.t list;
    4. ptyp_attributes : attributes;
    }
    and typ = core_type
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_408.Parsetree)

      Module Ast_408.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * string option
      4. | Pconst_float of string * char option

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : Location.t list;
      4. ptyp_attributes : attributes;
      }
      and typ = core_type
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : Location.t list;
      4. ppat_attributes : attributes;
      }
      and pat = pattern
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
      8. | Ppat_variant of Asttypes.label * pattern option
      9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      10. | Ppat_array of pattern list
      11. | Ppat_or of pattern * pattern
      12. | Ppat_constraint of pattern * core_type
      13. | Ppat_type of Longident.t Asttypes.loc
      14. | Ppat_lazy of pattern
      15. | Ppat_unpack of string Asttypes.loc
      16. | Ppat_exception of pattern
      17. | Ppat_extension of extension
      18. | Ppat_open of Longident.t Asttypes.loc * pattern
      and expression = {
      1. pexp_desc : expression_desc;
      2. pexp_loc : Location.t;
      3. pexp_loc_stack : Location.t list;
      4. pexp_attributes : attributes;
      }
      and expr = expression
      and expression_desc =
      1. | Pexp_ident of Longident.t Asttypes.loc
      2. | Pexp_constant of constant
      3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      4. | Pexp_function of cases
      5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      7. | Pexp_match of expression * cases
      8. | Pexp_try of expression * cases
      9. | Pexp_tuple of expression list
      10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      11. | Pexp_variant of Asttypes.label * expression option
      12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      13. | Pexp_field of expression * Longident.t Asttypes.loc
      14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      15. | Pexp_array of expression list
      16. | Pexp_ifthenelse of expression * expression * expression option
      17. | Pexp_sequence of expression * expression
      18. | Pexp_while of expression * expression
      19. | Pexp_for of pattern @@ -16,4 +16,4 @@ * Asttypes.mutable_flag * class_field_kind
      20. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      21. | Pcf_constraint of core_type * core_type
      22. | Pcf_initializer of expression
      23. | Pcf_attribute of attribute
      24. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_open of open_description
      11. | Psig_include of include_description
      12. | Psig_class of class_description list
      13. | Psig_class_type of class_type_declaration list
      14. | Psig_attribute of attribute
      15. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_open of open_description
    11. | Psig_include of include_description
    12. | Psig_class of class_description list
    13. | Psig_class_type of class_type_declaration list
    14. | Psig_attribute of attribute
    15. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_408/index.html b/ppxlib/Astlib/Ast_408/index.html index f113627..7f33000 100644 --- a/ppxlib/Astlib/Ast_408/index.html +++ b/ppxlib/Astlib/Ast_408/index.html @@ -1,2 +1,2 @@ -Ast_408 (ppxlib.Astlib.Ast_408)

    Module Astlib.Ast_408

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_408 (ppxlib.Astlib.Ast_408)

    Module Astlib.Ast_408

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_409/Asttypes/index.html b/ppxlib/Astlib/Ast_409/Asttypes/index.html index 8c5f8b3..93d80fa 100644 --- a/ppxlib/Astlib/Ast_409/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_409/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_409.Asttypes)

    Module Ast_409.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_409.Asttypes)

    Module Ast_409.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    diff --git a/ppxlib/Astlib/Ast_409/Config/index.html b/ppxlib/Astlib/Ast_409/Config/index.html index f9ba92d..293535a 100644 --- a/ppxlib/Astlib/Ast_409/Config/index.html +++ b/ppxlib/Astlib/Ast_409/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_409.Config)

    Module Ast_409.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_409.Config)

    Module Ast_409.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_409/Parsetree/index.html b/ppxlib/Astlib/Ast_409/Parsetree/index.html index f340f66..c318d3a 100644 --- a/ppxlib/Astlib/Ast_409/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_409/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_409.Parsetree)

    Module Ast_409.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * string option
    4. | Pconst_float of string * char option

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : Location.t list;
    4. ptyp_attributes : attributes;
    }
    and typ = core_type
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_409.Parsetree)

      Module Ast_409.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * string option
      4. | Pconst_float of string * char option

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : Location.t list;
      4. ptyp_attributes : attributes;
      }
      and typ = core_type
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : Location.t list;
      4. ppat_attributes : attributes;
      }
      and pat = pattern
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
      8. | Ppat_variant of Asttypes.label * pattern option
      9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      10. | Ppat_array of pattern list
      11. | Ppat_or of pattern * pattern
      12. | Ppat_constraint of pattern * core_type
      13. | Ppat_type of Longident.t Asttypes.loc
      14. | Ppat_lazy of pattern
      15. | Ppat_unpack of string Asttypes.loc
      16. | Ppat_exception of pattern
      17. | Ppat_extension of extension
      18. | Ppat_open of Longident.t Asttypes.loc * pattern
      and expression = {
      1. pexp_desc : expression_desc;
      2. pexp_loc : Location.t;
      3. pexp_loc_stack : Location.t list;
      4. pexp_attributes : attributes;
      }
      and expr = expression
      and expression_desc =
      1. | Pexp_ident of Longident.t Asttypes.loc
      2. | Pexp_constant of constant
      3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      4. | Pexp_function of cases
      5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      7. | Pexp_match of expression * cases
      8. | Pexp_try of expression * cases
      9. | Pexp_tuple of expression list
      10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      11. | Pexp_variant of Asttypes.label * expression option
      12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      13. | Pexp_field of expression * Longident.t Asttypes.loc
      14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      15. | Pexp_array of expression list
      16. | Pexp_ifthenelse of expression * expression * expression option
      17. | Pexp_sequence of expression * expression
      18. | Pexp_while of expression * expression
      19. | Pexp_for of pattern @@ -16,4 +16,4 @@ * Asttypes.mutable_flag * class_field_kind
      20. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      21. | Pcf_constraint of core_type * core_type
      22. | Pcf_initializer of expression
      23. | Pcf_attribute of attribute
      24. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_open of open_description
      11. | Psig_include of include_description
      12. | Psig_class of class_description list
      13. | Psig_class_type of class_type_declaration list
      14. | Psig_attribute of attribute
      15. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of string Asttypes.loc * module_type option * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_open of open_description
    11. | Psig_include of include_description
    12. | Psig_class of class_description list
    13. | Psig_class_type of class_type_declaration list
    14. | Psig_attribute of attribute
    15. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of string Asttypes.loc * module_type option * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_409/index.html b/ppxlib/Astlib/Ast_409/index.html index d3133c9..e6dc4e0 100644 --- a/ppxlib/Astlib/Ast_409/index.html +++ b/ppxlib/Astlib/Ast_409/index.html @@ -1,2 +1,2 @@ -Ast_409 (ppxlib.Astlib.Ast_409)

    Module Astlib.Ast_409

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_409 (ppxlib.Astlib.Ast_409)

    Module Astlib.Ast_409

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_410/Asttypes/index.html b/ppxlib/Astlib/Ast_410/Asttypes/index.html index 113d6b9..47758ba 100644 --- a/ppxlib/Astlib/Ast_410/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_410/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_410.Asttypes)

    Module Ast_410.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_410.Asttypes)

    Module Ast_410.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    diff --git a/ppxlib/Astlib/Ast_410/Config/index.html b/ppxlib/Astlib/Ast_410/Config/index.html index 0e0c776..513d5be 100644 --- a/ppxlib/Astlib/Ast_410/Config/index.html +++ b/ppxlib/Astlib/Ast_410/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_410.Config)

    Module Ast_410.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_410.Config)

    Module Ast_410.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_410/Parsetree/index.html b/ppxlib/Astlib/Ast_410/Parsetree/index.html index d31777f..1da3d88 100644 --- a/ppxlib/Astlib/Ast_410/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_410/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_410.Parsetree)

    Module Ast_410.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * string option
    4. | Pconst_float of string * char option
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
    }
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_410.Parsetree)

      Module Ast_410.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * string option
      4. | Pconst_float of string * char option
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
      }
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : location_stack;
      4. ppat_attributes : attributes;
      }
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
      8. | Ppat_variant of Asttypes.label * pattern option
      9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      10. | Ppat_array of pattern list
      11. | Ppat_or of pattern * pattern
      12. | Ppat_constraint of pattern * core_type
      13. | Ppat_type of Longident.t Asttypes.loc
      14. | Ppat_lazy of pattern
      15. | Ppat_unpack of string option Asttypes.loc
      16. | Ppat_exception of pattern
      17. | Ppat_extension of extension
      18. | Ppat_open of Longident.t Asttypes.loc * pattern
      and expression = {
      1. pexp_desc : expression_desc;
      2. pexp_loc : Location.t;
      3. pexp_loc_stack : location_stack;
      4. pexp_attributes : attributes;
      }
      and expression_desc =
      1. | Pexp_ident of Longident.t Asttypes.loc
      2. | Pexp_constant of constant
      3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      4. | Pexp_function of case list
      5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      7. | Pexp_match of expression * case list
      8. | Pexp_try of expression * case list
      9. | Pexp_tuple of expression list
      10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      11. | Pexp_variant of Asttypes.label * expression option
      12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      13. | Pexp_field of expression * Longident.t Asttypes.loc
      14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      15. | Pexp_array of expression list
      16. | Pexp_ifthenelse of expression * expression * expression option
      17. | Pexp_sequence of expression * expression
      18. | Pexp_while of expression * expression
      19. | Pexp_for of pattern @@ -16,4 +16,4 @@ * Asttypes.mutable_flag * class_field_kind
      20. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      21. | Pcf_constraint of core_type * core_type
      22. | Pcf_initializer of expression
      23. | Pcf_attribute of attribute
      24. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of functor_parameter * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and functor_parameter =
      1. | Unit
      2. | Named of string option Asttypes.loc * module_type
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_open of open_description
      11. | Psig_include of include_description
      12. | Psig_class of class_description list
      13. | Psig_class_type of class_type_declaration list
      14. | Psig_attribute of attribute
      15. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string option Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of functor_parameter * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string option Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of functor_parameter * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and functor_parameter =
    1. | Unit
    2. | Named of string option Asttypes.loc * module_type
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_open of open_description
    11. | Psig_include of include_description
    12. | Psig_class of class_description list
    13. | Psig_class_type of class_type_declaration list
    14. | Psig_attribute of attribute
    15. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of functor_parameter * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_410/index.html b/ppxlib/Astlib/Ast_410/index.html index a085a0e..d5e8181 100644 --- a/ppxlib/Astlib/Ast_410/index.html +++ b/ppxlib/Astlib/Ast_410/index.html @@ -1,2 +1,2 @@ -Ast_410 (ppxlib.Astlib.Ast_410)

    Module Astlib.Ast_410

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_410 (ppxlib.Astlib.Ast_410)

    Module Astlib.Ast_410

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_411/Asttypes/index.html b/ppxlib/Astlib/Ast_411/Asttypes/index.html index 03d4aaa..bc2de7a 100644 --- a/ppxlib/Astlib/Ast_411/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_411/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_411.Asttypes)

    Module Ast_411.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_411.Asttypes)

    Module Ast_411.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | Invariant
    diff --git a/ppxlib/Astlib/Ast_411/Config/index.html b/ppxlib/Astlib/Ast_411/Config/index.html index 117ff8a..4fb2024 100644 --- a/ppxlib/Astlib/Ast_411/Config/index.html +++ b/ppxlib/Astlib/Ast_411/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_411.Config)

    Module Ast_411.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_411.Config)

    Module Ast_411.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_411/Parsetree/index.html b/ppxlib/Astlib/Ast_411/Parsetree/index.html index efb18ac..34b23f4 100644 --- a/ppxlib/Astlib/Ast_411/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_411/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_411.Parsetree)

    Module Ast_411.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * Location.t * string option
    4. | Pconst_float of string * char option
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
    }
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_411.Parsetree)

      Module Ast_411.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * Location.t * string option
      4. | Pconst_float of string * char option
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
      }
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : location_stack;
      4. ppat_attributes : attributes;
      }
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
      8. | Ppat_variant of Asttypes.label * pattern option
      9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      10. | Ppat_array of pattern list
      11. | Ppat_or of pattern * pattern
      12. | Ppat_constraint of pattern * core_type
      13. | Ppat_type of Longident.t Asttypes.loc
      14. | Ppat_lazy of pattern
      15. | Ppat_unpack of string option Asttypes.loc
      16. | Ppat_exception of pattern
      17. | Ppat_extension of extension
      18. | Ppat_open of Longident.t Asttypes.loc * pattern
      and expression = {
      1. pexp_desc : expression_desc;
      2. pexp_loc : Location.t;
      3. pexp_loc_stack : location_stack;
      4. pexp_attributes : attributes;
      }
      and expression_desc =
      1. | Pexp_ident of Longident.t Asttypes.loc
      2. | Pexp_constant of constant
      3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      4. | Pexp_function of case list
      5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      7. | Pexp_match of expression * case list
      8. | Pexp_try of expression * case list
      9. | Pexp_tuple of expression list
      10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      11. | Pexp_variant of Asttypes.label * expression option
      12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      13. | Pexp_field of expression * Longident.t Asttypes.loc
      14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      15. | Pexp_array of expression list
      16. | Pexp_ifthenelse of expression * expression * expression option
      17. | Pexp_sequence of expression * expression
      18. | Pexp_while of expression * expression
      19. | Pexp_for of pattern @@ -16,4 +16,4 @@ * Asttypes.mutable_flag * class_field_kind
      20. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      21. | Pcf_constraint of core_type * core_type
      22. | Pcf_initializer of expression
      23. | Pcf_attribute of attribute
      24. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of functor_parameter * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and functor_parameter =
      1. | Unit
      2. | Named of string option Asttypes.loc * module_type
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_open of open_description
      11. | Psig_include of include_description
      12. | Psig_class of class_description list
      13. | Psig_class_type of class_type_declaration list
      14. | Psig_attribute of attribute
      15. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string option Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of functor_parameter * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string option Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of functor_parameter * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and functor_parameter =
    1. | Unit
    2. | Named of string option Asttypes.loc * module_type
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_open of open_description
    11. | Psig_include of include_description
    12. | Psig_class of class_description list
    13. | Psig_class_type of class_type_declaration list
    14. | Psig_attribute of attribute
    15. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of functor_parameter * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_411/index.html b/ppxlib/Astlib/Ast_411/index.html index 7b33a20..d8ab0ef 100644 --- a/ppxlib/Astlib/Ast_411/index.html +++ b/ppxlib/Astlib/Ast_411/index.html @@ -1,2 +1,2 @@ -Ast_411 (ppxlib.Astlib.Ast_411)

    Module Astlib.Ast_411

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_411 (ppxlib.Astlib.Ast_411)

    Module Astlib.Ast_411

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_412/Asttypes/index.html b/ppxlib/Astlib/Ast_412/Asttypes/index.html index dd554c4..be4b455 100644 --- a/ppxlib/Astlib/Ast_412/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_412/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_412.Asttypes)

    Module Ast_412.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_412.Asttypes)

    Module Ast_412.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_412/Config/index.html b/ppxlib/Astlib/Ast_412/Config/index.html index c2be6b2..0bb96b1 100644 --- a/ppxlib/Astlib/Ast_412/Config/index.html +++ b/ppxlib/Astlib/Ast_412/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_412.Config)

    Module Ast_412.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_412.Config)

    Module Ast_412.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_412/Parsetree/index.html b/ppxlib/Astlib/Ast_412/Parsetree/index.html index 449d859..26d41d1 100644 --- a/ppxlib/Astlib/Ast_412/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_412/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_412.Parsetree)

    Module Ast_412.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * Location.t * string option
    4. | Pconst_float of string * char option
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
    }
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_412.Parsetree)

      Module Ast_412.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * Location.t * string option
      4. | Pconst_float of string * char option
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
      }
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : location_stack;
      4. ppat_attributes : attributes;
      }
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc * pattern option
      8. | Ppat_variant of Asttypes.label * pattern option
      9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      10. | Ppat_array of pattern list
      11. | Ppat_or of pattern * pattern
      12. | Ppat_constraint of pattern * core_type
      13. | Ppat_type of Longident.t Asttypes.loc
      14. | Ppat_lazy of pattern
      15. | Ppat_unpack of string option Asttypes.loc
      16. | Ppat_exception of pattern
      17. | Ppat_extension of extension
      18. | Ppat_open of Longident.t Asttypes.loc * pattern
      and expression = {
      1. pexp_desc : expression_desc;
      2. pexp_loc : Location.t;
      3. pexp_loc_stack : location_stack;
      4. pexp_attributes : attributes;
      }
      and expression_desc =
      1. | Pexp_ident of Longident.t Asttypes.loc
      2. | Pexp_constant of constant
      3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      4. | Pexp_function of case list
      5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      7. | Pexp_match of expression * case list
      8. | Pexp_try of expression * case list
      9. | Pexp_tuple of expression list
      10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      11. | Pexp_variant of Asttypes.label * expression option
      12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      13. | Pexp_field of expression * Longident.t Asttypes.loc
      14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      15. | Pexp_array of expression list
      16. | Pexp_ifthenelse of expression * expression * expression option
      17. | Pexp_sequence of expression * expression
      18. | Pexp_while of expression * expression
      19. | Pexp_for of pattern @@ -16,4 +16,4 @@ * Asttypes.mutable_flag * class_field_kind
      20. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      21. | Pcf_constraint of core_type * core_type
      22. | Pcf_initializer of expression
      23. | Pcf_attribute of attribute
      24. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of functor_parameter * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and functor_parameter =
      1. | Unit
      2. | Named of string option Asttypes.loc * module_type
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_open of open_description
      11. | Psig_include of include_description
      12. | Psig_class of class_description list
      13. | Psig_class_type of class_type_declaration list
      14. | Psig_attribute of attribute
      15. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string option Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of functor_parameter * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string option Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of functor_parameter * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and functor_parameter =
    1. | Unit
    2. | Named of string option Asttypes.loc * module_type
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_open of open_description
    11. | Psig_include of include_description
    12. | Psig_class of class_description list
    13. | Psig_class_type of class_type_declaration list
    14. | Psig_attribute of attribute
    15. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    4. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of functor_parameter * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_412/index.html b/ppxlib/Astlib/Ast_412/index.html index c3e7046..01fb591 100644 --- a/ppxlib/Astlib/Ast_412/index.html +++ b/ppxlib/Astlib/Ast_412/index.html @@ -1,2 +1,2 @@ -Ast_412 (ppxlib.Astlib.Ast_412)

    Module Astlib.Ast_412

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_412 (ppxlib.Astlib.Ast_412)

    Module Astlib.Ast_412

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_413/Asttypes/index.html b/ppxlib/Astlib/Ast_413/Asttypes/index.html index de6265a..a9d76c2 100644 --- a/ppxlib/Astlib/Ast_413/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_413/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_413.Asttypes)

    Module Ast_413.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_413.Asttypes)

    Module Ast_413.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
    3. | Optional of string
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_413/Config/index.html b/ppxlib/Astlib/Ast_413/Config/index.html index 98dc384..be05622 100644 --- a/ppxlib/Astlib/Ast_413/Config/index.html +++ b/ppxlib/Astlib/Ast_413/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_413.Config)

    Module Ast_413.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_413.Config)

    Module Ast_413.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_413/Parsetree/index.html b/ppxlib/Astlib/Ast_413/Parsetree/index.html index 679f5a9..152bf3f 100644 --- a/ppxlib/Astlib/Ast_413/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_413/Parsetree/index.html @@ -1,5 +1,5 @@ -Parsetree (ppxlib.Astlib.Ast_413.Parsetree)

    Module Ast_413.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
    2. | Pconst_char of char
    3. | Pconst_string of string * Location.t * string option
    4. | Pconst_float of string * char option
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }
    and extension = string Asttypes.loc * payload
    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
    3. | PTyp of core_type
    4. | PPat of pattern * expression option

    Core language

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
    }
    and core_type_desc =
    1. | Ptyp_any
    2. | Ptyp_var of string
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
    4. | Ptyp_tuple of core_type list
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
    8. | Ptyp_alias of core_type * string
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_413.Parsetree)

      Module Ast_413.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
      2. | Pconst_char of char
      3. | Pconst_string of string * Location.t * string option
      4. | Pconst_float of string * char option
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }
      and extension = string Asttypes.loc * payload
      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
      3. | PTyp of core_type
      4. | PPat of pattern * expression option

      Core language

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
      }
      and core_type_desc =
      1. | Ptyp_any
      2. | Ptyp_var of string
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      4. | Ptyp_tuple of core_type list
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      8. | Ptyp_alias of core_type * string
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag * Asttypes.label list option
      10. | Ptyp_poly of string Asttypes.loc list * core_type
      11. | Ptyp_package of package_type
      12. | Ptyp_extension of extension
      and row_field = {
      1. prf_desc : row_field_desc;
      2. prf_loc : Location.t;
      3. prf_attributes : attributes;
      }
      and row_field_desc =
      1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      2. | Rinherit of core_type
      and object_field = {
      1. pof_desc : object_field_desc;
      2. pof_loc : Location.t;
      3. pof_attributes : attributes;
      }
      and object_field_desc =
      1. | Otag of Asttypes.label Asttypes.loc * core_type
      2. | Oinherit of core_type
      and pattern = {
      1. ppat_desc : pattern_desc;
      2. ppat_loc : Location.t;
      3. ppat_loc_stack : location_stack;
      4. ppat_attributes : attributes;
      }
      and pattern_desc =
      1. | Ppat_any
      2. | Ppat_var of string Asttypes.loc
      3. | Ppat_alias of pattern * string Asttypes.loc
      4. | Ppat_constant of constant
      5. | Ppat_interval of constant * constant
      6. | Ppat_tuple of pattern list
      7. | Ppat_construct of Longident.t Asttypes.loc @@ -17,4 +17,4 @@ * Asttypes.mutable_flag * class_field_kind
      8. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      9. | Pcf_constraint of core_type * core_type
      10. | Pcf_initializer of expression
      11. | Pcf_attribute of attribute
      12. | Pcf_extension of extension
      and class_field_kind =
      1. | Cfk_virtual of core_type
      2. | Cfk_concrete of Asttypes.override_flag * expression
      and class_declaration = class_expr class_infos

      Module language

      and module_type = {
      1. pmty_desc : module_type_desc;
      2. pmty_loc : Location.t;
      3. pmty_attributes : attributes;
      }
      and module_type_desc =
      1. | Pmty_ident of Longident.t Asttypes.loc
      2. | Pmty_signature of signature
      3. | Pmty_functor of functor_parameter * module_type
      4. | Pmty_with of module_type * with_constraint list
      5. | Pmty_typeof of module_expr
      6. | Pmty_extension of extension
      7. | Pmty_alias of Longident.t Asttypes.loc
      and functor_parameter =
      1. | Unit
      2. | Named of string option Asttypes.loc * module_type
      and signature = signature_item list
      and signature_item = {
      1. psig_desc : signature_item_desc;
      2. psig_loc : Location.t;
      }
      and signature_item_desc =
      1. | Psig_value of value_description
      2. | Psig_type of Asttypes.rec_flag * type_declaration list
      3. | Psig_typesubst of type_declaration list
      4. | Psig_typext of type_extension
      5. | Psig_exception of type_exception
      6. | Psig_module of module_declaration
      7. | Psig_modsubst of module_substitution
      8. | Psig_recmodule of module_declaration list
      9. | Psig_modtype of module_type_declaration
      10. | Psig_modtypesubst of module_type_declaration
      11. | Psig_open of open_description
      12. | Psig_include of include_description
      13. | Psig_class of class_description list
      14. | Psig_class_type of class_type_declaration list
      15. | Psig_attribute of attribute
      16. | Psig_extension of extension * attributes
      and module_declaration = {
      1. pmd_name : string option Asttypes.loc;
      2. pmd_type : module_type;
      3. pmd_attributes : attributes;
      4. pmd_loc : Location.t;
      }
      and module_substitution = {
      1. pms_name : string Asttypes.loc;
      2. pms_manifest : Longident.t Asttypes.loc;
      3. pms_attributes : attributes;
      4. pms_loc : Location.t;
      }
      and module_type_declaration = {
      1. pmtd_name : string Asttypes.loc;
      2. pmtd_type : module_type option;
      3. pmtd_attributes : attributes;
      4. pmtd_loc : Location.t;
      }
      and 'a open_infos = {
      1. popen_expr : 'a;
      2. popen_override : Asttypes.override_flag;
      3. popen_loc : Location.t;
      4. popen_attributes : attributes;
      }
      and open_description = Longident.t Asttypes.loc open_infos
      and open_declaration = module_expr open_infos
      and 'a include_infos = {
      1. pincl_mod : 'a;
      2. pincl_loc : Location.t;
      3. pincl_attributes : attributes;
      }
      and include_description = module_type include_infos
      and include_declaration = module_expr include_infos
      and with_constraint =
      1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      and module_expr = {
      1. pmod_desc : module_expr_desc;
      2. pmod_loc : Location.t;
      3. pmod_attributes : attributes;
      }
      and module_expr_desc =
      1. | Pmod_ident of Longident.t Asttypes.loc
      2. | Pmod_structure of structure
      3. | Pmod_functor of functor_parameter * module_expr
      4. | Pmod_apply of module_expr * module_expr
      5. | Pmod_constraint of module_expr * module_type
      6. | Pmod_unpack of expression
      7. | Pmod_extension of extension
      and structure = structure_item list
      and structure_item = {
      1. pstr_desc : structure_item_desc;
      2. pstr_loc : Location.t;
      }
      and structure_item_desc =
      1. | Pstr_eval of expression * attributes
      2. | Pstr_value of Asttypes.rec_flag * value_binding list
      3. | Pstr_primitive of value_description
      4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      5. | Pstr_typext of type_extension
      6. | Pstr_exception of type_exception
      7. | Pstr_module of module_binding
      8. | Pstr_recmodule of module_binding list
      9. | Pstr_modtype of module_type_declaration
      10. | Pstr_open of open_declaration
      11. | Pstr_class of class_declaration list
      12. | Pstr_class_type of class_type_declaration list
      13. | Pstr_include of include_declaration
      14. | Pstr_attribute of attribute
      15. | Pstr_extension of extension * attributes
      and value_binding = {
      1. pvb_pat : pattern;
      2. pvb_expr : expression;
      3. pvb_attributes : attributes;
      4. pvb_loc : Location.t;
      }
      and module_binding = {
      1. pmb_name : string option Asttypes.loc;
      2. pmb_expr : module_expr;
      3. pmb_attributes : attributes;
      4. pmb_loc : Location.t;
      }

      Toplevel

      type toplevel_phrase =
      1. | Ptop_def of structure
      2. | Ptop_dir of toplevel_directive
      and toplevel_directive = {
      1. pdir_name : string Asttypes.loc;
      2. pdir_arg : directive_argument option;
      3. pdir_loc : Location.t;
      }
      and directive_argument = {
      1. pdira_desc : directive_argument_desc;
      2. pdira_loc : Location.t;
      }
      and directive_argument_desc =
      1. | Pdir_string of string
      2. | Pdir_int of string * char option
      3. | Pdir_ident of Longident.t
      4. | Pdir_bool of bool
      \ No newline at end of file + * class_field_kind
    10. | Pcf_constraint of core_type * core_type
    11. | Pcf_initializer of expression
    12. | Pcf_attribute of attribute
    13. | Pcf_extension of extension
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
    2. | Pmty_signature of signature
    3. | Pmty_functor of functor_parameter * module_type
    4. | Pmty_with of module_type * with_constraint list
    5. | Pmty_typeof of module_expr
    6. | Pmty_extension of extension
    7. | Pmty_alias of Longident.t Asttypes.loc
    and functor_parameter =
    1. | Unit
    2. | Named of string option Asttypes.loc * module_type
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
    3. | Psig_typesubst of type_declaration list
    4. | Psig_typext of type_extension
    5. | Psig_exception of type_exception
    6. | Psig_module of module_declaration
    7. | Psig_modsubst of module_substitution
    8. | Psig_recmodule of module_declaration list
    9. | Psig_modtype of module_type_declaration
    10. | Psig_modtypesubst of module_type_declaration
    11. | Psig_open of open_description
    12. | Psig_include of include_description
    13. | Psig_class of class_description list
    14. | Psig_class_type of class_type_declaration list
    15. | Psig_attribute of attribute
    16. | Psig_extension of extension * attributes
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
    4. pmd_loc : Location.t;
    }
    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
    4. pms_loc : Location.t;
    }
    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
    4. pmtd_loc : Location.t;
    }
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }
    and open_description = Longident.t Asttypes.loc open_infos
    and open_declaration = module_expr open_infos
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos
    and include_declaration = module_expr include_infos
    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
    2. | Pmod_structure of structure
    3. | Pmod_functor of functor_parameter * module_expr
    4. | Pmod_apply of module_expr * module_expr
    5. | Pmod_constraint of module_expr * module_type
    6. | Pmod_unpack of expression
    7. | Pmod_extension of extension
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
    3. | Pstr_primitive of value_description
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
    5. | Pstr_typext of type_extension
    6. | Pstr_exception of type_exception
    7. | Pstr_module of module_binding
    8. | Pstr_recmodule of module_binding list
    9. | Pstr_modtype of module_type_declaration
    10. | Pstr_open of open_declaration
    11. | Pstr_class of class_declaration list
    12. | Pstr_class_type of class_type_declaration list
    13. | Pstr_include of include_declaration
    14. | Pstr_attribute of attribute
    15. | Pstr_extension of extension * attributes
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Toplevel

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_413/index.html b/ppxlib/Astlib/Ast_413/index.html index f9a7ac1..8e783b1 100644 --- a/ppxlib/Astlib/Ast_413/index.html +++ b/ppxlib/Astlib/Ast_413/index.html @@ -1,2 +1,2 @@ -Ast_413 (ppxlib.Astlib.Ast_413)

    Module Astlib.Ast_413

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_413 (ppxlib.Astlib.Ast_413)

    Module Astlib.Ast_413

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_414/Asttypes/index.html b/ppxlib/Astlib/Ast_414/Asttypes/index.html index ba49146..b943bbe 100644 --- a/ppxlib/Astlib/Ast_414/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_414/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_414.Asttypes)

    Module Ast_414.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_414.Asttypes)

    Module Ast_414.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_414/Config/index.html b/ppxlib/Astlib/Ast_414/Config/index.html index 66b6d0a..8665b32 100644 --- a/ppxlib/Astlib/Ast_414/Config/index.html +++ b/ppxlib/Astlib/Ast_414/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_414.Config)

    Module Ast_414.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_414.Config)

    Module Ast_414.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_414/Parsetree/index.html b/ppxlib/Astlib/Ast_414/Parsetree/index.html index d785f11..4ad8826 100644 --- a/ppxlib/Astlib/Ast_414/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_414/Parsetree/index.html @@ -1,22 +1,22 @@ -Parsetree (ppxlib.Astlib.Ast_414.Parsetree)

    Module Ast_414.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_414.Parsetree)

      Module Ast_414.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag - * Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc =
    1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }
    and object_field_desc =
    1. | Otag of Asttypes.label Asttypes.loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Asttypes.loc - * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern + * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    20. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    21. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    22. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    23. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    24. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    25. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    26. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    27. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    28. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    29. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    30. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    23. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    2. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    3. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    4. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    5. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    6. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    7. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    8. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    9. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    10. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    11. | Pexp_lazy of expression
      (*

      lazy E

      *)
    12. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    13. | Pexp_object of class_structure
      (*

      object ... end

      *)
    14. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    15. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    16. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    17. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    18. | Pexp_extension of extension
      (*

      [%id]

      *)
    19. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of Asttypes.label Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      (**)
    5. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    6. | Pcf_initializer of expression
      (*

      initializer E

      *)
    7. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    8. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * class_field_kind
    (**)
  • | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  • | Pcf_initializer of expression
    (*

    initializer E

    *)
  • | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  • | Pcf_extension of extension
    (*

    [%%id]

    *)
  • and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_414/index.html b/ppxlib/Astlib/Ast_414/index.html index 82a81a6..76eaeba 100644 --- a/ppxlib/Astlib/Ast_414/index.html +++ b/ppxlib/Astlib/Ast_414/index.html @@ -1,2 +1,2 @@ -Ast_414 (ppxlib.Astlib.Ast_414)

    Module Astlib.Ast_414

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_414 (ppxlib.Astlib.Ast_414)

    Module Astlib.Ast_414

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_500/Asttypes/index.html b/ppxlib/Astlib/Ast_500/Asttypes/index.html index 4e92d30..cab9a94 100644 --- a/ppxlib/Astlib/Ast_500/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_500/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_500.Asttypes)

    Module Ast_500.Asttypes

    include module type of struct include Ast_414.Asttypes end
    type constant = Ast_414.Asttypes.constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag = Ast_414.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag = Ast_414.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    type private_flag = Ast_414.Asttypes.private_flag =
    1. | Private
    2. | Public
    type mutable_flag = Ast_414.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag = Ast_414.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag = Ast_414.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    type closed_flag = Ast_414.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label = Ast_414.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance = Ast_414.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity = Ast_414.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_500.Asttypes)

    Module Ast_500.Asttypes

    include module type of struct include Ast_414.Asttypes end
    type constant = Ast_414.Asttypes.constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag = Ast_414.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag = Ast_414.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    type private_flag = Ast_414.Asttypes.private_flag =
    1. | Private
    2. | Public
    type mutable_flag = Ast_414.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag = Ast_414.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag = Ast_414.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    type closed_flag = Ast_414.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label = Ast_414.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance = Ast_414.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity = Ast_414.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_500/Config/index.html b/ppxlib/Astlib/Ast_500/Config/index.html index 28c49c0..456e1d8 100644 --- a/ppxlib/Astlib/Ast_500/Config/index.html +++ b/ppxlib/Astlib/Ast_500/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_500.Config)

    Module Ast_500.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_500.Config)

    Module Ast_500.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_500/Parsetree/index.html b/ppxlib/Astlib/Ast_500/Parsetree/index.html index 8c1a7b2..0301367 100644 --- a/ppxlib/Astlib/Ast_500/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_500/Parsetree/index.html @@ -1,42 +1,42 @@ -Parsetree (ppxlib.Astlib.Ast_500.Parsetree)

    Module Ast_500.Parsetree

    include module type of struct include Ast_414.Parsetree end
    type constant = Ast_414.Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = Ast_414.Parsetree.attribute = {
    1. attr_name : string Ast_414.Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Ast_414.Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Ast_414.Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Ast_414.Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc = Ast_414.Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Ast_414.Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Ast_414.Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Ast_414.Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Ast_414.Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_500.Parsetree)

      Module Ast_500.Parsetree

      include module type of struct include Ast_414.Parsetree end
      type constant = Ast_414.Parsetree.constant =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = Ast_414.Parsetree.attribute = {
      1. attr_name : string Ast_414.Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Ast_414.Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload = Ast_414.Parsetree.payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = Ast_414.Parsetree.core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc = Ast_414.Parsetree.core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Ast_414.Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Ast_414.Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Ast_414.Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Ast_414.Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Ast_414.Asttypes.closed_flag - * Ast_414.Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Ast_414.Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Ast_414.Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Ast_414.Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Ast_414.Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Ast_414.Parsetree.row_field_desc =
    1. | Rtag of Ast_414.Asttypes.label Ast_414.Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Ast_414.Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }

    Patterns

    and pattern = Ast_414.Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc = Ast_414.Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Ast_414.Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Ast_414.Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Ast_414.Asttypes.loc * (string Ast_414.Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Ast_414.Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Ast_414.Asttypes.loc * pattern) list - * Ast_414.Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Ast_414.Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Ast_414.Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of Longident.t Ast_414.Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Ast_414.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc = Ast_414.Parsetree.expression_desc =
    1. | Pexp_ident of Longident.t Ast_414.Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Ast_414.Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Ast_414.Asttypes.arg_label + * Ast_414.Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    6. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    7. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    8. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    9. | Ppat_type of Longident.t Ast_414.Asttypes.loc
      (*

      Pattern #tconst

      *)
    10. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    11. | Ppat_unpack of string option Ast_414.Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    12. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    13. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    14. | Ppat_open of Longident.t Ast_414.Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Ast_414.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc = Ast_414.Parsetree.expression_desc =
    1. | Pexp_ident of Longident.t Ast_414.Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Ast_414.Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Ast_414.Asttypes.arg_label * expression option * pattern - * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Ast_414.Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Ast_414.Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Ast_414.Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Ast_414.Asttypes.loc * expression) list + * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    13. | Pexp_apply of expression * (Ast_414.Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    14. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    15. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    16. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    17. | Pexp_construct of Longident.t Ast_414.Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    18. | Pexp_variant of Ast_414.Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    19. | Pexp_record of (Longident.t Ast_414.Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    20. | Pexp_field of expression * Longident.t Ast_414.Asttypes.loc
      (*

      E.l

      *)
    21. | Pexp_setfield of expression * Longident.t Ast_414.Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    22. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    23. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    24. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    25. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    26. | Pexp_for of pattern * expression * expression * Ast_414.Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    27. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    28. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    29. | Pexp_send of expression * Ast_414.Asttypes.label Ast_414.Asttypes.loc
      (*

      E # m

      *)
    30. | Pexp_new of Longident.t Ast_414.Asttypes.loc
      (*

      new M.c

      *)
    31. | Pexp_setinstvar of Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression
      (*

      x <- 2

      *)
    32. | Pexp_override of (Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression) - list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    33. | Pexp_letmodule of string option Ast_414.Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    34. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    35. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    36. | Pexp_lazy of expression
      (*

      lazy E

      *)
    37. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    38. | Pexp_object of class_structure
      (*

      object ... end

      *)
    39. | Pexp_newtype of string Ast_414.Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    40. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    41. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    42. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    43. | Pexp_extension of extension
      (*

      [%id]

      *)
    44. | Pexp_unreachable
      (*

      .

      *)
    and case = Ast_414.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Ast_414.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Ast_414.Parsetree.binding_op = {
    1. pbop_op : string Ast_414.Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = Ast_414.Parsetree.value_description = {
    1. pval_name : string Ast_414.Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Ast_414.Parsetree.type_declaration = {
    1. ptype_name : string Ast_414.Asttypes.loc;
    2. ptype_params : (core_type + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    3. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    4. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    5. | Pexp_send of expression * Ast_414.Asttypes.label Ast_414.Asttypes.loc
      (*

      E # m

      *)
    6. | Pexp_new of Longident.t Ast_414.Asttypes.loc
      (*

      new M.c

      *)
    7. | Pexp_setinstvar of Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression
      (*

      x <- 2

      *)
    8. | Pexp_override of (Ast_414.Asttypes.label Ast_414.Asttypes.loc * expression) + list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    9. | Pexp_letmodule of string option Ast_414.Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    10. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    11. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    12. | Pexp_lazy of expression
      (*

      lazy E

      *)
    13. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    14. | Pexp_object of class_structure
      (*

      object ... end

      *)
    15. | Pexp_newtype of string Ast_414.Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    16. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    17. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    18. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    19. | Pexp_extension of extension
      (*

      [%id]

      *)
    20. | Pexp_unreachable
      (*

      .

      *)
    and case = Ast_414.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Ast_414.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Ast_414.Parsetree.binding_op = {
    1. pbop_op : string Ast_414.Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = Ast_414.Parsetree.value_description = {
    1. pval_name : string Ast_414.Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Ast_414.Parsetree.type_declaration = {
    1. ptype_name : string Ast_414.Asttypes.loc;
    2. ptype_params : (core_type * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) - list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Ast_414.Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Ast_414.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Ast_414.Parsetree.label_declaration = {
    1. pld_name : string Ast_414.Asttypes.loc;
    2. pld_mutable : Ast_414.Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Ast_414.Parsetree.constructor_declaration = {
    1. pcd_name : string Ast_414.Asttypes.loc;
    2. pcd_vars : string Ast_414.Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments = Ast_414.Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Ast_414.Parsetree.type_extension = {
    1. ptyext_path : Longident.t Ast_414.Asttypes.loc;
    2. ptyext_params : (core_type + list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Ast_414.Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Ast_414.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Ast_414.Parsetree.label_declaration = {
    1. pld_name : string Ast_414.Asttypes.loc;
    2. pld_mutable : Ast_414.Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Ast_414.Parsetree.constructor_declaration = {
    1. pcd_name : string Ast_414.Asttypes.loc;
    2. pcd_vars : string Ast_414.Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments = Ast_414.Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Ast_414.Parsetree.type_extension = {
    1. ptyext_path : Longident.t Ast_414.Asttypes.loc;
    2. ptyext_params : (core_type * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Ast_414.Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = Ast_414.Parsetree.extension_constructor = {
    1. pext_name : string Ast_414.Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = Ast_414.Parsetree.type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind = Ast_414.Parsetree.extension_constructor_kind =
    1. | Pext_decl of string Ast_414.Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Ast_414.Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Ast_414.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc = Ast_414.Parsetree.class_type_desc =
    1. | Pcty_constr of Longident.t Ast_414.Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Ast_414.Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Ast_414.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Ast_414.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc = Ast_414.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Ast_414.Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Ast_414.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc = Ast_414.Parsetree.class_type_desc =
    1. | Pcty_constr of Longident.t Ast_414.Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Ast_414.Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Ast_414.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Ast_414.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc = Ast_414.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc * Ast_414.Asttypes.mutable_flag * Ast_414.Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Ast_414.Asttypes.label Ast_414.Asttypes.loc * Ast_414.Asttypes.private_flag * Ast_414.Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Ast_414.Parsetree.class_infos = {
    1. pci_virt : Ast_414.Asttypes.virtual_flag;
    2. pci_params : (core_type + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Ast_414.Parsetree.class_infos = {
    1. pci_virt : Ast_414.Asttypes.virtual_flag;
    2. pci_params : (core_type * (Ast_414.Asttypes.variance * Ast_414.Asttypes.injectivity)) list;
    3. pci_name : string Ast_414.Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Ast_414.Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc = Ast_414.Parsetree.class_expr_desc =
    1. | Pcl_constr of Longident.t Ast_414.Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Ast_414.Asttypes.arg_label * expression option * pattern - * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Ast_414.Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Ast_414.Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Ast_414.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Ast_414.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc = Ast_414.Parsetree.class_field_desc =
    1. | Pcf_inherit of Ast_414.Asttypes.override_flag + * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    2. | Pcl_apply of class_expr * (Ast_414.Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    3. | Pcl_let of Ast_414.Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    4. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    5. | Pcl_extension of extension
      (*

      [%id]

      *)
    6. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Ast_414.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Ast_414.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc = Ast_414.Parsetree.class_field_desc =
    1. | Pcf_inherit of Ast_414.Asttypes.override_flag * class_expr - * string Ast_414.Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * string Ast_414.Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    3. | Pcf_val of Ast_414.Asttypes.label Ast_414.Asttypes.loc * Ast_414.Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Ast_414.Asttypes.label Ast_414.Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    5. | Pcf_method of Ast_414.Asttypes.label Ast_414.Asttypes.loc * Ast_414.Asttypes.private_flag - * class_field_kind
      (**)
    6. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    7. | Pcf_initializer of expression
      (*

      initializer E

      *)
    8. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    9. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Ast_414.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Ast_414.Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Ast_414.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc = Ast_414.Parsetree.module_type_desc =
    1. | Pmty_ident of Longident.t Ast_414.Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Ast_414.Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter = Ast_414.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Ast_414.Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Ast_414.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc = Ast_414.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Ast_414.Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Ast_414.Parsetree.module_declaration = {
    1. pmd_name : string option Ast_414.Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Ast_414.Parsetree.module_substitution = {
    1. pms_name : string Ast_414.Asttypes.loc;
    2. pms_manifest : Longident.t Ast_414.Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Ast_414.Parsetree.module_type_declaration = {
    1. pmtd_name : string Ast_414.Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Ast_414.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Ast_414.Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Ast_414.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Ast_414.Parsetree.with_constraint =
    1. | Pwith_type of Longident.t Ast_414.Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Ast_414.Asttypes.loc + * class_field_kind
      (**)
    3. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pcf_initializer of expression
      (*

      initializer E

      *)
    5. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Ast_414.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Ast_414.Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Ast_414.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc = Ast_414.Parsetree.module_type_desc =
    1. | Pmty_ident of Longident.t Ast_414.Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Ast_414.Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter = Ast_414.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Ast_414.Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Ast_414.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc = Ast_414.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Ast_414.Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Ast_414.Parsetree.module_declaration = {
    1. pmd_name : string option Ast_414.Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Ast_414.Parsetree.module_substitution = {
    1. pms_name : string Ast_414.Asttypes.loc;
    2. pms_manifest : Longident.t Ast_414.Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Ast_414.Parsetree.module_type_declaration = {
    1. pmtd_name : string Ast_414.Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Ast_414.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Ast_414.Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Ast_414.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Ast_414.Parsetree.with_constraint =
    1. | Pwith_type of Longident.t Ast_414.Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Ast_414.Asttypes.loc * Longident.t Ast_414.Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Ast_414.Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Ast_414.Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Ast_414.Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Ast_414.Asttypes.loc - * Longident.t Ast_414.Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Ast_414.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc = Ast_414.Parsetree.module_expr_desc =
    1. | Pmod_ident of Longident.t Ast_414.Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Ast_414.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc = Ast_414.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Ast_414.Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Ast_414.Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Ast_414.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = Ast_414.Parsetree.module_binding = {
    1. pmb_name : string option Ast_414.Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase = Ast_414.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Ast_414.Parsetree.toplevel_directive = {
    1. pdir_name : string Ast_414.Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = Ast_414.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc = Ast_414.Parsetree.directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * Longident.t Ast_414.Asttypes.loc
    (*

    with module X.Y := Z

    *)

    Value expressions for the module language

    and module_expr = Ast_414.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc = Ast_414.Parsetree.module_expr_desc =
    1. | Pmod_ident of Longident.t Ast_414.Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Ast_414.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc = Ast_414.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Ast_414.Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Ast_414.Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Ast_414.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : Location.t;
    }
    and module_binding = Ast_414.Parsetree.module_binding = {
    1. pmb_name : string option Ast_414.Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase = Ast_414.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Ast_414.Parsetree.toplevel_directive = {
    1. pdir_name : string Ast_414.Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = Ast_414.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc = Ast_414.Parsetree.directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_500/index.html b/ppxlib/Astlib/Ast_500/index.html index 620e5df..b8860d6 100644 --- a/ppxlib/Astlib/Ast_500/index.html +++ b/ppxlib/Astlib/Ast_500/index.html @@ -1,2 +1,2 @@ -Ast_500 (ppxlib.Astlib.Ast_500)

    Module Astlib.Ast_500

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_500 (ppxlib.Astlib.Ast_500)

    Module Astlib.Ast_500

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_501/Asttypes/index.html b/ppxlib/Astlib/Ast_501/Asttypes/index.html index 8b17b0e..ce541f5 100644 --- a/ppxlib/Astlib/Ast_501/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_501/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_501.Asttypes)

    Module Ast_501.Asttypes

    type constant = Asttypes.constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag = Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag = Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type mutable_flag = Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag = Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag = Asttypes.override_flag =
    1. | Override
    2. | Fresh
    type closed_flag = Asttypes.closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label = Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance = Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity = Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_501.Asttypes)

    Module Ast_501.Asttypes

    type constant = Asttypes.constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag = Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag = Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    type private_flag = Asttypes.private_flag =
    1. | Private
    2. | Public
    type mutable_flag = Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag = Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag = Asttypes.override_flag =
    1. | Override
    2. | Fresh
    type closed_flag = Asttypes.closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label = Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance = Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity = Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_501/Config/index.html b/ppxlib/Astlib/Ast_501/Config/index.html index 8e53d93..3b93e94 100644 --- a/ppxlib/Astlib/Ast_501/Config/index.html +++ b/ppxlib/Astlib/Ast_501/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_501.Config)

    Module Ast_501.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_501.Config)

    Module Ast_501.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_501/Parsetree/index.html b/ppxlib/Astlib/Ast_501/Parsetree/index.html index d8d0250..1f38db7 100644 --- a/ppxlib/Astlib/Ast_501/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_501/Parsetree/index.html @@ -1,22 +1,22 @@ -Parsetree (ppxlib.Astlib.Ast_501.Parsetree)

    Module Ast_501.Parsetree

    type constant = Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = Parsetree.attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc = Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_501.Parsetree)

      Module Ast_501.Parsetree

      type constant = Parsetree.constant =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = Parsetree.attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload = Parsetree.payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = Parsetree.core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc = Parsetree.core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag - * Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Parsetree.row_field_desc =
    1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }
    and object_field_desc = Parsetree.object_field_desc =
    1. | Otag of Asttypes.label Asttypes.loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc = Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Asttypes.loc - * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc = Parsetree.expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern + * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    20. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    21. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    22. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    23. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    24. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    25. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    26. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    27. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    28. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    29. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    30. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc = Parsetree.expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of case list
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of Asttypes.arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    23. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Parsetree.binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = Parsetree.value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Parsetree.type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Parsetree.label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Parsetree.constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments = Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Parsetree.type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = Parsetree.extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = Parsetree.type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind = Parsetree.extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    2. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    3. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    4. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    5. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    6. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    7. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    8. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    9. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    10. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    11. | Pexp_lazy of expression
      (*

      lazy E

      *)
    12. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    13. | Pexp_object of class_structure
      (*

      object ... end

      *)
    14. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    15. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    16. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    17. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    18. | Pexp_extension of extension
      (*

      [%id]

      *)
    19. | Pexp_unreachable
      (*

      .

      *)
    and case = Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Parsetree.binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }

    Value descriptions

    and value_description = Parsetree.value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Parsetree.type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Parsetree.label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Parsetree.constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments = Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Parsetree.type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = Parsetree.extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = Parsetree.type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind = Parsetree.extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc = Parsetree.class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc = Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc = Parsetree.class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc = Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Parsetree.class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc = Parsetree.class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc = Parsetree.class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Parsetree.class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc = Parsetree.class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc = Parsetree.class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of Asttypes.label Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      (**)
    5. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    6. | Pcf_initializer of expression
      (*

      initializer E

      *)
    7. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    8. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc = Parsetree.module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter = Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc = Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Parsetree.module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Parsetree.module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Parsetree.module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Parsetree.with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc = Parsetree.module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc = Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint = Parsetree.value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
    and value_binding = Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }
    and module_binding = Parsetree.module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase = Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Parsetree.toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc = Parsetree.directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * class_field_kind
    (**)
  • | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  • | Pcf_initializer of expression
    (*

    initializer E

    *)
  • | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  • | Pcf_extension of extension
    (*

    [%%id]

    *)
  • and class_field_kind = Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc = Parsetree.module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter = Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc = Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Parsetree.module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Parsetree.module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Parsetree.module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Parsetree.with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc = Parsetree.module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc = Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint = Parsetree.value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
    and value_binding = Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }
    and module_binding = Parsetree.module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase = Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Parsetree.toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc = Parsetree.directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_501/index.html b/ppxlib/Astlib/Ast_501/index.html index 2249fd6..ed47d83 100644 --- a/ppxlib/Astlib/Ast_501/index.html +++ b/ppxlib/Astlib/Ast_501/index.html @@ -1,2 +1,2 @@ -Ast_501 (ppxlib.Astlib.Ast_501)

    Module Astlib.Ast_501

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_501 (ppxlib.Astlib.Ast_501)

    Module Astlib.Ast_501

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_502/Asttypes/index.html b/ppxlib/Astlib/Ast_502/Asttypes/index.html index ad03219..0c5629d 100644 --- a/ppxlib/Astlib/Ast_502/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_502/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_502.Asttypes)

    Module Ast_502.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_502.Asttypes)

    Module Ast_502.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_502/Config/index.html b/ppxlib/Astlib/Ast_502/Config/index.html index 876a31d..659450d 100644 --- a/ppxlib/Astlib/Ast_502/Config/index.html +++ b/ppxlib/Astlib/Ast_502/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_502.Config)

    Module Ast_502.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_502.Config)

    Module Ast_502.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_502/Parsetree/index.html b/ppxlib/Astlib/Ast_502/Parsetree/index.html index 01f713e..d59b258 100644 --- a/ppxlib/Astlib/Ast_502/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_502/Parsetree/index.html @@ -1,25 +1,25 @@ -Parsetree (ppxlib.Astlib.Ast_502.Parsetree)

    Module Ast_502.Parsetree

    type constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string Asttypes.loc
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_502.Parsetree)

      Module Ast_502.Parsetree

      type constant =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string Asttypes.loc
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag - * Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_open of Longident.t Asttypes.loc * core_type
        (*

        M.(T)

        *)
      13. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_open of Longident.t Asttypes.loc * core_type
      (*

      M.(T)

      *)
    13. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc =
    1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }
    and object_field_desc =
    1. | Otag of Asttypes.label Asttypes.loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Asttypes.loc - * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of function_param list * type_constraint option * function_body
      (*

      Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

      • fun P1 ... Pn -> E when body = Pfunction_body E
      • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ] C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty). A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.
      *)
    5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    6. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    7. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    9. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    10. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    12. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    14. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    15. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    16. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    17. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    18. | Pexp_for of pattern + * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    19. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    20. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    21. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    22. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    23. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    24. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    25. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    26. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    27. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    28. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    29. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of function_param list * type_constraint option * function_body
      (*

      Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

      • fun P1 ... Pn -> E when body = Pfunction_body E
      • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ] C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty). A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.
      *)
    5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    6. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    7. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    9. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    10. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    12. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    14. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    15. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    16. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    17. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    18. | Pexp_for of pattern * expression * expression * Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    19. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    20. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    21. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    22. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    23. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    24. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    25. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    26. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    27. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    28. | Pexp_lazy of expression
      (*

      lazy E

      *)
    29. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    30. | Pexp_object of class_structure
      (*

      object ... end

      *)
    31. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    32. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    33. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    34. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    35. | Pexp_extension of extension
      (*

      [%id]

      *)
    36. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }
    and function_param_desc =
    1. | Pparam_val of Asttypes.arg_label * expression option * pattern
      (*

      Pparam_val (lbl, exp0, P) represents the parameter:

      Note: If E0 is provided, only Optional is allowed.

      *)
    2. | Pparam_newtype of string Asttypes.loc
      (*

      Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

      Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

      [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
      -  { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
      -  { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
      -]

      Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

      *)
    and function_param = {
    1. pparam_loc : Location.t;
    2. pparam_desc : function_param_desc;
    }
    and function_body =
    1. | Pfunction_body of expression
    2. | Pfunction_cases of case list * Location.t * attributes
      (*

      In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

      *)

    See the comment on Pexp_function.

    and type_constraint =
    1. | Pconstraint of core_type
    2. | Pcoerce of core_type option * core_type
      (*

      See the comment on Pexp_function.

      *)

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    2. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    3. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    4. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    5. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    6. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    7. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    8. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    9. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    10. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    11. | Pexp_lazy of expression
      (*

      lazy E

      *)
    12. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    13. | Pexp_object of class_structure
      (*

      object ... end

      *)
    14. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    15. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    16. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    17. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    18. | Pexp_extension of extension
      (*

      [%id]

      *)
    19. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }
    and function_param_desc =
    1. | Pparam_val of Asttypes.arg_label * expression option * pattern
      (*

      Pparam_val (lbl, exp0, P) represents the parameter:

      Note: If E0 is provided, only Optional is allowed.

      *)
    2. | Pparam_newtype of string Asttypes.loc
      (*

      Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

      Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

       [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
      +     { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
      +     { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
      +   ]

      Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

      *)
    and function_param = {
    1. pparam_loc : Location.t;
    2. pparam_desc : function_param_desc;
    }
    and function_body =
    1. | Pfunction_body of expression
    2. | Pfunction_cases of case list * Location.t * attributes
      (*

      In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

      *)

    See the comment on Pexp_function.

    and type_constraint =
    1. | Pconstraint of core_type
    2. | Pcoerce of core_type option * core_type
      (*

      See the comment on Pexp_function.

      *)

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of Asttypes.label Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      (**)
    5. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    6. | Pcf_initializer of expression
      (*

      initializer E

      *)
    7. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    8. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * class_field_kind
    (**)
  • | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  • | Pcf_initializer of expression
    (*

    initializer E

    *)
  • | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  • | Pcf_extension of extension
    (*

    [%%id]

    *)
  • and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }
    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_502/index.html b/ppxlib/Astlib/Ast_502/index.html index f730f13..d85d411 100644 --- a/ppxlib/Astlib/Ast_502/index.html +++ b/ppxlib/Astlib/Ast_502/index.html @@ -1,2 +1,2 @@ -Ast_502 (ppxlib.Astlib.Ast_502)

    Module Astlib.Ast_502

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_502 (ppxlib.Astlib.Ast_502)

    Module Astlib.Ast_502

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_503/Asttypes/index.html b/ppxlib/Astlib/Ast_503/Asttypes/index.html index 736e79a..acde3c7 100644 --- a/ppxlib/Astlib/Ast_503/Asttypes/index.html +++ b/ppxlib/Astlib/Ast_503/Asttypes/index.html @@ -1,2 +1,2 @@ -Asttypes (ppxlib.Astlib.Ast_503.Asttypes)

    Module Ast_503.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    \ No newline at end of file +Asttypes (ppxlib.Astlib.Ast_503.Asttypes)

    Module Ast_503.Asttypes

    type constant =
    1. | Const_int of int
    2. | Const_char of char
    3. | Const_string of string * Location.t * string option
    4. | Const_float of string
    5. | Const_int32 of int32
    6. | Const_int64 of int64
    7. | Const_nativeint of nativeint
    type rec_flag =
    1. | Nonrecursive
    2. | Recursive
    type direction_flag =
    1. | Upto
    2. | Downto
    type private_flag =
    1. | Private
    2. | Public
    type mutable_flag =
    1. | Immutable
    2. | Mutable
    type virtual_flag =
    1. | Virtual
    2. | Concrete
    type override_flag =
    1. | Override
    2. | Fresh
    type closed_flag =
    1. | Closed
    2. | Open
    type label = string
    type arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    type 'a loc = 'a Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    type variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    type injectivity =
    1. | Injective
    2. | NoInjectivity
    diff --git a/ppxlib/Astlib/Ast_503/Config/index.html b/ppxlib/Astlib/Ast_503/Config/index.html index 4f808ba..e2ab72b 100644 --- a/ppxlib/Astlib/Ast_503/Config/index.html +++ b/ppxlib/Astlib/Ast_503/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Ast_503.Config)

    Module Ast_503.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Astlib.Ast_503.Config)

    Module Ast_503.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Astlib/Ast_503/Parsetree/index.html b/ppxlib/Astlib/Ast_503/Parsetree/index.html index 690735c..41cdc7b 100644 --- a/ppxlib/Astlib/Ast_503/Parsetree/index.html +++ b/ppxlib/Astlib/Ast_503/Parsetree/index.html @@ -1,25 +1,25 @@ -Parsetree (ppxlib.Astlib.Ast_503.Parsetree)

    Module Ast_503.Parsetree

    type constant = {
    1. pconst_desc : constant_desc;
    2. pconst_loc : Location.t;
    }
    and constant_desc =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * Location.t * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)
    type location_stack = Location.t list

    Extension points

    type attribute = {
    1. attr_name : string Asttypes.loc;
    2. attr_payload : payload;
    3. attr_loc : Location.t;
    }

    Attributes such as [\@id ARG] and [\@\@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string Asttypes.loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : Location.t;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * Asttypes.closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string Asttypes.loc
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list +Parsetree (ppxlib.Astlib.Ast_503.Parsetree)

      Module Ast_503.Parsetree

      type constant = {
      1. pconst_desc : constant_desc;
      2. pconst_loc : Location.t;
      }
      and constant_desc =
      1. | Pconst_integer of string * char option
        (*

        Integer constants such as 3 3l 3L 3n.

        Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

        *)
      2. | Pconst_char of char
        (*

        Character such as 'c'.

        *)
      3. | Pconst_string of string * Location.t * string option
        (*

        Constant string such as "constant" or {delim|other constant|delim}.

        The location span the content of the string, without the delimiters.

        *)
      4. | Pconst_float of string * char option
        (*

        Float constant such as 3.4, 2e5 or 1.4e-4.

        Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

        *)
      type location_stack = Location.t list

      Extension points

      type attribute = {
      1. attr_name : string Asttypes.loc;
      2. attr_payload : payload;
      3. attr_loc : Location.t;
      }

      Attributes such as [\@id ARG] and [\@\@id ARG].

      Metadata containers passed around within the AST. The compiler ignores unknown attributes.

      and extension = string Asttypes.loc * payload

      Extension points such as [%id ARG] and [%%id ARG].

      Sub-language placeholder -- rejected by the typechecker.

      and attributes = attribute list
      and payload =
      1. | PStr of structure
      2. | PSig of signature
        (*

        : SIG in an attribute or an extension point

        *)
      3. | PTyp of core_type
        (*

        : T in an attribute or an extension point

        *)
      4. | PPat of pattern * expression option
        (*

        ? P or ? P when E, in an attribute or an extension point

        *)

      Core language

      Type expressions

      and core_type = {
      1. ptyp_desc : core_type_desc;
      2. ptyp_loc : Location.t;
      3. ptyp_loc_stack : location_stack;
      4. ptyp_attributes : attributes;
        (*

        ... [\@id1] [\@id2]

        *)
      }
      and core_type_desc =
      1. | Ptyp_any
        (*

        _

        *)
      2. | Ptyp_var of string
        (*

        A type variable such as 'a

        *)
      3. | Ptyp_arrow of Asttypes.arg_label * core_type * core_type
        (*

        Ptyp_arrow(lbl, T1, T2) represents:

        *)
      4. | Ptyp_tuple of core_type list
        (*

        Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

        Invariant: n >= 2.

        *)
      5. | Ptyp_constr of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_constr(lident, l) represents:

        • tconstr when l=[],
        • T tconstr when l=[T],
        • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
        *)
      6. | Ptyp_object of object_field list * Asttypes.closed_flag
        (*

        Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

        • < l1:T1; ...; ln:Tn > when flag is Closed,
        • < l1:T1; ...; ln:Tn; .. > when flag is Open.
        *)
      7. | Ptyp_class of Longident.t Asttypes.loc * core_type list
        (*

        Ptyp_class(tconstr, l) represents:

        • #tconstr when l=[],
        • T #tconstr when l=[T],
        • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
        *)
      8. | Ptyp_alias of core_type * string Asttypes.loc
        (*

        T as 'a.

        *)
      9. | Ptyp_variant of row_field list * Asttypes.closed_flag - * Asttypes.label list option
        (*

        Ptyp_variant([`A;`B], flag, labels) represents:

        • [ `A|`B ] when flag is Closed, and labels is None,
        • [> `A|`B ] when flag is Open, and labels is None,
        • [< `A|`B ] when flag is Closed, and labels is Some [],
        • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
        *)
      10. | Ptyp_poly of string Asttypes.loc list * core_type
        (*

        'a1 ... 'an. T

        Can only appear in the following context:

        • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

          let x : 'a1 ... 'an. T = e ...
        *)
      11. | Ptyp_package of package_type
        (*

        (module S).

        *)
      12. | Ptyp_open of Longident.t Asttypes.loc * core_type
        (*

        M.(T)

        *)
      13. | Ptyp_extension of extension
        (*

        [%id].

        *)
      and package_type = + * Asttypes.label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string Asttypes.loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      • As the core_type of a Ppat_constraint node corresponding to a constraint on a let-binding:

        let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_open of Longident.t Asttypes.loc * core_type
      (*

      M.(T)

      *)
    13. | Ptyp_extension of extension
      (*

      [%id].

      *)

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : Location.t;
    3. prf_attributes : attributes;
    }
    and row_field_desc =
    1. | Rtag of Asttypes.label Asttypes.loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : Location.t;
    3. pof_attributes : attributes;
    }
    and object_field_desc =
    1. | Otag of Asttypes.label Asttypes.loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : Location.t;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string Asttypes.loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string Asttypes.loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of Longident.t Asttypes.loc - * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_effect of pattern * pattern
    18. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    19. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of function_param list * type_constraint option * function_body
      (*

      Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

      • fun P1 ... Pn -> E when body = Pfunction_body E
      • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ]

      C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty).

      A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.

      *)
    5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    6. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    7. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    9. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    10. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    12. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    14. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    15. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    16. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    17. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    18. | Pexp_for of pattern + * (string Asttypes.loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    19. | Ppat_variant of Asttypes.label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    20. | Ppat_record of (Longident.t Asttypes.loc * pattern) list * Asttypes.closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    21. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    22. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    23. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    24. | Ppat_type of Longident.t Asttypes.loc
      (*

      Pattern #tconst

      *)
    25. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    26. | Ppat_unpack of string option Asttypes.loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    27. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    28. | Ppat_effect of pattern * pattern
    29. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    30. | Ppat_open of Longident.t Asttypes.loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : Location.t;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and expression_desc =
    1. | Pexp_ident of Longident.t Asttypes.loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of Asttypes.rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of function_param list * type_constraint option * function_body
      (*

      Pexp_function ([P1; ...; Pn], C, body) represents any construct involving fun or function, including:

      • fun P1 ... Pn -> E when body = Pfunction_body E
      • fun P1 ... Pn -> function p1 -> e1 | ... | pm -> em when body = Pfunction_cases [ p1 -> e1; ...; pm -> em ]

      C represents a type constraint or coercion placed immediately before the arrow, e.g. fun P1 ... Pn : ty -> ... when C = Some (Pconstraint ty).

      A function must have parameters. Pexp_function (params, _, body) must have non-empty params or a Pfunction_cases _ body.

      *)
    5. | Pexp_apply of expression * (Asttypes.arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    6. | Pexp_match of expression * case list
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    7. | Pexp_try of expression * case list
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    9. | Pexp_construct of Longident.t Asttypes.loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    10. | Pexp_variant of Asttypes.label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    11. | Pexp_record of (Longident.t Asttypes.loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    12. | Pexp_field of expression * Longident.t Asttypes.loc
      (*

      E.l

      *)
    13. | Pexp_setfield of expression * Longident.t Asttypes.loc * expression
      (*

      E1.l <- E2

      *)
    14. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    15. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    16. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    17. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    18. | Pexp_for of pattern * expression * expression * Asttypes.direction_flag - * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    19. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    20. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    21. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    22. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    23. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    24. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    25. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    26. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    27. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    28. | Pexp_lazy of expression
      (*

      lazy E

      *)
    29. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    30. | Pexp_object of class_structure
      (*

      object ... end

      *)
    31. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    32. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    33. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    34. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    35. | Pexp_extension of extension
      (*

      [%id]

      *)
    36. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }
    and function_param_desc =
    1. | Pparam_val of Asttypes.arg_label * expression option * pattern
      (*

      Pparam_val (lbl, exp0, P) represents the parameter:

      Note: If E0 is provided, only Optional is allowed.

      *)
    2. | Pparam_newtype of string Asttypes.loc
      (*

      Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

      Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

      [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
      -  { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
      -  { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
      -]

      Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

      *)
    and function_param = {
    1. pparam_loc : Location.t;
    2. pparam_desc : function_param_desc;
    }
    and function_body =
    1. | Pfunction_body of expression
    2. | Pfunction_cases of case list * Location.t * attributes
      (*

      In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

      *)

    See the comment on Pexp_function.

    and type_constraint =
    1. | Pconstraint of core_type
    2. | Pcoerce of core_type option * core_type
      (*

      See the comment on Pexp_function.

      *)

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list + * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    2. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    3. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    4. | Pexp_send of expression * Asttypes.label Asttypes.loc
      (*

      E # m

      *)
    5. | Pexp_new of Longident.t Asttypes.loc
      (*

      new M.c

      *)
    6. | Pexp_setinstvar of Asttypes.label Asttypes.loc * expression
      (*

      x <- 2

      *)
    7. | Pexp_override of (Asttypes.label Asttypes.loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    8. | Pexp_letmodule of string option Asttypes.loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    9. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    10. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    11. | Pexp_lazy of expression
      (*

      lazy E

      *)
    12. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    13. | Pexp_object of class_structure
      (*

      object ... end

      *)
    14. | Pexp_newtype of string Asttypes.loc * expression
      (*

      fun (type t) -> E

      *)
    15. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    16. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    17. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    18. | Pexp_extension of extension
      (*

      [%id]

      *)
    19. | Pexp_unreachable
      (*

      .

      *)
    and case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = {
    1. pbop_op : string Asttypes.loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : Location.t;
    }
    and function_param_desc =
    1. | Pparam_val of Asttypes.arg_label * expression option * pattern
      (*

      Pparam_val (lbl, exp0, P) represents the parameter:

      Note: If E0 is provided, only Optional is allowed.

      *)
    2. | Pparam_newtype of string Asttypes.loc
      (*

      Pparam_newtype x represents the parameter (type x). x carries the location of the identifier, whereas the pparam_loc on the enclosing function_param node is the location of the (type x) as a whole.

      Multiple parameters (type a b c) are represented as multiple Pparam_newtype nodes, let's say:

       [ { pparam_kind = Pparam_newtype a; pparam_loc = loc1 };
      +     { pparam_kind = Pparam_newtype b; pparam_loc = loc2 };
      +     { pparam_kind = Pparam_newtype c; pparam_loc = loc3 };
      +   ]

      Here, the first loc loc1 is the location of (type a b c), and the subsequent locs loc2 and loc3 are the same as loc1, except marked as ghost locations. The locations on a, b, c, correspond to the variables a, b, and c in the source code.

      *)
    and function_param = {
    1. pparam_loc : Location.t;
    2. pparam_desc : function_param_desc;
    }
    and function_body =
    1. | Pfunction_body of expression
    2. | Pfunction_cases of case list * Location.t * attributes
      (*

      In Pfunction_cases (_, loc, attrs), the location extends from the start of the function keyword to the end of the last case. The compiler will only use typechecking-related attributes from attrs, e.g. enabling or disabling a warning.

      *)

    See the comment on Pexp_function.

    and type_constraint =
    1. | Pconstraint of core_type
    2. | Pcoerce of core_type option * core_type
      (*

      See the comment on Pexp_function.

      *)

    Value descriptions

    and value_description = {
    1. pval_name : string Asttypes.loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    5. pval_loc : Location.t;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = {
    1. ptype_name : string Asttypes.loc;
    2. ptype_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * Location.t) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : Asttypes.private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    8. ptype_loc : Location.t;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = {
    1. pld_name : string Asttypes.loc;
    2. pld_mutable : Asttypes.mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : Location.t;
    5. pld_attributes : attributes;
      (*

      l : T [\@id1] [\@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = {
    1. pcd_name : string Asttypes.loc;
    2. pcd_vars : string Asttypes.loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : Location.t;
    6. pcd_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = {
    1. ptyext_path : Longident.t Asttypes.loc;
    2. ptyext_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : Asttypes.private_flag;
    5. ptyext_loc : Location.t;
    6. ptyext_attributes : attributes;
      (*

      ... \@\@id1 \@\@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = {
    1. pext_name : string Asttypes.loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : Location.t;
    4. pext_attributes : attributes;
      (*

      C of ... [\@id1] [\@id2]

      *)
    }
    and type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : Location.t;
    3. ptyexn_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind =
    1. | Pext_decl of string Asttypes.loc list * constructor_arguments - * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc + * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    3. | Pext_rebind of Longident.t Asttypes.loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : Location.t;
    3. pcty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_type_desc =
    1. | Pcty_constr of Longident.t Asttypes.loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of Asttypes.arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : Location.t;
    3. pctf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag - * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc + * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    3. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    4. | Pctf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    5. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = {
    1. pci_virt : Asttypes.virtual_flag;
    2. pci_params : (core_type * (Asttypes.variance * Asttypes.injectivity)) list;
    3. pci_name : string Asttypes.loc;
    4. pci_expr : 'a;
    5. pci_loc : Location.t;
    6. pci_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : Location.t;
    3. pcl_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and class_expr_desc =
    1. | Pcl_constr of Longident.t Asttypes.loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of Asttypes.arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (Asttypes.arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of Asttypes.rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : Location.t;
    3. pcf_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    }
    and class_field_desc =
    1. | Pcf_inherit of Asttypes.override_flag * class_expr * string Asttypes.loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag - * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of Asttypes.label Asttypes.loc + * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    4. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag - * class_field_kind
      (**)
    5. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    6. | Pcf_initializer of expression
      (*

      initializer E

      *)
    7. | Pcf_attribute of attribute
      (*

      [\@\@\@id]

      *)
    8. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
      (*
      • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
      • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
      • Pvc_coercion { ground=None; coercion } represents let x :> typ
      • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }

    let pat : type_constraint = exp

    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    \ No newline at end of file + * class_field_kind
    (**)
  • | Pcf_constraint of core_type * core_type
    (*

    constraint T1 = T2

    *)
  • | Pcf_initializer of expression
    (*

    initializer E

    *)
  • | Pcf_attribute of attribute
    (*

    [\@\@\@id]

    *)
  • | Pcf_extension of extension
    (*

    [%%id]

    *)
  • and class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of Asttypes.override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : Location.t;
    3. pmty_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_type_desc =
    1. | Pmty_ident of Longident.t Asttypes.loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of Longident.t Asttypes.loc
      (*

      (module M)

      *)
    and functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option Asttypes.loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : Location.t;
    }
    and signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [\@\@\@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = {
    1. pmd_name : string option Asttypes.loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmd_loc : Location.t;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = {
    1. pms_name : string Asttypes.loc;
    2. pms_manifest : Longident.t Asttypes.loc;
    3. pms_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pms_loc : Location.t;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = {
    1. pmtd_name : string Asttypes.loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [\@\@id1] [\@\@id2]

      *)
    4. pmtd_loc : Location.t;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = {
    1. popen_expr : 'a;
    2. popen_override : Asttypes.override_flag;
    3. popen_loc : Location.t;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = Longident.t Asttypes.loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : Location.t;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint =
    1. | Pwith_type of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of Longident.t Asttypes.loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of Longident.t Asttypes.loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of Longident.t Asttypes.loc * Longident.t Asttypes.loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : Location.t;
    3. pmod_attributes : attributes;
      (*

      ... [\@id1] [\@id2]

      *)
    }
    and module_expr_desc =
    1. | Pmod_ident of Longident.t Asttypes.loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_apply_unit of module_expr
      (*

      ME1()

      *)
    6. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    7. | Pmod_unpack of expression
      (*

      (val E)

      *)
    8. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : Location.t;
    }
    and structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of Asttypes.rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of Asttypes.rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [\@\@\@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_constraint =
    1. | Pvc_constraint of {
      1. locally_abstract_univars : string Asttypes.loc list;
      2. typ : core_type;
      }
    2. | Pvc_coercion of {
      1. ground : core_type option;
      2. coercion : core_type;
      }
      (*
      • Pvc_constraint { locally_abstract_univars=[]; typ} is a simple type constraint on a value binding: let x : typ
      • More generally, in Pvc_constraint { locally_abstract_univars; typ} locally_abstract_univars is the list of locally abstract type variables in let x: type a ... . typ
      • Pvc_coercion { ground=None; coercion } represents let x :> typ
      • Pvc_coercion { ground=Some g; coercion } represents let x : g :> typ
      *)
    and value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_constraint : value_constraint option;
    4. pvb_attributes : attributes;
    5. pvb_loc : Location.t;
    }

    let pat : type_constraint = exp

    and module_binding = {
    1. pmb_name : string option Asttypes.loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : Location.t;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    type toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = {
    1. pdir_name : string Asttypes.loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : Location.t;
    }
    and directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : Location.t;
    }
    and directive_argument_desc =
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of Longident.t
    4. | Pdir_bool of bool
    diff --git a/ppxlib/Astlib/Ast_503/index.html b/ppxlib/Astlib/Ast_503/index.html index a839b21..ffd3e63 100644 --- a/ppxlib/Astlib/Ast_503/index.html +++ b/ppxlib/Astlib/Ast_503/index.html @@ -1,2 +1,2 @@ -Ast_503 (ppxlib.Astlib.Ast_503)

    Module Astlib.Ast_503

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast_503 (ppxlib.Astlib.Ast_503)

    Module Astlib.Ast_503

    module Asttypes : sig ... end
    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Astlib/Ast_metadata/index.html b/ppxlib/Astlib/Ast_metadata/index.html index 25568f1..394e452 100644 --- a/ppxlib/Astlib/Ast_metadata/index.html +++ b/ppxlib/Astlib/Ast_metadata/index.html @@ -1,14 +1,14 @@ -Ast_metadata (ppxlib.Astlib.Ast_metadata)

    Module Astlib.Ast_metadata

    Meta data related interface for a ppx rewriter

    val add_ppx_context_str : - tool_name:string -> +Ast_metadata (ppxlib.Astlib.Ast_metadata)

    Module Astlib.Ast_metadata

    Meta data related interface for a ppx rewriter

    val add_ppx_context_str : + tool_name:string -> Parsetree.structure_item list -> Parsetree.structure_item list

    Extract information from the current environment and encode it into an attribute which is prepended to the list of structure items in order to pass the information to an external processor.

    val drop_ppx_context_str : - restore:bool -> + restore:bool -> Parsetree.structure_item list -> Parsetree.structure_item list

    Drop the ocaml.ppx.context attribute from a structure. If restore is true, also restore the associated data in the current process.

    val add_ppx_context_sig : - tool_name:string -> + tool_name:string -> Parsetree.signature_item list -> Parsetree.signature_item list

    Same as add_ppx_context_str, but for signatures.

    val drop_ppx_context_sig : - restore:bool -> + restore:bool -> Parsetree.signature_item list -> - Parsetree.signature_item list

    Same as drop_ppx_context_str, but for signatures.

    val tool_name : unit -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ...

    Cookies

    Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

    \ No newline at end of file + Parsetree.signature_item list

    Same as drop_ppx_context_str, but for signatures.

    val tool_name : unit -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldoc", "ocamldep", "ocaml", ...

    Cookies

    Cookies are used to pass information from a ppx processor to a further invocation of itself, when called from the OCaml toplevel (or other tools that support cookies).

    diff --git a/ppxlib/Astlib/Compiler_pprintast/index.html b/ppxlib/Astlib/Compiler_pprintast/index.html index 446703e..28ea0ed 100644 --- a/ppxlib/Astlib/Compiler_pprintast/index.html +++ b/ppxlib/Astlib/Compiler_pprintast/index.html @@ -1,5 +1,5 @@ -Compiler_pprintast (ppxlib.Astlib.Compiler_pprintast)

    Module Astlib.Compiler_pprintast

    include module type of struct include Ocaml_common.Pprintast end
    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val expression : Stdlib.Format.formatter -> Parsetree.expression -> unit
    val string_of_expression : Parsetree.expression -> string
    val core_type : Stdlib.Format.formatter -> Parsetree.core_type -> unit
    val signature : Stdlib.Format.formatter -> Parsetree.signature -> unit
    val structure : Stdlib.Format.formatter -> Parsetree.structure -> unit
    val string_of_structure : Parsetree.structure -> string
    val module_expr : Stdlib.Format.formatter -> Parsetree.module_expr -> unit
    val toplevel_phrase : +Compiler_pprintast (ppxlib.Astlib.Compiler_pprintast)

    Module Astlib.Compiler_pprintast

    include module type of struct include Ocaml_common.Pprintast end
    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val longident : Stdlib.Format.formatter -> Longident.t -> unit
    val expression : Stdlib.Format.formatter -> Parsetree.expression -> unit
    val string_of_expression : Parsetree.expression -> string
    val core_type : Stdlib.Format.formatter -> Parsetree.core_type -> unit
    val signature : Stdlib.Format.formatter -> Parsetree.signature -> unit
    val structure : Stdlib.Format.formatter -> Parsetree.structure -> unit
    val string_of_structure : Parsetree.structure -> string
    val module_expr : Stdlib.Format.formatter -> Parsetree.module_expr -> unit
    val toplevel_phrase : Stdlib.Format.formatter -> Parsetree.toplevel_phrase -> unit
    val class_field : Stdlib.Format.formatter -> Parsetree.class_field -> unit
    val class_type_field : @@ -11,4 +11,4 @@ unit
    val signature_item : Stdlib.Format.formatter -> Parsetree.signature_item -> - unit
    exception Unavailable
    \ No newline at end of file + unit
    exception Unavailable
    diff --git a/ppxlib/Astlib/Config/index.html b/ppxlib/Astlib/Config/index.html index d5179d6..7397b5a 100644 --- a/ppxlib/Astlib/Config/index.html +++ b/ppxlib/Astlib/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Astlib.Config)

    Module Astlib.Config

    Magic numbers

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    \ No newline at end of file +Config (ppxlib.Astlib.Config)

    Module Astlib.Config

    Magic numbers

    val ast_intf_magic_number : string

    Magic number for file holding an interface syntax tree

    val ast_impl_magic_number : string

    Magic number for file holding an implementation syntax tree

    diff --git a/ppxlib/Astlib/Keyword/index.html b/ppxlib/Astlib/Keyword/index.html index 998e186..584cefc 100644 --- a/ppxlib/Astlib/Keyword/index.html +++ b/ppxlib/Astlib/Keyword/index.html @@ -1,2 +1,2 @@ -Keyword (ppxlib.Astlib.Keyword)

    Module Astlib.Keyword

    val is_keyword : string -> bool

    Check if a string is an OCaml keyword.

    val apply_keyword_edition : cli:string option -> unit -> unit

    Processes any keywords= sections from the OCAMLPARAM environment variable and CLI option and initialises the compiler's lexer with the correct keyword set.

    \ No newline at end of file +Keyword (ppxlib.Astlib.Keyword)

    Module Astlib.Keyword

    val is_keyword : string -> bool

    Check if a string is an OCaml keyword.

    val apply_keyword_edition : cli:string option -> unit -> unit

    Processes any keywords= sections from the OCAMLPARAM environment variable and CLI option and initialises the compiler's lexer with the correct keyword set.

    diff --git a/ppxlib/Astlib/Location/Error/index.html b/ppxlib/Astlib/Location/Error/index.html index 98587bb..2382416 100644 --- a/ppxlib/Astlib/Location/Error/index.html +++ b/ppxlib/Astlib/Location/Error/index.html @@ -1,2 +1,2 @@ -Error (ppxlib.Astlib.Location.Error)

    Module Location.Error

    type t

    The location error type. It contains a located main message and a (possibly empty) list of located submessages.

    val is_well_formed : t -> bool

    A location error constructed via make is always well-formed. A malformed location error is a value of type location_report on compilers >= 4.08, whose kind is different from Report_error. Notice that location_report does not explicitly form part of Astlib.

    val main_msg : t -> string loc

    Get the located error main message.

    val sub_msgs : t -> string loc list

    Get the located error sub-messages.

    val set_main_msg : t -> string -> t

    Set the text of the error's main message. The location stays as is.

    val set_main_loc : t -> t -> t

    Set the location of the error's main message. The text satys as is.

    val make : sub:string loc list -> string loc -> t

    Construct a location error.

    val of_exn : exn -> t option

    Turn an exception into a location error, if possible.

    \ No newline at end of file +Error (ppxlib.Astlib.Location.Error)

    Module Location.Error

    type t

    The location error type. It contains a located main message and a (possibly empty) list of located submessages.

    val is_well_formed : t -> bool

    A location error constructed via make is always well-formed. A malformed location error is a value of type location_report on compilers >= 4.08, whose kind is different from Report_error. Notice that location_report does not explicitly form part of Astlib.

    val main_msg : t -> string loc

    Get the located error main message.

    val sub_msgs : t -> string loc list

    Get the located error sub-messages.

    val set_main_msg : t -> string -> t

    Set the text of the error's main message. The location stays as is.

    val set_main_loc : t -> t -> t

    Set the location of the error's main message. The text satys as is.

    val make : sub:string loc list -> string loc -> t

    Construct a location error.

    val of_exn : exn -> t option

    Turn an exception into a location error, if possible.

    diff --git a/ppxlib/Astlib/Location/index.html b/ppxlib/Astlib/Location/index.html index 14b12db..88eee06 100644 --- a/ppxlib/Astlib/Location/index.html +++ b/ppxlib/Astlib/Location/index.html @@ -1,5 +1,5 @@ -Location (ppxlib.Astlib.Location)

    Module Astlib.Location

    Source code locations (ranges of positions), used in parsetrees

    type t = Ocaml_common.Location.t = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }

    The location type

    type 'a loc = 'a Ocaml_common.Location.loc = {
    1. txt : 'a;
    2. loc : t;
    }

    A located type

    module Error : sig ... end
    val set_input_name : string -> unit

    Set the name of the input source, e.g. the file name.

    val set_input_lexbuf : Stdlib.Lexing.lexbuf option -> unit

    Set the name of the input source, e.g. the file name.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    Automatically reporting errors for raised exceptions

    val register_error_of_exn : (exn -> Error.t option) -> unit

    Each compiler module which defines a custom type of exception which can surface as a user-visible error should register a "printer" for this exception using register_error_of_exn. The result of the printer is an error value containing a location, a message, and optionally sub-messages (each of them being located as well).

    exception Error of Error.t

    Located exception.

    val raise_errorf : - ?loc:t -> +Location (ppxlib.Astlib.Location)

    Module Astlib.Location

    Source code locations (ranges of positions), used in parsetrees

    type t = Ocaml_common.Location.t = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }

    The location type

    type 'a loc = 'a Ocaml_common.Location.loc = {
    1. txt : 'a;
    2. loc : t;
    }

    A located type

    module Error : sig ... end
    val set_input_name : string -> unit

    Set the name of the input source, e.g. the file name.

    val set_input_lexbuf : Stdlib.Lexing.lexbuf option -> unit

    Set the name of the input source, e.g. the file name.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    Automatically reporting errors for raised exceptions

    val register_error_of_exn : (exn -> Error.t option) -> unit

    Each compiler module which defines a custom type of exception which can surface as a user-visible error should register a "printer" for this exception using register_error_of_exn. The result of the printer is an error value containing a location, a message, and optionally sub-messages (each of them being located as well).

    exception Error of Error.t

    Located exception.

    val raise_errorf : + ?loc:t -> ('a, Stdlib.Format.formatter, unit, 'b) format4 -> - 'a

    Raise a located exception.

    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Report an exception on the given formatter

    \ No newline at end of file + 'a

    Raise a located exception.

    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Report an exception on the given formatter

    diff --git a/ppxlib/Astlib/Longident/index.html b/ppxlib/Astlib/Longident/index.html index e4a3c1e..13cc248 100644 --- a/ppxlib/Astlib/Longident/index.html +++ b/ppxlib/Astlib/Longident/index.html @@ -1,2 +1,2 @@ -Longident (ppxlib.Astlib.Longident)

    Module Astlib.Longident

    Long identifiers, used in parsetrees.

    type t = Ocaml_common.Longident.t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t

    The long identifier type

    val flatten : t -> string list

    Flatten a long identifier built upon Lident and Ldot. Raise when hitting Lapply.

    val parse : string -> t

    Parse a string into a long identifier built upon Lident and Ldot.

    \ No newline at end of file +Longident (ppxlib.Astlib.Longident)

    Module Astlib.Longident

    Long identifiers, used in parsetrees.

    type t = Ocaml_common.Longident.t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t

    The long identifier type

    val flatten : t -> string list

    Flatten a long identifier built upon Lident and Ldot. Raise when hitting Lapply.

    val parse : string -> t

    Parse a string into a long identifier built upon Lident and Ldot.

    diff --git a/ppxlib/Astlib/Migrate_408_409/index.html b/ppxlib/Astlib/Migrate_408_409/index.html index 931c044..aa9f5d0 100644 --- a/ppxlib/Astlib/Migrate_408_409/index.html +++ b/ppxlib/Astlib/Migrate_408_409/index.html @@ -1,5 +1,5 @@ -Migrate_408_409 (ppxlib.Astlib.Migrate_408_409)

    Module Astlib.Migrate_408_409

    module From = Ast_408
    module To = Ast_409
    val copy_toplevel_phrase : +Migrate_408_409 (ppxlib.Astlib.Migrate_408_409)

    Module Astlib.Migrate_408_409

    module From = Ast_408
    module To = Ast_409
    val copy_toplevel_directive : Ast_408.Parsetree.toplevel_directive -> @@ -133,4 +133,4 @@ Ast_409.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_408.Asttypes.loc -> - 'g0 Ast_409.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_409.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_409_408/index.html b/ppxlib/Astlib/Migrate_409_408/index.html index 619c3e5..f924105 100644 --- a/ppxlib/Astlib/Migrate_409_408/index.html +++ b/ppxlib/Astlib/Migrate_409_408/index.html @@ -1,5 +1,5 @@ -Migrate_409_408 (ppxlib.Astlib.Migrate_409_408)

    Module Astlib.Migrate_409_408

    module From = Ast_409
    module To = Ast_408
    val copy_toplevel_phrase : +Migrate_409_408 (ppxlib.Astlib.Migrate_409_408)

    Module Astlib.Migrate_409_408

    module From = Ast_409
    module To = Ast_408
    val copy_toplevel_directive : Ast_409.Parsetree.toplevel_directive -> @@ -133,4 +133,4 @@ Ast_408.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> - 'g0 Ast_408.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_408.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_409_410/index.html b/ppxlib/Astlib/Migrate_409_410/index.html index f14dad9..2a6eb23 100644 --- a/ppxlib/Astlib/Migrate_409_410/index.html +++ b/ppxlib/Astlib/Migrate_409_410/index.html @@ -1,5 +1,5 @@ -Migrate_409_410 (ppxlib.Astlib.Migrate_409_410)

    Module Astlib.Migrate_409_410

    module From = Ast_409
    module To = Ast_410
    val map_option : ('a -> 'b) -> 'c option -> 'd option
    val copy_toplevel_phrase : +Migrate_409_410 (ppxlib.Astlib.Migrate_409_410)

    Module Astlib.Migrate_409_410

    module From = Ast_409
    module To = Ast_410
    val map_option : ('a -> 'b) -> 'a option -> 'b option
    val copy_toplevel_directive : Ast_409.Parsetree.toplevel_directive -> @@ -133,4 +133,4 @@ Ast_410.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_409.Asttypes.loc -> - 'g0 Ast_410.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_410.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_410_409/index.html b/ppxlib/Astlib/Migrate_410_409/index.html index 63bf5b8..ac6fd89 100644 --- a/ppxlib/Astlib/Migrate_410_409/index.html +++ b/ppxlib/Astlib/Migrate_410_409/index.html @@ -1,5 +1,5 @@ -Migrate_410_409 (ppxlib.Astlib.Migrate_410_409)

    Module Astlib.Migrate_410_409

    module From = Ast_410
    module To = Ast_409
    val migration_error : Location.t -> string -> 'a
    val map_option : ('a -> 'b) -> 'c option -> 'd option
    val copy_toplevel_phrase : +Migrate_410_409 (ppxlib.Astlib.Migrate_410_409)

    Module Astlib.Migrate_410_409

    module From = Ast_410
    module To = Ast_409
    val migration_error : Location.t -> string -> 'a
    val map_option : ('a -> 'b) -> 'a option -> 'b option
    val copy_toplevel_directive : Ast_410.Parsetree.toplevel_directive -> @@ -135,4 +135,4 @@ Ast_409.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> - 'g0 Ast_409.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_409.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_410_411/index.html b/ppxlib/Astlib/Migrate_410_411/index.html index 26376d7..152f3e2 100644 --- a/ppxlib/Astlib/Migrate_410_411/index.html +++ b/ppxlib/Astlib/Migrate_410_411/index.html @@ -1,5 +1,5 @@ -Migrate_410_411 (ppxlib.Astlib.Migrate_410_411)

    Module Astlib.Migrate_410_411

    module From = Ast_410
    module To = Ast_411
    val copy_toplevel_phrase : +Migrate_410_411 (ppxlib.Astlib.Migrate_410_411)

    Module Astlib.Migrate_410_411

    module From = Ast_410
    module To = Ast_411
    val copy_toplevel_directive : Ast_410.Parsetree.toplevel_directive -> @@ -137,4 +137,4 @@ Ast_411.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_410.Asttypes.loc -> - 'g0 Ast_411.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_411.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_411_410/index.html b/ppxlib/Astlib/Migrate_411_410/index.html index e348b65..dd4453d 100644 --- a/ppxlib/Astlib/Migrate_411_410/index.html +++ b/ppxlib/Astlib/Migrate_411_410/index.html @@ -1,5 +1,5 @@ -Migrate_411_410 (ppxlib.Astlib.Migrate_411_410)

    Module Astlib.Migrate_411_410

    module From = Ast_411
    module To = Ast_410
    val copy_toplevel_phrase : +Migrate_411_410 (ppxlib.Astlib.Migrate_411_410)

    Module Astlib.Migrate_411_410

    module From = Ast_411
    module To = Ast_410
    val copy_toplevel_directive : Ast_411.Parsetree.toplevel_directive -> @@ -137,4 +137,4 @@ Ast_410.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> - 'g0 Ast_410.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_410.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_411_412/index.html b/ppxlib/Astlib/Migrate_411_412/index.html index 86bf119..c58ad77 100644 --- a/ppxlib/Astlib/Migrate_411_412/index.html +++ b/ppxlib/Astlib/Migrate_411_412/index.html @@ -1,5 +1,5 @@ -Migrate_411_412 (ppxlib.Astlib.Migrate_411_412)

    Module Astlib.Migrate_411_412

    module From = Ast_411
    module To = Ast_412
    val copy_toplevel_phrase : +Migrate_411_412 (ppxlib.Astlib.Migrate_411_412)

    Module Astlib.Migrate_411_412

    module From = Ast_411
    module To = Ast_412
    val copy_toplevel_directive : Ast_411.Parsetree.toplevel_directive -> @@ -137,4 +137,4 @@ Ast_412.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_411.Asttypes.loc -> - 'g0 Ast_412.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_412.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_412_411/index.html b/ppxlib/Astlib/Migrate_412_411/index.html index e3a0e87..70af6f0 100644 --- a/ppxlib/Astlib/Migrate_412_411/index.html +++ b/ppxlib/Astlib/Migrate_412_411/index.html @@ -1,5 +1,5 @@ -Migrate_412_411 (ppxlib.Astlib.Migrate_412_411)

    Module Astlib.Migrate_412_411

    module From = Ast_412
    module To = Ast_411
    val copy_toplevel_phrase : +Migrate_412_411 (ppxlib.Astlib.Migrate_412_411)

    Module Astlib.Migrate_412_411

    module From = Ast_412
    module To = Ast_411
    val copy_toplevel_directive : Ast_412.Parsetree.toplevel_directive -> @@ -137,4 +137,4 @@ Ast_411.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> - 'g0 Ast_411.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_411.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_412_413/index.html b/ppxlib/Astlib/Migrate_412_413/index.html index 8737d02..024b1ad 100644 --- a/ppxlib/Astlib/Migrate_412_413/index.html +++ b/ppxlib/Astlib/Migrate_412_413/index.html @@ -1,5 +1,5 @@ -Migrate_412_413 (ppxlib.Astlib.Migrate_412_413)

    Module Astlib.Migrate_412_413

    module From = Ast_412
    module To = Ast_413
    val copy_toplevel_phrase : +Migrate_412_413 (ppxlib.Astlib.Migrate_412_413)

    Module Astlib.Migrate_412_413

    module From = Ast_412
    module To = Ast_413
    val copy_toplevel_directive : Ast_412.Parsetree.toplevel_directive -> @@ -139,4 +139,4 @@ Ast_413.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_412.Asttypes.loc -> - 'g0 Ast_413.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_413.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_413_412/index.html b/ppxlib/Astlib/Migrate_413_412/index.html index 4be285b..0d977e7 100644 --- a/ppxlib/Astlib/Migrate_413_412/index.html +++ b/ppxlib/Astlib/Migrate_413_412/index.html @@ -1,5 +1,5 @@ -Migrate_413_412 (ppxlib.Astlib.Migrate_413_412)

    Module Astlib.Migrate_413_412

    module From = Ast_413
    module To = Ast_412
    val migration_error : Location.t -> string -> 'a
    val copy_toplevel_phrase : +Migrate_413_412 (ppxlib.Astlib.Migrate_413_412)

    Module Astlib.Migrate_413_412

    module From = Ast_413
    module To = Ast_412
    val migration_error : Location.t -> string -> 'a
    val copy_toplevel_directive : Ast_413.Parsetree.toplevel_directive -> @@ -139,4 +139,4 @@ Ast_412.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> - 'g0 Ast_412.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_412.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_413_414/index.html b/ppxlib/Astlib/Migrate_413_414/index.html index 08e5e50..c98d134 100644 --- a/ppxlib/Astlib/Migrate_413_414/index.html +++ b/ppxlib/Astlib/Migrate_413_414/index.html @@ -1,5 +1,5 @@ -Migrate_413_414 (ppxlib.Astlib.Migrate_413_414)

    Module Astlib.Migrate_413_414

    module From = Ast_413
    module To = Ast_414
    val copy_toplevel_phrase : +Migrate_413_414 (ppxlib.Astlib.Migrate_413_414)

    Module Astlib.Migrate_413_414

    module From = Ast_413
    module To = Ast_414
    val copy_toplevel_directive : Ast_413.Parsetree.toplevel_directive -> @@ -139,4 +139,4 @@ Ast_414.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_413.Asttypes.loc -> - 'g0 Ast_414.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_414.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_414_413/index.html b/ppxlib/Astlib/Migrate_414_413/index.html index a563df8..c65fac0 100644 --- a/ppxlib/Astlib/Migrate_414_413/index.html +++ b/ppxlib/Astlib/Migrate_414_413/index.html @@ -1,5 +1,5 @@ -Migrate_414_413 (ppxlib.Astlib.Migrate_414_413)

    Module Astlib.Migrate_414_413

    module From = Ast_414
    module To = Ast_413
    val migration_error : Location.t -> string -> 'a
    val copy_toplevel_phrase : +Migrate_414_413 (ppxlib.Astlib.Migrate_414_413)

    Module Astlib.Migrate_414_413

    module From = Ast_414
    module To = Ast_413
    val migration_error : Location.t -> string -> 'a
    val copy_toplevel_directive : Ast_414.Parsetree.toplevel_directive -> @@ -139,4 +139,4 @@ Ast_413.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_414.Asttypes.loc -> - 'g0 Ast_413.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_413.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_414_500/index.html b/ppxlib/Astlib/Migrate_414_500/index.html index 84d0019..0259f47 100644 --- a/ppxlib/Astlib/Migrate_414_500/index.html +++ b/ppxlib/Astlib/Migrate_414_500/index.html @@ -1,5 +1,5 @@ -Migrate_414_500 (ppxlib.Astlib.Migrate_414_500)

    Module Astlib.Migrate_414_500

    module From = Ast_414
    module To = Ast_500
    val copy_toplevel_phrase : +Migrate_414_500 (ppxlib.Astlib.Migrate_414_500)

    Module Astlib.Migrate_414_500

    \ No newline at end of file + Ast_500.Parsetree.structure_item
    diff --git a/ppxlib/Astlib/Migrate_500_414/index.html b/ppxlib/Astlib/Migrate_500_414/index.html index f6b65d6..04cccda 100644 --- a/ppxlib/Astlib/Migrate_500_414/index.html +++ b/ppxlib/Astlib/Migrate_500_414/index.html @@ -1,5 +1,5 @@ -Migrate_500_414 (ppxlib.Astlib.Migrate_500_414)

    Module Astlib.Migrate_500_414

    module From = Ast_500
    module To = Ast_414
    val copy_toplevel_phrase : +Migrate_500_414 (ppxlib.Astlib.Migrate_500_414)

    Module Astlib.Migrate_500_414

    \ No newline at end of file + Ast_414.Parsetree.structure_item
    diff --git a/ppxlib/Astlib/Migrate_500_501/index.html b/ppxlib/Astlib/Migrate_500_501/index.html index 0a87d0d..097bd14 100644 --- a/ppxlib/Astlib/Migrate_500_501/index.html +++ b/ppxlib/Astlib/Migrate_500_501/index.html @@ -1,5 +1,5 @@ -Migrate_500_501 (ppxlib.Astlib.Migrate_500_501)

    Module Astlib.Migrate_500_501

    module From = Ast_500
    module To = Ast_501
    val copy_toplevel_phrase : +Migrate_500_501 (ppxlib.Astlib.Migrate_500_501)

    Module Astlib.Migrate_500_501

    module From = Ast_500
    module To = Ast_501
    val copy_toplevel_directive : Ast_500.Parsetree.toplevel_directive -> @@ -139,4 +139,4 @@ Ast_501.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_500.Asttypes.loc -> - 'g0 Ast_501.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_501.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_501_500/index.html b/ppxlib/Astlib/Migrate_501_500/index.html index 6d2d8da..7fda758 100644 --- a/ppxlib/Astlib/Migrate_501_500/index.html +++ b/ppxlib/Astlib/Migrate_501_500/index.html @@ -1,5 +1,5 @@ -Migrate_501_500 (ppxlib.Astlib.Migrate_501_500)

    Module Astlib.Migrate_501_500

    module From = Ast_501
    module To = Ast_500
    val copy_toplevel_phrase : +Migrate_501_500 (ppxlib.Astlib.Migrate_501_500)

    Module Astlib.Migrate_501_500

    module From = Ast_501
    module To = Ast_500
    val copy_toplevel_directive : Ast_501.Parsetree.toplevel_directive -> @@ -140,4 +140,4 @@ Ast_500.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> - 'g0 Ast_500.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_500.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_501_502/index.html b/ppxlib/Astlib/Migrate_501_502/index.html index 3d05bda..1daa01f 100644 --- a/ppxlib/Astlib/Migrate_501_502/index.html +++ b/ppxlib/Astlib/Migrate_501_502/index.html @@ -1,5 +1,5 @@ -Migrate_501_502 (ppxlib.Astlib.Migrate_501_502)

    Module Astlib.Migrate_501_502

    module From = Ast_501
    module To = Ast_502
    val extract_attr : +Migrate_501_502 (ppxlib.Astlib.Migrate_501_502)

    Module Astlib.Migrate_501_502

    module From = Ast_501
    module To = Ast_502

    Look for a particular attribute and remove it from the list. Attributes are used to make certain migrations round-trip. Returns None if the specified attribute is not found.

    val migrate_ppx_context_load_path : @@ -151,4 +151,4 @@ Ast_502.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_501.Asttypes.loc -> - 'g0 Ast_502.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_502.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_502_501/index.html b/ppxlib/Astlib/Migrate_502_501/index.html index 3f74fac..2a1df53 100644 --- a/ppxlib/Astlib/Migrate_502_501/index.html +++ b/ppxlib/Astlib/Migrate_502_501/index.html @@ -1,5 +1,5 @@ -Migrate_502_501 (ppxlib.Astlib.Migrate_502_501)

    Module Astlib.Migrate_502_501

    module From = Ast_502
    module To = Ast_501
    val migration_error : Location.t -> string -> 'a
    val mk_ghost_attr : string -> Ast_501.Parsetree.attribute
    val concat_list_lit : +Migrate_502_501 (ppxlib.Astlib.Migrate_502_501)

    Module Astlib.Migrate_502_501

    module From = Ast_502
    module To = Ast_501
    val migration_error : Location.t -> string -> 'a
    val mk_ghost_attr : string -> Ast_501.Parsetree.attribute
    val migrate_ppx_context_load_path : @@ -151,4 +151,4 @@ Ast_501.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> - 'g0 Ast_501.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_501.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_502_503/index.html b/ppxlib/Astlib/Migrate_502_503/index.html index 9b44d26..dc6f594 100644 --- a/ppxlib/Astlib/Migrate_502_503/index.html +++ b/ppxlib/Astlib/Migrate_502_503/index.html @@ -1,5 +1,5 @@ -Migrate_502_503 (ppxlib.Astlib.Migrate_502_503)

    Module Astlib.Migrate_502_503

    module From = Ast_502
    module To = Ast_503
    val copy_toplevel_phrase : +Migrate_502_503 (ppxlib.Astlib.Migrate_502_503)

    Module Astlib.Migrate_502_503

    module From = Ast_502
    module To = Ast_503
    val copy_toplevel_directive : Ast_502.Parsetree.toplevel_directive -> @@ -149,4 +149,4 @@ Ast_503.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_502.Asttypes.loc -> - 'g0 Ast_503.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_503.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Migrate_503_502/index.html b/ppxlib/Astlib/Migrate_503_502/index.html index b09b22a..38f0129 100644 --- a/ppxlib/Astlib/Migrate_503_502/index.html +++ b/ppxlib/Astlib/Migrate_503_502/index.html @@ -1,5 +1,5 @@ -Migrate_503_502 (ppxlib.Astlib.Migrate_503_502)

    Module Astlib.Migrate_503_502

    module From = Ast_503
    module To = Ast_502
    val copy_toplevel_phrase : +Migrate_503_502 (ppxlib.Astlib.Migrate_503_502)

    Module Astlib.Migrate_503_502

    module From = Ast_503
    module To = Ast_502
    val copy_toplevel_directive : Ast_503.Parsetree.toplevel_directive -> @@ -150,4 +150,4 @@ Ast_502.Asttypes.closed_flag
    val copy_Longident_t : Longident.t -> Longident.t
    val copy_loc : 'f0 'g0. ('f0 -> 'g0) -> 'f0 Ast_503.Asttypes.loc -> - 'g0 Ast_502.Asttypes.loc
    val copy_location : Location.t -> Location.t
    \ No newline at end of file + 'g0 Ast_502.Asttypes.loc
    val copy_location : Location.t -> Location.t
    diff --git a/ppxlib/Astlib/Parse/index.html b/ppxlib/Astlib/Parse/index.html index 1c02aeb..9492b3d 100644 --- a/ppxlib/Astlib/Parse/index.html +++ b/ppxlib/Astlib/Parse/index.html @@ -1,2 +1,2 @@ -Parse (ppxlib.Astlib.Parse)

    Module Astlib.Parse

    Entry points in the parser

    val implementation : Stdlib.Lexing.lexbuf -> Parsetree.structure_item list

    Parse a structure

    Parse a signature

    Parse a toplevel phrase

    Parse a series of toplevel phrases

    Parse a core type

    Parse an expression

    Parse a pattern

    \ No newline at end of file +Parse (ppxlib.Astlib.Parse)

    Module Astlib.Parse

    Entry points in the parser

    val implementation : Stdlib.Lexing.lexbuf -> Parsetree.structure_item list

    Parse a structure

    Parse a signature

    Parse a toplevel phrase

    Parse a series of toplevel phrases

    Parse a core type

    Parse an expression

    Parse a pattern

    diff --git a/ppxlib/Astlib/Pprintast/index.html b/ppxlib/Astlib/Pprintast/index.html index 500fd46..a3a7a8f 100644 --- a/ppxlib/Astlib/Pprintast/index.html +++ b/ppxlib/Astlib/Pprintast/index.html @@ -1,5 +1,5 @@ -Pprintast (ppxlib.Astlib.Pprintast)

    Module Astlib.Pprintast

    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val toplevel_phrase : +Pprintast (ppxlib.Astlib.Pprintast)

    Module Astlib.Pprintast

    type space_formatter = (unit, Stdlib.Format.formatter, unit) format
    val expression : @@ -41,4 +41,4 @@ unit
    \ No newline at end of file + unit
    diff --git a/ppxlib/Astlib/index.html b/ppxlib/Astlib/index.html index ec21cd1..302903e 100644 --- a/ppxlib/Astlib/index.html +++ b/ppxlib/Astlib/index.html @@ -1,2 +1,2 @@ -Astlib (ppxlib.Astlib)

    Module Astlib

    module Ast_408 : sig ... end
    module Ast_409 : sig ... end
    module Ast_410 : sig ... end
    module Ast_411 : sig ... end
    module Ast_412 : sig ... end
    module Ast_413 : sig ... end
    module Ast_414 : sig ... end
    module Ast_500 : sig ... end
    module Ast_501 : sig ... end
    module Ast_502 : sig ... end
    module Ast_503 : sig ... end
    module Migrate_408_409 : sig ... end
    module Migrate_409_408 : sig ... end
    module Migrate_409_410 : sig ... end
    module Migrate_410_409 : sig ... end
    module Migrate_410_411 : sig ... end
    module Migrate_411_410 : sig ... end
    module Migrate_411_412 : sig ... end
    module Migrate_412_411 : sig ... end
    module Migrate_412_413 : sig ... end
    module Migrate_413_412 : sig ... end
    module Migrate_413_414 : sig ... end
    module Migrate_414_413 : sig ... end
    module Migrate_414_500 : sig ... end
    module Migrate_500_414 : sig ... end
    module Migrate_500_501 : sig ... end
    module Migrate_501_500 : sig ... end
    module Migrate_501_502 : sig ... end
    module Migrate_502_501 : sig ... end
    module Migrate_502_503 : sig ... end
    module Migrate_503_502 : sig ... end
    module Ast_metadata : sig ... end

    Meta data related interface for a ppx rewriter

    module Config : sig ... end

    Magic numbers

    module Keyword : sig ... end
    module Location : sig ... end

    Source code locations (ranges of positions), used in parsetrees

    module Longident : sig ... end

    Long identifiers, used in parsetrees.

    module Parse : sig ... end

    Entry points in the parser

    module Pprintast : sig ... end
    module Compiler_pprintast : sig ... end
    val init_error_reporting_style_using_env_vars : unit -> unit

    Adjust the reporting style of error messages to the environment variables OCAML_COLOR and OCAML_ERROR_STYLE.

    \ No newline at end of file +Astlib (ppxlib.Astlib)

    Module Astlib

    module Ast_408 : sig ... end
    module Ast_409 : sig ... end
    module Ast_410 : sig ... end
    module Ast_411 : sig ... end
    module Ast_412 : sig ... end
    module Ast_413 : sig ... end
    module Ast_414 : sig ... end
    module Ast_500 : sig ... end
    module Ast_501 : sig ... end
    module Ast_502 : sig ... end
    module Ast_503 : sig ... end
    module Migrate_408_409 : sig ... end
    module Migrate_409_408 : sig ... end
    module Migrate_409_410 : sig ... end
    module Migrate_410_409 : sig ... end
    module Migrate_410_411 : sig ... end
    module Migrate_411_410 : sig ... end
    module Migrate_411_412 : sig ... end
    module Migrate_412_411 : sig ... end
    module Migrate_412_413 : sig ... end
    module Migrate_413_412 : sig ... end
    module Migrate_413_414 : sig ... end
    module Migrate_414_413 : sig ... end
    module Migrate_414_500 : sig ... end
    module Migrate_500_414 : sig ... end
    module Migrate_500_501 : sig ... end
    module Migrate_501_500 : sig ... end
    module Migrate_501_502 : sig ... end
    module Migrate_502_501 : sig ... end
    module Migrate_502_503 : sig ... end
    module Migrate_503_502 : sig ... end
    module Ast_metadata : sig ... end

    Meta data related interface for a ppx rewriter

    module Config : sig ... end

    Magic numbers

    module Keyword : sig ... end
    module Location : sig ... end

    Source code locations (ranges of positions), used in parsetrees

    module Longident : sig ... end

    Long identifiers, used in parsetrees.

    module Parse : sig ... end

    Entry points in the parser

    module Pprintast : sig ... end
    module Compiler_pprintast : sig ... end
    val init_error_reporting_style_using_env_vars : unit -> unit

    Adjust the reporting style of error messages to the environment variables OCAML_COLOR and OCAML_ERROR_STYLE.

    diff --git a/ppxlib/Astlib__/index.html b/ppxlib/Astlib__/index.html index 16efe56..483731d 100644 --- a/ppxlib/Astlib__/index.html +++ b/ppxlib/Astlib__/index.html @@ -1,2 +1,2 @@ -Astlib__ (ppxlib.Astlib__)

    Module Astlib__

    \ No newline at end of file +Astlib__ (ppxlib.Astlib__)

    Module Astlib__

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_402/index.html b/ppxlib/Astlib__Ast_402/index.html index fecb8e4..ceb96c9 100644 --- a/ppxlib/Astlib__Ast_402/index.html +++ b/ppxlib/Astlib__Ast_402/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_402 (ppxlib.Astlib__Ast_402)

    Module Astlib__Ast_402

    \ No newline at end of file +Astlib__Ast_402 (ppxlib.Astlib__Ast_402)

    Module Astlib__Ast_402

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_403/index.html b/ppxlib/Astlib__Ast_403/index.html index dec392d..287fd4d 100644 --- a/ppxlib/Astlib__Ast_403/index.html +++ b/ppxlib/Astlib__Ast_403/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_403 (ppxlib.Astlib__Ast_403)

    Module Astlib__Ast_403

    \ No newline at end of file +Astlib__Ast_403 (ppxlib.Astlib__Ast_403)

    Module Astlib__Ast_403

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_404/index.html b/ppxlib/Astlib__Ast_404/index.html index 55f3493..413ed9c 100644 --- a/ppxlib/Astlib__Ast_404/index.html +++ b/ppxlib/Astlib__Ast_404/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_404 (ppxlib.Astlib__Ast_404)

    Module Astlib__Ast_404

    \ No newline at end of file +Astlib__Ast_404 (ppxlib.Astlib__Ast_404)

    Module Astlib__Ast_404

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_405/index.html b/ppxlib/Astlib__Ast_405/index.html index d16d434..ca96fc8 100644 --- a/ppxlib/Astlib__Ast_405/index.html +++ b/ppxlib/Astlib__Ast_405/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_405 (ppxlib.Astlib__Ast_405)

    Module Astlib__Ast_405

    \ No newline at end of file +Astlib__Ast_405 (ppxlib.Astlib__Ast_405)

    Module Astlib__Ast_405

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_406/index.html b/ppxlib/Astlib__Ast_406/index.html index b62efba..33e53ba 100644 --- a/ppxlib/Astlib__Ast_406/index.html +++ b/ppxlib/Astlib__Ast_406/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_406 (ppxlib.Astlib__Ast_406)

    Module Astlib__Ast_406

    \ No newline at end of file +Astlib__Ast_406 (ppxlib.Astlib__Ast_406)

    Module Astlib__Ast_406

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_407/index.html b/ppxlib/Astlib__Ast_407/index.html index f69ca49..339bc77 100644 --- a/ppxlib/Astlib__Ast_407/index.html +++ b/ppxlib/Astlib__Ast_407/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_407 (ppxlib.Astlib__Ast_407)

    Module Astlib__Ast_407

    \ No newline at end of file +Astlib__Ast_407 (ppxlib.Astlib__Ast_407)

    Module Astlib__Ast_407

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_408/index.html b/ppxlib/Astlib__Ast_408/index.html index 47d0fcc..fec7a34 100644 --- a/ppxlib/Astlib__Ast_408/index.html +++ b/ppxlib/Astlib__Ast_408/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_408 (ppxlib.Astlib__Ast_408)

    Module Astlib__Ast_408

    \ No newline at end of file +Astlib__Ast_408 (ppxlib.Astlib__Ast_408)

    Module Astlib__Ast_408

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_409/index.html b/ppxlib/Astlib__Ast_409/index.html index 8f9ec8a..f6d35d0 100644 --- a/ppxlib/Astlib__Ast_409/index.html +++ b/ppxlib/Astlib__Ast_409/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_409 (ppxlib.Astlib__Ast_409)

    Module Astlib__Ast_409

    \ No newline at end of file +Astlib__Ast_409 (ppxlib.Astlib__Ast_409)

    Module Astlib__Ast_409

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_410/index.html b/ppxlib/Astlib__Ast_410/index.html index d44e00a..f3e1cf6 100644 --- a/ppxlib/Astlib__Ast_410/index.html +++ b/ppxlib/Astlib__Ast_410/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_410 (ppxlib.Astlib__Ast_410)

    Module Astlib__Ast_410

    \ No newline at end of file +Astlib__Ast_410 (ppxlib.Astlib__Ast_410)

    Module Astlib__Ast_410

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_411/index.html b/ppxlib/Astlib__Ast_411/index.html index 63ce12c..07d12dc 100644 --- a/ppxlib/Astlib__Ast_411/index.html +++ b/ppxlib/Astlib__Ast_411/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_411 (ppxlib.Astlib__Ast_411)

    Module Astlib__Ast_411

    \ No newline at end of file +Astlib__Ast_411 (ppxlib.Astlib__Ast_411)

    Module Astlib__Ast_411

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_412/index.html b/ppxlib/Astlib__Ast_412/index.html index 82128e3..1162798 100644 --- a/ppxlib/Astlib__Ast_412/index.html +++ b/ppxlib/Astlib__Ast_412/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_412 (ppxlib.Astlib__Ast_412)

    Module Astlib__Ast_412

    \ No newline at end of file +Astlib__Ast_412 (ppxlib.Astlib__Ast_412)

    Module Astlib__Ast_412

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_413/index.html b/ppxlib/Astlib__Ast_413/index.html index 4d0cab0..3c506d2 100644 --- a/ppxlib/Astlib__Ast_413/index.html +++ b/ppxlib/Astlib__Ast_413/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_413 (ppxlib.Astlib__Ast_413)

    Module Astlib__Ast_413

    \ No newline at end of file +Astlib__Ast_413 (ppxlib.Astlib__Ast_413)

    Module Astlib__Ast_413

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_414/index.html b/ppxlib/Astlib__Ast_414/index.html index 111866d..7e61feb 100644 --- a/ppxlib/Astlib__Ast_414/index.html +++ b/ppxlib/Astlib__Ast_414/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_414 (ppxlib.Astlib__Ast_414)

    Module Astlib__Ast_414

    \ No newline at end of file +Astlib__Ast_414 (ppxlib.Astlib__Ast_414)

    Module Astlib__Ast_414

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_500/index.html b/ppxlib/Astlib__Ast_500/index.html index 80cf3f9..b380281 100644 --- a/ppxlib/Astlib__Ast_500/index.html +++ b/ppxlib/Astlib__Ast_500/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_500 (ppxlib.Astlib__Ast_500)

    Module Astlib__Ast_500

    \ No newline at end of file +Astlib__Ast_500 (ppxlib.Astlib__Ast_500)

    Module Astlib__Ast_500

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_501/index.html b/ppxlib/Astlib__Ast_501/index.html index 92c1eed..9e2efff 100644 --- a/ppxlib/Astlib__Ast_501/index.html +++ b/ppxlib/Astlib__Ast_501/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_501 (ppxlib.Astlib__Ast_501)

    Module Astlib__Ast_501

    \ No newline at end of file +Astlib__Ast_501 (ppxlib.Astlib__Ast_501)

    Module Astlib__Ast_501

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_502/index.html b/ppxlib/Astlib__Ast_502/index.html index c5fd204..2cdf60d 100644 --- a/ppxlib/Astlib__Ast_502/index.html +++ b/ppxlib/Astlib__Ast_502/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_502 (ppxlib.Astlib__Ast_502)

    Module Astlib__Ast_502

    \ No newline at end of file +Astlib__Ast_502 (ppxlib.Astlib__Ast_502)

    Module Astlib__Ast_502

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_503/index.html b/ppxlib/Astlib__Ast_503/index.html index d742103..49d30d3 100644 --- a/ppxlib/Astlib__Ast_503/index.html +++ b/ppxlib/Astlib__Ast_503/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_503 (ppxlib.Astlib__Ast_503)

    Module Astlib__Ast_503

    \ No newline at end of file +Astlib__Ast_503 (ppxlib.Astlib__Ast_503)

    Module Astlib__Ast_503

    This module is hidden.

    diff --git a/ppxlib/Astlib__Ast_metadata/index.html b/ppxlib/Astlib__Ast_metadata/index.html index c1e8483..8fe913b 100644 --- a/ppxlib/Astlib__Ast_metadata/index.html +++ b/ppxlib/Astlib__Ast_metadata/index.html @@ -1,2 +1,2 @@ -Astlib__Ast_metadata (ppxlib.Astlib__Ast_metadata)

    Module Astlib__Ast_metadata

    \ No newline at end of file +Astlib__Ast_metadata (ppxlib.Astlib__Ast_metadata)

    Module Astlib__Ast_metadata

    This module is hidden.

    diff --git a/ppxlib/Astlib__Config/index.html b/ppxlib/Astlib__Config/index.html index ad30650..ef45ebb 100644 --- a/ppxlib/Astlib__Config/index.html +++ b/ppxlib/Astlib__Config/index.html @@ -1,2 +1,2 @@ -Astlib__Config (ppxlib.Astlib__Config)

    Module Astlib__Config

    \ No newline at end of file +Astlib__Config (ppxlib.Astlib__Config)

    Module Astlib__Config

    This module is hidden.

    diff --git a/ppxlib/Astlib__Keyword/index.html b/ppxlib/Astlib__Keyword/index.html index 058ec30..a5f688a 100644 --- a/ppxlib/Astlib__Keyword/index.html +++ b/ppxlib/Astlib__Keyword/index.html @@ -1,2 +1,2 @@ -Astlib__Keyword (ppxlib.Astlib__Keyword)

    Module Astlib__Keyword

    \ No newline at end of file +Astlib__Keyword (ppxlib.Astlib__Keyword)

    Module Astlib__Keyword

    This module is hidden.

    diff --git a/ppxlib/Astlib__Location/index.html b/ppxlib/Astlib__Location/index.html index aca9ef0..d44d276 100644 --- a/ppxlib/Astlib__Location/index.html +++ b/ppxlib/Astlib__Location/index.html @@ -1,2 +1,2 @@ -Astlib__Location (ppxlib.Astlib__Location)

    Module Astlib__Location

    \ No newline at end of file +Astlib__Location (ppxlib.Astlib__Location)

    Module Astlib__Location

    This module is hidden.

    diff --git a/ppxlib/Astlib__Longident/index.html b/ppxlib/Astlib__Longident/index.html index 463cd6d..9186ade 100644 --- a/ppxlib/Astlib__Longident/index.html +++ b/ppxlib/Astlib__Longident/index.html @@ -1,2 +1,2 @@ -Astlib__Longident (ppxlib.Astlib__Longident)

    Module Astlib__Longident

    \ No newline at end of file +Astlib__Longident (ppxlib.Astlib__Longident)

    Module Astlib__Longident

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_408_409/index.html b/ppxlib/Astlib__Migrate_408_409/index.html index 23db40e..890ecbf 100644 --- a/ppxlib/Astlib__Migrate_408_409/index.html +++ b/ppxlib/Astlib__Migrate_408_409/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_408_409 (ppxlib.Astlib__Migrate_408_409)

    Module Astlib__Migrate_408_409

    \ No newline at end of file +Astlib__Migrate_408_409 (ppxlib.Astlib__Migrate_408_409)

    Module Astlib__Migrate_408_409

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_409_408/index.html b/ppxlib/Astlib__Migrate_409_408/index.html index b7144c3..2c956dd 100644 --- a/ppxlib/Astlib__Migrate_409_408/index.html +++ b/ppxlib/Astlib__Migrate_409_408/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_409_408 (ppxlib.Astlib__Migrate_409_408)

    Module Astlib__Migrate_409_408

    \ No newline at end of file +Astlib__Migrate_409_408 (ppxlib.Astlib__Migrate_409_408)

    Module Astlib__Migrate_409_408

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_409_410/index.html b/ppxlib/Astlib__Migrate_409_410/index.html index 6256cdf..4e59368 100644 --- a/ppxlib/Astlib__Migrate_409_410/index.html +++ b/ppxlib/Astlib__Migrate_409_410/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_409_410 (ppxlib.Astlib__Migrate_409_410)

    Module Astlib__Migrate_409_410

    \ No newline at end of file +Astlib__Migrate_409_410 (ppxlib.Astlib__Migrate_409_410)

    Module Astlib__Migrate_409_410

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_410_409/index.html b/ppxlib/Astlib__Migrate_410_409/index.html index 4366290..ed714eb 100644 --- a/ppxlib/Astlib__Migrate_410_409/index.html +++ b/ppxlib/Astlib__Migrate_410_409/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_410_409 (ppxlib.Astlib__Migrate_410_409)

    Module Astlib__Migrate_410_409

    \ No newline at end of file +Astlib__Migrate_410_409 (ppxlib.Astlib__Migrate_410_409)

    Module Astlib__Migrate_410_409

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_410_411/index.html b/ppxlib/Astlib__Migrate_410_411/index.html index a3a7f23..40ac813 100644 --- a/ppxlib/Astlib__Migrate_410_411/index.html +++ b/ppxlib/Astlib__Migrate_410_411/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_410_411 (ppxlib.Astlib__Migrate_410_411)

    Module Astlib__Migrate_410_411

    \ No newline at end of file +Astlib__Migrate_410_411 (ppxlib.Astlib__Migrate_410_411)

    Module Astlib__Migrate_410_411

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_411_410/index.html b/ppxlib/Astlib__Migrate_411_410/index.html index dcf24c9..fb020d9 100644 --- a/ppxlib/Astlib__Migrate_411_410/index.html +++ b/ppxlib/Astlib__Migrate_411_410/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_411_410 (ppxlib.Astlib__Migrate_411_410)

    Module Astlib__Migrate_411_410

    \ No newline at end of file +Astlib__Migrate_411_410 (ppxlib.Astlib__Migrate_411_410)

    Module Astlib__Migrate_411_410

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_411_412/index.html b/ppxlib/Astlib__Migrate_411_412/index.html index 4bd6c0a..df20f24 100644 --- a/ppxlib/Astlib__Migrate_411_412/index.html +++ b/ppxlib/Astlib__Migrate_411_412/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_411_412 (ppxlib.Astlib__Migrate_411_412)

    Module Astlib__Migrate_411_412

    \ No newline at end of file +Astlib__Migrate_411_412 (ppxlib.Astlib__Migrate_411_412)

    Module Astlib__Migrate_411_412

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_412_411/index.html b/ppxlib/Astlib__Migrate_412_411/index.html index 0729814..d17c6d4 100644 --- a/ppxlib/Astlib__Migrate_412_411/index.html +++ b/ppxlib/Astlib__Migrate_412_411/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_412_411 (ppxlib.Astlib__Migrate_412_411)

    Module Astlib__Migrate_412_411

    \ No newline at end of file +Astlib__Migrate_412_411 (ppxlib.Astlib__Migrate_412_411)

    Module Astlib__Migrate_412_411

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_412_413/index.html b/ppxlib/Astlib__Migrate_412_413/index.html index 7ef4380..42aa0aa 100644 --- a/ppxlib/Astlib__Migrate_412_413/index.html +++ b/ppxlib/Astlib__Migrate_412_413/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_412_413 (ppxlib.Astlib__Migrate_412_413)

    Module Astlib__Migrate_412_413

    \ No newline at end of file +Astlib__Migrate_412_413 (ppxlib.Astlib__Migrate_412_413)

    Module Astlib__Migrate_412_413

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_413_412/index.html b/ppxlib/Astlib__Migrate_413_412/index.html index 00dd77f..b3ff108 100644 --- a/ppxlib/Astlib__Migrate_413_412/index.html +++ b/ppxlib/Astlib__Migrate_413_412/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_413_412 (ppxlib.Astlib__Migrate_413_412)

    Module Astlib__Migrate_413_412

    \ No newline at end of file +Astlib__Migrate_413_412 (ppxlib.Astlib__Migrate_413_412)

    Module Astlib__Migrate_413_412

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_413_414/index.html b/ppxlib/Astlib__Migrate_413_414/index.html index 06e1793..914d58d 100644 --- a/ppxlib/Astlib__Migrate_413_414/index.html +++ b/ppxlib/Astlib__Migrate_413_414/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_413_414 (ppxlib.Astlib__Migrate_413_414)

    Module Astlib__Migrate_413_414

    \ No newline at end of file +Astlib__Migrate_413_414 (ppxlib.Astlib__Migrate_413_414)

    Module Astlib__Migrate_413_414

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_414_413/index.html b/ppxlib/Astlib__Migrate_414_413/index.html index 63f0357..e4389ad 100644 --- a/ppxlib/Astlib__Migrate_414_413/index.html +++ b/ppxlib/Astlib__Migrate_414_413/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_414_413 (ppxlib.Astlib__Migrate_414_413)

    Module Astlib__Migrate_414_413

    \ No newline at end of file +Astlib__Migrate_414_413 (ppxlib.Astlib__Migrate_414_413)

    Module Astlib__Migrate_414_413

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_414_500/index.html b/ppxlib/Astlib__Migrate_414_500/index.html index bea43d3..dc74bf3 100644 --- a/ppxlib/Astlib__Migrate_414_500/index.html +++ b/ppxlib/Astlib__Migrate_414_500/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_414_500 (ppxlib.Astlib__Migrate_414_500)

    Module Astlib__Migrate_414_500

    \ No newline at end of file +Astlib__Migrate_414_500 (ppxlib.Astlib__Migrate_414_500)

    Module Astlib__Migrate_414_500

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_500_414/index.html b/ppxlib/Astlib__Migrate_500_414/index.html index 01e20ac..6a614b7 100644 --- a/ppxlib/Astlib__Migrate_500_414/index.html +++ b/ppxlib/Astlib__Migrate_500_414/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_500_414 (ppxlib.Astlib__Migrate_500_414)

    Module Astlib__Migrate_500_414

    \ No newline at end of file +Astlib__Migrate_500_414 (ppxlib.Astlib__Migrate_500_414)

    Module Astlib__Migrate_500_414

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_500_501/index.html b/ppxlib/Astlib__Migrate_500_501/index.html index b28e5ba..20bf4de 100644 --- a/ppxlib/Astlib__Migrate_500_501/index.html +++ b/ppxlib/Astlib__Migrate_500_501/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_500_501 (ppxlib.Astlib__Migrate_500_501)

    Module Astlib__Migrate_500_501

    \ No newline at end of file +Astlib__Migrate_500_501 (ppxlib.Astlib__Migrate_500_501)

    Module Astlib__Migrate_500_501

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_501_500/index.html b/ppxlib/Astlib__Migrate_501_500/index.html index fbe80cf..3f98fdd 100644 --- a/ppxlib/Astlib__Migrate_501_500/index.html +++ b/ppxlib/Astlib__Migrate_501_500/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_501_500 (ppxlib.Astlib__Migrate_501_500)

    Module Astlib__Migrate_501_500

    \ No newline at end of file +Astlib__Migrate_501_500 (ppxlib.Astlib__Migrate_501_500)

    Module Astlib__Migrate_501_500

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_501_502/index.html b/ppxlib/Astlib__Migrate_501_502/index.html index 9b26f9b..368d151 100644 --- a/ppxlib/Astlib__Migrate_501_502/index.html +++ b/ppxlib/Astlib__Migrate_501_502/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_501_502 (ppxlib.Astlib__Migrate_501_502)

    Module Astlib__Migrate_501_502

    \ No newline at end of file +Astlib__Migrate_501_502 (ppxlib.Astlib__Migrate_501_502)

    Module Astlib__Migrate_501_502

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_502_501/index.html b/ppxlib/Astlib__Migrate_502_501/index.html index 968cc38..1ea5f4a 100644 --- a/ppxlib/Astlib__Migrate_502_501/index.html +++ b/ppxlib/Astlib__Migrate_502_501/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_502_501 (ppxlib.Astlib__Migrate_502_501)

    Module Astlib__Migrate_502_501

    \ No newline at end of file +Astlib__Migrate_502_501 (ppxlib.Astlib__Migrate_502_501)

    Module Astlib__Migrate_502_501

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_502_503/index.html b/ppxlib/Astlib__Migrate_502_503/index.html index df58454..f5c0038 100644 --- a/ppxlib/Astlib__Migrate_502_503/index.html +++ b/ppxlib/Astlib__Migrate_502_503/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_502_503 (ppxlib.Astlib__Migrate_502_503)

    Module Astlib__Migrate_502_503

    \ No newline at end of file +Astlib__Migrate_502_503 (ppxlib.Astlib__Migrate_502_503)

    Module Astlib__Migrate_502_503

    This module is hidden.

    diff --git a/ppxlib/Astlib__Migrate_503_502/index.html b/ppxlib/Astlib__Migrate_503_502/index.html index 274dead..494d45b 100644 --- a/ppxlib/Astlib__Migrate_503_502/index.html +++ b/ppxlib/Astlib__Migrate_503_502/index.html @@ -1,2 +1,2 @@ -Astlib__Migrate_503_502 (ppxlib.Astlib__Migrate_503_502)

    Module Astlib__Migrate_503_502

    \ No newline at end of file +Astlib__Migrate_503_502 (ppxlib.Astlib__Migrate_503_502)

    Module Astlib__Migrate_503_502

    This module is hidden.

    diff --git a/ppxlib/Astlib__Parse/index.html b/ppxlib/Astlib__Parse/index.html index 222e505..c1bd38c 100644 --- a/ppxlib/Astlib__Parse/index.html +++ b/ppxlib/Astlib__Parse/index.html @@ -1,2 +1,2 @@ -Astlib__Parse (ppxlib.Astlib__Parse)

    Module Astlib__Parse

    \ No newline at end of file +Astlib__Parse (ppxlib.Astlib__Parse)

    Module Astlib__Parse

    This module is hidden.

    diff --git a/ppxlib/Astlib__Pprintast/index.html b/ppxlib/Astlib__Pprintast/index.html index a7ab539..d7d6a88 100644 --- a/ppxlib/Astlib__Pprintast/index.html +++ b/ppxlib/Astlib__Pprintast/index.html @@ -1,2 +1,2 @@ -Astlib__Pprintast (ppxlib.Astlib__Pprintast)

    Module Astlib__Pprintast

    \ No newline at end of file +Astlib__Pprintast (ppxlib.Astlib__Pprintast)

    Module Astlib__Pprintast

    This module is hidden.

    diff --git a/ppxlib/Astlib__Stdlib0/index.html b/ppxlib/Astlib__Stdlib0/index.html index 7ab8aa9..8807b81 100644 --- a/ppxlib/Astlib__Stdlib0/index.html +++ b/ppxlib/Astlib__Stdlib0/index.html @@ -1,2 +1,2 @@ -Astlib__Stdlib0 (ppxlib.Astlib__Stdlib0)

    Module Astlib__Stdlib0

    \ No newline at end of file +Astlib__Stdlib0 (ppxlib.Astlib__Stdlib0)

    Module Astlib__Stdlib0

    This module is hidden.

    diff --git a/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html b/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html index 23604ca..4b85355 100644 --- a/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Default/Latest/index.html @@ -1,13 +1,13 @@ -Latest (ppxlib.Ppxlib.Ast_builder.Default.Latest)

    Module Default.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    val ppat_construct : - loc:Astlib.Location.t -> +Latest (ppxlib.Ppxlib.Ast_builder.Default.Latest)

    Module Default.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    \ No newline at end of file + Astlib.Ast_500.Parsetree.constructor_declaration
    diff --git a/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html b/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html index 7cd0356..c4e8cfd 100644 --- a/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Default/Located/index.html @@ -1,2 +1,2 @@ -Located (ppxlib.Ppxlib.Ast_builder.Default.Located)

    Module Default.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : loc:Location.t -> 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : loc:Location.t -> string -> Longident.t t
    \ No newline at end of file +Located (ppxlib.Ppxlib.Ast_builder.Default.Located)

    Module Default.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : loc:Location.t -> 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : loc:Location.t -> string -> Longident.t t
    diff --git a/ppxlib/Ppxlib/Ast_builder/Default/index.html b/ppxlib/Ppxlib/Ast_builder/Default/index.html index 5f3cd49..b10807c 100644 --- a/ppxlib/Ppxlib/Ast_builder/Default/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Default/index.html @@ -1,667 +1,667 @@ -Default (ppxlib.Ppxlib.Ast_builder.Default)

    Module Ast_builder.Default

    Helpers taking a ~loc argument. This module is meant to be opened or aliased.

    module Located : sig ... end

    Value description

    val value_description : - loc:Location.t -> - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.core_type -> - prim:string list -> - Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    val value_binding : - loc:Location.t -> - pat:Astlib.Ast_500.Parsetree.pattern -> - expr:Astlib.Ast_500.Parsetree.expression -> +Default (ppxlib.Ppxlib.Ast_builder.Default)

    Module Ast_builder.Default

    Helpers taking a ~loc argument. This module is meant to be opened or aliased.

    module Located : sig ... end

    Value description

    val value_description : + loc:Location.t -> + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    Type extension

    type_extension constructs an Ast.type_extension

    Example OCaml

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    Type exception

    type_exception constructs an Ast.type_exception

    Example OCaml

    Definition of a new exception (exception E).

    Type declaration

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    toplevel_directive constructs an Ast.toplevel_directive

    Structure item

    pstr_attribute constructs an Ast.structure_item_desc.Pstr_attribute

    Example OCaml

    [@@@id]

    pstr_class_type constructs an Ast.structure_item_desc.Pstr_class_type

    Example OCaml

    class type ct1 = ... and ... and ctn = ...

    pstr_class constructs an Ast.structure_item_desc.Pstr_class

    Example OCaml

    class c1 = ... and ... and cn = ...

    pstr_modtype constructs an Ast.structure_item_desc.Pstr_modtype

    Example OCaml

    module type S = MT

    pstr_recmodule constructs an Ast.structure_item_desc.Pstr_recmodule

    Example OCaml

    module rec X1 = ME1 and ... and Xn = MEn

    pstr_module constructs an Ast.structure_item_desc.Pstr_module

    Example OCaml

    module X = ME

    pstr_exception constructs an Ast.structure_item_desc.Pstr_exception

    Example OCaml

    • exception C of T
    • exception C = M.X

    pstr_typext constructs an Ast.structure_item_desc.Pstr_typext

    Example OCaml

    type t1 += ...

    pstr_type constructs an Ast.structure_item_desc.Pstr_type

    Example OCaml

    type t1 = ... and ... and tn = ...

    pstr_primitive constructs an Ast.structure_item_desc.Pstr_primitive

    Example OCaml

    • val x: T
    • external x: T = "s1" ... "sn"

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    Signature item

    psig_attribute constructs an Ast.signature_item_desc.Psig_attribute

    Example OCaml

    [@@@id]

    psig_class_type constructs an Ast.signature_item_desc.Psig_class_type

    Example OCaml

    class type ct1 = ... and ... and ctn = ...

    psig_class constructs an Ast.signature_item_desc.Psig_class

    Example OCaml

    class c1 : ... and ... and cn : ...

    psig_modtypesubst constructs an Ast.signature_item_desc.Psig_modtypesubst

    Example OCaml

    module type S := ...

    psig_modtype constructs an Ast.signature_item_desc.Psig_modtype

    Example OCaml

    module type S = MT and module type S

    psig_recmodule constructs an Ast.signature_item_desc.Psig_recmodule

    Example OCaml

    module rec X1 : MT1 and ... and Xn : MTn

    psig_modsubst constructs an Ast.signature_item_desc.Psig_modsubst

    Example OCaml

    module X := M

    psig_module constructs an Ast.signature_item_desc.Psig_module

    Example OCaml

    module X = M and module X : MT

    psig_exception constructs an Ast.signature_item_desc.Psig_exception

    Example OCaml

    exception C of T

    psig_typext constructs an Ast.signature_item_desc.Psig_typext

    Example OCaml

    type t1 += ...

    psig_typesubst constructs an Ast.signature_item_desc.Psig_typesubst

    Example OCaml

    type t1 := ... and ... and tn := ...

    psig_type constructs an Ast.signature_item_desc.Psig_type

    Example OCaml

    type t1 = ... and ... and tn = ...

    psig_value constructs an Ast.signature_item_desc.Psig_value

    Example OCaml

    • val x: T
    • external x: T = "s1" ... "sn"

    Row field

    rinherit constructs an Ast.row_field_desc.Rinherit

    Example OCaml

    [ | t ]

    rtag constructs an Ast.row_field_desc.Rtag

    Example OCaml

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)

    Position

    val position : - fname:string -> - lnum:int -> - bol:int -> - cnum:int -> + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> Stdlib.Lexing.position

    position constructs an Ast.position

    Pattern

    ppat_extension constructs an Ast.pattern_desc.Ppat_extension

    Example OCaml

    Pattern [%id]

    ppat_exception constructs an Ast.pattern_desc.Ppat_exception

    Example OCaml

    Pattern exception P

    val ppat_unpack : - loc:Location.t -> + loc:Location.t -> string option Astlib.Location.loc -> Astlib.Ast_500.Parsetree.pattern

    ppat_unpack constructs an Ast.pattern_desc.Ppat_unpack

    Example OCaml

    Ppat_unpack(s) represents:

    • (module P) when s is Some "P"
    • (module _) when s is None

    Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

    ppat_lazy constructs an Ast.pattern_desc.Ppat_lazy

    Example OCaml

    Pattern lazy P

    ppat_type constructs an Ast.pattern_desc.Ppat_type

    Example OCaml

    Pattern #tconst

    ppat_constraint constructs an Ast.pattern_desc.Ppat_constraint

    Example OCaml

    Pattern (P : T)

    ppat_array constructs an Ast.pattern_desc.Ppat_array

    Example OCaml

    Pattern [| P1; ...; Pn |]

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    val ppat_variant : - loc:Location.t -> + Astlib.Ast_500.Parsetree.pattern

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    val ppat_variant : + loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern option -> Astlib.Ast_500.Parsetree.pattern

    ppat_variant constructs an Ast.pattern_desc.Ppat_variant

    Example OCaml

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P

    ppat_tuple constructs an Ast.pattern_desc.Ppat_tuple

    Example OCaml

    Patterns (P1, ..., Pn).

    Invariant: n >= 2

    ppat_interval constructs an Ast.pattern_desc.Ppat_interval

    Example OCaml

    Patterns such as 'a'..'z'.

    Other forms of interval are recognized by the parser but rejected by the type-checker.

    ppat_constant constructs an Ast.pattern_desc.Ppat_constant

    Example OCaml

    Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    ppat_alias constructs an Ast.pattern_desc.Ppat_alias

    Example OCaml

    An alias pattern such as P as 'a

    val ppat_var : - loc:Location.t -> + loc:Location.t -> string Astlib.Location.loc -> - Astlib.Ast_500.Parsetree.pattern

    ppat_var constructs an Ast.pattern_desc.Ppat_var

    Example OCaml

    A variable pattern such as x

    ppat_any constructs an Ast.pattern_desc.Ppat_any

    Example OCaml

    The pattern _.

    Object field

    ppat_var constructs an Ast.pattern_desc.Ppat_var

    Example OCaml

    A variable pattern such as x

    ppat_any constructs an Ast.pattern_desc.Ppat_any

    Example OCaml

    The pattern _.

    Object field

    Module type declaration

    val module_type_declaration : - loc:Location.t -> - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.module_type option -> - Astlib.Ast_500.Parsetree.module_type_declaration

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    pmty_alias constructs an Ast.module_type_desc.Pmty_alias

    Example OCaml

    (module M)

    pmty_extension constructs an Ast.module_type_desc.Pmty_extension

    Example OCaml

    [%id]

    pmty_typeof constructs an Ast.module_type_desc.Pmty_typeof

    Example OCaml

    module type of ME

    pmty_signature constructs an Ast.module_type_desc.Pmty_signature

    Example OCaml

    sig ... end

    pmty_ident constructs an Ast.module_type_desc.Pmty_ident

    Example OCaml

    Pmty_ident(S) represents S

    Module substitution

    module_substitution constructs an Ast.module_substitution

    Example OCaml

    Values of type module_substitution represents S := M

    Module expr

    pmod_extension constructs an Ast.module_expr_desc.Pmod_extension

    Example OCaml

    [%id]

    pmod_unpack constructs an Ast.module_expr_desc.Pmod_unpack

    Example OCaml

    (val E)

    pmod_structure constructs an Ast.module_expr_desc.Pmod_structure

    Example OCaml

    struct ... end

    Module declaration

    val module_declaration : - loc:Location.t -> - name:string option Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.module_type -> + loc:Location.t -> + name:string option Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.module_type -> Astlib.Ast_500.Parsetree.module_declaration

    module_declaration constructs an Ast.module_declaration

    Example OCaml

    Values of type module_declaration represents S : MT

    Module binding

    val module_binding : - loc:Location.t -> - name:string option Astlib.Location.loc -> - expr:Astlib.Ast_500.Parsetree.module_expr -> + loc:Location.t -> + name:string option Astlib.Location.loc -> + expr:Astlib.Ast_500.Parsetree.module_expr -> Astlib.Ast_500.Parsetree.module_binding

    module_binding constructs an Ast.module_binding

    Example OCaml

    Values of type module_binding represents module X = ME

    Location

    val location : - start:Stdlib.Lexing.position -> - end_:Stdlib.Lexing.position -> - ghost:bool -> + start:Stdlib.Lexing.position -> + end_:Stdlib.Lexing.position -> + ghost:bool -> Astlib.Location.t

    location constructs an Ast.location

    Letop

    Label declaration

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    extension_constructor constructs an Ast.extension_constructor

    Expression

    val pexp_unreachable : loc:Location.t -> Astlib.Ast_500.Parsetree.expression

    pexp_unreachable constructs an Ast.expression_desc.Pexp_unreachable

    Example OCaml

    .

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    extension_constructor constructs an Ast.extension_constructor

    Expression

    val pexp_unreachable : loc:Location.t -> Astlib.Ast_500.Parsetree.expression

    pexp_unreachable constructs an Ast.expression_desc.Pexp_unreachable

    Example OCaml

    .

    pexp_extension constructs an Ast.expression_desc.Pexp_extension

    Example OCaml

    [%id]

    pexp_letop constructs an Ast.expression_desc.Pexp_letop

    Example OCaml

    • let* P = E0 in E1
    • let* P0 = E00 and* P1 = E01 in E1

    pexp_pack constructs an Ast.expression_desc.Pexp_pack

    Example OCaml

    (module ME).

    (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

    pexp_newtype constructs an Ast.expression_desc.Pexp_newtype

    Example OCaml

    fun (type t) -> E

    pexp_object constructs an Ast.expression_desc.Pexp_object

    Example OCaml

    object ... end

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_lazy constructs an Ast.expression_desc.Pexp_lazy

    Example OCaml

    lazy E

    pexp_assert constructs an Ast.expression_desc.Pexp_assert

    Example OCaml

    assert E.

    Note: assert false is treated in a special way by the type-checker.

    pexp_letexception constructs an Ast.expression_desc.Pexp_letexception

    Example OCaml

    let exception C in E

    pexp_letmodule constructs an Ast.expression_desc.Pexp_letmodule

    Example OCaml

    let module M = ME in E

    pexp_override constructs an Ast.expression_desc.Pexp_override

    Example OCaml

    {< x1 = E1; ...; xn = En >}

    pexp_setinstvar constructs an Ast.expression_desc.Pexp_setinstvar

    Example OCaml

    x <- 2

    pexp_new constructs an Ast.expression_desc.Pexp_new

    Example OCaml

    new M.c

    pexp_send constructs an Ast.expression_desc.Pexp_send

    Example OCaml

    E # m

    pexp_coerce constructs an Ast.expression_desc.Pexp_coerce

    Example OCaml

    Pexp_coerce(E, from, T) represents

    • (E :> T) when from is None,
    • (E : T0 :> T) when from is Some T0.

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_array constructs an Ast.expression_desc.Pexp_array

    Example OCaml

    [| E1; ...; En |]

    pexp_record constructs an Ast.expression_desc.Pexp_record

    Example OCaml

    Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

    • { l1=P1; ...; ln=Pn } when exp0 is None
    • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

    Invariant: n > 0

    val pexp_variant : - loc:Location.t -> + loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression option -> Astlib.Ast_500.Parsetree.expression

    pexp_variant constructs an Ast.expression_desc.Pexp_variant

    Example OCaml

    Pexp_variant(`A, exp) represents

    • `A when exp is None
    • `A E when exp is Some E

    pexp_construct constructs an Ast.expression_desc.Pexp_construct

    Example OCaml

    Pexp_construct(C, exp) represents:

    • C when exp is None,
    • C E when exp is Some E,
    • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])

    pexp_tuple constructs an Ast.expression_desc.Pexp_tuple

    Example OCaml

    Expressions (E1, ..., En)

    Invariant: n >= 2

    pexp_try constructs an Ast.expression_desc.Pexp_try

    Example OCaml

    try E0 with P1 -> E1 | ... | Pn -> En

    pexp_match constructs an Ast.expression_desc.Pexp_match

    Example OCaml

    match E0 with P1 -> E1 | ... | Pn -> En

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.
    val pexp_function : - loc:Location.t -> + Astlib.Ast_500.Parsetree.expression

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.

    pexp_function constructs an Ast.expression_desc.Pexp_function

    Example OCaml

    function P1 -> E1 | ... | Pn -> En

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
    val pexp_constant : - loc:Location.t -> + Astlib.Ast_500.Parsetree.expression

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.

    pexp_constant constructs an Ast.expression_desc.Pexp_constant

    Example OCaml

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    pexp_ident constructs an Ast.expression_desc.Pexp_ident

    Example OCaml

    Identifiers such as x and M.x

    Directive argument

    val pdir_bool : - loc:Location.t -> + loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.directive_argument
    val pdir_int : - loc:Location.t -> + loc:Location.t -> string -> char option -> Astlib.Ast_500.Parsetree.directive_argument
    val pdir_string : - loc:Location.t -> + loc:Location.t -> string -> Astlib.Ast_500.Parsetree.directive_argument

    pdir_string constructs an Ast.directive_argument_desc.Pdir_string

    Core type

    ptyp_extension constructs an Ast.core_type_desc.Ptyp_extension

    Example OCaml

    [%id].

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...
    val ptyp_variant : - loc:Location.t -> + Astlib.Ast_500.Parsetree.core_type

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_alias constructs an Ast.core_type_desc.Ptyp_alias

    Example OCaml

    T as 'a.

    ptyp_class constructs an Ast.core_type_desc.Ptyp_class

    Example OCaml

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.
    val ptyp_constr : - loc:Location.t -> + Astlib.Ast_500.Parsetree.core_type

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.

    ptyp_constr constructs an Ast.core_type_desc.Ptyp_constr

    Example OCaml

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].

    ptyp_tuple constructs an Ast.core_type_desc.Ptyp_tuple

    Example OCaml

    Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

    Invariant: n >= 2.

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    val pctf_extension : - loc:Location.t -> + Astlib.Ast_500.Parsetree.core_type

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    pctf_extension constructs an Ast.class_type_field_desc.Pctf_extension

    Example OCaml

    [%%id]

    pctf_attribute constructs an Ast.class_type_field_desc.Pctf_attribute

    Example OCaml

    [@@@id]

    pctf_method constructs an Ast.class_type_field_desc.Pctf_method

    Example OCaml

    method x: T

    Note: T can be a Ptyp_poly.

    pctf_inherit constructs an Ast.class_type_field_desc.Pctf_inherit

    Example OCaml

    inherit CT

    Class type

    pcty_extension constructs an Ast.class_type_desc.Pcty_extension

    Example OCaml

    %id

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    val pcty_signature : - loc:Location.t -> + Astlib.Ast_500.Parsetree.class_type

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    pcty_signature constructs an Ast.class_type_desc.Pcty_signature

    Example OCaml

    object ... end

    pcty_constr constructs an Ast.class_type_desc.Pcty_constr

    Example OCaml

    • c
    • ['a1, ..., 'an] c

    Class structure

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    pcf_extension constructs an Ast.class_field_desc.Pcf_extension

    Example OCaml

    [%%id]

    pcf_attribute constructs an Ast.class_field_desc.Pcf_attribute

    Example OCaml

    [@@@id]

    pcf_initializer constructs an Ast.class_field_desc.Pcf_initializer

    Example OCaml

    initializer E

    pcf_constraint constructs an Ast.class_field_desc.Pcf_constraint

    Example OCaml

    constraint T1 = T2

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcl_extension constructs an Ast.class_expr_desc.Pcl_extension

    Example OCaml

    [%id]

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_apply constructs an Ast.class_expr_desc.Pcl_apply

    Example OCaml

    Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

    Invariant: n > 0

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
    val pcl_structure : - loc:Location.t -> + Astlib.Ast_500.Parsetree.class_expr

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.

    pcl_structure constructs an Ast.class_expr_desc.Pcl_structure

    Example OCaml

    object ... end

    pcl_constr constructs an Ast.class_expr_desc.Pcl_constr

    Example OCaml

    c and ['a1, ..., 'an] c

    Case

    case constructs an Ast.case

    Example OCaml

    Values of type case represents (P -> E) or (P when E0 -> E)

    Binding op

    Attribute

    attribute constructs an Ast.attribute

    Example OCaml

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    'a open infos

    val open_infos : - loc:Location.t -> - expr:'a -> - override:Astlib.Ast_500.Asttypes.override_flag -> - 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : - loc:Location.t -> + loc:Location.t -> + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : + loc:Location.t -> 'a -> - 'a Astlib.Ast_500.Parsetree.include_infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    module Latest : sig ... end

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    val ppat_construct : - loc:Astlib.Location.t -> + name:string Astlib.Location.loc -> + expr:'a -> + 'a Astlib.Ast_500.Parsetree.class_infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    module Latest : sig ... end

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    val estring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
    val efloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
    val eint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.expression
    val eint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.expression
    val estring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
    val efloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.expression
    val eint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.expression
    val eint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.expression
    val enativeint : + loc:Location.t -> nativeint -> - Astlib.Ast_500.Parsetree.expression
    val pchar : loc:Location.t -> char -> Astlib.Ast_500.Parsetree.pattern
    val pstring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.pattern
    val pchar : loc:Location.t -> char -> Astlib.Ast_500.Parsetree.pattern
    val pstring : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : loc:Location.t -> int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : loc:Location.t -> int64 -> Astlib.Ast_500.Parsetree.pattern
    val pnativeint : + loc:Location.t -> nativeint -> - Astlib.Ast_500.Parsetree.pattern
    val pbool : loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val pvar : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val pbool : loc:Location.t -> bool -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val pvar : loc:Location.t -> string -> Astlib.Ast_500.Parsetree.pattern
    val ppat_tuple_opt : - loc:Location.t -> + loc:Location.t -> Astlib.Ast_500.Parsetree.pattern list -> Astlib.Ast_500.Parsetree.pattern option

    elist_tail ~loc [expr1; expr2; expr3] expr_tail produces the expression expr1::expr2::expr3::expr_tail.

    elist ~loc [expr1; expr2; expr3] produces the list litteral expression [expr1; expr2; expr3].

    plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

    plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

    pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

    • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
    val unapplied_type_constr_conv : - loc:Location.t -> + loc:Location.t -> Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression

    unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

    • sexp_of_t if path is "t"
    • A.B.sexp_of_foo if path is "A.B.foo"
    • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
    val type_constr_conv : - loc:Location.t -> + loc:Location.t -> Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression list -> Astlib.Ast_500.Parsetree.expression
    \ No newline at end of file + rec_flag:Astlib.Ast_500.Asttypes.rec_flag -> + Astlib.Ast_500.Parsetree.expression
    diff --git a/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html b/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html index f9f779f..193061d 100644 --- a/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Make/Latest/index.html @@ -1,11 +1,11 @@ -Latest (ppxlib.Ppxlib.Ast_builder.Make.Latest)

    Module Make.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    val ppat_construct : +Latest (ppxlib.Ppxlib.Ast_builder.Make.Latest)

    Module Make.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    \ No newline at end of file + Astlib.Ast_500.Parsetree.constructor_declaration
    diff --git a/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html b/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html index db00b67..0441eed 100644 --- a/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Make/Located/index.html @@ -1,2 +1,2 @@ -Located (ppxlib.Ppxlib.Ast_builder.Make.Located)

    Module Make.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : string -> Longident.t t
    \ No newline at end of file +Located (ppxlib.Ppxlib.Ast_builder.Make.Located)

    Module Make.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : string -> Longident.t t
    diff --git a/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html b/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html index 64044b8..a1b963f 100644 --- a/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Make/argument-1-Loc/index.html @@ -1,2 +1,2 @@ -Loc (ppxlib.Ppxlib.Ast_builder.Make.Loc)

    Parameter Make.Loc

    val loc : Location.t
    \ No newline at end of file +Loc (ppxlib.Ppxlib.Ast_builder.Make.Loc)

    Parameter Make.Loc

    val loc : Location.t
    diff --git a/ppxlib/Ppxlib/Ast_builder/Make/index.html b/ppxlib/Ppxlib/Ast_builder/Make/index.html index ad22dd7..9eca207 100644 --- a/ppxlib/Ppxlib/Ast_builder/Make/index.html +++ b/ppxlib/Ppxlib/Ast_builder/Make/index.html @@ -1,38 +1,38 @@ -Make (ppxlib.Ppxlib.Ast_builder.Make)

    Module Ast_builder.Make

    Build Ast helpers with the location argument factorized.

    Parameters

    module Loc : Loc

    Signature

    module Located : sig ... end
    val loc : Location.t

    Value description

    val value_description : - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.core_type -> - prim:string list -> - Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    val value_binding : - pat:Astlib.Ast_500.Parsetree.pattern -> - expr:Astlib.Ast_500.Parsetree.expression -> +Make (ppxlib.Ppxlib.Ast_builder.Make)

    Module Ast_builder.Make

    Build Ast helpers with the location argument factorized.

    Parameters

    module Loc : Loc

    Signature

    module Located : sig ... end
    val loc : Location.t

    Value description

    val value_description : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    Type extension

    type_extension constructs an Ast.type_extension

    Example OCaml

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    Type exception

    type_exception constructs an Ast.type_exception

    Example OCaml

    Definition of a new exception (exception E).

    Type declaration

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    toplevel_directive constructs an Ast.toplevel_directive

    Structure item

    pstr_primitive constructs an Ast.structure_item_desc.Pstr_primitive

    Example OCaml

    • val x: T
    • external x: T = "s1" ... "sn"

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    Signature item

    val psig_extension : @@ -108,10 +108,10 @@ bool -> Astlib.Ast_500.Parsetree.core_type list -> Astlib.Ast_500.Parsetree.row_field

    rtag constructs an Ast.row_field_desc.Rtag

    Example OCaml

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)

    Position

    val position : - fname:string -> - lnum:int -> - bol:int -> - cnum:int -> + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> Stdlib.Lexing.position

    position constructs an Ast.position

    Pattern

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    ppat_variant constructs an Ast.pattern_desc.Ppat_variant

    Example OCaml

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P

    Module type declaration

    val module_type_declaration : - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.module_type option -> - Astlib.Ast_500.Parsetree.module_type_declaration

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    pmty_alias constructs an Ast.module_type_desc.Pmty_alias

    Example OCaml

    (module M)

    pmty_signature constructs an Ast.module_type_desc.Pmty_signature

    Example OCaml

    sig ... end

    pmty_ident constructs an Ast.module_type_desc.Pmty_ident

    Example OCaml

    Pmty_ident(S) represents S

    Module substitution

    module_substitution constructs an Ast.module_substitution

    Example OCaml

    Values of type module_substitution represents S := M

    Module expr

    pmod_extension constructs an Ast.module_expr_desc.Pmod_extension

    Example OCaml

    [%id]

    val pmod_unpack : @@ -195,26 +195,26 @@ Astlib.Ast_500.Parsetree.module_expr

    pmod_structure constructs an Ast.module_expr_desc.Pmod_structure

    Example OCaml

    struct ... end

    Module declaration

    module_declaration constructs an Ast.module_declaration

    Example OCaml

    Values of type module_declaration represents S : MT

    Module binding

    module_binding constructs an Ast.module_binding

    Example OCaml

    Values of type module_binding represents module X = ME

    Location

    val location : - start:Stdlib.Lexing.position -> - end_:Stdlib.Lexing.position -> - ghost:bool -> + start:Stdlib.Lexing.position -> + end_:Stdlib.Lexing.position -> + ghost:bool -> Astlib.Location.t

    location constructs an Ast.location

    Letop

    Label declaration

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    Expression

    pexp_unreachable constructs an Ast.expression_desc.Pexp_unreachable

    Example OCaml

    .

    pexp_extension constructs an Ast.expression_desc.Pexp_extension

    Example OCaml

    [%id]

    val pexp_letop : @@ -232,7 +232,7 @@ Astlib.Ast_500.Parsetree.expression

    pexp_object constructs an Ast.expression_desc.Pexp_object

    Example OCaml

    object ... end

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.

    pexp_function constructs an Ast.expression_desc.Pexp_function

    Example OCaml

    function P1 -> E1 | ... | Pn -> En

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.

    pexp_constant constructs an Ast.expression_desc.Pexp_constant

    Example OCaml

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    ptyp_package constructs an Ast.core_type_desc.Ptyp_package

    Example OCaml

    (module S).

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_alias constructs an Ast.core_type_desc.Ptyp_alias

    Example OCaml

    T as 'a.

    val ptyp_class : @@ -350,7 +350,7 @@ Astlib.Ast_500.Parsetree.core_type

    ptyp_class constructs an Ast.core_type_desc.Ptyp_class

    Example OCaml

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.

    ptyp_constr constructs an Ast.core_type_desc.Ptyp_constr

    Example OCaml

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    val pctf_extension : + Astlib.Ast_500.Parsetree.core_type

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    pctf_method constructs an Ast.class_type_field_desc.Pctf_method

    Example OCaml

    method x: T

    Note: T can be a Ptyp_poly.

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    pcty_signature constructs an Ast.class_type_desc.Pcty_signature

    Example OCaml

    object ... end

    Class structure

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    pcf_extension constructs an Ast.class_field_desc.Pcf_extension

    Example OCaml

    [%%id]

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.

    pcl_structure constructs an Ast.class_expr_desc.Pcl_structure

    Example OCaml

    object ... end

    pcl_constr constructs an Ast.class_expr_desc.Pcl_constr

    Example OCaml

    c and ['a1, ..., 'an] c

    Case

    case constructs an Ast.case

    Example OCaml

    Values of type case represents (P -> E) or (P when E0 -> E)

    Binding op

    Attribute

    attribute constructs an Ast.attribute

    Example OCaml

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    'a open infos

    val open_infos : - expr:'a -> - override:Astlib.Ast_500.Asttypes.override_flag -> - 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    val class_infos : - virt:Astlib.Ast_500.Asttypes.virtual_flag -> - params: + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    val estring : string -> Astlib.Ast_500.Parsetree.expression
    val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
    val pstring : string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
    val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val eapply : + name:string Astlib.Location.loc -> + expr:'a -> + 'a Astlib.Ast_500.Parsetree.class_infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    val estring : string -> Astlib.Ast_500.Parsetree.expression
    val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
    val pstring : string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
    val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val eabstract : @@ -494,27 +494,27 @@ Astlib.Ast_500.Parsetree.pattern

    plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

    plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

    pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

    • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
    val unapplied_type_constr_conv : Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression

    unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

    • sexp_of_t if path is "t"
    • A.B.sexp_of_foo if path is "A.B.foo"
    • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
    val type_constr_conv : Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression list -> Astlib.Ast_500.Parsetree.expression
    module Latest : sig ... end

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    \ No newline at end of file + name:string Astlib.Location.loc -> + args:Astlib.Ast_500.Parsetree.constructor_arguments -> + res:Astlib.Ast_500.Parsetree.core_type option -> + Astlib.Ast_500.Parsetree.constructor_declaration
    diff --git a/ppxlib/Ppxlib/Ast_builder/index.html b/ppxlib/Ppxlib/Ast_builder/index.html index 6f62e17..81b051d 100644 --- a/ppxlib/Ppxlib/Ast_builder/index.html +++ b/ppxlib/Ppxlib/Ast_builder/index.html @@ -1,2 +1,2 @@ -Ast_builder (ppxlib.Ppxlib.Ast_builder)

    Module Ppxlib.Ast_builder

    Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    module Default : sig ... end

    Helpers taking a ~loc argument. This module is meant to be opened or aliased.

    module type Loc = sig ... end
    module type S = sig ... end
    module Make (Loc : Loc) : S

    Build Ast helpers with the location argument factorized.

    val make : Location.t -> (module S)

    Functional version of Make.

    \ No newline at end of file +Ast_builder (ppxlib.Ppxlib.Ast_builder)

    Module Ppxlib.Ast_builder

    Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    module Default : sig ... end

    Helpers taking a ~loc argument. This module is meant to be opened or aliased.

    module type Loc = sig ... end
    module type S = sig ... end
    module Make (Loc : Loc) : S

    Build Ast helpers with the location argument factorized.

    val make : Location.t -> (module S)

    Functional version of Make.

    diff --git a/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html b/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html index 0a32531..24d4f75 100644 --- a/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html +++ b/ppxlib/Ppxlib/Ast_builder/module-type-Loc/index.html @@ -1,2 +1,2 @@ -Loc (ppxlib.Ppxlib.Ast_builder.Loc)

    Module type Ast_builder.Loc

    val loc : Location.t
    \ No newline at end of file +Loc (ppxlib.Ppxlib.Ast_builder.Loc)

    Module type Ast_builder.Loc

    val loc : Location.t
    diff --git a/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html b/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html index cbdf3d8..a71db66 100644 --- a/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html +++ b/ppxlib/Ppxlib/Ast_builder/module-type-S/Latest/index.html @@ -1,11 +1,11 @@ -Latest (ppxlib.Ppxlib.Ast_builder.S.Latest)

    Module S.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    val ppat_construct : +Latest (ppxlib.Ppxlib.Ast_builder.S.Latest)

    Module S.Latest

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    \ No newline at end of file + Astlib.Ast_500.Parsetree.constructor_declaration
    diff --git a/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html b/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html index 761db33..75b4a85 100644 --- a/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html +++ b/ppxlib/Ppxlib/Ast_builder/module-type-S/Located/index.html @@ -1,2 +1,2 @@ -Located (ppxlib.Ppxlib.Ast_builder.S.Located)

    Module S.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : string -> Longident.t t
    \ No newline at end of file +Located (ppxlib.Ppxlib.Ast_builder.S.Located)

    Module S.Located

    type 'a t = 'a Loc.t
    val loc : _ t -> Location.t
    val mk : 'a -> 'a t
    val map : ('a -> 'b) -> 'a t -> 'b t
    val map_lident : string t -> Longident.t t
    val lident : string -> Longident.t t
    diff --git a/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html b/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html index 8416f69..8e11970 100644 --- a/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html +++ b/ppxlib/Ppxlib/Ast_builder/module-type-S/index.html @@ -1,38 +1,38 @@ -S (ppxlib.Ppxlib.Ast_builder.S)

    Module type Ast_builder.S

    module Located : sig ... end
    val loc : Location.t

    Value description

    val value_description : - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.core_type -> - prim:string list -> - Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    val value_binding : - pat:Astlib.Ast_500.Parsetree.pattern -> - expr:Astlib.Ast_500.Parsetree.expression -> +S (ppxlib.Ppxlib.Ast_builder.S)

    Module type Ast_builder.S

    module Located : sig ... end
    val loc : Location.t

    Value description

    val value_description : + name:string Astlib.Location.loc -> + type_:Astlib.Ast_500.Parsetree.core_type -> + prim:string list -> + Astlib.Ast_500.Parsetree.value_description

    value_description constructs an Ast.value_description

    Example OCaml

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Value binding

    Type extension

    type_extension constructs an Ast.type_extension

    Example OCaml

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    Type exception

    type_exception constructs an Ast.type_exception

    Example OCaml

    Definition of a new exception (exception E).

    Type declaration

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    type_declaration constructs an Ast.type_declaration

    Example OCaml

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.

    Toplevel directive

    toplevel_directive constructs an Ast.toplevel_directive

    Structure item

    pstr_primitive constructs an Ast.structure_item_desc.Pstr_primitive

    Example OCaml

    • val x: T
    • external x: T = "s1" ... "sn"

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    pstr_value constructs an Ast.structure_item_desc.Pstr_value

    Example OCaml

    Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

    • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.

    Signature item

    val psig_extension : @@ -108,10 +108,10 @@ bool -> Astlib.Ast_500.Parsetree.core_type list -> Astlib.Ast_500.Parsetree.row_field

    rtag constructs an Ast.row_field_desc.Rtag

    Example OCaml

    Rtag(`A, b, l) represents:

    • `A when b is true and l is [],
    • `A of T when b is false and l is [T],
    • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
    • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
    • The bool field is true if the tag contains a constant (empty) constructor.
    • & occurs when several types are used for the same constructor (see 4.2 in the manual)

    Position

    val position : - fname:string -> - lnum:int -> - bol:int -> - cnum:int -> + fname:string -> + lnum:int -> + bol:int -> + cnum:int -> Stdlib.Lexing.position

    position constructs an Ast.position

    Pattern

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    ppat_record constructs an Ast.pattern_desc.Ppat_record

    Example OCaml

    Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

    • { l1=P1; ...; ln=Pn } when flag is Closed
    • { l1=P1; ...; ln=Pn; _} when flag is Open

    Invariant: n > 0

    ppat_variant constructs an Ast.pattern_desc.Ppat_variant

    Example OCaml

    Ppat_variant(`A, pat) represents:

    • `A when pat is None,
    • `A P when pat is Some P

    Module type declaration

    val module_type_declaration : - name:string Astlib.Location.loc -> - type_:Astlib.Ast_500.Parsetree.module_type option -> - Astlib.Ast_500.Parsetree.module_type_declaration

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    module_type_declaration constructs an Ast.module_type_declaration

    Example OCaml

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.

    Module type

    pmty_alias constructs an Ast.module_type_desc.Pmty_alias

    Example OCaml

    (module M)

    pmty_signature constructs an Ast.module_type_desc.Pmty_signature

    Example OCaml

    sig ... end

    pmty_ident constructs an Ast.module_type_desc.Pmty_ident

    Example OCaml

    Pmty_ident(S) represents S

    Module substitution

    module_substitution constructs an Ast.module_substitution

    Example OCaml

    Values of type module_substitution represents S := M

    Module expr

    pmod_extension constructs an Ast.module_expr_desc.Pmod_extension

    Example OCaml

    [%id]

    val pmod_unpack : @@ -195,26 +195,26 @@ Astlib.Ast_500.Parsetree.module_expr

    pmod_structure constructs an Ast.module_expr_desc.Pmod_structure

    Example OCaml

    struct ... end

    Module declaration

    module_declaration constructs an Ast.module_declaration

    Example OCaml

    Values of type module_declaration represents S : MT

    Module binding

    module_binding constructs an Ast.module_binding

    Example OCaml

    Values of type module_binding represents module X = ME

    Location

    val location : - start:Stdlib.Lexing.position -> - end_:Stdlib.Lexing.position -> - ghost:bool -> + start:Stdlib.Lexing.position -> + end_:Stdlib.Lexing.position -> + ghost:bool -> Astlib.Location.t

    location constructs an Ast.location

    Letop

    Label declaration

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    label_declaration constructs an Ast.label_declaration

    Example OCaml

    Note: T can be a Ptyp_poly.

    Extension constructor

    Expression

    pexp_unreachable constructs an Ast.expression_desc.Pexp_unreachable

    Example OCaml

    .

    pexp_extension constructs an Ast.expression_desc.Pexp_extension

    Example OCaml

    [%id]

    val pexp_letop : @@ -232,7 +232,7 @@ Astlib.Ast_500.Parsetree.expression

    pexp_object constructs an Ast.expression_desc.Pexp_object

    Example OCaml

    object ... end

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_poly constructs an Ast.expression_desc.Pexp_poly

    Example OCaml

    Used for method bodies.

    Can only be used as the expression under Cfk_concrete for methods (not values).

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_for constructs an Ast.expression_desc.Pexp_for

    Example OCaml

    Pexp_for(i, E1, E2, direction, E3) represents:

    • for i = E1 to E2 do E3 done when direction is Upto
    • for i = E1 downto E2 do E3 done when direction is Downto

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_apply constructs an Ast.expression_desc.Pexp_apply

    Example OCaml

    Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

    li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

    Invariant: n > 0

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.

    pexp_fun constructs an Ast.expression_desc.Pexp_fun

    Example OCaml

    Pexp_fun(lbl, exp0, P, E1) represents:

    • fun P -> E1 when lbl is Nolabel and exp0 is None
    • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
    • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
    • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

    Notes:

    • If E0 is provided, only Optional is allowed.
    • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
    • let f P = E is represented using Pexp_fun.

    pexp_function constructs an Ast.expression_desc.Pexp_function

    Example OCaml

    function P1 -> E1 | ... | Pn -> En

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.

    pexp_let constructs an Ast.expression_desc.Pexp_let

    Example OCaml

    Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

    • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.

    pexp_constant constructs an Ast.expression_desc.Pexp_constant

    Example OCaml

    Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

    ptyp_package constructs an Ast.core_type_desc.Ptyp_package

    Example OCaml

    (module S).

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

    let x : 'a1 ... 'an. T = e ...

    ptyp_poly constructs an Ast.core_type_desc.Ptyp_poly

    Example OCaml

    'a1 ... 'an. T

    Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_variant constructs an Ast.core_type_desc.Ptyp_variant

    Example OCaml

    Ptyp_variant([`A;`B], flag, labels) represents:

    • [ `A|`B ] when flag is Closed, and labels is None,
    • [> `A|`B ] when flag is Open, and labels is None,
    • [< `A|`B ] when flag is Closed, and labels is Some [],
    • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].

    ptyp_alias constructs an Ast.core_type_desc.Ptyp_alias

    Example OCaml

    T as 'a.

    val ptyp_class : @@ -350,7 +350,7 @@ Astlib.Ast_500.Parsetree.core_type

    ptyp_class constructs an Ast.core_type_desc.Ptyp_class

    Example OCaml

    Ptyp_class(tconstr, l) represents:

    • #tconstr when l=[],
    • T #tconstr when l=[T],
    • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.

    ptyp_object constructs an Ast.core_type_desc.Ptyp_object

    Example OCaml

    Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

    • < l1:T1; ...; ln:Tn > when flag is Closed,
    • < l1:T1; ...; ln:Tn; .. > when flag is Open.

    ptyp_constr constructs an Ast.core_type_desc.Ptyp_constr

    Example OCaml

    Ptyp_constr(lident, l) represents:

    • tconstr when l=[],
    • T tconstr when l=[T],
    • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    val pctf_extension : + Astlib.Ast_500.Parsetree.core_type

    ptyp_arrow constructs an Ast.core_type_desc.Ptyp_arrow

    Example OCaml

    Ptyp_arrow(lbl, T1, T2) represents:

    val ptyp_var : string -> Astlib.Ast_500.Parsetree.core_type

    ptyp_var constructs an Ast.core_type_desc.Ptyp_var

    Example OCaml

    A type variable such as 'a

    ptyp_any constructs an Ast.core_type_desc.Ptyp_any

    Example OCaml

    _

    Constructor declaration

    Class type field

    pctf_method constructs an Ast.class_type_field_desc.Pctf_method

    Example OCaml

    method x: T

    Note: T can be a Ptyp_poly.

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    pcty_arrow constructs an Ast.class_type_desc.Pcty_arrow

    Example OCaml

    Pcty_arrow(lbl, T, CT) represents:

    pcty_signature constructs an Ast.class_type_desc.Pcty_signature

    Example OCaml

    object ... end

    Class structure

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    class_structure constructs an Ast.class_structure

    Example OCaml

    Values of type class_structure represents:

    Class signature

    class_signature constructs an Ast.class_signature

    Example OCaml

    Values of type class_signature represents:

    Class field

    pcf_extension constructs an Ast.class_field_desc.Pcf_extension

    Example OCaml

    [%%id]

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_method constructs an Ast.class_field_desc.Pcf_method

    Example OCaml

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_val constructs an Ast.class_field_desc.Pcf_val

    Example OCaml

    Pcf_val(x,flag, kind) represents:

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcf_inherit constructs an Ast.class_field_desc.Pcf_inherit

    Example OCaml

    Pcf_inherit(flag, CE, s) represents:

    • inherit CE when flag is Fresh and s is None,
    • inherit CE as x when flag is Fresh and s is Some x,
    • inherit! CE when flag is Override and s is None,
    • inherit! CE as x when flag is Override and s is Some x

    Class expr

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_let constructs an Ast.class_expr_desc.Pcl_let

    Example OCaml

    Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

    • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
    • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.

    pcl_fun constructs an Ast.class_expr_desc.Pcl_fun

    Example OCaml

    Pcl_fun(lbl, exp0, P, CE) represents:

    • fun P -> CE when lbl is Nolabel and exp0 is None,
    • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
    • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
    • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.

    pcl_structure constructs an Ast.class_expr_desc.Pcl_structure

    Example OCaml

    object ... end

    pcl_constr constructs an Ast.class_expr_desc.Pcl_constr

    Example OCaml

    c and ['a1, ..., 'an] c

    Case

    case constructs an Ast.case

    Example OCaml

    Values of type case represents (P -> E) or (P when E0 -> E)

    Binding op

    Attribute

    attribute constructs an Ast.attribute

    Example OCaml

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    'a open infos

    val open_infos : - expr:'a -> - override:Astlib.Ast_500.Asttypes.override_flag -> - 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    val class_infos : - virt:Astlib.Ast_500.Asttypes.virtual_flag -> - params: + expr:'a -> + override:Astlib.Ast_500.Asttypes.override_flag -> + 'a Astlib.Ast_500.Parsetree.open_infos

    open_infos constructs an Ast.'aopen_infos

    Example OCaml

    Values of type 'a open_infos represents:

    'a include infos

    val include_infos : 'a -> 'a Astlib.Ast_500.Parsetree.include_infos

    include_infos constructs an Ast.'ainclude_infos

    'a class infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    val estring : string -> Astlib.Ast_500.Parsetree.expression
    val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
    val pstring : string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
    val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val eapply : + name:string Astlib.Location.loc -> + expr:'a -> + 'a Astlib.Ast_500.Parsetree.class_infos

    class_infos constructs an Ast.'aclass_infos

    Example OCaml

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    val estring : string -> Astlib.Ast_500.Parsetree.expression
    val enativeint : nativeint -> Astlib.Ast_500.Parsetree.expression
    val pstring : string -> Astlib.Ast_500.Parsetree.pattern
    val pfloat : string -> Astlib.Ast_500.Parsetree.pattern
    val pint32 : int32 -> Astlib.Ast_500.Parsetree.pattern
    val pint64 : int64 -> Astlib.Ast_500.Parsetree.pattern
    val pnativeint : nativeint -> Astlib.Ast_500.Parsetree.pattern

    evar id produces a Pexp_ident _ expression, it parses its input so you can pass any dot-separated identifier, for instance: evar ~loc "Foo.bar".

    val eabstract : @@ -494,27 +494,27 @@ Astlib.Ast_500.Parsetree.pattern

    plist_tail ~loc [pat1; pat2; pat3] pat_tail produces the pattern pat1::pat2::pat3::pat_tail.

    plist ~loc [pat1; pat2; pat3] produces the list pattern [pat1; pat2; pat3].

    pstr_value_list ~loc rf vbs = pstr_value ~loc rf vbs if vbs <> [], [] otherwise.

    • deprecated [since 2016-10] use Nonrecursive on the P(str|sig)_type instead
    val unapplied_type_constr_conv : Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression

    unapplied_type_constr_conv is the standard way to map identifiers to conversion fonctions, for preprocessor that creates values that follow the structure of types. More precisely, path_conv path (sprintf "sexp_of_%s") is:

    • sexp_of_t if path is "t"
    • A.B.sexp_of_foo if path is "A.B.foo"
    • A.B.sexp_of_f__foo (module A1) (module A2) if path is "A.B.F(A1)(A2).foo" type_constr_conv also applies it to a list of expression, which both prevents the compiler from allocating useless closures, and almost always what is needed, since type constructors are always applied.
    val type_constr_conv : Longident.t Loc.t -> - f:(string -> string) -> + f:(string -> string) -> Astlib.Ast_500.Parsetree.expression list -> Astlib.Ast_500.Parsetree.expression
    module Latest : sig ... end

    This module contains updated versions of node constructors that were kept stable when the node changed. For every function in this module, there's an equally-named function outside this module. The function outside this module will stay stable, whereas the function inside this module will adapt potential upcoming new compiler features. Only use a function in this module, if the equally-named one outside this module is missing a feature you need.

    \ No newline at end of file + name:string Astlib.Location.loc -> + args:Astlib.Ast_500.Parsetree.constructor_arguments -> + res:Astlib.Ast_500.Parsetree.core_type option -> + Astlib.Ast_500.Parsetree.constructor_declaration
    diff --git a/ppxlib/Ppxlib/Ast_io/index.html b/ppxlib/Ppxlib/Ast_io/index.html index eee0773..efaf53c 100644 --- a/ppxlib/Ppxlib/Ast_io/index.html +++ b/ppxlib/Ppxlib/Ast_io/index.html @@ -1,2 +1,2 @@ -Ast_io (ppxlib.Ppxlib.Ast_io)

    Module Ppxlib.Ast_io

    A small module to help read bin-annots generated files.

    type t
    val read_binary : string -> (t, string) result
    val get_ast : t -> ast
    val get_input_name : t -> string
    \ No newline at end of file +Ast_io (ppxlib.Ppxlib.Ast_io)

    Module Ppxlib.Ast_io

    A small module to help read bin-annots generated files.

    type t
    val read_binary : string -> (t, string) result
    val get_ast : t -> ast
    val get_input_name : t -> string
    diff --git a/ppxlib/Ppxlib/Ast_pattern/Packed/index.html b/ppxlib/Ppxlib/Ast_pattern/Packed/index.html index 9c78f11..7fc7fd3 100644 --- a/ppxlib/Ppxlib/Ast_pattern/Packed/index.html +++ b/ppxlib/Ppxlib/Ast_pattern/Packed/index.html @@ -1,6 +1,6 @@ -Packed (ppxlib.Ppxlib.Ast_pattern.Packed)

    Module Ast_pattern.Packed

    type ('a, 'b) t
    val create : ('a, 'b, 'c) t -> 'b -> ('a, 'c) t
    val parse : ('a, 'b) t -> Location.t -> 'a -> 'b
    val parse_res : +Packed (ppxlib.Ppxlib.Ast_pattern.Packed)

    Module Ast_pattern.Packed

    type ('a, 'b) t
    val create : ('a, 'b, 'c) t -> 'b -> ('a, 'c) t
    val parse : ('a, 'b) t -> Location.t -> 'a -> 'b
    val parse_res : ('a, 'b) t -> Location.t -> 'a -> - ('b, Location.Error.t Stdppx.NonEmptyList.t) result
    \ No newline at end of file + ('b, Location.Error.t Stdppx.NonEmptyList.t) result
    diff --git a/ppxlib/Ppxlib/Ast_pattern/index.html b/ppxlib/Ppxlib/Ast_pattern/index.html index 31293f8..b25fd49 100644 --- a/ppxlib/Ppxlib/Ast_pattern/index.html +++ b/ppxlib/Ppxlib/Ast_pattern/index.html @@ -1,34 +1,34 @@ -Ast_pattern (ppxlib.Ppxlib.Ast_pattern)

    Module Ppxlib.Ast_pattern

    This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    type ('a, 'b, 'c) t

    Type of a pattern:

    • 'a is the type of value matched by the pattern
    • 'b is the continuation, for instance for a pattern that captures an int and a string, 'b will be int -> string -> _
    • 'c is the result of the continuation.
    val parse : +Ast_pattern (ppxlib.Ppxlib.Ast_pattern)

    Module Ppxlib.Ast_pattern

    This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    type ('a, 'b, 'c) t

    Type of a pattern:

    • 'a is the type of value matched by the pattern
    • 'b is the continuation, for instance for a pattern that captures an int and a string, 'b will be int -> string -> _
    • 'c is the result of the continuation.
    val parse : ('a, 'b, 'c) t -> Location.t -> - ?on_error:(unit -> 'c) -> + ?on_error:(unit -> 'c) -> 'a -> 'b -> 'c

    Matches a value against a pattern. Raise a located error in case of failure.

    val parse_res : ('a, 'b, 'c) t -> Location.t -> - ?on_error:(unit -> 'c) -> + ?on_error:(unit -> 'c) -> 'a -> 'b -> - ('c, Location.Error.t Stdppx.NonEmptyList.t) result

    Matches a value against a pattern and return a result.

    module Packed : sig ... end
    val __ : ('a, 'a -> 'b, 'b) t

    Pattern that captures its input.

    val __' : ('a, 'a Loc.t -> 'b, 'b) t

    Same as __ but also captures the location.

    Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

    estring __'

    but using it to capture an expression would not yield the expected result:

    pair (eint (int 42)) __'

    In the latter case you should use the pexp_loc field of the captured expression instead.

    val drop : ('a, 'b, 'b) t

    Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

    val as__ : ('a, 'b, 'c) t -> ('a, 'a -> 'b, 'c) t

    As-pattern. Passes the current node to the continuation.

    Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

    val alt : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

    alt stands for `alternatives'. It matches either the first pattern or the second one.

    Matches a value against a pattern and return a result.

    module Packed : sig ... end
    val __ : ('a, 'a -> 'b, 'b) t

    Pattern that captures its input.

    val __' : ('a, 'a Loc.t -> 'b, 'b) t

    Same as __ but also captures the location.

    Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

      estring __'

    but using it to capture an expression would not yield the expected result:

      pair (eint (int 42)) __'

    In the latter case you should use the pexp_loc field of the captured expression instead.

    val drop : ('a, 'b, 'b) t

    Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

    val as__ : ('a, 'b, 'c) t -> ('a, 'a -> 'b, 'c) t

    As-pattern. Passes the current node to the continuation.

    Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

    val alt : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

    alt stands for `alternatives'. It matches either the first pattern or the second one.

    val alt_option : ('a, 'v -> 'b, 'c) t -> ('a, 'b, 'c) t -> - ('a, 'v option -> 'b, 'c) t

    Same as alt, for the common case where the left-hand-side captures a value but not the right-hand-side.

    val (|||) : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

    Same as alt

    val map : ('a, 'b, 'c) t -> f:('d -> 'b) -> ('a, 'd, 'c) t
    val map' : ('a, 'b, 'c) t -> f:(Location.t -> 'd -> 'b) -> ('a, 'd, 'c) t
    val map_result : ('a, 'b, 'c) t -> f:('c -> 'd) -> ('a, 'b, 'd) t
    val (>>|) : ('a, 'b, 'c) t -> ('d -> 'b) -> ('a, 'd, 'c) t

    Same as map

    val map0 : ('a, 'b, 'c) t -> f:'v -> ('a, 'v -> 'b, 'c) t
    val map1 : ('a, 'v1 -> 'b, 'c) t -> f:('v1 -> 'v) -> ('a, 'v -> 'b, 'c) t
    val map2 : + ('a, 'v option -> 'b, 'c) t

    Same as alt, for the common case where the left-hand-side captures a value but not the right-hand-side.

    val (|||) : ('a, 'b, 'c) t -> ('a, 'b, 'c) t -> ('a, 'b, 'c) t

    Same as alt

    val map : ('a, 'b, 'c) t -> f:('d -> 'b) -> ('a, 'd, 'c) t
    val map' : ('a, 'b, 'c) t -> f:(Location.t -> 'd -> 'b) -> ('a, 'd, 'c) t
    val map_result : ('a, 'b, 'c) t -> f:('c -> 'd) -> ('a, 'b, 'd) t
    val (>>|) : ('a, 'b, 'c) t -> ('d -> 'b) -> ('a, 'd, 'c) t

    Same as map

    val map0 : ('a, 'b, 'c) t -> f:'v -> ('a, 'v -> 'b, 'c) t
    val map1 : ('a, 'v1 -> 'b, 'c) t -> f:('v1 -> 'v) -> ('a, 'v -> 'b, 'c) t
    val map2 : ('a, 'v1 -> 'v2 -> 'b, 'c) t -> - f:('v1 -> 'v2 -> 'v) -> - ('a, 'v -> 'b, 'c) t
    val map0' : ('a, 'b, 'c) t -> f:(Location.t -> 'v) -> ('a, 'v -> 'b, 'c) t
    val map1' : + f:('v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) t
    val map0' : ('a, 'b, 'c) t -> f:(Location.t -> 'v) -> ('a, 'v -> 'b, 'c) t
    val map1' : ('a, 'v1 -> 'b, 'c) t -> - f:(Location.t -> 'v1 -> 'v) -> + f:(Location.t -> 'v1 -> 'v) -> ('a, 'v -> 'b, 'c) t
    val map2' : ('a, 'v1 -> 'v2 -> 'b, 'c) t -> - f:(Location.t -> 'v1 -> 'v2 -> 'v) -> - ('a, 'v -> 'b, 'c) t
    val map_value : ('a, 'b, 'c) t -> f:('d -> 'a) -> ('d, 'b, 'c) t
    val map_value' : + f:(Location.t -> 'v1 -> 'v2 -> 'v) -> + ('a, 'v -> 'b, 'c) t
    val map_value : ('a, 'b, 'c) t -> f:('d -> 'a) -> ('d, 'b, 'c) t
    val map_value' : ('a, 'b, 'c) t -> - f:(Astlib.Location.t -> 'd -> 'a) -> + f:(Astlib.Location.t -> 'd -> 'a) -> ('d, 'b, 'c) t
    val nil : (_ list, 'a, 'a) t
    val (^::) : ('a, 'b, 'c) t -> ('a list, 'c, 'd) t -> ('a list, 'b, 'd) t
    val many : ('a, 'b -> 'c, 'c) t -> ('a list, 'b list -> 'c, 'c) t
    val int : int -> (int, 'a, 'a) t
    val char : char -> (char, 'a, 'a) t
    val string : string -> (string, 'a, 'a) t
    val float : float -> (float, 'a, 'a) t
    val int32 : int32 -> (int32, 'a, 'a) t
    val int64 : int64 -> (int64, 'a, 'a) t
    val nativeint : nativeint -> (nativeint, 'a, 'a) t
    val bool : bool -> (bool, 'a, 'a) t
    val ebool : (bool, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val pbool : (bool, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) t
    val cst : - to_string:('a -> string) -> - ?equal:('a -> 'a -> bool) -> + to_string:('a -> string) -> + ?equal:('a -> 'a -> bool) -> 'a -> ('a, 'b, 'b) t
    val none : (_ option, 'a, 'a) t
    val some : ('a, 'b, 'c) t -> ('a option, 'b, 'c) t
    val pair : ('a1, 'b, 'c) t -> ('a2, 'c, 'd) t -> ('a1 * 'a2, 'b, 'd) t
    val (**) : ('a1, 'b, 'c) t -> ('a2, 'c, 'd) t -> ('a1 * 'a2, 'b, 'd) t
    val triple : ('a1, 'b, 'c) t -> @@ -36,165 +36,165 @@ ('a3, 'd, 'e) t -> ('a1 * 'a2 * 'a3, 'b, 'e) t
    val loc : ('a, 'b, 'c) t -> ('a Loc.t, 'b, 'c) t
    val pack0 : ('a, 'b, 'c) t -> ('a, unit -> 'b, 'c) t
    val pack2 : ('a, 'b -> 'c -> 'd, 'e) t -> ('a, ('b * 'c) -> 'd, 'e) t
    val pack3 : ('a, 'b -> 'c -> 'd -> 'e, 'f) t -> - ('a, ('b * 'c * 'd) -> 'e, 'f) t

    AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

    val pexp_loc :
    -  (Location.t, 'a, 'b) t ->
    -  (expression, 'b, 'c) t ->
    -  (expression, 'a, 'c) t
    +  ('a, ('b * 'c * 'd) -> 'e, 'f) t

    AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

      val pexp_loc :
    +    (Location.t, 'a, 'b) t ->
    +    (expression, 'b, 'c) t ->
    +    (expression, 'a, 'c) t
     
    -val pexp_attributes :
    -  (attributes, 'a, 'b) t ->
    -  (expression, 'b, 'c) t ->
    -  (expression, 'a, 'c) t
    val nolabel : - (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val labelled : + val pexp_attributes : + (attributes, 'a, 'b) t -> + (expression, 'b, 'c) t -> + (expression, 'a, 'c) t
    val nolabel : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val labelled : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val optional : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val optional : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val binding_op : - op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - pat:(Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - exp:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.binding_op, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val case : - lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - guard: - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val binding_op : + op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + pat:(Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + exp:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.binding_op, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val case : + lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + guard: + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - rhs:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcl_loc : + rhs:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_attributes : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_constr : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_structure : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_structure : (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_fun : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcl_fun : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val pcl_apply : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val pcl_apply : (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_let : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_let : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcl_constraint : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_constraint : (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_extension : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_open : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcl_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_loc : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_attributes : + (Astlib.Ast_500.Parsetree.class_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_inherit : + (Astlib.Ast_500.Parsetree.class_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_inherit : (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string Astlib.Location.loc option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcf_val : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string Astlib.Location.loc option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_val : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.mutable_flag * Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_method : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_method : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.private_flag * Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_constraint : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_constraint : (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_initializer : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_initializer : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_attribute : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_extension : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val cfk_virtual : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val cfk_virtual : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val cfk_concrete : + (Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val cfk_concrete : (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field_kind, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val class_infos_attributes : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val class_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.class_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.class_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val class_infos : - virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: + ('c Astlib.Ast_500.Parsetree.class_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.class_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val class_infos : + virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: ((Astlib.Ast_500.Parsetree.core_type * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - name:(string, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - expr:('g, 'h, 'i) Ppxlib__.Ast_pattern0.t -> - ('j Astlib.Ast_500.Parsetree.class_infos, 'k, 'l) Ppxlib__.Ast_pattern0.t
    val class_signature : - self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - fields: - (Astlib.Ast_500.Parsetree.class_type_field list, 'c, 'd) + name:(string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + expr:('e, 'd, 'f) Ppxlib__.Ast_pattern0.t -> + ('e Astlib.Ast_500.Parsetree.class_infos, 'a, 'f) Ppxlib__.Ast_pattern0.t
    val class_signature : + self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_type_field list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_signature, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val class_structure : - self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - fields: - (Astlib.Ast_500.Parsetree.class_field list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_structure, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_loc : + (Astlib.Ast_500.Parsetree.class_signature, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val class_structure : + self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_field list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_attributes : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_constr : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_signature : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_signature : (Astlib.Ast_500.Parsetree.class_signature, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_arrow : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcty_arrow : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcty_extension : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_open : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcty_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_loc : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_attributes : + (Astlib.Ast_500.Parsetree.class_type_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_inherit : + (Astlib.Ast_500.Parsetree.class_type_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_inherit : (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_val : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_val : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.mutable_flag * Astlib.Ast_500.Asttypes.virtual_flag @@ -202,7 +202,7 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_method : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_method : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.private_flag * Astlib.Ast_500.Asttypes.virtual_flag @@ -210,86 +210,86 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_constraint : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_constraint : (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_attribute : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_extension : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val closed : - (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val open_ : - (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pconst_integer : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val closed : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val open_ : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pconst_integer : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pconst_char : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pconst_char : (char, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pconst_string : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pconst_string : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Location.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pconst_float : + (Astlib.Location.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pconst_float : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcstr_tuple : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcstr_tuple : (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcstr_record : (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val constructor_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.constructor_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val constructor_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - vars:(string Astlib.Location.loc list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - args: - (Astlib.Ast_500.Parsetree.constructor_arguments, 'e, 'f) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + vars:(string Astlib.Location.loc list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + args: + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - res: - (Astlib.Ast_500.Parsetree.core_type option, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'i, 'j) + res: + (Astlib.Ast_500.Parsetree.core_type option, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val ptyp_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_attributes : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_any : - (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_var : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_any : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ptyp_var : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_arrow : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_arrow : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val ptyp_tuple : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_tuple : (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_constr : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_object : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_object : (Astlib.Ast_500.Parsetree.object_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_class : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_class : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_alias : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_alias : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_variant : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_variant : (Astlib.Ast_500.Parsetree.row_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string list option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val ptyp_poly : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string list option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_poly : (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_package : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_package : (Astlib.Longident.t Astlib.Location.loc * (Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.core_type) @@ -297,618 +297,618 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_extension : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val upto : - (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val downto_ : - (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdira_loc : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val upto : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val downto_ : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pdira_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pdir_string : + (Astlib.Ast_500.Parsetree.directive_argument, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pdir_string : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pdir_int : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdir_int : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pdir_ident : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pdir_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pdir_bool : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdir_bool : (bool, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_loc : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_attributes : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_ident : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_constant : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_constant : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_let : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_let : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_function : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_function : (Astlib.Ast_500.Parsetree.case list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_fun : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_fun : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val pexp_apply : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val pexp_apply : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_match : + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_match : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_try : + (Astlib.Ast_500.Parsetree.case list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_try : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_tuple : + (Astlib.Ast_500.Parsetree.case list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_tuple : (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_construct : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_construct : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_variant : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_variant : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_record : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_record : ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_field : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_field : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_setfield : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_setfield : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_array : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_array : (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_ifthenelse : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_ifthenelse : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_sequence : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_sequence : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_while : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_while : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_for : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_for : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.direction_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.direction_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'k, 'l) Ppxlib__.Ast_pattern0.t
    val pexp_constraint : + (Astlib.Ast_500.Parsetree.expression, 'a, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_constraint : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_send : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_send : - (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_new : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_new : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_setinstvar : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_setinstvar : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_override : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_override : ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_letmodule : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_letmodule : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_letexception : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_letexception : (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_assert : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_assert : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_lazy : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_lazy : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_poly : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_poly : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_object : + (Astlib.Ast_500.Parsetree.core_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_object : (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_newtype : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_newtype : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_pack : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_pack : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_open : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_open : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_letop : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_letop : (Astlib.Ast_500.Parsetree.letop, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_extension : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_unreachable : - (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val extension_constructor_attributes : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_unreachable : + (Astlib.Ast_500.Parsetree.expression, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val extension_constructor_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'c, 'd) + (Astlib.Ast_500.Parsetree.extension_constructor, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val extension_constructor : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - kind: - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + kind: + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pext_decl : (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'g, 'h) + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pext_rebind : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val unit : - (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val named : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val named : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.functor_parameter, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val include_infos_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val include_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.include_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.include_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val include_infos : - mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - ('d Astlib.Ast_500.Parsetree.include_infos, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val injective : - (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val noinjectivity : - (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val label_declaration_attributes : + ('c Astlib.Ast_500.Parsetree.include_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.include_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val include_infos : + mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ('a Astlib.Ast_500.Parsetree.include_infos, 'b, 'c) Ppxlib__.Ast_pattern0.t
    val injective : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val noinjectivity : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val label_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val label_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - mutable_: - (Astlib.Ast_500.Asttypes.mutable_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val letop : - let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ands: - (Astlib.Ast_500.Parsetree.binding_op list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - body:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.letop, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val location : - start:(Stdlib.Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - end_:(Stdlib.Lexing.position, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - ghost:(bool, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Location.t, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val lident : + (Astlib.Ast_500.Parsetree.label_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val label_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + mutable_: + (Astlib.Ast_500.Asttypes.mutable_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val letop : + let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ands: + (Astlib.Ast_500.Parsetree.binding_op list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + body:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.letop, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val location : + start:(Stdlib.Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + end_:(Stdlib.Lexing.position, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ghost:(bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val lident : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ldot : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ldot : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val lapply : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val lapply : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_binding_attributes : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_binding_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_binding : - name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - expr:(Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_declaration_attributes : + (Astlib.Ast_500.Parsetree.module_binding, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_binding : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_declaration : - name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_loc : + (Astlib.Ast_500.Parsetree.module_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_declaration : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_attributes : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_ident : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_structure : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_structure : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_functor : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_functor : (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_apply : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_apply : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_constraint : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_constraint : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_unpack : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_unpack : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_extension : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val module_substitution_attributes : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val module_substitution_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'c, 'd) + (Astlib.Ast_500.Parsetree.module_substitution, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_substitution : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - manifest:(Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + manifest:(Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_ident : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_signature : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_signature : (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_functor : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_functor : (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_with : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_with : (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint list, 'c, 'd) + (Astlib.Ast_500.Parsetree.with_constraint list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_typeof : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_typeof : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_extension : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_alias : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_alias : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val module_type_declaration_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val module_type_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'c, 'd) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_type_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_: - (Astlib.Ast_500.Parsetree.module_type option, 'c, 'd) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_: + (Astlib.Ast_500.Parsetree.module_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val immutable : - (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val mutable_ : - (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pof_loc : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val mutable_ : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pof_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pof_attributes : + (Astlib.Ast_500.Parsetree.object_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pof_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val otag : + (Astlib.Ast_500.Parsetree.object_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val otag : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val oinherit : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val oinherit : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val open_infos_attributes : + (Astlib.Ast_500.Parsetree.object_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val open_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.open_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val open_infos : - expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - override: - (Astlib.Ast_500.Asttypes.override_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val override : - (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val fresh : - (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_loc : + ('c Astlib.Ast_500.Parsetree.open_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.open_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val open_infos : + expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + override: + (Astlib.Ast_500.Asttypes.override_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + ('a Astlib.Ast_500.Parsetree.open_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t
    val override : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val fresh : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ppat_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_attributes : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_any : - (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_var : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_any : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ppat_var : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_alias : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_alias : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_constant : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_constant : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_interval : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_interval : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_tuple : + (Astlib.Ast_500.Parsetree.constant, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_tuple : (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_construct : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_construct : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((string Astlib.Location.loc list * Astlib.Ast_500.Parsetree.pattern) option, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_variant : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_variant : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_record : + (Astlib.Ast_500.Parsetree.pattern option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_record : ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.pattern) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_array : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_array : (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_or : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_or : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_constraint : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_constraint : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_type : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_type : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_lazy : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_lazy : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_unpack : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_unpack : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_exception : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_exception : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_extension : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_open : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_open : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig : (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val position : - fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - lnum:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - bol:(int, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - cnum:(int, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Stdlib.Lexing.position, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val private_ : - (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val public : - (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val nonrecursive : - (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val recursive : - (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val prf_loc : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val position : + fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + lnum:(int, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + bol:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + cnum:(int, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Stdlib.Lexing.position, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val private_ : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val public : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val nonrecursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val recursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val prf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val prf_attributes : + (Astlib.Ast_500.Parsetree.row_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val prf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val rtag : + (Astlib.Ast_500.Parsetree.row_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val rtag : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val rinherit : + (bool, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val rinherit : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_loc : + (Astlib.Ast_500.Parsetree.row_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val psig_value : + (Astlib.Ast_500.Parsetree.signature_item, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val psig_value : (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_type : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_type : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + (Astlib.Ast_500.Parsetree.type_declaration list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val psig_typesubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val psig_typesubst : (Astlib.Ast_500.Parsetree.type_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_typext : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_typext : (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_exception : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_exception : (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_module : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_module : (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modsubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modsubst : (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_recmodule : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_recmodule : (Astlib.Ast_500.Parsetree.module_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modtype : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modtype : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modtypesubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modtypesubst : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_open : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_include : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_include : (Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_class : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_class : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_class_type : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_class_type : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_attribute : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_extension : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_loc : + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_eval : + (Astlib.Ast_500.Parsetree.structure_item, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_eval : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_value : + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_value : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_primitive : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_primitive : (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_type : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_type : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + (Astlib.Ast_500.Parsetree.type_declaration list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_typext : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_typext : (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_exception : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_exception : (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_module : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_module : (Astlib.Ast_500.Parsetree.module_binding, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_recmodule : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_recmodule : (Astlib.Ast_500.Parsetree.module_binding list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_modtype : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_modtype : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_open : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_open : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_class : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_class : (Astlib.Ast_500.Parsetree.class_expr Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_class_type : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_class_type : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_include : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_include : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.include_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_attribute : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_extension : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val toplevel_directive : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - arg: - (Astlib.Ast_500.Parsetree.directive_argument option, 'c, 'd) + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val toplevel_directive : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + arg: + (Astlib.Ast_500.Parsetree.directive_argument option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_directive, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptop_def : + (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptop_def : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptop_dir : + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptop_dir : (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val type_declaration_attributes : + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val type_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: ((Astlib.Ast_500.Parsetree.core_type * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - cstrs: + cstrs: ((Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type * Astlib.Location.t) list, - 'e, - 'f) - Ppxlib__.Ast_pattern0.t -> - kind:(Astlib.Ast_500.Parsetree.type_kind, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - private_: - (Astlib.Ast_500.Asttypes.private_flag, 'i, 'j) Ppxlib__.Ast_pattern0.t -> - manifest: - (Astlib.Ast_500.Parsetree.core_type option, 'k, 'l) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'm, 'n) Ppxlib__.Ast_pattern0.t
    val type_exception_attributes : - (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_exception : - constructor: - (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) - Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val type_extension_attributes : - (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_extension : - path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: - ((Astlib.Ast_500.Parsetree.core_type - * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) - list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - constructors: - (Astlib.Ast_500.Parsetree.extension_constructor list, 'e, 'f) + kind:(Astlib.Ast_500.Parsetree.type_kind, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + manifest: + (Astlib.Ast_500.Parsetree.core_type option, 'f, 'g) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'a, 'g) Ppxlib__.Ast_pattern0.t
    val type_exception_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_exception : + constructor: + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - private_: - (Astlib.Ast_500.Asttypes.private_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val ptype_abstract : - (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_variant : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val type_extension_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_extension : + path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'b, + 'c) + Ppxlib__.Ast_pattern0.t -> + constructors: + (Astlib.Ast_500.Parsetree.extension_constructor list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val ptype_abstract : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ptype_variant : (Astlib.Ast_500.Parsetree.constructor_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptype_record : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_record : (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptype_open : - (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val value_binding_attributes : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_open : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val value_binding_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_binding : - pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - expr:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_description_attributes : + (Astlib.Ast_500.Parsetree.value_binding, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_binding : + pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_description_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_description : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - prim:(string list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val covariant : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val contravariant : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val novariance : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val virtual_ : - (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val concrete : - (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pwith_type : + (Astlib.Ast_500.Parsetree.value_description, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_description : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + prim:(string list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val covariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val contravariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val novariance : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val virtual_ : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val concrete : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pwith_type : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_module : + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_module : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modtype : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modtype : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modtypesubst : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modtypesubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_typesubst : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_typesubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modsubst : + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modsubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val true_ : (bool, 'a, 'a) t
    val false_ : (bool, 'a, 'a) t
    val eint : (int, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val echar : (char, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val estring : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val true_ : (bool, 'a, 'a) t
    val false_ : (bool, 'a, 'a) t
    val eint : (int, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val echar : (char, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val estring : (string, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val efloat : (string, 'a, 'b) t -> @@ -928,8 +928,8 @@ val pexp_attributes : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) t -> (Ppxlib_ast.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression, 'a, 'b) t
    val attribute : - name:(string, 'a, 'b) t -> - payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) t -> + name:(string, 'a, 'b) t -> + payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) t -> (Astlib.Ast_500.Parsetree.attribute, 'a, 'c) t
    val extension : (string, 'a, 'b) t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) t -> @@ -937,4 +937,4 @@ val pexp_attributes : (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) t -> (Astlib.Ast_500.Parsetree.expression, 'b list -> 'c, 'c) t
    val esequence : (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) t -> - (Astlib.Ast_500.Parsetree.expression, 'b list -> 'c, 'c) t
    type context
    val of_func : (context -> Location.t -> 'a -> 'b -> 'c) -> ('a, 'b, 'c) t
    val to_func : ('a, 'b, 'c) t -> context -> Location.t -> 'a -> 'b -> 'c
    \ No newline at end of file + (Astlib.Ast_500.Parsetree.expression, 'b list -> 'c, 'c) t
    type context
    val of_func : (context -> Location.t -> 'a -> 'b -> 'c) -> ('a, 'b, 'c) t
    val to_func : ('a, 'b, 'c) t -> context -> Location.t -> 'a -> 'b -> 'c
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html b/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html index 033dbf0..f4fffc6 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-fold/index.html @@ -1,2 +1,2 @@ -fold (ppxlib.Ppxlib.Ast_traverse.fold)

    Class Ast_traverse.fold

    \ No newline at end of file +fold (ppxlib.Ppxlib.Ast_traverse.fold)

    Class Ast_traverse.fold

    inherit 'acc Ppxlib_ast.Ast.fold
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html b/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html index ac729a2..4ae13f8 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-fold_map/index.html @@ -1,2 +1,2 @@ -fold_map (ppxlib.Ppxlib.Ast_traverse.fold_map)

    Class Ast_traverse.fold_map

    \ No newline at end of file +fold_map (ppxlib.Ppxlib.Ast_traverse.fold_map)

    Class Ast_traverse.fold_map

    inherit 'acc Ppxlib_ast.Ast.fold_map
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html b/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html index aa9a7a2..155687d 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-iter/index.html @@ -1,2 +1,2 @@ -iter (ppxlib.Ppxlib.Ast_traverse.iter)

    Class Ast_traverse.iter

    \ No newline at end of file +iter (ppxlib.Ppxlib.Ast_traverse.iter)

    Class Ast_traverse.iter

    inherit Ppxlib_ast.Ast.iter
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html b/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html index c85b471..8c3991a 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-lift/index.html @@ -1,2 +1,2 @@ -lift (ppxlib.Ppxlib.Ast_traverse.lift)

    Class Ast_traverse.lift

    \ No newline at end of file +lift (ppxlib.Ppxlib.Ast_traverse.lift)

    Class Ast_traverse.lift

    inherit 'res Ppxlib_ast.Ast.lift
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html b/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html index 7676867..5f495af 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-lift_map_with_context/index.html @@ -1,2 +1,2 @@ -lift_map_with_context (ppxlib.Ppxlib.Ast_traverse.lift_map_with_context)

    Class Ast_traverse.lift_map_with_context

    \ No newline at end of file +lift_map_with_context (ppxlib.Ppxlib.Ast_traverse.lift_map_with_context)

    Class Ast_traverse.lift_map_with_context

    inherit ['ctx, 'res] Ppxlib_ast.Ast.lift_map_with_context
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-map/index.html b/ppxlib/Ppxlib/Ast_traverse/class-map/index.html index 0b75bd7..14ebd6e 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-map/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-map/index.html @@ -1,2 +1,2 @@ -map (ppxlib.Ppxlib.Ast_traverse.map)

    Class Ast_traverse.map

    \ No newline at end of file +map (ppxlib.Ppxlib.Ast_traverse.map)

    Class Ast_traverse.map

    inherit Ppxlib_ast.Ast.map
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html b/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html index 750890f..23d9adc 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-map_with_context/index.html @@ -1,2 +1,2 @@ -map_with_context (ppxlib.Ppxlib.Ast_traverse.map_with_context)

    Class Ast_traverse.map_with_context

    \ No newline at end of file +map_with_context (ppxlib.Ppxlib.Ast_traverse.map_with_context)

    Class Ast_traverse.map_with_context

    inherit 'ctx Ppxlib_ast.Ast.map_with_context
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html b/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html index d20ac05..b9782b0 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-map_with_expansion_context_and_errors/index.html @@ -1,4 +1,4 @@ -map_with_expansion_context_and_errors (ppxlib.Ppxlib.Ast_traverse.map_with_expansion_context_and_errors)

    Class Ast_traverse.map_with_expansion_context_and_errors

    inherit [Ppxlib__.Expansion_context.Base.t, Ppxlib__.Location.Error.t list] +map_with_expansion_context_and_errors (ppxlib.Ppxlib.Ast_traverse.map_with_expansion_context_and_errors)

    Class Ast_traverse.map_with_expansion_context_and_errors

    inherit [Ppxlib__.Expansion_context.Base.t, Ppxlib__.Location.Error.t list] Ppxlib_traverse_builtins.std_lift_mappers_with_context
    inherit [Ppxlib__.Expansion_context.Base.t, Ppxlib__.Location.Error.t list] - Ppxlib_ast.Ast.lift_map_with_context
    \ No newline at end of file + Ppxlib_ast.Ast.lift_map_with_context
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html b/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html index 5ddafbd..100c192 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-map_with_path/index.html @@ -1,2 +1,2 @@ -map_with_path (ppxlib.Ppxlib.Ast_traverse.map_with_path)

    Class Ast_traverse.map_with_path

    \ No newline at end of file +map_with_path (ppxlib.Ppxlib.Ast_traverse.map_with_path)

    Class Ast_traverse.map_with_path

    inherit 'ctx Ppxlib_ast.Ast.map_with_context
    diff --git a/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html b/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html index 60f0e11..1e08ce9 100644 --- a/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/class-sexp_of/index.html @@ -1,2 +1,2 @@ -sexp_of (ppxlib.Ppxlib.Ast_traverse.sexp_of)

    Class Ast_traverse.sexp_of

    \ No newline at end of file +sexp_of (ppxlib.Ppxlib.Ast_traverse.sexp_of)

    Class Ast_traverse.sexp_of

    inherit Stdppx.Sexp.t Ppxlib_ast.Ast.lift
    diff --git a/ppxlib/Ppxlib/Ast_traverse/index.html b/ppxlib/Ppxlib/Ast_traverse/index.html index 22d2917..7579582 100644 --- a/ppxlib/Ppxlib/Ast_traverse/index.html +++ b/ppxlib/Ppxlib/Ast_traverse/index.html @@ -1,22 +1,22 @@ -Ast_traverse (ppxlib.Ppxlib.Ast_traverse)

    Module Ppxlib.Ast_traverse

    This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    To use these classes, inherit from them and override the methods corresponding to the types from Parsetree you want to process. For instance to collect all the string constants in a structure:

    let string_constants_of =
    -  object
    -    inherit [string list] Ast_traverse.fold as super
    +Ast_traverse (ppxlib.Ppxlib.Ast_traverse)

    Module Ppxlib.Ast_traverse

    This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    To use these classes, inherit from them and override the methods corresponding to the types from Parsetree you want to process. For instance to collect all the string constants in a structure:

      let string_constants_of =
    +    object
    +      inherit [string list] Ast_traverse.fold as super
     
    -    method! expression e acc =
    -      let acc = super#expression e acc in
    -      match e.pexp_desc with
    -      | Pexp_constant (Const_string (s, _)) -> s :: acc
    -      | _ -> acc
    +      method! expression e acc =
    +        let acc = super#expression e acc in
    +        match e.pexp_desc with
    +        | Pexp_constant (Const_string (s, _)) -> s :: acc
    +        | _ -> acc
     
    -    method! pattern p acc =
    -      let acc = super#pattern p acc in
    -      match p.ppat_desc with
    -      | Ppat_constant (Const_string (s, _)) -> s :: acc
    -      | _ -> acc
    -  end
    +      method! pattern p acc =
    +        let acc = super#pattern p acc in
    +        match p.ppat_desc with
    +        | Ppat_constant (Const_string (s, _)) -> s :: acc
    +        | _ -> acc
    +    end
     
    -let string_constants_of_structure = string_constants_of#structure
    class map : object ... end
    class iter : object ... end
    class 'acc fold : object ... end
    class 'acc fold_map : object ... end
    class 'ctx map_with_context : object ... end
    val enter_value : + let string_constants_of_structure = string_constants_of#structure
    class map : object ... end
    class iter : object ... end
    class 'acc fold : object ... end
    class 'acc fold_map : object ... end
    class 'ctx map_with_context : object ... end
    val do_not_enter_value_binding : @@ -25,4 +25,4 @@ let string_constants_of_structure = string_constants_of#structure(Astlib.Ast_500.Parsetree.module_binding, unit) Attribute.t
    val do_not_enter_module_declaration : (Astlib.Ast_500.Parsetree.module_declaration, unit) Attribute.t
    val do_not_enter_module_type_declaration : (Astlib.Ast_500.Parsetree.module_type_declaration, unit) Attribute.t
    val do_not_enter_let_module : - (Astlib.Ast_500.Parsetree.expression, unit) Attribute.t
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    class sexp_of : object ... end
    val sexp_of : sexp_of
    \ No newline at end of file + (Astlib.Ast_500.Parsetree.expression, unit) Attribute.t
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    class sexp_of : object ... end
    val sexp_of : sexp_of
    diff --git a/ppxlib/Ppxlib/Attribute/Context/index.html b/ppxlib/Ppxlib/Attribute/Context/index.html index 63798e9..32be8b4 100644 --- a/ppxlib/Ppxlib/Attribute/Context/index.html +++ b/ppxlib/Ppxlib/Attribute/Context/index.html @@ -1,5 +1,5 @@ -Context (ppxlib.Ppxlib.Attribute.Context)

    Module Attribute.Context

    type 'a t =
    1. | Label_declaration : Astlib.Ast_500.Parsetree.label_declaration t
    2. | Constructor_declaration : Astlib.Ast_500.Parsetree.constructor_declaration t
    3. | Type_declaration : Astlib.Ast_500.Parsetree.type_declaration t
    4. | Type_exception : Astlib.Ast_500.Parsetree.type_exception t
    5. | Type_extension : Astlib.Ast_500.Parsetree.type_extension t
    6. | Extension_constructor : Astlib.Ast_500.Parsetree.extension_constructor t
    7. | Pattern : Astlib.Ast_500.Parsetree.pattern t
    8. | Core_type : Astlib.Ast_500.Parsetree.core_type t
    9. | Expression : Astlib.Ast_500.Parsetree.expression t
    10. | Value_description : Astlib.Ast_500.Parsetree.value_description t
    11. | Class_type : Astlib.Ast_500.Parsetree.class_type t
    12. | Class_type_field : Astlib.Ast_500.Parsetree.class_type_field t
    13. | Class_infos : _ Astlib.Ast_500.Parsetree.class_infos t
    14. | Class_expr : Astlib.Ast_500.Parsetree.class_expr t
    15. | Class_field : Astlib.Ast_500.Parsetree.class_field t
    16. | Class_type_decl : Astlib.Ast_500.Parsetree.class_type +Context (ppxlib.Ppxlib.Attribute.Context)

      Module Attribute.Context

      \ No newline at end of file + Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos t
    diff --git a/ppxlib/Ppxlib/Attribute/Floating/Context/index.html b/ppxlib/Ppxlib/Attribute/Floating/Context/index.html index 94b01f4..1ffae36 100644 --- a/ppxlib/Ppxlib/Attribute/Floating/Context/index.html +++ b/ppxlib/Ppxlib/Attribute/Floating/Context/index.html @@ -1,2 +1,2 @@ -Context (ppxlib.Ppxlib.Attribute.Floating.Context)

    Module Floating.Context

    \ No newline at end of file +Context (ppxlib.Ppxlib.Attribute.Floating.Context)

    Module Floating.Context

    diff --git a/ppxlib/Ppxlib/Attribute/Floating/index.html b/ppxlib/Ppxlib/Attribute/Floating/index.html index d285dee..49e8bf9 100644 --- a/ppxlib/Ppxlib/Attribute/Floating/index.html +++ b/ppxlib/Ppxlib/Attribute/Floating/index.html @@ -1,5 +1,5 @@ -Floating (ppxlib.Ppxlib.Attribute.Floating)

    Module Attribute.Floating

    type ('context, 'payload) t
    module Context : sig ... end
    val declare : +Floating (ppxlib.Ppxlib.Attribute.Floating)

    Module Attribute.Floating

    type ('context, 'payload) t
    module Context : sig ... end
    val declare : string -> 'a Context.t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> @@ -7,4 +7,4 @@ ('a, 'c) t
    val name : (_, _) t -> string
    val convert_res : ('a, 'b) t list -> 'a -> - ('b option, Location.Error.t Stdppx.NonEmptyList.t) result
    val convert : ('a, 'b) t list -> 'a -> 'b option
    \ No newline at end of file + ('b option, Location.Error.t Stdppx.NonEmptyList.t) result
    val convert : ('a, 'b) t list -> 'a -> 'b option
    diff --git a/ppxlib/Ppxlib/Attribute/index.html b/ppxlib/Ppxlib/Attribute/index.html index aef13d0..e8905dd 100644 --- a/ppxlib/Ppxlib/Attribute/index.html +++ b/ppxlib/Ppxlib/Attribute/index.html @@ -1,31 +1,31 @@ -Attribute (ppxlib.Ppxlib.Attribute)

    Module Ppxlib.Attribute

    This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

    type ('context, 'payload) t

    Type of declared attribute.

    The 'context type parameter describes where the attribute is expected and the 'payload one what its payload should contain.

    type packed =
    1. | T : (_, _) t -> packed
    module Context : sig ... end
    val declare : +Attribute (ppxlib.Ppxlib.Attribute)

    Module Ppxlib.Attribute

    This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

    type ('context, 'payload) t

    Type of declared attribute.

    The 'context type parameter describes where the attribute is expected and the 'payload one what its payload should contain.

    type packed =
    1. | T : (_, _) t -> packed
    module Context : sig ... end
    val declare : string -> 'a Context.t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> 'b -> - ('a, 'c) t

    declare fully_qualified_name context payload_pattern k declares an attribute. k is used to build the value resulting from parsing the payload.

    For instance if a rewriter named "foo" expect the attribute @@default on record field declaration with an expression as payload:

    let default =
    -  Attribute.declare "foo.default" Attribute.Context.label_declaration
    -    Ast_pattern.(pstr (pstr_eval __ nil))
    -    (fun x -> x)

    fully_qualified_name is expected to be a dot-separated list of names. When matching, any full suffix will be accepted. So for instance an attribute declared with name "foo.bar.default" will match exactly these attribute names: "default", "bar.default" and "foo.bar.default".

    Additionally it is possible to prevent a suffix to be shortened by prefixing it with '@'. So for instance an attribute declared with name "foo.@bar.default" will match exactly these attribute names: "bar.default" and "foo.bar.default".

    When matching against a list of attributes on an item, if several matches are possible, the longest one is used. For instance using the attribute "foo.default" declared in the previous example, on this code it will match the @foo.default 0 attribute:

    type t = { x : int [@default 42] [@foo.default 0] }

    This is to allow the user to specify a @default attribute for all re-writers that use it but still put a specific one for one specific re-writer.

    It is not allowed to declare an attribute with a name that matches a previously-defined one on the same context. For instance trying to declare the same attribute twice will fail.

    val declare_with_name_loc : + ('a, 'c) t

    declare fully_qualified_name context payload_pattern k declares an attribute. k is used to build the value resulting from parsing the payload.

    For instance if a rewriter named "foo" expect the attribute @@default on record field declaration with an expression as payload:

      let default =
    +    Attribute.declare "foo.default" Attribute.Context.label_declaration
    +      Ast_pattern.(pstr (pstr_eval __ nil))
    +      (fun x -> x)

    fully_qualified_name is expected to be a dot-separated list of names. When matching, any full suffix will be accepted. So for instance an attribute declared with name "foo.bar.default" will match exactly these attribute names: "default", "bar.default" and "foo.bar.default".

    Additionally it is possible to prevent a suffix to be shortened by prefixing it with '@'. So for instance an attribute declared with name "foo.@bar.default" will match exactly these attribute names: "bar.default" and "foo.bar.default".

    When matching against a list of attributes on an item, if several matches are possible, the longest one is used. For instance using the attribute "foo.default" declared in the previous example, on this code it will match the @foo.default 0 attribute:

      type t = { x : int [@default 42] [@foo.default 0] }

    This is to allow the user to specify a @default attribute for all re-writers that use it but still put a specific one for one specific re-writer.

    It is not allowed to declare an attribute with a name that matches a previously-defined one on the same context. For instance trying to declare the same attribute twice will fail.

    val declare_with_name_loc : string -> 'a Context.t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> - (name_loc:Location.t -> 'b) -> + (name_loc:Location.t -> 'b) -> ('a, 'c) t

    Same as declare but the callback receives the location of the name of the attribute.

    val declare_with_attr_loc : string -> 'a Context.t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> - (attr_loc:Location.t -> 'b) -> + (attr_loc:Location.t -> 'b) -> ('a, 'c) t

    Same as declare but the callback receives the location of the attribute.

    type 'a flag = ('a, unit) t

    Types for attributes without payload.

    val declare_flag : string -> 'a Context.t -> 'a flag

    Same as declare, but the payload is expected to be empty. It is supposed to be used in conjunction with has_flag.

    val name : (_, _) t -> string
    val context : ('a, _) t -> 'a Context.t
    val get_res : ('a, 'b) t -> - ?mark_as_seen:bool -> + ?mark_as_seen:bool -> 'a -> - ('b option, Location.Error.t Stdppx.NonEmptyList.t) result

    Gets the associated attribute value. Marks the attribute as seen unless mark_as_seen=false. Returns an Error if the attribute is duplicated

    val get : ('a, 'b) t -> ?mark_as_seen:bool -> 'a -> 'b option

    See get_res. Raises a located error if the attribute is duplicated

    val has_flag_res : + ('b option, Location.Error.t Stdppx.NonEmptyList.t) result

    Gets the associated attribute value. Marks the attribute as seen unless mark_as_seen=false. Returns an Error if the attribute is duplicated

    val get : ('a, 'b) t -> ?mark_as_seen:bool -> 'a -> 'b option

    See get_res. Raises a located error if the attribute is duplicated

    val has_flag_res : 'a flag -> - ?mark_as_seen:bool -> + ?mark_as_seen:bool -> 'a -> - (bool, Location.Error.t Stdppx.NonEmptyList.t) result

    Answers whether the given flag is attached as an attribute. See get_res for the meaning of mark_as_seen.

    val has_flag : 'a flag -> ?mark_as_seen:bool -> 'a -> bool

    See has_flag_res. Raises a located error if the attribute is duplicated.

    val consume_res : + (bool, Location.Error.t Stdppx.NonEmptyList.t) result

    Answers whether the given flag is attached as an attribute. See get_res for the meaning of mark_as_seen.

    val has_flag : 'a flag -> ?mark_as_seen:bool -> 'a -> bool

    See has_flag_res. Raises a located error if the attribute is duplicated.

    val consume_res : ('a, 'b) t -> 'a -> (('a * 'b) option, Location.Error.t Stdppx.NonEmptyList.t) result

    consume_res t x returns the value associated to attribute t on x if present as well as x with t removed.

    val consume : ('a, 'b) t -> 'a -> ('a * 'b) option

    See consume_res. Raises a located exception in case of error.

    val remove_seen_res : @@ -44,4 +44,4 @@ ('a, 'b) t -> ('a, 'c, 'd) Ast_pattern.t -> ('a, 'b option -> 'c, ('d, Location.Error.t Stdppx.NonEmptyList.t) result) - Ast_pattern.t
    \ No newline at end of file + Ast_pattern.t
    diff --git a/ppxlib/Ppxlib/Caller_id/index.html b/ppxlib/Ppxlib/Caller_id/index.html index 70b8ff6..5a1e43a 100644 --- a/ppxlib/Ppxlib/Caller_id/index.html +++ b/ppxlib/Ppxlib/Caller_id/index.html @@ -1,2 +1,2 @@ -Caller_id (ppxlib.Ppxlib.Caller_id)

    Module Ppxlib.Caller_id

    Small helper to find out who is the caller of a function

    module Printexc = Stdlib.Printexc
    type t = Printexc.location option
    val get : skip:string list -> Stdlib__Printexc.location option
    \ No newline at end of file +Caller_id (ppxlib.Ppxlib.Caller_id)

    Module Ppxlib.Caller_id

    Small helper to find out who is the caller of a function

    module Printexc = Stdlib.Printexc
    type t = Printexc.location option
    val get : skip:string list -> Stdlib__Printexc.location option
    diff --git a/ppxlib/Ppxlib/Code_path/index.html b/ppxlib/Ppxlib/Code_path/index.html index 9784cc1..90d1c0a 100644 --- a/ppxlib/Ppxlib/Code_path/index.html +++ b/ppxlib/Ppxlib/Code_path/index.html @@ -1,2 +1,2 @@ -Code_path (ppxlib.Ppxlib.Code_path)

    Module Ppxlib.Code_path

    This module contains type and functions for representing and manipulating path to AST nodes.

    type t

    Type for path to AST nodes

    val file_path : t -> string

    Return the path to the .ml or .mli file for this code path.

    val main_module_name : t -> string

    Return the module name corresponding to the file to which this code path leads to.

    val submodule_path : t -> string list

    Return the path within the main module this code path represents as a list of module names.

    val enclosing_module : t -> string

    Return the nearest enclosing module name. Does descend into expressions.

    val value : t -> string option

    Return the name of the value to which this code path leads or None if it leads to the toplevel of a module or submodule.

    val enclosing_value : t -> string option

    Like value, returns the name of an enclosing value definition. Unlike value, includes names inside expressions, not just names that the code path can reach from the toplevel module.

    val fully_qualified_path : t -> string

    Return the fully qualified path to the module or value this code path leads to, eg "Some_main_module.Some_submodule.some_value". Note that the fully qualified path doesn't descend into expressions which means it will always stop at the first value description or value binding.

    val to_string_path : t -> string

    Return the string version of this code path as built by Ast_traverse.map_with_path. Used for compatibility with path from version 0.5.0 and lower.

    \ No newline at end of file +Code_path (ppxlib.Ppxlib.Code_path)

    Module Ppxlib.Code_path

    This module contains type and functions for representing and manipulating path to AST nodes.

    type t

    Type for path to AST nodes

    val file_path : t -> string

    Return the path to the .ml or .mli file for this code path.

    val main_module_name : t -> string

    Return the module name corresponding to the file to which this code path leads to.

    val submodule_path : t -> string list

    Return the path within the main module this code path represents as a list of module names.

    val enclosing_module : t -> string

    Return the nearest enclosing module name. Does descend into expressions.

    val value : t -> string option

    Return the name of the value to which this code path leads or None if it leads to the toplevel of a module or submodule.

    val enclosing_value : t -> string option

    Like value, returns the name of an enclosing value definition. Unlike value, includes names inside expressions, not just names that the code path can reach from the toplevel module.

    val fully_qualified_path : t -> string

    Return the fully qualified path to the module or value this code path leads to, eg "Some_main_module.Some_submodule.some_value". Note that the fully qualified path doesn't descend into expressions which means it will always stop at the first value description or value binding.

    val to_string_path : t -> string

    Return the string version of this code path as built by Ast_traverse.map_with_path. Used for compatibility with path from version 0.5.0 and lower.

    diff --git a/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html b/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html index 29a0880..6d723c3 100644 --- a/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html +++ b/ppxlib/Ppxlib/Context_free/Rule/Constant_kind/index.html @@ -1,2 +1,2 @@ -Constant_kind (ppxlib.Ppxlib.Context_free.Rule.Constant_kind)

    Module Rule.Constant_kind

    Used for the constant function.

    type t =
    1. | Float
    2. | Integer
    \ No newline at end of file +Constant_kind (ppxlib.Ppxlib.Context_free.Rule.Constant_kind)

    Module Rule.Constant_kind

    Used for the constant function.

    type t =
    1. | Float
    2. | Integer
    diff --git a/ppxlib/Ppxlib/Context_free/Rule/index.html b/ppxlib/Ppxlib/Context_free/Rule/index.html index 09ead63..87dd7e2 100644 --- a/ppxlib/Ppxlib/Context_free/Rule/index.html +++ b/ppxlib/Ppxlib/Context_free/Rule/index.html @@ -1,5 +1,5 @@ -Rule (ppxlib.Ppxlib.Context_free.Rule)

    Module Context_free.Rule

    Local rewriting rules.

    This module lets you define local rewriting rules, such as extension point expanders. It is not completely generic and you cannot define any kind of rewriting, it currently focuses on what is commonly used. New scheme can be added on demand.

    We have some ideas to make this fully generic, but this hasn't been a priority so far.

    type t
    val extension : Extension.t -> t

    Rewrite an extension point

    val special_function : +Rule (ppxlib.Ppxlib.Context_free.Rule)

    Module Context_free.Rule

    Local rewriting rules.

    This module lets you define local rewriting rules, such as extension point expanders. It is not completely generic and you cannot define any kind of rewriting, it currently focuses on what is commonly used. New scheme can be added on demand.

    We have some ideas to make this fully generic, but this hasn't been a priority so far.

    type t
    val extension : Extension.t -> t

    Rewrite an extension point

    val special_function : string -> (Astlib.Ast_500.Parsetree.expression -> Astlib.Ast_500.Parsetree.expression option) -> @@ -13,7 +13,7 @@ (Location.t -> string -> Ppxlib_ast.Parsetree.expression) -> t

    constant kind suffix expander Registers an extension for transforming constants literals, based on the suffix character.

    The rest of this API is for rewriting rules that apply when a certain attribute is present. The API is not complete and is currently only enough to implement deriving.

    type ('a, 'b, 'c) attr_group_inline = ('b, 'c) Attribute.t -> - (ctxt:Expansion_context.Deriver.t -> + (ctxt:Expansion_context.Deriver.t -> Ppxlib_ast.Asttypes.rec_flag -> 'b list -> 'c option list -> @@ -36,7 +36,7 @@ _) attr_group_inline
    type ('a, 'b, 'c) attr_inline = ('b, 'c) Attribute.t -> - (ctxt:Expansion_context.Deriver.t -> 'b -> 'c -> 'a list) -> + (ctxt:Expansion_context.Deriver.t -> 'b -> 'c -> 'a list) -> t

    Same as attr_group_inline but for elements that are not part of a group, such as exceptions and type extensions

    \ No newline at end of file + attr_group_inline
    diff --git a/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html b/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html index 4d4fafa..55609e3 100644 --- a/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html +++ b/ppxlib/Ppxlib/Context_free/class-map_top_down/index.html @@ -1,2 +1,2 @@ -map_top_down (ppxlib.Ppxlib.Context_free.map_top_down)

    Class Context_free.map_top_down

    inherit Ppxlib__.Ast_traverse.map_with_expansion_context_and_errors
    \ No newline at end of file +map_top_down (ppxlib.Ppxlib.Context_free.map_top_down)

    Class Context_free.map_top_down

    inherit Ppxlib__.Ast_traverse.map_with_expansion_context_and_errors
    diff --git a/ppxlib/Ppxlib/Context_free/index.html b/ppxlib/Ppxlib/Context_free/index.html index 53c737d..c0535c3 100644 --- a/ppxlib/Ppxlib/Context_free/index.html +++ b/ppxlib/Ppxlib/Context_free/index.html @@ -1,3 +1,3 @@ -Context_free (ppxlib.Ppxlib.Context_free)

    Module Ppxlib.Context_free

    Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

    module Rule : sig ... end

    Local rewriting rules.

    class map_top_down : ?expect_mismatch_handler:{Expect_mismatch_handler}2.t -> ?generated_code_hook: - {Generated_code_hook}1.t -> ?embed_errors:bool -> Rule.t list -> object ... end
    \ No newline at end of file +Context_free (ppxlib.Ppxlib.Context_free)

    Module Ppxlib.Context_free

    Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

    module Rule : sig ... end

    Local rewriting rules.

    class map_top_down : ?expect_mismatch_handler:Expect_mismatch_handler.t -> ?generated_code_hook: + Generated_code_hook.t -> ?embed_errors:bool -> Rule.t list -> object ... end
    diff --git a/ppxlib/Ppxlib/Deriving/Args/index.html b/ppxlib/Ppxlib/Deriving/Args/index.html index d165cd2..39141dd 100644 --- a/ppxlib/Ppxlib/Deriving/Args/index.html +++ b/ppxlib/Ppxlib/Deriving/Args/index.html @@ -1,26 +1,26 @@ -Args (ppxlib.Ppxlib.Deriving.Args)

    Module Deriving.Args

    Specification of generator arguments

    type ('a, 'b) t
    type 'a param
    val empty : ('m, 'm) t
    val arg : +Args (ppxlib.Ppxlib.Deriving.Args)

    Module Deriving.Args

    Specification of generator arguments

    type ('a, 'b) t
    type 'a param
    val empty : ('m, 'm) t
    val arg : string -> (Astlib.Ast_500.Parsetree.expression, 'a -> 'a option, 'a option) Ast_pattern.t -> - 'a option param
    val flag : string -> bool param

    Flag matches punned labelled argument, i.e. of the form ~foo. It returns true iff the argument is present.

    val (+>) : ('m1, 'a -> 'm2) t -> 'a param -> ('m1, 'm2) t

    For convenience, so that one can write the following without having to open both Ast_pattern and Deriving.Args:

    Deriving.Args.(
    -  empty
    -  +> arg_option "foo" (estring __)
    -  +> arg_option "bar" (pack2 (eint __ ** eint __))
    -  +> flag "dotdotdot")
    include module type of struct include Ast_pattern end - with type ('a, 'b, 'c) t := ('a, 'b, 'c) Ast_pattern.t

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    val parse : + 'a option param
    val flag : string -> bool param

    Flag matches punned labelled argument, i.e. of the form ~foo. It returns true iff the argument is present.

    val (+>) : ('m1, 'a -> 'm2) t -> 'a param -> ('m1, 'm2) t

    For convenience, so that one can write the following without having to open both Ast_pattern and Deriving.Args:

      Deriving.Args.(
    +    empty
    +    +> arg_option "foo" (estring __)
    +    +> arg_option "bar" (pack2 (eint __ ** eint __))
    +    +> flag "dotdotdot")
    include module type of struct include Ast_pattern end + with type ('a, 'b, 'c) t := ('a, 'b, 'c) Ast_pattern.t

    For a detailed explanation on this module, refer to the relevant part of the manual.

    API

    val parse : ('a, 'b, 'c) Ast_pattern.t -> Location.t -> - ?on_error:(unit -> 'c) -> + ?on_error:(unit -> 'c) -> 'a -> 'b -> 'c

    Matches a value against a pattern. Raise a located error in case of failure.

    val parse_res : ('a, 'b, 'c) Ast_pattern.t -> Location.t -> - ?on_error:(unit -> 'c) -> + ?on_error:(unit -> 'c) -> 'a -> 'b -> - ('c, Location.Error.t Stdppx.NonEmptyList.t) result

    Matches a value against a pattern and return a result.

    module Packed = Ast_pattern.Packed
    val __ : ('a, 'a -> 'b, 'b) Ast_pattern.t

    Pattern that captures its input.

    val __' : ('a, 'a Loc.t -> 'b, 'b) Ast_pattern.t

    Same as __ but also captures the location.

    Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

    estring __'

    but using it to capture an expression would not yield the expected result:

    pair (eint (int 42)) __'

    In the latter case you should use the pexp_loc field of the captured expression instead.

    val drop : ('a, 'b, 'b) Ast_pattern.t

    Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

    val as__ : ('a, 'b, 'c) Ast_pattern.t -> ('a, 'a -> 'b, 'c) Ast_pattern.t

    As-pattern. Passes the current node to the continuation.

    Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

    Matches a value against a pattern and return a result.

    module Packed = Ast_pattern.Packed
    val __ : ('a, 'a -> 'b, 'b) Ast_pattern.t

    Pattern that captures its input.

    val __' : ('a, 'a Loc.t -> 'b, 'b) Ast_pattern.t

    Same as __ but also captures the location.

    Note: this should only be used for types that do not embed a location. For instance you can use it to capture a string constant:

      estring __'

    but using it to capture an expression would not yield the expected result:

      pair (eint (int 42)) __'

    In the latter case you should use the pexp_loc field of the captured expression instead.

    val drop : ('a, 'b, 'b) Ast_pattern.t

    Useful when some part of the AST is irrelevant. With __, the captured value is passed to the continuation, with drop it is ignored. In higher-level pattern matching, it is called wildcard pattern.

    val as__ : ('a, 'b, 'c) Ast_pattern.t -> ('a, 'a -> 'b, 'c) Ast_pattern.t

    As-pattern. Passes the current node to the continuation.

    Pitfall. In general, the continuation is called step by step by being applied partially to every next captured node in the pattern. That means that the node captured by as__ is passed to the continuation before checking if the pattern is matched.

    val alt : ('a, 'b, 'c) Ast_pattern.t -> ('a, 'b, 'c) Ast_pattern.t -> ('a, 'b, 'c) Ast_pattern.t

    alt stands for `alternatives'. It matches either the first pattern or the second one.

    val alt_option : @@ -31,40 +31,40 @@ ('a, 'b, 'c) Ast_pattern.t -> ('a, 'b, 'c) Ast_pattern.t

    Same as alt

    val map : ('a, 'b, 'c) Ast_pattern.t -> - f:('d -> 'b) -> + f:('d -> 'b) -> ('a, 'd, 'c) Ast_pattern.t
    val map' : ('a, 'b, 'c) Ast_pattern.t -> - f:(Location.t -> 'd -> 'b) -> + f:(Location.t -> 'd -> 'b) -> ('a, 'd, 'c) Ast_pattern.t
    val map_result : ('a, 'b, 'c) Ast_pattern.t -> - f:('c -> 'd) -> + f:('c -> 'd) -> ('a, 'b, 'd) Ast_pattern.t
    val (>>|) : ('a, 'b, 'c) Ast_pattern.t -> ('d -> 'b) -> ('a, 'd, 'c) Ast_pattern.t

    Same as map

    val map0 : ('a, 'b, 'c) Ast_pattern.t -> - f:'v -> + f:'v -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map1 : ('a, 'v1 -> 'b, 'c) Ast_pattern.t -> - f:('v1 -> 'v) -> + f:('v1 -> 'v) -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map2 : ('a, 'v1 -> 'v2 -> 'b, 'c) Ast_pattern.t -> - f:('v1 -> 'v2 -> 'v) -> + f:('v1 -> 'v2 -> 'v) -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map0' : ('a, 'b, 'c) Ast_pattern.t -> - f:(Location.t -> 'v) -> + f:(Location.t -> 'v) -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map1' : ('a, 'v1 -> 'b, 'c) Ast_pattern.t -> - f:(Location.t -> 'v1 -> 'v) -> + f:(Location.t -> 'v1 -> 'v) -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map2' : ('a, 'v1 -> 'v2 -> 'b, 'c) Ast_pattern.t -> - f:(Location.t -> 'v1 -> 'v2 -> 'v) -> + f:(Location.t -> 'v1 -> 'v2 -> 'v) -> ('a, 'v -> 'b, 'c) Ast_pattern.t
    val map_value : ('a, 'b, 'c) Ast_pattern.t -> - f:('d -> 'a) -> + f:('d -> 'a) -> ('d, 'b, 'c) Ast_pattern.t
    val map_value' : ('a, 'b, 'c) Ast_pattern.t -> - f:(Astlib.Location.t -> 'd -> 'a) -> + f:(Astlib.Location.t -> 'd -> 'a) -> ('d, 'b, 'c) Ast_pattern.t
    val nil : (_ list, 'a, 'a) Ast_pattern.t
    val (^::) : ('a, 'b, 'c) Ast_pattern.t -> ('a list, 'c, 'd) Ast_pattern.t -> @@ -75,8 +75,8 @@ (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
    val pbool : (bool, 'a, 'b) Ast_pattern.t -> (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ast_pattern.t
    val cst : - to_string:('a -> string) -> - ?equal:('a -> 'a -> bool) -> + to_string:('a -> string) -> + ?equal:('a -> 'a -> bool) -> 'a -> ('a, 'b, 'b) Ast_pattern.t
    val none : (_ option, 'a, 'a) Ast_pattern.t
    val some : ('a, 'b, 'c) Ast_pattern.t -> ('a option, 'b, 'c) Ast_pattern.t
    val pair : ('a1, 'b, 'c) Ast_pattern.t -> @@ -92,165 +92,165 @@ ('a, 'b -> 'c -> 'd, 'e) Ast_pattern.t -> ('a, ('b * 'c) -> 'd, 'e) Ast_pattern.t
    val pack3 : ('a, 'b -> 'c -> 'd -> 'e, 'f) Ast_pattern.t -> - ('a, ('b * 'c * 'd) -> 'e, 'f) Ast_pattern.t

    AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

    val pexp_loc :
    -  (Location.t, 'a, 'b) t ->
    -  (expression, 'b, 'c) t ->
    -  (expression, 'a, 'c) t
    +  ('a, ('b * 'c * 'd) -> 'e, 'f) Ast_pattern.t

    AST patterns for each constructor/record of the parsetree are generated in the same way AST builders are generated. In addition, for every wrapper we generate a pattern to match the loc and attributes fields. For instance for the expression type:

      val pexp_loc :
    +    (Location.t, 'a, 'b) t ->
    +    (expression, 'b, 'c) t ->
    +    (expression, 'a, 'c) t
     
    -val pexp_attributes :
    -  (attributes, 'a, 'b) t ->
    -  (expression, 'b, 'c) t ->
    -  (expression, 'a, 'c) t
    val nolabel : - (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val labelled : + val pexp_attributes : + (attributes, 'a, 'b) t -> + (expression, 'b, 'c) t -> + (expression, 'a, 'c) t
    val nolabel : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val labelled : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val optional : + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val optional : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.arg_label, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val binding_op : - op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - pat:(Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - exp:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.binding_op, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val case : - lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - guard: - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) + (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val binding_op : + op:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + pat:(Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + exp:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.binding_op, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val case : + lhs:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + guard: + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - rhs:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcl_loc : + rhs:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.case, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_attributes : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_constr : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_structure : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_structure : (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_fun : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcl_fun : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val pcl_apply : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val pcl_apply : (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_let : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_let : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcl_constraint : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_constraint : (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcl_extension : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcl_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcl_open : + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcl_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_loc : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_attributes : + (Astlib.Ast_500.Parsetree.class_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcf_inherit : + (Astlib.Ast_500.Parsetree.class_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcf_inherit : (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string Astlib.Location.loc option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcf_val : + (Astlib.Ast_500.Parsetree.class_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string Astlib.Location.loc option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_val : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.mutable_flag * Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_method : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_method : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.private_flag * Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_constraint : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_constraint : (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_initializer : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_initializer : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_attribute : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcf_extension : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcf_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val cfk_virtual : + (Astlib.Ast_500.Parsetree.class_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val cfk_virtual : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val cfk_concrete : + (Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val cfk_concrete : (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_field_kind, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val class_infos_attributes : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_field_kind, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val class_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.class_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.class_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val class_infos : - virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: + ('c Astlib.Ast_500.Parsetree.class_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.class_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val class_infos : + virt:(Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: ((Astlib.Ast_500.Parsetree.core_type * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - name:(string, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - expr:('g, 'h, 'i) Ppxlib__.Ast_pattern0.t -> - ('j Astlib.Ast_500.Parsetree.class_infos, 'k, 'l) Ppxlib__.Ast_pattern0.t
    val class_signature : - self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - fields: - (Astlib.Ast_500.Parsetree.class_type_field list, 'c, 'd) + name:(string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + expr:('e, 'd, 'f) Ppxlib__.Ast_pattern0.t -> + ('e Astlib.Ast_500.Parsetree.class_infos, 'a, 'f) Ppxlib__.Ast_pattern0.t
    val class_signature : + self:(Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_type_field list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_signature, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val class_structure : - self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - fields: - (Astlib.Ast_500.Parsetree.class_field list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_structure, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_loc : + (Astlib.Ast_500.Parsetree.class_signature, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val class_structure : + self:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + fields: + (Astlib.Ast_500.Parsetree.class_field list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_structure, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_attributes : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_constr : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcty_signature : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcty_signature : (Astlib.Ast_500.Parsetree.class_signature, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_arrow : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcty_arrow : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pcty_extension : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pcty_open : + (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcty_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_loc : + (Astlib.Ast_500.Parsetree.class_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_attributes : + (Astlib.Ast_500.Parsetree.class_type_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pctf_inherit : + (Astlib.Ast_500.Parsetree.class_type_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pctf_inherit : (Astlib.Ast_500.Parsetree.class_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_val : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_val : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.mutable_flag * Astlib.Ast_500.Asttypes.virtual_flag @@ -258,7 +258,7 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_method : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_method : (string Astlib.Location.loc * Astlib.Ast_500.Asttypes.private_flag * Astlib.Ast_500.Asttypes.virtual_flag @@ -266,86 +266,86 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_constraint : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_constraint : (Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_attribute : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pctf_extension : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pctf_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.class_type_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val closed : - (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val open_ : - (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pconst_integer : + (Astlib.Ast_500.Parsetree.class_type_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val closed : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val open_ : + (Astlib.Ast_500.Asttypes.closed_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pconst_integer : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pconst_char : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pconst_char : (char, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pconst_string : + (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pconst_string : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Location.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pconst_float : + (Astlib.Location.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pconst_float : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pcstr_tuple : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constant, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pcstr_tuple : (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pcstr_record : (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val constructor_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.constructor_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val constructor_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - vars:(string Astlib.Location.loc list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - args: - (Astlib.Ast_500.Parsetree.constructor_arguments, 'e, 'f) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + vars:(string Astlib.Location.loc list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + args: + (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - res: - (Astlib.Ast_500.Parsetree.core_type option, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_declaration, 'i, 'j) + res: + (Astlib.Ast_500.Parsetree.core_type option, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.constructor_declaration, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val ptyp_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_attributes : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_any : - (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_var : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_any : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ptyp_var : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_arrow : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_arrow : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val ptyp_tuple : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_tuple : (Astlib.Ast_500.Parsetree.core_type list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_constr : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_constr : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_object : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_object : (Astlib.Ast_500.Parsetree.object_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_class : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_class : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_alias : + (Astlib.Ast_500.Parsetree.core_type list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_alias : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_variant : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_variant : (Astlib.Ast_500.Parsetree.row_field list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (string list option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val ptyp_poly : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (string list option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_poly : (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptyp_package : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptyp_package : (Astlib.Longident.t Astlib.Location.loc * (Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.core_type) @@ -353,618 +353,618 @@ val pexp_attributes : 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp_extension : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val upto : - (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val downto_ : - (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdira_loc : + (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val upto : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val downto_ : + (Astlib.Ast_500.Asttypes.direction_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pdira_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pdir_string : + (Astlib.Ast_500.Parsetree.directive_argument, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pdir_string : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pdir_int : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdir_int : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (char option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pdir_ident : + (char option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pdir_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pdir_bool : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pdir_bool : (bool, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.directive_argument, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_loc : + (Astlib.Ast_500.Parsetree.directive_argument, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_attributes : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_ident : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_constant : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_constant : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_let : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_let : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_function : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_function : (Astlib.Ast_500.Parsetree.case list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_fun : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_fun : (Astlib.Ast_500.Asttypes.arg_label, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val pexp_apply : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val pexp_apply : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((Astlib.Ast_500.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_match : + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_match : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_try : + (Astlib.Ast_500.Parsetree.case list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_try : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.case list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_tuple : + (Astlib.Ast_500.Parsetree.case list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_tuple : (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_construct : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_construct : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_variant : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_variant : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_record : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_record : ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_field : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_field : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_setfield : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_setfield : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_array : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_array : (Astlib.Ast_500.Parsetree.expression list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_ifthenelse : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_ifthenelse : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_sequence : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_sequence : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_while : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_while : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_for : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_for : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Asttypes.direction_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.direction_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'i, 'j) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'k, 'l) Ppxlib__.Ast_pattern0.t
    val pexp_constraint : + (Astlib.Ast_500.Parsetree.expression, 'a, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_constraint : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_coerce : + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_send : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_send : - (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_new : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_new : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_setinstvar : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_setinstvar : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_override : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_override : ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.expression) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_letmodule : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_letmodule : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val pexp_letexception : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_letexception : (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_assert : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_assert : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_lazy : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_lazy : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_poly : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_poly : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_object : + (Astlib.Ast_500.Parsetree.core_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_object : (Astlib.Ast_500.Parsetree.class_structure, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_newtype : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_newtype : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_pack : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_pack : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_open : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_open : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pexp_letop : + (Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.expression, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pexp_letop : (Astlib.Ast_500.Parsetree.letop, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_extension : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pexp_unreachable : - (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val extension_constructor_attributes : + (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pexp_unreachable : + (Astlib.Ast_500.Parsetree.expression, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val extension_constructor_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'c, 'd) + (Astlib.Ast_500.Parsetree.extension_constructor, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val extension_constructor : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - kind: - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + kind: + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor, 'e, 'f) + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pext_decl : (string Astlib.Location.loc list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constructor_arguments, 'c, 'd) + (Astlib.Ast_500.Parsetree.constructor_arguments, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type option, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'g, 'h) + (Astlib.Ast_500.Parsetree.core_type option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val pext_rebind : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'c, 'd) + (Astlib.Ast_500.Parsetree.extension_constructor_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val unit : - (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val named : + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val named : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.functor_parameter, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val include_infos_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val include_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.include_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.include_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val include_infos : - mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - ('d Astlib.Ast_500.Parsetree.include_infos, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val injective : - (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val noinjectivity : - (Astlib.Ast_500.Asttypes.injectivity, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val label_declaration_attributes : + ('c Astlib.Ast_500.Parsetree.include_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.include_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val include_infos : + mod_:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ('a Astlib.Ast_500.Parsetree.include_infos, 'b, 'c) Ppxlib__.Ast_pattern0.t
    val injective : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val noinjectivity : + (Astlib.Ast_500.Asttypes.injectivity, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val label_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val label_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - mutable_: - (Astlib.Ast_500.Asttypes.mutable_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.core_type, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.label_declaration, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val letop : - let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ands: - (Astlib.Ast_500.Parsetree.binding_op list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - body:(Astlib.Ast_500.Parsetree.expression, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.letop, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val location : - start:(Stdlib.Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - end_:(Stdlib.Lexing.position, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - ghost:(bool, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Location.t, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val lident : + (Astlib.Ast_500.Parsetree.label_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val label_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + mutable_: + (Astlib.Ast_500.Asttypes.mutable_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.label_declaration, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val letop : + let_:(Astlib.Ast_500.Parsetree.binding_op, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + ands: + (Astlib.Ast_500.Parsetree.binding_op list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + body:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.letop, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val location : + start:(Stdlib.Lexing.position, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + end_:(Stdlib.Lexing.position, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + ghost:(bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Location.t, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val lident : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ldot : + (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ldot : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val lapply : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val lapply : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_binding_attributes : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Longident.t, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_binding_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_binding : - name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - expr:(Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_declaration_attributes : + (Astlib.Ast_500.Parsetree.module_binding, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_binding : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val module_declaration : - name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_loc : + (Astlib.Ast_500.Parsetree.module_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_declaration : + name:(string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_attributes : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_ident : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_structure : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_structure : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_functor : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_functor : (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_apply : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_apply : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_constraint : + (Astlib.Ast_500.Parsetree.module_expr, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_constraint : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmod_unpack : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmod_unpack : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmod_extension : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmod_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_expr, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val module_substitution_attributes : + (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val module_substitution_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'c, 'd) + (Astlib.Ast_500.Parsetree.module_substitution, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_substitution : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - manifest:(Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_substitution, 'e, 'f) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + manifest:(Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_ident : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_ident : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_signature : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_signature : (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_functor : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_functor : (Astlib.Ast_500.Parsetree.functor_parameter, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_with : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_with : (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint list, 'c, 'd) + (Astlib.Ast_500.Parsetree.with_constraint list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pmty_typeof : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pmty_typeof : (Astlib.Ast_500.Parsetree.module_expr, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_extension : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pmty_alias : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pmty_alias : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val module_type_declaration_attributes : + (Astlib.Ast_500.Parsetree.module_type, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val module_type_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'c, 'd) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val module_type_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_: - (Astlib.Ast_500.Parsetree.module_type option, 'c, 'd) + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_: + (Astlib.Ast_500.Parsetree.module_type option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type_declaration, 'e, 'f) + (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val immutable : - (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val mutable_ : - (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pof_loc : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val mutable_ : + (Astlib.Ast_500.Asttypes.mutable_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pof_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pof_attributes : + (Astlib.Ast_500.Parsetree.object_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pof_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val otag : + (Astlib.Ast_500.Parsetree.object_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val otag : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val oinherit : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.object_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val oinherit : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.object_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val open_infos_attributes : + (Astlib.Ast_500.Parsetree.object_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val open_infos_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - ('c Astlib.Ast_500.Parsetree.open_infos, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val open_infos : - expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - override: - (Astlib.Ast_500.Asttypes.override_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> - ('f Astlib.Ast_500.Parsetree.open_infos, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val override : - (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val fresh : - (Astlib.Ast_500.Asttypes.override_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_loc : + ('c Astlib.Ast_500.Parsetree.open_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t -> + ('c Astlib.Ast_500.Parsetree.open_infos, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val open_infos : + expr:('a, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + override: + (Astlib.Ast_500.Asttypes.override_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + ('a Astlib.Ast_500.Parsetree.open_infos, 'b, 'd) Ppxlib__.Ast_pattern0.t
    val override : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val fresh : + (Astlib.Ast_500.Asttypes.override_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ppat_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_attributes : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_any : - (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_var : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_any : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ppat_var : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_alias : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_alias : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (string, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_constant : + (string, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_constant : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_interval : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_interval : (Astlib.Ast_500.Parsetree.constant, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.constant, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_tuple : + (Astlib.Ast_500.Parsetree.constant, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_tuple : (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_construct : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_construct : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> ((string Astlib.Location.loc list * Astlib.Ast_500.Parsetree.pattern) option, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_variant : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_variant : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_record : + (Astlib.Ast_500.Parsetree.pattern option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_record : ((Astlib.Longident.t Astlib.Location.loc * Astlib.Ast_500.Parsetree.pattern) list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Asttypes.closed_flag, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_array : + (Astlib.Ast_500.Asttypes.closed_flag, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_array : (Astlib.Ast_500.Parsetree.pattern list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_or : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_or : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_constraint : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_constraint : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ppat_type : + (Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ppat_type : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_lazy : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_lazy : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_unpack : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_unpack : (string option, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_exception : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_exception : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_extension : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat_open : + (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat_open : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.pattern, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr : + (Astlib.Ast_500.Parsetree.pattern, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.pattern, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig : (Astlib.Ast_500.Parsetree.signature_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptyp : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptyp : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ppat : + (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ppat : (Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.expression option, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.payload, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val position : - fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - lnum:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - bol:(int, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - cnum:(int, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Stdlib.Lexing.position, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val private_ : - (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val public : - (Astlib.Ast_500.Asttypes.private_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val nonrecursive : - (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val recursive : - (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val prf_loc : + (Astlib.Ast_500.Parsetree.expression option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.payload, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val position : + fname:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + lnum:(int, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + bol:(int, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + cnum:(int, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Stdlib.Lexing.position, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val private_ : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val public : + (Astlib.Ast_500.Asttypes.private_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val nonrecursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val recursive : + (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val prf_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val prf_attributes : + (Astlib.Ast_500.Parsetree.row_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val prf_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val rtag : + (Astlib.Ast_500.Parsetree.row_field, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val rtag : (string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (bool, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.core_type list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val rinherit : + (bool, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.core_type list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.row_field, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val rinherit : (Astlib.Ast_500.Parsetree.core_type, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.row_field, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_loc : + (Astlib.Ast_500.Parsetree.row_field, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val psig_value : + (Astlib.Ast_500.Parsetree.signature_item, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val psig_value : (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_type : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_type : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + (Astlib.Ast_500.Parsetree.type_declaration list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val psig_typesubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val psig_typesubst : (Astlib.Ast_500.Parsetree.type_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_typext : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_typext : (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_exception : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_exception : (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_module : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_module : (Astlib.Ast_500.Parsetree.module_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modsubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modsubst : (Astlib.Ast_500.Parsetree.module_substitution, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_recmodule : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_recmodule : (Astlib.Ast_500.Parsetree.module_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modtype : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modtype : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_modtypesubst : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_modtypesubst : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_open : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_open : (Astlib.Longident.t Astlib.Location.loc Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_include : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_include : (Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_class : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_class : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_class_type : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_class_type : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_attribute : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val psig_extension : + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val psig_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.signature_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_loc : + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.signature_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_loc : (Astlib.Location.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_eval : + (Astlib.Ast_500.Parsetree.structure_item, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_eval : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_value : + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_value : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_primitive : + (Astlib.Ast_500.Parsetree.value_binding list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_primitive : (Astlib.Ast_500.Parsetree.value_description, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_type : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_type : (Astlib.Ast_500.Asttypes.rec_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration list, 'c, 'd) + (Astlib.Ast_500.Parsetree.type_declaration list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pstr_typext : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pstr_typext : (Astlib.Ast_500.Parsetree.type_extension, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_exception : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_exception : (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_module : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_module : (Astlib.Ast_500.Parsetree.module_binding, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_recmodule : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_recmodule : (Astlib.Ast_500.Parsetree.module_binding list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_modtype : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_modtype : (Astlib.Ast_500.Parsetree.module_type_declaration, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_open : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_open : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.open_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_class : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_class : (Astlib.Ast_500.Parsetree.class_expr Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_class_type : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_class_type : (Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_include : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_include : (Astlib.Ast_500.Parsetree.module_expr Astlib.Ast_500.Parsetree.include_infos, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_attribute : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_attribute : (Astlib.Ast_500.Parsetree.attribute, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val pstr_extension : + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pstr_extension : (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.attribute list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.structure_item, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val toplevel_directive : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - arg: - (Astlib.Ast_500.Parsetree.directive_argument option, 'c, 'd) + (Astlib.Ast_500.Parsetree.attribute list, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.structure_item, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val toplevel_directive : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + arg: + (Astlib.Ast_500.Parsetree.directive_argument option, 'b, 'c) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_directive, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val ptop_def : + (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val ptop_def : (Astlib.Ast_500.Parsetree.structure_item list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptop_dir : + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptop_dir : (Astlib.Ast_500.Parsetree.toplevel_directive, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.toplevel_phrase, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val type_declaration_attributes : + (Astlib.Ast_500.Parsetree.toplevel_phrase, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val type_declaration_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_declaration : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_declaration : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: ((Astlib.Ast_500.Parsetree.core_type * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) list, - 'c, - 'd) + 'b, + 'c) Ppxlib__.Ast_pattern0.t -> - cstrs: + cstrs: ((Astlib.Ast_500.Parsetree.core_type * Astlib.Ast_500.Parsetree.core_type * Astlib.Location.t) list, - 'e, - 'f) - Ppxlib__.Ast_pattern0.t -> - kind:(Astlib.Ast_500.Parsetree.type_kind, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - private_: - (Astlib.Ast_500.Asttypes.private_flag, 'i, 'j) Ppxlib__.Ast_pattern0.t -> - manifest: - (Astlib.Ast_500.Parsetree.core_type option, 'k, 'l) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'm, 'n) Ppxlib__.Ast_pattern0.t
    val type_exception_attributes : - (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_exception : - constructor: - (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) - Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_exception, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val type_extension_attributes : - (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val type_extension : - path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - params: - ((Astlib.Ast_500.Parsetree.core_type - * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) - list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - constructors: - (Astlib.Ast_500.Parsetree.extension_constructor list, 'e, 'f) + kind:(Astlib.Ast_500.Parsetree.type_kind, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'e, 'f) Ppxlib__.Ast_pattern0.t -> + manifest: + (Astlib.Ast_500.Parsetree.core_type option, 'f, 'g) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_declaration, 'a, 'g) Ppxlib__.Ast_pattern0.t
    val type_exception_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_exception : + constructor: + (Astlib.Ast_500.Parsetree.extension_constructor, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - private_: - (Astlib.Ast_500.Asttypes.private_flag, 'g, 'h) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_extension, 'i, 'j) Ppxlib__.Ast_pattern0.t
    val ptype_abstract : - (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_variant : + (Astlib.Ast_500.Parsetree.type_exception, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val type_extension_attributes : + (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val type_extension : + path:(Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + params: + ((Astlib.Ast_500.Parsetree.core_type + * (Astlib.Ast_500.Asttypes.variance * Astlib.Ast_500.Asttypes.injectivity)) + list, + 'b, + 'c) + Ppxlib__.Ast_pattern0.t -> + constructors: + (Astlib.Ast_500.Parsetree.extension_constructor list, 'c, 'd) + Ppxlib__.Ast_pattern0.t -> + private_: + (Astlib.Ast_500.Asttypes.private_flag, 'd, 'e) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.type_extension, 'a, 'e) Ppxlib__.Ast_pattern0.t
    val ptype_abstract : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val ptype_variant : (Astlib.Ast_500.Parsetree.constructor_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptype_record : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_record : (Astlib.Ast_500.Parsetree.label_declaration list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_kind, 'c, 'd) Ppxlib__.Ast_pattern0.t
    val ptype_open : - (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val value_binding_attributes : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val ptype_open : + (Astlib.Ast_500.Parsetree.type_kind, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val value_binding_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_binding : - pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - expr:(Astlib.Ast_500.Parsetree.expression, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_binding, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_description_attributes : + (Astlib.Ast_500.Parsetree.value_binding, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_binding : + pat:(Astlib.Ast_500.Parsetree.pattern, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + expr:(Astlib.Ast_500.Parsetree.expression, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_binding, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_description_attributes : (Astlib.Ast_500.Parsetree.attribute list, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val value_description : - name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - type_:(Astlib.Ast_500.Parsetree.core_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - prim:(string list, 'e, 'f) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.value_description, 'g, 'h) Ppxlib__.Ast_pattern0.t
    val covariant : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val contravariant : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val novariance : - (Astlib.Ast_500.Asttypes.variance, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val virtual_ : - (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val concrete : - (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'b) Ppxlib__.Ast_pattern0.t
    val pwith_type : + (Astlib.Ast_500.Parsetree.value_description, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val value_description : + name:(string, 'a, 'b) Ppxlib__.Ast_pattern0.t -> + type_:(Astlib.Ast_500.Parsetree.core_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + prim:(string list, 'c, 'd) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.value_description, 'a, 'd) Ppxlib__.Ast_pattern0.t
    val covariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val contravariant : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val novariance : + (Astlib.Ast_500.Asttypes.variance, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val virtual_ : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val concrete : + (Astlib.Ast_500.Asttypes.virtual_flag, 'a, 'a) Ppxlib__.Ast_pattern0.t
    val pwith_type : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_module : + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_module : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modtype : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modtype : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modtypesubst : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modtypesubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.module_type, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_typesubst : + (Astlib.Ast_500.Parsetree.module_type, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_typesubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.type_declaration, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val pwith_modsubst : + (Astlib.Ast_500.Parsetree.type_declaration, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val pwith_modsubst : (Astlib.Longident.t, 'a, 'b) Ppxlib__.Ast_pattern0.t -> - (Astlib.Longident.t, 'c, 'd) Ppxlib__.Ast_pattern0.t -> - (Astlib.Ast_500.Parsetree.with_constraint, 'e, 'f) Ppxlib__.Ast_pattern0.t
    val true_ : (bool, 'a, 'a) Ast_pattern.t
    val false_ : (bool, 'a, 'a) Ast_pattern.t
    val eint : + (Astlib.Longident.t, 'b, 'c) Ppxlib__.Ast_pattern0.t -> + (Astlib.Ast_500.Parsetree.with_constraint, 'a, 'c) Ppxlib__.Ast_pattern0.t
    val true_ : (bool, 'a, 'a) Ast_pattern.t
    val false_ : (bool, 'a, 'a) Ast_pattern.t
    val echar : (char, 'a, 'b) Ast_pattern.t -> @@ -998,8 +998,8 @@ val pexp_attributes : (Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t -> (Ppxlib_ast.Asttypes.arg_label * Astlib.Ast_500.Parsetree.expression, 'a, 'b) Ast_pattern.t
    val attribute : - name:(string, 'a, 'b) Ast_pattern.t -> - payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> + name:(string, 'a, 'b) Ast_pattern.t -> + payload:(Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> (Astlib.Ast_500.Parsetree.attribute, 'a, 'c) Ast_pattern.t
    val extension : (string, 'a, 'b) Ast_pattern.t -> (Astlib.Ast_500.Parsetree.payload, 'b, 'c) Ast_pattern.t -> @@ -1016,4 +1016,4 @@ val pexp_attributes : Location.t -> 'a -> 'b -> - 'c
    \ No newline at end of file + 'c
    diff --git a/ppxlib/Ppxlib/Deriving/Generator/V2/index.html b/ppxlib/Ppxlib/Deriving/Generator/V2/index.html index 646eb5f..b4329e6 100644 --- a/ppxlib/Ppxlib/Deriving/Generator/V2/index.html +++ b/ppxlib/Ppxlib/Deriving/Generator/V2/index.html @@ -1,13 +1,13 @@ -V2 (ppxlib.Ppxlib.Deriving.Generator.V2)

    Module Generator.V2

    val make : - ?attributes:Attribute.packed list -> - ?deps:t list -> - ?unused_code_warnings:bool -> +V2 (ppxlib.Ppxlib.Deriving.Generator.V2)

    Module Generator.V2

    val make : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> ('f, 'output_ast) Args.t -> - (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'f) -> + (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'f) -> ('output_ast, 'input_ast) t

    Same as Generator.make, but the generator has access to an expansion context.

    val make_noarg : - ?attributes:Attribute.packed list -> - ?deps:t list -> - ?unused_code_warnings:bool -> - (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'output_ast) -> - ('output_ast, 'input_ast) t

    Same as Generator.make_noarg, but the generator has access to an expansion context.

    \ No newline at end of file + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + (ctxt:Expansion_context.Deriver.t -> 'input_ast -> 'output_ast) -> + ('output_ast, 'input_ast) t

    Same as Generator.make_noarg, but the generator has access to an expansion context.

    diff --git a/ppxlib/Ppxlib/Deriving/Generator/index.html b/ppxlib/Ppxlib/Deriving/Generator/index.html index 856081b..ec71a83 100644 --- a/ppxlib/Ppxlib/Deriving/Generator/index.html +++ b/ppxlib/Ppxlib/Deriving/Generator/index.html @@ -1,19 +1,19 @@ -Generator (ppxlib.Ppxlib.Deriving.Generator)

    Module Deriving.Generator

    type ('output_ast, 'input_ast) t
    val make : - ?attributes:Attribute.packed list -> - ?deps:t list -> - ?unused_code_warnings:bool -> +Generator (ppxlib.Ppxlib.Deriving.Generator)

    Module Deriving.Generator

    type ('output_ast, 'input_ast) t
    val make : + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> ('f, 'output_ast) Args.t -> - (loc:Location.t -> path:string -> 'input_ast -> 'f) -> + (loc:Location.t -> path:string -> 'input_ast -> 'f) -> ('output_ast, 'input_ast) t

    make args gen creates a generator that can be passed to Deriving.add to generate an output AST from an input AST and generator arguments.

    deps is a list of derivers that this generator depends on.

    attributes is deprecated and unused. It is only kept for backward compatibility.

    unused_code_warning controls whether unused code warnings (e.g. warnings 32 and 60) are enabled or suppressed in emitted code. Default is false, which suppresses the warnings.

    val make_noarg : - ?attributes:Attribute.packed list -> - ?deps:t list -> - ?unused_code_warnings:bool -> - (loc:Location.t -> path:string -> 'input_ast -> 'output_ast) -> + ?attributes:Attribute.packed list -> + ?deps:t list -> + ?unused_code_warnings:bool -> + (loc:Location.t -> path:string -> 'input_ast -> 'output_ast) -> ('output_ast, 'input_ast) t

    Same as make, but without arguments.

    module V2 : sig ... end
    val apply : ('output_ast, 'input_ast) t -> - name:string -> - ctxt:Expansion_context.Deriver.t -> + name:string -> + ctxt:Expansion_context.Deriver.t -> 'input_ast -> (string * Astlib.Ast_500.Parsetree.expression) list -> - 'output_ast
    \ No newline at end of file + 'output_ast
    diff --git a/ppxlib/Ppxlib/Deriving/index.html b/ppxlib/Ppxlib/Deriving/index.html index 6e83cf7..b0e7f8e 100644 --- a/ppxlib/Ppxlib/Deriving/index.html +++ b/ppxlib/Ppxlib/Deriving/index.html @@ -1,66 +1,66 @@ -Deriving (ppxlib.Ppxlib.Deriving)

    Module Ppxlib.Deriving

    Deriving code from type declarations.

    module Args : sig ... end

    Specification of generator arguments

    Generator registration
    type t

    Type of registered derivers

    module Generator : sig ... end
    val add : - ?str_type_decl: +Deriving (ppxlib.Ppxlib.Deriving)

    Module Ppxlib.Deriving

    Deriving code from type declarations.

    module Args : sig ... end

    Specification of generator arguments

    Generator registration
    type t

    Type of registered derivers

    module Generator : sig ... end
    val add : + ?str_type_decl: (Astlib.Ast_500.Parsetree.structure_item list, Astlib.Ast_500.Asttypes.rec_flag * Astlib.Ast_500.Parsetree.type_declaration list) Generator.t -> - ?str_class_type_decl: + ?str_class_type_decl: (Astlib.Ast_500.Parsetree.structure_item list, Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list) Generator.t -> - ?str_type_ext: + ?str_type_ext: (Astlib.Ast_500.Parsetree.structure_item list, Astlib.Ast_500.Parsetree.type_extension) Generator.t -> - ?str_exception: + ?str_exception: (Astlib.Ast_500.Parsetree.structure_item list, Astlib.Ast_500.Parsetree.type_exception) Generator.t -> - ?str_module_type_decl: + ?str_module_type_decl: (Astlib.Ast_500.Parsetree.structure_item list, Astlib.Ast_500.Parsetree.module_type_declaration) Generator.t -> - ?sig_type_decl: + ?sig_type_decl: (Astlib.Ast_500.Parsetree.signature_item list, Astlib.Ast_500.Asttypes.rec_flag * Astlib.Ast_500.Parsetree.type_declaration list) Generator.t -> - ?sig_class_type_decl: + ?sig_class_type_decl: (Astlib.Ast_500.Parsetree.signature_item list, Astlib.Ast_500.Parsetree.class_type Astlib.Ast_500.Parsetree.class_infos list) Generator.t -> - ?sig_type_ext: + ?sig_type_ext: (Astlib.Ast_500.Parsetree.signature_item list, Astlib.Ast_500.Parsetree.type_extension) Generator.t -> - ?sig_exception: + ?sig_exception: (Astlib.Ast_500.Parsetree.signature_item list, Astlib.Ast_500.Parsetree.type_exception) Generator.t -> - ?sig_module_type_decl: + ?sig_module_type_decl: (Astlib.Ast_500.Parsetree.signature_item list, Astlib.Ast_500.Parsetree.module_type_declaration) Generator.t -> - ?extension: - (loc:Location.t -> - path:string -> + ?extension: + (loc:Location.t -> + path:string -> Astlib.Ast_500.Parsetree.core_type -> Astlib.Ast_500.Parsetree.expression) -> string -> t

    Register a new deriving generator.

    The various arguments are for the various items on which derivers can be attached in structure and signatures.

    We distinguish exception from type_extension as exception E is not exactly the same as type exn += E. Indeed if the type exn is redefined, then type exn += E will add E to the new exn type while exception E will add E to the predefined exn type.

    extension register an expander for extension with the name of the deriver. This is here mostly to support the ppx_deriving backend.

    val add_alias : string -> - ?str_type_decl:t list -> - ?str_class_type_decl:t list -> - ?str_type_ext:t list -> - ?str_exception:t list -> - ?str_module_type_decl:t list -> - ?sig_type_decl:t list -> - ?sig_class_type_decl:t list -> - ?sig_type_ext:t list -> - ?sig_exception:t list -> - ?sig_module_type_decl:t list -> + ?str_type_decl:t list -> + ?str_class_type_decl:t list -> + ?str_type_ext:t list -> + ?str_exception:t list -> + ?str_module_type_decl:t list -> + ?sig_type_decl:t list -> + ?sig_class_type_decl:t list -> + ?sig_type_ext:t list -> + ?sig_exception:t list -> + ?sig_module_type_decl:t list -> t list -> - t

    add_alias name set add an alias. When the user write the alias, all the generator of set will be used instead. It is possible to override the set for any of the context by passing the specific set in the approriate optional argument of add_alias.

    val ignore : t -> unit

    Ignore a deriver. So that one can write: Deriving.add ... |> Deriving.ignore

    \ No newline at end of file + t

    add_alias name set add an alias. When the user write the alias, all the generator of set will be used instead. It is possible to override the set for any of the context by passing the specific set in the approriate optional argument of add_alias.

    val ignore : t -> unit

    Ignore a deriver. So that one can write: Deriving.add ... |> Deriving.ignore

    diff --git a/ppxlib/Ppxlib/Driver/Cookies/index.html b/ppxlib/Ppxlib/Driver/Cookies/index.html index 1533509..ba567fc 100644 --- a/ppxlib/Ppxlib/Driver/Cookies/index.html +++ b/ppxlib/Ppxlib/Driver/Cookies/index.html @@ -1,5 +1,5 @@ -Cookies (ppxlib.Ppxlib.Driver.Cookies)

    Module Driver.Cookies

    type t
    val get : +Cookies (ppxlib.Ppxlib.Driver.Cookies)

    Module Driver.Cookies

    type t
    val get : t -> string -> (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t -> @@ -10,5 +10,5 @@ ('b option, Location.Error.t Stdppx.NonEmptyList.t) result

    get cookies name pattern look for a cookie named name and parse it using pattern, returning a result instead of raising when the parsing fails.

    val set : t -> string -> Astlib.Ast_500.Parsetree.expression -> unit

    set cookies name expr set cookie name to expr.

    val add_handler : (t -> unit) -> unit

    Register a callback that is called before a rewriting. The handler is expected to lookup some cookies and set some global variables.

    This API is a temporary hack to allow to migrate from add_arg to the use of cookie, until ppxlib has been upgraded to pass cookies through.

    val add_simple_handler : string -> (Astlib.Ast_500.Parsetree.expression, 'a -> 'a, 'b) Ast_pattern.t -> - f:('b option -> unit) -> - unit

    Shorthand for: add_handler (fun t -> f (get t name pattern))

    val add_post_handler : (t -> unit) -> unit

    Register a callback that is called after a rewriting. The handler is expected to set some cookies from some global variables.

    \ No newline at end of file + f:('b option -> unit) -> + unit

    Shorthand for: add_handler (fun t -> f (get t name pattern))

    val add_post_handler : (t -> unit) -> unit

    Register a callback that is called after a rewriting. The handler is expected to set some cookies from some global variables.

    diff --git a/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html b/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html index eb125f6..680d870 100644 --- a/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html +++ b/ppxlib/Ppxlib/Driver/Create_file_property/argument-1-Name/index.html @@ -1,2 +1,2 @@ -Name (ppxlib.Ppxlib.Driver.Create_file_property.Name)

    Parameter Create_file_property.Name

    val name : string
    \ No newline at end of file +Name (ppxlib.Ppxlib.Driver.Create_file_property.Name)

    Parameter Create_file_property.Name

    val name : string
    diff --git a/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html b/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html index 3d19e56..78dc693 100644 --- a/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html +++ b/ppxlib/Ppxlib/Driver/Create_file_property/argument-2-T/index.html @@ -1,2 +1,2 @@ -T (ppxlib.Ppxlib.Driver.Create_file_property.T)

    Parameter Create_file_property.T

    type t
    val t_of_sexp : Sexplib0.Sexp.t -> t
    val sexp_of_t : t -> Sexplib0.Sexp.t
    \ No newline at end of file +T (ppxlib.Ppxlib.Driver.Create_file_property.T)

    Parameter Create_file_property.T

    type t
    val t_of_sexp : Sexplib0.Sexp.t -> t
    val sexp_of_t : t -> Sexplib0.Sexp.t
    diff --git a/ppxlib/Ppxlib/Driver/Create_file_property/index.html b/ppxlib/Ppxlib/Driver/Create_file_property/index.html index 8dc4ef4..3972abe 100644 --- a/ppxlib/Ppxlib/Driver/Create_file_property/index.html +++ b/ppxlib/Ppxlib/Driver/Create_file_property/index.html @@ -1,2 +1,2 @@ -Create_file_property (ppxlib.Ppxlib.Driver.Create_file_property)

    Module Driver.Create_file_property

    Create a new file property.

    A file property represent a piece of information about a file that can be set during preprocessing. If the -output-metadata FILE command line option was passed to the driver, then it will output this information to the given file.

    This mechanism is used to pass information gathered while preprocessing the file to the build system. For instance, this is used by ppx_inline_test to tell whether a file contains tests or not.

    In the future we could also use this to directly compute the dependencies and pass them here, to avoid calling ocamldep separately.

    Parameters

    module Name : sig ... end

    Signature

    val set : T.t -> unit
    \ No newline at end of file +Create_file_property (ppxlib.Ppxlib.Driver.Create_file_property)

    Module Driver.Create_file_property

    Create a new file property.

    A file property represent a piece of information about a file that can be set during preprocessing. If the -output-metadata FILE command line option was passed to the driver, then it will output this information to the given file.

    This mechanism is used to pass information gathered while preprocessing the file to the build system. For instance, this is used by ppx_inline_test to tell whether a file contains tests or not.

    In the future we could also use this to directly compute the dependencies and pass them here, to avoid calling ocamldep separately.

    Parameters

    module Name : sig ... end

    Signature

    val set : T.t -> unit
    diff --git a/ppxlib/Ppxlib/Driver/Instrument/V2/index.html b/ppxlib/Ppxlib/Driver/Instrument/V2/index.html index 4694238..89ba859 100644 --- a/ppxlib/Ppxlib/Driver/Instrument/V2/index.html +++ b/ppxlib/Ppxlib/Driver/Instrument/V2/index.html @@ -1,7 +1,7 @@ -V2 (ppxlib.Ppxlib.Driver.Instrument.V2)

    Module Instrument.V2

    val make : +V2 (ppxlib.Ppxlib.Driver.Instrument.V2)

    Module Instrument.V2

    Same as Instrument.make, but the transformation that will be applied to the AST has access to an expansion context. To be used together with Driver.V2.

    \ No newline at end of file + position:pos -> + t

    Same as Instrument.make, but the transformation that will be applied to the AST has access to an expansion context. To be used together with Driver.V2.

    diff --git a/ppxlib/Ppxlib/Driver/Instrument/index.html b/ppxlib/Ppxlib/Driver/Instrument/index.html index 8190ede..99684a4 100644 --- a/ppxlib/Ppxlib/Driver/Instrument/index.html +++ b/ppxlib/Ppxlib/Driver/Instrument/index.html @@ -1,5 +1,5 @@ -Instrument (ppxlib.Ppxlib.Driver.Instrument)

    Module Driver.Instrument

    type t
    type pos =
    1. | Before
    2. | After
    val make : +Instrument (ppxlib.Ppxlib.Driver.Instrument)

    Module Driver.Instrument

    type t
    type pos =
    1. | Before
    2. | After

    make transformation ~position creates an instrumentation that can be passed to Driver.register_transformation to instrument an implementation file. transformation is the transformation that will be applied to the AST; position specifies if it should be applied before or after rewriters defined through rules, impl or intf are applied.

    module V2 : sig ... end
    \ No newline at end of file + position:pos -> + t

    make transformation ~position creates an instrumentation that can be passed to Driver.register_transformation to instrument an implementation file. transformation is the transformation that will be applied to the AST; position specifies if it should be applied before or after rewriters defined through rules, impl or intf are applied.

    module V2 : sig ... end
    diff --git a/ppxlib/Ppxlib/Driver/Lint_error/index.html b/ppxlib/Ppxlib/Driver/Lint_error/index.html index d830cbf..7b68dcc 100644 --- a/ppxlib/Ppxlib/Driver/Lint_error/index.html +++ b/ppxlib/Ppxlib/Driver/Lint_error/index.html @@ -1,2 +1,2 @@ -Lint_error (ppxlib.Ppxlib.Driver.Lint_error)

    Module Driver.Lint_error

    Error reported by linters

    type t
    val of_string : Location.t -> string -> t
    \ No newline at end of file +Lint_error (ppxlib.Ppxlib.Driver.Lint_error)

    Module Driver.Lint_error

    Error reported by linters

    type t
    val of_string : Location.t -> string -> t
    diff --git a/ppxlib/Ppxlib/Driver/V2/index.html b/ppxlib/Ppxlib/Driver/V2/index.html index 0cf15b7..c9766c7 100644 --- a/ppxlib/Ppxlib/Driver/V2/index.html +++ b/ppxlib/Ppxlib/Driver/V2/index.html @@ -1,53 +1,53 @@ -V2 (ppxlib.Ppxlib.Driver.V2)

    Module Driver.V2

    val register_transformation : - ?extensions:Extension.t list -> - ?rules:Context_free.Rule.t list -> - ?enclose_impl: +V2 (ppxlib.Ppxlib.Driver.V2)

    Module Driver.V2

    val register_transformation : + ?extensions:Extension.t list -> + ?rules:Context_free.Rule.t list -> + ?enclose_impl: (Expansion_context.Base.t -> Location.t option -> Astlib.Ast_500.Parsetree.structure_item list * Astlib.Ast_500.Parsetree.structure_item list) -> - ?enclose_intf: + ?enclose_intf: (Expansion_context.Base.t -> Location.t option -> Astlib.Ast_500.Parsetree.signature_item list * Astlib.Ast_500.Parsetree.signature_item list) -> - ?impl: + ?impl: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.structure_item list -> Astlib.Ast_500.Parsetree.structure_item list) -> - ?intf: + ?intf: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.signature_item list -> Astlib.Ast_500.Parsetree.signature_item list) -> - ?lint_impl: + ?lint_impl: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.structure_item list -> Lint_error.t list) -> - ?lint_intf: + ?lint_intf: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.signature_item list -> Lint_error.t list) -> - ?preprocess_impl: + ?preprocess_impl: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.structure_item list -> Astlib.Ast_500.Parsetree.structure_item list) -> - ?preprocess_intf: + ?preprocess_intf: (Expansion_context.Base.t -> Astlib.Ast_500.Parsetree.signature_item list -> Astlib.Ast_500.Parsetree.signature_item list) -> - ?instrument:Instrument.t -> - ?aliases:string list -> + ?instrument:Instrument.t -> + ?aliases:string list -> string -> unit

    Same as Driver.register_transformation, but the callbacks have access to an expansion context. Their signatures coincide with the signatures of the respective methods in Ast_traverse.map_with_expansion_context.

    val register_transformation_using_ocaml_current_ast : - ?impl: + ?impl: (Expansion_context.Base.t -> Ppxlib_ast.Compiler_version.Ast.Parsetree.structure -> Ppxlib_ast.Compiler_version.Ast.Parsetree.structure) -> - ?intf: + ?intf: (Expansion_context.Base.t -> Ppxlib_ast.Compiler_version.Ast.Parsetree.signature -> Ppxlib_ast.Compiler_version.Ast.Parsetree.signature) -> - ?aliases:string list -> + ?aliases:string list -> string -> - unit

    Same as Driver.register_transformation_using_ocaml_current_ast, but the callbacks ?impl and ?intf have access to an expansion context.

    \ No newline at end of file + unit

    Same as Driver.register_transformation_using_ocaml_current_ast, but the callbacks ?impl and ?intf have access to an expansion context.

    diff --git a/ppxlib/Ppxlib/Driver/index.html b/ppxlib/Ppxlib/Driver/index.html index aab4611..01ce2ca 100644 --- a/ppxlib/Ppxlib/Driver/index.html +++ b/ppxlib/Ppxlib/Driver/index.html @@ -1,53 +1,53 @@ -Driver (ppxlib.Ppxlib.Driver)

    Module Ppxlib.Driver

    Interaction with the driver, such as getting/seeting cookies, adding arguments.

    The relevant part in the manual is the section on its execution.

    val add_arg : Stdlib.Arg.key -> Stdlib.Arg.spec -> doc:string -> unit

    Add one argument to the command line

    module Lint_error : sig ... end

    Error reported by linters

    module Cookies : sig ... end
    module Instrument : sig ... end
    val register_transformation : - ?extensions:Extension.t list -> - ?rules:Context_free.Rule.t list -> - ?enclose_impl: +Driver (ppxlib.Ppxlib.Driver)

    Module Ppxlib.Driver

    Interaction with the driver, such as getting/seeting cookies, adding arguments.

    The relevant part in the manual is the section on its execution.

    val add_arg : Stdlib.Arg.key -> Stdlib.Arg.spec -> doc:string -> unit

    Add one argument to the command line

    module Lint_error : sig ... end

    Error reported by linters

    module Cookies : sig ... end
    module Instrument : sig ... end
    val register_transformation : + ?extensions:Extension.t list -> + ?rules:Context_free.Rule.t list -> + ?enclose_impl: (Location.t option -> Astlib.Ast_500.Parsetree.structure_item list * Astlib.Ast_500.Parsetree.structure_item list) -> - ?enclose_intf: + ?enclose_intf: (Location.t option -> Astlib.Ast_500.Parsetree.signature_item list * Astlib.Ast_500.Parsetree.signature_item list) -> - ?impl: + ?impl: (Astlib.Ast_500.Parsetree.structure_item list -> Astlib.Ast_500.Parsetree.structure_item list) -> - ?intf: + ?intf: (Astlib.Ast_500.Parsetree.signature_item list -> Astlib.Ast_500.Parsetree.signature_item list) -> - ?lint_impl: + ?lint_impl: (Astlib.Ast_500.Parsetree.structure_item list -> Lint_error.t list) -> - ?lint_intf: + ?lint_intf: (Astlib.Ast_500.Parsetree.signature_item list -> Lint_error.t list) -> - ?preprocess_impl: + ?preprocess_impl: (Astlib.Ast_500.Parsetree.structure_item list -> Astlib.Ast_500.Parsetree.structure_item list) -> - ?preprocess_intf: + ?preprocess_intf: (Astlib.Ast_500.Parsetree.signature_item list -> Astlib.Ast_500.Parsetree.signature_item list) -> - ?instrument:Instrument.t -> - ?aliases:string list -> + ?instrument:Instrument.t -> + ?aliases:string list -> string -> - unit

    register_transformation name registers a code transformation.

    name is a logical name for the set of transformations (such as sexp_conv or bin_prot). It is mostly used for debugging purposes.

    rules is a list of context independent rewriting rules, such as extension point expanders. This is what most code transformation should use.

    extensions is a special cases of rules and is deprecated. It is only kept for backward compatibility.

    enclose_impl and enclose_intf produces a header and footer for implementation/interface files. They are a special case of impl and intf. The header is placed after any initial module-level attributes; the footer is placed after everything else. Both functions receive a location that denotes all of the items between header and footer, or None if the that list of items is empty.

    impl is an optional function that is applied on implementation files and intf is an optional function that is applied on interface files. These two functions are applied on the AST of the whole file. They should only be used when the other mechanism are not enough. For instance if the transformation expands extension points that depend on the context.

    lint_impl and lint_intf are applied to the unprocessed source. Errors they return will be reported to the user as preprocessor warnings.

    instrument can be used to instrument implementation files. Its transformation is applied to the AST of the whole file. The difference to impl is that you can specify if it should be applied before or after all rewriters defined through rules, impl or intf are applied.

    More information on each phase, and their relative order, can be found in the manual.

    val register_transformation_using_ocaml_current_ast : - ?impl: + unit

    register_transformation name registers a code transformation.

    name is a logical name for the set of transformations (such as sexp_conv or bin_prot). It is mostly used for debugging purposes.

    rules is a list of context independent rewriting rules, such as extension point expanders. This is what most code transformation should use.

    extensions is a special cases of rules and is deprecated. It is only kept for backward compatibility.

    enclose_impl and enclose_intf produces a header and footer for implementation/interface files. They are a special case of impl and intf. The header is placed after any initial module-level attributes; the footer is placed after everything else. Both functions receive a location that denotes all of the items between header and footer, or None if the that list of items is empty.

    impl is an optional function that is applied on implementation files and intf is an optional function that is applied on interface files. These two functions are applied on the AST of the whole file. They should only be used when the other mechanism are not enough. For instance if the transformation expands extension points that depend on the context.

    lint_impl and lint_intf are applied to the unprocessed source. Errors they return will be reported to the user as preprocessor warnings.

    instrument can be used to instrument implementation files. Its transformation is applied to the AST of the whole file. The difference to impl is that you can specify if it should be applied before or after all rewriters defined through rules, impl or intf are applied.

    More information on each phase, and their relative order, can be found in the manual.

    val register_transformation_using_ocaml_current_ast : + ?impl: (Ppxlib_ast.Compiler_version.Ast.Parsetree.structure -> Ppxlib_ast.Compiler_version.Ast.Parsetree.structure) -> - ?intf: + ?intf: (Ppxlib_ast.Compiler_version.Ast.Parsetree.signature -> Ppxlib_ast.Compiler_version.Ast.Parsetree.signature) -> - ?aliases:string list -> + ?aliases:string list -> string -> unit

    Same as register_transformation except that it uses the same AST as the current ocaml compiler.

    This is not the intended way of using driver. This is only for ppx rewriters that are not written using ppxlib but want to export a driver compatible library.

    val register_code_transformation : - name:string -> - ?aliases:string list -> - impl: + name:string -> + ?aliases:string list -> + impl: (Astlib.Ast_500.Parsetree.structure_item list -> Astlib.Ast_500.Parsetree.structure_item list) -> - intf: + intf: (Astlib.Ast_500.Parsetree.signature_item list -> Astlib.Ast_500.Parsetree.signature_item list) -> - unit

    Same as:

    register_transformation ~name ~impl ~intf ()
    • deprecated [since 2015-11] use register_transformation instead
    val register_correction : loc:Location.t -> repl:string -> unit

    Rewriters might call this function to suggest a correction to the code source. When they do this, the driver will generate a file.ml.ppx-corrected file with the suggested replacement. The build system will then show the diff to the user who is free to accept the correction or not.

    val register_process_file_hook : (unit -> unit) -> unit

    Hook called before processing a file

    module V2 : sig ... end
    module Create_file_property + unit

    Same as:

      register_transformation ~name ~impl ~intf ()
    • deprecated [since 2015-11] use register_transformation instead
    val register_correction : loc:Location.t -> repl:string -> unit

    Rewriters might call this function to suggest a correction to the code source. When they do this, the driver will generate a file.ml.ppx-corrected file with the suggested replacement. The build system will then show the diff to the user who is free to accept the correction or not.

    val register_process_file_hook : (unit -> unit) -> unit

    Hook called before processing a file

    module V2 : sig ... end
    module Create_file_property (Name : sig ... end) (T : Stdppx.Sexpable.S) : - sig ... end

    Create a new file property.

    val standalone : unit -> unit

    Suitable for -pp and also usable as a standalone command line tool.

    If the first command line argument is -as-ppx then it will run as a ppx rewriter.

    val run_as_ppx_rewriter : unit -> unit

    Suitable for -ppx. Used only for the public release.

    val pretty : unit -> bool

    If true, code transformations should avoid generating code that is not strictly necessary, such as extra type annotations.

    \ No newline at end of file + sig ... end

    Create a new file property.

    val standalone : unit -> unit

    Suitable for -pp and also usable as a standalone command line tool.

    If the first command line argument is -as-ppx then it will run as a ppx rewriter.

    val run_as_ppx_rewriter : unit -> unit

    Suitable for -ppx. Used only for the public release.

    val pretty : unit -> bool

    If true, code transformations should avoid generating code that is not strictly necessary, such as extra type annotations.

    diff --git a/ppxlib/Ppxlib/Expansion_context/Base/index.html b/ppxlib/Ppxlib/Expansion_context/Base/index.html index 760ff4d..311d997 100644 --- a/ppxlib/Ppxlib/Expansion_context/Base/index.html +++ b/ppxlib/Ppxlib/Expansion_context/Base/index.html @@ -1,2 +1,2 @@ -Base (ppxlib.Ppxlib.Expansion_context.Base)

    Module Expansion_context.Base

    type t

    Type for the location independent parts of the expansion context

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    \ No newline at end of file +Base (ppxlib.Ppxlib.Expansion_context.Base)

    Module Expansion_context.Base

    type t

    Type for the location independent parts of the expansion context

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    diff --git a/ppxlib/Ppxlib/Expansion_context/Deriver/index.html b/ppxlib/Ppxlib/Expansion_context/Deriver/index.html index 51a722f..0ab6233 100644 --- a/ppxlib/Ppxlib/Expansion_context/Deriver/index.html +++ b/ppxlib/Ppxlib/Expansion_context/Deriver/index.html @@ -1,2 +1,2 @@ -Deriver (ppxlib.Ppxlib.Expansion_context.Deriver)

    Module Expansion_context.Deriver

    type t

    Type of expansion contexts for derivers

    val derived_item_loc : t -> Location.t

    Return the location of the item to which the deriver is being applied

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

    Wrap a fun ~loc ~path into a fun ~ctxt

    val inline : t -> bool

    Whether the derived code is going to be inlined in the source

    \ No newline at end of file +Deriver (ppxlib.Ppxlib.Expansion_context.Deriver)

    Module Expansion_context.Deriver

    type t

    Type of expansion contexts for derivers

    val derived_item_loc : t -> Location.t

    Return the location of the item to which the deriver is being applied

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

    Wrap a fun ~loc ~path into a fun ~ctxt

    val inline : t -> bool

    Whether the derived code is going to be inlined in the source

    diff --git a/ppxlib/Ppxlib/Expansion_context/Extension/index.html b/ppxlib/Ppxlib/Expansion_context/Extension/index.html index 3ecffeb..d1bc109 100644 --- a/ppxlib/Ppxlib/Expansion_context/Extension/index.html +++ b/ppxlib/Ppxlib/Expansion_context/Extension/index.html @@ -1,2 +1,2 @@ -Extension (ppxlib.Ppxlib.Expansion_context.Extension)

    Module Expansion_context.Extension

    type t

    Type of expansion contexts for extensions

    val extension_point_loc : t -> Location.t

    Return the location of the extension point being expanded

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

    Wrap a fun ~loc ~path into a fun ~ctxt

    \ No newline at end of file +Extension (ppxlib.Ppxlib.Expansion_context.Extension)

    Module Expansion_context.Extension

    type t

    Type of expansion contexts for extensions

    val extension_point_loc : t -> Location.t

    Return the location of the extension point being expanded

    val code_path : t -> Code_path.t

    Return the code path for the given context In Driver, Deriving and Extension, the context is initialized so that the file_path component of the code_path is determined from the first location found in the input AST. That means that:

    • It's the empty string in empty structures or signatures
    • It can be altered by line directives
    val input_name : t -> string

    Return the input name for the given context. In Driver, Deriving and Extension, the context argument is initialized so that the input_name matches the input filename passed to the driver on the command line. That means that:

    • It has a value even for empty files
    • It is not affected by line directives
    • It is "_none_" when using Driver.map_structure or Driver.map_signature
    val tool_name : t -> string

    Can be used within a ppx preprocessor to know which tool is calling it "ocamlc", "ocamlopt", "ocamldep", "ocaml", ... .

    val with_loc_and_path : (loc:Location.t -> path:string -> 'a) -> ctxt:t -> 'a

    Wrap a fun ~loc ~path into a fun ~ctxt

    diff --git a/ppxlib/Ppxlib/Expansion_context/index.html b/ppxlib/Ppxlib/Expansion_context/index.html index aaae5ca..ca5dc23 100644 --- a/ppxlib/Ppxlib/Expansion_context/index.html +++ b/ppxlib/Ppxlib/Expansion_context/index.html @@ -1,2 +1,2 @@ -Expansion_context (ppxlib.Ppxlib.Expansion_context)

    Module Ppxlib.Expansion_context

    The context given to rewriting rules when expanding.

    module Base : sig ... end
    module Extension : sig ... end
    module Deriver : sig ... end
    \ No newline at end of file +Expansion_context (ppxlib.Ppxlib.Expansion_context)

    Module Ppxlib.Expansion_context

    The context given to rewriting rules when expanding.

    module Base : sig ... end
    module Extension : sig ... end
    module Deriver : sig ... end
    diff --git a/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html b/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html index 55aaab4..2cbc256 100644 --- a/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html +++ b/ppxlib/Ppxlib/Expansion_helpers/Quoter/index.html @@ -1,8 +1,8 @@ -Quoter (ppxlib.Ppxlib.Expansion_helpers.Quoter)

    Module Expansion_helpers.Quoter

    Generate expressions in a hygienic way.

    The idea is that whenever we want to refer to an expression in generated code we first quote it. The result will be an identifier that is guaranteed to refer to the expression it was created from. This way it is impossible for quoted fragments to refer to newly introduced expressions.

    For more information, see the section on quoting in the good practices section.

    type t
    val create : unit -> t

    Creates a quoter. A quoter guarantees to give names that do not clash with any other names used before

    val quote : +Quoter (ppxlib.Ppxlib.Expansion_helpers.Quoter)

    Module Expansion_helpers.Quoter

    Generate expressions in a hygienic way.

    The idea is that whenever we want to refer to an expression in generated code we first quote it. The result will be an identifier that is guaranteed to refer to the expression it was created from. This way it is impossible for quoted fragments to refer to newly introduced expressions.

    For more information, see the section on quoting in the good practices section.

    type t
    val create : unit -> t

    Creates a quoter. A quoter guarantees to give names that do not clash with any other names used before

    quote t e returns the expression that is safe to use in place of e in generated code

    sanitize t e Returns e wrapped with bindings for all quoted expressions in the quoter t

    \ No newline at end of file + Astlib.Ast_500.Parsetree.expression

    sanitize t e Returns e wrapped with bindings for all quoted expressions in the quoter t

    diff --git a/ppxlib/Ppxlib/Expansion_helpers/index.html b/ppxlib/Ppxlib/Expansion_helpers/index.html index 0c9cb03..c08f2f9 100644 --- a/ppxlib/Ppxlib/Expansion_helpers/index.html +++ b/ppxlib/Ppxlib/Expansion_helpers/index.html @@ -1,6 +1,6 @@ -Expansion_helpers (ppxlib.Ppxlib.Expansion_helpers)

    Module Ppxlib.Expansion_helpers

    Various helpers for expansion, such as quoting expressions in their context, or mangling names.

    Mangling

    Derive mangled names from type names in a deriver. For instance, the t can be turned into t_of_yojson or yojson_of_t with the functions from this module.

    type affix =
    1. | Prefix of string
      (*

      Prefix p adds prefix p.

      *)
    2. | Suffix of string
      (*

      Suffix s adds suffix s.

      *)
    3. | PrefixSuffix of string * string
      (*

      PrefixSuffix (p, s) adds both prefix p and suffix s.

      *)

    Specification for name mangling.

    val mangle : ?fixpoint:string -> affix -> string -> string

    mangle ~fixpoint affix s derives a mangled name from s with the mangling specified by affix. If s is equal to fixpoint ("t" by default), then s is omitted from the mangled name.

    val mangle_type_decl : - ?fixpoint:string -> +Expansion_helpers (ppxlib.Ppxlib.Expansion_helpers)

    Module Ppxlib.Expansion_helpers

    Various helpers for expansion, such as quoting expressions in their context, or mangling names.

    Mangling

    Derive mangled names from type names in a deriver. For instance, the t can be turned into t_of_yojson or yojson_of_t with the functions from this module.

    type affix =
    1. | Prefix of string
      (*

      Prefix p adds prefix p.

      *)
    2. | Suffix of string
      (*

      Suffix s adds suffix s.

      *)
    3. | PrefixSuffix of string * string
      (*

      PrefixSuffix (p, s) adds both prefix p and suffix s.

      *)

    Specification for name mangling.

    val mangle : ?fixpoint:string -> affix -> string -> string

    mangle ~fixpoint affix s derives a mangled name from s with the mangling specified by affix. If s is equal to fixpoint ("t" by default), then s is omitted from the mangled name.

    val mangle_type_decl : + ?fixpoint:string -> affix -> Astlib.Ast_500.Parsetree.type_declaration -> - string

    mangle_type_decl ~fixpoint affix td does the same as mangle, but for the name of td.

    val mangle_lid : ?fixpoint:string -> affix -> Longident.t -> Longident.t

    mangle_lid ~fixpoint affix lid does the same as mangle, but for the last component of lid.

    Quoting

    module Quoter : sig ... end

    Generate expressions in a hygienic way.

    \ No newline at end of file + string

    mangle_type_decl ~fixpoint affix td does the same as mangle, but for the name of td.

    val mangle_lid : ?fixpoint:string -> affix -> Longident.t -> Longident.t

    mangle_lid ~fixpoint affix lid does the same as mangle, but for the last component of lid.

    Quoting

    module Quoter : sig ... end

    Generate expressions in a hygienic way.

    diff --git a/ppxlib/Ppxlib/Extension/Context/index.html b/ppxlib/Ppxlib/Extension/Context/index.html index 965f15b..698ecfa 100644 --- a/ppxlib/Ppxlib/Extension/Context/index.html +++ b/ppxlib/Ppxlib/Extension/Context/index.html @@ -1,5 +1,5 @@ -Context (ppxlib.Ppxlib.Extension.Context)

    Module Extension.Context

    val eq : 'a t -> 'b t -> ('a, 'b) equality
    val get_extension : +Context (ppxlib.Ppxlib.Extension.Context)

    Module Extension.Context

    val eq : 'a t -> 'b t -> ('a, 'b) equality
    val get_extension : 'a t -> 'a -> ((string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) @@ -12,4 +12,4 @@ 'a t -> 'a -> Astlib.Ast_500.Parsetree.attribute list -> - ('a, Location.Error.t Stdppx.NonEmptyList.t) result
    \ No newline at end of file + ('a, Location.Error.t Stdppx.NonEmptyList.t) result
    diff --git a/ppxlib/Ppxlib/Extension/Expert/index.html b/ppxlib/Ppxlib/Extension/Expert/index.html index 40cd4eb..41b60d2 100644 --- a/ppxlib/Ppxlib/Extension/Expert/index.html +++ b/ppxlib/Ppxlib/Extension/Expert/index.html @@ -1,5 +1,5 @@ -Expert (ppxlib.Ppxlib.Extension.Expert)

    Module Extension.Expert

    This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.

    type ('context, 'payload) t

    Type of declared expert extensions.

    The 'context type parameter describes where the extension is expected and the 'payload one what its payload should contain.

    val declare : +Expert (ppxlib.Ppxlib.Extension.Expert)

    Module Extension.Expert

    This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.

    type ('context, 'payload) t

    Type of declared expert extensions.

    The 'context type parameter describes where the extension is expected and the 'payload one what its payload should contain.

    val declare : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ast_pattern.t -> @@ -8,13 +8,13 @@ string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'b) Ast_pattern.t -> - (arg:Longident.t Loc.t option -> 'a) -> + (arg:Longident.t Loc.t option -> 'a) -> ('context, 'b) t
    val convert_res : (_, 'a) t list -> - loc:Location.t -> + loc:Location.t -> (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> ('a option, Location.Error.t Stdppx.NonEmptyList.t) result
    val convert : (_, 'a) t list -> - loc:Location.t -> + loc:Location.t -> (string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) -> - 'a option
    \ No newline at end of file + 'a option
    diff --git a/ppxlib/Ppxlib/Extension/For_context/index.html b/ppxlib/Ppxlib/Extension/For_context/index.html index 76c3a89..a83a6d0 100644 --- a/ppxlib/Ppxlib/Extension/For_context/index.html +++ b/ppxlib/Ppxlib/Extension/For_context/index.html @@ -1,18 +1,18 @@ -For_context (ppxlib.Ppxlib.Extension.For_context)

    Module Extension.For_context

    This module is used to implement Context_free.map_top_down

    type 'a t
    val convert_res : +For_context (ppxlib.Ppxlib.Extension.For_context)

    Module Extension.For_context

    This module is used to implement Context_free.map_top_down

    \ No newline at end of file + 'a list option
    diff --git a/ppxlib/Ppxlib/Extension/V2/index.html b/ppxlib/Ppxlib/Extension/V2/index.html index 32103d7..ff62b70 100644 --- a/ppxlib/Ppxlib/Extension/V2/index.html +++ b/ppxlib/Ppxlib/Extension/V2/index.html @@ -1,12 +1,12 @@ -V2 (ppxlib.Ppxlib.Extension.V2)

    Module Extension.V2

    type nonrec t = t
    val declare : +V2 (ppxlib.Ppxlib.Extension.V2)

    Module Extension.V2

    type nonrec t = t
    val declare : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> - (loc:Location.t -> path:string -> 'a) -> + (loc:Location.t -> path:string -> 'a) -> t
    val declare_inline : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> - (loc:Location.t -> path:string -> 'a) -> - t
    \ No newline at end of file + (loc:Location.t -> path:string -> 'a) -> + t
    diff --git a/ppxlib/Ppxlib/Extension/V3/index.html b/ppxlib/Ppxlib/Extension/V3/index.html index 3a8a229..afbf88c 100644 --- a/ppxlib/Ppxlib/Extension/V3/index.html +++ b/ppxlib/Ppxlib/Extension/V3/index.html @@ -1,27 +1,27 @@ -V3 (ppxlib.Ppxlib.Extension.V3)

    Module Extension.V3

    type nonrec t = t
    val declare : +V3 (ppxlib.Ppxlib.Extension.V3)

    Module Extension.V3

    type nonrec t = t
    val declare : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> - (ctxt:Expansion_context.Extension.t -> 'a) -> + (ctxt:Expansion_context.Extension.t -> 'a) -> t
    val declare_inline : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> - (ctxt:Expansion_context.Extension.t -> 'a) -> + (ctxt:Expansion_context.Extension.t -> 'a) -> t
    val declare_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> - (ctxt:Expansion_context.Extension.t -> - arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + (ctxt:Expansion_context.Extension.t -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> - t

    Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

    let%map.Foo.Bar x = 1 in
    -...
    val declare_inline_with_path_arg : + t

    Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

      let%map.Foo.Bar x = 1 in
    +  ...
    val declare_inline_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> - (ctxt:Expansion_context.Extension.t -> - arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + (ctxt:Expansion_context.Extension.t -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> - t
    \ No newline at end of file + t
    diff --git a/ppxlib/Ppxlib/Extension/index.html b/ppxlib/Ppxlib/Extension/index.html index 6934572..544ced4 100644 --- a/ppxlib/Ppxlib/Extension/index.html +++ b/ppxlib/Ppxlib/Extension/index.html @@ -1,30 +1,30 @@ -Extension (ppxlib.Ppxlib.Extension)

    Module Ppxlib.Extension

    Declare extenders to rewrite extension nodes.

    type (_, _) equality =
    1. | Eq : ('a, 'a) equality
    2. | Ne : (_, _) equality
    module Context : sig ... end
    type t

    Type of declared extensions.

    val declare : +Extension (ppxlib.Ppxlib.Extension)

    Module Ppxlib.Extension

    Declare extenders to rewrite extension nodes.

    type (_, _) equality =
    1. | Eq : ('a, 'a) equality
    2. | Ne : (_, _) equality
    module Context : sig ... end
    type t

    Type of declared extensions.

    val declare : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> - (loc:Location.t -> path:string -> 'a) -> + (loc:Location.t -> path:string -> 'a) -> t

    declare name context pattern expander declares the extension names name for context.

    expander is responsible for producing the code to replace the extension in the AST. It receives as argument:

    • loc: the location of the enclosing node. For instance for expression it is the pexp_loc field
    • path: the current module path
    val declare_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context) Ast_pattern.t -> - (loc:Location.t -> - path:string -> - arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + (loc:Location.t -> + path:string -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> - t

    Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

    let%map.Foo.Bar x = 1 in
    -...
    val declare_inline : + t

    Same as declare except that the extension name takes an additional path argument. The path is the part of the name that start with a capitalized component. For instance in the following, the extension "map" would receive the path argument Foo.Bar:

      let%map.Foo.Bar x = 1 in
    +  ...
    val declare_inline : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> - (loc:Location.t -> path:string -> 'a) -> + (loc:Location.t -> path:string -> 'a) -> t

    Inline the result of the expansion into its parent. Only works for these contexts:

    • class_field
    • class_type_field
    • signature_item
    • structure_item
    val declare_inline_with_path_arg : string -> 'context Context.t -> (Astlib.Ast_500.Parsetree.payload, 'a, 'context list) Ast_pattern.t -> - (loc:Location.t -> - path:string -> - arg:Longident.t Ppxlib_ast.Asttypes.loc option -> + (loc:Location.t -> + path:string -> + arg:Longident.t Ppxlib_ast.Asttypes.loc option -> 'a) -> t
    module For_context : sig ... end

    This module is used to implement Context_free.map_top_down

    val filter_by_context : 'a Context.t -> t list -> 'a For_context.t list

    Given a context and a list of extension expander, returns all the ones that are for this context.

    module Expert : sig ... end

    This module allows to declare extensions that do not produce a value of the context type. This is typically useful for extensions point that depends on more things from the context than the path and location.

    val check_unused : Ast_traverse.iter
    val collect_unhandled_extension_errors : - Location.Error.t list Ast_traverse.fold
    module V2 : sig ... end
    module V3 : sig ... end
    \ No newline at end of file + Location.Error.t list Ast_traverse.fold
    module V2 : sig ... end
    module V3 : sig ... end
    diff --git a/ppxlib/Ppxlib/Keyword/index.html b/ppxlib/Ppxlib/Keyword/index.html index a51b0ab..b6e9fb3 100644 --- a/ppxlib/Ppxlib/Keyword/index.html +++ b/ppxlib/Ppxlib/Keyword/index.html @@ -1,2 +1,2 @@ -Keyword (ppxlib.Ppxlib.Keyword)

    Module Ppxlib.Keyword

    Small module to check if a string is an OCaml keyword.

    val is_keyword : string -> bool

    Check if a string is an OCaml keyword.

    \ No newline at end of file +Keyword (ppxlib.Ppxlib.Keyword)

    Module Ppxlib.Keyword

    Small module to check if a string is an OCaml keyword.

    val is_keyword : string -> bool

    Check if a string is an OCaml keyword.

    diff --git a/ppxlib/Ppxlib/Loc/index.html b/ppxlib/Ppxlib/Loc/index.html index 8065e6d..c4e8e27 100644 --- a/ppxlib/Ppxlib/Loc/index.html +++ b/ppxlib/Ppxlib/Loc/index.html @@ -1,2 +1,2 @@ -Loc (ppxlib.Ppxlib.Loc)

    Module Ppxlib.Loc

    Located items

    type 'a t = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    val txt : 'a t -> 'a
    val loc : _ t -> Location.t
    val make : loc:Location.t -> 'a -> 'a t
    val map : 'a t -> f:('a -> 'b) -> 'b t
    \ No newline at end of file +Loc (ppxlib.Ppxlib.Loc)

    Module Ppxlib.Loc

    Located items

    type 'a t = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : Location.t;
    }
    val txt : 'a t -> 'a
    val loc : _ t -> Location.t
    val make : loc:Location.t -> 'a -> 'a t
    val map : 'a t -> f:('a -> 'b) -> 'b t
    diff --git a/ppxlib/Ppxlib/Location/Error/index.html b/ppxlib/Ppxlib/Location/Error/index.html index 2b1e8f4..ee28e27 100644 --- a/ppxlib/Ppxlib/Location/Error/index.html +++ b/ppxlib/Ppxlib/Location/Error/index.html @@ -1,4 +1,4 @@ -Error (ppxlib.Ppxlib.Location.Error)

    Module Location.Error

    For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

    type t
    val make : loc:t -> string -> sub:(t * string) list -> t
    val createf : loc:t -> ('a, Stdlib.Format.formatter, unit, t) format4 -> 'a
    val message : t -> string
    val set_message : t -> string -> t
    val register_error_of_exn : (exn -> t option) -> unit

    Register an exception handler. Exception registered this way will be properly displayed by report_exception.

    val of_exn : exn -> t option
    val to_extension : +Error (ppxlib.Ppxlib.Location.Error)

    Module Location.Error

    For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

    type t
    val make : loc:t -> string -> sub:(t * string) list -> t
    val createf : loc:t -> ('a, Stdlib.Format.formatter, unit, t) format4 -> 'a
    val message : t -> string
    val set_message : t -> string -> t
    val register_error_of_exn : (exn -> t option) -> unit

    Register an exception handler. Exception registered this way will be properly displayed by report_exception.

    val of_exn : exn -> t option
    val to_extension : t -> - string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload

    Convert an error to an extension point. The compiler recognizes this and displays the error properly.

    val raise : t -> 'a

    Raise a compiler Parsing.Location.Error exception. The composition of Location.Error.createf with Location.Error.raise is the same as Location.raise_errorf.

    val update_loc : t -> t -> t

    Update where the error is located. The old location will be overwritten.

    val get_location : t -> t

    Find out where the error is located.

    \ No newline at end of file + string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload

    Convert an error to an extension point. The compiler recognizes this and displays the error properly.

    val raise : t -> 'a

    Raise a compiler Parsing.Location.Error exception. The composition of Location.Error.createf with Location.Error.raise is the same as Location.raise_errorf.

    val update_loc : t -> t -> t

    Update where the error is located. The old location will be overwritten.

    val get_location : t -> t

    Find out where the error is located.

    diff --git a/ppxlib/Ppxlib/Location/index.html b/ppxlib/Ppxlib/Location/index.html index 0fb0e0c..7411cd4 100644 --- a/ppxlib/Ppxlib/Location/index.html +++ b/ppxlib/Ppxlib/Location/index.html @@ -1,18 +1,18 @@ -Location (ppxlib.Ppxlib.Location)

    Module Ppxlib.Location

    Overrides the Location module of OCaml

    There are less functions in this module. However the API should be more stable than the Location module of OCaml.

    For a detailled presentation of good practices regarding locations, refer to the section in the manual.

    type t = Astlib.Location.t = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }
    val in_file : string -> t

    Return an empty ghost range located in a given file.

    val set_filename : t -> string -> t

    Set the pos_fname both in loc_start and loc_end. Leave the rest as is.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    val init : Stdlib.Lexing.lexbuf -> string -> unit

    Set the file name and line number of the lexbuf to be the start of the named file.

    val raise_errorf : - ?loc:t -> +Location (ppxlib.Ppxlib.Location)

    Module Ppxlib.Location

    Overrides the Location module of OCaml

    There are less functions in this module. However the API should be more stable than the Location module of OCaml.

    For a detailled presentation of good practices regarding locations, refer to the section in the manual.

    type t = Astlib.Location.t = {
    1. loc_start : Stdlib.Lexing.position;
    2. loc_end : Stdlib.Lexing.position;
    3. loc_ghost : bool;
    }
    val in_file : string -> t

    Return an empty ghost range located in a given file.

    val set_filename : t -> string -> t

    Set the pos_fname both in loc_start and loc_end. Leave the rest as is.

    val none : t

    An arbitrary value of type t; describes an empty ghost range.

    val init : Stdlib.Lexing.lexbuf -> string -> unit

    Set the file name and line number of the lexbuf to be the start of the named file.

    val raise_errorf : + ?loc:t -> ('a, Stdlib.Format.formatter, unit, 'b) format4 -> - 'a

    Raise a located error. Should be avoided as much as possible, in favor of error_extensionf. See the relevant part of the tutorial.

    val of_lexbuf : Stdlib.Lexing.lexbuf -> t

    Return the location corresponding to the last matched regular expression

    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Report an exception on the given formatter

    val print : Stdlib.Format.formatter -> t -> unit

    Prints File "...", line ..., characters ...-...:

    type nonrec 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : t;
    }
    val min_pos : + 'a

    Raise a located error. Should be avoided as much as possible, in favor of error_extensionf. See the relevant part of the tutorial.

    val of_lexbuf : Stdlib.Lexing.lexbuf -> t

    Return the location corresponding to the last matched regular expression

    val report_exception : Stdlib.Format.formatter -> exn -> unit

    Report an exception on the given formatter

    val print : Stdlib.Format.formatter -> t -> unit

    Prints File "...", line ..., characters ...-...:

    type nonrec 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : t;
    }
    val compare : t -> t -> int
    module Error : sig ... end
    val error_extensionf : - loc:t -> + loc:t -> ('a, Stdlib.Format.formatter, unit, string Astlib.Location.loc * Astlib.Ast_500.Parsetree.payload) format4 -> - 'a

    Returns an error extension node. When encountered in the AST, the compiler recognizes it and displays the error properly.

    For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

    exception Error of Error.t
    \ No newline at end of file + 'a

    Returns an error extension node. When encountered in the AST, the compiler recognizes it and displays the error properly.

    For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

    exception Error of Error.t
    diff --git a/ppxlib/Ppxlib/Longident/Map/index.html b/ppxlib/Ppxlib/Longident/Map/index.html index 970ef52..825e373 100644 --- a/ppxlib/Ppxlib/Longident/Map/index.html +++ b/ppxlib/Ppxlib/Longident/Map/index.html @@ -1,8 +1,8 @@ -Map (ppxlib.Ppxlib.Longident.Map)

    Module Longident.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : +Map (ppxlib.Ppxlib.Longident.Map)

    Module Longident.Map

    Maps

    type key = t

    The type of the map keys.

    type !+'a t

    The type of maps from type key to type 'a.

    val empty : 'a t

    The empty map.

    val add : key -> 'a -> 'a t -> 'a t

    add key data m returns a map containing the same bindings as m, plus a binding of key to data. If key was already bound in m to a value that is physically equal to data, m is returned unchanged (the result of the function is then physically equal to m). Otherwise, the previous binding of key in m disappears.

    • before 4.03

      Physical equality was not ensured.

    val add_to_list : key -> 'a -> 'a list t -> 'a list t

    add_to_list key data m is m with key mapped to l such that l is data :: Map.find key m if key was bound in m and [v] otherwise.

    • since 5.1
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t

    update key f m returns a map containing the same bindings as m, except for the binding of key. Depending on the value of y where y is f (find_opt key m), the binding of key is added, removed or updated. If y is None, the binding is removed if it exists; otherwise, if y is Some z then key is associated to z in the resulting map. If key was already bound in m to a value that is physically equal to z, m is returned unchanged (the result of the function is then physically equal to m).

    • since 4.06
    val singleton : key -> 'a -> 'a t

    singleton x y returns the one-element map that contains a binding y for x.

    • since 3.12
    val remove : key -> 'a t -> 'a t

    remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map. If x was not in m, m is returned unchanged (the result of the function is then physically equal to m).

    • before 4.03

      Physical equality was not ensured.

    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
    +  'c t

    merge f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. The presence of each such binding, and the corresponding value, is determined with the function f. In terms of the find_opt operation, we have find_opt x (merge f m1 m2) = f x (find_opt x m1) (find_opt x m2) for any key x, provided that f x None None = None.

    • since 3.12
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t

    union f m1 m2 computes a map whose keys are a subset of the keys of m1 and of m2. When the same binding is defined in both arguments, the function f is used to combine them. This is a special case of merge: union f m1 m2 is equivalent to merge f' m1 m2, where

    • f' _key None None = None
    • f' _key (Some v) None = Some v
    • f' _key None (Some v) = Some v
    • f' key (Some v1) (Some v2) = f key v1 v2
    • since 4.03
    val cardinal : 'a t -> int

    Return the number of bindings of a map.

    • since 3.12

    Bindings

    val bindings : 'a t -> (key * 'a) list

    Return the list of all bindings of the given map. The returned list is sorted in increasing order of keys with respect to the ordering Ord.compare, where Ord is the argument given to Map.Make.

    • since 3.12
    val min_binding : 'a t -> key * 'a

    Return the binding with the smallest key in a given map (with respect to the Ord.compare ordering), or raise Not_found if the map is empty.

    • since 3.12
    val min_binding_opt : 'a t -> (key * 'a) option

    Return the binding with the smallest key in the given map (with respect to the Ord.compare ordering), or None if the map is empty.

    • since 4.05
    val max_binding : 'a t -> key * 'a

    Same as min_binding, but returns the binding with the largest key in the given map.

    • since 3.12
    val max_binding_opt : 'a t -> (key * 'a) option

    Same as min_binding_opt, but returns the binding with the largest key in the given map.

    • since 4.05
    val choose : 'a t -> key * 'a

    Return one binding of the given map, or raise Not_found if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 3.12
    val choose_opt : 'a t -> (key * 'a) option

    Return one binding of the given map, or None if the map is empty. Which binding is chosen is unspecified, but equal bindings will be chosen for equal maps.

    • since 4.05

    Searching

    val find : key -> 'a t -> 'a

    find x m returns the current value of x in m, or raises Not_found if no binding for x exists.

    val find_opt : key -> 'a t -> 'a option

    find_opt x m returns Some v if the current value of x in m is v, or None if no binding for x exists.

    • since 4.05
    val find_first : (key -> bool) -> 'a t -> key * 'a

    find_first f m, where f is a monotonically increasing function, returns the binding of m with the lowest key k such that f k, or raises Not_found if no such key exists.

    For example, find_first (fun k -> Ord.compare k x >= 0) m will return the first binding k, v of m where Ord.compare k x >= 0 (intuitively: k >= x), or raise Not_found if x is greater than any element of m.

    • since 4.05
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_first_opt f m, where f is a monotonically increasing function, returns an option containing the binding of m with the lowest key k such that f k, or None if no such key exists.

    • since 4.05
    val find_last : (key -> bool) -> 'a t -> key * 'a

    find_last f m, where f is a monotonically decreasing function, returns the binding of m with the highest key k such that f k, or raises Not_found if no such key exists.

    • since 4.05
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option

    find_last_opt f m, where f is a monotonically decreasing function, returns an option containing the binding of m with the highest key k such that f k, or None if no such key exists.

    • since 4.05

    Traversing

    val iter : (key -> 'a -> unit) -> 'a t -> unit

    iter f m applies f to all bindings in map m. f receives the key as first argument, and the associated value as second argument. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc

    fold f m init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in m (in increasing order), and d1 ... dN are the associated data.

    Transforming

    val map : ('a -> 'b) -> 'a t -> 'b t

    map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a. The bindings are passed to f in increasing order with respect to the ordering over the type of the keys.

    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t

    Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

    val filter : (key -> 'a -> bool) -> 'a t -> 'a t

    filter f m returns the map with all the bindings in m that satisfy predicate p. If every binding in m satisfies f, m is returned unchanged (the result of the function is then physically equal to m)

    • since 3.12
    • before 4.03

      Physical equality was not ensured.

    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t

    filter_map f m applies the function f to every binding of m, and builds a map from the results. For each binding (k, v) in the input map:

    • if f k v is None then k is not in the result,
    • if f k v is Some v' then the binding (k, v') is in the output map.

    For example, the following function on maps whose values are lists

    filter_map
       (fun _k li -> match li with [] -> None | _::tl -> Some tl)
    -  m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    \ No newline at end of file + m

    drops all bindings of m whose value is an empty list, and pops the first element of each value that is non-empty.

    • since 4.11
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t

    partition f m returns a pair of maps (m1, m2), where m1 contains all the bindings of m that satisfy the predicate f, and m2 is the map with all the bindings of m that do not satisfy f.

    • since 3.12
    val split : key -> 'a t -> 'a t * 'a option * 'a t

    split x m returns a triple (l, data, r), where l is the map with all the bindings of m whose key is strictly less than x; r is the map with all the bindings of m whose key is strictly greater than x; data is None if m contains no binding for x, or Some v if m binds v to x.

    • since 3.12

    Predicates and comparisons

    val is_empty : 'a t -> bool

    Test whether a map is empty or not.

    val mem : key -> 'a t -> bool

    mem x m returns true if m contains a binding for x, and false otherwise.

    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool

    equal cmp m1 m2 tests whether the maps m1 and m2 are equal, that is, contain equal keys and associate them with equal data. cmp is the equality predicate used to compare the data associated with the keys.

    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int

    Total ordering between maps. The first argument is a total ordering used to compare data associated with equal keys in the two maps.

    val for_all : (key -> 'a -> bool) -> 'a t -> bool

    for_all f m checks if all the bindings of the map satisfy the predicate f.

    • since 3.12
    val exists : (key -> 'a -> bool) -> 'a t -> bool

    exists f m checks if at least one binding of the map satisfies the predicate f.

    • since 3.12

    Converting

    val to_list : 'a t -> (key * 'a) list

    to_list m is bindings m.

    • since 5.1
    val of_list : (key * 'a) list -> 'a t

    of_list bs adds the bindings of bs to the empty map, in list order (if a key is bound twice in bs the last one takes over).

    • since 5.1
    val to_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in ascending order of keys

    • since 4.07
    val to_rev_seq : 'a t -> (key * 'a) Seq.t

    Iterate on the whole map, in descending order of keys

    • since 4.12
    val to_seq_from : key -> 'a t -> (key * 'a) Seq.t

    to_seq_from k m iterates on a subset of the bindings of m, in ascending order of keys, from key k or above.

    • since 4.07
    val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t

    Add the given bindings to the map, in order.

    • since 4.07
    val of_seq : (key * 'a) Seq.t -> 'a t

    Build a map from the given bindings

    • since 4.07
    diff --git a/ppxlib/Ppxlib/Longident/Set/index.html b/ppxlib/Ppxlib/Longident/Set/index.html index bd4d13b..31384b7 100644 --- a/ppxlib/Ppxlib/Longident/Set/index.html +++ b/ppxlib/Ppxlib/Longident/Set/index.html @@ -1,3 +1,2 @@ -Set (ppxlib.Ppxlib.Longident.Set)

    Module Longident.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f - aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    \ No newline at end of file +Set (ppxlib.Ppxlib.Longident.Set)

    Module Longident.Set

    Sets

    type elt = t

    The type of the set elements.

    type t

    The type of sets.

    val empty : t

    The empty set.

    val add : elt -> t -> t

    add x s returns a set containing all elements of s, plus x. If x was already in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val singleton : elt -> t

    singleton x returns the one-element set containing only x.

    val remove : elt -> t -> t

    remove x s returns a set containing all elements of s, except x. If x was not in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val union : t -> t -> t

    Set union.

    val inter : t -> t -> t

    Set intersection.

    val disjoint : t -> t -> bool

    Test if two sets are disjoint.

    • since 4.08
    val diff : t -> t -> t

    Set difference: diff s1 s2 contains the elements of s1 that are not in s2.

    val cardinal : t -> int

    Return the number of elements of a set.

    Elements

    val elements : t -> elt list

    Return the list of all elements of the given set. The returned list is sorted in increasing order with respect to the ordering Ord.compare, where Ord is the argument given to Set.Make.

    val min_elt : t -> elt

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or raise Not_found if the set is empty.

    val min_elt_opt : t -> elt option

    Return the smallest element of the given set (with respect to the Ord.compare ordering), or None if the set is empty.

    • since 4.05
    val max_elt : t -> elt

    Same as min_elt, but returns the largest element of the given set.

    val max_elt_opt : t -> elt option

    Same as min_elt_opt, but returns the largest element of the given set.

    • since 4.05
    val choose : t -> elt

    Return one element of the given set, or raise Not_found if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    val choose_opt : t -> elt option

    Return one element of the given set, or None if the set is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal sets.

    • since 4.05

    Searching

    val find : elt -> t -> elt

    find x s returns the element of s equal to x (according to Ord.compare), or raise Not_found if no such element exists.

    • since 4.01
    val find_opt : elt -> t -> elt option

    find_opt x s returns the element of s equal to x (according to Ord.compare), or None if no such element exists.

    • since 4.05
    val find_first : (elt -> bool) -> t -> elt

    find_first f s, where f is a monotonically increasing function, returns the lowest element e of s such that f e, or raises Not_found if no such element exists.

    For example, find_first (fun e -> Ord.compare e x >= 0) s will return the first element e of s where Ord.compare e x >= 0 (intuitively: e >= x), or raise Not_found if x is greater than any element of s.

    • since 4.05
    val find_first_opt : (elt -> bool) -> t -> elt option

    find_first_opt f s, where f is a monotonically increasing function, returns an option containing the lowest element e of s such that f e, or None if no such element exists.

    • since 4.05
    val find_last : (elt -> bool) -> t -> elt

    find_last f s, where f is a monotonically decreasing function, returns the highest element e of s such that f e, or raises Not_found if no such element exists.

    • since 4.05
    val find_last_opt : (elt -> bool) -> t -> elt option

    find_last_opt f s, where f is a monotonically decreasing function, returns an option containing the highest element e of s such that f e, or None if no such element exists.

    • since 4.05

    Traversing

    val iter : (elt -> unit) -> t -> unit

    iter f s applies f in turn to all elements of s. The elements of s are presented to f in increasing order with respect to the ordering over the type of the elements.

    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc

    fold f s init computes (f xN ... (f x2 (f x1 init))...), where x1 ... xN are the elements of s, in increasing order.

    Transforming

    val map : (elt -> elt) -> t -> t

    map f s is the set whose elements are f a0,f a1... f aN, where a0,a1...aN are the elements of s.

    The elements are passed to f in increasing order with respect to the ordering over the type of the elements.

    If no element of s is changed by f, s is returned unchanged. (If each output of f is physically equal to its input, the returned set is physically equal to s.)

    • since 4.04
    val filter : (elt -> bool) -> t -> t

    filter f s returns the set of all elements in s that satisfy predicate f. If f satisfies every element in s, s is returned unchanged (the result of the function is then physically equal to s).

    • before 4.03

      Physical equality was not ensured.

    val filter_map : (elt -> elt option) -> t -> t

    filter_map f s returns the set of all v such that f x = Some v for some element x of s.

    For example,

    filter_map (fun n -> if n mod 2 = 0 then Some (n / 2) else None) s

    is the set of halves of the even elements of s.

    If no element of s is changed or dropped by f (if f x = Some x for each element x), then s is returned unchanged: the result of the function is then physically equal to s.

    • since 4.11
    val partition : (elt -> bool) -> t -> t * t

    partition f s returns a pair of sets (s1, s2), where s1 is the set of all the elements of s that satisfy the predicate f, and s2 is the set of all the elements of s that do not satisfy f.

    val split : elt -> t -> t * bool * t

    split x s returns a triple (l, present, r), where l is the set of elements of s that are strictly less than x; r is the set of elements of s that are strictly greater than x; present is false if s contains no element equal to x, or true if s contains an element equal to x.

    Predicates and comparisons

    val is_empty : t -> bool

    Test whether a set is empty or not.

    val mem : elt -> t -> bool

    mem x s tests whether x belongs to the set s.

    val equal : t -> t -> bool

    equal s1 s2 tests whether the sets s1 and s2 are equal, that is, contain equal elements.

    val compare : t -> t -> int

    Total ordering between sets. Can be used as the ordering function for doing sets of sets.

    val subset : t -> t -> bool

    subset s1 s2 tests whether the set s1 is a subset of the set s2.

    val for_all : (elt -> bool) -> t -> bool

    for_all f s checks if all elements of the set satisfy the predicate f.

    val exists : (elt -> bool) -> t -> bool

    exists f s checks if at least one element of the set satisfies the predicate f.

    Converting

    val to_list : t -> elt list

    to_list s is elements s.

    • since 5.1
    val of_list : elt list -> t

    of_list l creates a set from a list of elements. This is usually more efficient than folding add over the list, except perhaps for lists with many duplicated elements.

    • since 4.02
    val to_seq_from : elt -> t -> elt Seq.t

    to_seq_from x s iterates on a subset of the elements of s in ascending order, from x or above.

    • since 4.07
    val to_seq : t -> elt Seq.t

    Iterate on the whole set, in ascending order

    • since 4.07
    val to_rev_seq : t -> elt Seq.t

    Iterate on the whole set, in descending order

    • since 4.12
    val add_seq : elt Seq.t -> t -> t

    Add the given elements to the set, in order.

    • since 4.07
    val of_seq : elt Seq.t -> t

    Build a set from the given bindings

    • since 4.07
    diff --git a/ppxlib/Ppxlib/Longident/index.html b/ppxlib/Ppxlib/Longident/index.html index 6d066cf..0153cbd 100644 --- a/ppxlib/Ppxlib/Longident/index.html +++ b/ppxlib/Ppxlib/Longident/index.html @@ -1,2 +1,2 @@ -Longident (ppxlib.Ppxlib.Longident)

    Module Ppxlib.Longident

    Overrides the Longident module of OCaml

    type t = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t
    val compare : t -> t -> int
    val sexp_of_t : t -> Stdppx.Sexp.t
    val flatten_exn : t -> string list
    val last_exn : t -> string
    val parse : string -> t

    Parses the given string as a longident, properly handling infix operators which may contain '.'. Note that it does not parse Lapply _ longidents and will raise Invalid_argument _ if passed values such as "A(B)".

    val name : t -> string
    module Map : Map.S with type key = t
    module Set : Set.S with type elt = t
    \ No newline at end of file +Longident (ppxlib.Ppxlib.Longident)

    Module Ppxlib.Longident

    Overrides the Longident module of OCaml

    type t = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of t * string
    3. | Lapply of t * t
    val compare : t -> t -> int
    val sexp_of_t : t -> Stdppx.Sexp.t
    val flatten_exn : t -> string list
    val last_exn : t -> string
    val parse : string -> t

    Parses the given string as a longident, properly handling infix operators which may contain '.'. Note that it does not parse Lapply _ longidents and will raise Invalid_argument _ if passed values such as "A(B)".

    val name : t -> string
    module Map : Map.S with type key = t
    module Set : Set.S with type elt = t
    diff --git a/ppxlib/Ppxlib/Merlin_helpers/index.html b/ppxlib/Ppxlib/Merlin_helpers/index.html index 4a4b3c4..1232831 100644 --- a/ppxlib/Ppxlib/Merlin_helpers/index.html +++ b/ppxlib/Ppxlib/Merlin_helpers/index.html @@ -1,5 +1,5 @@ -Merlin_helpers (ppxlib.Ppxlib.Merlin_helpers)

    Module Ppxlib.Merlin_helpers

    Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

    More information can be found in the section of the manual about locations.

    Annotations merlin understand

    Adding this [@merlin.hide] attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.

    Adding this [@merlin.focus] attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.

    Helpers

    The following functions add the corresponding attribute (defined above) to specific pieces of AST.

    val hide_pattern : +Merlin_helpers (ppxlib.Ppxlib.Merlin_helpers)

    Module Ppxlib.Merlin_helpers

    Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

    More information can be found in the section of the manual about locations.

    Annotations merlin understand

    Adding this [@merlin.hide] attribute on a piece of AST "hides" it from merlin: it tells merlin not to consider that branch if another piece of AST with the same location exist.

    Adding this [@merlin.focus] attribute on a piece of AST tells merlin to prefer it to any other piece of AST when several have the same location.

    Helpers

    The following functions add the corresponding attribute (defined above) to specific pieces of AST.

    \ No newline at end of file + Astlib.Ast_500.Parsetree.expression
    diff --git a/ppxlib/Ppxlib/Pp_ast/Config/index.html b/ppxlib/Ppxlib/Pp_ast/Config/index.html index a7a60df..ccdd7e5 100644 --- a/ppxlib/Ppxlib/Pp_ast/Config/index.html +++ b/ppxlib/Ppxlib/Pp_ast/Config/index.html @@ -1,7 +1,7 @@ -Config (ppxlib.Ppxlib.Pp_ast.Config)

    Module Pp_ast.Config

    type t

    Type for AST pretty-printing config

    val make : - ?show_attrs:bool -> - ?show_locs:bool -> - ?loc_mode:[ `Short | `Full ] -> +Config (ppxlib.Ppxlib.Pp_ast.Config)

    Module Pp_ast.Config

    type t

    Type for AST pretty-printing config

    val make : + ?show_attrs:bool -> + ?show_locs:bool -> + ?loc_mode:[ `Short | `Full ] -> unit -> - t

    Create a custom pretty-printing config. Default values are the ones that are used when no configuration is passed to the pretty-printers defined in Pp_ast.

    • parameter ?show_attrs

      controls whether attributes are shown or hidden. Defaults to false.

    • parameter ?show_loc

      controls whether locations are shown or hidden. Defaults to false.

    • parameter ?loc_mode

      controls how locations are shown if they are shown at all. Defaults to `Short.

      • When set to `Short, locations are displayed as "l1c6..l2c2" for multiline locations and as "l1c6..12" for single line locations. Ghost locations are suffixed with a "(g)".
      • When set to `Full, locations are displayed as any other record would be.
    \ No newline at end of file + t

    Create a custom pretty-printing config. Default values are the ones that are used when no configuration is passed to the pretty-printers defined in Pp_ast.

    • parameter ?show_attrs

      controls whether attributes are shown or hidden. Defaults to false.

    • parameter ?show_loc

      controls whether locations are shown or hidden. Defaults to false.

    • parameter ?loc_mode

      controls how locations are shown if they are shown at all. Defaults to `Short.

      • When set to `Short, locations are displayed as "l1c6..l2c2" for multiline locations and as "l1c6..12" for single line locations. Ghost locations are suffixed with a "(g)".
      • When set to `Full, locations are displayed as any other record would be.
    diff --git a/ppxlib/Ppxlib/Pp_ast/Default/index.html b/ppxlib/Ppxlib/Pp_ast/Default/index.html index 41a1f82..dbb21c4 100644 --- a/ppxlib/Ppxlib/Pp_ast/Default/index.html +++ b/ppxlib/Ppxlib/Pp_ast/Default/index.html @@ -1,2 +1,2 @@ -Default (ppxlib.Ppxlib.Pp_ast.Default)

    Module Pp_ast.Default

    \ No newline at end of file +Default (ppxlib.Ppxlib.Pp_ast.Default)

    Module Pp_ast.Default

    diff --git a/ppxlib/Ppxlib/Pp_ast/Make/argument-1-Conf/index.html b/ppxlib/Ppxlib/Pp_ast/Make/argument-1-Conf/index.html index 333f2fa..4b98daf 100644 --- a/ppxlib/Ppxlib/Pp_ast/Make/argument-1-Conf/index.html +++ b/ppxlib/Ppxlib/Pp_ast/Make/argument-1-Conf/index.html @@ -1,2 +1,2 @@ -Conf (ppxlib.Ppxlib.Pp_ast.Make.Conf)

    Parameter Make.Conf

    val config : Config.t
    \ No newline at end of file +Conf (ppxlib.Ppxlib.Pp_ast.Make.Conf)

    Parameter Make.Conf

    val config : Config.t
    diff --git a/ppxlib/Ppxlib/Pp_ast/Make/index.html b/ppxlib/Ppxlib/Pp_ast/Make/index.html index 9ed35ca..11bef5d 100644 --- a/ppxlib/Ppxlib/Pp_ast/Make/index.html +++ b/ppxlib/Ppxlib/Pp_ast/Make/index.html @@ -1,2 +1,2 @@ -Make (ppxlib.Ppxlib.Pp_ast.Make)

    Module Pp_ast.Make

    \ No newline at end of file +Make (ppxlib.Ppxlib.Pp_ast.Make)

    Module Pp_ast.Make

    diff --git a/ppxlib/Ppxlib/Pp_ast/index.html b/ppxlib/Ppxlib/Pp_ast/index.html index e6ec3ee..07bf3ad 100644 --- a/ppxlib/Ppxlib/Pp_ast/index.html +++ b/ppxlib/Ppxlib/Pp_ast/index.html @@ -1,7 +1,7 @@ -Pp_ast (ppxlib.Ppxlib.Pp_ast)

    Module Ppxlib.Pp_ast

    This module implements pretty printers for the OCaml AST's version used by ppxlib.

    Those pretty printers show the AST as its OCaml representation and do not pretty print the corresponding source code. For printing ASTs as source code use the Ppxlib.Pprintast module instead.

    For example, calling Pp_ast.expression Format.std_formatter [%expr x + 2] will print:

       Pexp_apply
    -     ( Pexp_ident (Lident "+")
    -     , [ ( Nolabel, Pexp_ident (Lident "x"))
    -       ; ( Nolabel, Pexp_constant (Pconst_integer ( "2", None)))
    -       ]
    -     )

    To keep the output easily readable, records with _desc fields such as Ppxlib.Ast.expression or Ppxlib.Ast.pattern are not printed as such and only the value of the corresponding _desc field is printed instead. This prevents AST nodes metadata, such as locations or attributes, from polluting the output, keeping it relatively concise and clean. The same goes for Location.loc values which are printed as the value of their txt field.

    Location.t and Ppxlib.Ast.attributes are not displayed by default even outside of the records mentioned above.

    The Config module below allows to override part or all of this behaviour. When configured to display locations or attributes, the entire record will be displayed, not only its _desc field.

    module Config : sig ... end
    type 'a pp = Stdlib.Format.formatter -> 'a -> unit
    type 'a configurable = ?config:Config.t -> 'a pp
    type 'a configured = 'a pp
    module type S = sig ... end
    module type Conf = sig ... end
    module type Configured = S with type 'a printer = 'a configured
    module type Configurable = S with type 'a printer = 'a configurable
    module Make (Conf : Conf) : Configured
    val make : Config.t -> (module Configured)
    \ No newline at end of file +Pp_ast (ppxlib.Ppxlib.Pp_ast)

    Module Ppxlib.Pp_ast

    This module implements pretty printers for the OCaml AST's version used by ppxlib.

    Those pretty printers show the AST as its OCaml representation and do not pretty print the corresponding source code. For printing ASTs as source code use the Ppxlib.Pprintast module instead.

    For example, calling Pp_ast.expression Format.std_formatter [%expr x + 2] will print:

    Pexp_apply
    +  ( Pexp_ident (Lident "+")
    +  , [ ( Nolabel, Pexp_ident (Lident "x"))
    +    ; ( Nolabel, Pexp_constant (Pconst_integer ( "2", None)))
    +    ]
    +  )

    To keep the output easily readable, records with _desc fields such as Ppxlib.Ast.expression or Ppxlib.Ast.pattern are not printed as such and only the value of the corresponding _desc field is printed instead. This prevents AST nodes metadata, such as locations or attributes, from polluting the output, keeping it relatively concise and clean. The same goes for Location.loc values which are printed as the value of their txt field.

    Location.t and Ppxlib.Ast.attributes are not displayed by default even outside of the records mentioned above.

    The Config module below allows to override part or all of this behaviour. When configured to display locations or attributes, the entire record will be displayed, not only its _desc field.

    module Config : sig ... end
    type 'a pp = Stdlib.Format.formatter -> 'a -> unit
    type 'a configurable = ?config:Config.t -> 'a pp
    type 'a configured = 'a pp
    module type S = sig ... end
    module type Conf = sig ... end
    module type Configured = S with type 'a printer = 'a configured
    module type Configurable = S with type 'a printer = 'a configurable
    module Make (Conf : Conf) : Configured
    val make : Config.t -> (module Configured)
    diff --git a/ppxlib/Ppxlib/Pp_ast/module-type-Conf/index.html b/ppxlib/Ppxlib/Pp_ast/module-type-Conf/index.html index e84ef0d..7073f05 100644 --- a/ppxlib/Ppxlib/Pp_ast/module-type-Conf/index.html +++ b/ppxlib/Ppxlib/Pp_ast/module-type-Conf/index.html @@ -1,2 +1,2 @@ -Conf (ppxlib.Ppxlib.Pp_ast.Conf)

    Module type Pp_ast.Conf

    val config : Config.t
    \ No newline at end of file +Conf (ppxlib.Ppxlib.Pp_ast.Conf)

    Module type Pp_ast.Conf

    val config : Config.t
    diff --git a/ppxlib/Ppxlib/Pp_ast/module-type-Configurable/index.html b/ppxlib/Ppxlib/Pp_ast/module-type-Configurable/index.html index f43aebe..c18772f 100644 --- a/ppxlib/Ppxlib/Pp_ast/module-type-Configurable/index.html +++ b/ppxlib/Ppxlib/Pp_ast/module-type-Configurable/index.html @@ -1,2 +1,2 @@ -Configurable (ppxlib.Ppxlib.Pp_ast.Configurable)

    Module type Pp_ast.Configurable

    \ No newline at end of file +Configurable (ppxlib.Ppxlib.Pp_ast.Configurable)

    Module type Pp_ast.Configurable

    diff --git a/ppxlib/Ppxlib/Pp_ast/module-type-Configured/index.html b/ppxlib/Ppxlib/Pp_ast/module-type-Configured/index.html index 0d16795..bb2cc24 100644 --- a/ppxlib/Ppxlib/Pp_ast/module-type-Configured/index.html +++ b/ppxlib/Ppxlib/Pp_ast/module-type-Configured/index.html @@ -1,2 +1,2 @@ -Configured (ppxlib.Ppxlib.Pp_ast.Configured)

    Module type Pp_ast.Configured

    \ No newline at end of file +Configured (ppxlib.Ppxlib.Pp_ast.Configured)

    Module type Pp_ast.Configured

    diff --git a/ppxlib/Ppxlib/Pp_ast/module-type-S/index.html b/ppxlib/Ppxlib/Pp_ast/module-type-S/index.html index 86254ae..8bdebc9 100644 --- a/ppxlib/Ppxlib/Pp_ast/module-type-S/index.html +++ b/ppxlib/Ppxlib/Pp_ast/module-type-S/index.html @@ -1,2 +1,2 @@ -S (ppxlib.Ppxlib.Pp_ast.S)

    Module type Pp_ast.S

    \ No newline at end of file +S (ppxlib.Ppxlib.Pp_ast.S)

    Module type Pp_ast.S

    diff --git a/ppxlib/Ppxlib/Reserved_namespaces/index.html b/ppxlib/Ppxlib/Reserved_namespaces/index.html index 6547563..ef47dc0 100644 --- a/ppxlib/Ppxlib/Reserved_namespaces/index.html +++ b/ppxlib/Ppxlib/Reserved_namespaces/index.html @@ -1,2 +1,2 @@ -Reserved_namespaces (ppxlib.Ppxlib.Reserved_namespaces)

    Module Ppxlib.Reserved_namespaces

    Small module to reserve namespaces in attribute names.

    val reserve : string -> unit

    reserve "foo" has two implications:

    • one can't then declare an attribute inside this namespace
    • attributes within this namespace won't be reported by check_unused

    This is here to insure that the rewriter cohabits well with other rewriter or tools (e.g. merlin) which might leave attribute on the AST.

    N.B. the following namespaces are reserved by default: merlin, reason, refmt ns, res, metaocaml, ocamlformat and ppxlib.

    val is_in_reserved_namespaces : string -> bool
    \ No newline at end of file +Reserved_namespaces (ppxlib.Ppxlib.Reserved_namespaces)

    Module Ppxlib.Reserved_namespaces

    Small module to reserve namespaces in attribute names.

    val reserve : string -> unit

    reserve "foo" has two implications:

    • one can't then declare an attribute inside this namespace
    • attributes within this namespace won't be reported by check_unused

    This is here to insure that the rewriter cohabits well with other rewriter or tools (e.g. merlin) which might leave attribute on the AST.

    N.B. the following namespaces are reserved by default: merlin, reason, refmt ns, res, metaocaml, ocamlformat and ppxlib.

    val is_in_reserved_namespaces : string -> bool
    diff --git a/ppxlib/Ppxlib/Spellcheck/index.html b/ppxlib/Ppxlib/Spellcheck/index.html index 872ffbb..b4fbcd7 100644 --- a/ppxlib/Ppxlib/Spellcheck/index.html +++ b/ppxlib/Ppxlib/Spellcheck/index.html @@ -1,2 +1,2 @@ -Spellcheck (ppxlib.Ppxlib.Spellcheck)

    Module Ppxlib.Spellcheck

    Helpers to provide hints to PPX users for typos or spellchecks.

    exception Cutoff_met
    val levenshtein_distance : string -> string -> int -> int option
    val spellcheck : string list -> string -> string option
    \ No newline at end of file +Spellcheck (ppxlib.Ppxlib.Spellcheck)

    Module Ppxlib.Spellcheck

    Helpers to provide hints to PPX users for typos or spellchecks.

    exception Cutoff_met
    val levenshtein_distance : string -> string -> int -> int option
    val spellcheck : string list -> string -> string option
    diff --git a/ppxlib/Ppxlib/With_errors/index.html b/ppxlib/Ppxlib/With_errors/index.html index 391a978..4a34915 100644 --- a/ppxlib/Ppxlib/With_errors/index.html +++ b/ppxlib/Ppxlib/With_errors/index.html @@ -1,5 +1,5 @@ -With_errors (ppxlib.Ppxlib.With_errors)

    Module Ppxlib.With_errors

    type 'a t = 'a * Location.Error.t list
    val return : 'a -> 'a t
    val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
    val (>>|) : 'a t -> ('a -> 'b) -> 'b t
    val of_result : +With_errors (ppxlib.Ppxlib.With_errors)

    Module Ppxlib.With_errors

    type 'a t = 'a * Location.Error.t list
    val return : 'a -> 'a t
    val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
    val (>>|) : 'a t -> ('a -> 'b) -> 'b t
    val of_result : ('a, Location.Error.t Stdppx.NonEmptyList.t) result -> - default:'a -> - 'a t
    val combine_errors : 'a t list -> 'a list t
    \ No newline at end of file + default:'a -> + 'a t
    val combine_errors : 'a t list -> 'a list t
    diff --git a/ppxlib/Ppxlib/class-fold/index.html b/ppxlib/Ppxlib/class-fold/index.html index 250aff0..0d3762e 100644 --- a/ppxlib/Ppxlib/class-fold/index.html +++ b/ppxlib/Ppxlib/class-fold/index.html @@ -1,32 +1,5 @@ -fold (ppxlib.Ppxlib.fold)

    Class Ppxlib.fold

    method virtual bool : bool -> 'acc0 -> 'acc0
    method virtual char : char -> 'acc1 -> 'acc1
    method virtual int : int -> 'acc2 -> 'acc2
    method virtual list : 'a. ('a -> 'acc3 -> 'acc3) -> 'a list -> 'acc3 -> 'acc3
    method virtual option : 'a. ('a -> 'acc4 -> 'acc4) -> - 'a option -> - 'acc4 -> - 'acc4
    method virtual string : string -> 'acc5 -> 'acc5
    method position : 'acc fold -> position -> 'acc6 -> 'acc6
    method location : 'b -> location -> 'acc7 -> 'acc7
    method location_stack : 'b -> location_stack -> 'acc8 -> 'acc8
    method loc : 'b -> 'a. ('a -> 'acc9 -> 'acc9) -> 'a loc -> 'acc9 -> 'acc9
    method longident : 'b -> longident -> 'acc10 -> 'acc10
    method longident_loc : 'b -> longident_loc -> 'acc11 -> 'acc11
    method rec_flag : 'b -> rec_flag -> 'acc12 -> 'acc12
    method direction_flag : 'b -> direction_flag -> 'acc13 -> 'acc13
    method private_flag : 'b -> private_flag -> 'acc14 -> 'acc14
    method mutable_flag : 'b -> mutable_flag -> 'acc15 -> 'acc15
    method virtual_flag : 'b -> virtual_flag -> 'acc16 -> 'acc16
    method override_flag : 'b -> override_flag -> 'acc17 -> 'acc17
    method closed_flag : 'b -> closed_flag -> 'acc18 -> 'acc18
    method label : 'b -> label -> 'acc19 -> 'acc19
    method arg_label : 'b -> arg_label -> 'acc20 -> 'acc20
    method variance : 'b -> variance -> 'acc21 -> 'acc21
    method injectivity : 'b -> injectivity -> 'acc22 -> 'acc22
    method constant : 'b -> constant -> 'acc23 -> 'acc23
    method attribute : 'b -> attribute -> 'acc24 -> 'acc24
    method extension : 'b -> extension -> 'acc25 -> 'acc25
    method attributes : 'b -> attributes -> 'acc26 -> 'acc26
    method payload : 'b -> payload -> 'acc27 -> 'acc27
    method core_type : 'b -> core_type -> 'acc28 -> 'acc28
    method core_type_desc : 'b -> core_type_desc -> 'acc29 -> 'acc29
    method package_type : 'b -> package_type -> 'acc30 -> 'acc30
    method row_field : 'b -> row_field -> 'acc31 -> 'acc31
    method row_field_desc : 'b -> row_field_desc -> 'acc32 -> 'acc32
    method object_field : 'b -> object_field -> 'acc33 -> 'acc33
    method object_field_desc : 'b -> object_field_desc -> 'acc34 -> 'acc34
    method pattern : 'b -> pattern -> 'acc35 -> 'acc35
    method pattern_desc : 'b -> pattern_desc -> 'acc36 -> 'acc36
    method expression : 'b -> expression -> 'acc37 -> 'acc37
    method expression_desc : 'b -> expression_desc -> 'acc38 -> 'acc38
    method case : 'b -> case -> 'acc39 -> 'acc39
    method letop : 'b -> letop -> 'acc40 -> 'acc40
    method binding_op : 'b -> binding_op -> 'acc41 -> 'acc41
    method value_description : 'b -> value_description -> 'acc42 -> 'acc42
    method type_declaration : 'b -> type_declaration -> 'acc43 -> 'acc43
    method type_kind : 'b -> type_kind -> 'acc44 -> 'acc44
    method label_declaration : 'b -> label_declaration -> 'acc45 -> 'acc45
    method constructor_declaration : 'b -> - constructor_declaration -> - 'acc46 -> - 'acc46
    method constructor_arguments : 'b -> constructor_arguments -> 'acc47 -> 'acc47
    method type_extension : 'b -> type_extension -> 'acc48 -> 'acc48
    method extension_constructor : 'b -> extension_constructor -> 'acc49 -> 'acc49
    method type_exception : 'b -> type_exception -> 'acc50 -> 'acc50
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - 'acc51 -> - 'acc51
    method class_type : 'b -> class_type -> 'acc52 -> 'acc52
    method class_type_desc : 'b -> class_type_desc -> 'acc53 -> 'acc53
    method class_signature : 'b -> class_signature -> 'acc54 -> 'acc54
    method class_type_field : 'b -> class_type_field -> 'acc55 -> 'acc55
    method class_type_field_desc : 'b -> class_type_field_desc -> 'acc56 -> 'acc56
    method class_infos : 'b -> - 'a. ('a -> 'acc57 -> 'acc57) -> - 'a class_infos -> - 'acc57 -> - 'acc57
    method class_description : 'b -> class_description -> 'acc58 -> 'acc58
    method class_type_declaration : 'b -> - class_type_declaration -> - 'acc59 -> - 'acc59
    method class_expr : 'b -> class_expr -> 'acc60 -> 'acc60
    method class_expr_desc : 'b -> class_expr_desc -> 'acc61 -> 'acc61
    method class_structure : 'b -> class_structure -> 'acc62 -> 'acc62
    method class_field : 'b -> class_field -> 'acc63 -> 'acc63
    method class_field_desc : 'b -> class_field_desc -> 'acc64 -> 'acc64
    method class_field_kind : 'b -> class_field_kind -> 'acc65 -> 'acc65
    method class_declaration : 'b -> class_declaration -> 'acc66 -> 'acc66
    method module_type : 'b -> module_type -> 'acc67 -> 'acc67
    method module_type_desc : 'b -> module_type_desc -> 'acc68 -> 'acc68
    method functor_parameter : 'b -> functor_parameter -> 'acc69 -> 'acc69
    method signature : 'b -> signature -> 'acc70 -> 'acc70
    method signature_item : 'b -> signature_item -> 'acc71 -> 'acc71
    method signature_item_desc : 'b -> signature_item_desc -> 'acc72 -> 'acc72
    method module_declaration : 'b -> module_declaration -> 'acc73 -> 'acc73
    method module_substitution : 'b -> module_substitution -> 'acc74 -> 'acc74
    method module_type_declaration : 'b -> - module_type_declaration -> - 'acc75 -> - 'acc75
    method open_infos : 'b -> - 'a. ('a -> 'acc76 -> 'acc76) -> - 'a open_infos -> - 'acc76 -> - 'acc76
    method open_description : 'b -> open_description -> 'acc77 -> 'acc77
    method open_declaration : 'b -> open_declaration -> 'acc78 -> 'acc78
    method include_infos : 'b -> - 'a. ('a -> 'acc79 -> 'acc79) -> +fold (ppxlib.Ppxlib.fold)

    Class Ppxlib.fold

    method virtual bool : bool -> 'acc -> 'acc
    method virtual char : char -> 'acc -> 'acc
    method virtual int : int -> 'acc -> 'acc
    method virtual list : 'a. ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc
    method virtual option : 'a. ('a -> 'acc -> 'acc) -> 'a option -> 'acc -> 'acc
    method virtual string : string -> 'acc -> 'acc
    method position : position -> 'acc -> 'acc
    method location : location -> 'acc -> 'acc
    method location_stack : location_stack -> 'acc -> 'acc
    method loc : 'a. ('a -> 'acc -> 'acc) -> 'a loc -> 'acc -> 'acc
    method longident : longident -> 'acc -> 'acc
    method longident_loc : longident_loc -> 'acc -> 'acc
    method rec_flag : rec_flag -> 'acc -> 'acc
    method direction_flag : direction_flag -> 'acc -> 'acc
    method private_flag : private_flag -> 'acc -> 'acc
    method mutable_flag : mutable_flag -> 'acc -> 'acc
    method virtual_flag : virtual_flag -> 'acc -> 'acc
    method override_flag : override_flag -> 'acc -> 'acc
    method closed_flag : closed_flag -> 'acc -> 'acc
    method label : label -> 'acc -> 'acc
    method arg_label : arg_label -> 'acc -> 'acc
    method variance : variance -> 'acc -> 'acc
    method injectivity : injectivity -> 'acc -> 'acc
    method constant : constant -> 'acc -> 'acc
    method attribute : attribute -> 'acc -> 'acc
    method extension : extension -> 'acc -> 'acc
    method attributes : attributes -> 'acc -> 'acc
    method payload : payload -> 'acc -> 'acc
    method core_type : core_type -> 'acc -> 'acc
    method core_type_desc : core_type_desc -> 'acc -> 'acc
    method package_type : package_type -> 'acc -> 'acc
    method row_field : row_field -> 'acc -> 'acc
    method row_field_desc : row_field_desc -> 'acc -> 'acc
    method object_field : object_field -> 'acc -> 'acc
    method object_field_desc : object_field_desc -> 'acc -> 'acc
    method pattern : pattern -> 'acc -> 'acc
    method pattern_desc : pattern_desc -> 'acc -> 'acc
    method expression : expression -> 'acc -> 'acc
    method expression_desc : expression_desc -> 'acc -> 'acc
    method case : case -> 'acc -> 'acc
    method letop : letop -> 'acc -> 'acc
    method binding_op : binding_op -> 'acc -> 'acc
    method value_description : value_description -> 'acc -> 'acc
    method type_declaration : type_declaration -> 'acc -> 'acc
    method type_kind : type_kind -> 'acc -> 'acc
    method label_declaration : label_declaration -> 'acc -> 'acc
    method constructor_declaration : constructor_declaration -> 'acc -> 'acc
    method constructor_arguments : constructor_arguments -> 'acc -> 'acc
    method type_extension : type_extension -> 'acc -> 'acc
    method extension_constructor : extension_constructor -> 'acc -> 'acc
    method type_exception : type_exception -> 'acc -> 'acc
    method extension_constructor_kind : extension_constructor_kind -> 'acc -> 'acc
    method class_type : class_type -> 'acc -> 'acc
    method class_type_desc : class_type_desc -> 'acc -> 'acc
    method class_signature : class_signature -> 'acc -> 'acc
    method class_type_field : class_type_field -> 'acc -> 'acc
    method class_type_field_desc : class_type_field_desc -> 'acc -> 'acc
    method class_infos : 'a. ('a -> 'acc -> 'acc) -> 'a class_infos -> 'acc -> 'acc
    method class_description : class_description -> 'acc -> 'acc
    method class_type_declaration : class_type_declaration -> 'acc -> 'acc
    method class_expr : class_expr -> 'acc -> 'acc
    method class_expr_desc : class_expr_desc -> 'acc -> 'acc
    method class_structure : class_structure -> 'acc -> 'acc
    method class_field : class_field -> 'acc -> 'acc
    method class_field_desc : class_field_desc -> 'acc -> 'acc
    method class_field_kind : class_field_kind -> 'acc -> 'acc
    method class_declaration : class_declaration -> 'acc -> 'acc
    method module_type : module_type -> 'acc -> 'acc
    method module_type_desc : module_type_desc -> 'acc -> 'acc
    method functor_parameter : functor_parameter -> 'acc -> 'acc
    method signature : signature -> 'acc -> 'acc
    method signature_item : signature_item -> 'acc -> 'acc
    method signature_item_desc : signature_item_desc -> 'acc -> 'acc
    method module_declaration : module_declaration -> 'acc -> 'acc
    method module_substitution : module_substitution -> 'acc -> 'acc
    method module_type_declaration : module_type_declaration -> 'acc -> 'acc
    method open_infos : 'a. ('a -> 'acc -> 'acc) -> 'a open_infos -> 'acc -> 'acc
    method open_description : open_description -> 'acc -> 'acc
    method open_declaration : open_declaration -> 'acc -> 'acc
    method include_infos : 'a. ('a -> 'acc -> 'acc) -> 'a include_infos -> - 'acc79 -> - 'acc79
    method include_description : 'b -> include_description -> 'acc80 -> 'acc80
    method include_declaration : 'b -> include_declaration -> 'acc81 -> 'acc81
    method with_constraint : 'b -> with_constraint -> 'acc82 -> 'acc82
    method module_expr : 'b -> module_expr -> 'acc83 -> 'acc83
    method module_expr_desc : 'b -> module_expr_desc -> 'acc84 -> 'acc84
    method structure : 'b -> structure -> 'acc85 -> 'acc85
    method structure_item : 'b -> structure_item -> 'acc86 -> 'acc86
    method structure_item_desc : 'b -> structure_item_desc -> 'acc87 -> 'acc87
    method value_binding : 'b -> value_binding -> 'acc88 -> 'acc88
    method module_binding : 'b -> module_binding -> 'acc89 -> 'acc89
    method toplevel_phrase : 'b -> toplevel_phrase -> 'acc90 -> 'acc90
    method toplevel_directive : 'b -> toplevel_directive -> 'acc91 -> 'acc91
    method directive_argument : 'b -> directive_argument -> 'acc92 -> 'acc92
    method directive_argument_desc : 'b -> - directive_argument_desc -> - 'acc93 -> - 'acc93
    method cases : 'b -> cases -> 'acc94 -> 'acc94
    \ No newline at end of file + 'acc -> + 'acc
    method include_description : include_description -> 'acc -> 'acc
    method include_declaration : include_declaration -> 'acc -> 'acc
    method with_constraint : with_constraint -> 'acc -> 'acc
    method module_expr : module_expr -> 'acc -> 'acc
    method module_expr_desc : module_expr_desc -> 'acc -> 'acc
    method structure : structure -> 'acc -> 'acc
    method structure_item : structure_item -> 'acc -> 'acc
    method structure_item_desc : structure_item_desc -> 'acc -> 'acc
    method value_binding : value_binding -> 'acc -> 'acc
    method module_binding : module_binding -> 'acc -> 'acc
    method toplevel_phrase : toplevel_phrase -> 'acc -> 'acc
    method toplevel_directive : toplevel_directive -> 'acc -> 'acc
    method directive_argument : directive_argument -> 'acc -> 'acc
    method directive_argument_desc : directive_argument_desc -> 'acc -> 'acc
    method cases : cases -> 'acc -> 'acc
    diff --git a/ppxlib/Ppxlib/class-fold_map/index.html b/ppxlib/Ppxlib/class-fold_map/index.html index 045b772..7823c17 100644 --- a/ppxlib/Ppxlib/class-fold_map/index.html +++ b/ppxlib/Ppxlib/class-fold_map/index.html @@ -1,159 +1,61 @@ -fold_map (ppxlib.Ppxlib.fold_map)

    Class Ppxlib.fold_map

    method virtual bool : bool -> 'acc0 -> bool * 'acc0
    method virtual char : char -> 'acc1 -> char * 'acc1
    method virtual int : int -> 'acc2 -> int * 'acc2
    method virtual list : 'a. ('a -> 'acc3 -> 'a * 'acc3) -> +fold_map (ppxlib.Ppxlib.fold_map)

    Class Ppxlib.fold_map

    method virtual bool : bool -> 'acc -> bool * 'acc
    method virtual char : char -> 'acc -> char * 'acc
    method virtual int : int -> 'acc -> int * 'acc
    method virtual list : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a list -> - 'acc3 -> - 'a list * 'acc3
    method virtual option : 'a. ('a -> 'acc4 -> 'a * 'acc4) -> + 'acc -> + 'a list * 'acc
    method virtual option : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a option -> - 'acc4 -> - 'a option * 'acc4
    method virtual string : string -> 'acc5 -> string * 'acc5
    method position : 'acc fold_map -> position -> 'acc6 -> position * 'acc6
    method location : 'b -> location -> 'acc7 -> location * 'acc7
    method location_stack : 'b -> location_stack -> 'acc8 -> location_stack * 'acc8
    method loc : 'b -> - 'a. ('a -> 'acc9 -> 'a * 'acc9) -> - 'a loc -> - 'acc9 -> - 'a loc * 'acc9
    method longident : 'b -> longident -> 'acc10 -> longident * 'acc10
    method longident_loc : 'b -> longident_loc -> 'acc11 -> longident_loc * 'acc11
    method rec_flag : 'b -> rec_flag -> 'acc12 -> rec_flag * 'acc12
    method direction_flag : 'b -> - direction_flag -> - 'acc13 -> - direction_flag * 'acc13
    method private_flag : 'b -> private_flag -> 'acc14 -> private_flag * 'acc14
    method mutable_flag : 'b -> mutable_flag -> 'acc15 -> mutable_flag * 'acc15
    method virtual_flag : 'b -> virtual_flag -> 'acc16 -> virtual_flag * 'acc16
    method override_flag : 'b -> override_flag -> 'acc17 -> override_flag * 'acc17
    method closed_flag : 'b -> closed_flag -> 'acc18 -> closed_flag * 'acc18
    method label : 'b -> label -> 'acc19 -> label * 'acc19
    method arg_label : 'b -> arg_label -> 'acc20 -> arg_label * 'acc20
    method variance : 'b -> variance -> 'acc21 -> variance * 'acc21
    method injectivity : 'b -> injectivity -> 'acc22 -> injectivity * 'acc22
    method constant : 'b -> constant -> 'acc23 -> constant * 'acc23
    method attribute : 'b -> attribute -> 'acc24 -> attribute * 'acc24
    method extension : 'b -> extension -> 'acc25 -> extension * 'acc25
    method attributes : 'b -> attributes -> 'acc26 -> attributes * 'acc26
    method payload : 'b -> payload -> 'acc27 -> payload * 'acc27
    method core_type : 'b -> core_type -> 'acc28 -> core_type * 'acc28
    method core_type_desc : 'b -> - core_type_desc -> - 'acc29 -> - core_type_desc * 'acc29
    method package_type : 'b -> package_type -> 'acc30 -> package_type * 'acc30
    method row_field : 'b -> row_field -> 'acc31 -> row_field * 'acc31
    method row_field_desc : 'b -> - row_field_desc -> - 'acc32 -> - row_field_desc * 'acc32
    method object_field : 'b -> object_field -> 'acc33 -> object_field * 'acc33
    method object_field_desc : 'b -> - object_field_desc -> - 'acc34 -> - object_field_desc * 'acc34
    method pattern : 'b -> pattern -> 'acc35 -> pattern * 'acc35
    method pattern_desc : 'b -> pattern_desc -> 'acc36 -> pattern_desc * 'acc36
    method expression : 'b -> expression -> 'acc37 -> expression * 'acc37
    method expression_desc : 'b -> - expression_desc -> - 'acc38 -> - expression_desc * 'acc38
    method case : 'b -> case -> 'acc39 -> case * 'acc39
    method letop : 'b -> letop -> 'acc40 -> letop * 'acc40
    method binding_op : 'b -> binding_op -> 'acc41 -> binding_op * 'acc41
    method value_description : 'b -> - value_description -> - 'acc42 -> - value_description * 'acc42
    method type_declaration : 'b -> - type_declaration -> - 'acc43 -> - type_declaration * 'acc43
    method type_kind : 'b -> type_kind -> 'acc44 -> type_kind * 'acc44
    method label_declaration : 'b -> - label_declaration -> - 'acc45 -> - label_declaration * 'acc45
    method constructor_declaration : 'b -> - constructor_declaration -> - 'acc46 -> - constructor_declaration * 'acc46
    method constructor_arguments : 'b -> - constructor_arguments -> - 'acc47 -> - constructor_arguments * 'acc47
    method type_extension : 'b -> - type_extension -> - 'acc48 -> - type_extension * 'acc48
    method extension_constructor : 'b -> - extension_constructor -> - 'acc49 -> - extension_constructor * 'acc49
    method type_exception : 'b -> - type_exception -> - 'acc50 -> - type_exception * 'acc50
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - 'acc51 -> - extension_constructor_kind * 'acc51
    method class_type : 'b -> class_type -> 'acc52 -> class_type * 'acc52
    method class_type_desc : 'b -> - class_type_desc -> - 'acc53 -> - class_type_desc * 'acc53
    method class_signature : 'b -> - class_signature -> - 'acc54 -> - class_signature * 'acc54
    method class_type_field : 'b -> - class_type_field -> - 'acc55 -> - class_type_field * 'acc55
    method class_type_field_desc : 'b -> - class_type_field_desc -> - 'acc56 -> - class_type_field_desc * 'acc56
    method class_infos : 'b -> - 'a. ('a -> 'acc57 -> 'a * 'acc57) -> + 'acc -> + 'a option * 'acc
    method virtual string : string -> 'acc -> string * 'acc
    method position : position -> 'acc -> position * 'acc
    method location : location -> 'acc -> location * 'acc
    method location_stack : location_stack -> 'acc -> location_stack * 'acc
    method loc : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a loc -> 'acc -> 'a loc * 'acc
    method longident : longident -> 'acc -> longident * 'acc
    method longident_loc : longident_loc -> 'acc -> longident_loc * 'acc
    method rec_flag : rec_flag -> 'acc -> rec_flag * 'acc
    method direction_flag : direction_flag -> 'acc -> direction_flag * 'acc
    method private_flag : private_flag -> 'acc -> private_flag * 'acc
    method mutable_flag : mutable_flag -> 'acc -> mutable_flag * 'acc
    method virtual_flag : virtual_flag -> 'acc -> virtual_flag * 'acc
    method override_flag : override_flag -> 'acc -> override_flag * 'acc
    method closed_flag : closed_flag -> 'acc -> closed_flag * 'acc
    method label : label -> 'acc -> label * 'acc
    method arg_label : arg_label -> 'acc -> arg_label * 'acc
    method variance : variance -> 'acc -> variance * 'acc
    method injectivity : injectivity -> 'acc -> injectivity * 'acc
    method constant : constant -> 'acc -> constant * 'acc
    method attribute : attribute -> 'acc -> attribute * 'acc
    method extension : extension -> 'acc -> extension * 'acc
    method attributes : attributes -> 'acc -> attributes * 'acc
    method payload : payload -> 'acc -> payload * 'acc
    method core_type : core_type -> 'acc -> core_type * 'acc
    method core_type_desc : core_type_desc -> 'acc -> core_type_desc * 'acc
    method package_type : package_type -> 'acc -> package_type * 'acc
    method row_field : row_field -> 'acc -> row_field * 'acc
    method row_field_desc : row_field_desc -> 'acc -> row_field_desc * 'acc
    method object_field : object_field -> 'acc -> object_field * 'acc
    method object_field_desc : object_field_desc -> + 'acc -> + object_field_desc * 'acc
    method pattern : pattern -> 'acc -> pattern * 'acc
    method pattern_desc : pattern_desc -> 'acc -> pattern_desc * 'acc
    method expression : expression -> 'acc -> expression * 'acc
    method expression_desc : expression_desc -> 'acc -> expression_desc * 'acc
    method case : case -> 'acc -> case * 'acc
    method letop : letop -> 'acc -> letop * 'acc
    method binding_op : binding_op -> 'acc -> binding_op * 'acc
    method value_description : value_description -> + 'acc -> + value_description * 'acc
    method type_declaration : type_declaration -> 'acc -> type_declaration * 'acc
    method type_kind : type_kind -> 'acc -> type_kind * 'acc
    method label_declaration : label_declaration -> + 'acc -> + label_declaration * 'acc
    method constructor_declaration : constructor_declaration -> + 'acc -> + constructor_declaration * 'acc
    method constructor_arguments : constructor_arguments -> + 'acc -> + constructor_arguments * 'acc
    method type_extension : type_extension -> 'acc -> type_extension * 'acc
    method extension_constructor : extension_constructor -> + 'acc -> + extension_constructor * 'acc
    method type_exception : type_exception -> 'acc -> type_exception * 'acc
    method extension_constructor_kind : extension_constructor_kind -> + 'acc -> + extension_constructor_kind * 'acc
    method class_type : class_type -> 'acc -> class_type * 'acc
    method class_type_desc : class_type_desc -> 'acc -> class_type_desc * 'acc
    method class_signature : class_signature -> 'acc -> class_signature * 'acc
    method class_type_field : class_type_field -> 'acc -> class_type_field * 'acc
    method class_type_field_desc : class_type_field_desc -> + 'acc -> + class_type_field_desc * 'acc
    method class_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a class_infos -> - 'acc57 -> - 'a class_infos * 'acc57
    method class_description : 'b -> - class_description -> - 'acc58 -> - class_description * 'acc58
    method class_type_declaration : 'b -> - class_type_declaration -> - 'acc59 -> - class_type_declaration * 'acc59
    method class_expr : 'b -> class_expr -> 'acc60 -> class_expr * 'acc60
    method class_expr_desc : 'b -> - class_expr_desc -> - 'acc61 -> - class_expr_desc * 'acc61
    method class_structure : 'b -> - class_structure -> - 'acc62 -> - class_structure * 'acc62
    method class_field : 'b -> class_field -> 'acc63 -> class_field * 'acc63
    method class_field_desc : 'b -> - class_field_desc -> - 'acc64 -> - class_field_desc * 'acc64
    method class_field_kind : 'b -> - class_field_kind -> - 'acc65 -> - class_field_kind * 'acc65
    method class_declaration : 'b -> - class_declaration -> - 'acc66 -> - class_declaration * 'acc66
    method module_type : 'b -> module_type -> 'acc67 -> module_type * 'acc67
    method module_type_desc : 'b -> - module_type_desc -> - 'acc68 -> - module_type_desc * 'acc68
    method functor_parameter : 'b -> - functor_parameter -> - 'acc69 -> - functor_parameter * 'acc69
    method signature : 'b -> signature -> 'acc70 -> signature * 'acc70
    method signature_item : 'b -> - signature_item -> - 'acc71 -> - signature_item * 'acc71
    method signature_item_desc : 'b -> - signature_item_desc -> - 'acc72 -> - signature_item_desc * 'acc72
    method module_declaration : 'b -> - module_declaration -> - 'acc73 -> - module_declaration * 'acc73
    method module_substitution : 'b -> - module_substitution -> - 'acc74 -> - module_substitution * 'acc74
    method module_type_declaration : 'b -> - module_type_declaration -> - 'acc75 -> - module_type_declaration * 'acc75
    method open_infos : 'b -> - 'a. ('a -> 'acc76 -> 'a * 'acc76) -> + 'acc -> + 'a class_infos * 'acc
    method class_description : class_description -> + 'acc -> + class_description * 'acc
    method class_type_declaration : class_type_declaration -> + 'acc -> + class_type_declaration * 'acc
    method class_expr : class_expr -> 'acc -> class_expr * 'acc
    method class_expr_desc : class_expr_desc -> 'acc -> class_expr_desc * 'acc
    method class_structure : class_structure -> 'acc -> class_structure * 'acc
    method class_field : class_field -> 'acc -> class_field * 'acc
    method class_field_desc : class_field_desc -> 'acc -> class_field_desc * 'acc
    method class_field_kind : class_field_kind -> 'acc -> class_field_kind * 'acc
    method class_declaration : class_declaration -> + 'acc -> + class_declaration * 'acc
    method module_type : module_type -> 'acc -> module_type * 'acc
    method module_type_desc : module_type_desc -> 'acc -> module_type_desc * 'acc
    method functor_parameter : functor_parameter -> + 'acc -> + functor_parameter * 'acc
    method signature : signature -> 'acc -> signature * 'acc
    method signature_item : signature_item -> 'acc -> signature_item * 'acc
    method signature_item_desc : signature_item_desc -> + 'acc -> + signature_item_desc * 'acc
    method module_declaration : module_declaration -> + 'acc -> + module_declaration * 'acc
    method module_substitution : module_substitution -> + 'acc -> + module_substitution * 'acc
    method module_type_declaration : module_type_declaration -> + 'acc -> + module_type_declaration * 'acc
    method open_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a open_infos -> - 'acc76 -> - 'a open_infos * 'acc76
    method open_description : 'b -> - open_description -> - 'acc77 -> - open_description * 'acc77
    method open_declaration : 'b -> - open_declaration -> - 'acc78 -> - open_declaration * 'acc78
    method include_infos : 'b -> - 'a. ('a -> 'acc79 -> 'a * 'acc79) -> + 'acc -> + 'a open_infos * 'acc
    method open_description : open_description -> 'acc -> open_description * 'acc
    method open_declaration : open_declaration -> 'acc -> open_declaration * 'acc
    method include_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a include_infos -> - 'acc79 -> - 'a include_infos * 'acc79
    method include_description : 'b -> - include_description -> - 'acc80 -> - include_description * 'acc80
    method include_declaration : 'b -> - include_declaration -> - 'acc81 -> - include_declaration * 'acc81
    method with_constraint : 'b -> - with_constraint -> - 'acc82 -> - with_constraint * 'acc82
    method module_expr : 'b -> module_expr -> 'acc83 -> module_expr * 'acc83
    method module_expr_desc : 'b -> - module_expr_desc -> - 'acc84 -> - module_expr_desc * 'acc84
    method structure : 'b -> structure -> 'acc85 -> structure * 'acc85
    method structure_item : 'b -> - structure_item -> - 'acc86 -> - structure_item * 'acc86
    method structure_item_desc : 'b -> - structure_item_desc -> - 'acc87 -> - structure_item_desc * 'acc87
    method value_binding : 'b -> value_binding -> 'acc88 -> value_binding * 'acc88
    method module_binding : 'b -> - module_binding -> - 'acc89 -> - module_binding * 'acc89
    method toplevel_phrase : 'b -> - toplevel_phrase -> - 'acc90 -> - toplevel_phrase * 'acc90
    method toplevel_directive : 'b -> - toplevel_directive -> - 'acc91 -> - toplevel_directive * 'acc91
    method directive_argument : 'b -> - directive_argument -> - 'acc92 -> - directive_argument * 'acc92
    method directive_argument_desc : 'b -> - directive_argument_desc -> - 'acc93 -> - directive_argument_desc * 'acc93
    method cases : 'b -> cases -> 'acc94 -> cases * 'acc94
    \ No newline at end of file + 'acc -> + 'a include_infos * 'acc
    method include_description : include_description -> + 'acc -> + include_description * 'acc
    method include_declaration : include_declaration -> + 'acc -> + include_declaration * 'acc
    method with_constraint : with_constraint -> 'acc -> with_constraint * 'acc
    method module_expr : module_expr -> 'acc -> module_expr * 'acc
    method module_expr_desc : module_expr_desc -> 'acc -> module_expr_desc * 'acc
    method structure : structure -> 'acc -> structure * 'acc
    method structure_item : structure_item -> 'acc -> structure_item * 'acc
    method structure_item_desc : structure_item_desc -> + 'acc -> + structure_item_desc * 'acc
    method value_binding : value_binding -> 'acc -> value_binding * 'acc
    method module_binding : module_binding -> 'acc -> module_binding * 'acc
    method toplevel_phrase : toplevel_phrase -> 'acc -> toplevel_phrase * 'acc
    method toplevel_directive : toplevel_directive -> + 'acc -> + toplevel_directive * 'acc
    method directive_argument : directive_argument -> + 'acc -> + directive_argument * 'acc
    method directive_argument_desc : directive_argument_desc -> + 'acc -> + directive_argument_desc * 'acc
    method cases : cases -> 'acc -> cases * 'acc
    diff --git a/ppxlib/Ppxlib/class-iter/index.html b/ppxlib/Ppxlib/class-iter/index.html index 1b15b08..45540b7 100644 --- a/ppxlib/Ppxlib/class-iter/index.html +++ b/ppxlib/Ppxlib/class-iter/index.html @@ -1,2 +1,2 @@ -iter (ppxlib.Ppxlib.iter)

    Class Ppxlib.iter

    method virtual bool : bool -> unit
    method virtual char : char -> unit
    method virtual int : int -> unit
    method virtual list : 'a. ('a -> unit) -> 'a list -> unit
    method virtual option : 'a. ('a -> unit) -> 'a option -> unit
    method virtual string : string -> unit
    method position : iter -> position -> unit
    method location : 'b -> location -> unit
    method location_stack : 'b -> location_stack -> unit
    method loc : 'b -> 'a. ('a -> unit) -> 'a loc -> unit
    method longident : 'b -> longident -> unit
    method longident_loc : 'b -> longident_loc -> unit
    method rec_flag : 'b -> rec_flag -> unit
    method direction_flag : 'b -> direction_flag -> unit
    method private_flag : 'b -> private_flag -> unit
    method mutable_flag : 'b -> mutable_flag -> unit
    method virtual_flag : 'b -> virtual_flag -> unit
    method override_flag : 'b -> override_flag -> unit
    method closed_flag : 'b -> closed_flag -> unit
    method label : 'b -> label -> unit
    method arg_label : 'b -> arg_label -> unit
    method variance : 'b -> variance -> unit
    method injectivity : 'b -> injectivity -> unit
    method constant : 'b -> constant -> unit
    method attribute : 'b -> attribute -> unit
    method extension : 'b -> extension -> unit
    method attributes : 'b -> attributes -> unit
    method payload : 'b -> payload -> unit
    method core_type : 'b -> core_type -> unit
    method core_type_desc : 'b -> core_type_desc -> unit
    method package_type : 'b -> package_type -> unit
    method row_field : 'b -> row_field -> unit
    method row_field_desc : 'b -> row_field_desc -> unit
    method object_field : 'b -> object_field -> unit
    method object_field_desc : 'b -> object_field_desc -> unit
    method pattern : 'b -> pattern -> unit
    method pattern_desc : 'b -> pattern_desc -> unit
    method expression : 'b -> expression -> unit
    method expression_desc : 'b -> expression_desc -> unit
    method case : 'b -> case -> unit
    method letop : 'b -> letop -> unit
    method binding_op : 'b -> binding_op -> unit
    method value_description : 'b -> value_description -> unit
    method type_declaration : 'b -> type_declaration -> unit
    method type_kind : 'b -> type_kind -> unit
    method label_declaration : 'b -> label_declaration -> unit
    method constructor_declaration : 'b -> constructor_declaration -> unit
    method constructor_arguments : 'b -> constructor_arguments -> unit
    method type_extension : 'b -> type_extension -> unit
    method extension_constructor : 'b -> extension_constructor -> unit
    method type_exception : 'b -> type_exception -> unit
    method extension_constructor_kind : 'b -> extension_constructor_kind -> unit
    method class_type : 'b -> class_type -> unit
    method class_type_desc : 'b -> class_type_desc -> unit
    method class_signature : 'b -> class_signature -> unit
    method class_type_field : 'b -> class_type_field -> unit
    method class_type_field_desc : 'b -> class_type_field_desc -> unit
    method class_infos : 'b -> 'a. ('a -> unit) -> 'a class_infos -> unit
    method class_description : 'b -> class_description -> unit
    method class_type_declaration : 'b -> class_type_declaration -> unit
    method class_expr : 'b -> class_expr -> unit
    method class_expr_desc : 'b -> class_expr_desc -> unit
    method class_structure : 'b -> class_structure -> unit
    method class_field : 'b -> class_field -> unit
    method class_field_desc : 'b -> class_field_desc -> unit
    method class_field_kind : 'b -> class_field_kind -> unit
    method class_declaration : 'b -> class_declaration -> unit
    method module_type : 'b -> module_type -> unit
    method module_type_desc : 'b -> module_type_desc -> unit
    method functor_parameter : 'b -> functor_parameter -> unit
    method signature : 'b -> signature -> unit
    method signature_item : 'b -> signature_item -> unit
    method signature_item_desc : 'b -> signature_item_desc -> unit
    method module_declaration : 'b -> module_declaration -> unit
    method module_substitution : 'b -> module_substitution -> unit
    method module_type_declaration : 'b -> module_type_declaration -> unit
    method open_infos : 'b -> 'a. ('a -> unit) -> 'a open_infos -> unit
    method open_description : 'b -> open_description -> unit
    method open_declaration : 'b -> open_declaration -> unit
    method include_infos : 'b -> 'a. ('a -> unit) -> 'a include_infos -> unit
    method include_description : 'b -> include_description -> unit
    method include_declaration : 'b -> include_declaration -> unit
    method with_constraint : 'b -> with_constraint -> unit
    method module_expr : 'b -> module_expr -> unit
    method module_expr_desc : 'b -> module_expr_desc -> unit
    method structure : 'b -> structure -> unit
    method structure_item : 'b -> structure_item -> unit
    method structure_item_desc : 'b -> structure_item_desc -> unit
    method value_binding : 'b -> value_binding -> unit
    method module_binding : 'b -> module_binding -> unit
    method toplevel_phrase : 'b -> toplevel_phrase -> unit
    method toplevel_directive : 'b -> toplevel_directive -> unit
    method directive_argument : 'b -> directive_argument -> unit
    method directive_argument_desc : 'b -> directive_argument_desc -> unit
    method cases : 'b -> cases -> unit
    \ No newline at end of file +iter (ppxlib.Ppxlib.iter)

    Class Ppxlib.iter

    method virtual bool : bool -> unit
    method virtual char : char -> unit
    method virtual int : int -> unit
    method virtual list : 'a. ('a -> unit) -> 'a list -> unit
    method virtual option : 'a. ('a -> unit) -> 'a option -> unit
    method virtual string : string -> unit
    method position : position -> unit
    method location : location -> unit
    method location_stack : location_stack -> unit
    method loc : 'a. ('a -> unit) -> 'a loc -> unit
    method longident : longident -> unit
    method longident_loc : longident_loc -> unit
    method rec_flag : rec_flag -> unit
    method direction_flag : direction_flag -> unit
    method private_flag : private_flag -> unit
    method mutable_flag : mutable_flag -> unit
    method virtual_flag : virtual_flag -> unit
    method override_flag : override_flag -> unit
    method closed_flag : closed_flag -> unit
    method label : label -> unit
    method arg_label : arg_label -> unit
    method variance : variance -> unit
    method injectivity : injectivity -> unit
    method constant : constant -> unit
    method attribute : attribute -> unit
    method extension : extension -> unit
    method attributes : attributes -> unit
    method payload : payload -> unit
    method core_type : core_type -> unit
    method core_type_desc : core_type_desc -> unit
    method package_type : package_type -> unit
    method row_field : row_field -> unit
    method row_field_desc : row_field_desc -> unit
    method object_field : object_field -> unit
    method object_field_desc : object_field_desc -> unit
    method pattern : pattern -> unit
    method pattern_desc : pattern_desc -> unit
    method expression : expression -> unit
    method expression_desc : expression_desc -> unit
    method case : case -> unit
    method letop : letop -> unit
    method binding_op : binding_op -> unit
    method value_description : value_description -> unit
    method type_declaration : type_declaration -> unit
    method type_kind : type_kind -> unit
    method label_declaration : label_declaration -> unit
    method constructor_declaration : constructor_declaration -> unit
    method constructor_arguments : constructor_arguments -> unit
    method type_extension : type_extension -> unit
    method extension_constructor : extension_constructor -> unit
    method type_exception : type_exception -> unit
    method extension_constructor_kind : extension_constructor_kind -> unit
    method class_type : class_type -> unit
    method class_type_desc : class_type_desc -> unit
    method class_signature : class_signature -> unit
    method class_type_field : class_type_field -> unit
    method class_type_field_desc : class_type_field_desc -> unit
    method class_infos : 'a. ('a -> unit) -> 'a class_infos -> unit
    method class_description : class_description -> unit
    method class_type_declaration : class_type_declaration -> unit
    method class_expr : class_expr -> unit
    method class_expr_desc : class_expr_desc -> unit
    method class_structure : class_structure -> unit
    method class_field : class_field -> unit
    method class_field_desc : class_field_desc -> unit
    method class_field_kind : class_field_kind -> unit
    method class_declaration : class_declaration -> unit
    method module_type : module_type -> unit
    method module_type_desc : module_type_desc -> unit
    method functor_parameter : functor_parameter -> unit
    method signature : signature -> unit
    method signature_item : signature_item -> unit
    method signature_item_desc : signature_item_desc -> unit
    method module_declaration : module_declaration -> unit
    method module_substitution : module_substitution -> unit
    method module_type_declaration : module_type_declaration -> unit
    method open_infos : 'a. ('a -> unit) -> 'a open_infos -> unit
    method open_description : open_description -> unit
    method open_declaration : open_declaration -> unit
    method include_infos : 'a. ('a -> unit) -> 'a include_infos -> unit
    method include_description : include_description -> unit
    method include_declaration : include_declaration -> unit
    method with_constraint : with_constraint -> unit
    method module_expr : module_expr -> unit
    method module_expr_desc : module_expr_desc -> unit
    method structure : structure -> unit
    method structure_item : structure_item -> unit
    method structure_item_desc : structure_item_desc -> unit
    method value_binding : value_binding -> unit
    method module_binding : module_binding -> unit
    method toplevel_phrase : toplevel_phrase -> unit
    method toplevel_directive : toplevel_directive -> unit
    method directive_argument : directive_argument -> unit
    method directive_argument_desc : directive_argument_desc -> unit
    method cases : cases -> unit
    diff --git a/ppxlib/Ppxlib/class-lift/index.html b/ppxlib/Ppxlib/class-lift/index.html index 451ddaa..57a113b 100644 --- a/ppxlib/Ppxlib/class-lift/index.html +++ b/ppxlib/Ppxlib/class-lift/index.html @@ -1,2 +1,2 @@ -lift (ppxlib.Ppxlib.lift)

    Class Ppxlib.lift

    method virtual record : (string * 'res0) list -> 'res0
    method virtual constr : string -> 'res1 list -> 'res1
    method virtual tuple : 'res2 list -> 'res2
    method virtual bool : bool -> 'res3
    method virtual char : char -> 'res4
    method virtual int : int -> 'res5
    method virtual list : 'a. ('a -> 'res6) -> 'a list -> 'res6
    method virtual option : 'a. ('a -> 'res7) -> 'a option -> 'res7
    method virtual string : string -> 'res8
    method position : 'res lift -> position -> 'res9
    method location : 'b -> location -> 'res10
    method location_stack : 'b -> location_stack -> 'res11
    method loc : 'b -> 'a. ('a -> 'res12) -> 'a loc -> 'res12
    method longident : 'b -> longident -> 'res13
    method longident_loc : 'b -> longident_loc -> 'res14
    method rec_flag : 'b -> rec_flag -> 'res15
    method direction_flag : 'b -> direction_flag -> 'res16
    method private_flag : 'b -> private_flag -> 'res17
    method mutable_flag : 'b -> mutable_flag -> 'res18
    method virtual_flag : 'b -> virtual_flag -> 'res19
    method override_flag : 'b -> override_flag -> 'res20
    method closed_flag : 'b -> closed_flag -> 'res21
    method label : 'b -> label -> 'res22
    method arg_label : 'b -> arg_label -> 'res23
    method variance : 'b -> variance -> 'res24
    method injectivity : 'b -> injectivity -> 'res25
    method constant : 'b -> constant -> 'res26
    method attribute : 'b -> attribute -> 'res27
    method extension : 'b -> extension -> 'res28
    method attributes : 'b -> attributes -> 'res29
    method payload : 'b -> payload -> 'res30
    method core_type : 'b -> core_type -> 'res31
    method core_type_desc : 'b -> core_type_desc -> 'res32
    method package_type : 'b -> package_type -> 'res33
    method row_field : 'b -> row_field -> 'res34
    method row_field_desc : 'b -> row_field_desc -> 'res35
    method object_field : 'b -> object_field -> 'res36
    method object_field_desc : 'b -> object_field_desc -> 'res37
    method pattern : 'b -> pattern -> 'res38
    method pattern_desc : 'b -> pattern_desc -> 'res39
    method expression : 'b -> expression -> 'res40
    method expression_desc : 'b -> expression_desc -> 'res41
    method case : 'b -> case -> 'res42
    method letop : 'b -> letop -> 'res43
    method binding_op : 'b -> binding_op -> 'res44
    method value_description : 'b -> value_description -> 'res45
    method type_declaration : 'b -> type_declaration -> 'res46
    method type_kind : 'b -> type_kind -> 'res47
    method label_declaration : 'b -> label_declaration -> 'res48
    method constructor_declaration : 'b -> constructor_declaration -> 'res49
    method constructor_arguments : 'b -> constructor_arguments -> 'res50
    method type_extension : 'b -> type_extension -> 'res51
    method extension_constructor : 'b -> extension_constructor -> 'res52
    method type_exception : 'b -> type_exception -> 'res53
    method extension_constructor_kind : 'b -> extension_constructor_kind -> 'res54
    method class_type : 'b -> class_type -> 'res55
    method class_type_desc : 'b -> class_type_desc -> 'res56
    method class_signature : 'b -> class_signature -> 'res57
    method class_type_field : 'b -> class_type_field -> 'res58
    method class_type_field_desc : 'b -> class_type_field_desc -> 'res59
    method class_infos : 'b -> 'a. ('a -> 'res60) -> 'a class_infos -> 'res60
    method class_description : 'b -> class_description -> 'res61
    method class_type_declaration : 'b -> class_type_declaration -> 'res62
    method class_expr : 'b -> class_expr -> 'res63
    method class_expr_desc : 'b -> class_expr_desc -> 'res64
    method class_structure : 'b -> class_structure -> 'res65
    method class_field : 'b -> class_field -> 'res66
    method class_field_desc : 'b -> class_field_desc -> 'res67
    method class_field_kind : 'b -> class_field_kind -> 'res68
    method class_declaration : 'b -> class_declaration -> 'res69
    method module_type : 'b -> module_type -> 'res70
    method module_type_desc : 'b -> module_type_desc -> 'res71
    method functor_parameter : 'b -> functor_parameter -> 'res72
    method signature : 'b -> signature -> 'res73
    method signature_item : 'b -> signature_item -> 'res74
    method signature_item_desc : 'b -> signature_item_desc -> 'res75
    method module_declaration : 'b -> module_declaration -> 'res76
    method module_substitution : 'b -> module_substitution -> 'res77
    method module_type_declaration : 'b -> module_type_declaration -> 'res78
    method open_infos : 'b -> 'a. ('a -> 'res79) -> 'a open_infos -> 'res79
    method open_description : 'b -> open_description -> 'res80
    method open_declaration : 'b -> open_declaration -> 'res81
    method include_infos : 'b -> 'a. ('a -> 'res82) -> 'a include_infos -> 'res82
    method include_description : 'b -> include_description -> 'res83
    method include_declaration : 'b -> include_declaration -> 'res84
    method with_constraint : 'b -> with_constraint -> 'res85
    method module_expr : 'b -> module_expr -> 'res86
    method module_expr_desc : 'b -> module_expr_desc -> 'res87
    method structure : 'b -> structure -> 'res88
    method structure_item : 'b -> structure_item -> 'res89
    method structure_item_desc : 'b -> structure_item_desc -> 'res90
    method value_binding : 'b -> value_binding -> 'res91
    method module_binding : 'b -> module_binding -> 'res92
    method toplevel_phrase : 'b -> toplevel_phrase -> 'res93
    method toplevel_directive : 'b -> toplevel_directive -> 'res94
    method directive_argument : 'b -> directive_argument -> 'res95
    method directive_argument_desc : 'b -> directive_argument_desc -> 'res96
    method cases : 'b -> cases -> 'res97
    \ No newline at end of file +lift (ppxlib.Ppxlib.lift)

    Class Ppxlib.lift

    method virtual record : (string * 'res) list -> 'res
    method virtual constr : string -> 'res list -> 'res
    method virtual tuple : 'res list -> 'res
    method virtual bool : bool -> 'res
    method virtual char : char -> 'res
    method virtual int : int -> 'res
    method virtual list : 'a. ('a -> 'res) -> 'a list -> 'res
    method virtual option : 'a. ('a -> 'res) -> 'a option -> 'res
    method virtual string : string -> 'res
    method position : position -> 'res
    method location : location -> 'res
    method location_stack : location_stack -> 'res
    method loc : 'a. ('a -> 'res) -> 'a loc -> 'res
    method longident : longident -> 'res
    method longident_loc : longident_loc -> 'res
    method rec_flag : rec_flag -> 'res
    method direction_flag : direction_flag -> 'res
    method private_flag : private_flag -> 'res
    method mutable_flag : mutable_flag -> 'res
    method virtual_flag : virtual_flag -> 'res
    method override_flag : override_flag -> 'res
    method closed_flag : closed_flag -> 'res
    method label : label -> 'res
    method arg_label : arg_label -> 'res
    method variance : variance -> 'res
    method injectivity : injectivity -> 'res
    method constant : constant -> 'res
    method attribute : attribute -> 'res
    method extension : extension -> 'res
    method attributes : attributes -> 'res
    method payload : payload -> 'res
    method core_type : core_type -> 'res
    method core_type_desc : core_type_desc -> 'res
    method package_type : package_type -> 'res
    method row_field : row_field -> 'res
    method row_field_desc : row_field_desc -> 'res
    method object_field : object_field -> 'res
    method object_field_desc : object_field_desc -> 'res
    method pattern : pattern -> 'res
    method pattern_desc : pattern_desc -> 'res
    method expression : expression -> 'res
    method expression_desc : expression_desc -> 'res
    method case : case -> 'res
    method letop : letop -> 'res
    method binding_op : binding_op -> 'res
    method value_description : value_description -> 'res
    method type_declaration : type_declaration -> 'res
    method type_kind : type_kind -> 'res
    method label_declaration : label_declaration -> 'res
    method constructor_declaration : constructor_declaration -> 'res
    method constructor_arguments : constructor_arguments -> 'res
    method type_extension : type_extension -> 'res
    method extension_constructor : extension_constructor -> 'res
    method type_exception : type_exception -> 'res
    method extension_constructor_kind : extension_constructor_kind -> 'res
    method class_type : class_type -> 'res
    method class_type_desc : class_type_desc -> 'res
    method class_signature : class_signature -> 'res
    method class_type_field : class_type_field -> 'res
    method class_type_field_desc : class_type_field_desc -> 'res
    method class_infos : 'a. ('a -> 'res) -> 'a class_infos -> 'res
    method class_description : class_description -> 'res
    method class_type_declaration : class_type_declaration -> 'res
    method class_expr : class_expr -> 'res
    method class_expr_desc : class_expr_desc -> 'res
    method class_structure : class_structure -> 'res
    method class_field : class_field -> 'res
    method class_field_desc : class_field_desc -> 'res
    method class_field_kind : class_field_kind -> 'res
    method class_declaration : class_declaration -> 'res
    method module_type : module_type -> 'res
    method module_type_desc : module_type_desc -> 'res
    method functor_parameter : functor_parameter -> 'res
    method signature : signature -> 'res
    method signature_item : signature_item -> 'res
    method signature_item_desc : signature_item_desc -> 'res
    method module_declaration : module_declaration -> 'res
    method module_substitution : module_substitution -> 'res
    method module_type_declaration : module_type_declaration -> 'res
    method open_infos : 'a. ('a -> 'res) -> 'a open_infos -> 'res
    method open_description : open_description -> 'res
    method open_declaration : open_declaration -> 'res
    method include_infos : 'a. ('a -> 'res) -> 'a include_infos -> 'res
    method include_description : include_description -> 'res
    method include_declaration : include_declaration -> 'res
    method with_constraint : with_constraint -> 'res
    method module_expr : module_expr -> 'res
    method module_expr_desc : module_expr_desc -> 'res
    method structure : structure -> 'res
    method structure_item : structure_item -> 'res
    method structure_item_desc : structure_item_desc -> 'res
    method value_binding : value_binding -> 'res
    method module_binding : module_binding -> 'res
    method toplevel_phrase : toplevel_phrase -> 'res
    method toplevel_directive : toplevel_directive -> 'res
    method directive_argument : directive_argument -> 'res
    method directive_argument_desc : directive_argument_desc -> 'res
    method cases : cases -> 'res
    diff --git a/ppxlib/Ppxlib/class-lift_map_with_context/index.html b/ppxlib/Ppxlib/class-lift_map_with_context/index.html index 42042a7..adb6476 100644 --- a/ppxlib/Ppxlib/class-lift_map_with_context/index.html +++ b/ppxlib/Ppxlib/class-lift_map_with_context/index.html @@ -1,165 +1,61 @@ -lift_map_with_context (ppxlib.Ppxlib.lift_map_with_context)

    Class Ppxlib.lift_map_with_context

    method virtual record : 'ctx0 -> (string * 'res0) list -> 'res0
    method virtual constr : 'ctx1 -> string -> 'res1 list -> 'res1
    method virtual tuple : 'ctx2 -> 'res2 list -> 'res2
    method virtual other : 'a. 'ctx3 -> 'a -> 'res3
    method virtual bool : 'ctx4 -> bool -> bool * 'res4
    method virtual char : 'ctx5 -> char -> char * 'res5
    method virtual int : 'ctx6 -> int -> int * 'res6
    method virtual list : 'a. ('ctx7 -> 'a -> 'a * 'res7) -> - 'ctx7 -> +lift_map_with_context (ppxlib.Ppxlib.lift_map_with_context)

    Class Ppxlib.lift_map_with_context

    method virtual record : 'ctx -> (string * 'res) list -> 'res
    method virtual constr : 'ctx -> string -> 'res list -> 'res
    method virtual tuple : 'ctx -> 'res list -> 'res
    method virtual other : 'a. 'ctx -> 'a -> 'res
    method virtual bool : 'ctx -> bool -> bool * 'res
    method virtual char : 'ctx -> char -> char * 'res
    method virtual int : 'ctx -> int -> int * 'res
    method virtual list : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a list -> - 'a list * 'res7
    method virtual option : 'a. ('ctx8 -> 'a -> 'a * 'res8) -> - 'ctx8 -> + 'a list * 'res
    method virtual option : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a option -> - 'a option * 'res8
    method virtual string : 'ctx9 -> string -> string * 'res9
    method position : ['ctx, 'res] lift_map_with_context -> - 'ctx10 -> - position -> - position * 'res10
    method location : 'b -> 'ctx11 -> location -> location * 'res11
    method location_stack : 'b -> - 'ctx12 -> - location_stack -> - location_stack * 'res12
    method loc : 'b -> - 'a. ('ctx13 -> 'a -> 'a * 'res13) -> - 'ctx13 -> - 'a loc -> - 'a loc * 'res13
    method longident : 'b -> 'ctx14 -> longident -> longident * 'res14
    method longident_loc : 'b -> 'ctx15 -> longident_loc -> longident_loc * 'res15
    method rec_flag : 'b -> 'ctx16 -> rec_flag -> rec_flag * 'res16
    method direction_flag : 'b -> - 'ctx17 -> - direction_flag -> - direction_flag * 'res17
    method private_flag : 'b -> 'ctx18 -> private_flag -> private_flag * 'res18
    method mutable_flag : 'b -> 'ctx19 -> mutable_flag -> mutable_flag * 'res19
    method virtual_flag : 'b -> 'ctx20 -> virtual_flag -> virtual_flag * 'res20
    method override_flag : 'b -> 'ctx21 -> override_flag -> override_flag * 'res21
    method closed_flag : 'b -> 'ctx22 -> closed_flag -> closed_flag * 'res22
    method label : 'b -> 'ctx23 -> label -> label * 'res23
    method arg_label : 'b -> 'ctx24 -> arg_label -> arg_label * 'res24
    method variance : 'b -> 'ctx25 -> variance -> variance * 'res25
    method injectivity : 'b -> 'ctx26 -> injectivity -> injectivity * 'res26
    method constant : 'b -> 'ctx27 -> constant -> constant * 'res27
    method attribute : 'b -> 'ctx28 -> attribute -> attribute * 'res28
    method extension : 'b -> 'ctx29 -> extension -> extension * 'res29
    method attributes : 'b -> 'ctx30 -> attributes -> attributes * 'res30
    method payload : 'b -> 'ctx31 -> payload -> payload * 'res31
    method core_type : 'b -> 'ctx32 -> core_type -> core_type * 'res32
    method core_type_desc : 'b -> - 'ctx33 -> - core_type_desc -> - core_type_desc * 'res33
    method package_type : 'b -> 'ctx34 -> package_type -> package_type * 'res34
    method row_field : 'b -> 'ctx35 -> row_field -> row_field * 'res35
    method row_field_desc : 'b -> - 'ctx36 -> - row_field_desc -> - row_field_desc * 'res36
    method object_field : 'b -> 'ctx37 -> object_field -> object_field * 'res37
    method object_field_desc : 'b -> - 'ctx38 -> + 'a option * 'res
    method virtual string : 'ctx -> string -> string * 'res
    method position : 'ctx -> position -> position * 'res
    method location : 'ctx -> location -> location * 'res
    method location_stack : 'ctx -> location_stack -> location_stack * 'res
    method loc : 'a. ('ctx -> 'a -> 'a * 'res) -> 'ctx -> 'a loc -> 'a loc * 'res
    method longident : 'ctx -> longident -> longident * 'res
    method longident_loc : 'ctx -> longident_loc -> longident_loc * 'res
    method rec_flag : 'ctx -> rec_flag -> rec_flag * 'res
    method direction_flag : 'ctx -> direction_flag -> direction_flag * 'res
    method private_flag : 'ctx -> private_flag -> private_flag * 'res
    method mutable_flag : 'ctx -> mutable_flag -> mutable_flag * 'res
    method virtual_flag : 'ctx -> virtual_flag -> virtual_flag * 'res
    method override_flag : 'ctx -> override_flag -> override_flag * 'res
    method closed_flag : 'ctx -> closed_flag -> closed_flag * 'res
    method label : 'ctx -> label -> label * 'res
    method arg_label : 'ctx -> arg_label -> arg_label * 'res
    method variance : 'ctx -> variance -> variance * 'res
    method injectivity : 'ctx -> injectivity -> injectivity * 'res
    method constant : 'ctx -> constant -> constant * 'res
    method attribute : 'ctx -> attribute -> attribute * 'res
    method extension : 'ctx -> extension -> extension * 'res
    method attributes : 'ctx -> attributes -> attributes * 'res
    method payload : 'ctx -> payload -> payload * 'res
    method core_type : 'ctx -> core_type -> core_type * 'res
    method core_type_desc : 'ctx -> core_type_desc -> core_type_desc * 'res
    method package_type : 'ctx -> package_type -> package_type * 'res
    method row_field : 'ctx -> row_field -> row_field * 'res
    method row_field_desc : 'ctx -> row_field_desc -> row_field_desc * 'res
    method object_field : 'ctx -> object_field -> object_field * 'res
    method object_field_desc : 'ctx -> object_field_desc -> - object_field_desc * 'res38
    method pattern : 'b -> 'ctx39 -> pattern -> pattern * 'res39
    method pattern_desc : 'b -> 'ctx40 -> pattern_desc -> pattern_desc * 'res40
    method expression : 'b -> 'ctx41 -> expression -> expression * 'res41
    method expression_desc : 'b -> - 'ctx42 -> - expression_desc -> - expression_desc * 'res42
    method case : 'b -> 'ctx43 -> case -> case * 'res43
    method letop : 'b -> 'ctx44 -> letop -> letop * 'res44
    method binding_op : 'b -> 'ctx45 -> binding_op -> binding_op * 'res45
    method value_description : 'b -> - 'ctx46 -> + object_field_desc * 'res
    method pattern : 'ctx -> pattern -> pattern * 'res
    method pattern_desc : 'ctx -> pattern_desc -> pattern_desc * 'res
    method expression : 'ctx -> expression -> expression * 'res
    method expression_desc : 'ctx -> expression_desc -> expression_desc * 'res
    method case : 'ctx -> case -> case * 'res
    method letop : 'ctx -> letop -> letop * 'res
    method binding_op : 'ctx -> binding_op -> binding_op * 'res
    method value_description : 'ctx -> value_description -> - value_description * 'res46
    method type_declaration : 'b -> - 'ctx47 -> - type_declaration -> - type_declaration * 'res47
    method type_kind : 'b -> 'ctx48 -> type_kind -> type_kind * 'res48
    method label_declaration : 'b -> - 'ctx49 -> + value_description * 'res
    method type_declaration : 'ctx -> type_declaration -> type_declaration * 'res
    method type_kind : 'ctx -> type_kind -> type_kind * 'res
    method label_declaration : 'ctx -> label_declaration -> - label_declaration * 'res49
    method constructor_declaration : 'b -> - 'ctx50 -> + label_declaration * 'res
    method constructor_declaration : 'ctx -> constructor_declaration -> - constructor_declaration * 'res50
    method constructor_arguments : 'b -> - 'ctx51 -> + constructor_declaration * 'res
    method constructor_arguments : 'ctx -> constructor_arguments -> - constructor_arguments * 'res51
    method type_extension : 'b -> - 'ctx52 -> - type_extension -> - type_extension * 'res52
    method extension_constructor : 'b -> - 'ctx53 -> + constructor_arguments * 'res
    method type_extension : 'ctx -> type_extension -> type_extension * 'res
    method extension_constructor : 'ctx -> extension_constructor -> - extension_constructor * 'res53
    method type_exception : 'b -> - 'ctx54 -> - type_exception -> - type_exception * 'res54
    method extension_constructor_kind : 'b -> - 'ctx55 -> + extension_constructor * 'res
    method type_exception : 'ctx -> type_exception -> type_exception * 'res
    method extension_constructor_kind : 'ctx -> extension_constructor_kind -> - extension_constructor_kind * 'res55
    method class_type : 'b -> 'ctx56 -> class_type -> class_type * 'res56
    method class_type_desc : 'b -> - 'ctx57 -> - class_type_desc -> - class_type_desc * 'res57
    method class_signature : 'b -> - 'ctx58 -> - class_signature -> - class_signature * 'res58
    method class_type_field : 'b -> - 'ctx59 -> - class_type_field -> - class_type_field * 'res59
    method class_type_field_desc : 'b -> - 'ctx60 -> + extension_constructor_kind * 'res
    method class_type : 'ctx -> class_type -> class_type * 'res
    method class_type_desc : 'ctx -> class_type_desc -> class_type_desc * 'res
    method class_signature : 'ctx -> class_signature -> class_signature * 'res
    method class_type_field : 'ctx -> class_type_field -> class_type_field * 'res
    method class_type_field_desc : 'ctx -> class_type_field_desc -> - class_type_field_desc * 'res60
    method class_infos : 'b -> - 'a. ('ctx61 -> 'a -> 'a * 'res61) -> - 'ctx61 -> + class_type_field_desc * 'res
    method class_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a class_infos -> - 'a class_infos * 'res61
    method class_description : 'b -> - 'ctx62 -> + 'a class_infos * 'res
    method class_description : 'ctx -> class_description -> - class_description * 'res62
    method class_type_declaration : 'b -> - 'ctx63 -> + class_description * 'res
    method class_type_declaration : 'ctx -> class_type_declaration -> - class_type_declaration * 'res63
    method class_expr : 'b -> 'ctx64 -> class_expr -> class_expr * 'res64
    method class_expr_desc : 'b -> - 'ctx65 -> - class_expr_desc -> - class_expr_desc * 'res65
    method class_structure : 'b -> - 'ctx66 -> - class_structure -> - class_structure * 'res66
    method class_field : 'b -> 'ctx67 -> class_field -> class_field * 'res67
    method class_field_desc : 'b -> - 'ctx68 -> - class_field_desc -> - class_field_desc * 'res68
    method class_field_kind : 'b -> - 'ctx69 -> - class_field_kind -> - class_field_kind * 'res69
    method class_declaration : 'b -> - 'ctx70 -> + class_type_declaration * 'res
    method class_expr : 'ctx -> class_expr -> class_expr * 'res
    method class_expr_desc : 'ctx -> class_expr_desc -> class_expr_desc * 'res
    method class_structure : 'ctx -> class_structure -> class_structure * 'res
    method class_field : 'ctx -> class_field -> class_field * 'res
    method class_field_desc : 'ctx -> class_field_desc -> class_field_desc * 'res
    method class_field_kind : 'ctx -> class_field_kind -> class_field_kind * 'res
    method class_declaration : 'ctx -> class_declaration -> - class_declaration * 'res70
    method module_type : 'b -> 'ctx71 -> module_type -> module_type * 'res71
    method module_type_desc : 'b -> - 'ctx72 -> - module_type_desc -> - module_type_desc * 'res72
    method functor_parameter : 'b -> - 'ctx73 -> + class_declaration * 'res
    method module_type : 'ctx -> module_type -> module_type * 'res
    method module_type_desc : 'ctx -> module_type_desc -> module_type_desc * 'res
    method functor_parameter : 'ctx -> functor_parameter -> - functor_parameter * 'res73
    method signature : 'b -> 'ctx74 -> signature -> signature * 'res74
    method signature_item : 'b -> - 'ctx75 -> - signature_item -> - signature_item * 'res75
    method signature_item_desc : 'b -> - 'ctx76 -> + functor_parameter * 'res
    method signature : 'ctx -> signature -> signature * 'res
    method signature_item : 'ctx -> signature_item -> signature_item * 'res
    method signature_item_desc : 'ctx -> signature_item_desc -> - signature_item_desc * 'res76
    method module_declaration : 'b -> - 'ctx77 -> + signature_item_desc * 'res
    method module_declaration : 'ctx -> module_declaration -> - module_declaration * 'res77
    method module_substitution : 'b -> - 'ctx78 -> + module_declaration * 'res
    method module_substitution : 'ctx -> module_substitution -> - module_substitution * 'res78
    method module_type_declaration : 'b -> - 'ctx79 -> + module_substitution * 'res
    method module_type_declaration : 'ctx -> module_type_declaration -> - module_type_declaration * 'res79
    method open_infos : 'b -> - 'a. ('ctx80 -> 'a -> 'a * 'res80) -> - 'ctx80 -> + module_type_declaration * 'res
    method open_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a open_infos -> - 'a open_infos * 'res80
    method open_description : 'b -> - 'ctx81 -> - open_description -> - open_description * 'res81
    method open_declaration : 'b -> - 'ctx82 -> - open_declaration -> - open_declaration * 'res82
    method include_infos : 'b -> - 'a. ('ctx83 -> 'a -> 'a * 'res83) -> - 'ctx83 -> + 'a open_infos * 'res
    method open_description : 'ctx -> open_description -> open_description * 'res
    method open_declaration : 'ctx -> open_declaration -> open_declaration * 'res
    method include_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a include_infos -> - 'a include_infos * 'res83
    method include_description : 'b -> - 'ctx84 -> + 'a include_infos * 'res
    method include_description : 'ctx -> include_description -> - include_description * 'res84
    method include_declaration : 'b -> - 'ctx85 -> + include_description * 'res
    method include_declaration : 'ctx -> include_declaration -> - include_declaration * 'res85
    method with_constraint : 'b -> - 'ctx86 -> - with_constraint -> - with_constraint * 'res86
    method module_expr : 'b -> 'ctx87 -> module_expr -> module_expr * 'res87
    method module_expr_desc : 'b -> - 'ctx88 -> - module_expr_desc -> - module_expr_desc * 'res88
    method structure : 'b -> 'ctx89 -> structure -> structure * 'res89
    method structure_item : 'b -> - 'ctx90 -> - structure_item -> - structure_item * 'res90
    method structure_item_desc : 'b -> - 'ctx91 -> + include_declaration * 'res
    method with_constraint : 'ctx -> with_constraint -> with_constraint * 'res
    method module_expr : 'ctx -> module_expr -> module_expr * 'res
    method module_expr_desc : 'ctx -> module_expr_desc -> module_expr_desc * 'res
    method structure : 'ctx -> structure -> structure * 'res
    method structure_item : 'ctx -> structure_item -> structure_item * 'res
    method structure_item_desc : 'ctx -> structure_item_desc -> - structure_item_desc * 'res91
    method value_binding : 'b -> 'ctx92 -> value_binding -> value_binding * 'res92
    method module_binding : 'b -> - 'ctx93 -> - module_binding -> - module_binding * 'res93
    method toplevel_phrase : 'b -> - 'ctx94 -> - toplevel_phrase -> - toplevel_phrase * 'res94
    method toplevel_directive : 'b -> - 'ctx95 -> + structure_item_desc * 'res
    method value_binding : 'ctx -> value_binding -> value_binding * 'res
    method module_binding : 'ctx -> module_binding -> module_binding * 'res
    method toplevel_phrase : 'ctx -> toplevel_phrase -> toplevel_phrase * 'res
    method toplevel_directive : 'ctx -> toplevel_directive -> - toplevel_directive * 'res95
    method directive_argument : 'b -> - 'ctx96 -> + toplevel_directive * 'res
    method directive_argument : 'ctx -> directive_argument -> - directive_argument * 'res96
    method directive_argument_desc : 'b -> - 'ctx97 -> + directive_argument * 'res
    method directive_argument_desc : 'ctx -> directive_argument_desc -> - directive_argument_desc * 'res97
    method cases : 'b -> 'ctx98 -> cases -> cases * 'res98
    \ No newline at end of file + directive_argument_desc * 'res
    method cases : 'ctx -> cases -> cases * 'res
    diff --git a/ppxlib/Ppxlib/class-map/index.html b/ppxlib/Ppxlib/class-map/index.html index c884d2b..6795438 100644 --- a/ppxlib/Ppxlib/class-map/index.html +++ b/ppxlib/Ppxlib/class-map/index.html @@ -1,21 +1,7 @@ -map (ppxlib.Ppxlib.map)

    Class Ppxlib.map

    method virtual bool : bool -> bool
    method virtual char : char -> char
    method virtual int : int -> int
    method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
    method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
    method virtual string : string -> string
    method position : map -> position -> position
    method location : 'b -> location -> location
    method location_stack : 'b -> location_stack -> location_stack
    method loc : 'b -> 'a. ('a -> 'a) -> 'a loc -> 'a loc
    method longident : 'b -> longident -> longident
    method longident_loc : 'b -> longident_loc -> longident_loc
    method rec_flag : 'b -> rec_flag -> rec_flag
    method direction_flag : 'b -> direction_flag -> direction_flag
    method private_flag : 'b -> private_flag -> private_flag
    method mutable_flag : 'b -> mutable_flag -> mutable_flag
    method virtual_flag : 'b -> virtual_flag -> virtual_flag
    method override_flag : 'b -> override_flag -> override_flag
    method closed_flag : 'b -> closed_flag -> closed_flag
    method label : 'b -> label -> label
    method arg_label : 'b -> arg_label -> arg_label
    method variance : 'b -> variance -> variance
    method injectivity : 'b -> injectivity -> injectivity
    method constant : 'b -> constant -> constant
    method attribute : 'b -> attribute -> attribute
    method extension : 'b -> extension -> extension
    method attributes : 'b -> attributes -> attributes
    method payload : 'b -> payload -> payload
    method core_type : 'b -> core_type -> core_type
    method core_type_desc : 'b -> core_type_desc -> core_type_desc
    method package_type : 'b -> package_type -> package_type
    method row_field : 'b -> row_field -> row_field
    method row_field_desc : 'b -> row_field_desc -> row_field_desc
    method object_field : 'b -> object_field -> object_field
    method object_field_desc : 'b -> object_field_desc -> object_field_desc
    method pattern : 'b -> pattern -> pattern
    method pattern_desc : 'b -> pattern_desc -> pattern_desc
    method expression : 'b -> expression -> expression
    method expression_desc : 'b -> expression_desc -> expression_desc
    method case : 'b -> case -> case
    method letop : 'b -> letop -> letop
    method binding_op : 'b -> binding_op -> binding_op
    method value_description : 'b -> value_description -> value_description
    method type_declaration : 'b -> type_declaration -> type_declaration
    method type_kind : 'b -> type_kind -> type_kind
    method label_declaration : 'b -> label_declaration -> label_declaration
    method constructor_declaration : 'b -> - constructor_declaration -> - constructor_declaration
    method constructor_arguments : 'b -> - constructor_arguments -> - constructor_arguments
    method type_extension : 'b -> type_extension -> type_extension
    method extension_constructor : 'b -> - extension_constructor -> - extension_constructor
    method type_exception : 'b -> type_exception -> type_exception
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - extension_constructor_kind
    method class_type : 'b -> class_type -> class_type
    method class_type_desc : 'b -> class_type_desc -> class_type_desc
    method class_signature : 'b -> class_signature -> class_signature
    method class_type_field : 'b -> class_type_field -> class_type_field
    method class_type_field_desc : 'b -> - class_type_field_desc -> - class_type_field_desc
    method class_infos : 'b -> 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
    method class_description : 'b -> class_description -> class_description
    method class_type_declaration : 'b -> - class_type_declaration -> - class_type_declaration
    method class_expr : 'b -> class_expr -> class_expr
    method class_expr_desc : 'b -> class_expr_desc -> class_expr_desc
    method class_structure : 'b -> class_structure -> class_structure
    method class_field : 'b -> class_field -> class_field
    method class_field_desc : 'b -> class_field_desc -> class_field_desc
    method class_field_kind : 'b -> class_field_kind -> class_field_kind
    method class_declaration : 'b -> class_declaration -> class_declaration
    method module_type : 'b -> module_type -> module_type
    method module_type_desc : 'b -> module_type_desc -> module_type_desc
    method functor_parameter : 'b -> functor_parameter -> functor_parameter
    method signature : 'b -> signature -> signature
    method signature_item : 'b -> signature_item -> signature_item
    method signature_item_desc : 'b -> signature_item_desc -> signature_item_desc
    method module_declaration : 'b -> module_declaration -> module_declaration
    method module_substitution : 'b -> module_substitution -> module_substitution
    method module_type_declaration : 'b -> - module_type_declaration -> - module_type_declaration
    method open_infos : 'b -> 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
    method open_description : 'b -> open_description -> open_description
    method open_declaration : 'b -> open_declaration -> open_declaration
    method include_infos : 'b -> - 'a. ('a -> 'a) -> - 'a include_infos -> - 'a include_infos
    method include_description : 'b -> include_description -> include_description
    method include_declaration : 'b -> include_declaration -> include_declaration
    method with_constraint : 'b -> with_constraint -> with_constraint
    method module_expr : 'b -> module_expr -> module_expr
    method module_expr_desc : 'b -> module_expr_desc -> module_expr_desc
    method structure : 'b -> structure -> structure
    method structure_item : 'b -> structure_item -> structure_item
    method structure_item_desc : 'b -> structure_item_desc -> structure_item_desc
    method value_binding : 'b -> value_binding -> value_binding
    method module_binding : 'b -> module_binding -> module_binding
    method toplevel_phrase : 'b -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'b -> toplevel_directive -> toplevel_directive
    method directive_argument : 'b -> directive_argument -> directive_argument
    method directive_argument_desc : 'b -> - directive_argument_desc -> - directive_argument_desc
    method cases : 'b -> cases -> cases
    \ No newline at end of file +map (ppxlib.Ppxlib.map)

    Class Ppxlib.map

    method virtual bool : bool -> bool
    method virtual char : char -> char
    method virtual int : int -> int
    method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
    method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
    method virtual string : string -> string
    method position : position -> position
    method location : location -> location
    method location_stack : location_stack -> location_stack
    method loc : 'a. ('a -> 'a) -> 'a loc -> 'a loc
    method longident : longident -> longident
    method longident_loc : longident_loc -> longident_loc
    method rec_flag : rec_flag -> rec_flag
    method direction_flag : direction_flag -> direction_flag
    method private_flag : private_flag -> private_flag
    method mutable_flag : mutable_flag -> mutable_flag
    method virtual_flag : virtual_flag -> virtual_flag
    method override_flag : override_flag -> override_flag
    method closed_flag : closed_flag -> closed_flag
    method label : label -> label
    method arg_label : arg_label -> arg_label
    method variance : variance -> variance
    method injectivity : injectivity -> injectivity
    method constant : constant -> constant
    method attribute : attribute -> attribute
    method extension : extension -> extension
    method attributes : attributes -> attributes
    method payload : payload -> payload
    method core_type : core_type -> core_type
    method core_type_desc : core_type_desc -> core_type_desc
    method package_type : package_type -> package_type
    method row_field : row_field -> row_field
    method row_field_desc : row_field_desc -> row_field_desc
    method object_field : object_field -> object_field
    method object_field_desc : object_field_desc -> object_field_desc
    method pattern : pattern -> pattern
    method pattern_desc : pattern_desc -> pattern_desc
    method expression : expression -> expression
    method expression_desc : expression_desc -> expression_desc
    method case : case -> case
    method letop : letop -> letop
    method binding_op : binding_op -> binding_op
    method value_description : value_description -> value_description
    method type_declaration : type_declaration -> type_declaration
    method type_kind : type_kind -> type_kind
    method label_declaration : label_declaration -> label_declaration
    method constructor_declaration : constructor_declaration -> + constructor_declaration
    method constructor_arguments : constructor_arguments -> constructor_arguments
    method type_extension : type_extension -> type_extension
    method extension_constructor : extension_constructor -> extension_constructor
    method type_exception : type_exception -> type_exception
    method extension_constructor_kind : extension_constructor_kind -> + extension_constructor_kind
    method class_type : class_type -> class_type
    method class_type_desc : class_type_desc -> class_type_desc
    method class_signature : class_signature -> class_signature
    method class_type_field : class_type_field -> class_type_field
    method class_type_field_desc : class_type_field_desc -> class_type_field_desc
    method class_infos : 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
    method class_description : class_description -> class_description
    method class_type_declaration : class_type_declaration -> + class_type_declaration
    method class_expr : class_expr -> class_expr
    method class_expr_desc : class_expr_desc -> class_expr_desc
    method class_structure : class_structure -> class_structure
    method class_field : class_field -> class_field
    method class_field_desc : class_field_desc -> class_field_desc
    method class_field_kind : class_field_kind -> class_field_kind
    method class_declaration : class_declaration -> class_declaration
    method module_type : module_type -> module_type
    method module_type_desc : module_type_desc -> module_type_desc
    method functor_parameter : functor_parameter -> functor_parameter
    method signature : signature -> signature
    method signature_item : signature_item -> signature_item
    method signature_item_desc : signature_item_desc -> signature_item_desc
    method module_declaration : module_declaration -> module_declaration
    method module_substitution : module_substitution -> module_substitution
    method module_type_declaration : module_type_declaration -> + module_type_declaration
    method open_infos : 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
    method open_description : open_description -> open_description
    method open_declaration : open_declaration -> open_declaration
    method include_infos : 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos
    method include_description : include_description -> include_description
    method include_declaration : include_declaration -> include_declaration
    method with_constraint : with_constraint -> with_constraint
    method module_expr : module_expr -> module_expr
    method module_expr_desc : module_expr_desc -> module_expr_desc
    method structure : structure -> structure
    method structure_item : structure_item -> structure_item
    method structure_item_desc : structure_item_desc -> structure_item_desc
    method value_binding : value_binding -> value_binding
    method module_binding : module_binding -> module_binding
    method toplevel_phrase : toplevel_phrase -> toplevel_phrase
    method toplevel_directive : toplevel_directive -> toplevel_directive
    method directive_argument : directive_argument -> directive_argument
    method directive_argument_desc : directive_argument_desc -> + directive_argument_desc
    method cases : cases -> cases
    diff --git a/ppxlib/Ppxlib/class-map_with_context/index.html b/ppxlib/Ppxlib/class-map_with_context/index.html index feac3cc..2c76bb4 100644 --- a/ppxlib/Ppxlib/class-map_with_context/index.html +++ b/ppxlib/Ppxlib/class-map_with_context/index.html @@ -1,83 +1,30 @@ -map_with_context (ppxlib.Ppxlib.map_with_context)

    Class Ppxlib.map_with_context

    method virtual bool : 'ctx0 -> bool -> bool
    method virtual char : 'ctx1 -> char -> char
    method virtual int : 'ctx2 -> int -> int
    method virtual list : 'a. ('ctx3 -> 'a -> 'a) -> 'ctx3 -> 'a list -> 'a list
    method virtual option : 'a. ('ctx4 -> 'a -> 'a) -> - 'ctx4 -> +map_with_context (ppxlib.Ppxlib.map_with_context)

    Class Ppxlib.map_with_context

    method virtual bool : 'ctx -> bool -> bool
    method virtual char : 'ctx -> char -> char
    method virtual int : 'ctx -> int -> int
    method virtual list : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a list -> 'a list
    method virtual option : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a option -> - 'a option
    method virtual string : 'ctx5 -> string -> string
    method position : 'ctx map_with_context -> 'ctx6 -> position -> position
    method location : 'b -> 'ctx7 -> location -> location
    method location_stack : 'b -> 'ctx8 -> location_stack -> location_stack
    method loc : 'b -> 'a. ('ctx9 -> 'a -> 'a) -> 'ctx9 -> 'a loc -> 'a loc
    method longident : 'b -> 'ctx10 -> longident -> longident
    method longident_loc : 'b -> 'ctx11 -> longident_loc -> longident_loc
    method rec_flag : 'b -> 'ctx12 -> rec_flag -> rec_flag
    method direction_flag : 'b -> 'ctx13 -> direction_flag -> direction_flag
    method private_flag : 'b -> 'ctx14 -> private_flag -> private_flag
    method mutable_flag : 'b -> 'ctx15 -> mutable_flag -> mutable_flag
    method virtual_flag : 'b -> 'ctx16 -> virtual_flag -> virtual_flag
    method override_flag : 'b -> 'ctx17 -> override_flag -> override_flag
    method closed_flag : 'b -> 'ctx18 -> closed_flag -> closed_flag
    method label : 'b -> 'ctx19 -> label -> label
    method arg_label : 'b -> 'ctx20 -> arg_label -> arg_label
    method variance : 'b -> 'ctx21 -> variance -> variance
    method injectivity : 'b -> 'ctx22 -> injectivity -> injectivity
    method constant : 'b -> 'ctx23 -> constant -> constant
    method attribute : 'b -> 'ctx24 -> attribute -> attribute
    method extension : 'b -> 'ctx25 -> extension -> extension
    method attributes : 'b -> 'ctx26 -> attributes -> attributes
    method payload : 'b -> 'ctx27 -> payload -> payload
    method core_type : 'b -> 'ctx28 -> core_type -> core_type
    method core_type_desc : 'b -> 'ctx29 -> core_type_desc -> core_type_desc
    method package_type : 'b -> 'ctx30 -> package_type -> package_type
    method row_field : 'b -> 'ctx31 -> row_field -> row_field
    method row_field_desc : 'b -> 'ctx32 -> row_field_desc -> row_field_desc
    method object_field : 'b -> 'ctx33 -> object_field -> object_field
    method object_field_desc : 'b -> - 'ctx34 -> - object_field_desc -> - object_field_desc
    method pattern : 'b -> 'ctx35 -> pattern -> pattern
    method pattern_desc : 'b -> 'ctx36 -> pattern_desc -> pattern_desc
    method expression : 'b -> 'ctx37 -> expression -> expression
    method expression_desc : 'b -> 'ctx38 -> expression_desc -> expression_desc
    method case : 'b -> 'ctx39 -> case -> case
    method letop : 'b -> 'ctx40 -> letop -> letop
    method binding_op : 'b -> 'ctx41 -> binding_op -> binding_op
    method value_description : 'b -> - 'ctx42 -> - value_description -> - value_description
    method type_declaration : 'b -> 'ctx43 -> type_declaration -> type_declaration
    method type_kind : 'b -> 'ctx44 -> type_kind -> type_kind
    method label_declaration : 'b -> - 'ctx45 -> - label_declaration -> - label_declaration
    method constructor_declaration : 'b -> - 'ctx46 -> + 'a option
    method virtual string : 'ctx -> string -> string
    method position : 'ctx -> position -> position
    method location : 'ctx -> location -> location
    method location_stack : 'ctx -> location_stack -> location_stack
    method loc : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a loc -> 'a loc
    method longident : 'ctx -> longident -> longident
    method longident_loc : 'ctx -> longident_loc -> longident_loc
    method rec_flag : 'ctx -> rec_flag -> rec_flag
    method direction_flag : 'ctx -> direction_flag -> direction_flag
    method private_flag : 'ctx -> private_flag -> private_flag
    method mutable_flag : 'ctx -> mutable_flag -> mutable_flag
    method virtual_flag : 'ctx -> virtual_flag -> virtual_flag
    method override_flag : 'ctx -> override_flag -> override_flag
    method closed_flag : 'ctx -> closed_flag -> closed_flag
    method label : 'ctx -> label -> label
    method arg_label : 'ctx -> arg_label -> arg_label
    method variance : 'ctx -> variance -> variance
    method injectivity : 'ctx -> injectivity -> injectivity
    method constant : 'ctx -> constant -> constant
    method attribute : 'ctx -> attribute -> attribute
    method extension : 'ctx -> extension -> extension
    method attributes : 'ctx -> attributes -> attributes
    method payload : 'ctx -> payload -> payload
    method core_type : 'ctx -> core_type -> core_type
    method core_type_desc : 'ctx -> core_type_desc -> core_type_desc
    method package_type : 'ctx -> package_type -> package_type
    method row_field : 'ctx -> row_field -> row_field
    method row_field_desc : 'ctx -> row_field_desc -> row_field_desc
    method object_field : 'ctx -> object_field -> object_field
    method object_field_desc : 'ctx -> object_field_desc -> object_field_desc
    method pattern : 'ctx -> pattern -> pattern
    method pattern_desc : 'ctx -> pattern_desc -> pattern_desc
    method expression : 'ctx -> expression -> expression
    method expression_desc : 'ctx -> expression_desc -> expression_desc
    method case : 'ctx -> case -> case
    method letop : 'ctx -> letop -> letop
    method binding_op : 'ctx -> binding_op -> binding_op
    method value_description : 'ctx -> value_description -> value_description
    method type_declaration : 'ctx -> type_declaration -> type_declaration
    method type_kind : 'ctx -> type_kind -> type_kind
    method label_declaration : 'ctx -> label_declaration -> label_declaration
    method constructor_declaration : 'ctx -> constructor_declaration -> - constructor_declaration
    method constructor_arguments : 'b -> - 'ctx47 -> + constructor_declaration
    method constructor_arguments : 'ctx -> constructor_arguments -> - constructor_arguments
    method type_extension : 'b -> 'ctx48 -> type_extension -> type_extension
    method extension_constructor : 'b -> - 'ctx49 -> + constructor_arguments
    method type_extension : 'ctx -> type_extension -> type_extension
    method extension_constructor : 'ctx -> extension_constructor -> - extension_constructor
    method type_exception : 'b -> 'ctx50 -> type_exception -> type_exception
    method extension_constructor_kind : 'b -> - 'ctx51 -> + extension_constructor
    method type_exception : 'ctx -> type_exception -> type_exception
    method extension_constructor_kind : 'ctx -> extension_constructor_kind -> - extension_constructor_kind
    method class_type : 'b -> 'ctx52 -> class_type -> class_type
    method class_type_desc : 'b -> 'ctx53 -> class_type_desc -> class_type_desc
    method class_signature : 'b -> 'ctx54 -> class_signature -> class_signature
    method class_type_field : 'b -> 'ctx55 -> class_type_field -> class_type_field
    method class_type_field_desc : 'b -> - 'ctx56 -> + extension_constructor_kind
    method class_type : 'ctx -> class_type -> class_type
    method class_type_desc : 'ctx -> class_type_desc -> class_type_desc
    method class_signature : 'ctx -> class_signature -> class_signature
    method class_type_field : 'ctx -> class_type_field -> class_type_field
    method class_type_field_desc : 'ctx -> class_type_field_desc -> - class_type_field_desc
    method class_infos : 'b -> - 'a. ('ctx57 -> 'a -> 'a) -> - 'ctx57 -> + class_type_field_desc
    method class_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a class_infos -> - 'a class_infos
    method class_description : 'b -> - 'ctx58 -> - class_description -> - class_description
    method class_type_declaration : 'b -> - 'ctx59 -> + 'a class_infos
    method class_description : 'ctx -> class_description -> class_description
    method class_type_declaration : 'ctx -> class_type_declaration -> - class_type_declaration
    method class_expr : 'b -> 'ctx60 -> class_expr -> class_expr
    method class_expr_desc : 'b -> 'ctx61 -> class_expr_desc -> class_expr_desc
    method class_structure : 'b -> 'ctx62 -> class_structure -> class_structure
    method class_field : 'b -> 'ctx63 -> class_field -> class_field
    method class_field_desc : 'b -> 'ctx64 -> class_field_desc -> class_field_desc
    method class_field_kind : 'b -> 'ctx65 -> class_field_kind -> class_field_kind
    method class_declaration : 'b -> - 'ctx66 -> - class_declaration -> - class_declaration
    method module_type : 'b -> 'ctx67 -> module_type -> module_type
    method module_type_desc : 'b -> 'ctx68 -> module_type_desc -> module_type_desc
    method functor_parameter : 'b -> - 'ctx69 -> - functor_parameter -> - functor_parameter
    method signature : 'b -> 'ctx70 -> signature -> signature
    method signature_item : 'b -> 'ctx71 -> signature_item -> signature_item
    method signature_item_desc : 'b -> - 'ctx72 -> - signature_item_desc -> - signature_item_desc
    method module_declaration : 'b -> - 'ctx73 -> - module_declaration -> - module_declaration
    method module_substitution : 'b -> - 'ctx74 -> - module_substitution -> - module_substitution
    method module_type_declaration : 'b -> - 'ctx75 -> + class_type_declaration
    method class_expr : 'ctx -> class_expr -> class_expr
    method class_expr_desc : 'ctx -> class_expr_desc -> class_expr_desc
    method class_structure : 'ctx -> class_structure -> class_structure
    method class_field : 'ctx -> class_field -> class_field
    method class_field_desc : 'ctx -> class_field_desc -> class_field_desc
    method class_field_kind : 'ctx -> class_field_kind -> class_field_kind
    method class_declaration : 'ctx -> class_declaration -> class_declaration
    method module_type : 'ctx -> module_type -> module_type
    method module_type_desc : 'ctx -> module_type_desc -> module_type_desc
    method functor_parameter : 'ctx -> functor_parameter -> functor_parameter
    method signature : 'ctx -> signature -> signature
    method signature_item : 'ctx -> signature_item -> signature_item
    method signature_item_desc : 'ctx -> signature_item_desc -> signature_item_desc
    method module_declaration : 'ctx -> module_declaration -> module_declaration
    method module_substitution : 'ctx -> module_substitution -> module_substitution
    method module_type_declaration : 'ctx -> module_type_declaration -> - module_type_declaration
    method open_infos : 'b -> - 'a. ('ctx76 -> 'a -> 'a) -> - 'ctx76 -> + module_type_declaration
    method open_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a open_infos -> - 'a open_infos
    method open_description : 'b -> 'ctx77 -> open_description -> open_description
    method open_declaration : 'b -> 'ctx78 -> open_declaration -> open_declaration
    method include_infos : 'b -> - 'a. ('ctx79 -> 'a -> 'a) -> - 'ctx79 -> + 'a open_infos
    method open_description : 'ctx -> open_description -> open_description
    method open_declaration : 'ctx -> open_declaration -> open_declaration
    method include_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a include_infos -> - 'a include_infos
    method include_description : 'b -> - 'ctx80 -> - include_description -> - include_description
    method include_declaration : 'b -> - 'ctx81 -> - include_declaration -> - include_declaration
    method with_constraint : 'b -> 'ctx82 -> with_constraint -> with_constraint
    method module_expr : 'b -> 'ctx83 -> module_expr -> module_expr
    method module_expr_desc : 'b -> 'ctx84 -> module_expr_desc -> module_expr_desc
    method structure : 'b -> 'ctx85 -> structure -> structure
    method structure_item : 'b -> 'ctx86 -> structure_item -> structure_item
    method structure_item_desc : 'b -> - 'ctx87 -> - structure_item_desc -> - structure_item_desc
    method value_binding : 'b -> 'ctx88 -> value_binding -> value_binding
    method module_binding : 'b -> 'ctx89 -> module_binding -> module_binding
    method toplevel_phrase : 'b -> 'ctx90 -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'b -> - 'ctx91 -> - toplevel_directive -> - toplevel_directive
    method directive_argument : 'b -> - 'ctx92 -> - directive_argument -> - directive_argument
    method directive_argument_desc : 'b -> - 'ctx93 -> + 'a include_infos
    method include_description : 'ctx -> include_description -> include_description
    method include_declaration : 'ctx -> include_declaration -> include_declaration
    method with_constraint : 'ctx -> with_constraint -> with_constraint
    method module_expr : 'ctx -> module_expr -> module_expr
    method module_expr_desc : 'ctx -> module_expr_desc -> module_expr_desc
    method structure : 'ctx -> structure -> structure
    method structure_item : 'ctx -> structure_item -> structure_item
    method structure_item_desc : 'ctx -> structure_item_desc -> structure_item_desc
    method value_binding : 'ctx -> value_binding -> value_binding
    method module_binding : 'ctx -> module_binding -> module_binding
    method toplevel_phrase : 'ctx -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'ctx -> toplevel_directive -> toplevel_directive
    method directive_argument : 'ctx -> directive_argument -> directive_argument
    method directive_argument_desc : 'ctx -> directive_argument_desc -> - directive_argument_desc
    method cases : 'b -> 'ctx94 -> cases -> cases
    \ No newline at end of file + directive_argument_desc
    method cases : 'ctx -> cases -> cases
    diff --git a/ppxlib/Ppxlib/class-type_is_recursive/index.html b/ppxlib/Ppxlib/class-type_is_recursive/index.html index eecae22..1298244 100644 --- a/ppxlib/Ppxlib/class-type_is_recursive/index.html +++ b/ppxlib/Ppxlib/class-type_is_recursive/index.html @@ -1,2 +1,2 @@ -type_is_recursive (ppxlib.Ppxlib.type_is_recursive)

    Class Ppxlib.type_is_recursive

    (new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

    inherit Ppxlib__.Ast_traverse0.iter
    val type_names : string list
    method return_true : unit -> unit
    method go : unit -> Ppxlib__.Import.rec_flag
    \ No newline at end of file +type_is_recursive (ppxlib.Ppxlib.type_is_recursive)

    Class Ppxlib.type_is_recursive

    (new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

    inherit Ppxlib__.Ast_traverse0.iter
    val type_names : string list
    method return_true : unit -> unit
    method go : unit -> Ppxlib__.Import.rec_flag
    diff --git a/ppxlib/Ppxlib/index.html b/ppxlib/Ppxlib/index.html index 5f4c0e5..0b63eaf 100644 --- a/ppxlib/Ppxlib/index.html +++ b/ppxlib/Ppxlib/index.html @@ -1,5 +1,5 @@ -Ppxlib (ppxlib.Ppxlib)

    Module Ppxlib

    Standard library for ppx rewriters

    ppxlib is meant to be opened globally in your PPX source files.

    Opening it comes with two advantages. First, it will shadow the compiler-libs modules. The compiler-libs modules are unstable and aren't meant to be used, so shadowing them is a good protection mechanism. In case you don't want to open Ppxlib, you can open Ocaml_shadow to get the same protection. Second, it will bring several modules in scope, that are useful to have when writing a rewriter:

    • The main ppxlib modules, such as modules to help manipulate the AST (Ast_builder, Ast_pattern), and a few functions.
    • Modules from other libraries, such as Ast_helper or Pprintast,
    • The whole AST types (by including the Ast module).

    The core ppxlib entries

    Manipulating the AST

    module Ast_builder : sig ... end

    Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

    module Ast_pattern : sig ... end

    This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

    module Ast_traverse : sig ... end

    This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

    Context-free rewriting

    module Context_free : sig ... end

    Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

    module Deriving : sig ... end

    Deriving code from type declarations.

    module Extension : sig ... end

    Declare extenders to rewrite extension nodes.

    module Expansion_context : sig ... end

    The context given to rewriting rules when expanding.

    module Code_path : sig ... end

    This module contains type and functions for representing and manipulating path to AST nodes.

    Other helpers

    module Expansion_helpers : sig ... end

    Various helpers for expansion, such as quoting expressions in their context, or mangling names.

    module Merlin_helpers : sig ... end

    Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

    module Spellcheck : sig ... end

    Helpers to provide hints to PPX users for typos or spellchecks.

    module Keyword : sig ... end

    Small module to check if a string is an OCaml keyword.

    module Pp_ast : sig ... end

    This module implements pretty printers for the OCaml AST's version used by ppxlib.

    module Driver : sig ... end

    Interaction with the driver, such as getting/seeting cookies, adding arguments.

    module Caller_id : sig ... end

    Small helper to find out who is the caller of a function

    module Ast_io : sig ... end

    A small module to help read bin-annots generated files.

    Checks

    module Attribute : sig ... end

    This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

    module Reserved_namespaces : sig ... end

    Small module to reserve namespaces in attribute names.

    Common helper functions

    val lident : string -> Longident.t
    val core_type_of_type_declaration : +Ppxlib (ppxlib.Ppxlib)

    Module Ppxlib

    Standard library for ppx rewriters

    ppxlib is meant to be opened globally in your PPX source files.

    Opening it comes with two advantages. First, it will shadow the compiler-libs modules. The compiler-libs modules are unstable and aren't meant to be used, so shadowing them is a good protection mechanism. In case you don't want to open Ppxlib, you can open Ocaml_shadow to get the same protection. Second, it will bring several modules in scope, that are useful to have when writing a rewriter:

    • The main ppxlib modules, such as modules to help manipulate the AST (Ast_builder, Ast_pattern), and a few functions.
    • Modules from other libraries, such as Ast_helper or Pprintast,
    • The whole AST types (by including the Ast module).

    The core ppxlib entries

    Manipulating the AST

    module Ast_builder : sig ... end

    Ast_builder is a module to generate OCaml AST fragments. It provides a shorter syntax than directly using the Parsetree constructors, as well as a better stability than the constructors.

    module Ast_pattern : sig ... end

    This module implements first class AST patterns. It allows to destruct and extract values from AST fragments. This gives the same functionality as a pattern-match, but with simpler syntax and more stability than directly pattern-matching on the Parsetree constructors.

    module Ast_traverse : sig ... end

    This module provides AST traversal classes, such as maps, iterations, folds, etc. on the Parsetree types.

    Context-free rewriting

    module Context_free : sig ... end

    Context free rewriting, to define local rewriting rules that will all be applied at once by the driver.

    module Deriving : sig ... end

    Deriving code from type declarations.

    module Extension : sig ... end

    Declare extenders to rewrite extension nodes.

    module Expansion_context : sig ... end

    The context given to rewriting rules when expanding.

    module Code_path : sig ... end

    This module contains type and functions for representing and manipulating path to AST nodes.

    Other helpers

    module Expansion_helpers : sig ... end

    Various helpers for expansion, such as quoting expressions in their context, or mangling names.

    module Merlin_helpers : sig ... end

    Some helpers to annotate the AST so merlin can decide which branches to look at and which branches to ignore.

    module Spellcheck : sig ... end

    Helpers to provide hints to PPX users for typos or spellchecks.

    module Keyword : sig ... end

    Small module to check if a string is an OCaml keyword.

    module Pp_ast : sig ... end

    This module implements pretty printers for the OCaml AST's version used by ppxlib.

    module Driver : sig ... end

    Interaction with the driver, such as getting/seeting cookies, adding arguments.

    module Caller_id : sig ... end

    Small helper to find out who is the caller of a function

    module Ast_io : sig ... end

    A small module to help read bin-annots generated files.

    Checks

    module Attribute : sig ... end

    This module provides hygiene for attributes. The goal is to report misuses of attributes to the user as soon as possible so that no mistyped attribute get silently ignored.

    module Reserved_namespaces : sig ... end

    Small module to reserve namespaces in attribute names.

    Common helper functions

    val lident : string -> Longident.t
    val gen_symbol : ?prefix:string -> unit -> string

    gen_symbol ?prefix () generates a fresh variable name with prefix.

    • parameter prefix

      default = "_x"

    val string_of_core_type : Astlib.Ast_500.Parsetree.core_type -> string
    val assert_no_attributes : Astlib.Ast_500.Parsetree.attribute list -> unit
    val assert_no_attributes_in : Ppxlib__.Ast_traverse0.iter
    val attributes_errors : + Astlib.Ast_500.Parsetree.core_type
    val gen_symbol : ?prefix:string -> unit -> string

    gen_symbol ?prefix () generates a fresh variable name with prefix.

    • parameter prefix

      default = "_x"

    val string_of_core_type : Astlib.Ast_500.Parsetree.core_type -> string
    val assert_no_attributes : Astlib.Ast_500.Parsetree.attribute list -> unit
    val assert_no_attributes_in : Ppxlib__.Ast_traverse0.iter
    val attributes_errors : Astlib.Ast_500.Parsetree.attribute list -> Location.Error.t list
    val collect_attributes_errors : Location.Error.t list Ppxlib__.Ast_traverse0.fold
    val get_type_param_name_res : @@ -22,7 +22,7 @@ (string Loc.t, Location.Error.t Stdppx.NonEmptyList.t) result

    get_type_param_name_res tp returns the string identifier associated with tp if it is a type parameter, as a result.

    See get_type_param_name_res. Raises a located error in case of failure.

    (new type_is_recursive rec_flag tds)#go () returns whether rec_flag, tds is really a recursive type. We disregard recursive occurrences appearing in arrow types. You can override the search for certain type expressions by inheriting from this class.

    Encode a warning message into an 'ocaml.ppwarning' attribute which can be inserted in a generated Parsetree. The compiler will be responsible for reporting the warning.

    val is_polymorphic_variant : Astlib.Ast_500.Parsetree.type_declaration -> - sig_:bool -> + sig_:bool -> [> `Definitely | `Maybe | `Surely_not ]
    val mk_named_sig : - loc:Location.t -> - sg_name:string -> - handle_polymorphic_variant:bool -> + loc:Location.t -> + sg_name:string -> + handle_polymorphic_variant:bool -> Astlib.Ast_500.Parsetree.type_declaration list -> Astlib.Ast_500.Parsetree.module_type Astlib.Ast_500.Parsetree.include_infos - option

    mk_named_sig ~loc ~sg_name:"Foo" ~handle_polymorphic_variant tds will generate

    include Foo (* or Foo1, Foo2, Foo3 *)
    -  with type (* ('a, 'b, 'c) *) t := (* ('a, 'b, 'c) *) t

    when:

    • there is only one type declaration
    • the type is named t
    • there are less than 4 type parameters
    • there are no constraints on the type parameters

    It will take care of giving fresh names to unnamed type parameters.

    val exn_to_loc_error : exn -> Location.Error.t

    Convert exn to a located error if possible or reraise it otherwise

    module With_errors : sig ... end

    Modules from other libraries

    Expose some modules from Ppxlib_ast.

    module Ast = Ppxlib_ast.Ast
    module Ast_helper = Ppxlib_ast.Ast_helper
    module Asttypes = Ppxlib_ast.Asttypes
    module Parse = Ppxlib_ast.Parse
    module Parsetree = Ppxlib_ast.Parsetree
    module Pprintast = Ppxlib_ast.Pprintast
    module Selected_ast = Ppxlib_ast.Selected_ast
    module Location : sig ... end

    Overrides the Location module of OCaml

    module Longident : sig ... end

    Overrides the Longident module of OCaml

    module Loc : sig ... end

    Located items

    The whole AST types

    Include all the Ast definitions since we need them in every single ppx

    include module type of struct include Ast end
    type position = Stdlib.Lexing.position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }
    and location = Astlib.Location.t = {
    1. loc_start : position;
    2. loc_end : position;
    3. loc_ghost : bool;
    }
    and location_stack = location list
    and 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : location;
    }
    and longident = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of longident * string
    3. | Lapply of longident * longident
    and longident_loc = longident loc

    Auxiliary AST types used by parsetree and typedtree.

    and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    and private_flag = Astlib.Ast_500.Asttypes.private_flag =
    1. | Private
    2. | Public
    and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    and override_flag = Astlib.Ast_500.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    and label = string
    and arg_label = Astlib.Ast_500.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    and variance = Astlib.Ast_500.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    and injectivity = Astlib.Ast_500.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity

    Abstract syntax tree produced by parsing

    and constant = Astlib.Ast_500.Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * location * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)

    Extension points

    and attribute = Astlib.Ast_500.Parsetree.attribute = {
    1. attr_name : string loc;
    2. attr_payload : payload;
    3. attr_loc : location;
    }

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Astlib.Ast_500.Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Astlib.Ast_500.Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : location;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of longident_loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of longident_loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list * closed_flag * label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)
    and package_type = longident_loc * (longident_loc * core_type) list

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Astlib.Ast_500.Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : location;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
    1. | Rtag of label loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Astlib.Ast_500.Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : location;
    3. pof_attributes : attributes;
    }
    and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
    1. | Otag of label loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = Astlib.Ast_500.Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : location;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of longident_loc * (string loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (longident_loc * pattern) list * closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of longident_loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of longident_loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Astlib.Ast_500.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : location;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
    1. | Pexp_ident of longident_loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of cases
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * cases
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * cases
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of longident_loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (longident_loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * longident_loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * longident_loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * direction_flag * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * label loc
      (*

      E # m

      *)
    23. | Pexp_new of longident_loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of label loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (label loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = Astlib.Ast_500.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Astlib.Ast_500.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
    1. pbop_op : string loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : location;
    }

    Value descriptions

    and value_description = Astlib.Ast_500.Parsetree.value_description = {
    1. pval_name : string loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    5. pval_loc : location;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
    1. ptype_name : string loc;
    2. ptype_params : (core_type * (variance * injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * location) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    8. ptype_loc : location;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Astlib.Ast_500.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
    1. pld_name : string loc;
    2. pld_mutable : mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : location;
    5. pld_attributes : attributes;
      (*

      l : T [@id1] [@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = + option

    mk_named_sig ~loc ~sg_name:"Foo" ~handle_polymorphic_variant tds will generate

      include Foo (* or Foo1, Foo2, Foo3 *)
    +    with type (* ('a, 'b, 'c) *) t := (* ('a, 'b, 'c) *) t

    when:

    • there is only one type declaration
    • the type is named t
    • there are less than 4 type parameters
    • there are no constraints on the type parameters

    It will take care of giving fresh names to unnamed type parameters.

    val exn_to_loc_error : exn -> Location.Error.t

    Convert exn to a located error if possible or reraise it otherwise

    module With_errors : sig ... end

    Modules from other libraries

    Expose some modules from Ppxlib_ast.

    module Ast = Ppxlib_ast.Ast
    module Ast_helper = Ppxlib_ast.Ast_helper
    module Asttypes = Ppxlib_ast.Asttypes
    module Parse = Ppxlib_ast.Parse
    module Parsetree = Ppxlib_ast.Parsetree
    module Pprintast = Ppxlib_ast.Pprintast
    module Selected_ast = Ppxlib_ast.Selected_ast
    module Location : sig ... end

    Overrides the Location module of OCaml

    module Longident : sig ... end

    Overrides the Longident module of OCaml

    module Loc : sig ... end

    Located items

    The whole AST types

    Include all the Ast definitions since we need them in every single ppx

    include module type of struct include Ast end
    type position = Stdlib.Lexing.position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }
    and location = Astlib.Location.t = {
    1. loc_start : position;
    2. loc_end : position;
    3. loc_ghost : bool;
    }
    and location_stack = location list
    and 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : location;
    }
    and longident = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of longident * string
    3. | Lapply of longident * longident
    and longident_loc = longident loc

    Auxiliary AST types used by parsetree and typedtree.

    and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    and private_flag = Astlib.Ast_500.Asttypes.private_flag =
    1. | Private
    2. | Public
    and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    and override_flag = Astlib.Ast_500.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    and label = string
    and arg_label = Astlib.Ast_500.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    and variance = Astlib.Ast_500.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    and injectivity = Astlib.Ast_500.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity

    Abstract syntax tree produced by parsing

    and constant = Astlib.Ast_500.Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * location * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)

    Extension points

    and attribute = Astlib.Ast_500.Parsetree.attribute = {
    1. attr_name : string loc;
    2. attr_payload : payload;
    3. attr_loc : location;
    }

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Astlib.Ast_500.Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Astlib.Ast_500.Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : location;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of longident_loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of longident_loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list * closed_flag * label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)
    and package_type = longident_loc * (longident_loc * core_type) list

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Astlib.Ast_500.Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : location;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
    1. | Rtag of label loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Astlib.Ast_500.Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : location;
    3. pof_attributes : attributes;
    }
    and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
    1. | Otag of label loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = Astlib.Ast_500.Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : location;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of longident_loc * (string loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (longident_loc * pattern) list * closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of longident_loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of longident_loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Astlib.Ast_500.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : location;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
    1. | Pexp_ident of longident_loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of cases
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * cases
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * cases
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of longident_loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (longident_loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * longident_loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * longident_loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * direction_flag * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * label loc
      (*

      E # m

      *)
    23. | Pexp_new of longident_loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of label loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (label loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = Astlib.Ast_500.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Astlib.Ast_500.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
    1. pbop_op : string loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : location;
    }

    Value descriptions

    and value_description = Astlib.Ast_500.Parsetree.value_description = {
    1. pval_name : string loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    5. pval_loc : location;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
    1. ptype_name : string loc;
    2. ptype_params : (core_type * (variance * injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * location) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    8. ptype_loc : location;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Astlib.Ast_500.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
    1. pld_name : string loc;
    2. pld_mutable : mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : location;
    5. pld_attributes : attributes;
      (*

      l : T [@id1] [@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = {
    1. pcd_name : string loc;
    2. pcd_vars : string loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : location;
    6. pcd_attributes : attributes;
      (*

      C of ... [@id1] [@id2]

      *)
    }
    and constructor_arguments = Astlib.Ast_500.Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Astlib.Ast_500.Parsetree.type_extension = {
    1. ptyext_path : longident_loc;
    2. ptyext_params : (core_type * (variance * injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : private_flag;
    5. ptyext_loc : location;
    6. ptyext_attributes : attributes;
      (*

      ... @@id1 @@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = Astlib.Ast_500.Parsetree.extension_constructor = {
    1. pext_name : string loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : location;
    4. pext_attributes : attributes;
      (*

      C of ... [@id1] [@id2]

      *)
    }
    and type_exception = Astlib.Ast_500.Parsetree.type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : location;
    3. ptyexn_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind = Astlib.Ast_500.Parsetree.extension_constructor_kind = -
    1. | Pext_decl of string loc list * constructor_arguments * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of longident_loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Astlib.Ast_500.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : location;
    3. pcty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
    1. | Pcty_constr of longident_loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : location;
    3. pctf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [@@@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
    1. pci_virt : virtual_flag;
    2. pci_params : (core_type * (variance * injectivity)) list;
    3. pci_name : string loc;
    4. pci_expr : 'a;
    5. pci_loc : location;
    6. pci_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : location;
    3. pcl_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
    1. | Pcl_constr of longident_loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Astlib.Ast_500.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : location;
    3. pcf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
    1. | Pcf_inherit of override_flag * class_expr * string loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of label loc * mutable_flag * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of label loc * private_flag * class_field_kind
      (**)
    4. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pcf_initializer of expression
      (*

      initializer E

      *)
    6. | Pcf_attribute of attribute
      (*

      [@@@id]

      *)
    7. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Astlib.Ast_500.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : location;
    3. pmty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
    1. | Pmty_ident of longident_loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of longident_loc
      (*

      (module M)

      *)
    and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : location;
    }
    and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [@@@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
    1. pmd_name : string option loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmd_loc : location;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
    1. pms_name : string loc;
    2. pms_manifest : longident_loc;
    3. pms_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pms_loc : location;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = - {
    1. pmtd_name : string loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmtd_loc : location;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : override_flag;
    3. popen_loc : location;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = longident_loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : location;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
    1. | Pwith_type of longident_loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of longident_loc * longident_loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of longident_loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of longident_loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of longident_loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of longident_loc * longident_loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : location;
    3. pmod_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
    1. | Pmod_ident of longident_loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : location;
    }
    and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [@@@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : location;
    }
    and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
    1. pmb_name : string option loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : location;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
    1. pdir_name : string loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : location;
    }
    and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : location;
    }
    and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = -
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of longident
    4. | Pdir_bool of bool
    and cases = case list
    class virtual map : object ... end
    class virtual iter : object ... end
    class virtual 'acc fold : object ... end
    class virtual 'acc fold_map : object ... end
    class virtual 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end

    Make sure code using Ppxlib doesn't refer to compiler-libs without being explicit about it:

    include sig ... end
    include module type of struct include Ocaml_shadow end +
    1. | Pext_decl of string loc list * constructor_arguments * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of longident_loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Astlib.Ast_500.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : location;
    3. pcty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
    1. | Pcty_constr of longident_loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : location;
    3. pctf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [@@@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
    1. pci_virt : virtual_flag;
    2. pci_params : (core_type * (variance * injectivity)) list;
    3. pci_name : string loc;
    4. pci_expr : 'a;
    5. pci_loc : location;
    6. pci_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : location;
    3. pcl_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
    1. | Pcl_constr of longident_loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Astlib.Ast_500.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : location;
    3. pcf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
    1. | Pcf_inherit of override_flag * class_expr * string loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of label loc * mutable_flag * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of label loc * private_flag * class_field_kind
      (**)
    4. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pcf_initializer of expression
      (*

      initializer E

      *)
    6. | Pcf_attribute of attribute
      (*

      [@@@id]

      *)
    7. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Astlib.Ast_500.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : location;
    3. pmty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
    1. | Pmty_ident of longident_loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of longident_loc
      (*

      (module M)

      *)
    and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : location;
    }
    and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [@@@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
    1. pmd_name : string option loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmd_loc : location;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
    1. pms_name : string loc;
    2. pms_manifest : longident_loc;
    3. pms_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pms_loc : location;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = + {
    1. pmtd_name : string loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmtd_loc : location;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : override_flag;
    3. popen_loc : location;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = longident_loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : location;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
    1. | Pwith_type of longident_loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of longident_loc * longident_loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of longident_loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of longident_loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of longident_loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of longident_loc * longident_loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : location;
    3. pmod_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
    1. | Pmod_ident of longident_loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : location;
    }
    and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [@@@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : location;
    }
    and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
    1. pmb_name : string option loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : location;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
    1. pdir_name : string loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : location;
    }
    and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : location;
    }
    and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = +
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of longident
    4. | Pdir_bool of bool
    and cases = case list
    class virtual map : object ... end
    class virtual iter : object ... end
    class virtual 'acc fold : object ... end
    class virtual 'acc fold_map : object ... end
    class virtual 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end

    Make sure code using Ppxlib doesn't refer to compiler-libs without being explicit about it:

    include sig ... end
    include module type of struct include Ocaml_shadow end with module Ast_helper := Ocaml_shadow.Ast_helper with module Asttypes := Ocaml_shadow.Asttypes with module Docstrings := Ocaml_shadow.Docstrings @@ -67,4 +67,4 @@ Ocaml_shadow.Remove_unused_program_constructs
    module Runtimedef = Ocaml_shadow.Runtimedef
    module Schedgen = Ocaml_shadow.Schedgen
    module Scheduling = Ocaml_shadow.Scheduling
    module Selectgen = Ocaml_shadow.Selectgen
    module Selection = Ocaml_shadow.Selection
    module Semantics_of_primitives = Ocaml_shadow.Semantics_of_primitives
    module Set_of_closures_id = Ocaml_shadow.Set_of_closures_id
    module Set_of_closures_origin = Ocaml_shadow.Set_of_closures_origin
    module Shape = Ocaml_shadow.Shape
    module Share_constants = Ocaml_shadow.Share_constants
    module Signature_group = Ocaml_shadow.Signature_group
    module Simple_value_approx = Ocaml_shadow.Simple_value_approx
    module Simplif = Ocaml_shadow.Simplif
    module Simplify_boxed_integer_ops = Ocaml_shadow.Simplify_boxed_integer_ops
    module Simplify_boxed_integer_ops_intf = Ocaml_shadow.Simplify_boxed_integer_ops_intf
    module Simplify_common = Ocaml_shadow.Simplify_common
    module Simplify_primitives = Ocaml_shadow.Simplify_primitives
    module Spill = Ocaml_shadow.Spill
    module Split = Ocaml_shadow.Split
    module Static_exception = Ocaml_shadow.Static_exception
    module Strmatch = Ocaml_shadow.Strmatch
    module Strongly_connected_components = Ocaml_shadow.Strongly_connected_components
    module Stypes = Ocaml_shadow.Stypes
    module Subst = Ocaml_shadow.Subst
    module Switch = Ocaml_shadow.Switch
    module Symbol = Ocaml_shadow.Symbol
    module Symtable = Ocaml_shadow.Symtable
    module Tag = Ocaml_shadow.Tag
    module Targetint = Ocaml_shadow.Targetint
    module Tast_iterator = Ocaml_shadow.Tast_iterator
    module Tast_mapper = Ocaml_shadow.Tast_mapper
    module Terminfo = Ocaml_shadow.Terminfo
    module Tmc = Ocaml_shadow.Tmc
    module Topcommon = Ocaml_shadow.Topcommon
    module Topdirs = Ocaml_shadow.Topdirs
    module Topeval = Ocaml_shadow.Topeval
    module Tophooks = Ocaml_shadow.Tophooks
    module Toploop = Ocaml_shadow.Toploop
    module Topmain = Ocaml_shadow.Topmain
    module Topprinters = Ocaml_shadow.Topprinters
    module Topstart = Ocaml_shadow.Topstart
    module Trace = Ocaml_shadow.Trace
    module Translattribute = Ocaml_shadow.Translattribute
    module Translclass = Ocaml_shadow.Translclass
    module Translcore = Ocaml_shadow.Translcore
    module Translmod = Ocaml_shadow.Translmod
    module Translobj = Ocaml_shadow.Translobj
    module Translprim = Ocaml_shadow.Translprim
    module Traverse_for_exported_symbols = - Ocaml_shadow.Traverse_for_exported_symbols
    module Type_immediacy = Ocaml_shadow.Type_immediacy
    module Typeclass = Ocaml_shadow.Typeclass
    module Typecore = Ocaml_shadow.Typecore
    module Typedecl = Ocaml_shadow.Typedecl
    module Typedecl_immediacy = Ocaml_shadow.Typedecl_immediacy
    module Typedecl_properties = Ocaml_shadow.Typedecl_properties
    module Typedecl_separability = Ocaml_shadow.Typedecl_separability
    module Typedecl_unboxed = Ocaml_shadow.Typedecl_unboxed
    module Typedecl_variance = Ocaml_shadow.Typedecl_variance
    module Typedtree = Ocaml_shadow.Typedtree
    module Typemod = Ocaml_shadow.Typemod
    module Typeopt = Ocaml_shadow.Typeopt
    module Types = Ocaml_shadow.Types
    module Typetexp = Ocaml_shadow.Typetexp
    module Un_anf = Ocaml_shadow.Un_anf
    module Unbox_closures = Ocaml_shadow.Unbox_closures
    module Unbox_free_vars_of_closures = Ocaml_shadow.Unbox_free_vars_of_closures
    module Unbox_specialised_args = Ocaml_shadow.Unbox_specialised_args
    module Untypeast = Ocaml_shadow.Untypeast
    module Var_within_closure = Ocaml_shadow.Var_within_closure
    module Variable = Ocaml_shadow.Variable
    module Warnings = Ocaml_shadow.Warnings
    module X86_ast = Ocaml_shadow.X86_ast
    module X86_dsl = Ocaml_shadow.X86_dsl
    module X86_gas = Ocaml_shadow.X86_gas
    module X86_masm = Ocaml_shadow.X86_masm
    module X86_proc = Ocaml_shadow.X86_proc
    \ No newline at end of file + Ocaml_shadow.Traverse_for_exported_symbols
    module Type_immediacy = Ocaml_shadow.Type_immediacy
    module Typeclass = Ocaml_shadow.Typeclass
    module Typecore = Ocaml_shadow.Typecore
    module Typedecl = Ocaml_shadow.Typedecl
    module Typedecl_immediacy = Ocaml_shadow.Typedecl_immediacy
    module Typedecl_properties = Ocaml_shadow.Typedecl_properties
    module Typedecl_separability = Ocaml_shadow.Typedecl_separability
    module Typedecl_unboxed = Ocaml_shadow.Typedecl_unboxed
    module Typedecl_variance = Ocaml_shadow.Typedecl_variance
    module Typedtree = Ocaml_shadow.Typedtree
    module Typemod = Ocaml_shadow.Typemod
    module Typeopt = Ocaml_shadow.Typeopt
    module Types = Ocaml_shadow.Types
    module Typetexp = Ocaml_shadow.Typetexp
    module Un_anf = Ocaml_shadow.Un_anf
    module Unbox_closures = Ocaml_shadow.Unbox_closures
    module Unbox_free_vars_of_closures = Ocaml_shadow.Unbox_free_vars_of_closures
    module Unbox_specialised_args = Ocaml_shadow.Unbox_specialised_args
    module Untypeast = Ocaml_shadow.Untypeast
    module Var_within_closure = Ocaml_shadow.Var_within_closure
    module Variable = Ocaml_shadow.Variable
    module Warnings = Ocaml_shadow.Warnings
    module X86_ast = Ocaml_shadow.X86_ast
    module X86_dsl = Ocaml_shadow.X86_dsl
    module X86_gas = Ocaml_shadow.X86_gas
    module X86_masm = Ocaml_shadow.X86_masm
    module X86_proc = Ocaml_shadow.X86_proc
    diff --git a/ppxlib/Ppxlib__/index.html b/ppxlib/Ppxlib__/index.html index 7807aa3..e40ece7 100644 --- a/ppxlib/Ppxlib__/index.html +++ b/ppxlib/Ppxlib__/index.html @@ -1,2 +1,2 @@ -Ppxlib__ (ppxlib.Ppxlib__)

    Module Ppxlib__

    \ No newline at end of file +Ppxlib__ (ppxlib.Ppxlib__)

    Module Ppxlib__

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_builder/index.html b/ppxlib/Ppxlib__Ast_builder/index.html index 6c0e7d9..8d79475 100644 --- a/ppxlib/Ppxlib__Ast_builder/index.html +++ b/ppxlib/Ppxlib__Ast_builder/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_builder (ppxlib.Ppxlib__Ast_builder)

    Module Ppxlib__Ast_builder

    \ No newline at end of file +Ppxlib__Ast_builder (ppxlib.Ppxlib__Ast_builder)

    Module Ppxlib__Ast_builder

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_builder_generated/index.html b/ppxlib/Ppxlib__Ast_builder_generated/index.html index 0ea9940..a2fea93 100644 --- a/ppxlib/Ppxlib__Ast_builder_generated/index.html +++ b/ppxlib/Ppxlib__Ast_builder_generated/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_builder_generated (ppxlib.Ppxlib__Ast_builder_generated)

    Module Ppxlib__Ast_builder_generated

    \ No newline at end of file +Ppxlib__Ast_builder_generated (ppxlib.Ppxlib__Ast_builder_generated)

    Module Ppxlib__Ast_builder_generated

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_builder_intf/index.html b/ppxlib/Ppxlib__Ast_builder_intf/index.html index 97f84f4..d0ff1b5 100644 --- a/ppxlib/Ppxlib__Ast_builder_intf/index.html +++ b/ppxlib/Ppxlib__Ast_builder_intf/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_builder_intf (ppxlib.Ppxlib__Ast_builder_intf)

    Module Ppxlib__Ast_builder_intf

    \ No newline at end of file +Ppxlib__Ast_builder_intf (ppxlib.Ppxlib__Ast_builder_intf)

    Module Ppxlib__Ast_builder_intf

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_pattern/index.html b/ppxlib/Ppxlib__Ast_pattern/index.html index dc3427b..6344d67 100644 --- a/ppxlib/Ppxlib__Ast_pattern/index.html +++ b/ppxlib/Ppxlib__Ast_pattern/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_pattern (ppxlib.Ppxlib__Ast_pattern)

    Module Ppxlib__Ast_pattern

    \ No newline at end of file +Ppxlib__Ast_pattern (ppxlib.Ppxlib__Ast_pattern)

    Module Ppxlib__Ast_pattern

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_pattern0/index.html b/ppxlib/Ppxlib__Ast_pattern0/index.html index c7a607b..4a53741 100644 --- a/ppxlib/Ppxlib__Ast_pattern0/index.html +++ b/ppxlib/Ppxlib__Ast_pattern0/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_pattern0 (ppxlib.Ppxlib__Ast_pattern0)

    Module Ppxlib__Ast_pattern0

    \ No newline at end of file +Ppxlib__Ast_pattern0 (ppxlib.Ppxlib__Ast_pattern0)

    Module Ppxlib__Ast_pattern0

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_pattern_generated/index.html b/ppxlib/Ppxlib__Ast_pattern_generated/index.html index e67b77d..1ad7789 100644 --- a/ppxlib/Ppxlib__Ast_pattern_generated/index.html +++ b/ppxlib/Ppxlib__Ast_pattern_generated/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_pattern_generated (ppxlib.Ppxlib__Ast_pattern_generated)

    Module Ppxlib__Ast_pattern_generated

    \ No newline at end of file +Ppxlib__Ast_pattern_generated (ppxlib.Ppxlib__Ast_pattern_generated)

    Module Ppxlib__Ast_pattern_generated

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_traverse/index.html b/ppxlib/Ppxlib__Ast_traverse/index.html index 196bfad..ba0dee8 100644 --- a/ppxlib/Ppxlib__Ast_traverse/index.html +++ b/ppxlib/Ppxlib__Ast_traverse/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_traverse (ppxlib.Ppxlib__Ast_traverse)

    Module Ppxlib__Ast_traverse

    \ No newline at end of file +Ppxlib__Ast_traverse (ppxlib.Ppxlib__Ast_traverse)

    Module Ppxlib__Ast_traverse

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ast_traverse0/index.html b/ppxlib/Ppxlib__Ast_traverse0/index.html index b801fcf..410528f 100644 --- a/ppxlib/Ppxlib__Ast_traverse0/index.html +++ b/ppxlib/Ppxlib__Ast_traverse0/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ast_traverse0 (ppxlib.Ppxlib__Ast_traverse0)

    Module Ppxlib__Ast_traverse0

    \ No newline at end of file +Ppxlib__Ast_traverse0 (ppxlib.Ppxlib__Ast_traverse0)

    Module Ppxlib__Ast_traverse0

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Attribute/index.html b/ppxlib/Ppxlib__Attribute/index.html index 840c205..5b6fee2 100644 --- a/ppxlib/Ppxlib__Attribute/index.html +++ b/ppxlib/Ppxlib__Attribute/index.html @@ -1,2 +1,2 @@ -Ppxlib__Attribute (ppxlib.Ppxlib__Attribute)

    Module Ppxlib__Attribute

    \ No newline at end of file +Ppxlib__Attribute (ppxlib.Ppxlib__Attribute)

    Module Ppxlib__Attribute

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Caller_id/index.html b/ppxlib/Ppxlib__Caller_id/index.html index bbbcf26..183275b 100644 --- a/ppxlib/Ppxlib__Caller_id/index.html +++ b/ppxlib/Ppxlib__Caller_id/index.html @@ -1,2 +1,2 @@ -Ppxlib__Caller_id (ppxlib.Ppxlib__Caller_id)

    Module Ppxlib__Caller_id

    \ No newline at end of file +Ppxlib__Caller_id (ppxlib.Ppxlib__Caller_id)

    Module Ppxlib__Caller_id

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Code_matcher/index.html b/ppxlib/Ppxlib__Code_matcher/index.html index f3a5257..7afe1a4 100644 --- a/ppxlib/Ppxlib__Code_matcher/index.html +++ b/ppxlib/Ppxlib__Code_matcher/index.html @@ -1,2 +1,2 @@ -Ppxlib__Code_matcher (ppxlib.Ppxlib__Code_matcher)

    Module Ppxlib__Code_matcher

    \ No newline at end of file +Ppxlib__Code_matcher (ppxlib.Ppxlib__Code_matcher)

    Module Ppxlib__Code_matcher

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Code_path/index.html b/ppxlib/Ppxlib__Code_path/index.html index 5f7d595..5c2aa5d 100644 --- a/ppxlib/Ppxlib__Code_path/index.html +++ b/ppxlib/Ppxlib__Code_path/index.html @@ -1,2 +1,2 @@ -Ppxlib__Code_path (ppxlib.Ppxlib__Code_path)

    Module Ppxlib__Code_path

    \ No newline at end of file +Ppxlib__Code_path (ppxlib.Ppxlib__Code_path)

    Module Ppxlib__Code_path

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Common/index.html b/ppxlib/Ppxlib__Common/index.html index 9608c9c..6aed231 100644 --- a/ppxlib/Ppxlib__Common/index.html +++ b/ppxlib/Ppxlib__Common/index.html @@ -1,2 +1,2 @@ -Ppxlib__Common (ppxlib.Ppxlib__Common)

    Module Ppxlib__Common

    \ No newline at end of file +Ppxlib__Common (ppxlib.Ppxlib__Common)

    Module Ppxlib__Common

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Context_free/index.html b/ppxlib/Ppxlib__Context_free/index.html index bf808cc..904614d 100644 --- a/ppxlib/Ppxlib__Context_free/index.html +++ b/ppxlib/Ppxlib__Context_free/index.html @@ -1,2 +1,2 @@ -Ppxlib__Context_free (ppxlib.Ppxlib__Context_free)

    Module Ppxlib__Context_free

    \ No newline at end of file +Ppxlib__Context_free (ppxlib.Ppxlib__Context_free)

    Module Ppxlib__Context_free

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Deriving/index.html b/ppxlib/Ppxlib__Deriving/index.html index 6bc505c..55ec442 100644 --- a/ppxlib/Ppxlib__Deriving/index.html +++ b/ppxlib/Ppxlib__Deriving/index.html @@ -1,2 +1,2 @@ -Ppxlib__Deriving (ppxlib.Ppxlib__Deriving)

    Module Ppxlib__Deriving

    \ No newline at end of file +Ppxlib__Deriving (ppxlib.Ppxlib__Deriving)

    Module Ppxlib__Deriving

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Driver/index.html b/ppxlib/Ppxlib__Driver/index.html index 0f3c70e..d7471d7 100644 --- a/ppxlib/Ppxlib__Driver/index.html +++ b/ppxlib/Ppxlib__Driver/index.html @@ -1,2 +1,2 @@ -Ppxlib__Driver (ppxlib.Ppxlib__Driver)

    Module Ppxlib__Driver

    \ No newline at end of file +Ppxlib__Driver (ppxlib.Ppxlib__Driver)

    Module Ppxlib__Driver

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Expansion_context/index.html b/ppxlib/Ppxlib__Expansion_context/index.html index 47cef3c..ede625c 100644 --- a/ppxlib/Ppxlib__Expansion_context/index.html +++ b/ppxlib/Ppxlib__Expansion_context/index.html @@ -1,2 +1,2 @@ -Ppxlib__Expansion_context (ppxlib.Ppxlib__Expansion_context)

    Module Ppxlib__Expansion_context

    \ No newline at end of file +Ppxlib__Expansion_context (ppxlib.Ppxlib__Expansion_context)

    Module Ppxlib__Expansion_context

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Expansion_helpers/index.html b/ppxlib/Ppxlib__Expansion_helpers/index.html index 2eab08f..cb0fa10 100644 --- a/ppxlib/Ppxlib__Expansion_helpers/index.html +++ b/ppxlib/Ppxlib__Expansion_helpers/index.html @@ -1,2 +1,2 @@ -Ppxlib__Expansion_helpers (ppxlib.Ppxlib__Expansion_helpers)

    Module Ppxlib__Expansion_helpers

    \ No newline at end of file +Ppxlib__Expansion_helpers (ppxlib.Ppxlib__Expansion_helpers)

    Module Ppxlib__Expansion_helpers

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Extension/index.html b/ppxlib/Ppxlib__Extension/index.html index f033cc0..41565c6 100644 --- a/ppxlib/Ppxlib__Extension/index.html +++ b/ppxlib/Ppxlib__Extension/index.html @@ -1,2 +1,2 @@ -Ppxlib__Extension (ppxlib.Ppxlib__Extension)

    Module Ppxlib__Extension

    \ No newline at end of file +Ppxlib__Extension (ppxlib.Ppxlib__Extension)

    Module Ppxlib__Extension

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Ignore_unused_warning/index.html b/ppxlib/Ppxlib__Ignore_unused_warning/index.html index bc98194..8f07060 100644 --- a/ppxlib/Ppxlib__Ignore_unused_warning/index.html +++ b/ppxlib/Ppxlib__Ignore_unused_warning/index.html @@ -1,2 +1,2 @@ -Ppxlib__Ignore_unused_warning (ppxlib.Ppxlib__Ignore_unused_warning)

    Module Ppxlib__Ignore_unused_warning

    \ No newline at end of file +Ppxlib__Ignore_unused_warning (ppxlib.Ppxlib__Ignore_unused_warning)

    Module Ppxlib__Ignore_unused_warning

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Import/index.html b/ppxlib/Ppxlib__Import/index.html index ded3854..093bf84 100644 --- a/ppxlib/Ppxlib__Import/index.html +++ b/ppxlib/Ppxlib__Import/index.html @@ -1,2 +1,2 @@ -Ppxlib__Import (ppxlib.Ppxlib__Import)

    Module Ppxlib__Import

    \ No newline at end of file +Ppxlib__Import (ppxlib.Ppxlib__Import)

    Module Ppxlib__Import

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Keyword/index.html b/ppxlib/Ppxlib__Keyword/index.html index 782ddda..c6f0bdd 100644 --- a/ppxlib/Ppxlib__Keyword/index.html +++ b/ppxlib/Ppxlib__Keyword/index.html @@ -1,2 +1,2 @@ -Ppxlib__Keyword (ppxlib.Ppxlib__Keyword)

    Module Ppxlib__Keyword

    \ No newline at end of file +Ppxlib__Keyword (ppxlib.Ppxlib__Keyword)

    Module Ppxlib__Keyword

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Loc/index.html b/ppxlib/Ppxlib__Loc/index.html index e386c9e..ca9d310 100644 --- a/ppxlib/Ppxlib__Loc/index.html +++ b/ppxlib/Ppxlib__Loc/index.html @@ -1,2 +1,2 @@ -Ppxlib__Loc (ppxlib.Ppxlib__Loc)

    Module Ppxlib__Loc

    \ No newline at end of file +Ppxlib__Loc (ppxlib.Ppxlib__Loc)

    Module Ppxlib__Loc

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Location/index.html b/ppxlib/Ppxlib__Location/index.html index 1e4a866..0c7ff99 100644 --- a/ppxlib/Ppxlib__Location/index.html +++ b/ppxlib/Ppxlib__Location/index.html @@ -1,2 +1,2 @@ -Ppxlib__Location (ppxlib.Ppxlib__Location)

    Module Ppxlib__Location

    \ No newline at end of file +Ppxlib__Location (ppxlib.Ppxlib__Location)

    Module Ppxlib__Location

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Location_check/index.html b/ppxlib/Ppxlib__Location_check/index.html index 15e6840..6fe1c29 100644 --- a/ppxlib/Ppxlib__Location_check/index.html +++ b/ppxlib/Ppxlib__Location_check/index.html @@ -1,2 +1,2 @@ -Ppxlib__Location_check (ppxlib.Ppxlib__Location_check)

    Module Ppxlib__Location_check

    \ No newline at end of file +Ppxlib__Location_check (ppxlib.Ppxlib__Location_check)

    Module Ppxlib__Location_check

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Longident/index.html b/ppxlib/Ppxlib__Longident/index.html index 44e6b56..40407ab 100644 --- a/ppxlib/Ppxlib__Longident/index.html +++ b/ppxlib/Ppxlib__Longident/index.html @@ -1,2 +1,2 @@ -Ppxlib__Longident (ppxlib.Ppxlib__Longident)

    Module Ppxlib__Longident

    \ No newline at end of file +Ppxlib__Longident (ppxlib.Ppxlib__Longident)

    Module Ppxlib__Longident

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Merlin_helpers/index.html b/ppxlib/Ppxlib__Merlin_helpers/index.html index dea71ec..13820d6 100644 --- a/ppxlib/Ppxlib__Merlin_helpers/index.html +++ b/ppxlib/Ppxlib__Merlin_helpers/index.html @@ -1,2 +1,2 @@ -Ppxlib__Merlin_helpers (ppxlib.Ppxlib__Merlin_helpers)

    Module Ppxlib__Merlin_helpers

    \ No newline at end of file +Ppxlib__Merlin_helpers (ppxlib.Ppxlib__Merlin_helpers)

    Module Ppxlib__Merlin_helpers

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Name/index.html b/ppxlib/Ppxlib__Name/index.html index ec96e09..829cca6 100644 --- a/ppxlib/Ppxlib__Name/index.html +++ b/ppxlib/Ppxlib__Name/index.html @@ -1,2 +1,2 @@ -Ppxlib__Name (ppxlib.Ppxlib__Name)

    Module Ppxlib__Name

    \ No newline at end of file +Ppxlib__Name (ppxlib.Ppxlib__Name)

    Module Ppxlib__Name

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Options/index.html b/ppxlib/Ppxlib__Options/index.html index f147899..b1229dd 100644 --- a/ppxlib/Ppxlib__Options/index.html +++ b/ppxlib/Ppxlib__Options/index.html @@ -1,2 +1,2 @@ -Ppxlib__Options (ppxlib.Ppxlib__Options)

    Module Ppxlib__Options

    \ No newline at end of file +Ppxlib__Options (ppxlib.Ppxlib__Options)

    Module Ppxlib__Options

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Pp_ast/index.html b/ppxlib/Ppxlib__Pp_ast/index.html index c0d935b..06092b4 100644 --- a/ppxlib/Ppxlib__Pp_ast/index.html +++ b/ppxlib/Ppxlib__Pp_ast/index.html @@ -1,2 +1,2 @@ -Ppxlib__Pp_ast (ppxlib.Ppxlib__Pp_ast)

    Module Ppxlib__Pp_ast

    \ No newline at end of file +Ppxlib__Pp_ast (ppxlib.Ppxlib__Pp_ast)

    Module Ppxlib__Pp_ast

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Quoter/index.html b/ppxlib/Ppxlib__Quoter/index.html index dffebf0..302e29c 100644 --- a/ppxlib/Ppxlib__Quoter/index.html +++ b/ppxlib/Ppxlib__Quoter/index.html @@ -1,2 +1,2 @@ -Ppxlib__Quoter (ppxlib.Ppxlib__Quoter)

    Module Ppxlib__Quoter

    \ No newline at end of file +Ppxlib__Quoter (ppxlib.Ppxlib__Quoter)

    Module Ppxlib__Quoter

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Reconcile/index.html b/ppxlib/Ppxlib__Reconcile/index.html index 426b813..cd71754 100644 --- a/ppxlib/Ppxlib__Reconcile/index.html +++ b/ppxlib/Ppxlib__Reconcile/index.html @@ -1,2 +1,2 @@ -Ppxlib__Reconcile (ppxlib.Ppxlib__Reconcile)

    Module Ppxlib__Reconcile

    \ No newline at end of file +Ppxlib__Reconcile (ppxlib.Ppxlib__Reconcile)

    Module Ppxlib__Reconcile

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Skip_hash_bang/index.html b/ppxlib/Ppxlib__Skip_hash_bang/index.html index 8dc6e4d..dad2da8 100644 --- a/ppxlib/Ppxlib__Skip_hash_bang/index.html +++ b/ppxlib/Ppxlib__Skip_hash_bang/index.html @@ -1,2 +1,2 @@ -Ppxlib__Skip_hash_bang (ppxlib.Ppxlib__Skip_hash_bang)

    Module Ppxlib__Skip_hash_bang

    \ No newline at end of file +Ppxlib__Skip_hash_bang (ppxlib.Ppxlib__Skip_hash_bang)

    Module Ppxlib__Skip_hash_bang

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Spellcheck/index.html b/ppxlib/Ppxlib__Spellcheck/index.html index 7afc82f..057c7ee 100644 --- a/ppxlib/Ppxlib__Spellcheck/index.html +++ b/ppxlib/Ppxlib__Spellcheck/index.html @@ -1,2 +1,2 @@ -Ppxlib__Spellcheck (ppxlib.Ppxlib__Spellcheck)

    Module Ppxlib__Spellcheck

    \ No newline at end of file +Ppxlib__Spellcheck (ppxlib.Ppxlib__Spellcheck)

    Module Ppxlib__Spellcheck

    This module is hidden.

    diff --git a/ppxlib/Ppxlib__Utils/index.html b/ppxlib/Ppxlib__Utils/index.html index 1ca70e5..8dc80db 100644 --- a/ppxlib/Ppxlib__Utils/index.html +++ b/ppxlib/Ppxlib__Utils/index.html @@ -1,2 +1,2 @@ -Ppxlib__Utils (ppxlib.Ppxlib__Utils)

    Module Ppxlib__Utils

    \ No newline at end of file +Ppxlib__Utils (ppxlib.Ppxlib__Utils)

    Module Ppxlib__Utils

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast/Ast/class-fold/index.html b/ppxlib/Ppxlib_ast/Ast/class-fold/index.html index 4b4a415..ade2334 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-fold/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-fold/index.html @@ -1,32 +1,5 @@ -fold (ppxlib.Ppxlib_ast.Ast.fold)

    Class Ast.fold

    method virtual bool : bool -> 'acc0 -> 'acc0
    method virtual char : char -> 'acc1 -> 'acc1
    method virtual int : int -> 'acc2 -> 'acc2
    method virtual list : 'a. ('a -> 'acc3 -> 'acc3) -> 'a list -> 'acc3 -> 'acc3
    method virtual option : 'a. ('a -> 'acc4 -> 'acc4) -> - 'a option -> - 'acc4 -> - 'acc4
    method virtual string : string -> 'acc5 -> 'acc5
    method position : 'acc fold -> position -> 'acc6 -> 'acc6
    method location : 'b -> location -> 'acc7 -> 'acc7
    method location_stack : 'b -> location_stack -> 'acc8 -> 'acc8
    method loc : 'b -> 'a. ('a -> 'acc9 -> 'acc9) -> 'a loc -> 'acc9 -> 'acc9
    method longident : 'b -> longident -> 'acc10 -> 'acc10
    method longident_loc : 'b -> longident_loc -> 'acc11 -> 'acc11
    method rec_flag : 'b -> rec_flag -> 'acc12 -> 'acc12
    method direction_flag : 'b -> direction_flag -> 'acc13 -> 'acc13
    method private_flag : 'b -> private_flag -> 'acc14 -> 'acc14
    method mutable_flag : 'b -> mutable_flag -> 'acc15 -> 'acc15
    method virtual_flag : 'b -> virtual_flag -> 'acc16 -> 'acc16
    method override_flag : 'b -> override_flag -> 'acc17 -> 'acc17
    method closed_flag : 'b -> closed_flag -> 'acc18 -> 'acc18
    method label : 'b -> label -> 'acc19 -> 'acc19
    method arg_label : 'b -> arg_label -> 'acc20 -> 'acc20
    method variance : 'b -> variance -> 'acc21 -> 'acc21
    method injectivity : 'b -> injectivity -> 'acc22 -> 'acc22
    method constant : 'b -> constant -> 'acc23 -> 'acc23
    method attribute : 'b -> attribute -> 'acc24 -> 'acc24
    method extension : 'b -> extension -> 'acc25 -> 'acc25
    method attributes : 'b -> attributes -> 'acc26 -> 'acc26
    method payload : 'b -> payload -> 'acc27 -> 'acc27
    method core_type : 'b -> core_type -> 'acc28 -> 'acc28
    method core_type_desc : 'b -> core_type_desc -> 'acc29 -> 'acc29
    method package_type : 'b -> package_type -> 'acc30 -> 'acc30
    method row_field : 'b -> row_field -> 'acc31 -> 'acc31
    method row_field_desc : 'b -> row_field_desc -> 'acc32 -> 'acc32
    method object_field : 'b -> object_field -> 'acc33 -> 'acc33
    method object_field_desc : 'b -> object_field_desc -> 'acc34 -> 'acc34
    method pattern : 'b -> pattern -> 'acc35 -> 'acc35
    method pattern_desc : 'b -> pattern_desc -> 'acc36 -> 'acc36
    method expression : 'b -> expression -> 'acc37 -> 'acc37
    method expression_desc : 'b -> expression_desc -> 'acc38 -> 'acc38
    method case : 'b -> case -> 'acc39 -> 'acc39
    method letop : 'b -> letop -> 'acc40 -> 'acc40
    method binding_op : 'b -> binding_op -> 'acc41 -> 'acc41
    method value_description : 'b -> value_description -> 'acc42 -> 'acc42
    method type_declaration : 'b -> type_declaration -> 'acc43 -> 'acc43
    method type_kind : 'b -> type_kind -> 'acc44 -> 'acc44
    method label_declaration : 'b -> label_declaration -> 'acc45 -> 'acc45
    method constructor_declaration : 'b -> - constructor_declaration -> - 'acc46 -> - 'acc46
    method constructor_arguments : 'b -> constructor_arguments -> 'acc47 -> 'acc47
    method type_extension : 'b -> type_extension -> 'acc48 -> 'acc48
    method extension_constructor : 'b -> extension_constructor -> 'acc49 -> 'acc49
    method type_exception : 'b -> type_exception -> 'acc50 -> 'acc50
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - 'acc51 -> - 'acc51
    method class_type : 'b -> class_type -> 'acc52 -> 'acc52
    method class_type_desc : 'b -> class_type_desc -> 'acc53 -> 'acc53
    method class_signature : 'b -> class_signature -> 'acc54 -> 'acc54
    method class_type_field : 'b -> class_type_field -> 'acc55 -> 'acc55
    method class_type_field_desc : 'b -> class_type_field_desc -> 'acc56 -> 'acc56
    method class_infos : 'b -> - 'a. ('a -> 'acc57 -> 'acc57) -> - 'a class_infos -> - 'acc57 -> - 'acc57
    method class_description : 'b -> class_description -> 'acc58 -> 'acc58
    method class_type_declaration : 'b -> - class_type_declaration -> - 'acc59 -> - 'acc59
    method class_expr : 'b -> class_expr -> 'acc60 -> 'acc60
    method class_expr_desc : 'b -> class_expr_desc -> 'acc61 -> 'acc61
    method class_structure : 'b -> class_structure -> 'acc62 -> 'acc62
    method class_field : 'b -> class_field -> 'acc63 -> 'acc63
    method class_field_desc : 'b -> class_field_desc -> 'acc64 -> 'acc64
    method class_field_kind : 'b -> class_field_kind -> 'acc65 -> 'acc65
    method class_declaration : 'b -> class_declaration -> 'acc66 -> 'acc66
    method module_type : 'b -> module_type -> 'acc67 -> 'acc67
    method module_type_desc : 'b -> module_type_desc -> 'acc68 -> 'acc68
    method functor_parameter : 'b -> functor_parameter -> 'acc69 -> 'acc69
    method signature : 'b -> signature -> 'acc70 -> 'acc70
    method signature_item : 'b -> signature_item -> 'acc71 -> 'acc71
    method signature_item_desc : 'b -> signature_item_desc -> 'acc72 -> 'acc72
    method module_declaration : 'b -> module_declaration -> 'acc73 -> 'acc73
    method module_substitution : 'b -> module_substitution -> 'acc74 -> 'acc74
    method module_type_declaration : 'b -> - module_type_declaration -> - 'acc75 -> - 'acc75
    method open_infos : 'b -> - 'a. ('a -> 'acc76 -> 'acc76) -> - 'a open_infos -> - 'acc76 -> - 'acc76
    method open_description : 'b -> open_description -> 'acc77 -> 'acc77
    method open_declaration : 'b -> open_declaration -> 'acc78 -> 'acc78
    method include_infos : 'b -> - 'a. ('a -> 'acc79 -> 'acc79) -> +fold (ppxlib.Ppxlib_ast.Ast.fold)

    Class Ast.fold

    method virtual bool : bool -> 'acc -> 'acc
    method virtual char : char -> 'acc -> 'acc
    method virtual int : int -> 'acc -> 'acc
    method virtual list : 'a. ('a -> 'acc -> 'acc) -> 'a list -> 'acc -> 'acc
    method virtual option : 'a. ('a -> 'acc -> 'acc) -> 'a option -> 'acc -> 'acc
    method virtual string : string -> 'acc -> 'acc
    method position : position -> 'acc -> 'acc
    method location : location -> 'acc -> 'acc
    method location_stack : location_stack -> 'acc -> 'acc
    method loc : 'a. ('a -> 'acc -> 'acc) -> 'a loc -> 'acc -> 'acc
    method longident : longident -> 'acc -> 'acc
    method longident_loc : longident_loc -> 'acc -> 'acc
    method rec_flag : rec_flag -> 'acc -> 'acc
    method direction_flag : direction_flag -> 'acc -> 'acc
    method private_flag : private_flag -> 'acc -> 'acc
    method mutable_flag : mutable_flag -> 'acc -> 'acc
    method virtual_flag : virtual_flag -> 'acc -> 'acc
    method override_flag : override_flag -> 'acc -> 'acc
    method closed_flag : closed_flag -> 'acc -> 'acc
    method label : label -> 'acc -> 'acc
    method arg_label : arg_label -> 'acc -> 'acc
    method variance : variance -> 'acc -> 'acc
    method injectivity : injectivity -> 'acc -> 'acc
    method constant : constant -> 'acc -> 'acc
    method attribute : attribute -> 'acc -> 'acc
    method extension : extension -> 'acc -> 'acc
    method attributes : attributes -> 'acc -> 'acc
    method payload : payload -> 'acc -> 'acc
    method core_type : core_type -> 'acc -> 'acc
    method core_type_desc : core_type_desc -> 'acc -> 'acc
    method package_type : package_type -> 'acc -> 'acc
    method row_field : row_field -> 'acc -> 'acc
    method row_field_desc : row_field_desc -> 'acc -> 'acc
    method object_field : object_field -> 'acc -> 'acc
    method object_field_desc : object_field_desc -> 'acc -> 'acc
    method pattern : pattern -> 'acc -> 'acc
    method pattern_desc : pattern_desc -> 'acc -> 'acc
    method expression : expression -> 'acc -> 'acc
    method expression_desc : expression_desc -> 'acc -> 'acc
    method case : case -> 'acc -> 'acc
    method letop : letop -> 'acc -> 'acc
    method binding_op : binding_op -> 'acc -> 'acc
    method value_description : value_description -> 'acc -> 'acc
    method type_declaration : type_declaration -> 'acc -> 'acc
    method type_kind : type_kind -> 'acc -> 'acc
    method label_declaration : label_declaration -> 'acc -> 'acc
    method constructor_declaration : constructor_declaration -> 'acc -> 'acc
    method constructor_arguments : constructor_arguments -> 'acc -> 'acc
    method type_extension : type_extension -> 'acc -> 'acc
    method extension_constructor : extension_constructor -> 'acc -> 'acc
    method type_exception : type_exception -> 'acc -> 'acc
    method extension_constructor_kind : extension_constructor_kind -> 'acc -> 'acc
    method class_type : class_type -> 'acc -> 'acc
    method class_type_desc : class_type_desc -> 'acc -> 'acc
    method class_signature : class_signature -> 'acc -> 'acc
    method class_type_field : class_type_field -> 'acc -> 'acc
    method class_type_field_desc : class_type_field_desc -> 'acc -> 'acc
    method class_infos : 'a. ('a -> 'acc -> 'acc) -> 'a class_infos -> 'acc -> 'acc
    method class_description : class_description -> 'acc -> 'acc
    method class_type_declaration : class_type_declaration -> 'acc -> 'acc
    method class_expr : class_expr -> 'acc -> 'acc
    method class_expr_desc : class_expr_desc -> 'acc -> 'acc
    method class_structure : class_structure -> 'acc -> 'acc
    method class_field : class_field -> 'acc -> 'acc
    method class_field_desc : class_field_desc -> 'acc -> 'acc
    method class_field_kind : class_field_kind -> 'acc -> 'acc
    method class_declaration : class_declaration -> 'acc -> 'acc
    method module_type : module_type -> 'acc -> 'acc
    method module_type_desc : module_type_desc -> 'acc -> 'acc
    method functor_parameter : functor_parameter -> 'acc -> 'acc
    method signature : signature -> 'acc -> 'acc
    method signature_item : signature_item -> 'acc -> 'acc
    method signature_item_desc : signature_item_desc -> 'acc -> 'acc
    method module_declaration : module_declaration -> 'acc -> 'acc
    method module_substitution : module_substitution -> 'acc -> 'acc
    method module_type_declaration : module_type_declaration -> 'acc -> 'acc
    method open_infos : 'a. ('a -> 'acc -> 'acc) -> 'a open_infos -> 'acc -> 'acc
    method open_description : open_description -> 'acc -> 'acc
    method open_declaration : open_declaration -> 'acc -> 'acc
    method include_infos : 'a. ('a -> 'acc -> 'acc) -> 'a include_infos -> - 'acc79 -> - 'acc79
    method include_description : 'b -> include_description -> 'acc80 -> 'acc80
    method include_declaration : 'b -> include_declaration -> 'acc81 -> 'acc81
    method with_constraint : 'b -> with_constraint -> 'acc82 -> 'acc82
    method module_expr : 'b -> module_expr -> 'acc83 -> 'acc83
    method module_expr_desc : 'b -> module_expr_desc -> 'acc84 -> 'acc84
    method structure : 'b -> structure -> 'acc85 -> 'acc85
    method structure_item : 'b -> structure_item -> 'acc86 -> 'acc86
    method structure_item_desc : 'b -> structure_item_desc -> 'acc87 -> 'acc87
    method value_binding : 'b -> value_binding -> 'acc88 -> 'acc88
    method module_binding : 'b -> module_binding -> 'acc89 -> 'acc89
    method toplevel_phrase : 'b -> toplevel_phrase -> 'acc90 -> 'acc90
    method toplevel_directive : 'b -> toplevel_directive -> 'acc91 -> 'acc91
    method directive_argument : 'b -> directive_argument -> 'acc92 -> 'acc92
    method directive_argument_desc : 'b -> - directive_argument_desc -> - 'acc93 -> - 'acc93
    method cases : 'b -> cases -> 'acc94 -> 'acc94
    \ No newline at end of file + 'acc -> + 'acc
    method include_description : include_description -> 'acc -> 'acc
    method include_declaration : include_declaration -> 'acc -> 'acc
    method with_constraint : with_constraint -> 'acc -> 'acc
    method module_expr : module_expr -> 'acc -> 'acc
    method module_expr_desc : module_expr_desc -> 'acc -> 'acc
    method structure : structure -> 'acc -> 'acc
    method structure_item : structure_item -> 'acc -> 'acc
    method structure_item_desc : structure_item_desc -> 'acc -> 'acc
    method value_binding : value_binding -> 'acc -> 'acc
    method module_binding : module_binding -> 'acc -> 'acc
    method toplevel_phrase : toplevel_phrase -> 'acc -> 'acc
    method toplevel_directive : toplevel_directive -> 'acc -> 'acc
    method directive_argument : directive_argument -> 'acc -> 'acc
    method directive_argument_desc : directive_argument_desc -> 'acc -> 'acc
    method cases : cases -> 'acc -> 'acc
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-fold_map/index.html b/ppxlib/Ppxlib_ast/Ast/class-fold_map/index.html index 7ab3f27..e0bf798 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-fold_map/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-fold_map/index.html @@ -1,159 +1,61 @@ -fold_map (ppxlib.Ppxlib_ast.Ast.fold_map)

    Class Ast.fold_map

    method virtual bool : bool -> 'acc0 -> bool * 'acc0
    method virtual char : char -> 'acc1 -> char * 'acc1
    method virtual int : int -> 'acc2 -> int * 'acc2
    method virtual list : 'a. ('a -> 'acc3 -> 'a * 'acc3) -> +fold_map (ppxlib.Ppxlib_ast.Ast.fold_map)

    Class Ast.fold_map

    method virtual bool : bool -> 'acc -> bool * 'acc
    method virtual char : char -> 'acc -> char * 'acc
    method virtual int : int -> 'acc -> int * 'acc
    method virtual list : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a list -> - 'acc3 -> - 'a list * 'acc3
    method virtual option : 'a. ('a -> 'acc4 -> 'a * 'acc4) -> + 'acc -> + 'a list * 'acc
    method virtual option : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a option -> - 'acc4 -> - 'a option * 'acc4
    method virtual string : string -> 'acc5 -> string * 'acc5
    method position : 'acc fold_map -> position -> 'acc6 -> position * 'acc6
    method location : 'b -> location -> 'acc7 -> location * 'acc7
    method location_stack : 'b -> location_stack -> 'acc8 -> location_stack * 'acc8
    method loc : 'b -> - 'a. ('a -> 'acc9 -> 'a * 'acc9) -> - 'a loc -> - 'acc9 -> - 'a loc * 'acc9
    method longident : 'b -> longident -> 'acc10 -> longident * 'acc10
    method longident_loc : 'b -> longident_loc -> 'acc11 -> longident_loc * 'acc11
    method rec_flag : 'b -> rec_flag -> 'acc12 -> rec_flag * 'acc12
    method direction_flag : 'b -> - direction_flag -> - 'acc13 -> - direction_flag * 'acc13
    method private_flag : 'b -> private_flag -> 'acc14 -> private_flag * 'acc14
    method mutable_flag : 'b -> mutable_flag -> 'acc15 -> mutable_flag * 'acc15
    method virtual_flag : 'b -> virtual_flag -> 'acc16 -> virtual_flag * 'acc16
    method override_flag : 'b -> override_flag -> 'acc17 -> override_flag * 'acc17
    method closed_flag : 'b -> closed_flag -> 'acc18 -> closed_flag * 'acc18
    method label : 'b -> label -> 'acc19 -> label * 'acc19
    method arg_label : 'b -> arg_label -> 'acc20 -> arg_label * 'acc20
    method variance : 'b -> variance -> 'acc21 -> variance * 'acc21
    method injectivity : 'b -> injectivity -> 'acc22 -> injectivity * 'acc22
    method constant : 'b -> constant -> 'acc23 -> constant * 'acc23
    method attribute : 'b -> attribute -> 'acc24 -> attribute * 'acc24
    method extension : 'b -> extension -> 'acc25 -> extension * 'acc25
    method attributes : 'b -> attributes -> 'acc26 -> attributes * 'acc26
    method payload : 'b -> payload -> 'acc27 -> payload * 'acc27
    method core_type : 'b -> core_type -> 'acc28 -> core_type * 'acc28
    method core_type_desc : 'b -> - core_type_desc -> - 'acc29 -> - core_type_desc * 'acc29
    method package_type : 'b -> package_type -> 'acc30 -> package_type * 'acc30
    method row_field : 'b -> row_field -> 'acc31 -> row_field * 'acc31
    method row_field_desc : 'b -> - row_field_desc -> - 'acc32 -> - row_field_desc * 'acc32
    method object_field : 'b -> object_field -> 'acc33 -> object_field * 'acc33
    method object_field_desc : 'b -> - object_field_desc -> - 'acc34 -> - object_field_desc * 'acc34
    method pattern : 'b -> pattern -> 'acc35 -> pattern * 'acc35
    method pattern_desc : 'b -> pattern_desc -> 'acc36 -> pattern_desc * 'acc36
    method expression : 'b -> expression -> 'acc37 -> expression * 'acc37
    method expression_desc : 'b -> - expression_desc -> - 'acc38 -> - expression_desc * 'acc38
    method case : 'b -> case -> 'acc39 -> case * 'acc39
    method letop : 'b -> letop -> 'acc40 -> letop * 'acc40
    method binding_op : 'b -> binding_op -> 'acc41 -> binding_op * 'acc41
    method value_description : 'b -> - value_description -> - 'acc42 -> - value_description * 'acc42
    method type_declaration : 'b -> - type_declaration -> - 'acc43 -> - type_declaration * 'acc43
    method type_kind : 'b -> type_kind -> 'acc44 -> type_kind * 'acc44
    method label_declaration : 'b -> - label_declaration -> - 'acc45 -> - label_declaration * 'acc45
    method constructor_declaration : 'b -> - constructor_declaration -> - 'acc46 -> - constructor_declaration * 'acc46
    method constructor_arguments : 'b -> - constructor_arguments -> - 'acc47 -> - constructor_arguments * 'acc47
    method type_extension : 'b -> - type_extension -> - 'acc48 -> - type_extension * 'acc48
    method extension_constructor : 'b -> - extension_constructor -> - 'acc49 -> - extension_constructor * 'acc49
    method type_exception : 'b -> - type_exception -> - 'acc50 -> - type_exception * 'acc50
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - 'acc51 -> - extension_constructor_kind * 'acc51
    method class_type : 'b -> class_type -> 'acc52 -> class_type * 'acc52
    method class_type_desc : 'b -> - class_type_desc -> - 'acc53 -> - class_type_desc * 'acc53
    method class_signature : 'b -> - class_signature -> - 'acc54 -> - class_signature * 'acc54
    method class_type_field : 'b -> - class_type_field -> - 'acc55 -> - class_type_field * 'acc55
    method class_type_field_desc : 'b -> - class_type_field_desc -> - 'acc56 -> - class_type_field_desc * 'acc56
    method class_infos : 'b -> - 'a. ('a -> 'acc57 -> 'a * 'acc57) -> + 'acc -> + 'a option * 'acc
    method virtual string : string -> 'acc -> string * 'acc
    method position : position -> 'acc -> position * 'acc
    method location : location -> 'acc -> location * 'acc
    method location_stack : location_stack -> 'acc -> location_stack * 'acc
    method loc : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a loc -> 'acc -> 'a loc * 'acc
    method longident : longident -> 'acc -> longident * 'acc
    method longident_loc : longident_loc -> 'acc -> longident_loc * 'acc
    method rec_flag : rec_flag -> 'acc -> rec_flag * 'acc
    method direction_flag : direction_flag -> 'acc -> direction_flag * 'acc
    method private_flag : private_flag -> 'acc -> private_flag * 'acc
    method mutable_flag : mutable_flag -> 'acc -> mutable_flag * 'acc
    method virtual_flag : virtual_flag -> 'acc -> virtual_flag * 'acc
    method override_flag : override_flag -> 'acc -> override_flag * 'acc
    method closed_flag : closed_flag -> 'acc -> closed_flag * 'acc
    method label : label -> 'acc -> label * 'acc
    method arg_label : arg_label -> 'acc -> arg_label * 'acc
    method variance : variance -> 'acc -> variance * 'acc
    method injectivity : injectivity -> 'acc -> injectivity * 'acc
    method constant : constant -> 'acc -> constant * 'acc
    method attribute : attribute -> 'acc -> attribute * 'acc
    method extension : extension -> 'acc -> extension * 'acc
    method attributes : attributes -> 'acc -> attributes * 'acc
    method payload : payload -> 'acc -> payload * 'acc
    method core_type : core_type -> 'acc -> core_type * 'acc
    method core_type_desc : core_type_desc -> 'acc -> core_type_desc * 'acc
    method package_type : package_type -> 'acc -> package_type * 'acc
    method row_field : row_field -> 'acc -> row_field * 'acc
    method row_field_desc : row_field_desc -> 'acc -> row_field_desc * 'acc
    method object_field : object_field -> 'acc -> object_field * 'acc
    method object_field_desc : object_field_desc -> + 'acc -> + object_field_desc * 'acc
    method pattern : pattern -> 'acc -> pattern * 'acc
    method pattern_desc : pattern_desc -> 'acc -> pattern_desc * 'acc
    method expression : expression -> 'acc -> expression * 'acc
    method expression_desc : expression_desc -> 'acc -> expression_desc * 'acc
    method case : case -> 'acc -> case * 'acc
    method letop : letop -> 'acc -> letop * 'acc
    method binding_op : binding_op -> 'acc -> binding_op * 'acc
    method value_description : value_description -> + 'acc -> + value_description * 'acc
    method type_declaration : type_declaration -> 'acc -> type_declaration * 'acc
    method type_kind : type_kind -> 'acc -> type_kind * 'acc
    method label_declaration : label_declaration -> + 'acc -> + label_declaration * 'acc
    method constructor_declaration : constructor_declaration -> + 'acc -> + constructor_declaration * 'acc
    method constructor_arguments : constructor_arguments -> + 'acc -> + constructor_arguments * 'acc
    method type_extension : type_extension -> 'acc -> type_extension * 'acc
    method extension_constructor : extension_constructor -> + 'acc -> + extension_constructor * 'acc
    method type_exception : type_exception -> 'acc -> type_exception * 'acc
    method extension_constructor_kind : extension_constructor_kind -> + 'acc -> + extension_constructor_kind * 'acc
    method class_type : class_type -> 'acc -> class_type * 'acc
    method class_type_desc : class_type_desc -> 'acc -> class_type_desc * 'acc
    method class_signature : class_signature -> 'acc -> class_signature * 'acc
    method class_type_field : class_type_field -> 'acc -> class_type_field * 'acc
    method class_type_field_desc : class_type_field_desc -> + 'acc -> + class_type_field_desc * 'acc
    method class_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a class_infos -> - 'acc57 -> - 'a class_infos * 'acc57
    method class_description : 'b -> - class_description -> - 'acc58 -> - class_description * 'acc58
    method class_type_declaration : 'b -> - class_type_declaration -> - 'acc59 -> - class_type_declaration * 'acc59
    method class_expr : 'b -> class_expr -> 'acc60 -> class_expr * 'acc60
    method class_expr_desc : 'b -> - class_expr_desc -> - 'acc61 -> - class_expr_desc * 'acc61
    method class_structure : 'b -> - class_structure -> - 'acc62 -> - class_structure * 'acc62
    method class_field : 'b -> class_field -> 'acc63 -> class_field * 'acc63
    method class_field_desc : 'b -> - class_field_desc -> - 'acc64 -> - class_field_desc * 'acc64
    method class_field_kind : 'b -> - class_field_kind -> - 'acc65 -> - class_field_kind * 'acc65
    method class_declaration : 'b -> - class_declaration -> - 'acc66 -> - class_declaration * 'acc66
    method module_type : 'b -> module_type -> 'acc67 -> module_type * 'acc67
    method module_type_desc : 'b -> - module_type_desc -> - 'acc68 -> - module_type_desc * 'acc68
    method functor_parameter : 'b -> - functor_parameter -> - 'acc69 -> - functor_parameter * 'acc69
    method signature : 'b -> signature -> 'acc70 -> signature * 'acc70
    method signature_item : 'b -> - signature_item -> - 'acc71 -> - signature_item * 'acc71
    method signature_item_desc : 'b -> - signature_item_desc -> - 'acc72 -> - signature_item_desc * 'acc72
    method module_declaration : 'b -> - module_declaration -> - 'acc73 -> - module_declaration * 'acc73
    method module_substitution : 'b -> - module_substitution -> - 'acc74 -> - module_substitution * 'acc74
    method module_type_declaration : 'b -> - module_type_declaration -> - 'acc75 -> - module_type_declaration * 'acc75
    method open_infos : 'b -> - 'a. ('a -> 'acc76 -> 'a * 'acc76) -> + 'acc -> + 'a class_infos * 'acc
    method class_description : class_description -> + 'acc -> + class_description * 'acc
    method class_type_declaration : class_type_declaration -> + 'acc -> + class_type_declaration * 'acc
    method class_expr : class_expr -> 'acc -> class_expr * 'acc
    method class_expr_desc : class_expr_desc -> 'acc -> class_expr_desc * 'acc
    method class_structure : class_structure -> 'acc -> class_structure * 'acc
    method class_field : class_field -> 'acc -> class_field * 'acc
    method class_field_desc : class_field_desc -> 'acc -> class_field_desc * 'acc
    method class_field_kind : class_field_kind -> 'acc -> class_field_kind * 'acc
    method class_declaration : class_declaration -> + 'acc -> + class_declaration * 'acc
    method module_type : module_type -> 'acc -> module_type * 'acc
    method module_type_desc : module_type_desc -> 'acc -> module_type_desc * 'acc
    method functor_parameter : functor_parameter -> + 'acc -> + functor_parameter * 'acc
    method signature : signature -> 'acc -> signature * 'acc
    method signature_item : signature_item -> 'acc -> signature_item * 'acc
    method signature_item_desc : signature_item_desc -> + 'acc -> + signature_item_desc * 'acc
    method module_declaration : module_declaration -> + 'acc -> + module_declaration * 'acc
    method module_substitution : module_substitution -> + 'acc -> + module_substitution * 'acc
    method module_type_declaration : module_type_declaration -> + 'acc -> + module_type_declaration * 'acc
    method open_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a open_infos -> - 'acc76 -> - 'a open_infos * 'acc76
    method open_description : 'b -> - open_description -> - 'acc77 -> - open_description * 'acc77
    method open_declaration : 'b -> - open_declaration -> - 'acc78 -> - open_declaration * 'acc78
    method include_infos : 'b -> - 'a. ('a -> 'acc79 -> 'a * 'acc79) -> + 'acc -> + 'a open_infos * 'acc
    method open_description : open_description -> 'acc -> open_description * 'acc
    method open_declaration : open_declaration -> 'acc -> open_declaration * 'acc
    method include_infos : 'a. ('a -> 'acc -> 'a * 'acc) -> 'a include_infos -> - 'acc79 -> - 'a include_infos * 'acc79
    method include_description : 'b -> - include_description -> - 'acc80 -> - include_description * 'acc80
    method include_declaration : 'b -> - include_declaration -> - 'acc81 -> - include_declaration * 'acc81
    method with_constraint : 'b -> - with_constraint -> - 'acc82 -> - with_constraint * 'acc82
    method module_expr : 'b -> module_expr -> 'acc83 -> module_expr * 'acc83
    method module_expr_desc : 'b -> - module_expr_desc -> - 'acc84 -> - module_expr_desc * 'acc84
    method structure : 'b -> structure -> 'acc85 -> structure * 'acc85
    method structure_item : 'b -> - structure_item -> - 'acc86 -> - structure_item * 'acc86
    method structure_item_desc : 'b -> - structure_item_desc -> - 'acc87 -> - structure_item_desc * 'acc87
    method value_binding : 'b -> value_binding -> 'acc88 -> value_binding * 'acc88
    method module_binding : 'b -> - module_binding -> - 'acc89 -> - module_binding * 'acc89
    method toplevel_phrase : 'b -> - toplevel_phrase -> - 'acc90 -> - toplevel_phrase * 'acc90
    method toplevel_directive : 'b -> - toplevel_directive -> - 'acc91 -> - toplevel_directive * 'acc91
    method directive_argument : 'b -> - directive_argument -> - 'acc92 -> - directive_argument * 'acc92
    method directive_argument_desc : 'b -> - directive_argument_desc -> - 'acc93 -> - directive_argument_desc * 'acc93
    method cases : 'b -> cases -> 'acc94 -> cases * 'acc94
    \ No newline at end of file + 'acc -> + 'a include_infos * 'acc
    method include_description : include_description -> + 'acc -> + include_description * 'acc
    method include_declaration : include_declaration -> + 'acc -> + include_declaration * 'acc
    method with_constraint : with_constraint -> 'acc -> with_constraint * 'acc
    method module_expr : module_expr -> 'acc -> module_expr * 'acc
    method module_expr_desc : module_expr_desc -> 'acc -> module_expr_desc * 'acc
    method structure : structure -> 'acc -> structure * 'acc
    method structure_item : structure_item -> 'acc -> structure_item * 'acc
    method structure_item_desc : structure_item_desc -> + 'acc -> + structure_item_desc * 'acc
    method value_binding : value_binding -> 'acc -> value_binding * 'acc
    method module_binding : module_binding -> 'acc -> module_binding * 'acc
    method toplevel_phrase : toplevel_phrase -> 'acc -> toplevel_phrase * 'acc
    method toplevel_directive : toplevel_directive -> + 'acc -> + toplevel_directive * 'acc
    method directive_argument : directive_argument -> + 'acc -> + directive_argument * 'acc
    method directive_argument_desc : directive_argument_desc -> + 'acc -> + directive_argument_desc * 'acc
    method cases : cases -> 'acc -> cases * 'acc
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-iter/index.html b/ppxlib/Ppxlib_ast/Ast/class-iter/index.html index 74beca0..e1eb9ba 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-iter/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-iter/index.html @@ -1,2 +1,2 @@ -iter (ppxlib.Ppxlib_ast.Ast.iter)

    Class Ast.iter

    method virtual bool : bool -> unit
    method virtual char : char -> unit
    method virtual int : int -> unit
    method virtual list : 'a. ('a -> unit) -> 'a list -> unit
    method virtual option : 'a. ('a -> unit) -> 'a option -> unit
    method virtual string : string -> unit
    method position : iter -> position -> unit
    method location : 'b -> location -> unit
    method location_stack : 'b -> location_stack -> unit
    method loc : 'b -> 'a. ('a -> unit) -> 'a loc -> unit
    method longident : 'b -> longident -> unit
    method longident_loc : 'b -> longident_loc -> unit
    method rec_flag : 'b -> rec_flag -> unit
    method direction_flag : 'b -> direction_flag -> unit
    method private_flag : 'b -> private_flag -> unit
    method mutable_flag : 'b -> mutable_flag -> unit
    method virtual_flag : 'b -> virtual_flag -> unit
    method override_flag : 'b -> override_flag -> unit
    method closed_flag : 'b -> closed_flag -> unit
    method label : 'b -> label -> unit
    method arg_label : 'b -> arg_label -> unit
    method variance : 'b -> variance -> unit
    method injectivity : 'b -> injectivity -> unit
    method constant : 'b -> constant -> unit
    method attribute : 'b -> attribute -> unit
    method extension : 'b -> extension -> unit
    method attributes : 'b -> attributes -> unit
    method payload : 'b -> payload -> unit
    method core_type : 'b -> core_type -> unit
    method core_type_desc : 'b -> core_type_desc -> unit
    method package_type : 'b -> package_type -> unit
    method row_field : 'b -> row_field -> unit
    method row_field_desc : 'b -> row_field_desc -> unit
    method object_field : 'b -> object_field -> unit
    method object_field_desc : 'b -> object_field_desc -> unit
    method pattern : 'b -> pattern -> unit
    method pattern_desc : 'b -> pattern_desc -> unit
    method expression : 'b -> expression -> unit
    method expression_desc : 'b -> expression_desc -> unit
    method case : 'b -> case -> unit
    method letop : 'b -> letop -> unit
    method binding_op : 'b -> binding_op -> unit
    method value_description : 'b -> value_description -> unit
    method type_declaration : 'b -> type_declaration -> unit
    method type_kind : 'b -> type_kind -> unit
    method label_declaration : 'b -> label_declaration -> unit
    method constructor_declaration : 'b -> constructor_declaration -> unit
    method constructor_arguments : 'b -> constructor_arguments -> unit
    method type_extension : 'b -> type_extension -> unit
    method extension_constructor : 'b -> extension_constructor -> unit
    method type_exception : 'b -> type_exception -> unit
    method extension_constructor_kind : 'b -> extension_constructor_kind -> unit
    method class_type : 'b -> class_type -> unit
    method class_type_desc : 'b -> class_type_desc -> unit
    method class_signature : 'b -> class_signature -> unit
    method class_type_field : 'b -> class_type_field -> unit
    method class_type_field_desc : 'b -> class_type_field_desc -> unit
    method class_infos : 'b -> 'a. ('a -> unit) -> 'a class_infos -> unit
    method class_description : 'b -> class_description -> unit
    method class_type_declaration : 'b -> class_type_declaration -> unit
    method class_expr : 'b -> class_expr -> unit
    method class_expr_desc : 'b -> class_expr_desc -> unit
    method class_structure : 'b -> class_structure -> unit
    method class_field : 'b -> class_field -> unit
    method class_field_desc : 'b -> class_field_desc -> unit
    method class_field_kind : 'b -> class_field_kind -> unit
    method class_declaration : 'b -> class_declaration -> unit
    method module_type : 'b -> module_type -> unit
    method module_type_desc : 'b -> module_type_desc -> unit
    method functor_parameter : 'b -> functor_parameter -> unit
    method signature : 'b -> signature -> unit
    method signature_item : 'b -> signature_item -> unit
    method signature_item_desc : 'b -> signature_item_desc -> unit
    method module_declaration : 'b -> module_declaration -> unit
    method module_substitution : 'b -> module_substitution -> unit
    method module_type_declaration : 'b -> module_type_declaration -> unit
    method open_infos : 'b -> 'a. ('a -> unit) -> 'a open_infos -> unit
    method open_description : 'b -> open_description -> unit
    method open_declaration : 'b -> open_declaration -> unit
    method include_infos : 'b -> 'a. ('a -> unit) -> 'a include_infos -> unit
    method include_description : 'b -> include_description -> unit
    method include_declaration : 'b -> include_declaration -> unit
    method with_constraint : 'b -> with_constraint -> unit
    method module_expr : 'b -> module_expr -> unit
    method module_expr_desc : 'b -> module_expr_desc -> unit
    method structure : 'b -> structure -> unit
    method structure_item : 'b -> structure_item -> unit
    method structure_item_desc : 'b -> structure_item_desc -> unit
    method value_binding : 'b -> value_binding -> unit
    method module_binding : 'b -> module_binding -> unit
    method toplevel_phrase : 'b -> toplevel_phrase -> unit
    method toplevel_directive : 'b -> toplevel_directive -> unit
    method directive_argument : 'b -> directive_argument -> unit
    method directive_argument_desc : 'b -> directive_argument_desc -> unit
    method cases : 'b -> cases -> unit
    \ No newline at end of file +iter (ppxlib.Ppxlib_ast.Ast.iter)

    Class Ast.iter

    method virtual bool : bool -> unit
    method virtual char : char -> unit
    method virtual int : int -> unit
    method virtual list : 'a. ('a -> unit) -> 'a list -> unit
    method virtual option : 'a. ('a -> unit) -> 'a option -> unit
    method virtual string : string -> unit
    method position : position -> unit
    method location : location -> unit
    method location_stack : location_stack -> unit
    method loc : 'a. ('a -> unit) -> 'a loc -> unit
    method longident : longident -> unit
    method longident_loc : longident_loc -> unit
    method rec_flag : rec_flag -> unit
    method direction_flag : direction_flag -> unit
    method private_flag : private_flag -> unit
    method mutable_flag : mutable_flag -> unit
    method virtual_flag : virtual_flag -> unit
    method override_flag : override_flag -> unit
    method closed_flag : closed_flag -> unit
    method label : label -> unit
    method arg_label : arg_label -> unit
    method variance : variance -> unit
    method injectivity : injectivity -> unit
    method constant : constant -> unit
    method attribute : attribute -> unit
    method extension : extension -> unit
    method attributes : attributes -> unit
    method payload : payload -> unit
    method core_type : core_type -> unit
    method core_type_desc : core_type_desc -> unit
    method package_type : package_type -> unit
    method row_field : row_field -> unit
    method row_field_desc : row_field_desc -> unit
    method object_field : object_field -> unit
    method object_field_desc : object_field_desc -> unit
    method pattern : pattern -> unit
    method pattern_desc : pattern_desc -> unit
    method expression : expression -> unit
    method expression_desc : expression_desc -> unit
    method case : case -> unit
    method letop : letop -> unit
    method binding_op : binding_op -> unit
    method value_description : value_description -> unit
    method type_declaration : type_declaration -> unit
    method type_kind : type_kind -> unit
    method label_declaration : label_declaration -> unit
    method constructor_declaration : constructor_declaration -> unit
    method constructor_arguments : constructor_arguments -> unit
    method type_extension : type_extension -> unit
    method extension_constructor : extension_constructor -> unit
    method type_exception : type_exception -> unit
    method extension_constructor_kind : extension_constructor_kind -> unit
    method class_type : class_type -> unit
    method class_type_desc : class_type_desc -> unit
    method class_signature : class_signature -> unit
    method class_type_field : class_type_field -> unit
    method class_type_field_desc : class_type_field_desc -> unit
    method class_infos : 'a. ('a -> unit) -> 'a class_infos -> unit
    method class_description : class_description -> unit
    method class_type_declaration : class_type_declaration -> unit
    method class_expr : class_expr -> unit
    method class_expr_desc : class_expr_desc -> unit
    method class_structure : class_structure -> unit
    method class_field : class_field -> unit
    method class_field_desc : class_field_desc -> unit
    method class_field_kind : class_field_kind -> unit
    method class_declaration : class_declaration -> unit
    method module_type : module_type -> unit
    method module_type_desc : module_type_desc -> unit
    method functor_parameter : functor_parameter -> unit
    method signature : signature -> unit
    method signature_item : signature_item -> unit
    method signature_item_desc : signature_item_desc -> unit
    method module_declaration : module_declaration -> unit
    method module_substitution : module_substitution -> unit
    method module_type_declaration : module_type_declaration -> unit
    method open_infos : 'a. ('a -> unit) -> 'a open_infos -> unit
    method open_description : open_description -> unit
    method open_declaration : open_declaration -> unit
    method include_infos : 'a. ('a -> unit) -> 'a include_infos -> unit
    method include_description : include_description -> unit
    method include_declaration : include_declaration -> unit
    method with_constraint : with_constraint -> unit
    method module_expr : module_expr -> unit
    method module_expr_desc : module_expr_desc -> unit
    method structure : structure -> unit
    method structure_item : structure_item -> unit
    method structure_item_desc : structure_item_desc -> unit
    method value_binding : value_binding -> unit
    method module_binding : module_binding -> unit
    method toplevel_phrase : toplevel_phrase -> unit
    method toplevel_directive : toplevel_directive -> unit
    method directive_argument : directive_argument -> unit
    method directive_argument_desc : directive_argument_desc -> unit
    method cases : cases -> unit
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-lift/index.html b/ppxlib/Ppxlib_ast/Ast/class-lift/index.html index b37d254..c42fffd 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-lift/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-lift/index.html @@ -1,2 +1,2 @@ -lift (ppxlib.Ppxlib_ast.Ast.lift)

    Class Ast.lift

    method virtual record : (string * 'res0) list -> 'res0
    method virtual constr : string -> 'res1 list -> 'res1
    method virtual tuple : 'res2 list -> 'res2
    method virtual bool : bool -> 'res3
    method virtual char : char -> 'res4
    method virtual int : int -> 'res5
    method virtual list : 'a. ('a -> 'res6) -> 'a list -> 'res6
    method virtual option : 'a. ('a -> 'res7) -> 'a option -> 'res7
    method virtual string : string -> 'res8
    method position : 'res lift -> position -> 'res9
    method location : 'b -> location -> 'res10
    method location_stack : 'b -> location_stack -> 'res11
    method loc : 'b -> 'a. ('a -> 'res12) -> 'a loc -> 'res12
    method longident : 'b -> longident -> 'res13
    method longident_loc : 'b -> longident_loc -> 'res14
    method rec_flag : 'b -> rec_flag -> 'res15
    method direction_flag : 'b -> direction_flag -> 'res16
    method private_flag : 'b -> private_flag -> 'res17
    method mutable_flag : 'b -> mutable_flag -> 'res18
    method virtual_flag : 'b -> virtual_flag -> 'res19
    method override_flag : 'b -> override_flag -> 'res20
    method closed_flag : 'b -> closed_flag -> 'res21
    method label : 'b -> label -> 'res22
    method arg_label : 'b -> arg_label -> 'res23
    method variance : 'b -> variance -> 'res24
    method injectivity : 'b -> injectivity -> 'res25
    method constant : 'b -> constant -> 'res26
    method attribute : 'b -> attribute -> 'res27
    method extension : 'b -> extension -> 'res28
    method attributes : 'b -> attributes -> 'res29
    method payload : 'b -> payload -> 'res30
    method core_type : 'b -> core_type -> 'res31
    method core_type_desc : 'b -> core_type_desc -> 'res32
    method package_type : 'b -> package_type -> 'res33
    method row_field : 'b -> row_field -> 'res34
    method row_field_desc : 'b -> row_field_desc -> 'res35
    method object_field : 'b -> object_field -> 'res36
    method object_field_desc : 'b -> object_field_desc -> 'res37
    method pattern : 'b -> pattern -> 'res38
    method pattern_desc : 'b -> pattern_desc -> 'res39
    method expression : 'b -> expression -> 'res40
    method expression_desc : 'b -> expression_desc -> 'res41
    method case : 'b -> case -> 'res42
    method letop : 'b -> letop -> 'res43
    method binding_op : 'b -> binding_op -> 'res44
    method value_description : 'b -> value_description -> 'res45
    method type_declaration : 'b -> type_declaration -> 'res46
    method type_kind : 'b -> type_kind -> 'res47
    method label_declaration : 'b -> label_declaration -> 'res48
    method constructor_declaration : 'b -> constructor_declaration -> 'res49
    method constructor_arguments : 'b -> constructor_arguments -> 'res50
    method type_extension : 'b -> type_extension -> 'res51
    method extension_constructor : 'b -> extension_constructor -> 'res52
    method type_exception : 'b -> type_exception -> 'res53
    method extension_constructor_kind : 'b -> extension_constructor_kind -> 'res54
    method class_type : 'b -> class_type -> 'res55
    method class_type_desc : 'b -> class_type_desc -> 'res56
    method class_signature : 'b -> class_signature -> 'res57
    method class_type_field : 'b -> class_type_field -> 'res58
    method class_type_field_desc : 'b -> class_type_field_desc -> 'res59
    method class_infos : 'b -> 'a. ('a -> 'res60) -> 'a class_infos -> 'res60
    method class_description : 'b -> class_description -> 'res61
    method class_type_declaration : 'b -> class_type_declaration -> 'res62
    method class_expr : 'b -> class_expr -> 'res63
    method class_expr_desc : 'b -> class_expr_desc -> 'res64
    method class_structure : 'b -> class_structure -> 'res65
    method class_field : 'b -> class_field -> 'res66
    method class_field_desc : 'b -> class_field_desc -> 'res67
    method class_field_kind : 'b -> class_field_kind -> 'res68
    method class_declaration : 'b -> class_declaration -> 'res69
    method module_type : 'b -> module_type -> 'res70
    method module_type_desc : 'b -> module_type_desc -> 'res71
    method functor_parameter : 'b -> functor_parameter -> 'res72
    method signature : 'b -> signature -> 'res73
    method signature_item : 'b -> signature_item -> 'res74
    method signature_item_desc : 'b -> signature_item_desc -> 'res75
    method module_declaration : 'b -> module_declaration -> 'res76
    method module_substitution : 'b -> module_substitution -> 'res77
    method module_type_declaration : 'b -> module_type_declaration -> 'res78
    method open_infos : 'b -> 'a. ('a -> 'res79) -> 'a open_infos -> 'res79
    method open_description : 'b -> open_description -> 'res80
    method open_declaration : 'b -> open_declaration -> 'res81
    method include_infos : 'b -> 'a. ('a -> 'res82) -> 'a include_infos -> 'res82
    method include_description : 'b -> include_description -> 'res83
    method include_declaration : 'b -> include_declaration -> 'res84
    method with_constraint : 'b -> with_constraint -> 'res85
    method module_expr : 'b -> module_expr -> 'res86
    method module_expr_desc : 'b -> module_expr_desc -> 'res87
    method structure : 'b -> structure -> 'res88
    method structure_item : 'b -> structure_item -> 'res89
    method structure_item_desc : 'b -> structure_item_desc -> 'res90
    method value_binding : 'b -> value_binding -> 'res91
    method module_binding : 'b -> module_binding -> 'res92
    method toplevel_phrase : 'b -> toplevel_phrase -> 'res93
    method toplevel_directive : 'b -> toplevel_directive -> 'res94
    method directive_argument : 'b -> directive_argument -> 'res95
    method directive_argument_desc : 'b -> directive_argument_desc -> 'res96
    method cases : 'b -> cases -> 'res97
    \ No newline at end of file +lift (ppxlib.Ppxlib_ast.Ast.lift)

    Class Ast.lift

    method virtual record : (string * 'res) list -> 'res
    method virtual constr : string -> 'res list -> 'res
    method virtual tuple : 'res list -> 'res
    method virtual bool : bool -> 'res
    method virtual char : char -> 'res
    method virtual int : int -> 'res
    method virtual list : 'a. ('a -> 'res) -> 'a list -> 'res
    method virtual option : 'a. ('a -> 'res) -> 'a option -> 'res
    method virtual string : string -> 'res
    method position : position -> 'res
    method location : location -> 'res
    method location_stack : location_stack -> 'res
    method loc : 'a. ('a -> 'res) -> 'a loc -> 'res
    method longident : longident -> 'res
    method longident_loc : longident_loc -> 'res
    method rec_flag : rec_flag -> 'res
    method direction_flag : direction_flag -> 'res
    method private_flag : private_flag -> 'res
    method mutable_flag : mutable_flag -> 'res
    method virtual_flag : virtual_flag -> 'res
    method override_flag : override_flag -> 'res
    method closed_flag : closed_flag -> 'res
    method label : label -> 'res
    method arg_label : arg_label -> 'res
    method variance : variance -> 'res
    method injectivity : injectivity -> 'res
    method constant : constant -> 'res
    method attribute : attribute -> 'res
    method extension : extension -> 'res
    method attributes : attributes -> 'res
    method payload : payload -> 'res
    method core_type : core_type -> 'res
    method core_type_desc : core_type_desc -> 'res
    method package_type : package_type -> 'res
    method row_field : row_field -> 'res
    method row_field_desc : row_field_desc -> 'res
    method object_field : object_field -> 'res
    method object_field_desc : object_field_desc -> 'res
    method pattern : pattern -> 'res
    method pattern_desc : pattern_desc -> 'res
    method expression : expression -> 'res
    method expression_desc : expression_desc -> 'res
    method case : case -> 'res
    method letop : letop -> 'res
    method binding_op : binding_op -> 'res
    method value_description : value_description -> 'res
    method type_declaration : type_declaration -> 'res
    method type_kind : type_kind -> 'res
    method label_declaration : label_declaration -> 'res
    method constructor_declaration : constructor_declaration -> 'res
    method constructor_arguments : constructor_arguments -> 'res
    method type_extension : type_extension -> 'res
    method extension_constructor : extension_constructor -> 'res
    method type_exception : type_exception -> 'res
    method extension_constructor_kind : extension_constructor_kind -> 'res
    method class_type : class_type -> 'res
    method class_type_desc : class_type_desc -> 'res
    method class_signature : class_signature -> 'res
    method class_type_field : class_type_field -> 'res
    method class_type_field_desc : class_type_field_desc -> 'res
    method class_infos : 'a. ('a -> 'res) -> 'a class_infos -> 'res
    method class_description : class_description -> 'res
    method class_type_declaration : class_type_declaration -> 'res
    method class_expr : class_expr -> 'res
    method class_expr_desc : class_expr_desc -> 'res
    method class_structure : class_structure -> 'res
    method class_field : class_field -> 'res
    method class_field_desc : class_field_desc -> 'res
    method class_field_kind : class_field_kind -> 'res
    method class_declaration : class_declaration -> 'res
    method module_type : module_type -> 'res
    method module_type_desc : module_type_desc -> 'res
    method functor_parameter : functor_parameter -> 'res
    method signature : signature -> 'res
    method signature_item : signature_item -> 'res
    method signature_item_desc : signature_item_desc -> 'res
    method module_declaration : module_declaration -> 'res
    method module_substitution : module_substitution -> 'res
    method module_type_declaration : module_type_declaration -> 'res
    method open_infos : 'a. ('a -> 'res) -> 'a open_infos -> 'res
    method open_description : open_description -> 'res
    method open_declaration : open_declaration -> 'res
    method include_infos : 'a. ('a -> 'res) -> 'a include_infos -> 'res
    method include_description : include_description -> 'res
    method include_declaration : include_declaration -> 'res
    method with_constraint : with_constraint -> 'res
    method module_expr : module_expr -> 'res
    method module_expr_desc : module_expr_desc -> 'res
    method structure : structure -> 'res
    method structure_item : structure_item -> 'res
    method structure_item_desc : structure_item_desc -> 'res
    method value_binding : value_binding -> 'res
    method module_binding : module_binding -> 'res
    method toplevel_phrase : toplevel_phrase -> 'res
    method toplevel_directive : toplevel_directive -> 'res
    method directive_argument : directive_argument -> 'res
    method directive_argument_desc : directive_argument_desc -> 'res
    method cases : cases -> 'res
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-lift_map_with_context/index.html b/ppxlib/Ppxlib_ast/Ast/class-lift_map_with_context/index.html index f91bad8..1154917 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-lift_map_with_context/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-lift_map_with_context/index.html @@ -1,165 +1,61 @@ -lift_map_with_context (ppxlib.Ppxlib_ast.Ast.lift_map_with_context)

    Class Ast.lift_map_with_context

    method virtual record : 'ctx0 -> (string * 'res0) list -> 'res0
    method virtual constr : 'ctx1 -> string -> 'res1 list -> 'res1
    method virtual tuple : 'ctx2 -> 'res2 list -> 'res2
    method virtual other : 'a. 'ctx3 -> 'a -> 'res3
    method virtual bool : 'ctx4 -> bool -> bool * 'res4
    method virtual char : 'ctx5 -> char -> char * 'res5
    method virtual int : 'ctx6 -> int -> int * 'res6
    method virtual list : 'a. ('ctx7 -> 'a -> 'a * 'res7) -> - 'ctx7 -> +lift_map_with_context (ppxlib.Ppxlib_ast.Ast.lift_map_with_context)

    Class Ast.lift_map_with_context

    method virtual record : 'ctx -> (string * 'res) list -> 'res
    method virtual constr : 'ctx -> string -> 'res list -> 'res
    method virtual tuple : 'ctx -> 'res list -> 'res
    method virtual other : 'a. 'ctx -> 'a -> 'res
    method virtual bool : 'ctx -> bool -> bool * 'res
    method virtual char : 'ctx -> char -> char * 'res
    method virtual int : 'ctx -> int -> int * 'res
    method virtual list : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a list -> - 'a list * 'res7
    method virtual option : 'a. ('ctx8 -> 'a -> 'a * 'res8) -> - 'ctx8 -> + 'a list * 'res
    method virtual option : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a option -> - 'a option * 'res8
    method virtual string : 'ctx9 -> string -> string * 'res9
    method position : ['ctx, 'res] lift_map_with_context -> - 'ctx10 -> - position -> - position * 'res10
    method location : 'b -> 'ctx11 -> location -> location * 'res11
    method location_stack : 'b -> - 'ctx12 -> - location_stack -> - location_stack * 'res12
    method loc : 'b -> - 'a. ('ctx13 -> 'a -> 'a * 'res13) -> - 'ctx13 -> - 'a loc -> - 'a loc * 'res13
    method longident : 'b -> 'ctx14 -> longident -> longident * 'res14
    method longident_loc : 'b -> 'ctx15 -> longident_loc -> longident_loc * 'res15
    method rec_flag : 'b -> 'ctx16 -> rec_flag -> rec_flag * 'res16
    method direction_flag : 'b -> - 'ctx17 -> - direction_flag -> - direction_flag * 'res17
    method private_flag : 'b -> 'ctx18 -> private_flag -> private_flag * 'res18
    method mutable_flag : 'b -> 'ctx19 -> mutable_flag -> mutable_flag * 'res19
    method virtual_flag : 'b -> 'ctx20 -> virtual_flag -> virtual_flag * 'res20
    method override_flag : 'b -> 'ctx21 -> override_flag -> override_flag * 'res21
    method closed_flag : 'b -> 'ctx22 -> closed_flag -> closed_flag * 'res22
    method label : 'b -> 'ctx23 -> label -> label * 'res23
    method arg_label : 'b -> 'ctx24 -> arg_label -> arg_label * 'res24
    method variance : 'b -> 'ctx25 -> variance -> variance * 'res25
    method injectivity : 'b -> 'ctx26 -> injectivity -> injectivity * 'res26
    method constant : 'b -> 'ctx27 -> constant -> constant * 'res27
    method attribute : 'b -> 'ctx28 -> attribute -> attribute * 'res28
    method extension : 'b -> 'ctx29 -> extension -> extension * 'res29
    method attributes : 'b -> 'ctx30 -> attributes -> attributes * 'res30
    method payload : 'b -> 'ctx31 -> payload -> payload * 'res31
    method core_type : 'b -> 'ctx32 -> core_type -> core_type * 'res32
    method core_type_desc : 'b -> - 'ctx33 -> - core_type_desc -> - core_type_desc * 'res33
    method package_type : 'b -> 'ctx34 -> package_type -> package_type * 'res34
    method row_field : 'b -> 'ctx35 -> row_field -> row_field * 'res35
    method row_field_desc : 'b -> - 'ctx36 -> - row_field_desc -> - row_field_desc * 'res36
    method object_field : 'b -> 'ctx37 -> object_field -> object_field * 'res37
    method object_field_desc : 'b -> - 'ctx38 -> + 'a option * 'res
    method virtual string : 'ctx -> string -> string * 'res
    method position : 'ctx -> position -> position * 'res
    method location : 'ctx -> location -> location * 'res
    method location_stack : 'ctx -> location_stack -> location_stack * 'res
    method loc : 'a. ('ctx -> 'a -> 'a * 'res) -> 'ctx -> 'a loc -> 'a loc * 'res
    method longident : 'ctx -> longident -> longident * 'res
    method longident_loc : 'ctx -> longident_loc -> longident_loc * 'res
    method rec_flag : 'ctx -> rec_flag -> rec_flag * 'res
    method direction_flag : 'ctx -> direction_flag -> direction_flag * 'res
    method private_flag : 'ctx -> private_flag -> private_flag * 'res
    method mutable_flag : 'ctx -> mutable_flag -> mutable_flag * 'res
    method virtual_flag : 'ctx -> virtual_flag -> virtual_flag * 'res
    method override_flag : 'ctx -> override_flag -> override_flag * 'res
    method closed_flag : 'ctx -> closed_flag -> closed_flag * 'res
    method label : 'ctx -> label -> label * 'res
    method arg_label : 'ctx -> arg_label -> arg_label * 'res
    method variance : 'ctx -> variance -> variance * 'res
    method injectivity : 'ctx -> injectivity -> injectivity * 'res
    method constant : 'ctx -> constant -> constant * 'res
    method attribute : 'ctx -> attribute -> attribute * 'res
    method extension : 'ctx -> extension -> extension * 'res
    method attributes : 'ctx -> attributes -> attributes * 'res
    method payload : 'ctx -> payload -> payload * 'res
    method core_type : 'ctx -> core_type -> core_type * 'res
    method core_type_desc : 'ctx -> core_type_desc -> core_type_desc * 'res
    method package_type : 'ctx -> package_type -> package_type * 'res
    method row_field : 'ctx -> row_field -> row_field * 'res
    method row_field_desc : 'ctx -> row_field_desc -> row_field_desc * 'res
    method object_field : 'ctx -> object_field -> object_field * 'res
    method object_field_desc : 'ctx -> object_field_desc -> - object_field_desc * 'res38
    method pattern : 'b -> 'ctx39 -> pattern -> pattern * 'res39
    method pattern_desc : 'b -> 'ctx40 -> pattern_desc -> pattern_desc * 'res40
    method expression : 'b -> 'ctx41 -> expression -> expression * 'res41
    method expression_desc : 'b -> - 'ctx42 -> - expression_desc -> - expression_desc * 'res42
    method case : 'b -> 'ctx43 -> case -> case * 'res43
    method letop : 'b -> 'ctx44 -> letop -> letop * 'res44
    method binding_op : 'b -> 'ctx45 -> binding_op -> binding_op * 'res45
    method value_description : 'b -> - 'ctx46 -> + object_field_desc * 'res
    method pattern : 'ctx -> pattern -> pattern * 'res
    method pattern_desc : 'ctx -> pattern_desc -> pattern_desc * 'res
    method expression : 'ctx -> expression -> expression * 'res
    method expression_desc : 'ctx -> expression_desc -> expression_desc * 'res
    method case : 'ctx -> case -> case * 'res
    method letop : 'ctx -> letop -> letop * 'res
    method binding_op : 'ctx -> binding_op -> binding_op * 'res
    method value_description : 'ctx -> value_description -> - value_description * 'res46
    method type_declaration : 'b -> - 'ctx47 -> - type_declaration -> - type_declaration * 'res47
    method type_kind : 'b -> 'ctx48 -> type_kind -> type_kind * 'res48
    method label_declaration : 'b -> - 'ctx49 -> + value_description * 'res
    method type_declaration : 'ctx -> type_declaration -> type_declaration * 'res
    method type_kind : 'ctx -> type_kind -> type_kind * 'res
    method label_declaration : 'ctx -> label_declaration -> - label_declaration * 'res49
    method constructor_declaration : 'b -> - 'ctx50 -> + label_declaration * 'res
    method constructor_declaration : 'ctx -> constructor_declaration -> - constructor_declaration * 'res50
    method constructor_arguments : 'b -> - 'ctx51 -> + constructor_declaration * 'res
    method constructor_arguments : 'ctx -> constructor_arguments -> - constructor_arguments * 'res51
    method type_extension : 'b -> - 'ctx52 -> - type_extension -> - type_extension * 'res52
    method extension_constructor : 'b -> - 'ctx53 -> + constructor_arguments * 'res
    method type_extension : 'ctx -> type_extension -> type_extension * 'res
    method extension_constructor : 'ctx -> extension_constructor -> - extension_constructor * 'res53
    method type_exception : 'b -> - 'ctx54 -> - type_exception -> - type_exception * 'res54
    method extension_constructor_kind : 'b -> - 'ctx55 -> + extension_constructor * 'res
    method type_exception : 'ctx -> type_exception -> type_exception * 'res
    method extension_constructor_kind : 'ctx -> extension_constructor_kind -> - extension_constructor_kind * 'res55
    method class_type : 'b -> 'ctx56 -> class_type -> class_type * 'res56
    method class_type_desc : 'b -> - 'ctx57 -> - class_type_desc -> - class_type_desc * 'res57
    method class_signature : 'b -> - 'ctx58 -> - class_signature -> - class_signature * 'res58
    method class_type_field : 'b -> - 'ctx59 -> - class_type_field -> - class_type_field * 'res59
    method class_type_field_desc : 'b -> - 'ctx60 -> + extension_constructor_kind * 'res
    method class_type : 'ctx -> class_type -> class_type * 'res
    method class_type_desc : 'ctx -> class_type_desc -> class_type_desc * 'res
    method class_signature : 'ctx -> class_signature -> class_signature * 'res
    method class_type_field : 'ctx -> class_type_field -> class_type_field * 'res
    method class_type_field_desc : 'ctx -> class_type_field_desc -> - class_type_field_desc * 'res60
    method class_infos : 'b -> - 'a. ('ctx61 -> 'a -> 'a * 'res61) -> - 'ctx61 -> + class_type_field_desc * 'res
    method class_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a class_infos -> - 'a class_infos * 'res61
    method class_description : 'b -> - 'ctx62 -> + 'a class_infos * 'res
    method class_description : 'ctx -> class_description -> - class_description * 'res62
    method class_type_declaration : 'b -> - 'ctx63 -> + class_description * 'res
    method class_type_declaration : 'ctx -> class_type_declaration -> - class_type_declaration * 'res63
    method class_expr : 'b -> 'ctx64 -> class_expr -> class_expr * 'res64
    method class_expr_desc : 'b -> - 'ctx65 -> - class_expr_desc -> - class_expr_desc * 'res65
    method class_structure : 'b -> - 'ctx66 -> - class_structure -> - class_structure * 'res66
    method class_field : 'b -> 'ctx67 -> class_field -> class_field * 'res67
    method class_field_desc : 'b -> - 'ctx68 -> - class_field_desc -> - class_field_desc * 'res68
    method class_field_kind : 'b -> - 'ctx69 -> - class_field_kind -> - class_field_kind * 'res69
    method class_declaration : 'b -> - 'ctx70 -> + class_type_declaration * 'res
    method class_expr : 'ctx -> class_expr -> class_expr * 'res
    method class_expr_desc : 'ctx -> class_expr_desc -> class_expr_desc * 'res
    method class_structure : 'ctx -> class_structure -> class_structure * 'res
    method class_field : 'ctx -> class_field -> class_field * 'res
    method class_field_desc : 'ctx -> class_field_desc -> class_field_desc * 'res
    method class_field_kind : 'ctx -> class_field_kind -> class_field_kind * 'res
    method class_declaration : 'ctx -> class_declaration -> - class_declaration * 'res70
    method module_type : 'b -> 'ctx71 -> module_type -> module_type * 'res71
    method module_type_desc : 'b -> - 'ctx72 -> - module_type_desc -> - module_type_desc * 'res72
    method functor_parameter : 'b -> - 'ctx73 -> + class_declaration * 'res
    method module_type : 'ctx -> module_type -> module_type * 'res
    method module_type_desc : 'ctx -> module_type_desc -> module_type_desc * 'res
    method functor_parameter : 'ctx -> functor_parameter -> - functor_parameter * 'res73
    method signature : 'b -> 'ctx74 -> signature -> signature * 'res74
    method signature_item : 'b -> - 'ctx75 -> - signature_item -> - signature_item * 'res75
    method signature_item_desc : 'b -> - 'ctx76 -> + functor_parameter * 'res
    method signature : 'ctx -> signature -> signature * 'res
    method signature_item : 'ctx -> signature_item -> signature_item * 'res
    method signature_item_desc : 'ctx -> signature_item_desc -> - signature_item_desc * 'res76
    method module_declaration : 'b -> - 'ctx77 -> + signature_item_desc * 'res
    method module_declaration : 'ctx -> module_declaration -> - module_declaration * 'res77
    method module_substitution : 'b -> - 'ctx78 -> + module_declaration * 'res
    method module_substitution : 'ctx -> module_substitution -> - module_substitution * 'res78
    method module_type_declaration : 'b -> - 'ctx79 -> + module_substitution * 'res
    method module_type_declaration : 'ctx -> module_type_declaration -> - module_type_declaration * 'res79
    method open_infos : 'b -> - 'a. ('ctx80 -> 'a -> 'a * 'res80) -> - 'ctx80 -> + module_type_declaration * 'res
    method open_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a open_infos -> - 'a open_infos * 'res80
    method open_description : 'b -> - 'ctx81 -> - open_description -> - open_description * 'res81
    method open_declaration : 'b -> - 'ctx82 -> - open_declaration -> - open_declaration * 'res82
    method include_infos : 'b -> - 'a. ('ctx83 -> 'a -> 'a * 'res83) -> - 'ctx83 -> + 'a open_infos * 'res
    method open_description : 'ctx -> open_description -> open_description * 'res
    method open_declaration : 'ctx -> open_declaration -> open_declaration * 'res
    method include_infos : 'a. ('ctx -> 'a -> 'a * 'res) -> + 'ctx -> 'a include_infos -> - 'a include_infos * 'res83
    method include_description : 'b -> - 'ctx84 -> + 'a include_infos * 'res
    method include_description : 'ctx -> include_description -> - include_description * 'res84
    method include_declaration : 'b -> - 'ctx85 -> + include_description * 'res
    method include_declaration : 'ctx -> include_declaration -> - include_declaration * 'res85
    method with_constraint : 'b -> - 'ctx86 -> - with_constraint -> - with_constraint * 'res86
    method module_expr : 'b -> 'ctx87 -> module_expr -> module_expr * 'res87
    method module_expr_desc : 'b -> - 'ctx88 -> - module_expr_desc -> - module_expr_desc * 'res88
    method structure : 'b -> 'ctx89 -> structure -> structure * 'res89
    method structure_item : 'b -> - 'ctx90 -> - structure_item -> - structure_item * 'res90
    method structure_item_desc : 'b -> - 'ctx91 -> + include_declaration * 'res
    method with_constraint : 'ctx -> with_constraint -> with_constraint * 'res
    method module_expr : 'ctx -> module_expr -> module_expr * 'res
    method module_expr_desc : 'ctx -> module_expr_desc -> module_expr_desc * 'res
    method structure : 'ctx -> structure -> structure * 'res
    method structure_item : 'ctx -> structure_item -> structure_item * 'res
    method structure_item_desc : 'ctx -> structure_item_desc -> - structure_item_desc * 'res91
    method value_binding : 'b -> 'ctx92 -> value_binding -> value_binding * 'res92
    method module_binding : 'b -> - 'ctx93 -> - module_binding -> - module_binding * 'res93
    method toplevel_phrase : 'b -> - 'ctx94 -> - toplevel_phrase -> - toplevel_phrase * 'res94
    method toplevel_directive : 'b -> - 'ctx95 -> + structure_item_desc * 'res
    method value_binding : 'ctx -> value_binding -> value_binding * 'res
    method module_binding : 'ctx -> module_binding -> module_binding * 'res
    method toplevel_phrase : 'ctx -> toplevel_phrase -> toplevel_phrase * 'res
    method toplevel_directive : 'ctx -> toplevel_directive -> - toplevel_directive * 'res95
    method directive_argument : 'b -> - 'ctx96 -> + toplevel_directive * 'res
    method directive_argument : 'ctx -> directive_argument -> - directive_argument * 'res96
    method directive_argument_desc : 'b -> - 'ctx97 -> + directive_argument * 'res
    method directive_argument_desc : 'ctx -> directive_argument_desc -> - directive_argument_desc * 'res97
    method cases : 'b -> 'ctx98 -> cases -> cases * 'res98
    \ No newline at end of file + directive_argument_desc * 'res
    method cases : 'ctx -> cases -> cases * 'res
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-map/index.html b/ppxlib/Ppxlib_ast/Ast/class-map/index.html index 6e2577f..2b76ac8 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-map/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-map/index.html @@ -1,21 +1,7 @@ -map (ppxlib.Ppxlib_ast.Ast.map)

    Class Ast.map

    method virtual bool : bool -> bool
    method virtual char : char -> char
    method virtual int : int -> int
    method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
    method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
    method virtual string : string -> string
    method position : map -> position -> position
    method location : 'b -> location -> location
    method location_stack : 'b -> location_stack -> location_stack
    method loc : 'b -> 'a. ('a -> 'a) -> 'a loc -> 'a loc
    method longident : 'b -> longident -> longident
    method longident_loc : 'b -> longident_loc -> longident_loc
    method rec_flag : 'b -> rec_flag -> rec_flag
    method direction_flag : 'b -> direction_flag -> direction_flag
    method private_flag : 'b -> private_flag -> private_flag
    method mutable_flag : 'b -> mutable_flag -> mutable_flag
    method virtual_flag : 'b -> virtual_flag -> virtual_flag
    method override_flag : 'b -> override_flag -> override_flag
    method closed_flag : 'b -> closed_flag -> closed_flag
    method label : 'b -> label -> label
    method arg_label : 'b -> arg_label -> arg_label
    method variance : 'b -> variance -> variance
    method injectivity : 'b -> injectivity -> injectivity
    method constant : 'b -> constant -> constant
    method attribute : 'b -> attribute -> attribute
    method extension : 'b -> extension -> extension
    method attributes : 'b -> attributes -> attributes
    method payload : 'b -> payload -> payload
    method core_type : 'b -> core_type -> core_type
    method core_type_desc : 'b -> core_type_desc -> core_type_desc
    method package_type : 'b -> package_type -> package_type
    method row_field : 'b -> row_field -> row_field
    method row_field_desc : 'b -> row_field_desc -> row_field_desc
    method object_field : 'b -> object_field -> object_field
    method object_field_desc : 'b -> object_field_desc -> object_field_desc
    method pattern : 'b -> pattern -> pattern
    method pattern_desc : 'b -> pattern_desc -> pattern_desc
    method expression : 'b -> expression -> expression
    method expression_desc : 'b -> expression_desc -> expression_desc
    method case : 'b -> case -> case
    method letop : 'b -> letop -> letop
    method binding_op : 'b -> binding_op -> binding_op
    method value_description : 'b -> value_description -> value_description
    method type_declaration : 'b -> type_declaration -> type_declaration
    method type_kind : 'b -> type_kind -> type_kind
    method label_declaration : 'b -> label_declaration -> label_declaration
    method constructor_declaration : 'b -> - constructor_declaration -> - constructor_declaration
    method constructor_arguments : 'b -> - constructor_arguments -> - constructor_arguments
    method type_extension : 'b -> type_extension -> type_extension
    method extension_constructor : 'b -> - extension_constructor -> - extension_constructor
    method type_exception : 'b -> type_exception -> type_exception
    method extension_constructor_kind : 'b -> - extension_constructor_kind -> - extension_constructor_kind
    method class_type : 'b -> class_type -> class_type
    method class_type_desc : 'b -> class_type_desc -> class_type_desc
    method class_signature : 'b -> class_signature -> class_signature
    method class_type_field : 'b -> class_type_field -> class_type_field
    method class_type_field_desc : 'b -> - class_type_field_desc -> - class_type_field_desc
    method class_infos : 'b -> 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
    method class_description : 'b -> class_description -> class_description
    method class_type_declaration : 'b -> - class_type_declaration -> - class_type_declaration
    method class_expr : 'b -> class_expr -> class_expr
    method class_expr_desc : 'b -> class_expr_desc -> class_expr_desc
    method class_structure : 'b -> class_structure -> class_structure
    method class_field : 'b -> class_field -> class_field
    method class_field_desc : 'b -> class_field_desc -> class_field_desc
    method class_field_kind : 'b -> class_field_kind -> class_field_kind
    method class_declaration : 'b -> class_declaration -> class_declaration
    method module_type : 'b -> module_type -> module_type
    method module_type_desc : 'b -> module_type_desc -> module_type_desc
    method functor_parameter : 'b -> functor_parameter -> functor_parameter
    method signature : 'b -> signature -> signature
    method signature_item : 'b -> signature_item -> signature_item
    method signature_item_desc : 'b -> signature_item_desc -> signature_item_desc
    method module_declaration : 'b -> module_declaration -> module_declaration
    method module_substitution : 'b -> module_substitution -> module_substitution
    method module_type_declaration : 'b -> - module_type_declaration -> - module_type_declaration
    method open_infos : 'b -> 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
    method open_description : 'b -> open_description -> open_description
    method open_declaration : 'b -> open_declaration -> open_declaration
    method include_infos : 'b -> - 'a. ('a -> 'a) -> - 'a include_infos -> - 'a include_infos
    method include_description : 'b -> include_description -> include_description
    method include_declaration : 'b -> include_declaration -> include_declaration
    method with_constraint : 'b -> with_constraint -> with_constraint
    method module_expr : 'b -> module_expr -> module_expr
    method module_expr_desc : 'b -> module_expr_desc -> module_expr_desc
    method structure : 'b -> structure -> structure
    method structure_item : 'b -> structure_item -> structure_item
    method structure_item_desc : 'b -> structure_item_desc -> structure_item_desc
    method value_binding : 'b -> value_binding -> value_binding
    method module_binding : 'b -> module_binding -> module_binding
    method toplevel_phrase : 'b -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'b -> toplevel_directive -> toplevel_directive
    method directive_argument : 'b -> directive_argument -> directive_argument
    method directive_argument_desc : 'b -> - directive_argument_desc -> - directive_argument_desc
    method cases : 'b -> cases -> cases
    \ No newline at end of file +map (ppxlib.Ppxlib_ast.Ast.map)

    Class Ast.map

    method virtual bool : bool -> bool
    method virtual char : char -> char
    method virtual int : int -> int
    method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list
    method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option
    method virtual string : string -> string
    method position : position -> position
    method location : location -> location
    method location_stack : location_stack -> location_stack
    method loc : 'a. ('a -> 'a) -> 'a loc -> 'a loc
    method longident : longident -> longident
    method longident_loc : longident_loc -> longident_loc
    method rec_flag : rec_flag -> rec_flag
    method direction_flag : direction_flag -> direction_flag
    method private_flag : private_flag -> private_flag
    method mutable_flag : mutable_flag -> mutable_flag
    method virtual_flag : virtual_flag -> virtual_flag
    method override_flag : override_flag -> override_flag
    method closed_flag : closed_flag -> closed_flag
    method label : label -> label
    method arg_label : arg_label -> arg_label
    method variance : variance -> variance
    method injectivity : injectivity -> injectivity
    method constant : constant -> constant
    method attribute : attribute -> attribute
    method extension : extension -> extension
    method attributes : attributes -> attributes
    method payload : payload -> payload
    method core_type : core_type -> core_type
    method core_type_desc : core_type_desc -> core_type_desc
    method package_type : package_type -> package_type
    method row_field : row_field -> row_field
    method row_field_desc : row_field_desc -> row_field_desc
    method object_field : object_field -> object_field
    method object_field_desc : object_field_desc -> object_field_desc
    method pattern : pattern -> pattern
    method pattern_desc : pattern_desc -> pattern_desc
    method expression : expression -> expression
    method expression_desc : expression_desc -> expression_desc
    method case : case -> case
    method letop : letop -> letop
    method binding_op : binding_op -> binding_op
    method value_description : value_description -> value_description
    method type_declaration : type_declaration -> type_declaration
    method type_kind : type_kind -> type_kind
    method label_declaration : label_declaration -> label_declaration
    method constructor_declaration : constructor_declaration -> + constructor_declaration
    method constructor_arguments : constructor_arguments -> constructor_arguments
    method type_extension : type_extension -> type_extension
    method extension_constructor : extension_constructor -> extension_constructor
    method type_exception : type_exception -> type_exception
    method extension_constructor_kind : extension_constructor_kind -> + extension_constructor_kind
    method class_type : class_type -> class_type
    method class_type_desc : class_type_desc -> class_type_desc
    method class_signature : class_signature -> class_signature
    method class_type_field : class_type_field -> class_type_field
    method class_type_field_desc : class_type_field_desc -> class_type_field_desc
    method class_infos : 'a. ('a -> 'a) -> 'a class_infos -> 'a class_infos
    method class_description : class_description -> class_description
    method class_type_declaration : class_type_declaration -> + class_type_declaration
    method class_expr : class_expr -> class_expr
    method class_expr_desc : class_expr_desc -> class_expr_desc
    method class_structure : class_structure -> class_structure
    method class_field : class_field -> class_field
    method class_field_desc : class_field_desc -> class_field_desc
    method class_field_kind : class_field_kind -> class_field_kind
    method class_declaration : class_declaration -> class_declaration
    method module_type : module_type -> module_type
    method module_type_desc : module_type_desc -> module_type_desc
    method functor_parameter : functor_parameter -> functor_parameter
    method signature : signature -> signature
    method signature_item : signature_item -> signature_item
    method signature_item_desc : signature_item_desc -> signature_item_desc
    method module_declaration : module_declaration -> module_declaration
    method module_substitution : module_substitution -> module_substitution
    method module_type_declaration : module_type_declaration -> + module_type_declaration
    method open_infos : 'a. ('a -> 'a) -> 'a open_infos -> 'a open_infos
    method open_description : open_description -> open_description
    method open_declaration : open_declaration -> open_declaration
    method include_infos : 'a. ('a -> 'a) -> 'a include_infos -> 'a include_infos
    method include_description : include_description -> include_description
    method include_declaration : include_declaration -> include_declaration
    method with_constraint : with_constraint -> with_constraint
    method module_expr : module_expr -> module_expr
    method module_expr_desc : module_expr_desc -> module_expr_desc
    method structure : structure -> structure
    method structure_item : structure_item -> structure_item
    method structure_item_desc : structure_item_desc -> structure_item_desc
    method value_binding : value_binding -> value_binding
    method module_binding : module_binding -> module_binding
    method toplevel_phrase : toplevel_phrase -> toplevel_phrase
    method toplevel_directive : toplevel_directive -> toplevel_directive
    method directive_argument : directive_argument -> directive_argument
    method directive_argument_desc : directive_argument_desc -> + directive_argument_desc
    method cases : cases -> cases
    diff --git a/ppxlib/Ppxlib_ast/Ast/class-map_with_context/index.html b/ppxlib/Ppxlib_ast/Ast/class-map_with_context/index.html index 10b6814..0fc5603 100644 --- a/ppxlib/Ppxlib_ast/Ast/class-map_with_context/index.html +++ b/ppxlib/Ppxlib_ast/Ast/class-map_with_context/index.html @@ -1,83 +1,30 @@ -map_with_context (ppxlib.Ppxlib_ast.Ast.map_with_context)

    Class Ast.map_with_context

    method virtual bool : 'ctx0 -> bool -> bool
    method virtual char : 'ctx1 -> char -> char
    method virtual int : 'ctx2 -> int -> int
    method virtual list : 'a. ('ctx3 -> 'a -> 'a) -> 'ctx3 -> 'a list -> 'a list
    method virtual option : 'a. ('ctx4 -> 'a -> 'a) -> - 'ctx4 -> +map_with_context (ppxlib.Ppxlib_ast.Ast.map_with_context)

    Class Ast.map_with_context

    method virtual bool : 'ctx -> bool -> bool
    method virtual char : 'ctx -> char -> char
    method virtual int : 'ctx -> int -> int
    method virtual list : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a list -> 'a list
    method virtual option : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a option -> - 'a option
    method virtual string : 'ctx5 -> string -> string
    method position : 'ctx map_with_context -> 'ctx6 -> position -> position
    method location : 'b -> 'ctx7 -> location -> location
    method location_stack : 'b -> 'ctx8 -> location_stack -> location_stack
    method loc : 'b -> 'a. ('ctx9 -> 'a -> 'a) -> 'ctx9 -> 'a loc -> 'a loc
    method longident : 'b -> 'ctx10 -> longident -> longident
    method longident_loc : 'b -> 'ctx11 -> longident_loc -> longident_loc
    method rec_flag : 'b -> 'ctx12 -> rec_flag -> rec_flag
    method direction_flag : 'b -> 'ctx13 -> direction_flag -> direction_flag
    method private_flag : 'b -> 'ctx14 -> private_flag -> private_flag
    method mutable_flag : 'b -> 'ctx15 -> mutable_flag -> mutable_flag
    method virtual_flag : 'b -> 'ctx16 -> virtual_flag -> virtual_flag
    method override_flag : 'b -> 'ctx17 -> override_flag -> override_flag
    method closed_flag : 'b -> 'ctx18 -> closed_flag -> closed_flag
    method label : 'b -> 'ctx19 -> label -> label
    method arg_label : 'b -> 'ctx20 -> arg_label -> arg_label
    method variance : 'b -> 'ctx21 -> variance -> variance
    method injectivity : 'b -> 'ctx22 -> injectivity -> injectivity
    method constant : 'b -> 'ctx23 -> constant -> constant
    method attribute : 'b -> 'ctx24 -> attribute -> attribute
    method extension : 'b -> 'ctx25 -> extension -> extension
    method attributes : 'b -> 'ctx26 -> attributes -> attributes
    method payload : 'b -> 'ctx27 -> payload -> payload
    method core_type : 'b -> 'ctx28 -> core_type -> core_type
    method core_type_desc : 'b -> 'ctx29 -> core_type_desc -> core_type_desc
    method package_type : 'b -> 'ctx30 -> package_type -> package_type
    method row_field : 'b -> 'ctx31 -> row_field -> row_field
    method row_field_desc : 'b -> 'ctx32 -> row_field_desc -> row_field_desc
    method object_field : 'b -> 'ctx33 -> object_field -> object_field
    method object_field_desc : 'b -> - 'ctx34 -> - object_field_desc -> - object_field_desc
    method pattern : 'b -> 'ctx35 -> pattern -> pattern
    method pattern_desc : 'b -> 'ctx36 -> pattern_desc -> pattern_desc
    method expression : 'b -> 'ctx37 -> expression -> expression
    method expression_desc : 'b -> 'ctx38 -> expression_desc -> expression_desc
    method case : 'b -> 'ctx39 -> case -> case
    method letop : 'b -> 'ctx40 -> letop -> letop
    method binding_op : 'b -> 'ctx41 -> binding_op -> binding_op
    method value_description : 'b -> - 'ctx42 -> - value_description -> - value_description
    method type_declaration : 'b -> 'ctx43 -> type_declaration -> type_declaration
    method type_kind : 'b -> 'ctx44 -> type_kind -> type_kind
    method label_declaration : 'b -> - 'ctx45 -> - label_declaration -> - label_declaration
    method constructor_declaration : 'b -> - 'ctx46 -> + 'a option
    method virtual string : 'ctx -> string -> string
    method position : 'ctx -> position -> position
    method location : 'ctx -> location -> location
    method location_stack : 'ctx -> location_stack -> location_stack
    method loc : 'a. ('ctx -> 'a -> 'a) -> 'ctx -> 'a loc -> 'a loc
    method longident : 'ctx -> longident -> longident
    method longident_loc : 'ctx -> longident_loc -> longident_loc
    method rec_flag : 'ctx -> rec_flag -> rec_flag
    method direction_flag : 'ctx -> direction_flag -> direction_flag
    method private_flag : 'ctx -> private_flag -> private_flag
    method mutable_flag : 'ctx -> mutable_flag -> mutable_flag
    method virtual_flag : 'ctx -> virtual_flag -> virtual_flag
    method override_flag : 'ctx -> override_flag -> override_flag
    method closed_flag : 'ctx -> closed_flag -> closed_flag
    method label : 'ctx -> label -> label
    method arg_label : 'ctx -> arg_label -> arg_label
    method variance : 'ctx -> variance -> variance
    method injectivity : 'ctx -> injectivity -> injectivity
    method constant : 'ctx -> constant -> constant
    method attribute : 'ctx -> attribute -> attribute
    method extension : 'ctx -> extension -> extension
    method attributes : 'ctx -> attributes -> attributes
    method payload : 'ctx -> payload -> payload
    method core_type : 'ctx -> core_type -> core_type
    method core_type_desc : 'ctx -> core_type_desc -> core_type_desc
    method package_type : 'ctx -> package_type -> package_type
    method row_field : 'ctx -> row_field -> row_field
    method row_field_desc : 'ctx -> row_field_desc -> row_field_desc
    method object_field : 'ctx -> object_field -> object_field
    method object_field_desc : 'ctx -> object_field_desc -> object_field_desc
    method pattern : 'ctx -> pattern -> pattern
    method pattern_desc : 'ctx -> pattern_desc -> pattern_desc
    method expression : 'ctx -> expression -> expression
    method expression_desc : 'ctx -> expression_desc -> expression_desc
    method case : 'ctx -> case -> case
    method letop : 'ctx -> letop -> letop
    method binding_op : 'ctx -> binding_op -> binding_op
    method value_description : 'ctx -> value_description -> value_description
    method type_declaration : 'ctx -> type_declaration -> type_declaration
    method type_kind : 'ctx -> type_kind -> type_kind
    method label_declaration : 'ctx -> label_declaration -> label_declaration
    method constructor_declaration : 'ctx -> constructor_declaration -> - constructor_declaration
    method constructor_arguments : 'b -> - 'ctx47 -> + constructor_declaration
    method constructor_arguments : 'ctx -> constructor_arguments -> - constructor_arguments
    method type_extension : 'b -> 'ctx48 -> type_extension -> type_extension
    method extension_constructor : 'b -> - 'ctx49 -> + constructor_arguments
    method type_extension : 'ctx -> type_extension -> type_extension
    method extension_constructor : 'ctx -> extension_constructor -> - extension_constructor
    method type_exception : 'b -> 'ctx50 -> type_exception -> type_exception
    method extension_constructor_kind : 'b -> - 'ctx51 -> + extension_constructor
    method type_exception : 'ctx -> type_exception -> type_exception
    method extension_constructor_kind : 'ctx -> extension_constructor_kind -> - extension_constructor_kind
    method class_type : 'b -> 'ctx52 -> class_type -> class_type
    method class_type_desc : 'b -> 'ctx53 -> class_type_desc -> class_type_desc
    method class_signature : 'b -> 'ctx54 -> class_signature -> class_signature
    method class_type_field : 'b -> 'ctx55 -> class_type_field -> class_type_field
    method class_type_field_desc : 'b -> - 'ctx56 -> + extension_constructor_kind
    method class_type : 'ctx -> class_type -> class_type
    method class_type_desc : 'ctx -> class_type_desc -> class_type_desc
    method class_signature : 'ctx -> class_signature -> class_signature
    method class_type_field : 'ctx -> class_type_field -> class_type_field
    method class_type_field_desc : 'ctx -> class_type_field_desc -> - class_type_field_desc
    method class_infos : 'b -> - 'a. ('ctx57 -> 'a -> 'a) -> - 'ctx57 -> + class_type_field_desc
    method class_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a class_infos -> - 'a class_infos
    method class_description : 'b -> - 'ctx58 -> - class_description -> - class_description
    method class_type_declaration : 'b -> - 'ctx59 -> + 'a class_infos
    method class_description : 'ctx -> class_description -> class_description
    method class_type_declaration : 'ctx -> class_type_declaration -> - class_type_declaration
    method class_expr : 'b -> 'ctx60 -> class_expr -> class_expr
    method class_expr_desc : 'b -> 'ctx61 -> class_expr_desc -> class_expr_desc
    method class_structure : 'b -> 'ctx62 -> class_structure -> class_structure
    method class_field : 'b -> 'ctx63 -> class_field -> class_field
    method class_field_desc : 'b -> 'ctx64 -> class_field_desc -> class_field_desc
    method class_field_kind : 'b -> 'ctx65 -> class_field_kind -> class_field_kind
    method class_declaration : 'b -> - 'ctx66 -> - class_declaration -> - class_declaration
    method module_type : 'b -> 'ctx67 -> module_type -> module_type
    method module_type_desc : 'b -> 'ctx68 -> module_type_desc -> module_type_desc
    method functor_parameter : 'b -> - 'ctx69 -> - functor_parameter -> - functor_parameter
    method signature : 'b -> 'ctx70 -> signature -> signature
    method signature_item : 'b -> 'ctx71 -> signature_item -> signature_item
    method signature_item_desc : 'b -> - 'ctx72 -> - signature_item_desc -> - signature_item_desc
    method module_declaration : 'b -> - 'ctx73 -> - module_declaration -> - module_declaration
    method module_substitution : 'b -> - 'ctx74 -> - module_substitution -> - module_substitution
    method module_type_declaration : 'b -> - 'ctx75 -> + class_type_declaration
    method class_expr : 'ctx -> class_expr -> class_expr
    method class_expr_desc : 'ctx -> class_expr_desc -> class_expr_desc
    method class_structure : 'ctx -> class_structure -> class_structure
    method class_field : 'ctx -> class_field -> class_field
    method class_field_desc : 'ctx -> class_field_desc -> class_field_desc
    method class_field_kind : 'ctx -> class_field_kind -> class_field_kind
    method class_declaration : 'ctx -> class_declaration -> class_declaration
    method module_type : 'ctx -> module_type -> module_type
    method module_type_desc : 'ctx -> module_type_desc -> module_type_desc
    method functor_parameter : 'ctx -> functor_parameter -> functor_parameter
    method signature : 'ctx -> signature -> signature
    method signature_item : 'ctx -> signature_item -> signature_item
    method signature_item_desc : 'ctx -> signature_item_desc -> signature_item_desc
    method module_declaration : 'ctx -> module_declaration -> module_declaration
    method module_substitution : 'ctx -> module_substitution -> module_substitution
    method module_type_declaration : 'ctx -> module_type_declaration -> - module_type_declaration
    method open_infos : 'b -> - 'a. ('ctx76 -> 'a -> 'a) -> - 'ctx76 -> + module_type_declaration
    method open_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a open_infos -> - 'a open_infos
    method open_description : 'b -> 'ctx77 -> open_description -> open_description
    method open_declaration : 'b -> 'ctx78 -> open_declaration -> open_declaration
    method include_infos : 'b -> - 'a. ('ctx79 -> 'a -> 'a) -> - 'ctx79 -> + 'a open_infos
    method open_description : 'ctx -> open_description -> open_description
    method open_declaration : 'ctx -> open_declaration -> open_declaration
    method include_infos : 'a. ('ctx -> 'a -> 'a) -> + 'ctx -> 'a include_infos -> - 'a include_infos
    method include_description : 'b -> - 'ctx80 -> - include_description -> - include_description
    method include_declaration : 'b -> - 'ctx81 -> - include_declaration -> - include_declaration
    method with_constraint : 'b -> 'ctx82 -> with_constraint -> with_constraint
    method module_expr : 'b -> 'ctx83 -> module_expr -> module_expr
    method module_expr_desc : 'b -> 'ctx84 -> module_expr_desc -> module_expr_desc
    method structure : 'b -> 'ctx85 -> structure -> structure
    method structure_item : 'b -> 'ctx86 -> structure_item -> structure_item
    method structure_item_desc : 'b -> - 'ctx87 -> - structure_item_desc -> - structure_item_desc
    method value_binding : 'b -> 'ctx88 -> value_binding -> value_binding
    method module_binding : 'b -> 'ctx89 -> module_binding -> module_binding
    method toplevel_phrase : 'b -> 'ctx90 -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'b -> - 'ctx91 -> - toplevel_directive -> - toplevel_directive
    method directive_argument : 'b -> - 'ctx92 -> - directive_argument -> - directive_argument
    method directive_argument_desc : 'b -> - 'ctx93 -> + 'a include_infos
    method include_description : 'ctx -> include_description -> include_description
    method include_declaration : 'ctx -> include_declaration -> include_declaration
    method with_constraint : 'ctx -> with_constraint -> with_constraint
    method module_expr : 'ctx -> module_expr -> module_expr
    method module_expr_desc : 'ctx -> module_expr_desc -> module_expr_desc
    method structure : 'ctx -> structure -> structure
    method structure_item : 'ctx -> structure_item -> structure_item
    method structure_item_desc : 'ctx -> structure_item_desc -> structure_item_desc
    method value_binding : 'ctx -> value_binding -> value_binding
    method module_binding : 'ctx -> module_binding -> module_binding
    method toplevel_phrase : 'ctx -> toplevel_phrase -> toplevel_phrase
    method toplevel_directive : 'ctx -> toplevel_directive -> toplevel_directive
    method directive_argument : 'ctx -> directive_argument -> directive_argument
    method directive_argument_desc : 'ctx -> directive_argument_desc -> - directive_argument_desc
    method cases : 'b -> 'ctx94 -> cases -> cases
    \ No newline at end of file + directive_argument_desc
    method cases : 'ctx -> cases -> cases
    diff --git a/ppxlib/Ppxlib_ast/Ast/index.html b/ppxlib/Ppxlib_ast/Ast/index.html index 8faab5f..647f28d 100644 --- a/ppxlib/Ppxlib_ast/Ast/index.html +++ b/ppxlib/Ppxlib_ast/Ast/index.html @@ -1,7 +1,7 @@ -Ast (ppxlib.Ppxlib_ast.Ast)

    Module Ppxlib_ast.Ast

    Definition of the OCaml AST

    type position = Stdlib.Lexing.position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }
    and location = Astlib.Location.t = {
    1. loc_start : position;
    2. loc_end : position;
    3. loc_ghost : bool;
    }
    and location_stack = location list
    and 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : location;
    }
    and longident = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of longident * string
    3. | Lapply of longident * longident
    and longident_loc = longident loc

    Auxiliary AST types used by parsetree and typedtree.

    and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    and private_flag = Astlib.Ast_500.Asttypes.private_flag =
    1. | Private
    2. | Public
    and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    and override_flag = Astlib.Ast_500.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    and label = string
    and arg_label = Astlib.Ast_500.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    and variance = Astlib.Ast_500.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    and injectivity = Astlib.Ast_500.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity

    Abstract syntax tree produced by parsing

    and constant = Astlib.Ast_500.Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * location * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)

    Extension points

    and attribute = Astlib.Ast_500.Parsetree.attribute = {
    1. attr_name : string loc;
    2. attr_payload : payload;
    3. attr_loc : location;
    }

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Astlib.Ast_500.Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Astlib.Ast_500.Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : location;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of longident_loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of longident_loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list * closed_flag * label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

      let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)
    and package_type = longident_loc * (longident_loc * core_type) list

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Astlib.Ast_500.Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : location;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
    1. | Rtag of label loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Astlib.Ast_500.Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : location;
    3. pof_attributes : attributes;
    }
    and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
    1. | Otag of label loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = Astlib.Ast_500.Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : location;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of longident_loc * (string loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (longident_loc * pattern) list * closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of longident_loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of longident_loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Astlib.Ast_500.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : location;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
    1. | Pexp_ident of longident_loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of cases
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * cases
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * cases
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of longident_loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (longident_loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * longident_loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * longident_loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * direction_flag * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * label loc
      (*

      E # m

      *)
    23. | Pexp_new of longident_loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of label loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (label loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = Astlib.Ast_500.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Astlib.Ast_500.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
    1. pbop_op : string loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : location;
    }

    Value descriptions

    and value_description = Astlib.Ast_500.Parsetree.value_description = {
    1. pval_name : string loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    5. pval_loc : location;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
    1. ptype_name : string loc;
    2. ptype_params : (core_type * (variance * injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * location) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    8. ptype_loc : location;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Astlib.Ast_500.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
    1. pld_name : string loc;
    2. pld_mutable : mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : location;
    5. pld_attributes : attributes;
      (*

      l : T [@id1] [@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = +Ast (ppxlib.Ppxlib_ast.Ast)

    Module Ppxlib_ast.Ast

    Definition of the OCaml AST

    type position = Stdlib.Lexing.position = {
    1. pos_fname : string;
    2. pos_lnum : int;
    3. pos_bol : int;
    4. pos_cnum : int;
    }
    and location = Astlib.Location.t = {
    1. loc_start : position;
    2. loc_end : position;
    3. loc_ghost : bool;
    }
    and location_stack = location list
    and 'a loc = 'a Astlib.Location.loc = {
    1. txt : 'a;
    2. loc : location;
    }
    and longident = Astlib.Longident.t =
    1. | Lident of string
    2. | Ldot of longident * string
    3. | Lapply of longident * longident
    and longident_loc = longident loc

    Auxiliary AST types used by parsetree and typedtree.

    and rec_flag = Astlib.Ast_500.Asttypes.rec_flag =
    1. | Nonrecursive
    2. | Recursive
    and direction_flag = Astlib.Ast_500.Asttypes.direction_flag =
    1. | Upto
    2. | Downto
    and private_flag = Astlib.Ast_500.Asttypes.private_flag =
    1. | Private
    2. | Public
    and mutable_flag = Astlib.Ast_500.Asttypes.mutable_flag =
    1. | Immutable
    2. | Mutable
    and virtual_flag = Astlib.Ast_500.Asttypes.virtual_flag =
    1. | Virtual
    2. | Concrete
    and override_flag = Astlib.Ast_500.Asttypes.override_flag =
    1. | Override
    2. | Fresh
    and closed_flag = Astlib.Ast_500.Asttypes.closed_flag =
    1. | Closed
    2. | Open
    and label = string
    and arg_label = Astlib.Ast_500.Asttypes.arg_label =
    1. | Nolabel
    2. | Labelled of string
      (*

      label:T -> ...

      *)
    3. | Optional of string
      (*

      ?label:T -> ...

      *)
    and variance = Astlib.Ast_500.Asttypes.variance =
    1. | Covariant
    2. | Contravariant
    3. | NoVariance
    and injectivity = Astlib.Ast_500.Asttypes.injectivity =
    1. | Injective
    2. | NoInjectivity

    Abstract syntax tree produced by parsing

    and constant = Astlib.Ast_500.Parsetree.constant =
    1. | Pconst_integer of string * char option
      (*

      Integer constants such as 3 3l 3L 3n.

      Suffixes [g-z][G-Z] are accepted by the parser. Suffixes except 'l', 'L' and 'n' are rejected by the typechecker

      *)
    2. | Pconst_char of char
      (*

      Character such as 'c'.

      *)
    3. | Pconst_string of string * location * string option
      (*

      Constant string such as "constant" or {delim|other constant|delim}.

      The location span the content of the string, without the delimiters.

      *)
    4. | Pconst_float of string * char option
      (*

      Float constant such as 3.4, 2e5 or 1.4e-4.

      Suffixes g-zG-Z are accepted by the parser. Suffixes are rejected by the typechecker.

      *)

    Extension points

    and attribute = Astlib.Ast_500.Parsetree.attribute = {
    1. attr_name : string loc;
    2. attr_payload : payload;
    3. attr_loc : location;
    }

    Attributes such as [@id ARG] and [@@id ARG].

    Metadata containers passed around within the AST. The compiler ignores unknown attributes.

    and extension = string loc * payload

    Extension points such as [%id ARG] and [%%id ARG].

    Sub-language placeholder -- rejected by the typechecker.

    and attributes = attribute list
    and payload = Astlib.Ast_500.Parsetree.payload =
    1. | PStr of structure
    2. | PSig of signature
      (*

      : SIG in an attribute or an extension point

      *)
    3. | PTyp of core_type
      (*

      : T in an attribute or an extension point

      *)
    4. | PPat of pattern * expression option
      (*

      ? P or ? P when E, in an attribute or an extension point

      *)

    Core language

    Type expressions

    and core_type = Astlib.Ast_500.Parsetree.core_type = {
    1. ptyp_desc : core_type_desc;
    2. ptyp_loc : location;
    3. ptyp_loc_stack : location_stack;
    4. ptyp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and core_type_desc = Astlib.Ast_500.Parsetree.core_type_desc =
    1. | Ptyp_any
      (*

      _

      *)
    2. | Ptyp_var of string
      (*

      A type variable such as 'a

      *)
    3. | Ptyp_arrow of arg_label * core_type * core_type
      (*

      Ptyp_arrow(lbl, T1, T2) represents:

      *)
    4. | Ptyp_tuple of core_type list
      (*

      Ptyp_tuple([T1 ; ... ; Tn]) represents a product type T1 * ... * Tn.

      Invariant: n >= 2.

      *)
    5. | Ptyp_constr of longident_loc * core_type list
      (*

      Ptyp_constr(lident, l) represents:

      • tconstr when l=[],
      • T tconstr when l=[T],
      • (T1, ..., Tn) tconstr when l=[T1 ; ... ; Tn].
      *)
    6. | Ptyp_object of object_field list * closed_flag
      (*

      Ptyp_object([ l1:T1; ...; ln:Tn ], flag) represents:

      • < l1:T1; ...; ln:Tn > when flag is Closed,
      • < l1:T1; ...; ln:Tn; .. > when flag is Open.
      *)
    7. | Ptyp_class of longident_loc * core_type list
      (*

      Ptyp_class(tconstr, l) represents:

      • #tconstr when l=[],
      • T #tconstr when l=[T],
      • (T1, ..., Tn) #tconstr when l=[T1 ; ... ; Tn].
      *)
    8. | Ptyp_alias of core_type * string
      (*

      T as 'a.

      *)
    9. | Ptyp_variant of row_field list * closed_flag * label list option
      (*

      Ptyp_variant([`A;`B], flag, labels) represents:

      • [ `A|`B ] when flag is Closed, and labels is None,
      • [> `A|`B ] when flag is Open, and labels is None,
      • [< `A|`B ] when flag is Closed, and labels is Some [],
      • [< `A|`B > `X `Y ] when flag is Closed, and labels is Some ["X";"Y"].
      *)
    10. | Ptyp_poly of string loc list * core_type
      (*

      'a1 ... 'an. T

      Can only appear in the following context:

        let x : 'a1 ... 'an. T = e ...
      *)
    11. | Ptyp_package of package_type
      (*

      (module S).

      *)
    12. | Ptyp_extension of extension
      (*

      [%id].

      *)
    and package_type = longident_loc * (longident_loc * core_type) list

    As package_type typed values:

    • (S, []) represents (module S),
    • (S, [(t1, T1) ; ... ; (tn, Tn)]) represents (module S with type t1 = T1 and ... and tn = Tn).
    and row_field = Astlib.Ast_500.Parsetree.row_field = {
    1. prf_desc : row_field_desc;
    2. prf_loc : location;
    3. prf_attributes : attributes;
    }
    and row_field_desc = Astlib.Ast_500.Parsetree.row_field_desc =
    1. | Rtag of label loc * bool * core_type list
      (*

      Rtag(`A, b, l) represents:

      • `A when b is true and l is [],
      • `A of T when b is false and l is [T],
      • `A of T1 & .. & Tn when b is false and l is [T1;...Tn],
      • `A of & T1 & .. & Tn when b is true and l is [T1;...Tn].
      • The bool field is true if the tag contains a constant (empty) constructor.
      • & occurs when several types are used for the same constructor (see 4.2 in the manual)
      *)
    2. | Rinherit of core_type
      (*

      [ | t ]

      *)
    and object_field = Astlib.Ast_500.Parsetree.object_field = {
    1. pof_desc : object_field_desc;
    2. pof_loc : location;
    3. pof_attributes : attributes;
    }
    and object_field_desc = Astlib.Ast_500.Parsetree.object_field_desc =
    1. | Otag of label loc * core_type
    2. | Oinherit of core_type

    Patterns

    and pattern = Astlib.Ast_500.Parsetree.pattern = {
    1. ppat_desc : pattern_desc;
    2. ppat_loc : location;
    3. ppat_loc_stack : location_stack;
    4. ppat_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and pattern_desc = Astlib.Ast_500.Parsetree.pattern_desc =
    1. | Ppat_any
      (*

      The pattern _.

      *)
    2. | Ppat_var of string loc
      (*

      A variable pattern such as x

      *)
    3. | Ppat_alias of pattern * string loc
      (*

      An alias pattern such as P as 'a

      *)
    4. | Ppat_constant of constant
      (*

      Patterns such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    5. | Ppat_interval of constant * constant
      (*

      Patterns such as 'a'..'z'.

      Other forms of interval are recognized by the parser but rejected by the type-checker.

      *)
    6. | Ppat_tuple of pattern list
      (*

      Patterns (P1, ..., Pn).

      Invariant: n >= 2

      *)
    7. | Ppat_construct of longident_loc * (string loc list * pattern) option
      (*

      Ppat_construct(C, args) represents:

      • C when args is None,
      • C P when args is Some ([], P)
      • C (P1, ..., Pn) when args is Some ([], Ppat_tuple [P1; ...; Pn])
      • C (type a b) P when args is Some ([a; b], P)
      *)
    8. | Ppat_variant of label * pattern option
      (*

      Ppat_variant(`A, pat) represents:

      • `A when pat is None,
      • `A P when pat is Some P
      *)
    9. | Ppat_record of (longident_loc * pattern) list * closed_flag
      (*

      Ppat_record([(l1, P1) ; ... ; (ln, Pn)], flag) represents:

      • { l1=P1; ...; ln=Pn } when flag is Closed
      • { l1=P1; ...; ln=Pn; _} when flag is Open

      Invariant: n > 0

      *)
    10. | Ppat_array of pattern list
      (*

      Pattern [| P1; ...; Pn |]

      *)
    11. | Ppat_or of pattern * pattern
      (*

      Pattern P1 | P2

      *)
    12. | Ppat_constraint of pattern * core_type
      (*

      Pattern (P : T)

      *)
    13. | Ppat_type of longident_loc
      (*

      Pattern #tconst

      *)
    14. | Ppat_lazy of pattern
      (*

      Pattern lazy P

      *)
    15. | Ppat_unpack of string option loc
      (*

      Ppat_unpack(s) represents:

      • (module P) when s is Some "P"
      • (module _) when s is None

      Note: (module P : S) is represented as Ppat_constraint(Ppat_unpack(Some "P"), Ptyp_package S)

      *)
    16. | Ppat_exception of pattern
      (*

      Pattern exception P

      *)
    17. | Ppat_extension of extension
      (*

      Pattern [%id]

      *)
    18. | Ppat_open of longident_loc * pattern
      (*

      Pattern M.(P)

      *)

    Value expressions

    and expression = Astlib.Ast_500.Parsetree.expression = {
    1. pexp_desc : expression_desc;
    2. pexp_loc : location;
    3. pexp_loc_stack : location_stack;
    4. pexp_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and expression_desc = Astlib.Ast_500.Parsetree.expression_desc =
    1. | Pexp_ident of longident_loc
      (*

      Identifiers such as x and M.x

      *)
    2. | Pexp_constant of constant
      (*

      Expressions constant such as 1, 'a', "true", 1.0, 1l, 1L, 1n

      *)
    3. | Pexp_let of rec_flag * value_binding list * expression
      (*

      Pexp_let(flag, [(P1,E1) ; ... ; (Pn,En)], E) represents:

      • let P1 = E1 and ... and Pn = EN in E when flag is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in E when flag is Recursive.
      *)
    4. | Pexp_function of cases
      (*

      function P1 -> E1 | ... | Pn -> En

      *)
    5. | Pexp_fun of arg_label * expression option * pattern * expression
      (*

      Pexp_fun(lbl, exp0, P, E1) represents:

      • fun P -> E1 when lbl is Nolabel and exp0 is None
      • fun ~l:P -> E1 when lbl is Labelled l and exp0 is None
      • fun ?l:P -> E1 when lbl is Optional l and exp0 is None
      • fun ?l:(P = E0) -> E1 when lbl is Optional l and exp0 is Some E0

      Notes:

      • If E0 is provided, only Optional is allowed.
      • fun P1 P2 .. Pn -> E1 is represented as nested Pexp_fun.
      • let f P = E is represented using Pexp_fun.
      *)
    6. | Pexp_apply of expression * (arg_label * expression) list
      (*

      Pexp_apply(E0, [(l1, E1) ; ... ; (ln, En)]) represents E0 ~l1:E1 ... ~ln:En

      li can be Nolabel (non labeled argument), Labelled (labelled arguments) or Optional (optional argument).

      Invariant: n > 0

      *)
    7. | Pexp_match of expression * cases
      (*

      match E0 with P1 -> E1 | ... | Pn -> En

      *)
    8. | Pexp_try of expression * cases
      (*

      try E0 with P1 -> E1 | ... | Pn -> En

      *)
    9. | Pexp_tuple of expression list
      (*

      Expressions (E1, ..., En)

      Invariant: n >= 2

      *)
    10. | Pexp_construct of longident_loc * expression option
      (*

      Pexp_construct(C, exp) represents:

      • C when exp is None,
      • C E when exp is Some E,
      • C (E1, ..., En) when exp is Some (Pexp_tuple[E1;...;En])
      *)
    11. | Pexp_variant of label * expression option
      (*

      Pexp_variant(`A, exp) represents

      • `A when exp is None
      • `A E when exp is Some E
      *)
    12. | Pexp_record of (longident_loc * expression) list * expression option
      (*

      Pexp_record([(l1,P1) ; ... ; (ln,Pn)], exp0) represents

      • { l1=P1; ...; ln=Pn } when exp0 is None
      • { E0 with l1=P1; ...; ln=Pn } when exp0 is Some E0

      Invariant: n > 0

      *)
    13. | Pexp_field of expression * longident_loc
      (*

      E.l

      *)
    14. | Pexp_setfield of expression * longident_loc * expression
      (*

      E1.l <- E2

      *)
    15. | Pexp_array of expression list
      (*

      [| E1; ...; En |]

      *)
    16. | Pexp_ifthenelse of expression * expression * expression option
      (*

      if E1 then E2 else E3

      *)
    17. | Pexp_sequence of expression * expression
      (*

      E1; E2

      *)
    18. | Pexp_while of expression * expression
      (*

      while E1 do E2 done

      *)
    19. | Pexp_for of pattern * expression * expression * direction_flag * expression
      (*

      Pexp_for(i, E1, E2, direction, E3) represents:

      • for i = E1 to E2 do E3 done when direction is Upto
      • for i = E1 downto E2 do E3 done when direction is Downto
      *)
    20. | Pexp_constraint of expression * core_type
      (*

      (E : T)

      *)
    21. | Pexp_coerce of expression * core_type option * core_type
      (*

      Pexp_coerce(E, from, T) represents

      • (E :> T) when from is None,
      • (E : T0 :> T) when from is Some T0.
      *)
    22. | Pexp_send of expression * label loc
      (*

      E # m

      *)
    23. | Pexp_new of longident_loc
      (*

      new M.c

      *)
    24. | Pexp_setinstvar of label loc * expression
      (*

      x <- 2

      *)
    25. | Pexp_override of (label loc * expression) list
      (*

      {< x1 = E1; ...; xn = En >}

      *)
    26. | Pexp_letmodule of string option loc * module_expr * expression
      (*

      let module M = ME in E

      *)
    27. | Pexp_letexception of extension_constructor * expression
      (*

      let exception C in E

      *)
    28. | Pexp_assert of expression
      (*

      assert E.

      Note: assert false is treated in a special way by the type-checker.

      *)
    29. | Pexp_lazy of expression
      (*

      lazy E

      *)
    30. | Pexp_poly of expression * core_type option
      (*

      Used for method bodies.

      Can only be used as the expression under Cfk_concrete for methods (not values).

      *)
    31. | Pexp_object of class_structure
      (*

      object ... end

      *)
    32. | Pexp_newtype of string loc * expression
      (*

      fun (type t) -> E

      *)
    33. | Pexp_pack of module_expr
      (*

      (module ME).

      (module ME : S) is represented as Pexp_constraint(Pexp_pack ME, Ptyp_package S)

      *)
    34. | Pexp_open of open_declaration * expression
      (*
      • M.(E)
      • let open M in E
      • let open! M in E
      *)
    35. | Pexp_letop of letop
      (*
      • let* P = E0 in E1
      • let* P0 = E00 and* P1 = E01 in E1
      *)
    36. | Pexp_extension of extension
      (*

      [%id]

      *)
    37. | Pexp_unreachable
      (*

      .

      *)
    and case = Astlib.Ast_500.Parsetree.case = {
    1. pc_lhs : pattern;
    2. pc_guard : expression option;
    3. pc_rhs : expression;
    }

    Values of type case represents (P -> E) or (P when E0 -> E)

    and letop = Astlib.Ast_500.Parsetree.letop = {
    1. let_ : binding_op;
    2. ands : binding_op list;
    3. body : expression;
    }
    and binding_op = Astlib.Ast_500.Parsetree.binding_op = {
    1. pbop_op : string loc;
    2. pbop_pat : pattern;
    3. pbop_exp : expression;
    4. pbop_loc : location;
    }

    Value descriptions

    and value_description = Astlib.Ast_500.Parsetree.value_description = {
    1. pval_name : string loc;
    2. pval_type : core_type;
    3. pval_prim : string list;
    4. pval_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    5. pval_loc : location;
    }

    Values of type value_description represents:

    • val x: T, when pval_prim is []
    • external x: T = "s1" ... "sn" when pval_prim is ["s1";..."sn"]

    Type declarations

    and type_declaration = Astlib.Ast_500.Parsetree.type_declaration = {
    1. ptype_name : string loc;
    2. ptype_params : (core_type * (variance * injectivity)) list;
      (*

      ('a1,...'an) t

      *)
    3. ptype_cstrs : (core_type * core_type * location) list;
      (*

      ... constraint T1=T1' ... constraint Tn=Tn'

      *)
    4. ptype_kind : type_kind;
    5. ptype_private : private_flag;
      (*

      for = private ...

      *)
    6. ptype_manifest : core_type option;
      (*

      represents = T

      *)
    7. ptype_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    8. ptype_loc : location;
    }

    Here are type declarations and their representation, for various ptype_kind and ptype_manifest values:

    • type t when type_kind is Ptype_abstract, and manifest is None,
    • type t = T0 when type_kind is Ptype_abstract, and manifest is Some T0,
    • type t = C of T | ... when type_kind is Ptype_variant, and manifest is None,
    • type t = T0 = C of T | ... when type_kind is Ptype_variant, and manifest is Some T0,
    • type t = {l: T; ...} when type_kind is Ptype_record, and manifest is None,
    • type t = T0 = {l : T; ...} when type_kind is Ptype_record, and manifest is Some T0,
    • type t = .. when type_kind is Ptype_open, and manifest is None.
    and type_kind = Astlib.Ast_500.Parsetree.type_kind =
    1. | Ptype_abstract
    2. | Ptype_variant of constructor_declaration list
    3. | Ptype_record of label_declaration list
      (*

      Invariant: non-empty list

      *)
    4. | Ptype_open
    and label_declaration = Astlib.Ast_500.Parsetree.label_declaration = {
    1. pld_name : string loc;
    2. pld_mutable : mutable_flag;
    3. pld_type : core_type;
    4. pld_loc : location;
    5. pld_attributes : attributes;
      (*

      l : T [@id1] [@id2]

      *)
    }

    Note: T can be a Ptyp_poly.

    and constructor_declaration = Astlib.Ast_500.Parsetree.constructor_declaration = {
    1. pcd_name : string loc;
    2. pcd_vars : string loc list;
    3. pcd_args : constructor_arguments;
    4. pcd_res : core_type option;
    5. pcd_loc : location;
    6. pcd_attributes : attributes;
      (*

      C of ... [@id1] [@id2]

      *)
    }
    and constructor_arguments = Astlib.Ast_500.Parsetree.constructor_arguments =
    1. | Pcstr_tuple of core_type list
    2. | Pcstr_record of label_declaration list
      (*

      Values of type constructor_declaration represents the constructor arguments of:

      • C of T1 * ... * Tn when res = None, and args = Pcstr_tuple [T1; ... ; Tn],
      • C: T0 when res = Some T0, and args = Pcstr_tuple [],
      • C: T1 * ... * Tn -> T0 when res = Some T0, and args = Pcstr_tuple [T1; ... ; Tn],
      • C of {...} when res = None, and args = Pcstr_record [...],
      • C: {...} -> T0 when res = Some T0, and args = Pcstr_record [...].
      *)
    and type_extension = Astlib.Ast_500.Parsetree.type_extension = {
    1. ptyext_path : longident_loc;
    2. ptyext_params : (core_type * (variance * injectivity)) list;
    3. ptyext_constructors : extension_constructor list;
    4. ptyext_private : private_flag;
    5. ptyext_loc : location;
    6. ptyext_attributes : attributes;
      (*

      ... @@id1 @@id2

      *)
    }

    Definition of new extensions constructors for the extensive sum type t (type t += ...).

    and extension_constructor = Astlib.Ast_500.Parsetree.extension_constructor = {
    1. pext_name : string loc;
    2. pext_kind : extension_constructor_kind;
    3. pext_loc : location;
    4. pext_attributes : attributes;
      (*

      C of ... [@id1] [@id2]

      *)
    }
    and type_exception = Astlib.Ast_500.Parsetree.type_exception = {
    1. ptyexn_constructor : extension_constructor;
    2. ptyexn_loc : location;
    3. ptyexn_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Definition of a new exception (exception E).

    and extension_constructor_kind = Astlib.Ast_500.Parsetree.extension_constructor_kind = -
    1. | Pext_decl of string loc list * constructor_arguments * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of longident_loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Astlib.Ast_500.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : location;
    3. pcty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
    1. | Pcty_constr of longident_loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : location;
    3. pctf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [@@@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
    1. pci_virt : virtual_flag;
    2. pci_params : (core_type * (variance * injectivity)) list;
    3. pci_name : string loc;
    4. pci_expr : 'a;
    5. pci_loc : location;
    6. pci_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : location;
    3. pcl_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
    1. | Pcl_constr of longident_loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Astlib.Ast_500.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : location;
    3. pcf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
    1. | Pcf_inherit of override_flag * class_expr * string loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of label loc * mutable_flag * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of label loc * private_flag * class_field_kind
      (**)
    4. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pcf_initializer of expression
      (*

      initializer E

      *)
    6. | Pcf_attribute of attribute
      (*

      [@@@id]

      *)
    7. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Astlib.Ast_500.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : location;
    3. pmty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
    1. | Pmty_ident of longident_loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of longident_loc
      (*

      (module M)

      *)
    and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : location;
    }
    and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [@@@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
    1. pmd_name : string option loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmd_loc : location;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
    1. pms_name : string loc;
    2. pms_manifest : longident_loc;
    3. pms_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pms_loc : location;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = - {
    1. pmtd_name : string loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmtd_loc : location;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : override_flag;
    3. popen_loc : location;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = longident_loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : location;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
    1. | Pwith_type of longident_loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of longident_loc * longident_loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of longident_loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of longident_loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of longident_loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of longident_loc * longident_loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : location;
    3. pmod_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
    1. | Pmod_ident of longident_loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : location;
    }
    and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [@@@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : location;
    }
    and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
    1. pmb_name : string option loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : location;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
    1. pdir_name : string loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : location;
    }
    and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : location;
    }
    and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = -
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of longident
    4. | Pdir_bool of bool
    and cases = case list
    class virtual map : object ... end
    class virtual iter : object ... end
    class virtual 'acc fold : object ... end
    class virtual 'acc fold_map : object ... end
    class virtual 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    \ No newline at end of file +
    1. | Pext_decl of string loc list * constructor_arguments * core_type option
      (*

      Pext_decl(existentials, c_args, t_opt) describes a new extension constructor. It can be:

      • C of T1 * ... * Tn when:

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is None.
      • C: T0 when

        • existentials is [],
        • c_args is [],
        • t_opt is Some T0.
      • C: T1 * ... * Tn -> T0 when

        • existentials is [],
        • c_args is [T1; ...; Tn],
        • t_opt is Some T0.
      • C: 'a... . T1 * ... * Tn -> T0 when

        • existentials is ['a;...],
        • c_args is [T1; ... ; Tn],
        • t_opt is Some T0.
      *)
    2. | Pext_rebind of longident_loc
      (*

      Pext_rebind(D) re-export the constructor D with the new name C

      *)

    Class language

    Type expressions for the class language

    and class_type = Astlib.Ast_500.Parsetree.class_type = {
    1. pcty_desc : class_type_desc;
    2. pcty_loc : location;
    3. pcty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_type_desc = Astlib.Ast_500.Parsetree.class_type_desc =
    1. | Pcty_constr of longident_loc * core_type list
      (*
      • c
      • ['a1, ..., 'an] c
      *)
    2. | Pcty_signature of class_signature
      (*

      object ... end

      *)
    3. | Pcty_arrow of arg_label * core_type * class_type
      (*

      Pcty_arrow(lbl, T, CT) represents:

      *)
    4. | Pcty_extension of extension
      (*

      %id

      *)
    5. | Pcty_open of open_description * class_type
      (*

      let open M in CT

      *)
    and class_signature = Astlib.Ast_500.Parsetree.class_signature = {
    1. pcsig_self : core_type;
    2. pcsig_fields : class_type_field list;
    }

    Values of type class_signature represents:

    and class_type_field = Astlib.Ast_500.Parsetree.class_type_field = {
    1. pctf_desc : class_type_field_desc;
    2. pctf_loc : location;
    3. pctf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_type_field_desc = Astlib.Ast_500.Parsetree.class_type_field_desc =
    1. | Pctf_inherit of class_type
      (*

      inherit CT

      *)
    2. | Pctf_val of label loc * mutable_flag * virtual_flag * core_type
      (*

      val x: T

      *)
    3. | Pctf_method of label loc * private_flag * virtual_flag * core_type
      (*

      method x: T

      Note: T can be a Ptyp_poly.

      *)
    4. | Pctf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pctf_attribute of attribute
      (*

      [@@@id]

      *)
    6. | Pctf_extension of extension
      (*

      [%%id]

      *)
    and 'a class_infos = 'a Astlib.Ast_500.Parsetree.class_infos = {
    1. pci_virt : virtual_flag;
    2. pci_params : (core_type * (variance * injectivity)) list;
    3. pci_name : string loc;
    4. pci_expr : 'a;
    5. pci_loc : location;
    6. pci_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }

    Values of type class_expr class_infos represents:

    • class c = ...
    • class ['a1,...,'an] c = ...
    • class virtual c = ...

    They are also used for "class type" declaration.

    and class_description = class_type class_infos
    and class_type_declaration = class_type class_infos

    Value expressions for the class language

    and class_expr = Astlib.Ast_500.Parsetree.class_expr = {
    1. pcl_desc : class_expr_desc;
    2. pcl_loc : location;
    3. pcl_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and class_expr_desc = Astlib.Ast_500.Parsetree.class_expr_desc =
    1. | Pcl_constr of longident_loc * core_type list
      (*

      c and ['a1, ..., 'an] c

      *)
    2. | Pcl_structure of class_structure
      (*

      object ... end

      *)
    3. | Pcl_fun of arg_label * expression option * pattern * class_expr
      (*

      Pcl_fun(lbl, exp0, P, CE) represents:

      • fun P -> CE when lbl is Nolabel and exp0 is None,
      • fun ~l:P -> CE when lbl is Labelled l and exp0 is None,
      • fun ?l:P -> CE when lbl is Optional l and exp0 is None,
      • fun ?l:(P = E0) -> CE when lbl is Optional l and exp0 is Some E0.
      *)
    4. | Pcl_apply of class_expr * (arg_label * expression) list
      (*

      Pcl_apply(CE, [(l1,E1) ; ... ; (ln,En)]) represents CE ~l1:E1 ... ~ln:En. li can be empty (non labeled argument) or start with ? (optional argument).

      Invariant: n > 0

      *)
    5. | Pcl_let of rec_flag * value_binding list * class_expr
      (*

      Pcl_let(rec, [(P1, E1); ... ; (Pn, En)], CE) represents:

      • let P1 = E1 and ... and Pn = EN in CE when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN in CE when rec is Recursive.
      *)
    6. | Pcl_constraint of class_expr * class_type
      (*

      (CE : CT)

      *)
    7. | Pcl_extension of extension
      (*

      [%id]

      *)
    8. | Pcl_open of open_description * class_expr
      (*

      let open M in CE

      *)
    and class_structure = Astlib.Ast_500.Parsetree.class_structure = {
    1. pcstr_self : pattern;
    2. pcstr_fields : class_field list;
    }

    Values of type class_structure represents:

    and class_field = Astlib.Ast_500.Parsetree.class_field = {
    1. pcf_desc : class_field_desc;
    2. pcf_loc : location;
    3. pcf_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    }
    and class_field_desc = Astlib.Ast_500.Parsetree.class_field_desc =
    1. | Pcf_inherit of override_flag * class_expr * string loc option
      (*

      Pcf_inherit(flag, CE, s) represents:

      • inherit CE when flag is Fresh and s is None,
      • inherit CE as x when flag is Fresh and s is Some x,
      • inherit! CE when flag is Override and s is None,
      • inherit! CE as x when flag is Override and s is Some x
      *)
    2. | Pcf_val of label loc * mutable_flag * class_field_kind
      (*

      Pcf_val(x,flag, kind) represents:

      *)
    3. | Pcf_method of label loc * private_flag * class_field_kind
      (**)
    4. | Pcf_constraint of core_type * core_type
      (*

      constraint T1 = T2

      *)
    5. | Pcf_initializer of expression
      (*

      initializer E

      *)
    6. | Pcf_attribute of attribute
      (*

      [@@@id]

      *)
    7. | Pcf_extension of extension
      (*

      [%%id]

      *)
    and class_field_kind = Astlib.Ast_500.Parsetree.class_field_kind =
    1. | Cfk_virtual of core_type
    2. | Cfk_concrete of override_flag * expression
    and class_declaration = class_expr class_infos

    Module language

    Type expressions for the module language

    and module_type = Astlib.Ast_500.Parsetree.module_type = {
    1. pmty_desc : module_type_desc;
    2. pmty_loc : location;
    3. pmty_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_type_desc = Astlib.Ast_500.Parsetree.module_type_desc =
    1. | Pmty_ident of longident_loc
      (*

      Pmty_ident(S) represents S

      *)
    2. | Pmty_signature of signature
      (*

      sig ... end

      *)
    3. | Pmty_functor of functor_parameter * module_type
      (*

      functor(X : MT1) -> MT2

      *)
    4. | Pmty_with of module_type * with_constraint list
      (*

      MT with ...

      *)
    5. | Pmty_typeof of module_expr
      (*

      module type of ME

      *)
    6. | Pmty_extension of extension
      (*

      [%id]

      *)
    7. | Pmty_alias of longident_loc
      (*

      (module M)

      *)
    and functor_parameter = Astlib.Ast_500.Parsetree.functor_parameter =
    1. | Unit
      (*

      ()

      *)
    2. | Named of string option loc * module_type
      (*

      Named(name, MT) represents:

      • (X : MT) when name is Some X,
      • (_ : MT) when name is None
      *)
    and signature = signature_item list
    and signature_item = Astlib.Ast_500.Parsetree.signature_item = {
    1. psig_desc : signature_item_desc;
    2. psig_loc : location;
    }
    and signature_item_desc = Astlib.Ast_500.Parsetree.signature_item_desc =
    1. | Psig_value of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    2. | Psig_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    3. | Psig_typesubst of type_declaration list
      (*

      type t1 := ... and ... and tn := ...

      *)
    4. | Psig_typext of type_extension
      (*

      type t1 += ...

      *)
    5. | Psig_exception of type_exception
      (*

      exception C of T

      *)
    6. | Psig_module of module_declaration
      (*

      module X = M and module X : MT

      *)
    7. | Psig_modsubst of module_substitution
      (*

      module X := M

      *)
    8. | Psig_recmodule of module_declaration list
      (*

      module rec X1 : MT1 and ... and Xn : MTn

      *)
    9. | Psig_modtype of module_type_declaration
      (*

      module type S = MT and module type S

      *)
    10. | Psig_modtypesubst of module_type_declaration
      (*

      module type S := ...

      *)
    11. | Psig_open of open_description
      (*

      open X

      *)
    12. | Psig_include of include_description
      (*

      include MT

      *)
    13. | Psig_class of class_description list
      (*

      class c1 : ... and ... and cn : ...

      *)
    14. | Psig_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    15. | Psig_attribute of attribute
      (*

      [@@@id]

      *)
    16. | Psig_extension of extension * attributes
      (*

      [%%id]

      *)
    and module_declaration = Astlib.Ast_500.Parsetree.module_declaration = {
    1. pmd_name : string option loc;
    2. pmd_type : module_type;
    3. pmd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmd_loc : location;
    }

    Values of type module_declaration represents S : MT

    and module_substitution = Astlib.Ast_500.Parsetree.module_substitution = {
    1. pms_name : string loc;
    2. pms_manifest : longident_loc;
    3. pms_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pms_loc : location;
    }

    Values of type module_substitution represents S := M

    and module_type_declaration = Astlib.Ast_500.Parsetree.module_type_declaration = + {
    1. pmtd_name : string loc;
    2. pmtd_type : module_type option;
    3. pmtd_attributes : attributes;
      (*

      ... [@@id1] [@@id2]

      *)
    4. pmtd_loc : location;
    }

    Values of type module_type_declaration represents:

    • S = MT,
    • S for abstract module type declaration, when pmtd_type is None.
    and 'a open_infos = 'a Astlib.Ast_500.Parsetree.open_infos = {
    1. popen_expr : 'a;
    2. popen_override : override_flag;
    3. popen_loc : location;
    4. popen_attributes : attributes;
    }

    Values of type 'a open_infos represents:

    and open_description = longident_loc open_infos

    Values of type open_description represents:

    • open M.N
    • open M(N).O
    and open_declaration = module_expr open_infos

    Values of type open_declaration represents:

    • open M.N
    • open M(N).O
    • open struct ... end
    and 'a include_infos = 'a Astlib.Ast_500.Parsetree.include_infos = {
    1. pincl_mod : 'a;
    2. pincl_loc : location;
    3. pincl_attributes : attributes;
    }
    and include_description = module_type include_infos

    Values of type include_description represents include MT

    and include_declaration = module_expr include_infos

    Values of type include_declaration represents include ME

    and with_constraint = Astlib.Ast_500.Parsetree.with_constraint =
    1. | Pwith_type of longident_loc * type_declaration
      (*

      with type X.t = ...

      Note: the last component of the longident must match the name of the type_declaration.

      *)
    2. | Pwith_module of longident_loc * longident_loc
      (*

      with module X.Y = Z

      *)
    3. | Pwith_modtype of longident_loc * module_type
      (*

      with module type X.Y = Z

      *)
    4. | Pwith_modtypesubst of longident_loc * module_type
      (*

      with module type X.Y := sig end

      *)
    5. | Pwith_typesubst of longident_loc * type_declaration
      (*

      with type X.t := ..., same format as [Pwith_type]

      *)
    6. | Pwith_modsubst of longident_loc * longident_loc
      (*

      with module X.Y := Z

      *)

    Value expressions for the module language

    and module_expr = Astlib.Ast_500.Parsetree.module_expr = {
    1. pmod_desc : module_expr_desc;
    2. pmod_loc : location;
    3. pmod_attributes : attributes;
      (*

      ... [@id1] [@id2]

      *)
    }
    and module_expr_desc = Astlib.Ast_500.Parsetree.module_expr_desc =
    1. | Pmod_ident of longident_loc
      (*

      X

      *)
    2. | Pmod_structure of structure
      (*

      struct ... end

      *)
    3. | Pmod_functor of functor_parameter * module_expr
      (*

      functor(X : MT1) -> ME

      *)
    4. | Pmod_apply of module_expr * module_expr
      (*

      ME1(ME2)

      *)
    5. | Pmod_constraint of module_expr * module_type
      (*

      (ME : MT)

      *)
    6. | Pmod_unpack of expression
      (*

      (val E)

      *)
    7. | Pmod_extension of extension
      (*

      [%id]

      *)
    and structure = structure_item list
    and structure_item = Astlib.Ast_500.Parsetree.structure_item = {
    1. pstr_desc : structure_item_desc;
    2. pstr_loc : location;
    }
    and structure_item_desc = Astlib.Ast_500.Parsetree.structure_item_desc =
    1. | Pstr_eval of expression * attributes
      (*

      E

      *)
    2. | Pstr_value of rec_flag * value_binding list
      (*

      Pstr_value(rec, [(P1, E1 ; ... ; (Pn, En))]) represents:

      • let P1 = E1 and ... and Pn = EN when rec is Nonrecursive,
      • let rec P1 = E1 and ... and Pn = EN when rec is Recursive.
      *)
    3. | Pstr_primitive of value_description
      (*
      • val x: T
      • external x: T = "s1" ... "sn"
      *)
    4. | Pstr_type of rec_flag * type_declaration list
      (*

      type t1 = ... and ... and tn = ...

      *)
    5. | Pstr_typext of type_extension
      (*

      type t1 += ...

      *)
    6. | Pstr_exception of type_exception
      (*
      • exception C of T
      • exception C = M.X
      *)
    7. | Pstr_module of module_binding
      (*

      module X = ME

      *)
    8. | Pstr_recmodule of module_binding list
      (*

      module rec X1 = ME1 and ... and Xn = MEn

      *)
    9. | Pstr_modtype of module_type_declaration
      (*

      module type S = MT

      *)
    10. | Pstr_open of open_declaration
      (*

      open X

      *)
    11. | Pstr_class of class_declaration list
      (*

      class c1 = ... and ... and cn = ...

      *)
    12. | Pstr_class_type of class_type_declaration list
      (*

      class type ct1 = ... and ... and ctn = ...

      *)
    13. | Pstr_include of include_declaration
      (*

      include ME

      *)
    14. | Pstr_attribute of attribute
      (*

      [@@@id]

      *)
    15. | Pstr_extension of extension * attributes
      (*

      [%%id]

      *)
    and value_binding = Astlib.Ast_500.Parsetree.value_binding = {
    1. pvb_pat : pattern;
    2. pvb_expr : expression;
    3. pvb_attributes : attributes;
    4. pvb_loc : location;
    }
    and module_binding = Astlib.Ast_500.Parsetree.module_binding = {
    1. pmb_name : string option loc;
    2. pmb_expr : module_expr;
    3. pmb_attributes : attributes;
    4. pmb_loc : location;
    }

    Values of type module_binding represents module X = ME

    Toplevel

    Toplevel phrases

    and toplevel_phrase = Astlib.Ast_500.Parsetree.toplevel_phrase =
    1. | Ptop_def of structure
    2. | Ptop_dir of toplevel_directive
      (*

      #use, #load ...

      *)
    and toplevel_directive = Astlib.Ast_500.Parsetree.toplevel_directive = {
    1. pdir_name : string loc;
    2. pdir_arg : directive_argument option;
    3. pdir_loc : location;
    }
    and directive_argument = Astlib.Ast_500.Parsetree.directive_argument = {
    1. pdira_desc : directive_argument_desc;
    2. pdira_loc : location;
    }
    and directive_argument_desc = Astlib.Ast_500.Parsetree.directive_argument_desc = +
    1. | Pdir_string of string
    2. | Pdir_int of string * char option
    3. | Pdir_ident of longident
    4. | Pdir_bool of bool
    and cases = case list
    class virtual map : object ... end
    class virtual iter : object ... end
    class virtual 'acc fold : object ... end
    class virtual 'acc fold_map : object ... end
    class virtual 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Attr/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Attr/index.html index 1d27c35..0af07ba 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Attr/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Attr/index.html @@ -1,6 +1,6 @@ -Attr (ppxlib.Ppxlib_ast.Ast_helper.Attr)

    Module Ast_helper.Attr

    Attributes

    Attributes

    val mk : - ?loc:Astlib.Location.t -> +Attr (ppxlib.Ppxlib_ast.Ast_helper.Attr)

    Module Ast_helper.Attr

    \ No newline at end of file + Astlib.Ast_500.Parsetree.attribute
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Cf/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Cf/index.html index c5f4e07..c95eeea 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Cf/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Cf/index.html @@ -1,48 +1,48 @@ -Cf (ppxlib.Ppxlib_ast.Ast_helper.Cf)

    Module Ast_helper.Cf

    Class fields

    Class fields

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Cf (ppxlib.Ppxlib_ast.Ast_helper.Cf)

    Module Ast_helper.Cf

    Class fields

    Class fields

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_field_kind
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Ci/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Ci/index.html index 271a667..01cecc8 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Ci/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Ci/index.html @@ -1,12 +1,12 @@ -Ci (ppxlib.Ppxlib_ast.Ast_helper.Ci)

    Module Ast_helper.Ci

    Classes

    Classes

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?virt:Astlib.Ast_500.Asttypes.virtual_flag -> - ?params: +Ci (ppxlib.Ppxlib_ast.Ast_helper.Ci)

    Module Ast_helper.Ci

    Classes

    Classes

    \ No newline at end of file + 'a Astlib.Ast_500.Parsetree.class_infos
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Cl/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Cl/index.html index 82a0cfe..2aa65f2 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Cl/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Cl/index.html @@ -1,51 +1,51 @@ -Cl (ppxlib.Ppxlib_ast.Ast_helper.Cl)

    Module Ast_helper.Cl

    Class expressions

    Class expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Cl (ppxlib.Ppxlib_ast.Ast_helper.Cl)

    Module Ast_helper.Cl

    Class expressions

    Class expressions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_expr
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Const/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Const/index.html index 13a35fe..74795e8 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Const/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Const/index.html @@ -1,6 +1,6 @@ -Const (ppxlib.Ppxlib_ast.Ast_helper.Const)

    Module Ast_helper.Const

    val string : - ?quotation_delimiter:string -> - ?loc:Astlib.Location.t -> +Const (ppxlib.Ppxlib_ast.Ast_helper.Const)

    Module Ast_helper.Const

    val string : + ?quotation_delimiter:string -> + ?loc:Astlib.Location.t -> string -> - Astlib.Ast_500.Parsetree.constant
    val integer : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
    val int : ?suffix:char -> int -> Astlib.Ast_500.Parsetree.constant
    val int32 : ?suffix:char -> int32 -> Astlib.Ast_500.Parsetree.constant
    val int64 : ?suffix:char -> int64 -> Astlib.Ast_500.Parsetree.constant
    val nativeint : ?suffix:char -> nativeint -> Astlib.Ast_500.Parsetree.constant
    val float : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
    \ No newline at end of file + Astlib.Ast_500.Parsetree.constant
    val integer : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
    val int : ?suffix:char -> int -> Astlib.Ast_500.Parsetree.constant
    val int32 : ?suffix:char -> int32 -> Astlib.Ast_500.Parsetree.constant
    val int64 : ?suffix:char -> int64 -> Astlib.Ast_500.Parsetree.constant
    val nativeint : ?suffix:char -> nativeint -> Astlib.Ast_500.Parsetree.constant
    val float : ?suffix:char -> string -> Astlib.Ast_500.Parsetree.constant
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Csig/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Csig/index.html index 3902ed8..3f93813 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Csig/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Csig/index.html @@ -1,5 +1,5 @@ -Csig (ppxlib.Ppxlib_ast.Ast_helper.Csig)

    Module Ast_helper.Csig

    Class signatures

    Class signatures

    val mk : +Csig (ppxlib.Ppxlib_ast.Ast_helper.Csig)

    Module Ast_helper.Csig

    Class signatures

    Class signatures

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_signature
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Cstr/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Cstr/index.html index 6459850..b77b9ed 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Cstr/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Cstr/index.html @@ -1,5 +1,5 @@ -Cstr (ppxlib.Ppxlib_ast.Ast_helper.Cstr)

    Module Ast_helper.Cstr

    Class structures

    Class structures

    val mk : +Cstr (ppxlib.Ppxlib_ast.Ast_helper.Cstr)

    Module Ast_helper.Cstr

    Class structures

    Class structures

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_structure
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Ctf/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Ctf/index.html index 9230328..cf9277d 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Ctf/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Ctf/index.html @@ -1,39 +1,39 @@ -Ctf (ppxlib.Ppxlib_ast.Ast_helper.Ctf)

    Module Ast_helper.Ctf

    Class type fields

    Class type fields

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Ctf (ppxlib.Ppxlib_ast.Ast_helper.Ctf)

    Module Ast_helper.Ctf

    Class type fields

    Class type fields

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_type_field
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Cty/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Cty/index.html index ec87ab7..3ac3526 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Cty/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Cty/index.html @@ -1,33 +1,33 @@ -Cty (ppxlib.Ppxlib_ast.Ast_helper.Cty)

    Module Ast_helper.Cty

    Class type expressions

    Class type expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Cty (ppxlib.Ppxlib_ast.Ast_helper.Cty)

    Module Ast_helper.Cty

    Class type expressions

    Class type expressions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.class_type
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Exp/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Exp/index.html index b6d0c1b..6acba5b 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Exp/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Exp/index.html @@ -1,203 +1,203 @@ -Exp (ppxlib.Ppxlib_ast.Ast_helper.Exp)

    Module Ast_helper.Exp

    Expressions

    Expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Exp (ppxlib.Ppxlib_ast.Ast_helper.Exp)

    Module Ast_helper.Exp

    Expressions

    Expressions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.binding_op
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Incl/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Incl/index.html index 46c877c..c0705e4 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Incl/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Incl/index.html @@ -1,6 +1,6 @@ -Incl (ppxlib.Ppxlib_ast.Ast_helper.Incl)

    Module Ast_helper.Incl

    Includes

    Includes

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Incl (ppxlib.Ppxlib_ast.Ast_helper.Incl)

    Module Ast_helper.Incl

    Includes

    Includes

    \ No newline at end of file + 'a Astlib.Ast_500.Parsetree.include_infos
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Mb/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Mb/index.html index 20406a4..ec4638f 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Mb/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Mb/index.html @@ -1,7 +1,7 @@ -Mb (ppxlib.Ppxlib_ast.Ast_helper.Mb)

    Module Ast_helper.Mb

    Module bindings

    Module bindings

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Mb (ppxlib.Ppxlib_ast.Ast_helper.Mb)

    Module Ast_helper.Mb

    Module bindings

    Module bindings

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_binding
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Md/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Md/index.html index 9505fdf..8a665e0 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Md/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Md/index.html @@ -1,7 +1,7 @@ -Md (ppxlib.Ppxlib_ast.Ast_helper.Md)

    Module Ast_helper.Md

    Module declarations

    Module declarations

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Md (ppxlib.Ppxlib_ast.Ast_helper.Md)

    Module Ast_helper.Md

    Module declarations

    Module declarations

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_declaration
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Mod/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Mod/index.html index f28725c..f70f0bc 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Mod/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Mod/index.html @@ -1,40 +1,40 @@ -Mod (ppxlib.Ppxlib_ast.Ast_helper.Mod)

    Module Ast_helper.Mod

    Module expressions

    Module expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Mod (ppxlib.Ppxlib_ast.Ast_helper.Mod)

    Module Ast_helper.Mod

    Module expressions

    Module expressions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_expr
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Ms/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Ms/index.html index ba14390..701f3b1 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Ms/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Ms/index.html @@ -1,7 +1,7 @@ -Ms (ppxlib.Ppxlib_ast.Ast_helper.Ms)

    Module Ast_helper.Ms

    Module substitutions

    Module substitutions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Ms (ppxlib.Ppxlib_ast.Ast_helper.Ms)

    Module Ast_helper.Ms

    Module substitutions

    Module substitutions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_substitution
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Mtd/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Mtd/index.html index 8536f16..94302a0 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Mtd/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Mtd/index.html @@ -1,7 +1,7 @@ -Mtd (ppxlib.Ppxlib_ast.Ast_helper.Mtd)

    Module Ast_helper.Mtd

    Module type declarations

    Module type declarations

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?typ:Astlib.Ast_500.Parsetree.module_type -> +Mtd (ppxlib.Ppxlib_ast.Ast_helper.Mtd)

    Module Ast_helper.Mtd

    Module type declarations

    Module type declarations

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_type_declaration
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Mty/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Mty/index.html index 05b9e7b..eac5f23 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Mty/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Mty/index.html @@ -1,39 +1,39 @@ -Mty (ppxlib.Ppxlib_ast.Ast_helper.Mty)

    Module Ast_helper.Mty

    Module type expressions

    Module type expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Mty (ppxlib.Ppxlib_ast.Ast_helper.Mty)

    Module Ast_helper.Mty

    Module type expressions

    Module type expressions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.module_type
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Of/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Of/index.html index 59b20d0..e0b3531 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Of/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Of/index.html @@ -1,14 +1,14 @@ -Of (ppxlib.Ppxlib_ast.Ast_helper.Of)

    Module Ast_helper.Of

    Object fields

    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Opn/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Opn/index.html index fd7dcf9..8c1af95 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Opn/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Opn/index.html @@ -1,7 +1,7 @@ -Opn (ppxlib.Ppxlib_ast.Ast_helper.Opn)

    Module Ast_helper.Opn

    Opens

    Opens

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?override:Astlib.Ast_500.Asttypes.override_flag -> +Opn (ppxlib.Ppxlib_ast.Ast_helper.Opn)

    Module Ast_helper.Opn

    Opens

    Opens

    \ No newline at end of file + 'a Astlib.Ast_500.Parsetree.open_infos
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Pat/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Pat/index.html index 05fb81a..82c7ada 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Pat/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Pat/index.html @@ -1,90 +1,90 @@ -Pat (ppxlib.Ppxlib_ast.Ast_helper.Pat)

    Module Ast_helper.Pat

    Patterns

    Patterns

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Pat (ppxlib.Ppxlib_ast.Ast_helper.Pat)

    Module Ast_helper.Pat

    Patterns

    Patterns

    \ No newline at end of file + Astlib.Ast_500.Parsetree.pattern
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Rf/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Rf/index.html index 17455a5..f2cb13e 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Rf/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Rf/index.html @@ -1,15 +1,15 @@ -Rf (ppxlib.Ppxlib_ast.Ast_helper.Rf)

    Module Ast_helper.Rf

    Row fields

    Row fields

    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Sig/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Sig/index.html index a84289a..84fe8e3 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Sig/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Sig/index.html @@ -1,52 +1,52 @@ -Sig (ppxlib.Ppxlib_ast.Ast_helper.Sig)

    Module Ast_helper.Sig

    Signature items

    Signature items

    val mk : - ?loc:Astlib.Location.t -> +Sig (ppxlib.Ppxlib_ast.Ast_helper.Sig)

    Module Ast_helper.Sig

    Signature items

    Signature items

    \ No newline at end of file + Astlib.Ast_500.Parsetree.signature_item
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Str/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Str/index.html index 82685b3..aa31623 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Str/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Str/index.html @@ -1,54 +1,54 @@ -Str (ppxlib.Ppxlib_ast.Ast_helper.Str)

    Module Ast_helper.Str

    Structure items

    Structure items

    val mk : - ?loc:Astlib.Location.t -> +Str (ppxlib.Ppxlib_ast.Ast_helper.Str)

    Module Ast_helper.Str

    Structure items

    Structure items

    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Te/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Te/index.html index 2faa9de..5083383 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Te/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Te/index.html @@ -1,33 +1,33 @@ -Te (ppxlib.Ppxlib_ast.Ast_helper.Te)

    Module Ast_helper.Te

    Type extensions

    Type extensions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?params: +Te (ppxlib.Ppxlib_ast.Ast_helper.Te)

    Module Ast_helper.Te

    Type extensions

    Type extensions

    \ No newline at end of file + Astlib.Ast_500.Parsetree.extension_constructor
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Typ/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Typ/index.html index 1912c10..3e6651d 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Typ/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Typ/index.html @@ -1,73 +1,73 @@ -Typ (ppxlib.Ppxlib_ast.Ast_helper.Typ)

    Module Ast_helper.Typ

    Type expressions

    Type expressions

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Typ (ppxlib.Ppxlib_ast.Ast_helper.Typ)

    Module Ast_helper.Typ

    Type expressions

    Type expressions

    varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

    • since 4.05
    \ No newline at end of file + Astlib.Ast_500.Parsetree.core_type

    varify_constructors newtypes te is type expression te, of which any of nullary type constructor tc is replaced by type variable of the same name, if tc's name appears in newtypes. Raise Syntaxerr.Variable_in_scope if any type variable inside te appears in newtypes.

    • since 4.05
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Type/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Type/index.html index af0bc2e..4fefc61 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Type/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Type/index.html @@ -1,31 +1,31 @@ -Type (ppxlib.Ppxlib_ast.Ast_helper.Type)

    Module Ast_helper.Type

    Type declarations

    Type declarations

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?params: +Type (ppxlib.Ppxlib_ast.Ast_helper.Type)

    Module Ast_helper.Type

    Type declarations

    Type declarations

    \ No newline at end of file + Astlib.Ast_500.Parsetree.label_declaration
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Val/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Val/index.html index 02436e1..a9cf396 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Val/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Val/index.html @@ -1,8 +1,8 @@ -Val (ppxlib.Ppxlib_ast.Ast_helper.Val)

    Module Ast_helper.Val

    Value declarations

    Value declarations

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> - ?prim:string list -> +Val (ppxlib.Ppxlib_ast.Ast_helper.Val)

    Module Ast_helper.Val

    Value declarations

    Value declarations

    \ No newline at end of file + Astlib.Ast_500.Parsetree.value_description
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/Vb/index.html b/ppxlib/Ppxlib_ast/Ast_helper/Vb/index.html index 9bbb8fc..4cecd06 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/Vb/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/Vb/index.html @@ -1,7 +1,7 @@ -Vb (ppxlib.Ppxlib_ast.Ast_helper.Vb)

    Module Ast_helper.Vb

    Value bindings

    Value bindings

    val mk : - ?loc:Astlib.Location.t -> - ?attrs:Astlib.Ast_500.Parsetree.attribute list -> +Vb (ppxlib.Ppxlib_ast.Ast_helper.Vb)

    Module Ast_helper.Vb

    Value bindings

    Value bindings

    \ No newline at end of file + Astlib.Ast_500.Parsetree.value_binding
    diff --git a/ppxlib/Ppxlib_ast/Ast_helper/index.html b/ppxlib/Ppxlib_ast/Ast_helper/index.html index 3b6b661..debc8ad 100644 --- a/ppxlib/Ppxlib_ast/Ast_helper/index.html +++ b/ppxlib/Ppxlib_ast/Ast_helper/index.html @@ -1,2 +1,2 @@ -Ast_helper (ppxlib.Ppxlib_ast.Ast_helper)

    Module Ppxlib_ast.Ast_helper

    Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

    type 'a with_loc = 'a Astlib.Location.loc
    type str = string with_loc
    type str_opt = string option with_loc

    Default locations

    val default_loc : loc ref

    Default value for all optional location arguments.

    val with_default_loc : loc -> (unit -> 'a) -> 'a

    Set the default_loc within the scope of the execution of the provided function.

    Constants

    module Const : sig ... end
    module Attr : sig ... end

    Core language

    module Typ : sig ... end

    Type expressions

    module Pat : sig ... end

    Patterns

    module Exp : sig ... end

    Expressions

    module Val : sig ... end

    Value declarations

    module Type : sig ... end

    Type declarations

    module Te : sig ... end

    Type extensions

    Module language

    module Mty : sig ... end

    Module type expressions

    module Mod : sig ... end

    Module expressions

    module Sig : sig ... end

    Signature items

    module Str : sig ... end

    Structure items

    module Md : sig ... end

    Module declarations

    module Ms : sig ... end

    Module substitutions

    module Mtd : sig ... end

    Module type declarations

    module Mb : sig ... end

    Module bindings

    module Opn : sig ... end

    Opens

    module Incl : sig ... end

    Includes

    module Vb : sig ... end

    Value bindings

    Class language

    module Cty : sig ... end

    Class type expressions

    module Ctf : sig ... end

    Class type fields

    module Cl : sig ... end

    Class expressions

    module Cf : sig ... end

    Class fields

    module Ci : sig ... end

    Classes

    module Csig : sig ... end

    Class signatures

    module Cstr : sig ... end

    Class structures

    module Rf : sig ... end

    Row fields

    module Of : sig ... end

    Object fields

    \ No newline at end of file +Ast_helper (ppxlib.Ppxlib_ast.Ast_helper)

    Module Ppxlib_ast.Ast_helper

    Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

    type 'a with_loc = 'a Astlib.Location.loc
    type str = string with_loc
    type str_opt = string option with_loc

    Default locations

    val default_loc : loc ref

    Default value for all optional location arguments.

    val with_default_loc : loc -> (unit -> 'a) -> 'a

    Set the default_loc within the scope of the execution of the provided function.

    Constants

    module Const : sig ... end
    module Attr : sig ... end

    Core language

    module Typ : sig ... end

    Type expressions

    module Pat : sig ... end

    Patterns

    module Exp : sig ... end

    Expressions

    module Val : sig ... end

    Value declarations

    module Type : sig ... end

    Type declarations

    module Te : sig ... end

    Type extensions

    Module language

    module Mty : sig ... end

    Module type expressions

    module Mod : sig ... end

    Module expressions

    module Sig : sig ... end

    Signature items

    module Str : sig ... end

    Structure items

    module Md : sig ... end

    Module declarations

    module Ms : sig ... end

    Module substitutions

    module Mtd : sig ... end

    Module type declarations

    module Mb : sig ... end

    Module bindings

    module Opn : sig ... end

    Opens

    module Incl : sig ... end

    Includes

    module Vb : sig ... end

    Value bindings

    Class language

    module Cty : sig ... end

    Class type expressions

    module Ctf : sig ... end

    Class type fields

    module Cl : sig ... end

    Class expressions

    module Cf : sig ... end

    Class fields

    module Ci : sig ... end

    Classes

    module Csig : sig ... end

    Class signatures

    module Cstr : sig ... end

    Class structures

    module Rf : sig ... end

    Row fields

    module Of : sig ... end

    Object fields

    diff --git a/ppxlib/Ppxlib_ast/Compiler_version/index.html b/ppxlib/Ppxlib_ast/Compiler_version/index.html index 65b1192..5c527e3 100644 --- a/ppxlib/Ppxlib_ast/Compiler_version/index.html +++ b/ppxlib/Ppxlib_ast/Compiler_version/index.html @@ -1,5 +1,5 @@ -Compiler_version (ppxlib.Ppxlib_ast.Compiler_version)

    Module Ppxlib_ast.Compiler_version

    module Ast = Astlib.Ast_501

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +Compiler_version (ppxlib.Ppxlib_ast.Compiler_version)

    Module Ppxlib_ast.Compiler_version

    module Ast = Astlib.Ast_501

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html index 63aca5c..d8c992b 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Ppxlib_ast.Convert.A.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Ppxlib_ast.Convert.A.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html index 4e3160c..33d5e41 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/Parsetree/index.html @@ -1,2 +1,2 @@ -Parsetree (ppxlib.Ppxlib_ast.Convert.A.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    \ No newline at end of file +Parsetree (ppxlib.Ppxlib_ast.Convert.A.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/index.html b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/index.html index 48b0f98..ed38e48 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-1-A/Ast/index.html @@ -1,2 +1,2 @@ -Ast (ppxlib.Ppxlib_ast.Convert.A.Ast)

    Module A.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast (ppxlib.Ppxlib_ast.Convert.A.Ast)

    Module A.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-1-A/index.html b/ppxlib/Ppxlib_ast/Convert/argument-1-A/index.html index 0ad8cc6..eec16f5 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-1-A/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-1-A/index.html @@ -1,5 +1,5 @@ -A (ppxlib.Ppxlib_ast.Convert.A)

    Parameter Convert.A

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +A (ppxlib.Ppxlib_ast.Convert.A)

    Parameter Convert.A

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html index b0ebfe9..230b746 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Ppxlib_ast.Convert.B.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Ppxlib_ast.Convert.B.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html index 50447ad..ff2c2a7 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/Parsetree/index.html @@ -1,2 +1,2 @@ -Parsetree (ppxlib.Ppxlib_ast.Convert.B.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    \ No newline at end of file +Parsetree (ppxlib.Ppxlib_ast.Convert.B.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/index.html b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/index.html index f7fcfe7..0014319 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-2-B/Ast/index.html @@ -1,2 +1,2 @@ -Ast (ppxlib.Ppxlib_ast.Convert.B.Ast)

    Module B.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast (ppxlib.Ppxlib_ast.Convert.B.Ast)

    Module B.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Ppxlib_ast/Convert/argument-2-B/index.html b/ppxlib/Ppxlib_ast/Convert/argument-2-B/index.html index 443baed..ba1503d 100644 --- a/ppxlib/Ppxlib_ast/Convert/argument-2-B/index.html +++ b/ppxlib/Ppxlib_ast/Convert/argument-2-B/index.html @@ -1,5 +1,5 @@ -B (ppxlib.Ppxlib_ast.Convert.B)

    Parameter Convert.B

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +B (ppxlib.Ppxlib_ast.Convert.B)

    Parameter Convert.B

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast/Convert/index.html b/ppxlib/Ppxlib_ast/Convert/index.html index 45efe5b..806cd5f 100644 --- a/ppxlib/Ppxlib_ast/Convert/index.html +++ b/ppxlib/Ppxlib_ast/Convert/index.html @@ -1,5 +1,5 @@ -Convert (ppxlib.Ppxlib_ast.Convert)

    Module Ppxlib_ast.Convert

    Parameters

    module A : sig ... end
    module B : sig ... end

    Signature

    val copy_toplevel_phrase : +Convert (ppxlib.Ppxlib_ast.Convert)

    Module Ppxlib_ast.Convert

    \ No newline at end of file + B.Ast.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Extra_warnings/index.html b/ppxlib/Ppxlib_ast/Extra_warnings/index.html index 07e68da..74eb5d8 100644 --- a/ppxlib/Ppxlib_ast/Extra_warnings/index.html +++ b/ppxlib/Ppxlib_ast/Extra_warnings/index.html @@ -1,2 +1,2 @@ -Extra_warnings (ppxlib.Ppxlib_ast.Extra_warnings)

    Module Ppxlib_ast.Extra_warnings

    val care_about_ite_branch : bool ref

    Ignored -- kept for compatibility.

    val about_ite_branch_ref : (Astlib.Location.t -> unit) ref

    Ignored -- kept for compatibility.

    val about_ite_branch : Astlib.Location.t -> unit

    Ignored -- kept for compatibility.

    \ No newline at end of file +Extra_warnings (ppxlib.Ppxlib_ast.Extra_warnings)

    Module Ppxlib_ast.Extra_warnings

    val care_about_ite_branch : bool ref

    Ignored -- kept for compatibility.

    val about_ite_branch_ref : (Astlib.Location.t -> unit) ref

    Ignored -- kept for compatibility.

    val about_ite_branch : Astlib.Location.t -> unit

    Ignored -- kept for compatibility.

    diff --git a/ppxlib/Ppxlib_ast/Find_version/index.html b/ppxlib/Ppxlib_ast/Find_version/index.html index d722f12..60caa7d 100644 --- a/ppxlib/Ppxlib_ast/Find_version/index.html +++ b/ppxlib/Ppxlib_ast/Find_version/index.html @@ -1,2 +1,2 @@ -Find_version (ppxlib.Ppxlib_ast.Find_version)

    Module Ppxlib_ast.Find_version

    Helper to find the frontend corresponding to a given magic number

    type t =
    1. | Impl of (module Ppxlib_ast__.Versions.OCaml_version)
    2. | Intf of (module Ppxlib_ast__.Versions.OCaml_version)
    3. | Unknown
    val from_magic : string -> t
    \ No newline at end of file +Find_version (ppxlib.Ppxlib_ast.Find_version)

    Module Ppxlib_ast.Find_version

    Helper to find the frontend corresponding to a given magic number

    type t =
    1. | Impl of (module Ppxlib_ast__.Versions.OCaml_version)
    2. | Intf of (module Ppxlib_ast__.Versions.OCaml_version)
    3. | Unknown
    val from_magic : string -> t
    diff --git a/ppxlib/Ppxlib_ast/Js/index.html b/ppxlib/Ppxlib_ast/Js/index.html index ded738e..77468b5 100644 --- a/ppxlib/Ppxlib_ast/Js/index.html +++ b/ppxlib/Ppxlib_ast/Js/index.html @@ -1,5 +1,5 @@ -Js (ppxlib.Ppxlib_ast.Js)

    Module Ppxlib_ast.Js

    module Ast = Astlib.Ast_500

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +Js (ppxlib.Ppxlib_ast.Js)

    Module Ppxlib_ast.Js

    module Ast = Astlib.Ast_500

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast/Location_error/index.html b/ppxlib/Ppxlib_ast/Location_error/index.html index 058e22e..3205987 100644 --- a/ppxlib/Ppxlib_ast/Location_error/index.html +++ b/ppxlib/Ppxlib_ast/Location_error/index.html @@ -1,6 +1,6 @@ -Location_error (ppxlib.Ppxlib_ast.Location_error)

    Module Ppxlib_ast.Location_error

    val of_exn : exn -> t option
    val register_error_of_exn : (exn -> t option) -> unit
    val message : t -> string
    val set_message : t -> string -> t
    val make : - loc:Astlib.Location.t -> +Location_error (ppxlib.Ppxlib_ast.Location_error)

    Module Ppxlib_ast.Location_error

    val of_exn : exn -> t option
    val register_error_of_exn : (exn -> t option) -> unit
    val message : t -> string
    val set_message : t -> string -> t
    val make : + loc:Astlib.Location.t -> string -> - sub:(Astlib.Location.t * string) list -> - t
    val raise : t -> 'a
    val update_loc : t -> Astlib.Location.t -> t
    val get_location : t -> Astlib.Location.t
    \ No newline at end of file + sub:(Astlib.Location.t * string) list -> + t
    val raise : t -> 'a
    val update_loc : t -> Astlib.Location.t -> t
    val get_location : t -> Astlib.Location.t
    diff --git a/ppxlib/Ppxlib_ast/Parse/Of_ocaml/index.html b/ppxlib/Ppxlib_ast/Parse/Of_ocaml/index.html index ca3573b..f14d399 100644 --- a/ppxlib/Ppxlib_ast/Parse/Of_ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Parse/Of_ocaml/index.html @@ -1,5 +1,5 @@ -Of_ocaml (ppxlib.Ppxlib_ast.Parse.Of_ocaml)

    Module Parse.Of_ocaml

    val copy_structure : +Of_ocaml (ppxlib.Ppxlib_ast.Parse.Of_ocaml)

    Module Parse.Of_ocaml

    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Parse/index.html b/ppxlib/Ppxlib_ast/Parse/index.html index 73b0f99..a6a31b4 100644 --- a/ppxlib/Ppxlib_ast/Parse/index.html +++ b/ppxlib/Ppxlib_ast/Parse/index.html @@ -1,6 +1,6 @@ -Parse (ppxlib.Ppxlib_ast.Parse)

    Module Ppxlib_ast.Parse

    include module type of struct include Astlib.Parse end
    module Of_ocaml : sig ... end
    val toplevel_phrase : +Parse (ppxlib.Ppxlib_ast.Parse)

    Module Ppxlib_ast.Parse

    \ No newline at end of file + Astlib.Ast_500.Parsetree.toplevel_phrase list
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/Of_ocaml/index.html b/ppxlib/Ppxlib_ast/Select_ast/Of_ocaml/index.html index 78a19e8..75918eb 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/Of_ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/Of_ocaml/index.html @@ -1,5 +1,5 @@ -Of_ocaml (ppxlib.Ppxlib_ast.Select_ast.Of_ocaml)

    Module Select_ast.Of_ocaml

    val copy_structure : +Of_ocaml (ppxlib.Ppxlib_ast.Select_ast.Of_ocaml)

    Module Select_ast.Of_ocaml

    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/To_ocaml/index.html b/ppxlib/Ppxlib_ast/Select_ast/To_ocaml/index.html index 6028170..2d0e8cd 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/To_ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/To_ocaml/index.html @@ -1,5 +1,5 @@ -To_ocaml (ppxlib.Ppxlib_ast.Select_ast.To_ocaml)

    Module Select_ast.To_ocaml

    val copy_structure : +To_ocaml (ppxlib.Ppxlib_ast.Select_ast.To_ocaml)

    Module Select_ast.To_ocaml

    \ No newline at end of file + Ocaml.Ast.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/Type/index.html b/ppxlib/Ppxlib_ast/Select_ast/Type/index.html index 9d245c2..5568564 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/Type/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/Type/index.html @@ -1,5 +1,5 @@ -Type (ppxlib.Ppxlib_ast.Select_ast.Type)

    Module Select_ast.Type

    type ('js, 'ocaml) t =
    1. | Structure : (Astlib.Ast_500.Parsetree.structure, Ocaml.Ast.Parsetree.structure) +Type (ppxlib.Ppxlib_ast.Select_ast.Type)

      Module Select_ast.Type

      type ('js, 'ocaml) t =
      1. | Structure : (Astlib.Ast_500.Parsetree.structure, Ocaml.Ast.Parsetree.structure) t
      2. | Signature : (Astlib.Ast_500.Parsetree.signature, Ocaml.Ast.Parsetree.signature) t
      3. | Toplevel_phrase : (Astlib.Ast_500.Parsetree.toplevel_phrase, Ocaml.Ast.Parsetree.toplevel_phrase) @@ -30,4 +30,4 @@ Ocaml.Ast.Parsetree.signature_item) t
      4. | Structure_item : (Astlib.Ast_500.Parsetree.structure_item, Ocaml.Ast.Parsetree.structure_item) - t
      5. | List : ('a, 'b) t -> ('a list, 'b list) t
      6. | Pair : ('a, 'b) t * ('c, 'd) t -> ('a * 'c, 'b * 'd) t
      \ No newline at end of file + t
    2. | List : ('a, 'b) t -> ('a list, 'b list) t
    3. | Pair : ('a, 'b) t * ('c, 'd) t -> ('a * 'c, 'b * 'd) t
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html index 91987da..38bf297 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html index 8269c3a..847daad 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/Parsetree/index.html @@ -1,2 +1,2 @@ -Parsetree (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    \ No newline at end of file +Parsetree (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html index 6d8d50d..5c7873a 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/Ast/index.html @@ -1,2 +1,2 @@ -Ast (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast)

    Module Ocaml.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast (ppxlib.Ppxlib_ast.Select_ast.Ocaml.Ast)

    Module Ocaml.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html index 259c3d8..60aac41 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/argument-1-Ocaml/index.html @@ -1,5 +1,5 @@ -Ocaml (ppxlib.Ppxlib_ast.Select_ast.Ocaml)

    Parameter Select_ast.Ocaml

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +Ocaml (ppxlib.Ppxlib_ast.Select_ast.Ocaml)

    Parameter Select_ast.Ocaml

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast/Select_ast/index.html b/ppxlib/Ppxlib_ast/Select_ast/index.html index ef72c4e..b698eed 100644 --- a/ppxlib/Ppxlib_ast/Select_ast/index.html +++ b/ppxlib/Ppxlib_ast/Select_ast/index.html @@ -1,5 +1,5 @@ -Select_ast (ppxlib.Ppxlib_ast.Select_ast)

    Module Ppxlib_ast.Select_ast

    Parameters

    module Ocaml : sig ... end

    Signature

    module Ast = Astlib.Ast_500

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +Select_ast (ppxlib.Ppxlib_ast.Select_ast)

    Module Ppxlib_ast.Select_ast

    Parameters

    module Ocaml : sig ... end

    Signature

    module Ast = Astlib.Ast_500

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    module Type : sig ... end
    module Of_ocaml : sig ... end
    module To_ocaml : sig ... end
    val of_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'ocaml -> 'js
    val to_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'js -> 'ocaml
    val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
    val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    module Type : sig ... end
    module Of_ocaml : sig ... end
    module To_ocaml : sig ... end
    val of_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'ocaml -> 'js
    val to_ocaml : 'ocaml 'js. ('js, 'ocaml) Type.t -> 'js -> 'ocaml
    val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'b -> 'b) -> 'c -> 'a -> 'a
    val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'a -> 'a) -> 'c -> 'b -> 'b
    diff --git a/ppxlib/Ppxlib_ast/Selected_ast/Of_ocaml/index.html b/ppxlib/Ppxlib_ast/Selected_ast/Of_ocaml/index.html index 93c295f..e11361f 100644 --- a/ppxlib/Ppxlib_ast/Selected_ast/Of_ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Selected_ast/Of_ocaml/index.html @@ -1,5 +1,5 @@ -Of_ocaml (ppxlib.Ppxlib_ast.Selected_ast.Of_ocaml)

    Module Selected_ast.Of_ocaml

    val copy_structure : +Of_ocaml (ppxlib.Ppxlib_ast.Selected_ast.Of_ocaml)

    Module Selected_ast.Of_ocaml

    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Selected_ast/To_ocaml/index.html b/ppxlib/Ppxlib_ast/Selected_ast/To_ocaml/index.html index 18ef9e1..01ba3e8 100644 --- a/ppxlib/Ppxlib_ast/Selected_ast/To_ocaml/index.html +++ b/ppxlib/Ppxlib_ast/Selected_ast/To_ocaml/index.html @@ -1,5 +1,5 @@ -To_ocaml (ppxlib.Ppxlib_ast.Selected_ast.To_ocaml)

    Module Selected_ast.To_ocaml

    val copy_structure : +To_ocaml (ppxlib.Ppxlib_ast.Selected_ast.To_ocaml)

    Module Selected_ast.To_ocaml

    \ No newline at end of file + Astlib.Ast_501.Parsetree.structure_item
    diff --git a/ppxlib/Ppxlib_ast/Selected_ast/Type/index.html b/ppxlib/Ppxlib_ast/Selected_ast/Type/index.html index 55b611a..9df50ce 100644 --- a/ppxlib/Ppxlib_ast/Selected_ast/Type/index.html +++ b/ppxlib/Ppxlib_ast/Selected_ast/Type/index.html @@ -1,5 +1,5 @@ -Type (ppxlib.Ppxlib_ast.Selected_ast.Type)

    Module Selected_ast.Type

    type (!'js, !'ocaml) t =
    1. | Structure : (Astlib.Ast_500.Parsetree.structure, +Type (ppxlib.Ppxlib_ast.Selected_ast.Type)

      Module Selected_ast.Type

      type (!'js, !'ocaml) t =
      1. | Structure : (Astlib.Ast_500.Parsetree.structure, Astlib.Ast_501.Parsetree.structure) t
      2. | Signature : (Astlib.Ast_500.Parsetree.signature, Astlib.Ast_501.Parsetree.signature) @@ -34,4 +34,4 @@ Astlib.Ast_501.Parsetree.signature_item) t
      3. | Structure_item : (Astlib.Ast_500.Parsetree.structure_item, Astlib.Ast_501.Parsetree.structure_item) - t
      4. | List : ('a, 'b) t -> ('a0 list, 'b0 list) t
      5. | Pair : ('a1, 'b1) t * ('c, 'd) t -> ('a2 * 'c0, 'b2 * 'd0) t
      \ No newline at end of file + t
    2. | List : ('a, 'b) t -> ('a list, 'b list) t
    3. | Pair : ('a0, 'b0) t * ('c, 'd) t -> ('a0 * 'c, 'b0 * 'd) t
    diff --git a/ppxlib/Ppxlib_ast/Selected_ast/index.html b/ppxlib/Ppxlib_ast/Selected_ast/index.html index 9affb1f..ff24179 100644 --- a/ppxlib/Ppxlib_ast/Selected_ast/index.html +++ b/ppxlib/Ppxlib_ast/Selected_ast/index.html @@ -1,5 +1,5 @@ -Selected_ast (ppxlib.Ppxlib_ast.Selected_ast)

    Module Ppxlib_ast.Selected_ast

    module Ast = Astlib.Ast_500
    val version : int
    val string_version : string
    type types = +Selected_ast (ppxlib.Ppxlib_ast.Selected_ast)

    Module Ppxlib_ast.Selected_ast

    module Ast = Astlib.Ast_500
    val version : int
    val string_version : string
    type types = < case : Ast.Parsetree.case ; class_expr : Ast.Parsetree.class_expr ; class_field : Ast.Parsetree.class_field @@ -18,4 +18,4 @@ ; structure_item : Ast.Parsetree.structure_item ; toplevel_phrase : Ast.Parsetree.toplevel_phrase ; type_declaration : Ast.Parsetree.type_declaration - ; type_extension : Ast.Parsetree.type_extension >
    type Ppxlib_ast__Versions.witnesses +=
    1. | Version : types Ppxlib_ast__Versions.witnesses
    val migration_info : types Ppxlib_ast__Versions.migration_info
    module Type : sig ... end
    module Of_ocaml : sig ... end
    module To_ocaml : sig ... end
    val of_ocaml : ('js, 'ocaml) Type.t -> 'ocaml -> 'js
    val to_ocaml : ('js, 'ocaml) Type.t -> 'js -> 'ocaml
    val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
    val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'd -> 'e) -> 'f -> 'g -> 'h
    \ No newline at end of file + ; type_extension : Ast.Parsetree.type_extension >
    type Ppxlib_ast__Versions.witnesses +=
    1. | Version : types Ppxlib_ast__Versions.witnesses
    val migration_info : types Ppxlib_ast__Versions.migration_info
    module Type : sig ... end
    module Of_ocaml : sig ... end
    module To_ocaml : sig ... end
    val of_ocaml : ('js, 'ocaml) Type.t -> 'ocaml -> 'js
    val to_ocaml : ('js, 'ocaml) Type.t -> 'js -> 'ocaml
    val of_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'b -> 'b) -> 'c -> 'a -> 'a
    val to_ocaml_mapper : ('a, 'b) Type.t -> ('c -> 'a -> 'a) -> 'c -> 'b -> 'b
    diff --git a/ppxlib/Ppxlib_ast/index.html b/ppxlib/Ppxlib_ast/index.html index 42529f2..ff273c8 100644 --- a/ppxlib/Ppxlib_ast/index.html +++ b/ppxlib/Ppxlib_ast/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast (ppxlib.Ppxlib_ast)

    Module Ppxlib_ast

    module type OCaml_version = sig ... end
    module Ast : sig ... end

    Definition of the OCaml AST

    module Ast_helper : sig ... end

    Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

    module Ast_magic = Astlib.Ast_500.Config
    module Asttypes = Astlib.Ast_500.Asttypes
    module Compiler_version : sig ... end
    module Js : sig ... end
    module Find_version : sig ... end
    module Convert (A : sig ... end) (B : sig ... end) : sig ... end
    module Extra_warnings : sig ... end
    module Location_error : sig ... end
    module Parse : sig ... end
    module Parsetree = Astlib.Ast_500.Parsetree
    module Pprintast = Astlib.Pprintast
    module Select_ast (Ocaml : sig ... end) : sig ... end
    module Selected_ast : sig ... end
    \ No newline at end of file +Ppxlib_ast (ppxlib.Ppxlib_ast)

    Module Ppxlib_ast

    module type OCaml_version = sig ... end
    module Ast : sig ... end

    Definition of the OCaml AST

    module Ast_helper : sig ... end

    Copy of Ast_helper from OCaml 4.14 with docstring related stuff removed

    module Ast_magic = Astlib.Ast_500.Config
    module Asttypes = Astlib.Ast_500.Asttypes
    module Compiler_version : sig ... end
    module Js : sig ... end
    module Find_version : sig ... end

    Helper to find the frontend corresponding to a given magic number

    module Convert (A : sig ... end) (B : sig ... end) : sig ... end
    module Extra_warnings : sig ... end
    module Location_error : sig ... end
    module Parse : sig ... end
    module Parsetree = Astlib.Ast_500.Parsetree
    module Pprintast = Astlib.Pprintast
    module Select_ast (Ocaml : sig ... end) : sig ... end
    module Selected_ast : sig ... end
    diff --git a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html index 52522ef..0bae8c8 100644 --- a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html +++ b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Config/index.html @@ -1,2 +1,2 @@ -Config (ppxlib.Ppxlib_ast.OCaml_version.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    \ No newline at end of file +Config (ppxlib.Ppxlib_ast.OCaml_version.Ast.Config)

    Module Ast.Config

    val ast_impl_magic_number : string
    val ast_intf_magic_number : string
    diff --git a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html index 0685972..6d85269 100644 --- a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html +++ b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/Parsetree/index.html @@ -1,2 +1,2 @@ -Parsetree (ppxlib.Ppxlib_ast.OCaml_version.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    \ No newline at end of file +Parsetree (ppxlib.Ppxlib_ast.OCaml_version.Ast.Parsetree)

    Module Ast.Parsetree

    type structure
    type signature
    type toplevel_phrase
    type core_type
    type expression
    type pattern
    type case
    type type_declaration
    type type_extension
    type extension_constructor
    type class_expr
    type class_field
    type class_type
    type class_signature
    type class_type_field
    type module_expr
    type module_type
    type signature_item
    type structure_item
    diff --git a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/index.html b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/index.html index 42e74dc..6fb35fa 100644 --- a/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/index.html +++ b/ppxlib/Ppxlib_ast/module-type-OCaml_version/Ast/index.html @@ -1,2 +1,2 @@ -Ast (ppxlib.Ppxlib_ast.OCaml_version.Ast)

    Module OCaml_version.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    \ No newline at end of file +Ast (ppxlib.Ppxlib_ast.OCaml_version.Ast)

    Module OCaml_version.Ast

    Ast definition for this version

    module Parsetree : sig ... end
    module Config : sig ... end
    diff --git a/ppxlib/Ppxlib_ast/module-type-OCaml_version/index.html b/ppxlib/Ppxlib_ast/module-type-OCaml_version/index.html index 2408c96..512e399 100644 --- a/ppxlib/Ppxlib_ast/module-type-OCaml_version/index.html +++ b/ppxlib/Ppxlib_ast/module-type-OCaml_version/index.html @@ -1,5 +1,5 @@ -OCaml_version (ppxlib.Ppxlib_ast.OCaml_version)

    Module type Ppxlib_ast.OCaml_version

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = +OCaml_version (ppxlib.Ppxlib_ast.OCaml_version)

    Module type Ppxlib_ast.OCaml_version

    module Ast : sig ... end

    Ast definition for this version

    val version : int
    val string_version : string
    type types = < structure : Ast.Parsetree.structure ; signature : Ast.Parsetree.signature ; toplevel_phrase : Ast.Parsetree.toplevel_phrase @@ -18,4 +18,4 @@ ; module_expr : Ast.Parsetree.module_expr ; module_type : Ast.Parsetree.module_type ; signature_item : Ast.Parsetree.signature_item - ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    \ No newline at end of file + ; structure_item : Ast.Parsetree.structure_item >

    Shortcut for talking about Ast types

    type Ppxlib_ast__.Versions.witnesses +=
    1. | Version : types Ppxlib_ast__.Versions.witnesses

    A construtor for recovering type equalities between two arbitrary versions.

    val migration_info : types Ppxlib_ast__.Versions.migration_info

    Information used to derive migration functions, see below

    diff --git a/ppxlib/Ppxlib_ast__/index.html b/ppxlib/Ppxlib_ast__/index.html index 5d3572d..560fadc 100644 --- a/ppxlib/Ppxlib_ast__/index.html +++ b/ppxlib/Ppxlib_ast__/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__ (ppxlib.Ppxlib_ast__)

    Module Ppxlib_ast__

    \ No newline at end of file +Ppxlib_ast__ (ppxlib.Ppxlib_ast__)

    Module Ppxlib_ast__

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Ast/index.html b/ppxlib/Ppxlib_ast__Ast/index.html index 22fccfc..d80816b 100644 --- a/ppxlib/Ppxlib_ast__Ast/index.html +++ b/ppxlib/Ppxlib_ast__Ast/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Ast (ppxlib.Ppxlib_ast__Ast)

    Module Ppxlib_ast__Ast

    \ No newline at end of file +Ppxlib_ast__Ast (ppxlib.Ppxlib_ast__Ast)

    Module Ppxlib_ast__Ast

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Ast_helper_lite/index.html b/ppxlib/Ppxlib_ast__Ast_helper_lite/index.html index 6311f21..a8923d5 100644 --- a/ppxlib/Ppxlib_ast__Ast_helper_lite/index.html +++ b/ppxlib/Ppxlib_ast__Ast_helper_lite/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Ast_helper_lite (ppxlib.Ppxlib_ast__Ast_helper_lite)

    Module Ppxlib_ast__Ast_helper_lite

    \ No newline at end of file +Ppxlib_ast__Ast_helper_lite (ppxlib.Ppxlib_ast__Ast_helper_lite)

    Module Ppxlib_ast__Ast_helper_lite

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Import/index.html b/ppxlib/Ppxlib_ast__Import/index.html index 86b6924..87a9598 100644 --- a/ppxlib/Ppxlib_ast__Import/index.html +++ b/ppxlib/Ppxlib_ast__Import/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Import (ppxlib.Ppxlib_ast__Import)

    Module Ppxlib_ast__Import

    \ No newline at end of file +Ppxlib_ast__Import (ppxlib.Ppxlib_ast__Import)

    Module Ppxlib_ast__Import

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Location_error/index.html b/ppxlib/Ppxlib_ast__Location_error/index.html index ebf9a2e..30aa85d 100644 --- a/ppxlib/Ppxlib_ast__Location_error/index.html +++ b/ppxlib/Ppxlib_ast__Location_error/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Location_error (ppxlib.Ppxlib_ast__Location_error)

    Module Ppxlib_ast__Location_error

    \ No newline at end of file +Ppxlib_ast__Location_error (ppxlib.Ppxlib_ast__Location_error)

    Module Ppxlib_ast__Location_error

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Stdlib0/index.html b/ppxlib/Ppxlib_ast__Stdlib0/index.html index afed4b4..027f7b0 100644 --- a/ppxlib/Ppxlib_ast__Stdlib0/index.html +++ b/ppxlib/Ppxlib_ast__Stdlib0/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Stdlib0 (ppxlib.Ppxlib_ast__Stdlib0)

    Module Ppxlib_ast__Stdlib0

    \ No newline at end of file +Ppxlib_ast__Stdlib0 (ppxlib.Ppxlib_ast__Stdlib0)

    Module Ppxlib_ast__Stdlib0

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Versions/index.html b/ppxlib/Ppxlib_ast__Versions/index.html index 7652acd..ed528b8 100644 --- a/ppxlib/Ppxlib_ast__Versions/index.html +++ b/ppxlib/Ppxlib_ast__Versions/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Versions (ppxlib.Ppxlib_ast__Versions)

    Module Ppxlib_ast__Versions

    \ No newline at end of file +Ppxlib_ast__Versions (ppxlib.Ppxlib_ast__Versions)

    Module Ppxlib_ast__Versions

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_ast__Warn/index.html b/ppxlib/Ppxlib_ast__Warn/index.html index 79c2fd4..b2f7bf2 100644 --- a/ppxlib/Ppxlib_ast__Warn/index.html +++ b/ppxlib/Ppxlib_ast__Warn/index.html @@ -1,2 +1,2 @@ -Ppxlib_ast__Warn (ppxlib.Ppxlib_ast__Warn)

    Module Ppxlib_ast__Warn

    \ No newline at end of file +Ppxlib_ast__Warn (ppxlib.Ppxlib_ast__Warn)

    Module Ppxlib_ast__Warn

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_metaquot/Expr/index.html b/ppxlib/Ppxlib_metaquot/Expr/index.html index 4fdc704..3b58878 100644 --- a/ppxlib/Ppxlib_metaquot/Expr/index.html +++ b/ppxlib/Ppxlib_metaquot/Expr/index.html @@ -1,5 +1,5 @@ -Expr (ppxlib.Ppxlib_metaquot.Expr)

    Module Ppxlib_metaquot.Expr

    val lift : +Expr (ppxlib.Ppxlib_metaquot.Expr)

    Module Ppxlib_metaquot.Expr

    val lift : Ppxlib.location -> < arg_label : Ppxlib_ast.Ast.arg_label -> Ppxlib.expression ; array : @@ -150,4 +150,4 @@ ; value_description : Ppxlib_ast.Ast.value_description -> Ppxlib.expression ; variance : Ppxlib_ast.Ast.variance -> Ppxlib.expression ; virtual_flag : Ppxlib_ast.Ast.virtual_flag -> Ppxlib.expression - ; with_constraint : Ppxlib_ast.Ast.with_constraint -> Ppxlib.expression >
    \ No newline at end of file + ; with_constraint : Ppxlib_ast.Ast.with_constraint -> Ppxlib.expression >
    diff --git a/ppxlib/Ppxlib_metaquot/Make/argument-1-M/class-std_lifters/index.html b/ppxlib/Ppxlib_metaquot/Make/argument-1-M/class-std_lifters/index.html index cc8ef97..0650ed5 100644 --- a/ppxlib/Ppxlib_metaquot/Make/argument-1-M/class-std_lifters/index.html +++ b/ppxlib/Ppxlib_metaquot/Make/argument-1-M/class-std_lifters/index.html @@ -1,5 +1,5 @@ -std_lifters (ppxlib.Ppxlib_metaquot.Make.M.std_lifters)

    Class M.std_lifters

    method other : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift
    method int : (int, 'res) Ppxlib_traverse_builtins.T.lift
    method string : (string, 'res) Ppxlib_traverse_builtins.T.lift
    method bool : (bool, 'res) Ppxlib_traverse_builtins.T.lift
    method char : (char, 'res) Ppxlib_traverse_builtins.T.lift
    method array : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift -> +std_lifters (ppxlib.Ppxlib_metaquot.Make.M.std_lifters)

    Class M.std_lifters

    method other : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift
    method int : (int, 'res) Ppxlib_traverse_builtins.T.lift
    method string : (string, 'res) Ppxlib_traverse_builtins.T.lift
    method bool : (bool, 'res) Ppxlib_traverse_builtins.T.lift
    method char : (char, 'res) Ppxlib_traverse_builtins.T.lift
    method array : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift -> ('a array, 'res) Ppxlib_traverse_builtins.T.lift
    method record : (string * 'res) list -> 'res
    method constr : string -> 'res list -> 'res
    method tuple : 'res list -> 'res
    method float : (float, 'res) Ppxlib_traverse_builtins.T.lift
    method int32 : (int32, 'res) Ppxlib_traverse_builtins.T.lift
    method int64 : (int64, 'res) Ppxlib_traverse_builtins.T.lift
    method nativeint : (nativeint, 'res) Ppxlib_traverse_builtins.T.lift
    method unit : (unit, 'res) Ppxlib_traverse_builtins.T.lift
    method option : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift -> ('a option, 'res) Ppxlib_traverse_builtins.T.lift
    method list : 'a. ('a, 'res) Ppxlib_traverse_builtins.T.lift -> - ('a list, 'res) Ppxlib_traverse_builtins.T.lift
    \ No newline at end of file + ('a list, 'res) Ppxlib_traverse_builtins.T.lift
    diff --git a/ppxlib/Ppxlib_metaquot/Make/argument-1-M/index.html b/ppxlib/Ppxlib_metaquot/Make/argument-1-M/index.html index f4073f1..c57a294 100644 --- a/ppxlib/Ppxlib_metaquot/Make/argument-1-M/index.html +++ b/ppxlib/Ppxlib_metaquot/Make/argument-1-M/index.html @@ -1,8 +1,8 @@ -M (ppxlib.Ppxlib_metaquot.Make.M)

    Parameter Make.M

    type result
    val annotate : result -> Ppxlib.core_type -> result
    val cast : +M (ppxlib.Ppxlib_metaquot.Make.M)

    Parameter Make.M

    type result
    val annotate : result -> Ppxlib.core_type -> result
    val cast : < attributes : Ppxlib.attributes -> result ; typed : result -> string -> result.. > -> Ppxlib.extension -> quoted_attributes option -> - type_name:string -> - result
    val location : Ppxlib.location -> result
    val location_stack : (Ppxlib.location -> result) option
    val attributes : (Ppxlib.location -> result) option
    \ No newline at end of file + type_name:string -> + result
    val location : Ppxlib.location -> result
    val location_stack : (Ppxlib.location -> result) option
    val attributes : (Ppxlib.location -> result) option
    diff --git a/ppxlib/Ppxlib_metaquot/Make/index.html b/ppxlib/Ppxlib_metaquot/Make/index.html index 50da265..be0a528 100644 --- a/ppxlib/Ppxlib_metaquot/Make/index.html +++ b/ppxlib/Ppxlib_metaquot/Make/index.html @@ -1,5 +1,5 @@ -Make (ppxlib.Ppxlib_metaquot.Make)

    Module Ppxlib_metaquot.Make

    Parameters

    module M : sig ... end

    Signature

    val lift : +Make (ppxlib.Ppxlib_metaquot.Make)

    Module Ppxlib_metaquot.Make

    Parameters

    module M : sig ... end

    Signature

    val lift : Ppxlib.location -> < arg_label : Ppxlib_ast.Ast.arg_label -> M.result ; array : @@ -129,4 +129,4 @@ ; value_description : Ppxlib_ast.Ast.value_description -> M.result ; variance : Ppxlib_ast.Ast.variance -> M.result ; virtual_flag : Ppxlib_ast.Ast.virtual_flag -> M.result - ; with_constraint : Ppxlib_ast.Ast.with_constraint -> M.result >
    \ No newline at end of file + ; with_constraint : Ppxlib_ast.Ast.with_constraint -> M.result >
    diff --git a/ppxlib/Ppxlib_metaquot/Patt/index.html b/ppxlib/Ppxlib_metaquot/Patt/index.html index 61424fc..3202490 100644 --- a/ppxlib/Ppxlib_metaquot/Patt/index.html +++ b/ppxlib/Ppxlib_metaquot/Patt/index.html @@ -1,5 +1,5 @@ -Patt (ppxlib.Ppxlib_metaquot.Patt)

    Module Ppxlib_metaquot.Patt

    val lift : +Patt (ppxlib.Ppxlib_metaquot.Patt)

    Module Ppxlib_metaquot.Patt

    val lift : Ppxlib.location -> < arg_label : Ppxlib_ast.Ast.arg_label -> Ppxlib.pattern ; array : @@ -137,4 +137,4 @@ ; value_description : Ppxlib_ast.Ast.value_description -> Ppxlib.pattern ; variance : Ppxlib_ast.Ast.variance -> Ppxlib.pattern ; virtual_flag : Ppxlib_ast.Ast.virtual_flag -> Ppxlib.pattern - ; with_constraint : Ppxlib_ast.Ast.with_constraint -> Ppxlib.pattern >
    \ No newline at end of file + ; with_constraint : Ppxlib_ast.Ast.with_constraint -> Ppxlib.pattern >
    diff --git a/ppxlib/Ppxlib_metaquot/index.html b/ppxlib/Ppxlib_metaquot/index.html index 7bd909d..579560f 100644 --- a/ppxlib/Ppxlib_metaquot/index.html +++ b/ppxlib/Ppxlib_metaquot/index.html @@ -1,2 +1,2 @@ -Ppxlib_metaquot (ppxlib.Ppxlib_metaquot)

    Module Ppxlib_metaquot

    module E = Ppxlib.Extension
    type quoted_attributes = {
    1. quoted_attributes : Ppxlib.attributes;
    2. field_name : string;
    }
    module Make (M : sig ... end) : sig ... end
    module Expr : sig ... end
    module Patt : sig ... end
    \ No newline at end of file +Ppxlib_metaquot (ppxlib.Ppxlib_metaquot)

    Module Ppxlib_metaquot

    module E = Ppxlib.Extension
    type quoted_attributes = {
    1. quoted_attributes : Ppxlib.attributes;
    2. field_name : string;
    }
    module Make (M : sig ... end) : sig ... end
    module Expr : sig ... end
    module Patt : sig ... end
    diff --git a/ppxlib/Ppxlib_metaquot_lifters/class-expression_lifters/index.html b/ppxlib/Ppxlib_metaquot_lifters/class-expression_lifters/index.html index eb79850..791eab0 100644 --- a/ppxlib/Ppxlib_metaquot_lifters/class-expression_lifters/index.html +++ b/ppxlib/Ppxlib_metaquot_lifters/class-expression_lifters/index.html @@ -1,9 +1,4 @@ -expression_lifters (ppxlib.Ppxlib_metaquot_lifters.expression_lifters)

    Class Ppxlib_metaquot_lifters.expression_lifters

    method record : expression_lifters -> - (string * Ppxlib.expression) list -> - Ppxlib.expression
    method constr : 'b -> string -> Ppxlib.expression list -> Ppxlib.expression
    method tuple : 'b -> Ppxlib__.Import.expression list -> Ppxlib.expression
    method nativeint : 'b -> - (nativeint, Ppxlib.expression) Ppxlib_traverse_builtins.T.lift
    method string : 'b -> - (string, Ppxlib.expression) Ppxlib_traverse_builtins.T.lift
    method other : 'b -> - 'a. ('a, Ppxlib.expression) Ppxlib_traverse_builtins.T.lift
    \ No newline at end of file +expression_lifters (ppxlib.Ppxlib_metaquot_lifters.expression_lifters)

    Class Ppxlib_metaquot_lifters.expression_lifters

    diff --git a/ppxlib/Ppxlib_metaquot_lifters/class-pattern_lifters/index.html b/ppxlib/Ppxlib_metaquot_lifters/class-pattern_lifters/index.html index 0ce1f98..28f8507 100644 --- a/ppxlib/Ppxlib_metaquot_lifters/class-pattern_lifters/index.html +++ b/ppxlib/Ppxlib_metaquot_lifters/class-pattern_lifters/index.html @@ -1,7 +1,3 @@ -pattern_lifters (ppxlib.Ppxlib_metaquot_lifters.pattern_lifters)

    Class Ppxlib_metaquot_lifters.pattern_lifters

    method record : pattern_lifters -> - (string * Ppxlib.pattern) list -> - Ppxlib.pattern
    method constr : 'b -> string -> Ppxlib.pattern list -> Ppxlib.pattern
    method tuple : 'b -> Ppxlib__.Import.pattern list -> Ppxlib.pattern
    method int32 : 'b -> (int32, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    method int64 : 'b -> (int64, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    method nativeint : 'b -> - (nativeint, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    method float : 'b -> (float, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    method string : 'b -> (string, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    method other : 'b -> 'a. ('a, Ppxlib.pattern) Ppxlib_traverse_builtins.T.lift
    \ No newline at end of file +pattern_lifters (ppxlib.Ppxlib_metaquot_lifters.pattern_lifters)

    Class Ppxlib_metaquot_lifters.pattern_lifters

    diff --git a/ppxlib/Ppxlib_metaquot_lifters/index.html b/ppxlib/Ppxlib_metaquot_lifters/index.html index 78225ad..6bf7bdc 100644 --- a/ppxlib/Ppxlib_metaquot_lifters/index.html +++ b/ppxlib/Ppxlib_metaquot_lifters/index.html @@ -1,2 +1,2 @@ -Ppxlib_metaquot_lifters (ppxlib.Ppxlib_metaquot_lifters)

    Module Ppxlib_metaquot_lifters

    class expression_lifters : Ppxlib.location -> object ... end
    class pattern_lifters : Ppxlib.location -> object ... end
    \ No newline at end of file +Ppxlib_metaquot_lifters (ppxlib.Ppxlib_metaquot_lifters)

    Module Ppxlib_metaquot_lifters

    class expression_lifters : Ppxlib.location -> object ... end
    class pattern_lifters : Ppxlib.location -> object ... end
    diff --git a/ppxlib/Ppxlib_print_diff/index.html b/ppxlib/Ppxlib_print_diff/index.html index 99af9a5..de0e2a3 100644 --- a/ppxlib/Ppxlib_print_diff/index.html +++ b/ppxlib/Ppxlib_print_diff/index.html @@ -1,9 +1,9 @@ -Ppxlib_print_diff (ppxlib.Ppxlib_print_diff)

    Module Ppxlib_print_diff

    val print : - ?diff_command:string -> - ?extra_patdiff_args:string list -> - ?use_color:bool -> - file1:string -> - file2:string -> +Ppxlib_print_diff (ppxlib.Ppxlib_print_diff)

    Module Ppxlib_print_diff

    val print : + ?diff_command:string -> + ?extra_patdiff_args:string list -> + ?use_color:bool -> + file1:string -> + file2:string -> unit -> - unit

    Diff two files. Use diff_command to specify what command to use. If not specified patdiff is used, with a fallback to diff -u if patdiff produces no differences.

    \ No newline at end of file + unit

    Diff two files. Use diff_command to specify what command to use. If not specified patdiff is used, with a fallback to diff -u if patdiff produces no differences.

    diff --git a/ppxlib/Ppxlib_runner/Ppx_driver_runner/index.html b/ppxlib/Ppxlib_runner/Ppx_driver_runner/index.html index 10c4e62..de74f0b 100644 --- a/ppxlib/Ppxlib_runner/Ppx_driver_runner/index.html +++ b/ppxlib/Ppxlib_runner/Ppx_driver_runner/index.html @@ -1,2 +1,2 @@ -Ppx_driver_runner (ppxlib.Ppxlib_runner.Ppx_driver_runner)

    Module Ppxlib_runner.Ppx_driver_runner

    \ No newline at end of file +Ppx_driver_runner (ppxlib.Ppxlib_runner.Ppx_driver_runner)

    Module Ppxlib_runner.Ppx_driver_runner

    diff --git a/ppxlib/Ppxlib_runner/index.html b/ppxlib/Ppxlib_runner/index.html index d26a2de..75e4a4b 100644 --- a/ppxlib/Ppxlib_runner/index.html +++ b/ppxlib/Ppxlib_runner/index.html @@ -1,2 +1,2 @@ -Ppxlib_runner (ppxlib.Ppxlib_runner)

    Module Ppxlib_runner

    module Ppx_driver_runner : sig ... end
    \ No newline at end of file +Ppxlib_runner (ppxlib.Ppxlib_runner)

    Module Ppxlib_runner

    module Ppx_driver_runner : sig ... end
    diff --git a/ppxlib/Ppxlib_runner__Ppx_driver_runner/index.html b/ppxlib/Ppxlib_runner__Ppx_driver_runner/index.html index 2e0586f..a4352ff 100644 --- a/ppxlib/Ppxlib_runner__Ppx_driver_runner/index.html +++ b/ppxlib/Ppxlib_runner__Ppx_driver_runner/index.html @@ -1,2 +1,2 @@ -Ppxlib_runner__Ppx_driver_runner (ppxlib.Ppxlib_runner__Ppx_driver_runner)

    Module Ppxlib_runner__Ppx_driver_runner

    \ No newline at end of file +Ppxlib_runner__Ppx_driver_runner (ppxlib.Ppxlib_runner__Ppx_driver_runner)

    Module Ppxlib_runner__Ppx_driver_runner

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_runner_as_ppx/Ppx_driver_runner_as_ppx/index.html b/ppxlib/Ppxlib_runner_as_ppx/Ppx_driver_runner_as_ppx/index.html index e8fe037..e70f134 100644 --- a/ppxlib/Ppxlib_runner_as_ppx/Ppx_driver_runner_as_ppx/index.html +++ b/ppxlib/Ppxlib_runner_as_ppx/Ppx_driver_runner_as_ppx/index.html @@ -1,2 +1,2 @@ -Ppx_driver_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx.Ppx_driver_runner_as_ppx)

    Module Ppxlib_runner_as_ppx.Ppx_driver_runner_as_ppx

    \ No newline at end of file +Ppx_driver_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx.Ppx_driver_runner_as_ppx)

    Module Ppxlib_runner_as_ppx.Ppx_driver_runner_as_ppx

    diff --git a/ppxlib/Ppxlib_runner_as_ppx/index.html b/ppxlib/Ppxlib_runner_as_ppx/index.html index 2537a32..5e5b596 100644 --- a/ppxlib/Ppxlib_runner_as_ppx/index.html +++ b/ppxlib/Ppxlib_runner_as_ppx/index.html @@ -1,2 +1,2 @@ -Ppxlib_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx)

    Module Ppxlib_runner_as_ppx

    module Ppx_driver_runner_as_ppx : sig ... end
    \ No newline at end of file +Ppxlib_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx)

    Module Ppxlib_runner_as_ppx

    module Ppx_driver_runner_as_ppx : sig ... end
    diff --git a/ppxlib/Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx/index.html b/ppxlib/Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx/index.html index 4ea30c1..50e5d07 100644 --- a/ppxlib/Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx/index.html +++ b/ppxlib/Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx/index.html @@ -1,2 +1,2 @@ -Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx)

    Module Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx

    \ No newline at end of file +Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx (ppxlib.Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx)

    Module Ppxlib_runner_as_ppx__Ppx_driver_runner_as_ppx

    This module is hidden.

    diff --git a/ppxlib/Ppxlib_traverse/Backends/class-reconstructors/index.html b/ppxlib/Ppxlib_traverse/Backends/class-reconstructors/index.html index 3cc46bc..5ac5f8e 100644 --- a/ppxlib/Ppxlib_traverse/Backends/class-reconstructors/index.html +++ b/ppxlib/Ppxlib_traverse/Backends/class-reconstructors/index.html @@ -1,13 +1,10 @@ -reconstructors (ppxlib.Ppxlib_traverse.Backends.reconstructors)

    Class Backends.reconstructors

    method record : reconstructors -> - loc:Ppxlib__.Location.t -> +reconstructors (ppxlib.Ppxlib_traverse.Backends.reconstructors)

    Class Backends.reconstructors

    method record : loc:Ppxlib__.Location.t -> (Ppxlib__.Import.longident Ppxlib__.Import.loc * Ppxlib__.Import.expression) list -> - Ppxlib__.Import.expression
    method construct : 'a -> - loc:Ppxlib__.Location.t -> + Ppxlib__.Import.expression
    method construct : loc:Ppxlib__.Location.t -> Ppxlib__.Import.longident Ppxlib__.Import.loc -> Ppxlib__.Import.expression list -> - Ppxlib__.Import.expression
    method tuple : 'a -> - loc:Ppxlib__.Location.t -> + Ppxlib__.Import.expression
    method tuple : loc:Ppxlib__.Location.t -> Ppxlib__.Import.expression list -> - Ppxlib__.Import.expression
    \ No newline at end of file + Ppxlib__.Import.expression
    diff --git a/ppxlib/Ppxlib_traverse/Backends/class-type-what/index.html b/ppxlib/Ppxlib_traverse/Backends/class-type-what/index.html index f6db7c6..a2b2e7e 100644 --- a/ppxlib/Ppxlib_traverse/Backends/class-type-what/index.html +++ b/ppxlib/Ppxlib_traverse/Backends/class-type-what/index.html @@ -1,12 +1,12 @@ -what (ppxlib.Ppxlib_traverse.Backends.what)

    Class type Backends.what

    method name : string
    method class_params : loc:Ppxlib.Location.t -> - (Ppxlib.core_type * (Ppxlib.variance * Ppxlib.injectivity)) list
    method virtual_methods : loc:Ppxlib.Location.t -> Ppxlib.class_field list
    method apply : loc:Ppxlib.Location.t -> +what (ppxlib.Ppxlib_traverse.Backends.what)

    Class type Backends.what

    method name : string
    method class_params : loc:Ppxlib.Location.t -> + (Ppxlib.core_type * (Ppxlib.variance * Ppxlib.injectivity)) list
    method virtual_methods : loc:Ppxlib.Location.t -> Ppxlib.class_field list
    method apply : loc:Ppxlib.Location.t -> Ppxlib.expression -> Ppxlib.expression list -> - Ppxlib.expression
    method abstract : loc:Ppxlib.Location.t -> + Ppxlib.expression
    method abstract : loc:Ppxlib.Location.t -> Ppxlib.pattern -> Ppxlib.expression -> - Ppxlib.expression
    method combine : loc:Ppxlib.Location.t -> + Ppxlib.expression
    method typ : loc:Ppxlib.Location.t -> Ppxlib.core_type -> Ppxlib.core_type
    method any : loc:Ppxlib.Location.t -> Ppxlib.expression
    method combine : loc:Ppxlib.Location.t -> (string Ppxlib.loc * Ppxlib.expression) list -> - reconstruct:Ppxlib.expression -> - Ppxlib.expression
    \ No newline at end of file + reconstruct:Ppxlib.expression -> + Ppxlib.expression
    diff --git a/ppxlib/Ppxlib_traverse/Backends/index.html b/ppxlib/Ppxlib_traverse/Backends/index.html index e97022a..bac1e63 100644 --- a/ppxlib/Ppxlib_traverse/Backends/index.html +++ b/ppxlib/Ppxlib_traverse/Backends/index.html @@ -1,2 +1,2 @@ -Backends (ppxlib.Ppxlib_traverse.Backends)

    Module Ppxlib_traverse.Backends

    class reconstructors : object ... end
    class type what = object ... end
    val mapper : what
    val iterator : what
    val folder : what
    val fold_mapper : what
    exception Found
    val uses_var : string -> Ppxlib_ast.Ast.expression -> bool
    val mapper_with_context : what
    val string_of_lid : Ppxlib.Longident.t -> string
    val lifter : what
    val lift_mapper_with_context : what
    val all : what list
    \ No newline at end of file +Backends (ppxlib.Ppxlib_traverse.Backends)

    Module Ppxlib_traverse.Backends

    class reconstructors : object ... end
    class type what = object ... end
    val mapper : what
    val iterator : what
    val folder : what
    val fold_mapper : what
    exception Found
    val uses_var : string -> Ppxlib_ast.Ast.expression -> bool
    val mapper_with_context : what
    val string_of_lid : Ppxlib.Longident.t -> string
    val lifter : what
    val lift_mapper_with_context : what
    val all : what list
    diff --git a/ppxlib/Ppxlib_traverse/index.html b/ppxlib/Ppxlib_traverse/index.html index 16ada9a..49e3cee 100644 --- a/ppxlib/Ppxlib_traverse/index.html +++ b/ppxlib/Ppxlib_traverse/index.html @@ -1,56 +1,56 @@ -Ppxlib_traverse (ppxlib.Ppxlib_traverse)

    Module Ppxlib_traverse

    val alphabet : string array
    val vars_of_list : - get_loc:('a -> Ppxlib.location) -> - 'b Stdppx.List.t -> +Ppxlib_traverse (ppxlib.Ppxlib_traverse)

    Module Ppxlib_traverse

    val alphabet : string array
    val vars_of_list : + get_loc:('a -> Ppxlib.location) -> + 'a Stdppx.List.t -> string Ppxlib.loc list
    val pvar_of_var : string Ppxlib.loc -> Astlib.Ast_500.Parsetree.pattern
    val evars_of_vars : string Ppxlib.loc list -> Astlib.Ast_500.Parsetree.expression list
    val pvars_of_vars : string Ppxlib.loc list -> Astlib.Ast_500.Parsetree.pattern list
    val tvars_of_vars : string Ppxlib.loc list -> - Astlib.Ast_500.Parsetree.core_type list
    val methods_of_class_exn : Ppxlib.structure_item -> Ppxlib.class_field list
    module Backends : sig ... end
    type what = Backends.what
    val mapper_type : - what:what -> - loc:Ppxlib.Location.t -> + Astlib.Ast_500.Parsetree.core_type list
    val methods_of_class_exn : Ppxlib.structure_item -> Ppxlib.class_field list
    module Backends : sig ... end
    type what = Backends.what
    val constrained_mapper : - what:what -> - ?is_gadt:bool -> + what:what -> + ?is_gadt:bool -> Ppxlib.expression -> Ppxlib.type_declaration -> Astlib.Ast_500.Parsetree.expression
    val mangle_type_name : Ppxlib.longident -> string
    val type_expr_mapper : - what:what -> + what:what -> Ppxlib.core_type -> Astlib.Ast_500.Parsetree.expression
    val map_variables : - what:what -> + what:what -> string Ppxlib.loc list -> Ppxlib.core_type list -> (string Ppxlib.loc * Ppxlib.expression) list
    val gen_record : - what:what -> - loc:Ppxlib.Location.t -> + what:what -> + loc:Ppxlib.Location.t -> Ppxlib.label_declaration list -> Ppxlib.expression
    val is_constant_constructor : Ppxlib.constructor_declaration -> bool
    val erase_type_variables : Ppxlib.Ast_traverse.map
    val gen_variant : - what:what -> - loc:Ppxlib.Location.t -> + what:what -> + loc:Ppxlib.Location.t -> Ppxlib.constructor_declaration list -> - Ppxlib.expression
    val gen_mapper : what:what -> Ppxlib.type_declaration -> Ppxlib.expression
    val type_deps : + Ppxlib.expression
    val gen_mapper : what:what -> Ppxlib.type_declaration -> Ppxlib.expression
    val type_deps : Ppxlib.type_declaration list -> (Ppxlib.Longident.Map.key * int) list
    val filter_virtual_methods : - methods:Ppxlib_ast.Ast.class_field list -> - virtual_methods:Ppxlib.class_field list -> + methods:Ppxlib_ast.Ast.class_field list -> + virtual_methods:Ppxlib.class_field list -> Ppxlib.class_field list
    val gen_str : - what:what -> - loc:Ppxlib.Location.t -> - path:'a -> + what:what -> + loc:Ppxlib.Location.t -> + path:'a -> (Ppxlib.rec_flag * Ppxlib.type_declaration list) -> - Astlib.Ast_500.Parsetree.structure_item list
    \ No newline at end of file + Astlib.Ast_500.Parsetree.structure_item list
    diff --git a/ppxlib/Ppxlib_traverse_builtins/T/index.html b/ppxlib/Ppxlib_traverse_builtins/T/index.html index 6643be7..74aa0f3 100644 --- a/ppxlib/Ppxlib_traverse_builtins/T/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/T/index.html @@ -1,2 +1,2 @@ -T (ppxlib.Ppxlib_traverse_builtins.T)

    Module Ppxlib_traverse_builtins.T

    type 'a map = 'a -> 'a
    type 'a iter = 'a -> unit
    type ('a, 'acc) fold = 'a -> 'acc -> 'acc
    type ('a, 'acc) fold_map = 'a -> 'acc -> 'a * 'acc
    type ('ctx, 'a) map_with_context = 'ctx -> 'a -> 'a
    type ('a, 'res) lift = 'a -> 'res
    type ('ctx, 'a, 'res) lift_map_with_context = 'ctx -> 'a -> 'a * 'res
    \ No newline at end of file +T (ppxlib.Ppxlib_traverse_builtins.T)

    Module Ppxlib_traverse_builtins.T

    type 'a map = 'a -> 'a
    type 'a iter = 'a -> unit
    type ('a, 'acc) fold = 'a -> 'acc -> 'acc
    type ('a, 'acc) fold_map = 'a -> 'acc -> 'a * 'acc
    type ('ctx, 'a) map_with_context = 'ctx -> 'a -> 'a
    type ('a, 'res) lift = 'a -> 'res
    type ('ctx, 'a, 'res) lift_map_with_context = 'ctx -> 'a -> 'a * 'res
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-fold/index.html b/ppxlib/Ppxlib_traverse_builtins/class-fold/index.html index f7e18a7..180e776 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-fold/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-fold/index.html @@ -1,2 +1,2 @@ -fold (ppxlib.Ppxlib_traverse_builtins.fold)

    Class Ppxlib_traverse_builtins.fold

    method int : 'acc fold -> (int, 'acc0) T.fold
    method string : 'b -> (string, 'acc1) T.fold
    method bool : 'b -> (bool, 'acc2) T.fold
    method char : 'b -> (char, 'acc3) T.fold
    method option : 'b -> 'a. ('a, 'acc4) T.fold -> ('a option, 'acc4) T.fold
    method list : 'b -> 'a. ('a, 'acc5) T.fold -> ('a list, 'acc5) T.fold
    method array : 'b -> 'a. ('a, 'acc6) T.fold -> ('a array, 'acc6) T.fold
    \ No newline at end of file +fold (ppxlib.Ppxlib_traverse_builtins.fold)

    Class Ppxlib_traverse_builtins.fold

    method int : (int, 'acc) T.fold
    method string : (string, 'acc) T.fold
    method bool : (bool, 'acc) T.fold
    method char : (char, 'acc) T.fold
    method option : 'a. ('a, 'acc) T.fold -> ('a option, 'acc) T.fold
    method list : 'a. ('a, 'acc) T.fold -> ('a list, 'acc) T.fold
    method array : 'a. ('a, 'acc) T.fold -> ('a array, 'acc) T.fold
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-fold_map/index.html b/ppxlib/Ppxlib_traverse_builtins/class-fold_map/index.html index cfe8f84..93c74fc 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-fold_map/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-fold_map/index.html @@ -1,4 +1,2 @@ -fold_map (ppxlib.Ppxlib_traverse_builtins.fold_map)

    Class Ppxlib_traverse_builtins.fold_map

    method int : 'acc fold_map -> (int, 'acc0) T.fold_map
    method string : 'b -> (string, 'acc1) T.fold_map
    method bool : 'b -> (bool, 'acc2) T.fold_map
    method char : 'b -> (char, 'acc3) T.fold_map
    method option : 'b -> - 'a. ('a, 'acc4) T.fold_map -> - ('a option, 'acc4) T.fold_map
    method list : 'b -> 'a. ('a, 'acc5) T.fold_map -> ('a list, 'acc5) T.fold_map
    method array : 'b -> 'a. ('a, 'acc6) T.fold_map -> ('a array, 'acc6) T.fold_map
    \ No newline at end of file +fold_map (ppxlib.Ppxlib_traverse_builtins.fold_map)

    Class Ppxlib_traverse_builtins.fold_map

    method int : (int, 'acc) T.fold_map
    method string : (string, 'acc) T.fold_map
    method bool : (bool, 'acc) T.fold_map
    method char : (char, 'acc) T.fold_map
    method option : 'a. ('a, 'acc) T.fold_map -> ('a option, 'acc) T.fold_map
    method list : 'a. ('a, 'acc) T.fold_map -> ('a list, 'acc) T.fold_map
    method array : 'a. ('a, 'acc) T.fold_map -> ('a array, 'acc) T.fold_map
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-iter/index.html b/ppxlib/Ppxlib_traverse_builtins/class-iter/index.html index 926dba8..e51d914 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-iter/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-iter/index.html @@ -1,2 +1,2 @@ -iter (ppxlib.Ppxlib_traverse_builtins.iter)

    Class Ppxlib_traverse_builtins.iter

    method int : iter -> int T.iter
    method string : 'b -> string T.iter
    method bool : 'b -> bool T.iter
    method char : 'b -> char T.iter
    method option : 'b -> 'a. 'a T.iter -> 'a option T.iter
    method list : 'b -> 'a. 'a T.iter -> 'a list T.iter
    method array : 'b -> 'a. 'a T.iter -> 'a array T.iter
    \ No newline at end of file +iter (ppxlib.Ppxlib_traverse_builtins.iter)

    Class Ppxlib_traverse_builtins.iter

    method int : int T.iter
    method string : string T.iter
    method bool : bool T.iter
    method char : char T.iter
    method option : 'a. 'a T.iter -> 'a option T.iter
    method list : 'a. 'a T.iter -> 'a list T.iter
    method array : 'a. 'a T.iter -> 'a array T.iter
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-lift/index.html b/ppxlib/Ppxlib_traverse_builtins/class-lift/index.html index 419b06f..7dc0062 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-lift/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-lift/index.html @@ -1,4 +1,2 @@ -lift (ppxlib.Ppxlib_traverse_builtins.lift)

    Class Ppxlib_traverse_builtins.lift

    method virtual other : 'a. ('a, 'res0) T.lift
    method virtual int : (int, 'res1) T.lift
    method virtual string : (string, 'res2) T.lift
    method virtual bool : (bool, 'res3) T.lift
    method virtual char : (char, 'res4) T.lift
    method virtual array : 'a. ('a, 'res5) T.lift -> ('a array, 'res5) T.lift
    method virtual float : (float, 'res6) T.lift
    method virtual int32 : (int32, 'res7) T.lift
    method virtual int64 : (int64, 'res8) T.lift
    method virtual nativeint : (nativeint, 'res9) T.lift
    method virtual unit : (unit, 'res10) T.lift
    method virtual record : (string * 'res11) list -> 'res11
    method virtual constr : string -> 'res12 list -> 'res12
    method virtual tuple : 'res13 list -> 'res13
    method option : 'res lift -> - 'a. ('a, 'res14) T.lift -> - ('a option, 'res14) T.lift
    method list : 'b -> 'a. ('a, 'res15) T.lift -> ('a list, 'res15) T.lift
    \ No newline at end of file +lift (ppxlib.Ppxlib_traverse_builtins.lift)

    Class Ppxlib_traverse_builtins.lift

    method virtual other : 'a. ('a, 'res) T.lift
    method virtual int : (int, 'res) T.lift
    method virtual string : (string, 'res) T.lift
    method virtual bool : (bool, 'res) T.lift
    method virtual char : (char, 'res) T.lift
    method virtual array : 'a. ('a, 'res) T.lift -> ('a array, 'res) T.lift
    method virtual float : (float, 'res) T.lift
    method virtual int32 : (int32, 'res) T.lift
    method virtual int64 : (int64, 'res) T.lift
    method virtual nativeint : (nativeint, 'res) T.lift
    method virtual unit : (unit, 'res) T.lift
    method virtual record : (string * 'res) list -> 'res
    method virtual constr : string -> 'res list -> 'res
    method virtual tuple : 'res list -> 'res
    method option : 'a. ('a, 'res) T.lift -> ('a option, 'res) T.lift
    method list : 'a. ('a, 'res) T.lift -> ('a list, 'res) T.lift
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html b/ppxlib/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html index b6241fa..0689f82 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-lift_map_with_context/index.html @@ -1,7 +1,5 @@ -lift_map_with_context (ppxlib.Ppxlib_traverse_builtins.lift_map_with_context)

    Class Ppxlib_traverse_builtins.lift_map_with_context

    method virtual other : 'a. 'ctx0 -> 'a -> 'res0
    method virtual int : ('ctx1, int, 'res1) T.lift_map_with_context
    method virtual string : ('ctx2, string, 'res2) T.lift_map_with_context
    method virtual bool : ('ctx3, bool, 'res3) T.lift_map_with_context
    method virtual char : ('ctx4, char, 'res4) T.lift_map_with_context
    method virtual array : 'a. ('ctx5, 'a, 'res5) T.lift_map_with_context -> - ('ctx5, 'a array, 'res5) T.lift_map_with_context
    method virtual float : ('ctx6, float, 'res6) T.lift_map_with_context
    method virtual int32 : ('ctx7, int32, 'res7) T.lift_map_with_context
    method virtual int64 : ('ctx8, int64, 'res8) T.lift_map_with_context
    method virtual nativeint : ('ctx9, nativeint, 'res9) T.lift_map_with_context
    method virtual unit : ('ctx10, unit, 'res10) T.lift_map_with_context
    method virtual record : 'ctx11 -> (string * 'res11) list -> 'res11
    method virtual constr : 'ctx12 -> string -> 'res12 list -> 'res12
    method virtual tuple : 'ctx13 -> 'res13 list -> 'res13
    method option : ['ctx, 'res] lift_map_with_context -> - 'a. ('ctx14, 'a, 'res14) T.lift_map_with_context -> - ('ctx14, 'a option, 'res14) T.lift_map_with_context
    method list : 'b -> - 'a. ('ctx15, 'a, 'res15) T.lift_map_with_context -> - ('ctx15, 'a list, 'res15) T.lift_map_with_context
    \ No newline at end of file +lift_map_with_context (ppxlib.Ppxlib_traverse_builtins.lift_map_with_context)

    Class Ppxlib_traverse_builtins.lift_map_with_context

    method virtual other : 'a. 'ctx -> 'a -> 'res
    method virtual int : ('ctx, int, 'res) T.lift_map_with_context
    method virtual string : ('ctx, string, 'res) T.lift_map_with_context
    method virtual bool : ('ctx, bool, 'res) T.lift_map_with_context
    method virtual char : ('ctx, char, 'res) T.lift_map_with_context
    method virtual array : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a array, 'res) T.lift_map_with_context
    method virtual float : ('ctx, float, 'res) T.lift_map_with_context
    method virtual int32 : ('ctx, int32, 'res) T.lift_map_with_context
    method virtual int64 : ('ctx, int64, 'res) T.lift_map_with_context
    method virtual nativeint : ('ctx, nativeint, 'res) T.lift_map_with_context
    method virtual unit : ('ctx, unit, 'res) T.lift_map_with_context
    method virtual record : 'ctx -> (string * 'res) list -> 'res
    method virtual constr : 'ctx -> string -> 'res list -> 'res
    method virtual tuple : 'ctx -> 'res list -> 'res
    method option : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a option, 'res) T.lift_map_with_context
    method list : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> + ('ctx, 'a list, 'res) T.lift_map_with_context
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-map/index.html b/ppxlib/Ppxlib_traverse_builtins/class-map/index.html index 8750d62..5344f09 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-map/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-map/index.html @@ -1,2 +1,2 @@ -map (ppxlib.Ppxlib_traverse_builtins.map)

    Class Ppxlib_traverse_builtins.map

    method int : map -> int T.map
    method string : 'b -> string T.map
    method bool : 'b -> bool T.map
    method char : 'b -> char T.map
    method option : 'b -> 'a. 'a T.map -> 'a option T.map
    method list : 'b -> 'a. 'a T.map -> 'a list T.map
    method array : 'b -> 'a. 'a T.map -> 'a array T.map
    \ No newline at end of file +map (ppxlib.Ppxlib_traverse_builtins.map)

    Class Ppxlib_traverse_builtins.map

    method int : int T.map
    method string : string T.map
    method bool : bool T.map
    method char : char T.map
    method option : 'a. 'a T.map -> 'a option T.map
    method list : 'a. 'a T.map -> 'a list T.map
    method array : 'a. 'a T.map -> 'a array T.map
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-map_with_context/index.html b/ppxlib/Ppxlib_traverse_builtins/class-map_with_context/index.html index a47fb74..857b56b 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-map_with_context/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-map_with_context/index.html @@ -1,8 +1,5 @@ -map_with_context (ppxlib.Ppxlib_traverse_builtins.map_with_context)

    Class Ppxlib_traverse_builtins.map_with_context

    method int : 'ctx map_with_context -> ('ctx0, int) T.map_with_context
    method string : 'b -> ('ctx1, string) T.map_with_context
    method bool : 'b -> ('ctx2, bool) T.map_with_context
    method char : 'b -> ('ctx3, char) T.map_with_context
    method option : 'b -> - 'a. ('ctx4, 'a) T.map_with_context -> - ('ctx4, 'a option) T.map_with_context
    method list : 'b -> - 'a. ('ctx5, 'a) T.map_with_context -> - ('ctx5, 'a list) T.map_with_context
    method array : 'b -> - 'a. ('ctx6, 'a) T.map_with_context -> - ('ctx6, 'a array) T.map_with_context
    \ No newline at end of file +map_with_context (ppxlib.Ppxlib_traverse_builtins.map_with_context)

    Class Ppxlib_traverse_builtins.map_with_context

    method int : ('ctx, int) T.map_with_context
    method string : ('ctx, string) T.map_with_context
    method bool : ('ctx, bool) T.map_with_context
    method char : ('ctx, char) T.map_with_context
    method option : 'a. ('ctx, 'a) T.map_with_context -> + ('ctx, 'a option) T.map_with_context
    method list : 'a. ('ctx, 'a) T.map_with_context -> + ('ctx, 'a list) T.map_with_context
    method array : 'a. ('ctx, 'a) T.map_with_context -> + ('ctx, 'a array) T.map_with_context
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html b/ppxlib/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html index 6943f60..be2948c 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-type-std_lift_mappers_with_context/index.html @@ -1,5 +1,5 @@ -std_lift_mappers_with_context (ppxlib.Ppxlib_traverse_builtins.std_lift_mappers_with_context)

    Class type Ppxlib_traverse_builtins.std_lift_mappers_with_context

    method other : 'a. 'ctx -> 'a -> 'res
    method int : ('ctx, int, 'res) T.lift_map_with_context
    method string : ('ctx, string, 'res) T.lift_map_with_context
    method bool : ('ctx, bool, 'res) T.lift_map_with_context
    method char : ('ctx, char, 'res) T.lift_map_with_context
    method array : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> +std_lift_mappers_with_context (ppxlib.Ppxlib_traverse_builtins.std_lift_mappers_with_context)

    Class type Ppxlib_traverse_builtins.std_lift_mappers_with_context

    method other : 'a. 'ctx -> 'a -> 'res
    method int : ('ctx, int, 'res) T.lift_map_with_context
    method string : ('ctx, string, 'res) T.lift_map_with_context
    method bool : ('ctx, bool, 'res) T.lift_map_with_context
    method char : ('ctx, char, 'res) T.lift_map_with_context
    method array : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> ('ctx, 'a array, 'res) T.lift_map_with_context
    method record : 'ctx -> (string * 'res) list -> 'res
    method constr : 'ctx -> string -> 'res list -> 'res
    method tuple : 'ctx -> 'res list -> 'res
    method float : ('ctx, float, 'res) T.lift_map_with_context
    method int32 : ('ctx, int32, 'res) T.lift_map_with_context
    method int64 : ('ctx, int64, 'res) T.lift_map_with_context
    method nativeint : ('ctx, nativeint, 'res) T.lift_map_with_context
    method unit : ('ctx, unit, 'res) T.lift_map_with_context
    method option : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> ('ctx, 'a option, 'res) T.lift_map_with_context
    method list : 'a. ('ctx, 'a, 'res) T.lift_map_with_context -> - ('ctx, 'a list, 'res) T.lift_map_with_context
    \ No newline at end of file + ('ctx, 'a list, 'res) T.lift_map_with_context
    diff --git a/ppxlib/Ppxlib_traverse_builtins/class-type-std_lifters/index.html b/ppxlib/Ppxlib_traverse_builtins/class-type-std_lifters/index.html index c3d6a01..d6064f9 100644 --- a/ppxlib/Ppxlib_traverse_builtins/class-type-std_lifters/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/class-type-std_lifters/index.html @@ -1,2 +1,2 @@ -std_lifters (ppxlib.Ppxlib_traverse_builtins.std_lifters)

    Class type Ppxlib_traverse_builtins.std_lifters

    method other : 'a. ('a, 'res) T.lift
    method int : (int, 'res) T.lift
    method string : (string, 'res) T.lift
    method bool : (bool, 'res) T.lift
    method char : (char, 'res) T.lift
    method array : 'a. ('a, 'res) T.lift -> ('a array, 'res) T.lift
    method record : (string * 'res) list -> 'res
    method constr : string -> 'res list -> 'res
    method tuple : 'res list -> 'res
    method float : (float, 'res) T.lift
    method int32 : (int32, 'res) T.lift
    method int64 : (int64, 'res) T.lift
    method nativeint : (nativeint, 'res) T.lift
    method unit : (unit, 'res) T.lift
    method option : 'a. ('a, 'res) T.lift -> ('a option, 'res) T.lift
    method list : 'a. ('a, 'res) T.lift -> ('a list, 'res) T.lift
    \ No newline at end of file +std_lifters (ppxlib.Ppxlib_traverse_builtins.std_lifters)

    Class type Ppxlib_traverse_builtins.std_lifters

    method other : 'a. ('a, 'res) T.lift
    method int : (int, 'res) T.lift
    method string : (string, 'res) T.lift
    method bool : (bool, 'res) T.lift
    method char : (char, 'res) T.lift
    method array : 'a. ('a, 'res) T.lift -> ('a array, 'res) T.lift
    method record : (string * 'res) list -> 'res
    method constr : string -> 'res list -> 'res
    method tuple : 'res list -> 'res
    method float : (float, 'res) T.lift
    method int32 : (int32, 'res) T.lift
    method int64 : (int64, 'res) T.lift
    method nativeint : (nativeint, 'res) T.lift
    method unit : (unit, 'res) T.lift
    method option : 'a. ('a, 'res) T.lift -> ('a option, 'res) T.lift
    method list : 'a. ('a, 'res) T.lift -> ('a list, 'res) T.lift
    diff --git a/ppxlib/Ppxlib_traverse_builtins/index.html b/ppxlib/Ppxlib_traverse_builtins/index.html index 94a1955..3a451d2 100644 --- a/ppxlib/Ppxlib_traverse_builtins/index.html +++ b/ppxlib/Ppxlib_traverse_builtins/index.html @@ -1,2 +1,2 @@ -Ppxlib_traverse_builtins (ppxlib.Ppxlib_traverse_builtins)

    Module Ppxlib_traverse_builtins

    module T : sig ... end
    class map : object ... end
    class iter : object ... end
    class 'acc fold : object ... end
    class 'acc fold_map : object ... end
    class 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    class type 'res std_lifters = object ... end
    class type ['ctx, 'res] std_lift_mappers_with_context = object ... end
    \ No newline at end of file +Ppxlib_traverse_builtins (ppxlib.Ppxlib_traverse_builtins)

    Module Ppxlib_traverse_builtins

    module T : sig ... end
    class map : object ... end
    class iter : object ... end
    class 'acc fold : object ... end
    class 'acc fold_map : object ... end
    class 'ctx map_with_context : object ... end
    class virtual 'res lift : object ... end
    class virtual ['ctx, 'res] lift_map_with_context : object ... end
    class type 'res std_lifters = object ... end
    class type ['ctx, 'res] std_lift_mappers_with_context = object ... end
    diff --git a/ppxlib/Stdppx/Bool/index.html b/ppxlib/Stdppx/Bool/index.html index 3e96942..a8c1247 100644 --- a/ppxlib/Stdppx/Bool/index.html +++ b/ppxlib/Stdppx/Bool/index.html @@ -1,2 +1,2 @@ -Bool (ppxlib.Stdppx.Bool)

    Module Stdppx.Bool

    val to_string : bool -> string
    include Comparisons with type t := bool
    val compare : bool -> bool -> int
    val equal : bool -> bool -> bool
    val (=) : bool -> bool -> bool
    val (<) : bool -> bool -> bool
    val (>) : bool -> bool -> bool
    val (<>) : bool -> bool -> bool
    val (<=) : bool -> bool -> bool
    val (>=) : bool -> bool -> bool
    val min : bool -> bool -> bool
    val max : bool -> bool -> bool
    \ No newline at end of file +Bool (ppxlib.Stdppx.Bool)

    Module Stdppx.Bool

    val to_string : bool -> string
    include Comparisons with type t := bool
    val compare : bool -> bool -> int
    val equal : bool -> bool -> bool
    val (=) : bool -> bool -> bool
    val (<) : bool -> bool -> bool
    val (>) : bool -> bool -> bool
    val (<>) : bool -> bool -> bool
    val (<=) : bool -> bool -> bool
    val (>=) : bool -> bool -> bool
    val min : bool -> bool -> bool
    val max : bool -> bool -> bool
    diff --git a/ppxlib/Stdppx/Bytes/index.html b/ppxlib/Stdppx/Bytes/index.html index f0e04fe..9a08645 100644 --- a/ppxlib/Stdppx/Bytes/index.html +++ b/ppxlib/Stdppx/Bytes/index.html @@ -1,29 +1,26 @@ -Bytes (ppxlib.Stdppx.Bytes)

    Module Stdppx.Bytes

    include module type of struct include StdLabels.Bytes end
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    • raises Invalid_argument

      if n is not a valid index in s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> f:(int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> pos:int -> len:int -> bytes

    sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val extend : bytes -> left:int -> right:int -> bytes

    extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • raises Invalid_argument

      if the result length is negative or longer than Sys.max_string_length bytes.

    • since 4.05 in BytesLabels
    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val blit : - src:bytes -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val concat : sep:bytes -> bytes list -> bytes

    concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.05 in BytesLabels
    val iter : f:(char -> unit) -> bytes -> unit

    iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s - (length s - 1)); ().

    val iteri : f:(int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : f:(char -> char) -> bytes -> bytes

    map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : f:(int -> char -> char) -> bytes -> bytes

    mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : f:(char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from - s 0 c.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.05
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
    +Bytes (ppxlib.Stdppx.Bytes)

    Module Stdppx.Bytes

    include module type of struct include StdLabels.Bytes end
    val length : bytes -> int

    Return the length (number of bytes) of the argument.

    val get : bytes -> int -> char

    get s n returns the byte at index n in argument s.

    • raises Invalid_argument

      if n is not a valid index in s.

    val set : bytes -> int -> char -> unit

    set s n c modifies s in place, replacing the byte at index n with c.

    • raises Invalid_argument

      if n is not a valid index in s.

    val create : int -> bytes

    create n returns a new byte sequence of length n. The sequence is uninitialized and contains arbitrary bytes.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val make : int -> char -> bytes

    make n c returns a new byte sequence of length n, filled with the byte c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> f:(int -> char) -> bytes

    init n f returns a fresh byte sequence of length n, with character i initialized to the result of f i (in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val empty : bytes

    A byte sequence of size 0.

    val copy : bytes -> bytes

    Return a new byte sequence that contains the same bytes as the argument.

    val of_string : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    val to_string : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    val sub : bytes -> pos:int -> len:int -> bytes

    sub s ~pos ~len returns a new byte sequence of length len, containing the subsequence of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val extend : bytes -> left:int -> right:int -> bytes

    extend s ~left ~right returns a new byte sequence that contains the bytes of s, with left uninitialized bytes prepended and right uninitialized bytes appended to it. If left or right is negative, then bytes are removed (instead of appended) from the corresponding side of s.

    • raises Invalid_argument

      if the result length is negative or longer than Sys.max_string_length bytes.

    • since 4.05 in BytesLabels
    val fill : bytes -> pos:int -> len:int -> char -> unit

    fill s ~pos ~len c modifies s in place, replacing len characters with c, starting at pos.

    • raises Invalid_argument

      if pos and len do not designate a valid range of s.

    val blit : + src:bytes -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    blit ~src ~src_pos ~dst ~dst_pos ~len copies len bytes from byte sequence src, starting at index src_pos, to byte sequence dst, starting at index dst_pos. It works correctly even if src and dst are the same byte sequence, and the source and destination intervals overlap.

    • raises Invalid_argument

      if src_pos and len do not designate a valid range of src, or if dst_pos and len do not designate a valid range of dst.

    val concat : sep:bytes -> bytes list -> bytes

    concat ~sep sl concatenates the list of byte sequences sl, inserting the separator byte sequence sep between each, and returns the result as a new byte sequence.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : bytes -> bytes -> bytes

    cat s1 s2 concatenates s1 and s2 and returns the result as a new byte sequence.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.05 in BytesLabels
    val iter : f:(char -> unit) -> bytes -> unit

    iter ~f s applies function f in turn to all the bytes of s. It is equivalent to f (get s 0); f (get s 1); ...; f (get s (length s - 1)); ().

    val iteri : f:(int -> char -> unit) -> bytes -> unit

    Same as iter, but the function is applied to the index of the byte as first argument and the byte itself as second argument.

    val map : f:(char -> char) -> bytes -> bytes

    map ~f s applies function f in turn to all the bytes of s (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val mapi : f:(int -> char -> char) -> bytes -> bytes

    mapi ~f s calls f with each character of s and its index (in increasing index order) and stores the resulting bytes in a new sequence that is returned as the result.

    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> bytes -> 'acc

    fold_left f x s computes f (... (f (f x (get s 0)) (get s 1)) ...) (get s (n-1)), where n is the length of s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> bytes -> init:'acc -> 'acc

    fold_right f s x computes f (get s 0) (f (get s 1) ( ... (f (get s (n-1)) x) ...)), where n is the length of s.

    • since 4.13
    val for_all : f:(char -> bool) -> bytes -> bool

    for_all p s checks if all characters in s satisfy the predicate p.

    • since 4.13
    val exists : f:(char -> bool) -> bytes -> bool

    exists p s checks if at least one character of s satisfies the predicate p.

    • since 4.13
    val trim : bytes -> bytes

    Return a copy of the argument, without leading and trailing whitespace. The bytes regarded as whitespace are the ASCII characters ' ', '\012', '\n', '\r', and '\t'.

    val escaped : bytes -> bytes

    Return a copy of the argument, with special characters represented by escape sequences, following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash and double-quote.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val index : bytes -> char -> int

    index s c returns the index of the first occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val index_opt : bytes -> char -> int option

    index_opt s c returns the index of the first occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val rindex : bytes -> char -> int

    rindex s c returns the index of the last occurrence of byte c in s.

    • raises Not_found

      if c does not occur in s.

    val rindex_opt : bytes -> char -> int option

    rindex_opt s c returns the index of the last occurrence of byte c in s or None if c does not occur in s.

    • since 4.05
    val index_from : bytes -> int -> char -> int

    index_from s i c returns the index of the first occurrence of byte c in s after position i. index s c is equivalent to index_from s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • raises Not_found

      if c does not occur in s after position i.

    val index_from_opt : bytes -> int -> char -> int option

    index_from_opt s i c returns the index of the first occurrence of byte c in s after position i or None if c does not occur in s after position i. index_opt s c is equivalent to index_from_opt s 0 c.

    • raises Invalid_argument

      if i is not a valid position in s.

    • since 4.05
    val rindex_from : bytes -> int -> char -> int

    rindex_from s i c returns the index of the last occurrence of byte c in s before position i+1. rindex s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • raises Not_found

      if c does not occur in s before position i+1.

    val rindex_from_opt : bytes -> int -> char -> int option

    rindex_from_opt s i c returns the index of the last occurrence of byte c in s before position i+1 or None if c does not occur in s before position i+1. rindex_opt s c is equivalent to rindex_from s (length s - 1) c.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    • since 4.05
    val contains : bytes -> char -> bool

    contains s c tests if byte c appears in s.

    val contains_from : bytes -> int -> char -> bool

    contains_from s start c tests if byte c appears in s after position start. contains s c is equivalent to contains_from s 0 c.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : bytes -> int -> char -> bool

    rcontains_from s stop c tests if byte c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val uppercase_ascii : bytes -> bytes

    Return a copy of the argument, with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05
    val lowercase_ascii : bytes -> bytes

    Return a copy of the argument, with all uppercase letters translated to lowercase, using the US-ASCII character set.

    • since 4.05
    val capitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to uppercase, using the US-ASCII character set.

    • since 4.05
    val uncapitalize_ascii : bytes -> bytes

    Return a copy of the argument, with the first character set to lowercase, using the US-ASCII character set.

    • since 4.05
    type t = bytes

    An alias for the type of byte sequences.

    val compare : t -> t -> int

    The comparison function for byte sequences, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Bytes to be passed as argument to the functors Set.Make and Map.Make.

    val equal : t -> t -> bool

    The equality function for byte sequences.

    • since 4.05
    val starts_with : prefix:bytes -> bytes -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:bytes -> bytes -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13

    Unsafe conversions (for advanced users)

    This section describes unsafe, low-level conversion functions between bytes and string. They do not copy the internal data; used improperly, they can break the immutability invariant on strings provided by the -safe-string option. They are available for expert library authors, but for most purposes you should use the always-correct to_string and of_string instead.

    val unsafe_to_string : bytes -> string

    Unsafely convert a byte sequence into a string.

    To reason about the use of unsafe_to_string, it is convenient to consider an "ownership" discipline. A piece of code that manipulates some data "owns" it; there are several disjoint ownership modes, including:

    • Unique ownership: the data may be accessed and mutated
    • Shared ownership: the data has several owners, that may only access it, not mutate it.

    Unique ownership is linear: passing the data to another piece of code means giving up ownership (we cannot write the data again). A unique owner may decide to make the data shared (giving up mutation rights on it), but shared data may not become uniquely-owned again.

    unsafe_to_string s can only be used when the caller owns the byte sequence s -- either uniquely or as shared immutable data. The caller gives up ownership of s, and gains ownership of the returned string.

    There are two valid use-cases that respect this ownership discipline:

    1. Creating a string by initializing and mutating a byte sequence that is never changed after initialization is performed.

    let string_init len f : string =
       let s = Bytes.create len in
       for i = 0 to len - 1 do Bytes.set s i (f i) done;
       Bytes.unsafe_to_string s

    This function is safe because the byte sequence s will never be accessed or mutated after unsafe_to_string is called. The string_init code gives up ownership of s, and returns the ownership of the resulting string to its caller.

    Note that it would be unsafe if s was passed as an additional parameter to the function f as it could escape this way and be mutated in the future -- string_init would give up ownership of s to pass it to f, and could not call unsafe_to_string safely.

    We have provided the String.init, String.map and String.mapi functions to cover most cases of building new strings. You should prefer those over to_string or unsafe_to_string whenever applicable.

    2. Temporarily giving ownership of a byte sequence to a function that expects a uniquely owned string and returns ownership back, so that we can mutate the sequence again after the call ended.

    let bytes_length (s : bytes) =
       String.length (Bytes.unsafe_to_string s)

    In this use-case, we do not promise that s will never be mutated after the call to bytes_length s. The String.length function temporarily borrows unique ownership of the byte sequence (and sees it as a string), but returns this ownership back to the caller, which may assume that s is still a valid byte sequence after the call. Note that this is only correct because we know that String.length does not capture its argument -- it could escape by a side-channel such as a memoization combinator.

    The caller may not mutate s while the string is borrowed (it has temporarily given up ownership). This affects concurrent programs, but also higher-order functions: if String.length returned a closure to be called later, s should not be mutated until this closure is fully applied and returns ownership.

    val unsafe_of_string : string -> bytes

    Unsafely convert a shared string to a byte sequence that should not be mutated.

    The same ownership discipline that makes unsafe_to_string correct applies to unsafe_of_string: you may use it if you were the owner of the string value, and you will own the return bytes in the same mode.

    In practice, unique ownership of string values is extremely difficult to reason about correctly. You should always assume strings are shared, never uniquely owned.

    For example, string literals are implicitly shared by the compiler, so you never uniquely own them.

    let incorrect = Bytes.unsafe_of_string "hello"
    -let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : sep:char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) - (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Stdlib.Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
    +let s = Bytes.of_string "hello"

    The first declaration is incorrect, because the string literal "hello" could be shared by the compiler with other parts of the program, and mutating incorrect is a bug. You must always use the second version, which performs a copy and is thus correct.

    Assuming unique ownership of strings that are not string literals, but are (partly) built from string literals, is also incorrect. For example, mutating unsafe_of_string ("foo" ^ s) could mutate the shared string "foo" -- assuming a rope-like representation of strings. More generally, functions operating on strings will assume shared ownership, they do not preserve unique ownership. It is thus incorrect to assume unique ownership of the result of unsafe_of_string.

    The only case we have reasonable confidence is safe is if the produced bytes is shared -- used as an immutable byte sequence. This is possibly useful for incremental migration of low-level programs that manipulate immutable sequences of bytes (for example Marshal.from_bytes) and previously used the string type for this purpose.

    val split_on_char : sep:char -> bytes -> bytes list

    split_on_char sep s returns the list of all (possibly empty) subsequences of s that are delimited by the sep character.

    The function's output is specified by the following invariants:

    • The list is not empty.
    • Concatenating its elements using sep as a separator returns a byte sequence equal to the input (Bytes.concat (Bytes.make 1 sep) (Bytes.split_on_char sep s) = s).
    • No byte sequence in the result contains the sep character.
    • since 4.13

    Iterators

    val to_seq : t -> char Stdlib.Seq.t

    Iterate on the string, in increasing index order. Modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    Iterate on the string, in increasing order, yielding indices along chars

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    Create a string from the generator

    • since 4.07

    UTF codecs and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val set_utf_8_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_8_uchar b i u UTF-8 encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val set_utf_16be_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_16be_uchar b i u UTF-16BE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val set_utf_16le_uchar : t -> int -> Stdlib.Uchar.t -> int

    set_utf_16le_uchar b i u UTF-16LE encodes u at index i in b and returns the number of bytes n that were written starting at i. If n is 0 there was not enough space to encode u at i and b was left untouched. Otherwise a new character can be encoded at i + n.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary encoding/decoding of integers

    The functions in this section binary encode and decode integers to and from byte sequences.

    All following functions raise Invalid_argument if the space needed at index i to decode or encode the integer is not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are handled as follows:

    • Functions that decode signed (resp. unsigned) 8-bit or 16-bit integers represented by int values sign-extend (resp. zero-extend) their result.
    • Functions that encode 8-bit or 16-bit integers represented by int values truncate their input to their least significant bytes.
    val get_uint8 : bytes -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at byte index i.

    • since 4.08
    val get_int8 : bytes -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_ne : bytes -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_be : bytes -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_uint16_le : bytes -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_ne : bytes -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_be : bytes -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int16_le : bytes -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at byte index i.

    • since 4.08
    val get_int32_ne : bytes -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_be : bytes -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int32_le : bytes -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at byte index i.

    • since 4.08
    val get_int64_ne : bytes -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_be : bytes -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at byte index i.

    • since 4.08
    val get_int64_le : bytes -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at byte index i.

    • since 4.08
    val set_uint8 : bytes -> int -> int -> unit

    set_uint8 b i v sets b's unsigned 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_int8 : bytes -> int -> int -> unit

    set_int8 b i v sets b's signed 8-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_ne : bytes -> int -> int -> unit

    set_uint16_ne b i v sets b's native-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_be : bytes -> int -> int -> unit

    set_uint16_be b i v sets b's big-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_uint16_le : bytes -> int -> int -> unit

    set_uint16_le b i v sets b's little-endian unsigned 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_ne : bytes -> int -> int -> unit

    set_int16_ne b i v sets b's native-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_be : bytes -> int -> int -> unit

    set_int16_be b i v sets b's big-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int16_le : bytes -> int -> int -> unit

    set_int16_le b i v sets b's little-endian signed 16-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_ne : bytes -> int -> int32 -> unit

    set_int32_ne b i v sets b's native-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_be : bytes -> int -> int32 -> unit

    set_int32_be b i v sets b's big-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int32_le : bytes -> int -> int32 -> unit

    set_int32_le b i v sets b's little-endian 32-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_ne : bytes -> int -> int64 -> unit

    set_int64_ne b i v sets b's native-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_be : bytes -> int -> int64 -> unit

    set_int64_be b i v sets b's big-endian 64-bit integer starting at byte index i to v.

    • since 4.08
    val set_int64_le : bytes -> int -> int64 -> unit

    set_int64_le b i v sets b's little-endian 64-bit integer starting at byte index i to v.

    • since 4.08

    Byte sequences and concurrency safety

    Care must be taken when concurrently accessing byte sequences from multiple domains: accessing a byte sequence will never crash a program, but unsynchronized accesses might yield surprising (non-sequentially-consistent) results.

    Atomicity

    Every byte sequence operation that accesses more than one byte is not atomic. This includes iteration and scanning.

    For example, consider the following program:

    let size = 100_000_000
     let b = Bytes.make size  ' '
     let update b f ()  =
       Bytes.iteri (fun i x -> Bytes.set b i (Char.chr (f (Char.code x)))) b
     let d1 = Domain.spawn (update b (fun x -> x + 1))
     let d2 = Domain.spawn (update b (fun x -> 2 * x + 1))
    -let () = Domain.join d1; Domain.join d2

    the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

    After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

    Mixed-size accesses

    Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

    let b = Bytes.make 10 '\000'
    -let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    val sub_string : bytes -> pos:int -> len:int -> string
    val blit_string : - src:string -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit
    \ No newline at end of file +let () = Domain.join d1; Domain.join d2

    the bytes sequence b may contain a non-deterministic mixture of '!', 'A', 'B', and 'C' values.

    After executing this code, each byte of the sequence b is either '!', 'A', 'B', or 'C'. If atomicity is required, then the user must implement their own synchronization (for example, using Mutex.t).

    Data races

    If two domains only access disjoint parts of a byte sequence, then the observed behaviour is the equivalent to some sequential interleaving of the operations from the two domains.

    A data race is said to occur when two domains access the same byte without synchronization and at least one of the accesses is a write. In the absence of data races, the observed behaviour is equivalent to some sequential interleaving of the operations from different domains.

    Whenever possible, data races should be avoided by using synchronization to mediate the accesses to the elements of the sequence.

    Indeed, in the presence of data races, programs will not crash but the observed behaviour may not be equivalent to any sequential interleaving of operations from different domains. Nevertheless, even in the presence of data races, a read operation will return the value of some prior write to that location.

    Mixed-size accesses

    Another subtle point is that if a data race involves mixed-size writes and reads to the same location, the order in which those writes and reads are observed by domains is not specified. For instance, the following code write sequentially a 32-bit integer and a char to the same index

    let b = Bytes.make 10 '\000'
    +let d1 = Domain.spawn (fun () -> Bytes.set_int32_ne b 0 100; b.[0] <- 'd' )

    In this situation, a domain that observes the write of 'd' to b.0 is not guaranteed to also observe the write to indices 1, 2, or 3.

    val sub_string : bytes -> pos:int -> len:int -> string
    val blit_string : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit
    diff --git a/ppxlib/Stdppx/Char/index.html b/ppxlib/Stdppx/Char/index.html index 31fc5de..ae6487c 100644 --- a/ppxlib/Stdppx/Char/index.html +++ b/ppxlib/Stdppx/Char/index.html @@ -1,2 +1,2 @@ -Char (ppxlib.Stdppx.Char)

    Module Stdppx.Char

    include module type of struct include Stdlib.Char end
    val code : char -> int

    Return the ASCII code of the argument.

    val chr : int -> char

    Return the character with the given ASCII code.

    • raises Invalid_argument

      if the argument is outside the range 0--255.

    val escaped : char -> string

    Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03
    type t = char

    An alias for the type of characters.

    val seeded_hash : int -> t -> int

    A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    include Comparisons with type t := char
    val compare : char -> char -> int
    val equal : char -> char -> bool
    val (=) : char -> char -> bool
    val (<) : char -> char -> bool
    val (>) : char -> char -> bool
    val (<>) : char -> char -> bool
    val (<=) : char -> char -> bool
    val (>=) : char -> char -> bool
    val min : char -> char -> char
    val max : char -> char -> char
    \ No newline at end of file +Char (ppxlib.Stdppx.Char)

    Module Stdppx.Char

    include module type of struct include Stdlib.Char end
    val code : char -> int

    Return the ASCII code of the argument.

    val chr : int -> char

    Return the character with the given ASCII code.

    • raises Invalid_argument

      if the argument is outside the range 0--255.

    val escaped : char -> string

    Return a string representing the given character, with special characters escaped following the lexical conventions of OCaml. All characters outside the ASCII printable range (32..126) are escaped, as well as backslash, double-quote, and single-quote.

    val lowercase_ascii : char -> char

    Convert the given character to its equivalent lowercase character, using the US-ASCII character set.

    • since 4.03
    val uppercase_ascii : char -> char

    Convert the given character to its equivalent uppercase character, using the US-ASCII character set.

    • since 4.03
    type t = char

    An alias for the type of characters.

    val seeded_hash : int -> t -> int

    A seeded hash function for characters, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for characters, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    include Comparisons with type t := char
    val compare : char -> char -> int
    val equal : char -> char -> bool
    val (=) : char -> char -> bool
    val (<) : char -> char -> bool
    val (>) : char -> char -> bool
    val (<>) : char -> char -> bool
    val (<=) : char -> char -> bool
    val (>=) : char -> char -> bool
    val min : char -> char -> char
    val max : char -> char -> char
    diff --git a/ppxlib/Stdppx/Either/index.html b/ppxlib/Stdppx/Either/index.html index 95e3349..d230199 100644 --- a/ppxlib/Stdppx/Either/index.html +++ b/ppxlib/Stdppx/Either/index.html @@ -1,2 +1,2 @@ -Either (ppxlib.Stdppx.Either)

    Module Stdppx.Either

    type ('a, 'b) t =
    1. | Left of 'a
    2. | Right of 'b
    \ No newline at end of file +Either (ppxlib.Stdppx.Either)

    Module Stdppx.Either

    type ('a, 'b) t =
    1. | Left of 'a
    2. | Right of 'b
    diff --git a/ppxlib/Stdppx/Exn/index.html b/ppxlib/Stdppx/Exn/index.html index da50d0d..a867085 100644 --- a/ppxlib/Stdppx/Exn/index.html +++ b/ppxlib/Stdppx/Exn/index.html @@ -1,2 +1,2 @@ -Exn (ppxlib.Stdppx.Exn)

    Module Stdppx.Exn

    val protectx : 'a -> f:('b -> 'c) -> finally:('d -> 'e) -> 'f
    \ No newline at end of file +Exn (ppxlib.Stdppx.Exn)

    Module Stdppx.Exn

    val protectx : 'a -> f:('a -> 'b) -> finally:('a -> 'c) -> 'b
    diff --git a/ppxlib/Stdppx/Float/index.html b/ppxlib/Stdppx/Float/index.html index 56a3650..d0b60fe 100644 --- a/ppxlib/Stdppx/Float/index.html +++ b/ppxlib/Stdppx/Float/index.html @@ -1,2 +1,2 @@ -Float (ppxlib.Stdppx.Float)

    Module Stdppx.Float

    val to_string : float -> string
    include Comparisons with type t := float
    val compare : float -> float -> int
    val equal : float -> float -> bool
    val (=) : float -> float -> bool
    val (<) : float -> float -> bool
    val (>) : float -> float -> bool
    val (<>) : float -> float -> bool
    val (<=) : float -> float -> bool
    val (>=) : float -> float -> bool
    val min : float -> float -> float
    val max : float -> float -> float
    \ No newline at end of file +Float (ppxlib.Stdppx.Float)

    Module Stdppx.Float

    val to_string : float -> string
    include Comparisons with type t := float
    val compare : float -> float -> int
    val equal : float -> float -> bool
    val (=) : float -> float -> bool
    val (<) : float -> float -> bool
    val (>) : float -> float -> bool
    val (<>) : float -> float -> bool
    val (<=) : float -> float -> bool
    val (>=) : float -> float -> bool
    val min : float -> float -> float
    val max : float -> float -> float
    diff --git a/ppxlib/Stdppx/Fn/index.html b/ppxlib/Stdppx/Fn/index.html index ac469c0..6429a8a 100644 --- a/ppxlib/Stdppx/Fn/index.html +++ b/ppxlib/Stdppx/Fn/index.html @@ -1,2 +1,2 @@ -Fn (ppxlib.Stdppx.Fn)

    Module Stdppx.Fn

    val id : 'a -> 'b
    \ No newline at end of file +Fn (ppxlib.Stdppx.Fn)

    Module Stdppx.Fn

    val id : 'a -> 'a
    diff --git a/ppxlib/Stdppx/Hashtbl/index.html b/ppxlib/Stdppx/Hashtbl/index.html index 3462d61..3438b85 100644 --- a/ppxlib/Stdppx/Hashtbl/index.html +++ b/ppxlib/Stdppx/Hashtbl/index.html @@ -1,80 +1,80 @@ -Hashtbl (ppxlib.Stdppx.Hashtbl)

    Module Stdppx.Hashtbl

    include module type of struct include Stdlib.Hashtbl end

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

    Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

    Other comments for iter apply as well.

    • since 4.03
    val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

    Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = Stdlib.Hashtbl.statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

    module IntHash =
    -  struct
    -    type t = int
    -    let equal i j = i=j
    -    let hash i = i land max_int
    -  end
    +Hashtbl (ppxlib.Stdppx.Hashtbl)

    Module Stdppx.Hashtbl

    include module type of struct include Stdlib.Hashtbl end

    Unsynchronized accesses

    Unsynchronized accesses to a hash table may lead to an invalid hash table state. Thus, concurrent accesses to a hash tables must be synchronized (for instance with a Mutex.t).

    Generic interface

    type (!'a, !'b) t = ('a, 'b) Stdlib.Hashtbl.t

    The type of hash tables from type 'a to type 'b.

    val create : ?random:bool -> int -> ('a, 'b) t

    Hashtbl.create n creates a new, empty hash table, with initial size n. For best results, n should be on the order of the expected number of elements that will be in the table. The table grows as needed, so n is just an initial guess.

    The optional ~random parameter (a boolean) controls whether the internal organization of the hash table is randomized at each execution of Hashtbl.create or deterministic over all executions.

    A hash table that is created with ~random set to false uses a fixed hash function (hash) to distribute keys among buckets. As a consequence, collisions between keys happen deterministically. In Web-facing applications or other security-sensitive applications, the deterministic collision patterns can be exploited by a malicious user to create a denial-of-service attack: the attacker sends input crafted to create many collisions in the table, slowing the application down.

    A hash table that is created with ~random set to true uses the seeded hash function seeded_hash with a seed that is randomly chosen at hash table creation time. In effect, the hash function used is randomly selected among 2^{30} different hash functions. All these hash functions have different collision patterns, rendering ineffective the denial-of-service attack described above. However, because of randomization, enumerating all elements of the hash table using fold or iter is no longer deterministic: elements are enumerated in different orders at different runs of the program.

    If no ~random parameter is given, hash tables are created in non-random mode by default. This default can be changed either programmatically by calling randomize or by setting the R flag in the OCAMLRUNPARAM environment variable.

    • before 4.00

      the ~random parameter was not present and all hash tables were created in non-randomized mode.

    val clear : ('a, 'b) t -> unit

    Empty a hash table. Use reset instead of clear to shrink the size of the bucket table to its initial size.

    val reset : ('a, 'b) t -> unit

    Empty a hash table and shrink the size of the bucket table to its initial size.

    • since 4.00
    val copy : ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable.

    val find : ('a, 'b) t -> 'a -> 'b

    Hashtbl.find tbl x returns the current binding of x in tbl, or raises Not_found if no such binding exists.

    val find_all : ('a, 'b) t -> 'a -> 'b list

    Hashtbl.find_all tbl x returns the list of all data associated with x in tbl. The current binding is returned first, then the previous bindings, in reverse order of introduction in the table.

    val mem : ('a, 'b) t -> 'a -> bool

    Hashtbl.mem tbl x checks if x is bound in tbl.

    val remove : ('a, 'b) t -> 'a -> unit

    Hashtbl.remove tbl x removes the current binding of x in tbl, restoring the previous binding if it exists. It does nothing if x is not bound in tbl.

    val replace : ('a, 'b) t -> 'a -> 'b -> unit

    Hashtbl.replace tbl key data replaces the current binding of key in tbl by a binding of key to data. If key is unbound in tbl, a binding of key to data is added to tbl. This is functionally equivalent to remove tbl key followed by add tbl key data.

    val iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

    Hashtbl.iter f tbl applies f to all bindings in table tbl. f receives the key as first argument, and the associated value as second argument. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

    Hashtbl.filter_map_inplace f tbl applies f to all bindings in table tbl and update each binding depending on the result of f. If f returns None, the binding is discarded. If it returns Some new_val, the binding is update to associate the key to new_val.

    Other comments for iter apply as well.

    • since 4.03
    val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

    Hashtbl.fold f tbl init computes (f kN dN ... (f k1 d1 init)...), where k1 ... kN are the keys of all bindings in tbl, and d1 ... dN are the associated values. Each binding is presented exactly once to f.

    The order in which the bindings are passed to f is unspecified. However, if the table contains several bindings for the same key, they are passed to f in reverse order of introduction, that is, the most recent binding is passed first.

    If the hash table was created in non-randomized mode, the order in which the bindings are enumerated is reproducible between successive runs of the program, and even between minor versions of OCaml. For randomized hash tables, the order of enumeration is entirely random.

    The behavior is not specified if the hash table is modified by f during the iteration.

    val length : ('a, 'b) t -> int

    Hashtbl.length tbl returns the number of bindings in tbl. It takes constant time. Multiple bindings are counted once each, so Hashtbl.length gives the number of times Hashtbl.iter calls its first argument.

    val randomize : unit -> unit

    After a call to Hashtbl.randomize(), hash tables are created in randomized mode by default: create returns randomized hash tables, unless the ~random:false optional parameter is given. The same effect can be achieved by setting the R parameter in the OCAMLRUNPARAM environment variable.

    It is recommended that applications or Web frameworks that need to protect themselves against the denial-of-service attack described in create call Hashtbl.randomize() at initialization time before any domains are created.

    Note that once Hashtbl.randomize() was called, there is no way to revert to the non-randomized default behavior of create. This is intentional. Non-randomized hash tables can still be created using Hashtbl.create ~random:false.

    • since 4.00
    val is_randomized : unit -> bool

    Return true if the tables are currently created in randomized mode by default, false otherwise.

    • since 4.03
    val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t

    Return a copy of the given hashtable. Unlike copy, rebuild h re-hashes all the (key, value) entries of the original table h. The returned hash table is randomized if h was randomized, or the optional random parameter is true, or if the default is to create randomized hash tables; see create for more information.

    rebuild can safely be used to import a hash table built by an old version of the Hashtbl module, then marshaled to persistent storage. After unmarshaling, apply rebuild to produce a hash table for the current version of the Hashtbl module.

    • since 4.12
    type statistics = Stdlib.Hashtbl.statistics = {
    1. num_bindings : int;
      (*

      Number of bindings present in the table. Same value as returned by length.

      *)
    2. num_buckets : int;
      (*

      Number of buckets in the table.

      *)
    3. max_bucket_length : int;
      (*

      Maximal number of bindings per bucket.

      *)
    4. bucket_histogram : int array;
      (*

      Histogram of bucket sizes. This array histo has length max_bucket_length + 1. The value of histo.(i) is the number of buckets whose size is i.

      *)
    }
    • since 4.00
    val stats : ('a, 'b) t -> statistics

    Hashtbl.stats tbl returns statistics about the table tbl: number of buckets, size of the biggest bucket, distribution of buckets by size.

    • since 4.00

    Hash tables and Sequences

    val to_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t

    Iterate on the whole table. The order in which the bindings appear in the sequence is unspecified. However, if the table contains several bindings for the same key, they appear in reversed order of introduction, that is, the most recent binding appears first.

    The behavior is not specified if the hash table is modified during the iteration.

    • since 4.07
    val to_seq_keys : ('a, _) t -> 'a Stdlib.Seq.t

    Same as Seq.map fst (to_seq m)

    • since 4.07
    val to_seq_values : (_, 'b) t -> 'b Stdlib.Seq.t

    Same as Seq.map snd (to_seq m)

    • since 4.07
    val add_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

    Add the given bindings to the table, using add

    • since 4.07
    val replace_seq : ('a, 'b) t -> ('a * 'b) Stdlib.Seq.t -> unit

    Add the given bindings to the table, using replace

    • since 4.07
    val of_seq : ('a * 'b) Stdlib.Seq.t -> ('a, 'b) t

    Build a table from the given bindings. The bindings are added in the same order they appear in the sequence, using replace_seq, which means that if two pairs have the same key, only the latest one will appear in the table.

    • since 4.07

    Functorial interface

    The functorial interface allows the use of specific comparison and hash functions, either for performance/security concerns, or because keys are not hashable/comparable with the polymorphic builtins.

    For instance, one might want to specialize a table for integer keys:

      module IntHash =
    +    struct
    +      type t = int
    +      let equal i j = i=j
    +      let hash i = i land max_int
    +    end
     
    -module IntHashtbl = Hashtbl.Make(IntHash)
    +  module IntHashtbl = Hashtbl.Make(IntHash)
     
    -let h = IntHashtbl.create 17 in
    -IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a - IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = Stdlib.Hashtbl.HashedType

    The input signature of the functor Make.

    module type S = Stdlib.Hashtbl.S

    The output signature of the functor Make.

    module Make = Stdlib.Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    module type SeededHashedType = Stdlib.Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    module type SeededS = Stdlib.Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    module MakeSeeded = Stdlib.Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

    (* 0...99 *)
    -let seq = Seq.ints 0 |> Seq.take 100
    +  let h = IntHashtbl.create 17 in
    +  IntHashtbl.add h 12 "hello"

    This creates a new module IntHashtbl, with a new type 'a IntHashtbl.t of tables from int to 'a. In this example, h contains string values so its type is string IntHashtbl.t.

    Note that the new type 'a IntHashtbl.t is not compatible with the type ('a,'b) Hashtbl.t of the generic interface. For example, Hashtbl.length h would not type-check, you must use IntHashtbl.length.

    module type HashedType = Stdlib.Hashtbl.HashedType

    The input signature of the functor Make.

    module type S = Stdlib.Hashtbl.S

    The output signature of the functor Make.

    module Make = Stdlib.Hashtbl.Make

    Functor building an implementation of the hashtable structure. The functor Hashtbl.Make returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the hashing and equality functions specified in the functor argument H instead of generic equality and hashing. Since the hash function is not seeded, the create operation of the result structure always returns non-randomized hash tables.

    module type SeededHashedType = Stdlib.Hashtbl.SeededHashedType

    The input signature of the functor MakeSeeded.

    module type SeededS = Stdlib.Hashtbl.SeededS

    The output signature of the functor MakeSeeded.

    module MakeSeeded = Stdlib.Hashtbl.MakeSeeded

    Functor building an implementation of the hashtable structure. The functor Hashtbl.MakeSeeded returns a structure containing a type key of keys and a type 'a t of hash tables associating data of type 'a to keys of type key. The operations perform similarly to those of the generic interface, but use the seeded hashing and equality functions specified in the functor argument H instead of generic equality and hashing. The create operation of the result structure supports the ~random optional parameter and returns randomized hash tables if ~random:true is passed or if randomization is globally on (see Hashtbl.randomize).

    The polymorphic hash functions

    val hash : 'a -> int

    Hashtbl.hash x associates a nonnegative integer to any value of any type. It is guaranteed that if x = y or Stdlib.compare x y = 0, then hash x = hash y. Moreover, hash always terminates, even on cyclic structures.

    val seeded_hash : int -> 'a -> int

    A variant of hash that is further parameterized by an integer seed.

    • since 4.00
    val hash_param : int -> int -> 'a -> int

    Hashtbl.hash_param meaningful total x computes a hash value for x, with the same properties as for hash. The two extra integer parameters meaningful and total give more precise control over hashing. Hashing performs a breadth-first, left-to-right traversal of the structure x, stopping after meaningful meaningful nodes were encountered, or total nodes (meaningful or not) were encountered. If total as specified by the user exceeds a certain value, currently 256, then it is capped to that value. Meaningful nodes are: integers; floating-point numbers; strings; characters; booleans; and constant constructors. Larger values of meaningful and total means that more nodes are taken into account to compute the final hash value, and therefore collisions are less likely to happen. However, hashing takes longer. The parameters meaningful and total govern the tradeoff between accuracy and speed. As default choices, hash and seeded_hash take meaningful = 10 and total = 100.

    val seeded_hash_param : int -> int -> int -> 'a -> int

    A variant of hash_param that is further parameterized by an integer seed. Usage: Hashtbl.seeded_hash_param meaningful total seed x.

    • since 4.00

    Examples

    Basic Example

      (* 0...99 *)
    +  let seq = Seq.ints 0 |> Seq.take 100
     
    -(* build from Seq.t *)
    -# let tbl =
    -    seq
    -    |> Seq.map (fun x -> x, string_of_int x)
    -    |> Hashtbl.of_seq
    -val tbl : (int, string) Hashtbl.t = <abstr>
    +  (* build from Seq.t *)
    +  # let tbl =
    +      seq
    +      |> Seq.map (fun x -> x, string_of_int x)
    +      |> Hashtbl.of_seq
    +  val tbl : (int, string) Hashtbl.t = <abstr>
     
    -# Hashtbl.length tbl
    -- : int = 100
    +  # Hashtbl.length tbl
    +  - : int = 100
     
    -# Hashtbl.find_opt tbl 32
    -- : string option = Some "32"
    +  # Hashtbl.find_opt tbl 32
    +  - : string option = Some "32"
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = None
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = None
     
    -# Hashtbl.replace tbl 166 "one six six"
    -- : unit = ()
    +  # Hashtbl.replace tbl 166 "one six six"
    +  - : unit = ()
     
    -# Hashtbl.find_opt tbl 166
    -- : string option = Some "one six six"
    +  # Hashtbl.find_opt tbl 166
    +  - : string option = Some "one six six"
     
    -# Hashtbl.length tbl
    -- : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

    # module Char_tbl = Hashtbl.Make(struct
    -    type t = char
    -    let equal = Char.equal
    -    let hash = Hashtbl.hash
    -  end)
    +  # Hashtbl.length tbl
    +  - : int = 101

    Counting Elements

    Given a sequence of elements (here, a Seq.t), we want to count how many times each distinct element occurs in the sequence. A simple way to do this, assuming the elements are comparable and hashable, is to use a hash table that maps elements to their number of occurrences.

    Here we illustrate that principle using a sequence of (ascii) characters (type char). We use a custom Char_tbl specialized for char.

      # module Char_tbl = Hashtbl.Make(struct
    +      type t = char
    +      let equal = Char.equal
    +      let hash = Hashtbl.hash
    +    end)
     
    -(*  count distinct occurrences of chars in [seq] *)
    -# let count_chars (seq : char Seq.t) : _ list =
    -    let counts = Char_tbl.create 16 in
    -    Seq.iter
    -      (fun c ->
    -        let count_c =
    -          Char_tbl.find_opt counts c
    -          |> Option.value ~default:0
    -        in
    -        Char_tbl.replace counts c (count_c + 1))
    -      seq;
    -    (* turn into a list *)
    -    Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    -      |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    -val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
    +  (*  count distinct occurrences of chars in [seq] *)
    +  # let count_chars (seq : char Seq.t) : _ list =
    +      let counts = Char_tbl.create 16 in
    +      Seq.iter
    +        (fun c ->
    +          let count_c =
    +            Char_tbl.find_opt counts c
    +            |> Option.value ~default:0
    +          in
    +          Char_tbl.replace counts c (count_c + 1))
    +        seq;
    +      (* turn into a list *)
    +      Char_tbl.fold (fun c n l -> (c,n) :: l) counts []
    +        |> List.sort (fun (c1,_)(c2,_) -> Char.compare c1 c2)
    +  val count_chars : Char_tbl.key Seq.t -> (Char.t * int) list = <fun>
     
    -(* basic seq from a string *)
    -# let seq = String.to_seq "hello world, and all the camels in it!"
    -val seq : char Seq.t = <fun>
    +  (* basic seq from a string *)
    +  # let seq = String.to_seq "hello world, and all the camels in it!"
    +  val seq : char Seq.t = <fun>
     
    -# count_chars seq
    -- : (Char.t * int) list =
    -[(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    - ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    - ('s', 1); ('t', 2); ('w', 1)]
    +  # count_chars seq
    +  - : (Char.t * int) list =
    +  [(' ', 7); ('!', 1); (',', 1); ('a', 3); ('c', 1); ('d', 2); ('e', 3);
    +   ('h', 2); ('i', 2); ('l', 6); ('m', 1); ('n', 2); ('o', 2); ('r', 1);
    +   ('s', 1); ('t', 2); ('w', 1)]
     
    -(* "abcabcabc..." *)
    -# let seq2 =
    -    Seq.cycle (String.to_seq "abc") |> Seq.take 31
    -val seq2 : char Seq.t = <fun>
    +  (* "abcabcabc..." *)
    +  # let seq2 =
    +      Seq.cycle (String.to_seq "abc") |> Seq.take 31
    +  val seq2 : char Seq.t = <fun>
     
    -# String.of_seq seq2
    -- : String.t = "abcabcabcabcabcabcabcabcabcabca"
    +  # String.of_seq seq2
    +  - : String.t = "abcabcabcabcabcabcabcabcabcabca"
     
    -# count_chars seq2
    -- : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)]
    val set : ('a, 'b) t -> key:'c -> data:'d -> unit
    val add : ('a, 'b) t -> key:'c -> data:'d -> (unit, exn) result
    val add_exn : ('a, 'b) t -> key:'c -> data:'d -> unit
    val find_opt : ('a, 'b) t -> 'c -> 'd option
    val find_or_add : ('a, 'b) t -> 'c -> default:(unit -> 'd) -> 'e
    val add_alist : ('a, 'b) t -> ('c * 'd) list -> (unit, 'e) result
    val of_alist : ?size:int -> ('a * 'b) list -> (('c, 'd) t, 'e) result
    val of_alist_exn : ?size:int -> ('a * 'b) list -> ('a, 'b) t
    \ No newline at end of file + # count_chars seq2 + - : (Char.t * int) list = [('a', 11); ('b', 10); ('c', 10)] +
    val set : ('a, 'b) t -> key:'a -> data:'b -> unit
    val add : ('a, 'b) t -> key:'a -> data:'b -> (unit, exn) result
    val add_exn : ('a, 'b) t -> key:'a -> data:'b -> unit
    val find_opt : ('a, 'b) t -> 'a -> 'b option
    val find_or_add : ('a, 'b) t -> 'a -> default:(unit -> 'b) -> 'b
    val add_alist : ('a, 'b) t -> ('a * 'b) list -> (unit, 'a) result
    val of_alist : ?size:int -> ('a * 'b) list -> (('a, 'b) t, 'a) result
    val of_alist_exn : ?size:int -> ('a * 'b) list -> ('a, 'b) t
    diff --git a/ppxlib/Stdppx/In_channel/index.html b/ppxlib/Stdppx/In_channel/index.html index 79827ff..c9e9a8f 100644 --- a/ppxlib/Stdppx/In_channel/index.html +++ b/ppxlib/Stdppx/In_channel/index.html @@ -1,2 +1,2 @@ -In_channel (ppxlib.Stdppx.In_channel)

    Module Stdppx.In_channel

    val create : ?binary:bool -> string -> in_channel
    val with_file : ?binary:bool -> string -> f:(in_channel -> 'a) -> 'b
    val input_all : in_channel -> string
    val read_all : string -> string
    \ No newline at end of file +In_channel (ppxlib.Stdppx.In_channel)

    Module Stdppx.In_channel

    val create : ?binary:bool -> string -> in_channel
    val with_file : ?binary:bool -> string -> f:(in_channel -> 'a) -> 'a
    val input_all : in_channel -> string
    val read_all : string -> string
    diff --git a/ppxlib/Stdppx/Int/index.html b/ppxlib/Stdppx/Int/index.html index 45ef861..d1d7f8c 100644 --- a/ppxlib/Stdppx/Int/index.html +++ b/ppxlib/Stdppx/Int/index.html @@ -1,2 +1,2 @@ -Int (ppxlib.Stdppx.Int)

    Module Stdppx.Int

    val max_int : int
    val to_string : int -> string
    include Comparisons with type t := int
    val compare : int -> int -> int
    val equal : int -> int -> bool
    val (=) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val min : int -> int -> int
    val max : int -> int -> int
    \ No newline at end of file +Int (ppxlib.Stdppx.Int)

    Module Stdppx.Int

    val max_int : int
    val to_string : int -> string
    include Comparisons with type t := int
    val compare : int -> int -> int
    val equal : int -> int -> bool
    val (=) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val min : int -> int -> int
    val max : int -> int -> int
    diff --git a/ppxlib/Stdppx/List/index.html b/ppxlib/Stdppx/List/index.html index 91caf6e..d6e6ae5 100644 --- a/ppxlib/Stdppx/List/index.html +++ b/ppxlib/Stdppx/List/index.html @@ -1,16 +1,16 @@ -List (ppxlib.Stdppx.List)

    Module Stdppx.List

    include module type of struct include StdLabels.List end
    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> len:int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    • raises Invalid_argument

      if n is negative.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • raises Invalid_argument

      if n is negative.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : f:('a -> 'b) -> 'a list -> 'b list

    rev_map ~f l gives the same result as rev (map f l), but is more efficient.

    val fold_left_map : - f:('acc -> 'a -> 'acc * 'b) -> - init:'acc -> +List (ppxlib.Stdppx.List)

    Module Stdppx.List

    include module type of struct include StdLabels.List end
    type 'a t = 'a list =
    1. | []
    2. | :: of 'a * 'a list

    An alias for the type of lists.

    val length : 'a list -> int

    Return the length (number of elements) of the given list.

    val compare_lengths : 'a list -> 'b list -> int

    Compare the lengths of two lists. compare_lengths l1 l2 is equivalent to compare (length l1) (length l2), except that the computation stops after reaching the end of the shortest list.

    • since 4.05
    val compare_length_with : 'a list -> len:int -> int

    Compare the length of a list to an integer. compare_length_with l len is equivalent to compare (length l) len, except that the computation stops after at most len iterations on the list.

    • since 4.05
    val cons : 'a -> 'a list -> 'a list

    cons x xs is x :: xs

    • since 4.05
    val hd : 'a list -> 'a

    Return the first element of the given list.

    • raises Failure

      if the list is empty.

    val tl : 'a list -> 'a list

    Return the given list without its first element.

    • raises Failure

      if the list is empty.

    val nth : 'a list -> int -> 'a

    Return the n-th element of the given list. The first element (head of the list) is at position 0.

    • raises Failure

      if the list is too short.

    • raises Invalid_argument

      if n is negative.

    val nth_opt : 'a list -> int -> 'a option

    Return the n-th element of the given list. The first element (head of the list) is at position 0. Return None if the list is too short.

    • raises Invalid_argument

      if n is negative.

    • since 4.05
    val rev : 'a list -> 'a list

    List reversal.

    val rev_append : 'a list -> 'a list -> 'a list

    rev_append l1 l2 reverses l1 and concatenates it with l2. This is equivalent to (rev l1) @ l2.

    val flatten : 'a list list -> 'a list

    Same as concat. Not tail-recursive (length of the argument + length of the longest sub-list).

    Comparison

    val equal : eq:('a -> 'a -> bool) -> 'a list -> 'a list -> bool

    equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

    Note: the eq function may be called even if the lists have different length. If you know your equality function is costly, you may want to check compare_lengths first.

    • since 4.12
    val compare : cmp:('a -> 'a -> int) -> 'a list -> 'a list -> int

    compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

    • a1 :: l1 is smaller than a2 :: l2 (negative result) if a1 is smaller than a2, or if they are equal (0 result) and l1 is smaller than l2
    • the empty list [] is strictly smaller than non-empty lists

    Note: the cmp function will be called even if the lists have different lengths.

    • since 4.12

    Iterators

    val iteri : f:(int -> 'a -> unit) -> 'a list -> unit

    Same as iter, but the function is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.00
    val rev_map : f:('a -> 'b) -> 'a list -> 'b list

    rev_map ~f l gives the same result as rev (map f l), but is more efficient.

    val fold_left_map : + f:('acc -> 'a -> 'acc * 'b) -> + init:'acc -> 'a list -> - 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    Iterators on two lists

    val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : - f:('acc -> 'a -> 'b -> 'acc) -> - init:'acc -> + 'acc * 'b list

    fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.

    • since 4.11
    val fold_left : f:('acc -> 'a -> 'acc) -> init:'acc -> 'a list -> 'acc

    fold_left ~f ~init [b1; ...; bn] is f (... (f (f init b1) b2) ...) bn.

    Iterators on two lists

    val iter2 : f:('a -> 'b -> unit) -> 'a list -> 'b list -> unit

    iter2 ~f [a1; ...; an] [b1; ...; bn] calls in turn f a1 b1; ...; f an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val rev_map2 : f:('a -> 'b -> 'c) -> 'a list -> 'b list -> 'c list

    rev_map2 ~f l1 l2 gives the same result as rev (map2 f l1 l2), but is more efficient.

    val fold_left2 : + f:('acc -> 'a -> 'b -> 'acc) -> + init:'acc -> 'a list -> 'b list -> - 'acc

    fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    List scanning

    val for_all : f:('a -> bool) -> 'a list -> bool

    for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : f:('a -> bool) -> 'a list -> bool

    exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> set:'a list -> bool

    mem a ~set is true if and only if a is equal to an element of set.

    val memq : 'a -> set:'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : f:('a -> bool) -> 'a list -> 'a

    find ~f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : f:('a -> bool) -> 'a list -> 'a option

    find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : f:('a -> bool) -> 'a list -> int option

    find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : f:('a -> bool) -> 'a list -> 'a list

    filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : f:('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

    partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> map:('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> map:('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    Lists of pairs

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.03

    Lists and Sequences

    val to_seq : 'a list -> 'a Stdlib.Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Stdlib.Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    include sig ... end
    val merge : [> `not_tail_recursive ]
    val remove_assoc : [> `not_tail_recursive ]
    val remove_assq : [> `not_tail_recursive ]
    val rev_mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
    val fold_right2 : + 'acc

    fold_left2 ~f ~init [a1; ...; an] [b1; ...; bn] is f (... (f (f init a1 b1) a2 b2) ...) an bn.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    List scanning

    val for_all : f:('a -> bool) -> 'a list -> bool

    for_all ~f [a1; ...; an] checks if all elements of the list satisfy the predicate f. That is, it returns (f a1) && (f a2) && ... && (f an) for a non-empty list and true if the list is empty.

    val exists : f:('a -> bool) -> 'a list -> bool

    exists ~f [a1; ...; an] checks if at least one element of the list satisfies the predicate f. That is, it returns (f a1) || (f a2) || ... || (f an) for a non-empty list and false if the list is empty.

    val for_all2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as for_all, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val exists2 : f:('a -> 'b -> bool) -> 'a list -> 'b list -> bool

    Same as exists, but for a two-argument predicate.

    • raises Invalid_argument

      if the two lists are determined to have different lengths.

    val mem : 'a -> set:'a list -> bool

    mem a ~set is true if and only if a is equal to an element of set.

    val memq : 'a -> set:'a list -> bool

    Same as mem, but uses physical equality instead of structural equality to compare list elements.

    List searching

    val find : f:('a -> bool) -> 'a list -> 'a

    find ~f l returns the first element of the list l that satisfies the predicate f.

    • raises Not_found

      if there is no value that satisfies f in the list l.

    val find_opt : f:('a -> bool) -> 'a list -> 'a option

    find ~f l returns the first element of the list l that satisfies the predicate f. Returns None if there is no value that satisfies f in the list l.

    • since 4.05
    val find_index : f:('a -> bool) -> 'a list -> int option

    find_index ~f xs returns Some i, where i is the index of the first element of the list xs that satisfies f x, if there is such an element.

    It returns None if there is no such element.

    • since 5.1
    val find_mapi : f:(int -> 'a -> 'b option) -> 'a list -> 'b option

    Same as find_map, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 5.1
    val filter : f:('a -> bool) -> 'a list -> 'a list

    filter ~f l returns all the elements of the list l that satisfy the predicate f. The order of the elements in the input list is preserved.

    val find_all : f:('a -> bool) -> 'a list -> 'a list

    find_all is another name for filter.

    val filteri : f:(int -> 'a -> bool) -> 'a list -> 'a list

    Same as filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

    • since 4.11
    val partition : f:('a -> bool) -> 'a list -> 'a list * 'a list

    partition ~f l returns a pair of lists (l1, l2), where l1 is the list of all the elements of l that satisfy the predicate f, and l2 is the list of all the elements of l that do not satisfy f. The order of the elements in the input list is preserved.

    Association lists

    val assoc : 'a -> ('a * 'b) list -> 'b

    assoc a l returns the value associated with key a in the list of pairs l. That is, assoc a [ ...; (a,b); ...] = b if (a,b) is the leftmost binding of a in list l.

    • raises Not_found

      if there is no value associated with a in the list l.

    val assq : 'a -> ('a * 'b) list -> 'b

    Same as assoc, but uses physical equality instead of structural equality to compare keys.

    val assq_opt : 'a -> ('a * 'b) list -> 'b option

    Same as assoc_opt, but uses physical equality instead of structural equality to compare keys.

    • since 4.05
    val mem_assoc : 'a -> map:('a * 'b) list -> bool

    Same as assoc, but simply return true if a binding exists, and false if no bindings exist for the given key.

    val mem_assq : 'a -> map:('a * 'b) list -> bool

    Same as mem_assoc, but uses physical equality instead of structural equality to compare keys.

    Lists of pairs

    Sorting

    val sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Sort a list in increasing order according to a comparison function. The comparison function must return 0 if its arguments compare as equal, a positive integer if the first is greater, and a negative integer if the first is smaller (see Array.sort for a complete specification). For example, Stdlib.compare is a suitable comparison function. The resulting list is sorted in increasing order. sort is guaranteed to run in constant heap space (in addition to the size of the result list) and logarithmic stack space.

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val stable_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but the sorting algorithm is guaranteed to be stable (i.e. elements that compare equal are kept in their original order).

    The current implementation uses Merge Sort. It runs in constant heap space and logarithmic stack space.

    val fast_sort : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort or stable_sort, whichever is faster on typical input.

    val sort_uniq : cmp:('a -> 'a -> int) -> 'a list -> 'a list

    Same as sort, but also remove duplicates.

    • since 4.03

    Lists and Sequences

    val to_seq : 'a list -> 'a Stdlib.Seq.t

    Iterate on the list.

    • since 4.07
    val of_seq : 'a Stdlib.Seq.t -> 'a list

    Create a list from a sequence.

    • since 4.07
    include sig ... end
    val merge : [> `not_tail_recursive ]
    val remove_assoc : [> `not_tail_recursive ]
    val remove_assq : [> `not_tail_recursive ]
    val rev_mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
    val fold_right2 : 'a list -> 'b list -> - init:'c -> - f:('d -> 'e -> 'f -> 'g) -> - 'h
    val map : 'a list -> f:('a -> 'b) -> 'c list
    val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'c list
    val fold_right : 'a list -> init:'b -> f:('c -> 'd -> 'e) -> 'f
    val append : 'a list -> 'b list -> 'b list
    val concat : 'a list list -> 'b t
    val rev_combine : 'a list -> 'b list -> ('c * 'd) t
    val combine : 'a list -> 'b list -> ('a * 'b) list
    val split : ('a * 'b) list -> 'c t * 'd t
    val map2 : 'a list -> 'b list -> f:('c -> 'd -> 'e) -> 'f list
    val partition_map : ('a -> ('b, 'c) Either.t) -> 'd t -> 'e list * 'f list
    val init : len:int -> f:(int -> 'a) -> 'a list
    val is_empty : 'a t -> bool
    val rev_filter_opt : 'a option list -> 'b t
    val filter_opt : 'a option list -> 'b list
    val filter_map : 'a list -> f:('a -> 'b option) -> 'b t
    val concat_map : 'a list -> f:('a -> 'b list) -> 'b t
    val find_map : 'a t -> f:('b -> 'c option) -> 'd option
    val find_map_exn : 'a t -> f:('a -> 'b option) -> 'c
    val last : 'a t -> 'b option
    val split_while : 'a t -> f:('a -> bool) -> 'a list * 'a t
    val find_a_dup : 'elt t -> compare:('elt0 -> 'elt0 -> int) -> 'elt option
    val assoc_opt : 'a -> ('b * 'c) list -> 'd option
    val iter : 'a list -> f:('a -> unit) -> unit
    \ No newline at end of file + init:'c -> + f:('a -> 'b -> 'c -> 'c) -> + 'c
    val map : 'a list -> f:('a -> 'b) -> 'b list
    val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b list
    val fold_right : 'a list -> init:'b -> f:('a -> 'b -> 'b) -> 'b
    val append : 'a list -> 'a list -> 'a list
    val concat : 'a list list -> 'a t
    val rev_combine : 'a list -> 'b list -> ('a * 'b) t
    val combine : 'a list -> 'b list -> ('a * 'b) list
    val split : ('a * 'b) list -> 'a t * 'b t
    val map2 : 'a list -> 'b list -> f:('a -> 'b -> 'c) -> 'c list
    val partition_map : ('a -> ('b, 'c) Either.t) -> 'a t -> 'b list * 'c list
    val init : len:int -> f:(int -> 'a) -> 'a list
    val is_empty : 'a t -> bool
    val rev_filter_opt : 'a option list -> 'a t
    val filter_opt : 'a option list -> 'a list
    val filter_map : 'a list -> f:('a -> 'b option) -> 'b t
    val concat_map : 'a list -> f:('a -> 'b list) -> 'b t
    val find_map : 'a t -> f:('a -> 'b option) -> 'b option
    val find_map_exn : 'a t -> f:('a -> 'b option) -> 'b
    val last : 'a t -> 'a option
    val split_while : 'a t -> f:('a -> bool) -> 'a list * 'a t
    val find_a_dup : 'elt t -> compare:('elt -> 'elt -> int) -> 'elt option
    val assoc_opt : 'a -> ('a * 'b) list -> 'b option
    val iter : 'a list -> f:('a -> unit) -> unit
    diff --git a/ppxlib/Stdppx/NonEmptyList/index.html b/ppxlib/Stdppx/NonEmptyList/index.html index b7c967c..aad8897 100644 --- a/ppxlib/Stdppx/NonEmptyList/index.html +++ b/ppxlib/Stdppx/NonEmptyList/index.html @@ -1,2 +1,2 @@ -NonEmptyList (ppxlib.Stdppx.NonEmptyList)

    Module Stdppx.NonEmptyList

    type 'a t = 'a * 'a list
    val (@) : ('a * 'b list) -> ('c * 'd list) -> 'e * 'b list
    val hd : ('a * 'b) -> 'a
    val to_list : ('a * 'b list) -> 'b list
    val map : f:('a -> 'b) -> ('c * 'a list) -> 'd * 'b list
    \ No newline at end of file +NonEmptyList (ppxlib.Stdppx.NonEmptyList)

    Module Stdppx.NonEmptyList

    type 'a t = 'a * 'a list
    val (@) : ('a * 'b list) -> ('b * 'b list) -> 'a * 'b list
    val hd : ('a * 'b) -> 'a
    val to_list : ('a * 'a list) -> 'a list
    val map : f:('a -> 'b) -> ('a * 'a list) -> 'b * 'b list
    diff --git a/ppxlib/Stdppx/Option/index.html b/ppxlib/Stdppx/Option/index.html index 7d3b55d..4f2056d 100644 --- a/ppxlib/Stdppx/Option/index.html +++ b/ppxlib/Stdppx/Option/index.html @@ -1,2 +1,2 @@ -Option (ppxlib.Stdppx.Option)

    Module Stdppx.Option

    val is_some : 'a option -> bool
    val iter : 'a option -> f:('b -> unit) -> unit
    val map : 'a option -> f:('b -> 'c) -> 'd option
    val value : 'a option -> default:'b -> 'c
    val to_list : 'a option -> 'b list
    \ No newline at end of file +Option (ppxlib.Stdppx.Option)

    Module Stdppx.Option

    val is_some : 'a option -> bool
    val iter : 'a option -> f:('a -> unit) -> unit
    val map : 'a option -> f:('a -> 'b) -> 'b option
    val value : 'a option -> default:'a -> 'a
    val to_list : 'a option -> 'a list
    diff --git a/ppxlib/Stdppx/Out_channel/index.html b/ppxlib/Stdppx/Out_channel/index.html index 13318da..9e87d3c 100644 --- a/ppxlib/Stdppx/Out_channel/index.html +++ b/ppxlib/Stdppx/Out_channel/index.html @@ -1,15 +1,15 @@ -Out_channel (ppxlib.Stdppx.Out_channel)

    Module Stdppx.Out_channel

    val create : - ?binary:bool -> - ?append:bool -> - ?fail_if_exists:bool -> - ?perm:int -> +Out_channel (ppxlib.Stdppx.Out_channel)

    Module Stdppx.Out_channel

    val create : + ?binary:bool -> + ?append:bool -> + ?fail_if_exists:bool -> + ?perm:int -> string -> out_channel
    val with_file : - ?binary:bool -> - ?append:bool -> - ?fail_if_exists:bool -> - ?perm:int -> + ?binary:bool -> + ?append:bool -> + ?fail_if_exists:bool -> + ?perm:int -> string -> - f:(out_channel -> 'a) -> - 'b
    val write_all : string -> data:string -> unit
    \ No newline at end of file + f:(out_channel -> 'a) -> + 'a
    val write_all : string -> data:string -> unit
    diff --git a/ppxlib/Stdppx/Poly/index.html b/ppxlib/Stdppx/Poly/index.html index b41ec6b..35f0b08 100644 --- a/ppxlib/Stdppx/Poly/index.html +++ b/ppxlib/Stdppx/Poly/index.html @@ -1,2 +1,2 @@ -Poly (ppxlib.Stdppx.Poly)

    Module Stdppx.Poly

    val compare : 'a -> 'a -> int
    val equal : 'a -> 'a -> bool
    val (=) : 'a -> 'a -> bool
    val (<) : 'a -> 'a -> bool
    val (>) : 'a -> 'a -> bool
    val (<>) : 'a -> 'a -> bool
    val (<=) : 'a -> 'a -> bool
    val (>=) : 'a -> 'a -> bool
    val min : 'a -> 'a -> 'a
    val max : 'a -> 'a -> 'a
    \ No newline at end of file +Poly (ppxlib.Stdppx.Poly)

    Module Stdppx.Poly

    val compare : 'a -> 'a -> int
    val equal : 'a -> 'a -> bool
    val (=) : 'a -> 'a -> bool
    val (<) : 'a -> 'a -> bool
    val (>) : 'a -> 'a -> bool
    val (<>) : 'a -> 'a -> bool
    val (<=) : 'a -> 'a -> bool
    val (>=) : 'a -> 'a -> bool
    val min : 'a -> 'a -> 'a
    val max : 'a -> 'a -> 'a
    diff --git a/ppxlib/Stdppx/Result/index.html b/ppxlib/Stdppx/Result/index.html index f360332..71881ec 100644 --- a/ppxlib/Stdppx/Result/index.html +++ b/ppxlib/Stdppx/Result/index.html @@ -1,2 +1,2 @@ -Result (ppxlib.Stdppx.Result)

    Module Stdppx.Result

    val bind : ('a, 'b) result -> f:('c -> ('d, 'e) result) -> ('d, 'e) result
    val map : ('a, 'b) result -> f:('c -> 'd) -> ('e, 'f) result
    val map_error : ('a, 'b) result -> f:('c -> 'd) -> ('e, 'f) result
    val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
    val (>>|) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
    val handle_error : ('a, 'b) result -> f:('c -> 'd) -> 'e
    \ No newline at end of file +Result (ppxlib.Stdppx.Result)

    Module Stdppx.Result

    val bind : ('a, 'b) result -> f:('a -> ('c, 'b) result) -> ('c, 'b) result
    val map : ('a, 'b) result -> f:('a -> 'c) -> ('c, 'b) result
    val map_error : ('a, 'b) result -> f:('a -> 'c) -> ('c, 'b) result
    val (>>=) : ('a, 'b) result -> ('a -> ('c, 'b) result) -> ('c, 'b) result
    val (>>|) : ('a, 'b) result -> ('a -> 'c) -> ('c, 'b) result
    val handle_error : ('a, 'b) result -> f:('b -> 'a) -> 'a
    diff --git a/ppxlib/Stdppx/String/Map/index.html b/ppxlib/Stdppx/String/Map/index.html index 5a499b4..4db7053 100644 --- a/ppxlib/Stdppx/String/Map/index.html +++ b/ppxlib/Stdppx/String/Map/index.html @@ -1,6 +1,6 @@ -Map (ppxlib.Stdppx.String.Map)

    Module String.Map

    include sig ... end
    type !'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : +Map (ppxlib.Stdppx.String.Map)

    Module String.Map

    include sig ... end
    type !'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    val find_opt : key -> 'a t -> 'b option
    \ No newline at end of file + 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    val find_opt : key -> 'a t -> 'a option
    diff --git a/ppxlib/Stdppx/String/Set/index.html b/ppxlib/Stdppx/String/Set/index.html index a2a2f2f..646cd4b 100644 --- a/ppxlib/Stdppx/String/Set/index.html +++ b/ppxlib/Stdppx/String/Set/index.html @@ -1,2 +1,2 @@ -Set (ppxlib.Stdppx.String.Set)

    Module String.Set

    type t
    val empty : t
    val add : elt -> t -> t
    val singleton : elt -> t
    val remove : elt -> t -> t
    val union : t -> t -> t
    val inter : t -> t -> t
    val disjoint : t -> t -> bool
    val diff : t -> t -> t
    val cardinal : t -> int
    val elements : t -> elt list
    val min_elt : t -> elt
    val min_elt_opt : t -> elt option
    val max_elt : t -> elt
    val max_elt_opt : t -> elt option
    val choose : t -> elt
    val choose_opt : t -> elt option
    val find : elt -> t -> elt
    val find_opt : elt -> t -> elt option
    val find_first : (elt -> bool) -> t -> elt
    val find_first_opt : (elt -> bool) -> t -> elt option
    val find_last : (elt -> bool) -> t -> elt
    val find_last_opt : (elt -> bool) -> t -> elt option
    val iter : (elt -> unit) -> t -> unit
    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc
    val map : (elt -> elt) -> t -> t
    val filter : (elt -> bool) -> t -> t
    val filter_map : (elt -> elt option) -> t -> t
    val partition : (elt -> bool) -> t -> t * t
    val split : elt -> t -> t * bool * t
    val is_empty : t -> bool
    val mem : elt -> t -> bool
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val subset : t -> t -> bool
    val for_all : (elt -> bool) -> t -> bool
    val exists : (elt -> bool) -> t -> bool
    val to_list : t -> elt list
    val of_list : elt list -> t
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t
    val to_seq : t -> elt Stdlib.Seq.t
    val to_rev_seq : t -> elt Stdlib.Seq.t
    val add_seq : elt Stdlib.Seq.t -> t -> t
    val of_seq : elt Stdlib.Seq.t -> t
    \ No newline at end of file +Set (ppxlib.Stdppx.String.Set)

    Module String.Set

    type t
    val empty : t
    val add : elt -> t -> t
    val singleton : elt -> t
    val remove : elt -> t -> t
    val union : t -> t -> t
    val inter : t -> t -> t
    val disjoint : t -> t -> bool
    val diff : t -> t -> t
    val cardinal : t -> int
    val elements : t -> elt list
    val min_elt : t -> elt
    val min_elt_opt : t -> elt option
    val max_elt : t -> elt
    val max_elt_opt : t -> elt option
    val choose : t -> elt
    val choose_opt : t -> elt option
    val find : elt -> t -> elt
    val find_opt : elt -> t -> elt option
    val find_first : (elt -> bool) -> t -> elt
    val find_first_opt : (elt -> bool) -> t -> elt option
    val find_last : (elt -> bool) -> t -> elt
    val find_last_opt : (elt -> bool) -> t -> elt option
    val iter : (elt -> unit) -> t -> unit
    val fold : (elt -> 'acc -> 'acc) -> t -> 'acc -> 'acc
    val map : (elt -> elt) -> t -> t
    val filter : (elt -> bool) -> t -> t
    val filter_map : (elt -> elt option) -> t -> t
    val partition : (elt -> bool) -> t -> t * t
    val split : elt -> t -> t * bool * t
    val is_empty : t -> bool
    val mem : elt -> t -> bool
    val equal : t -> t -> bool
    val compare : t -> t -> int
    val subset : t -> t -> bool
    val for_all : (elt -> bool) -> t -> bool
    val exists : (elt -> bool) -> t -> bool
    val to_list : t -> elt list
    val of_list : elt list -> t
    val to_seq_from : elt -> t -> elt Stdlib.Seq.t
    val to_seq : t -> elt Stdlib.Seq.t
    val to_rev_seq : t -> elt Stdlib.Seq.t
    val add_seq : elt Stdlib.Seq.t -> t -> t
    val of_seq : elt Stdlib.Seq.t -> t
    diff --git a/ppxlib/Stdppx/String/index.html b/ppxlib/Stdppx/String/index.html index e1cf4f1..789236f 100644 --- a/ppxlib/Stdppx/String/index.html +++ b/ppxlib/Stdppx/String/index.html @@ -1,8 +1,8 @@ -String (ppxlib.Stdppx.String)

    Module Stdppx.String

    include module type of struct include StdLabels.String end

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> f:(int -> char) -> string

    init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : - src:string -> - src_pos:int -> - dst:bytes -> - dst_pos:int -> - len:int -> - unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : sep:string -> string list -> string

    concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13

    Predicates and comparisons

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> pos:int -> len:int -> string

    sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    Transforming

    val map : f:(char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : f:(int -> char -> char) -> string -> string

    mapi ~f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05

    Traversing

    val iter : f:(char -> unit) -> string -> unit

    iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : f:(int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    Strings and Sequences

    val to_seq : t -> char Stdlib.Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    val is_empty : t -> bool
    val prefix : string -> int -> string
    val suffix : string -> int -> string
    val drop_prefix : string -> int -> string
    val drop_suffix : string -> int -> string
    val is_prefix : string -> prefix:string -> bool
    val is_suffix : string -> suffix:string -> bool
    val exists : string -> f:(char -> bool) -> bool
    val for_all : string -> f:(char -> bool) -> bool
    val index_opt : string -> char -> int option
    val rindex_opt : string -> char -> int option
    val index_from_opt : string -> int -> char -> int option
    val rindex_from_opt : string -> int -> char -> int option
    val lsplit2 : string -> on:char -> (string * string) option
    val capitalize_ascii : string -> string
    val lowercase_ascii : string -> string
    val uncapitalize_ascii : string -> string
    val split_on_char : string -> sep:char -> string list
    include Comparisons with type t := string
    val compare : string -> string -> int
    val equal : string -> string -> bool
    val (=) : string -> string -> bool
    val (<) : string -> string -> bool
    val (>) : string -> string -> bool
    val (<>) : string -> string -> bool
    val (<=) : string -> string -> bool
    val (>=) : string -> string -> bool
    val min : string -> string -> string
    val max : string -> string -> string
    module Map : sig ... end
    module Set : sig ... end
    \ No newline at end of file +String (ppxlib.Stdppx.String)

    Module Stdppx.String

    include module type of struct include StdLabels.String end

    Strings

    type t = string

    The type for strings.

    val make : int -> char -> string

    make n c is a string of length n with each index holding the character c.

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    val init : int -> f:(int -> char) -> string

    init n ~f is a string of length n with index i holding the character f i (called in increasing index order).

    • raises Invalid_argument

      if n < 0 or n > Sys.max_string_length.

    • since 4.02
    val empty : string

    The empty string.

    • since 4.13
    val length : string -> int

    length s is the length (number of bytes/characters) of s.

    val get : string -> int -> char

    get s i is the character at index i in s. This is the same as writing s.[i].

    • raises Invalid_argument

      if i not an index of s.

    val of_bytes : bytes -> string

    Return a new string that contains the same bytes as the given byte sequence.

    • since 4.13
    val to_bytes : string -> bytes

    Return a new byte sequence that contains the same bytes as the given string.

    • since 4.13
    val blit : + src:string -> + src_pos:int -> + dst:bytes -> + dst_pos:int -> + len:int -> + unit

    Same as Bytes.blit_string which should be preferred.

    Concatenating

    Note. The Stdlib.(^) binary operator concatenates two strings.

    val concat : sep:string -> string list -> string

    concat ~sep ss concatenates the list of strings ss, inserting the separator string sep between each.

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val cat : string -> string -> string

    cat s1 s2 concatenates s1 and s2 (s1 ^ s2).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    • since 4.13

    Predicates and comparisons

    val starts_with : prefix:string -> string -> bool

    starts_with ~prefix s is true if and only if s starts with prefix.

    • since 4.13
    val ends_with : suffix:string -> string -> bool

    ends_with ~suffix s is true if and only if s ends with suffix.

    • since 4.13
    val contains_from : string -> int -> char -> bool

    contains_from s start c is true if and only if c appears in s after position start.

    • raises Invalid_argument

      if start is not a valid position in s.

    val rcontains_from : string -> int -> char -> bool

    rcontains_from s stop c is true if and only if c appears in s before position stop+1.

    • raises Invalid_argument

      if stop < 0 or stop+1 is not a valid position in s.

    val contains : string -> char -> bool

    contains s c is String.contains_from s 0 c.

    Extracting substrings

    val sub : string -> pos:int -> len:int -> string

    sub s ~pos ~len is a string of length len, containing the substring of s that starts at position pos and has length len.

    • raises Invalid_argument

      if pos and len do not designate a valid substring of s.

    Transforming

    val map : f:(char -> char) -> string -> string

    map f s is the string resulting from applying f to all the characters of s in increasing order.

    • since 4.00
    val mapi : f:(int -> char -> char) -> string -> string

    mapi ~f s is like map but the index of the character is also passed to f.

    • since 4.02
    val fold_left : f:('acc -> char -> 'acc) -> init:'acc -> string -> 'acc

    fold_left f x s computes f (... (f (f x s.[0]) s.[1]) ...) s.[n-1], where n is the length of the string s.

    • since 4.13
    val fold_right : f:(char -> 'acc -> 'acc) -> string -> init:'acc -> 'acc

    fold_right f s x computes f s.[0] (f s.[1] ( ... (f s.[n-1] x) ...)), where n is the length of the string s.

    • since 4.13
    val trim : string -> string

    trim s is s without leading and trailing whitespace. Whitespace characters are: ' ', '\x0C' (form feed), '\n', '\r', and '\t'.

    • since 4.00
    val escaped : string -> string

    escaped s is s with special characters represented by escape sequences, following the lexical conventions of OCaml.

    All characters outside the US-ASCII printable range [0x20;0x7E] are escaped, as well as backslash (0x2F) and double-quote (0x22).

    The function Scanf.unescaped is a left inverse of escaped, i.e. Scanf.unescaped (escaped s) = s for any string s (unless escaped s fails).

    • raises Invalid_argument

      if the result is longer than Sys.max_string_length bytes.

    val uppercase_ascii : string -> string

    uppercase_ascii s is s with all lowercase letters translated to uppercase, using the US-ASCII character set.

    • since 4.05

    Traversing

    val iter : f:(char -> unit) -> string -> unit

    iter ~f s applies function f in turn to all the characters of s. It is equivalent to f s.[0]; f s.[1]; ...; f s.[length s - 1]; ().

    val iteri : f:(int -> char -> unit) -> string -> unit

    iteri is like iter, but the function is also given the corresponding character index.

    • since 4.00

    Searching

    val index_from : string -> int -> char -> int

    index_from s i c is the index of the first occurrence of c in s after position i.

    • raises Not_found

      if c does not occur in s after position i.

    • raises Invalid_argument

      if i is not a valid position in s.

    val rindex_from : string -> int -> char -> int

    rindex_from s i c is the index of the last occurrence of c in s before position i+1.

    • raises Not_found

      if c does not occur in s before position i+1.

    • raises Invalid_argument

      if i+1 is not a valid position in s.

    val index : string -> char -> int

    index s c is String.index_from s 0 c.

    val rindex : string -> char -> int

    rindex s c is String.rindex_from s (length s - 1) c.

    Strings and Sequences

    val to_seq : t -> char Stdlib.Seq.t

    to_seq s is a sequence made of the string's characters in increasing order. In "unsafe-string" mode, modifications of the string during iteration will be reflected in the sequence.

    • since 4.07
    val to_seqi : t -> (int * char) Stdlib.Seq.t

    to_seqi s is like to_seq but also tuples the corresponding index.

    • since 4.07
    val of_seq : char Stdlib.Seq.t -> t

    of_seq s is a string made of the sequence's characters.

    • since 4.07

    UTF decoding and validations

    • since 4.14

    UTF-8

    val get_utf_8_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_8_uchar b i decodes an UTF-8 character at index i in b.

    val is_valid_utf_8 : t -> bool

    is_valid_utf_8 b is true if and only if b contains valid UTF-8 data.

    UTF-16BE

    val get_utf_16be_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16be_uchar b i decodes an UTF-16BE character at index i in b.

    val is_valid_utf_16be : t -> bool

    is_valid_utf_16be b is true if and only if b contains valid UTF-16BE data.

    UTF-16LE

    val get_utf_16le_uchar : t -> int -> Stdlib.Uchar.utf_decode

    get_utf_16le_uchar b i decodes an UTF-16LE character at index i in b.

    val is_valid_utf_16le : t -> bool

    is_valid_utf_16le b is true if and only if b contains valid UTF-16LE data.

    Binary decoding of integers

    The functions in this section binary decode integers from strings.

    All following functions raise Invalid_argument if the characters needed at index i to decode the integer are not available.

    Little-endian (resp. big-endian) encoding means that least (resp. most) significant bytes are stored first. Big-endian is also known as network byte order. Native-endian encoding is either little-endian or big-endian depending on Sys.big_endian.

    32-bit and 64-bit integers are represented by the int32 and int64 types, which can be interpreted either as signed or unsigned numbers.

    8-bit and 16-bit integers are represented by the int type, which has more bits than the binary encoding. These extra bits are sign-extended (or zero-extended) for functions which decode 8-bit or 16-bit integers and represented them with int values.

    val get_uint8 : string -> int -> int

    get_uint8 b i is b's unsigned 8-bit integer starting at character index i.

    • since 4.13
    val get_int8 : string -> int -> int

    get_int8 b i is b's signed 8-bit integer starting at character index i.

    • since 4.13
    val get_uint16_ne : string -> int -> int

    get_uint16_ne b i is b's native-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_be : string -> int -> int

    get_uint16_be b i is b's big-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_uint16_le : string -> int -> int

    get_uint16_le b i is b's little-endian unsigned 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_ne : string -> int -> int

    get_int16_ne b i is b's native-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_be : string -> int -> int

    get_int16_be b i is b's big-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int16_le : string -> int -> int

    get_int16_le b i is b's little-endian signed 16-bit integer starting at character index i.

    • since 4.13
    val get_int32_ne : string -> int -> int32

    get_int32_ne b i is b's native-endian 32-bit integer starting at character index i.

    • since 4.13
    val hash : t -> int

    An unseeded hash function for strings, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.0
    val seeded_hash : int -> t -> int

    A seeded hash function for strings, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.0
    val get_int32_be : string -> int -> int32

    get_int32_be b i is b's big-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int32_le : string -> int -> int32

    get_int32_le b i is b's little-endian 32-bit integer starting at character index i.

    • since 4.13
    val get_int64_ne : string -> int -> int64

    get_int64_ne b i is b's native-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_be : string -> int -> int64

    get_int64_be b i is b's big-endian 64-bit integer starting at character index i.

    • since 4.13
    val get_int64_le : string -> int -> int64

    get_int64_le b i is b's little-endian 64-bit integer starting at character index i.

    • since 4.13
    val is_empty : t -> bool
    val prefix : string -> int -> string
    val suffix : string -> int -> string
    val drop_prefix : string -> int -> string
    val drop_suffix : string -> int -> string
    val is_prefix : string -> prefix:string -> bool
    val is_suffix : string -> suffix:string -> bool
    val exists : string -> f:(char -> bool) -> bool
    val for_all : string -> f:(char -> bool) -> bool
    val index_opt : string -> char -> int option
    val rindex_opt : string -> char -> int option
    val index_from_opt : string -> int -> char -> int option
    val rindex_from_opt : string -> int -> char -> int option
    val lsplit2 : string -> on:char -> (string * string) option
    val capitalize_ascii : string -> string
    val lowercase_ascii : string -> string
    val uncapitalize_ascii : string -> string
    val split_on_char : string -> sep:char -> string list
    include Comparisons with type t := string
    val compare : string -> string -> int
    val equal : string -> string -> bool
    val (=) : string -> string -> bool
    val (<) : string -> string -> bool
    val (>) : string -> string -> bool
    val (<>) : string -> string -> bool
    val (<=) : string -> string -> bool
    val (>=) : string -> string -> bool
    val min : string -> string -> string
    val max : string -> string -> string
    module Map : sig ... end
    module Set : sig ... end
    diff --git a/ppxlib/Stdppx/index.html b/ppxlib/Stdppx/index.html index 305b127..3134caa 100644 --- a/ppxlib/Stdppx/index.html +++ b/ppxlib/Stdppx/index.html @@ -1,6 +1,5 @@ -Stdppx (ppxlib.Stdppx)

    Module Stdppx

    module Caml = Stdlib
    module Sexp = Sexplib0.Sexp
    module Sexpable = Sexplib0.Sexpable
    include module type of struct include Sexplib0.Sexp_conv end
    Conversion of OCaml-values to S-expressions
    val default_string_of_float : (float -> string) ref

    default_string_of_float reference to the default function used to convert floats to strings.

    Initially set to fun n -> sprintf "%.20G" n.

    val write_old_option_format : bool ref

    write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

    Initially set to true.

    val read_old_option_format : bool ref

    read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

    Initially set to true.

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

    val sexp_of_unit : unit -> Sexplib0.Sexp.t

    sexp_of_unit () converts a value of type unit to an S-expression.

    val sexp_of_bool : bool -> Sexplib0.Sexp.t

    sexp_of_bool b converts the value x of type bool to an S-expression.

    val sexp_of_string : string -> Sexplib0.Sexp.t

    sexp_of_string str converts the value str of type string to an S-expression.

    val sexp_of_bytes : bytes -> Sexplib0.Sexp.t

    sexp_of_bytes str converts the value str of type bytes to an S-expression.

    val sexp_of_char : char -> Sexplib0.Sexp.t

    sexp_of_char c converts the value c of type char to an S-expression.

    val sexp_of_int : int -> Sexplib0.Sexp.t

    sexp_of_int n converts the value n of type int to an S-expression.

    val sexp_of_float : float -> Sexplib0.Sexp.t

    sexp_of_float n converts the value n of type float to an S-expression.

    val sexp_of_int32 : int32 -> Sexplib0.Sexp.t

    sexp_of_int32 n converts the value n of type int32 to an S-expression.

    val sexp_of_int64 : int64 -> Sexplib0.Sexp.t

    sexp_of_int64 n converts the value n of type int64 to an S-expression.

    val sexp_of_nativeint : nativeint -> Sexplib0.Sexp.t

    sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

    val sexp_of_ref : ('a -> Sexplib0.Sexp.t) -> 'a ref -> Sexplib0.Sexp.t

    sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_lazy_t : ('a -> Sexplib0.Sexp.t) -> 'a lazy_t -> Sexplib0.Sexp.t

    sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_option : ('a -> Sexplib0.Sexp.t) -> 'a option -> Sexplib0.Sexp.t

    sexp_of_option conv opt converts the value opt of type 'a - option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_pair : +Stdppx (ppxlib.Stdppx)

    Module Stdppx

    module Caml = Stdlib
    module Sexp = Sexplib0.Sexp
    module Sexpable = Sexplib0.Sexpable
    include module type of struct include Sexplib0.Sexp_conv end
    Conversion of OCaml-values to S-expressions
    val default_string_of_float : (float -> string) ref

    default_string_of_float reference to the default function used to convert floats to strings.

    Initially set to fun n -> sprintf "%.20G" n.

    val write_old_option_format : bool ref

    write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

    Initially set to true.

    val read_old_option_format : bool ref

    read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

    Initially set to true.

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

    val sexp_of_unit : unit -> Sexplib0.Sexp.t

    sexp_of_unit () converts a value of type unit to an S-expression.

    val sexp_of_bool : bool -> Sexplib0.Sexp.t

    sexp_of_bool b converts the value x of type bool to an S-expression.

    val sexp_of_string : string -> Sexplib0.Sexp.t

    sexp_of_string str converts the value str of type string to an S-expression.

    val sexp_of_bytes : bytes -> Sexplib0.Sexp.t

    sexp_of_bytes str converts the value str of type bytes to an S-expression.

    val sexp_of_char : char -> Sexplib0.Sexp.t

    sexp_of_char c converts the value c of type char to an S-expression.

    val sexp_of_int : int -> Sexplib0.Sexp.t

    sexp_of_int n converts the value n of type int to an S-expression.

    val sexp_of_float : float -> Sexplib0.Sexp.t

    sexp_of_float n converts the value n of type float to an S-expression.

    val sexp_of_int32 : int32 -> Sexplib0.Sexp.t

    sexp_of_int32 n converts the value n of type int32 to an S-expression.

    val sexp_of_int64 : int64 -> Sexplib0.Sexp.t

    sexp_of_int64 n converts the value n of type int64 to an S-expression.

    val sexp_of_nativeint : nativeint -> Sexplib0.Sexp.t

    sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

    val sexp_of_ref : ('a -> Sexplib0.Sexp.t) -> 'a ref -> Sexplib0.Sexp.t

    sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_lazy_t : ('a -> Sexplib0.Sexp.t) -> 'a lazy_t -> Sexplib0.Sexp.t

    sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_option : ('a -> Sexplib0.Sexp.t) -> 'a option -> Sexplib0.Sexp.t

    sexp_of_option conv opt converts the value opt of type 'a option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_pair : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a * 'b) -> @@ -9,13 +8,11 @@ ('b -> Sexplib0.Sexp.t) -> ('c -> Sexplib0.Sexp.t) -> ('a * 'b * 'c) -> - Sexplib0.Sexp.t

    sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

    val sexp_of_list : ('a -> Sexplib0.Sexp.t) -> 'a list -> Sexplib0.Sexp.t

    sexp_of_list conv lst converts the value lst of type 'a - list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_array : ('a -> Sexplib0.Sexp.t) -> 'a array -> Sexplib0.Sexp.t

    sexp_of_array conv ar converts the value ar of type 'a - array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_hashtbl : + Sexplib0.Sexp.t

    sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

    val sexp_of_list : ('a -> Sexplib0.Sexp.t) -> 'a list -> Sexplib0.Sexp.t

    sexp_of_list conv lst converts the value lst of type 'a list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_array : ('a -> Sexplib0.Sexp.t) -> 'a array -> Sexplib0.Sexp.t

    sexp_of_array conv ar converts the value ar of type 'a array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_hashtbl : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a, 'b) Stdlib.Hashtbl.t -> - Sexplib0.Sexp.t

    sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

    val sexp_of_opaque : 'a -> Sexplib0.Sexp.t

    sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

    val sexp_of_fun : ('a -> 'b) -> Sexplib0.Sexp.t

    sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

    Conversion of S-expressions to OCaml-values
    exception Of_sexp_error of exn * Sexplib0.Sexp.t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    val record_check_extra_fields : bool ref

    record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

    val of_sexp_error : string -> Sexplib0.Sexp.t -> 'a

    of_sexp_error reason sexp

    • raises Of_sexp_error

      (Failure reason, sexp).

    val of_sexp_error_exn : exn -> Sexplib0.Sexp.t -> 'a

    of_sexp_error exc sexp

    • raises Of_sexp_error

      (exc, sexp).

    val unit_of_sexp : Sexplib0.Sexp.t -> unit

    unit_of_sexp sexp converts S-expression sexp to a value of type unit.

    val bool_of_sexp : Sexplib0.Sexp.t -> bool

    bool_of_sexp sexp converts S-expression sexp to a value of type bool.

    val string_of_sexp : Sexplib0.Sexp.t -> string

    string_of_sexp sexp converts S-expression sexp to a value of type string.

    val bytes_of_sexp : Sexplib0.Sexp.t -> bytes

    bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

    val char_of_sexp : Sexplib0.Sexp.t -> char

    char_of_sexp sexp converts S-expression sexp to a value of type char.

    val int_of_sexp : Sexplib0.Sexp.t -> int

    int_of_sexp sexp converts S-expression sexp to a value of type int.

    val float_of_sexp : Sexplib0.Sexp.t -> float

    float_of_sexp sexp converts S-expression sexp to a value of type float.

    val int32_of_sexp : Sexplib0.Sexp.t -> int32

    int32_of_sexp sexp converts S-expression sexp to a value of type int32.

    val int64_of_sexp : Sexplib0.Sexp.t -> int64

    int64_of_sexp sexp converts S-expression sexp to a value of type int64.

    val nativeint_of_sexp : Sexplib0.Sexp.t -> nativeint

    nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

    val ref_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a ref

    ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

    val lazy_t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a lazy_t

    lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

    val option_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a option

    option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

    val pair_of_sexp : + Sexplib0.Sexp.t

    sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

    val sexp_of_opaque : 'a -> Sexplib0.Sexp.t

    sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

    val sexp_of_fun : ('a -> 'b) -> Sexplib0.Sexp.t

    sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

    Conversion of S-expressions to OCaml-values
    exception Of_sexp_error of exn * Sexplib0.Sexp.t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    val record_check_extra_fields : bool ref

    record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

    val of_sexp_error : string -> Sexplib0.Sexp.t -> 'a

    of_sexp_error reason sexp

    val of_sexp_error_exn : exn -> Sexplib0.Sexp.t -> 'a

    of_sexp_error exc sexp

    val unit_of_sexp : Sexplib0.Sexp.t -> unit

    unit_of_sexp sexp converts S-expression sexp to a value of type unit.

    val bool_of_sexp : Sexplib0.Sexp.t -> bool

    bool_of_sexp sexp converts S-expression sexp to a value of type bool.

    val string_of_sexp : Sexplib0.Sexp.t -> string

    string_of_sexp sexp converts S-expression sexp to a value of type string.

    val bytes_of_sexp : Sexplib0.Sexp.t -> bytes

    bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

    val char_of_sexp : Sexplib0.Sexp.t -> char

    char_of_sexp sexp converts S-expression sexp to a value of type char.

    val int_of_sexp : Sexplib0.Sexp.t -> int

    int_of_sexp sexp converts S-expression sexp to a value of type int.

    val float_of_sexp : Sexplib0.Sexp.t -> float

    float_of_sexp sexp converts S-expression sexp to a value of type float.

    val int32_of_sexp : Sexplib0.Sexp.t -> int32

    int32_of_sexp sexp converts S-expression sexp to a value of type int32.

    val int64_of_sexp : Sexplib0.Sexp.t -> int64

    int64_of_sexp sexp converts S-expression sexp to a value of type int64.

    val nativeint_of_sexp : Sexplib0.Sexp.t -> nativeint

    nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

    val ref_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a ref

    ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

    val lazy_t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a lazy_t

    lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

    val option_of_sexp : (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a option

    option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

    val pair_of_sexp : (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> @@ -28,12 +25,12 @@ (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> - ('a, 'b) Stdlib.Hashtbl.t

    hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

    val opaque_of_sexp : Sexplib0.Sexp.t -> 'a

    opaque_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to an opaque value.

    val fun_of_sexp : Sexplib0.Sexp.t -> 'a

    fun_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to a function.

    Sexp Grammars

    val sexp_grammar_with_tags : + ('a, 'b) Stdlib.Hashtbl.t

    hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

    val opaque_of_sexp : Sexplib0.Sexp.t -> 'a

    opaque_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to an opaque value.

    val fun_of_sexp : Sexplib0.Sexp.t -> 'a

    fun_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to a function.

    Sexp Grammars

    val sexp_grammar_with_tags : Sexplib0.Sexp_grammar.grammar -> - tags:(string * Sexplib0.Sexp.t) list -> + tags:(string * Sexplib0.Sexp.t) list -> Sexplib0.Sexp_grammar.grammar
    val sexp_grammar_with_tag_list : 'a Sexplib0.Sexp_grammar.with_tag_list -> - tags:(string * Sexplib0.Sexp.t) list -> + tags:(string * Sexplib0.Sexp.t) list -> 'a Sexplib0.Sexp_grammar.with_tag_list

    Sexp grammar definitions.

    val unit_sexp_grammar : unit Sexplib0.Sexp_grammar.t
    val bool_sexp_grammar : bool Sexplib0.Sexp_grammar.t
    val string_sexp_grammar : string Sexplib0.Sexp_grammar.t
    val bytes_sexp_grammar : bytes Sexplib0.Sexp_grammar.t
    val char_sexp_grammar : char Sexplib0.Sexp_grammar.t
    val int_sexp_grammar : int Sexplib0.Sexp_grammar.t
    val float_sexp_grammar : float Sexplib0.Sexp_grammar.t
    val int32_sexp_grammar : int32 Sexplib0.Sexp_grammar.t
    val int64_sexp_grammar : int64 Sexplib0.Sexp_grammar.t
    val nativeint_sexp_grammar : nativeint Sexplib0.Sexp_grammar.t
    val sexp_t_sexp_grammar : Sexplib0.Sexp.t Sexplib0.Sexp_grammar.t
    val ref_sexp_grammar : 'a Sexplib0.Sexp_grammar.t -> 'a ref Sexplib0.Sexp_grammar.t
    val lazy_t_sexp_grammar : @@ -44,4 +41,4 @@ 'a Sexplib0.Sexp_grammar.t -> 'a list Sexplib0.Sexp_grammar.t
    val array_sexp_grammar : 'a Sexplib0.Sexp_grammar.t -> - 'a array Sexplib0.Sexp_grammar.t
    val opaque_sexp_grammar : 'a Sexplib0.Sexp_grammar.t
    val fun_sexp_grammar : 'a Sexplib0.Sexp_grammar.t

    Exception converters

    val sexp_of_exn : exn -> Sexplib0.Sexp.t

    sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

    val printexc_prefer_sexp : exn -> string

    Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

    This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

    val sexp_of_exn_opt : exn -> Sexplib0.Sexp.t option

    sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

    module Exn_converter = Sexplib0.Sexp_conv.Exn_converter
    module type Comparisons = sig ... end
    module Poly : sig ... end
    include Comparisons with type t := int
    val compare : int -> int -> int
    val equal : int -> int -> bool
    val (=) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val min : int -> int -> int
    val max : int -> int -> int
    module Array = StdLabels.Array
    module Bool : sig ... end
    module Bytes : sig ... end
    module Char : sig ... end
    module Exn : sig ... end
    module Float : sig ... end
    module Fn : sig ... end
    module Hashtbl : sig ... end
    module In_channel : sig ... end
    module Int : sig ... end
    module Either : sig ... end
    module List : sig ... end
    module Option : sig ... end
    module Result : sig ... end
    module NonEmptyList : sig ... end
    module Out_channel : sig ... end
    module String : sig ... end
    val (@) : 'a list -> 'a list -> 'a list
    val output : out_channel -> bytes -> pos:int -> len:int -> unit
    val output_substring : out_channel -> string -> pos:int -> len:int -> unit
    \ No newline at end of file + 'a array Sexplib0.Sexp_grammar.t
    val opaque_sexp_grammar : 'a Sexplib0.Sexp_grammar.t
    val fun_sexp_grammar : 'a Sexplib0.Sexp_grammar.t

    Exception converters

    val sexp_of_exn : exn -> Sexplib0.Sexp.t

    sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

    val printexc_prefer_sexp : exn -> string

    Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

    This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

    val sexp_of_exn_opt : exn -> Sexplib0.Sexp.t option

    sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

    module Exn_converter = Sexplib0.Sexp_conv.Exn_converter
    module type Comparisons = sig ... end
    module Poly : sig ... end
    include Comparisons with type t := int
    val compare : int -> int -> int
    val equal : int -> int -> bool
    val (=) : int -> int -> bool
    val (<) : int -> int -> bool
    val (>) : int -> int -> bool
    val (<>) : int -> int -> bool
    val (<=) : int -> int -> bool
    val (>=) : int -> int -> bool
    val min : int -> int -> int
    val max : int -> int -> int
    module Array = StdLabels.Array
    module Bool : sig ... end
    module Bytes : sig ... end
    module Char : sig ... end
    module Exn : sig ... end
    module Float : sig ... end
    module Fn : sig ... end
    module Hashtbl : sig ... end
    module In_channel : sig ... end
    module Int : sig ... end
    module Either : sig ... end
    module List : sig ... end
    module Option : sig ... end
    module Result : sig ... end
    module NonEmptyList : sig ... end
    module Out_channel : sig ... end
    module String : sig ... end
    val (@) : 'a list -> 'a list -> 'a list
    val output : out_channel -> bytes -> pos:int -> len:int -> unit
    val output_substring : out_channel -> string -> pos:int -> len:int -> unit
    diff --git a/ppxlib/Stdppx/module-type-Comparisons/index.html b/ppxlib/Stdppx/module-type-Comparisons/index.html index 9a07999..252468c 100644 --- a/ppxlib/Stdppx/module-type-Comparisons/index.html +++ b/ppxlib/Stdppx/module-type-Comparisons/index.html @@ -1,2 +1,2 @@ -Comparisons (ppxlib.Stdppx.Comparisons)

    Module type Stdppx.Comparisons

    type t
    val compare : t -> t -> int
    val equal : t -> t -> bool
    val (=) : t -> t -> bool
    val (<) : t -> t -> bool
    val (>) : t -> t -> bool
    val (<>) : t -> t -> bool
    val (<=) : t -> t -> bool
    val (>=) : t -> t -> bool
    val min : t -> t -> t
    val max : t -> t -> t
    \ No newline at end of file +Comparisons (ppxlib.Stdppx.Comparisons)

    Module type Stdppx.Comparisons

    type t
    val compare : t -> t -> int
    val equal : t -> t -> bool
    val (=) : t -> t -> bool
    val (<) : t -> t -> bool
    val (>) : t -> t -> bool
    val (<>) : t -> t -> bool
    val (<=) : t -> t -> bool
    val (>=) : t -> t -> bool
    val min : t -> t -> t
    val max : t -> t -> t
    diff --git a/ppxlib/ast-traversal.html b/ppxlib/ast-traversal.html index a158c54..f9677d9 100644 --- a/ppxlib/ast-traversal.html +++ b/ppxlib/ast-traversal.html @@ -1,8 +1,8 @@ -ast-traversal (ppxlib.ast-traversal)

    AST Traversals

    The Parsetree is a very complex type. Other Ppxlib modules such as Metaquot, Ast_builder and Ast_pattern help in generating and matching values, but only when the overall structure of the code is known in advance.

    For other use cases, such as extracting all identifiers, checking that a property is verified, or replacing all integer constants by something else, those modules cannot really help. All these examples relate with another kind of Parsetree manipulations known as traversals.

    A traversal is a recursive function that will be called on a value, and recursively on all of its subvalues, combining the result in a certain way. For instance, List.map is a traversal of the list type. In the case of a list, a map is very simple to write, but in the case of the long Parsetree type, it is a lot of boilerplate code! Fortunately, ppxlib provides a way to ease this.

    In ppxlib, traversals are implemented using the "visitor" object-oriented pattern.

    Writing Traverses

    For each kind of traversal (described below), ppxlib provides a "default" traversal, in the form of a class following the visitors pattern. For instance, in the case of the map traversal, the default map is the identity AST map, and any object of class Ast_traverse.map will be this identity map. To apply a map to a node of a given type, one needs to call the appropriate method:

    # let f payload =
    -    let map = new Ppxlib.Ast_traverse.map in
    -    map#payload ;;
    -val f : payload -> payload = <fun>

    In the example above, f is the identity map. But we want to define proper maps, not just identity. This is done by creating a new class, making it inherit the methods, and replacing the one that we want to replace. Here is an example, for both the iter and map traversals:

    let f payload =
    +ast-traversal (ppxlib.ast-traversal)

    AST Traversals

    The Parsetree is a very complex type. Other Ppxlib modules such as Metaquot, Ast_builder and Ast_pattern help in generating and matching values, but only when the overall structure of the code is known in advance.

    For other use cases, such as extracting all identifiers, checking that a property is verified, or replacing all integer constants by something else, those modules cannot really help. All these examples relate with another kind of Parsetree manipulations known as traversals.

    A traversal is a recursive function that will be called on a value, and recursively on all of its subvalues, combining the result in a certain way. For instance, List.map is a traversal of the list type. In the case of a list, a map is very simple to write, but in the case of the long Parsetree type, it is a lot of boilerplate code! Fortunately, ppxlib provides a way to ease this.

    In ppxlib, traversals are implemented using the "visitor" object-oriented pattern.

    Writing Traverses

    For each kind of traversal (described below), ppxlib provides a "default" traversal, in the form of a class following the visitors pattern. For instance, in the case of the map traversal, the default map is the identity AST map, and any object of class Ast_traverse.map will be this identity map. To apply a map to a node of a given type, one needs to call the appropriate method:

      # let f payload =
    +      let map = new Ppxlib.Ast_traverse.map in
    +      map#payload ;;
    +  val f : payload -> payload = <fun>

    In the example above, f is the identity map. But we want to define proper maps, not just identity. This is done by creating a new class, making it inherit the methods, and replacing the one that we want to replace. Here is an example, for both the iter and map traversals:

    let f payload =
       let checker =
         object
           inherit Ast_traverse.iter as super
    @@ -21,11 +21,11 @@ val f : payload -> payload = <fun>

    In the example above, end in checker#payload payload; - replace_constant#payload payload

    Note that when redefining methods, unless explicitly wanting the traversal to stop, the original method needs to be called! That should be all that’s necessary to know and understand the API.

    The Different Kinds of Traversals

    ppxlib offers different kind of Parsetree traversals:

    • Iterators, which will traverse the type, calling a function on each node for side effects.
    • Maps, where the content is replaced. A map will transform a Parsetree into another Parsetree, replacing nodes following the map function.
    • Folds, which will traverse the nodes, carrying a value (often called an accumulator) that will be updated on each node.
    • Lifts, a transformation that turns a Parsetree value in one of another type by transforming it in a bottom-up manner. For instance, with a simple tree structure, the corresponding lift function would be:
    let lift ~f = function
    -    Leaf a -> f.leaf a
    -  | Node(a,x,y) -> f.node a (lift ~f x) (lift ~f y)
    • Variants of the above traversal, such as Maps with context, where a context can be modified and passed down to child nodes during traversal. The context never goes up; it is only propagated down. It is used for instance to track opened module. To give a simple example, such a context could be the depth of the current node, as in the following implementation for the simple tree type:
    let map_with_depth_context ~f ctxt = function
    -    Leaf a -> f.leaf ctxt a
    -  | Node(a,x,y) ->
    -      f.node ctxt a
    -        (map_with_depth_context (ctxt+1) ~f x)
    -        (map_with_depth_context (ctxt+1) ~f y)

    \ No newline at end of file + replace_constant#payload payload

    Note that when redefining methods, unless explicitly wanting the traversal to stop, the original method needs to be called! That should be all that’s necessary to know and understand the API.

    The Different Kinds of Traversals

    ppxlib offers different kind of Parsetree traversals:

    • Iterators, which will traverse the type, calling a function on each node for side effects.
    • Maps, where the content is replaced. A map will transform a Parsetree into another Parsetree, replacing nodes following the map function.
    • Folds, which will traverse the nodes, carrying a value (often called an accumulator) that will be updated on each node.
    • Lifts, a transformation that turns a Parsetree value in one of another type by transforming it in a bottom-up manner. For instance, with a simple tree structure, the corresponding lift function would be:
      let lift ~f = function
    +      Leaf a -> f.leaf a
    +    | Node(a,x,y) -> f.node a (lift ~f x) (lift ~f y)
    • Variants of the above traversal, such as Maps with context, where a context can be modified and passed down to child nodes during traversal. The context never goes up; it is only propagated down. It is used for instance to track opened module. To give a simple example, such a context could be the depth of the current node, as in the following implementation for the simple tree type:
      let map_with_depth_context ~f ctxt = function
    +      Leaf a -> f.leaf ctxt a
    +    | Node(a,x,y) ->
    +        f.node ctxt a
    +          (map_with_depth_context (ctxt+1) ~f x)
    +          (map_with_depth_context (ctxt+1) ~f y)

    diff --git a/ppxlib/driver.html b/ppxlib/driver.html index e6653e2..e8ba964 100644 --- a/ppxlib/driver.html +++ b/ppxlib/driver.html @@ -1,5 +1,5 @@ -driver (ppxlib.driver)

    How It Works

    General Concepts

    The Driver

    ppxlib sits in between the PPXs authors and the compiler toolchain. For the PPX author, it provides an API to define the transformation and register it to ppxlib. Then, all registered transformations can be turned into a single executable, called the driver, that is responsible for applying all the transformations. The driver will be called by the compiler.

    The PPX authors register their transformations using the Driver.register_transformation function, as explained in the Writing PPXs section. The different arguments of this function corresponds to the different kinds of PPXs supported by ppxlib or the phase, at which time they will be executed.

    The driver is created by calling either Driver.standalone or Driver.run_as_ppx_rewriter. Note that when used through Dune, none of these functions will need to be called by the PPX author. As we will see, Dune will be responsible for generating the driver after all required PPXs from different libraries have been registered. These functions will interpret the command line arguments and start the rewriting accordingly.

    The Driver.standalone function creates an executable that parses an OCaml file, transforms it according to the registered transformations, and outputs the transformed file. This makes it suitable for use with the -pp option of the OCaml compiler. It is a preprocessor for sources and is standalone in the sense that it can be called independently from the OCaml compiler (e.g., it includes an OCaml parser).

    On the other hand, the Driver.run_as_ppx_rewriter-generated driver is a proper PPX, as it will read and output a Parsetree marshalled value directly. This version is suitable for use with the -ppx option of the OCaml compiler, as well as any tool that requires control of parsing the file. For instance, Merlin includes an OCaml parser that tries hard to recover from errors in order to generate a valid AST most of the time.

    Several arguments can be passed to the driver when executing it. Those arguments can also be easily passed using Dune, as explained in its manual. PPX authors can add arguments to their generated drivers using Driver.add_arg. Here are the default arguments for respectively standalone and run_as_ppx_rewriter generated drivers:

    Standalone driver
    driver.exe [extra_args] [<files>]
    +driver (ppxlib.driver)

    How It Works

    General Concepts

    The Driver

    ppxlib sits in between the PPXs authors and the compiler toolchain. For the PPX author, it provides an API to define the transformation and register it to ppxlib. Then, all registered transformations can be turned into a single executable, called the driver, that is responsible for applying all the transformations. The driver will be called by the compiler.

    The PPX authors register their transformations using the Driver.register_transformation function, as explained in the Writing PPXs section. The different arguments of this function corresponds to the different kinds of PPXs supported by ppxlib or the phase, at which time they will be executed.

    The driver is created by calling either Driver.standalone or Driver.run_as_ppx_rewriter. Note that when used through Dune, none of these functions will need to be called by the PPX author. As we will see, Dune will be responsible for generating the driver after all required PPXs from different libraries have been registered. These functions will interpret the command line arguments and start the rewriting accordingly.

    The Driver.standalone function creates an executable that parses an OCaml file, transforms it according to the registered transformations, and outputs the transformed file. This makes it suitable for use with the -pp option of the OCaml compiler. It is a preprocessor for sources and is standalone in the sense that it can be called independently from the OCaml compiler (e.g., it includes an OCaml parser).

    On the other hand, the Driver.run_as_ppx_rewriter-generated driver is a proper PPX, as it will read and output a Parsetree marshalled value directly. This version is suitable for use with the -ppx option of the OCaml compiler, as well as any tool that requires control of parsing the file. For instance, Merlin includes an OCaml parser that tries hard to recover from errors in order to generate a valid AST most of the time.

    Several arguments can be passed to the driver when executing it. Those arguments can also be easily passed using Dune, as explained in its manual. PPX authors can add arguments to their generated drivers using Driver.add_arg. Here are the default arguments for respectively standalone and run_as_ppx_rewriter generated drivers:

    Standalone driver
    driver.exe [extra_args] [<files>]
       -as-ppx                     Run as a -ppx rewriter (must be the first argument)
       --as-ppx                    Same as -as-ppx
       -as-pp                      Shorthand for: -dump-ast -embed-errors
    @@ -56,7 +56,8 @@
       -unused-type-warnings {true|false|force}
                                    Allow unused type warnings for types with [@@deriving ...] (default: false)
       -help                        Display this list of options
    -  --help                       Display this list of options

    and

    Ppx rewriter driver
    driver.exe [extra_args] <infile> <outfile>
    +  --help                       Display this list of options
    +

    and

    Ppx rewriter driver
    driver.exe [extra_args] <infile> <outfile>
       -loc-filename <string>      File name to use in locations
       -reserve-namespace <string> Mark the given namespace as reserved
       -no-check                   Disable checks (unsafe)
    @@ -71,26 +72,26 @@
       -cookie NAME=EXPR           Set the cookie NAME to EXPR
       --cookie                    Same as -cookie
       -help                       Display this list of options
    -  --help                      Display this list of options

    Exception handling

    In general, raising an exception in a registered transformation will make the ppxlib driver crash with an uncaught exception error. However, when spawned with the -embed-errors or -as-ppx flags (that's the case when Merlin calls the driver) the ppxlib driver still handles a specific kind of exception: Located exceptions. They have type Location.Error and contain enough information to display a located error message.

    During its execution, the driver will run many different rewriters. In the case described above, it will catch any located exception thrown by a rewriter. When catching an exception, it will collect the error in a list, take the last valid AST (the one that was given to the raising rewriter) and continue its execution from there.

    At the end of the rewriting process, the driver will prepend all collected errors to the beginning of the AST, in the order in which they appeared.

    The same mechanism applies for the context-free rewriters: if any of them raises, the error is collected, the part of the AST that the rewriter was responsible to rewrite remains unmodified, and the context-free phase continues.

    Cookies

    Cookies are values that are passed to the driver via the command line, or set as side effects of transformations, which can be accessed by the transformations. They have a name to identify them and a value consisting of an OCaml expression. The module to access cookies is Driver.Cookies.

    Integration With Dune

    The Dune build system is well integrated with the ppxlib mechanism of registering transformations. In every dune file, Dune will read the set of PPXs that are to be used (i.e. the PPXs in `(preprocess (pps <list of PPXs that are to be used>))`). For a given set of rewriters, it will generate a driver using Driver.run_as_ppx_rewriter that contains all registered transformations. Using a single driver for multiple transformations from multiple PPXs ensures better composition semantics and improves the speed of the combined transformations. Moreover, ppxlib communicates with Dune through .corrected files to allow for promotion, for instance when using [@@deriving_inline]. A PPX author can also generate its own promotion suggestion using the Driver.register_correction function.

    Compatibility With Multiple OCaml Versions

    One of the important issues with working with the Parsetree is that the API is not stable. For instance, in the OCaml 4.13 release, the following two changes were made to the Parsetree type. Although they are small changes, they may break any PPX that is written to directly manipulate the (evolving) type.

    This instability causes an issue with maintenance. PPX authors wish to maintain a single version of their PPX, not one per OCaml version, and ideally not have to update their code when an irrelevant (for them) field is changed in the Parsetree.

    ppxlib helps to solve both issues. The first one, having to maintain a single PPX version working for every OCaml version, is done by migrating the Parsetree. The PPX author only maintains a version working with the latest version, and the ppxlib driver will convert the values from one version to another.

    For example, say a deriver is applied in the context of OCaml 4.08. After the 4.08 Parsetree has been given to it, the ppxlib driver will migrate this value into the latest Parsetree version, using the Astlib module. The "latest" here depends on the version of ppxlib, but at any given time, the latest released version of ppxlib will always use the latest released version of the Parsetree.

    After the migration to the latest Parsetree, the driver runs all transformations on it, which ends with a rewritten Parsetree of the latest version. However, since the context of rewriting is OCaml 4.08 (in this example), the driver needs to migrate back the rewritten Parsetree to an OCaml 4.08 version. Again, ppxlib uses the Astlib module for this migration. Once the driver has rewritten the AST for OCaml 4.08, the compilation can continue as usual.

    Context-Free Transformations

    ppxlib defines several kinds of transformations whose core property is that they can only read and modify the code locally. The parts of the AST given to the transformation are only portions of the whole AST. In this regard, they are usually called context-free transformations. While being not as general-purpose as plain AST transformations, they are more than often sufficient and have many nice properties such as a well-defined semantics for composition. The two most important context-free transformations are derivers and extenders.

    Derivers

    A deriver is a context-free transformation that, given a certain structure or signature item, will generate code to append after this item. The given code is never modified. A deriver can be very useful to generate values depending on the structure of a user-defined type, for instance a converter for a type to and from a JSON value. A deriver is triggered by adding an attribute to a structure or signature item. For instance, the folowing code:

    type t = Int of int | Float of float [@@deriving yojson]
    +  --help                      Display this list of options

    Exception handling

    In general, raising an exception in a registered transformation will make the ppxlib driver crash with an uncaught exception error. However, when spawned with the -embed-errors or -as-ppx flags (that's the case when Merlin calls the driver) the ppxlib driver still handles a specific kind of exception: Located exceptions. They have type Location.Error and contain enough information to display a located error message.

    During its execution, the driver will run many different rewriters. In the case described above, it will catch any located exception thrown by a rewriter. When catching an exception, it will collect the error in a list, take the last valid AST (the one that was given to the raising rewriter) and continue its execution from there.

    At the end of the rewriting process, the driver will prepend all collected errors to the beginning of the AST, in the order in which they appeared.

    The same mechanism applies for the context-free rewriters: if any of them raises, the error is collected, the part of the AST that the rewriter was responsible to rewrite remains unmodified, and the context-free phase continues.

    Cookies

    Cookies are values that are passed to the driver via the command line, or set as side effects of transformations, which can be accessed by the transformations. They have a name to identify them and a value consisting of an OCaml expression. The module to access cookies is Driver.Cookies.

    Integration With Dune

    The Dune build system is well integrated with the ppxlib mechanism of registering transformations. In every dune file, Dune will read the set of PPXs that are to be used (i.e. the PPXs in `(preprocess (pps <list of PPXs that are to be used>))`). For a given set of rewriters, it will generate a driver using Driver.run_as_ppx_rewriter that contains all registered transformations. Using a single driver for multiple transformations from multiple PPXs ensures better composition semantics and improves the speed of the combined transformations. Moreover, ppxlib communicates with Dune through .corrected files to allow for promotion, for instance when using [@@deriving_inline]. A PPX author can also generate its own promotion suggestion using the Driver.register_correction function.

    Compatibility With Multiple OCaml Versions

    One of the important issues with working with the Parsetree is that the API is not stable. For instance, in the OCaml 4.13 release, the following two changes were made to the Parsetree type. Although they are small changes, they may break any PPX that is written to directly manipulate the (evolving) type.

    This instability causes an issue with maintenance. PPX authors wish to maintain a single version of their PPX, not one per OCaml version, and ideally not have to update their code when an irrelevant (for them) field is changed in the Parsetree.

    ppxlib helps to solve both issues. The first one, having to maintain a single PPX version working for every OCaml version, is done by migrating the Parsetree. The PPX author only maintains a version working with the latest version, and the ppxlib driver will convert the values from one version to another.

    For example, say a deriver is applied in the context of OCaml 4.08. After the 4.08 Parsetree has been given to it, the ppxlib driver will migrate this value into the latest Parsetree version, using the Astlib module. The "latest" here depends on the version of ppxlib, but at any given time, the latest released version of ppxlib will always use the latest released version of the Parsetree.

    After the migration to the latest Parsetree, the driver runs all transformations on it, which ends with a rewritten Parsetree of the latest version. However, since the context of rewriting is OCaml 4.08 (in this example), the driver needs to migrate back the rewritten Parsetree to an OCaml 4.08 version. Again, ppxlib uses the Astlib module for this migration. Once the driver has rewritten the AST for OCaml 4.08, the compilation can continue as usual.

    Context-Free Transformations

    ppxlib defines several kinds of transformations whose core property is that they can only read and modify the code locally. The parts of the AST given to the transformation are only portions of the whole AST. In this regard, they are usually called context-free transformations. While being not as general-purpose as plain AST transformations, they are more than often sufficient and have many nice properties such as a well-defined semantics for composition. The two most important context-free transformations are derivers and extenders.

    Derivers

    A deriver is a context-free transformation that, given a certain structure or signature item, will generate code to append after this item. The given code is never modified. A deriver can be very useful to generate values depending on the structure of a user-defined type, for instance a converter for a type to and from a JSON value. A deriver is triggered by adding an attribute to a structure or signature item. For instance, the folowing code:

      type t = Int of int | Float of float [@@deriving yojson]
     
    -let x = ...

    would be rewritten to:

    type ty = Int of int | Float of float [@@deriving yojson]
    +  let x = ...

    would be rewritten to:

      type ty = Int of int | Float of float [@@deriving yojson]
     
    -let ty_of_yojson = ...
    -let ty_to_yojson = ...
    +  let ty_of_yojson = ...
    +  let ty_to_yojson = ...
     
    -let x = ...

    Extenders

    An extender is a context-free transformation that is triggered on extension nodes, and that will replace the extension node by some code generated from the extension node's payload. This can be very useful to generate values of a DSL using a more user-friendly syntax, e.g., to generate OCaml values from the JSON syntax.

    For instance, the following code:

    let json =
    -  [%yojson
    -    [ { name = "Anne"; grades = ["A"; "B-"; "B+"] }
    -    ; { name = "Bernard"; grades = ["B+"; "A"; "B-"] }
    -    ]
    -  ]

    could be rewritten into:

    let json =
    -  `List
    -    [ `Assoc
    -        [ ("name", `String "Anne")
    -        ; ("grades", `List [`String "A"; `String "B-"; `String "B+"])
    -        ]
    -    ; `Assoc
    -        [ ("name", `String "Bernard")
    -        ; ("grades", `List [`String "B+"; `String "A"; `String "B-"])
    -        ]
    -    ]

    Advantages

    There are multiple advantages of using context-free transformations. First, they provide the PPX user a much clearer understanding of the AST parts that will be rewritten, rather than a fully general AST rewriting. Secondly, they provide a much better composition semantic, which does not depend on the order. Finally, context-free transformations are applied in a single phase factorising the work for all transformations, resulting in a much faster driver than when combining multiple, whole AST transformations. More details on the execution of this phase are given in its dedicated section.

    See the Writing PPXs section for how to define derivers and extenders.

    The Execution of the Driver

    The actual rewriting of the AST is done in multiple phases:

    1. The linting phase
    2. The preprocessing phase
    3. The first instrumentation phase
    4. The context-free phase
    5. The global transformation phase
    6. The last instrumentation phase

    When registering a transformation through the Driver.register_transformation function, the phase in which the transformation has to be applied is specified. The multiplicity of phases is mostly to account for potential constraints on the execution order. However, most of the time there are no such constraints, and in this case, either the context-free or the global transformation phase should be used. (Note that whenever possible, which should be almost always, context-free transformations are possible and better.) If you register in another phase, be sure to know what you are doing.

    The Linter Phase

    Linters are preprocessors that take as input the whole AST and output a list of "lint" errors. Such an error is of type Driver.Lint_error.t and includes a string (the error message) and the location of the error. The errors will be reported as preprocessors warnings.

    This is the first phase, so linting errors can only be reported for code handwritten by the user.

    An example of a PPX registered in this phase is ppx_js_style.

    The Preprocessing Phase

    The preprocessing phase is the first transformation that actually alters the AST. In fact, the property of being the "first transformation applied" is what defines this phase, and ppxlib will thus ensure that only one transformation is registered in this phase; otherwise, it will generate an error.

    You should only register a transformation in this phase if it is really strongly necessary, and you know what you are doing. Your PPX will not be usable at the same time as another one registering a transformation in this phase.

    An example of a PPX registered in this phase is metapp.

    The First Instrumentation Phase

    This phase is for transformations that need to be run before the context-free phase. Historically, it was meant for instrumentation-related PPXs, hence the name. Unlike the preprocessing phase, registering to this phase provides no guarantee that the transformation is run early in the rewriting, as there is no limit in the number of transformations registered in this phase, which are then applied in the alphabetical order by their name.

    If it is not crucial for a transformation to run before the context-free phase, it should be registered to the global transformation phase.

    The Context-Free Phase

    The execution of all registered context-free rules is done in a single top-down pass through the AST. Whenever the top-down pass encounters a situation that triggers rewriting, the corresponding transformation is called. For instance, when encountering an extension point corresponding to a rewriting rule, the extension point is replaced by the rule's execution, and the top-down pass continues inside the generated code. Similarly, when a deriving attribute is found attached to a structure or signature item, the result of the deriving rule’s application is appended to the AST, and the top-down pass continues in the generated code.

    Note that the code generation for derivers is applied when "leaving" the AST node, that is when all rewriters have been run. Indeed, a deriver like this:

    type t = [%my_type] [@@deriving deriver_from_type]

    would need the information generated by the my_type extender to match on the structure of t.

    Also note that in this phase, the execution of the context-free rules are intertwined altogether, and it would not make sense to speak about the order of application, contrary to the next phase.

    The Global Transformation Phase

    The global transformation phase is the phase where registered transformations, seen as function from and to the Parsetree, are run. The applied order might matter and change the outcome, but since ppxlib knows nothing about the transformations, the order applied is alphabetical by the transformation's name.

    The Last Instrumentation Phase

    This phase is for global transformation to escape the alphabetical order and be executed as a last phase. For instance, bisect_ppx needs to be executed after all rewriting has occurred.

    Note that only one global transformation can be executed last. If several transformations rely on being the last transformation, it will be true for only one of them. Thus, only register your transformation in this phase if it is absolutely vital to be the last transformation, as your PPX will become incompatible with any other that registers a transformation during this phase.

    \ No newline at end of file + let x = ...

    Extenders

    An extender is a context-free transformation that is triggered on extension nodes, and that will replace the extension node by some code generated from the extension node's payload. This can be very useful to generate values of a DSL using a more user-friendly syntax, e.g., to generate OCaml values from the JSON syntax.

    For instance, the following code:

      let json =
    +    [%yojson
    +      [ { name = "Anne"; grades = ["A"; "B-"; "B+"] }
    +      ; { name = "Bernard"; grades = ["B+"; "A"; "B-"] }
    +      ]
    +    ]

    could be rewritten into:

      let json =
    +    `List
    +      [ `Assoc
    +          [ ("name", `String "Anne")
    +          ; ("grades", `List [`String "A"; `String "B-"; `String "B+"])
    +          ]
    +      ; `Assoc
    +          [ ("name", `String "Bernard")
    +          ; ("grades", `List [`String "B+"; `String "A"; `String "B-"])
    +          ]
    +      ]

    Advantages

    There are multiple advantages of using context-free transformations. First, they provide the PPX user a much clearer understanding of the AST parts that will be rewritten, rather than a fully general AST rewriting. Secondly, they provide a much better composition semantic, which does not depend on the order. Finally, context-free transformations are applied in a single phase factorising the work for all transformations, resulting in a much faster driver than when combining multiple, whole AST transformations. More details on the execution of this phase are given in its dedicated section.

    See the Writing PPXs section for how to define derivers and extenders.

    The Execution of the Driver

    The actual rewriting of the AST is done in multiple phases:

    1. The linting phase
    2. The preprocessing phase
    3. The first instrumentation phase
    4. The context-free phase
    5. The global transformation phase
    6. The last instrumentation phase

    When registering a transformation through the Driver.register_transformation function, the phase in which the transformation has to be applied is specified. The multiplicity of phases is mostly to account for potential constraints on the execution order. However, most of the time there are no such constraints, and in this case, either the context-free or the global transformation phase should be used. (Note that whenever possible, which should be almost always, context-free transformations are possible and better.) If you register in another phase, be sure to know what you are doing.

    The Linter Phase

    Linters are preprocessors that take as input the whole AST and output a list of "lint" errors. Such an error is of type Driver.Lint_error.t and includes a string (the error message) and the location of the error. The errors will be reported as preprocessors warnings.

    This is the first phase, so linting errors can only be reported for code handwritten by the user.

    An example of a PPX registered in this phase is ppx_js_style.

    The Preprocessing Phase

    The preprocessing phase is the first transformation that actually alters the AST. In fact, the property of being the "first transformation applied" is what defines this phase, and ppxlib will thus ensure that only one transformation is registered in this phase; otherwise, it will generate an error.

    You should only register a transformation in this phase if it is really strongly necessary, and you know what you are doing. Your PPX will not be usable at the same time as another one registering a transformation in this phase.

    An example of a PPX registered in this phase is metapp.

    The First Instrumentation Phase

    This phase is for transformations that need to be run before the context-free phase. Historically, it was meant for instrumentation-related PPXs, hence the name. Unlike the preprocessing phase, registering to this phase provides no guarantee that the transformation is run early in the rewriting, as there is no limit in the number of transformations registered in this phase, which are then applied in the alphabetical order by their name.

    If it is not crucial for a transformation to run before the context-free phase, it should be registered to the global transformation phase.

    The Context-Free Phase

    The execution of all registered context-free rules is done in a single top-down pass through the AST. Whenever the top-down pass encounters a situation that triggers rewriting, the corresponding transformation is called. For instance, when encountering an extension point corresponding to a rewriting rule, the extension point is replaced by the rule's execution, and the top-down pass continues inside the generated code. Similarly, when a deriving attribute is found attached to a structure or signature item, the result of the deriving rule’s application is appended to the AST, and the top-down pass continues in the generated code.

    Note that the code generation for derivers is applied when "leaving" the AST node, that is when all rewriters have been run. Indeed, a deriver like this:

      type t = [%my_type] [@@deriving deriver_from_type]

    would need the information generated by the my_type extender to match on the structure of t.

    Also note that in this phase, the execution of the context-free rules are intertwined altogether, and it would not make sense to speak about the order of application, contrary to the next phase.

    The Global Transformation Phase

    The global transformation phase is the phase where registered transformations, seen as function from and to the Parsetree, are run. The applied order might matter and change the outcome, but since ppxlib knows nothing about the transformations, the order applied is alphabetical by the transformation's name.

    The Last Instrumentation Phase

    This phase is for global transformation to escape the alphabetical order and be executed as a last phase. For instance, bisect_ppx needs to be executed after all rewriting has occurred.

    Note that only one global transformation can be executed last. If several transformations rely on being the last transformation, it will be true for only one of them. Thus, only register your transformation in this phase if it is absolutely vital to be the last transformation, as your PPX will become incompatible with any other that registers a transformation during this phase.

    diff --git a/ppxlib/examples.html b/ppxlib/examples.html index 9bbc3df..75e5e18 100644 --- a/ppxlib/examples.html +++ b/ppxlib/examples.html @@ -1,5 +1,5 @@ -examples (ppxlib.examples)

    Examples

    This section is here to allow viewing complete examples of PPXs written using ppxlib directly in the documentation. However, they are not "complete" in the sense that the overall organization, such as the dune files, is not included.

    In order to see a fully working complete example of a PPX written using ppxlib, that you can compile, modify and test, go to the examples folder of ppxlib sources.

    ppx_deriving_accesors

    The fully complete, ready-to-compile ppx_deriving_accesors example is accessible in ppxlib's sources.

    This deriver will generate accessors for record fields, from the record type definition.

    For example, this code:

    type t =
    +examples (ppxlib.examples)

    Examples

    This section is here to allow viewing complete examples of PPXs written using ppxlib directly in the documentation. However, they are not "complete" in the sense that the overall organization, such as the dune files, is not included.

    In order to see a fully working complete example of a PPX written using ppxlib, that you can compile, modify and test, go to the examples folder of ppxlib sources.

    ppx_deriving_accesors

    The fully complete, ready-to-compile ppx_deriving_accesors example is accessible in ppxlib's sources.

    This deriver will generate accessors for record fields, from the record type definition.

    For example, this code:

    type t =
       { a : string
       ; b : int
       }
    @@ -99,4 +99,4 @@ let my_extension =
         expand
     
     let rule = Ppxlib.Context_free.Rule.extension my_extension
    -let () = Driver.register_transformation ~rules:[ rule ] "get_env"

    \ No newline at end of file +let () = Driver.register_transformation ~rules:[ rule ] "get_env"

    diff --git a/ppxlib/generating-code.html b/ppxlib/generating-code.html index 5f48628..254ea14 100644 --- a/ppxlib/generating-code.html +++ b/ppxlib/generating-code.html @@ -1,37 +1,37 @@ -generating-code (ppxlib.generating-code)

    Generating AST Nodes

    The rewriter's core is a function that outputs code in the form of an AST. However, there are some issues with generating AST values when using the constructors directly:

    • The type is pretty verbose, with many fields rarely used.
    • The AST type might change at a version bump. In this case, the types used in the PPX would become incompatible with the types of the new OCaml version.

    The second point is important: since ppxlib translates the AST to the newest OCaml AST available before rewriting, your PPX would not only become incompatible with the new OCaml version, but also with all ppxlib versions released after the new AST type is introduced.

    For this reason, ppxlib provides abstractions over the OCaml AST, with a focus on usability and stability.

    The Different Options

    The two main options are:

    Ast_builder provides an API to generate AST nodes for the latest OCaml version in a backward-compatible way. Ppxlib_metaquot is different: it is a PPX that lets you generate OCaml AST nodes by writing OCaml code, using quotations and anti-quotations.

    Using Ppxlib_metaquot requires less knowledge of the OCaml AST than Ast_builder as it only uses natural OCaml syntax; however, it's more restrictive than `Ast_builder` for two reasons: first, it's less flexible, since on its own it lacks the ability to generate nodes dynamically from other kind of data: e.g. it's not possible to build an expression containing a string, given the string as input. Second, it's less general because it only allows users to generate few different nodes such as structure items, expressions, patterns, etc., but it is not possible to generate a value of type row_field_desc! A typical workflow is to use `metaquot` for the constant skeleton of the node, and to use the `metaquot` anti-quotation workflow (see below) together with `Ast_builder` to fill in the dynamic parts.

    Note: `Ppxlib` also re-exports the OCaml compiler API `Ast_helper` for historic reasons. It might get deprecated at some point, though. Please, use `Ast_builder` instead. manipulate the AST. This module is in ppxlib for compatiblity reasons and it is recommended to use Ast_builder instead.

    The AST_builder Module

    General Presentation

    The Ast_builder module provides several kinds of functions to generate AST nodes. The first kind are ones whose name matches closely the Parsetree type names. equivalents, but there are also "higher level" wrappers around those basic blocks for common patterns such as creating an integer or string constant.

    Low-Level Builders

    The function names match the Parsetree names closely, which makes it easy to build AST fragments by just knowing the Parsetree.

    For types wrapped in a record's _desc field, helpers are generated for each constructor that generates the record wrapper, e.g., for the type Parsetree.expression:

    type expression =
    -  { pexp_desc       : expression_desc
    -  ; pexp_loc        : Location.t
    -  ; pexp_attributes : attributes
    -  }
    -and expression_desc =
    -  | Pexp_ident    of Longident.t loc
    -  | Pexp_constant of constant
    -  | Pexp_let      of rec_flag * value_binding list * expression
    -  ...

    The following helpers are created:

    val pexp_ident    : loc:Location.t -> Longident.t loc -> expression
    -val pexp_constant : loc:Location.t -> constant -> expression
    -val pexp_let      : loc:Location.t -> rec_flag -> value_binding list -> expression -> expression
    -...

    For other record types, such as type_declaration, we have the following helper:

    type type_declaration =
    -  { ptype_name       : string Located.t
    -  ; ptype_params     : (core_type * variance) list
    -  ; ptype_cstrs      : (core_type * core_type * Location.t) list
    -  ; ptype_kind       : type_kind
    -  ; ptype_private    : private_flag
    -  ; ptype_manifest   : core_type option
    -  ; ptype_attributes : attributes
    -  ; ptype_loc        : Location.t
    -  }
    +generating-code (ppxlib.generating-code)

    Generating AST Nodes

    The rewriter's core is a function that outputs code in the form of an AST. However, there are some issues with generating AST values when using the constructors directly:

    • The type is pretty verbose, with many fields rarely used.
    • The AST type might change at a version bump. In this case, the types used in the PPX would become incompatible with the types of the new OCaml version.

    The second point is important: since ppxlib translates the AST to the newest OCaml AST available before rewriting, your PPX would not only become incompatible with the new OCaml version, but also with all ppxlib versions released after the new AST type is introduced.

    For this reason, ppxlib provides abstractions over the OCaml AST, with a focus on usability and stability.

    The Different Options

    The two main options are:

    Ast_builder provides an API to generate AST nodes for the latest OCaml version in a backward-compatible way. Ppxlib_metaquot is different: it is a PPX that lets you generate OCaml AST nodes by writing OCaml code, using quotations and anti-quotations.

    Using Ppxlib_metaquot requires less knowledge of the OCaml AST than Ast_builder as it only uses natural OCaml syntax; however, it's more restrictive than `Ast_builder` for two reasons: first, it's less flexible, since on its own it lacks the ability to generate nodes dynamically from other kind of data: e.g. it's not possible to build an expression containing a string, given the string as input. Second, it's less general because it only allows users to generate few different nodes such as structure items, expressions, patterns, etc., but it is not possible to generate a value of type row_field_desc! A typical workflow is to use `metaquot` for the constant skeleton of the node, and to use the `metaquot` anti-quotation workflow (see below) together with `Ast_builder` to fill in the dynamic parts.

    Note: `Ppxlib` also re-exports the OCaml compiler API `Ast_helper` for historic reasons. It might get deprecated at some point, though. Please, use `Ast_builder` instead. manipulate the AST. This module is in ppxlib for compatiblity reasons and it is recommended to use Ast_builder instead.

    The AST_builder Module

    General Presentation

    The Ast_builder module provides several kinds of functions to generate AST nodes. The first kind are ones whose name matches closely the Parsetree type names. equivalents, but there are also "higher level" wrappers around those basic blocks for common patterns such as creating an integer or string constant.

    Low-Level Builders

    The function names match the Parsetree names closely, which makes it easy to build AST fragments by just knowing the Parsetree.

    For types wrapped in a record's _desc field, helpers are generated for each constructor that generates the record wrapper, e.g., for the type Parsetree.expression:

      type expression =
    +    { pexp_desc       : expression_desc
    +    ; pexp_loc        : Location.t
    +    ; pexp_attributes : attributes
    +    }
    +  and expression_desc =
    +    | Pexp_ident    of Longident.t loc
    +    | Pexp_constant of constant
    +    | Pexp_let      of rec_flag * value_binding list * expression
    +    ...

    The following helpers are created:

      val pexp_ident    : loc:Location.t -> Longident.t loc -> expression
    +  val pexp_constant : loc:Location.t -> constant -> expression
    +  val pexp_let      : loc:Location.t -> rec_flag -> value_binding list -> expression -> expression
    +  ...

    For other record types, such as type_declaration, we have the following helper:

      type type_declaration =
    +    { ptype_name       : string Located.t
    +    ; ptype_params     : (core_type * variance) list
    +    ; ptype_cstrs      : (core_type * core_type * Location.t) list
    +    ; ptype_kind       : type_kind
    +    ; ptype_private    : private_flag
    +    ; ptype_manifest   : core_type option
    +    ; ptype_attributes : attributes
    +    ; ptype_loc        : Location.t
    +    }
     
    -val type_declaration
    -  :  loc      : Location.t
    -  -> name     : string Located.t
    -  -> params   : (core_type * variance) list
    -  -> cstrs    : (core_type * core_type * Location.t) list
    -  -> kind     : type_kind
    -  -> private  : private_flag
    -  -> manifest : core_type option
    -  -> type_declaration

    Attributes are always set to the empty list. If you want to set them, you have to override the field with the { e with pexp_attributes = ... } notation.

    High-Level Builders

    Those functions are just wrappers on the low-level functions for simplifying the most common use. For instance, to simply create a 1 integer constant with the low-level building block, it would look like:

    Ast_builder.Default.pexp_constant ~loc (Parsetree.Pconst_integer ("1", None))

    This seems a lot for such a simple node. So, in addition to the low-level building blocks, Ast_builder provides higher level-building blocks, such as Ast_builder.Default.eint, to create integer constants:

    Ast_builder.Default.eint ~loc 1

    Those functions also follow a pattern in their name to make them easier to use. Functions that generate an expression start with an e, followed by what they build, such as eint, echar, estring, eapply, elist, etc. Similarly, names that start with a p define a pattern, such as pstring, pconstruct, punit, etc.

    Dealing With Locations

    As explained in the dedicated section, it is crucial to correctly deal with locations. For this, Ast_builder can be used in several ways, depending on the context:

    Ast_builder.Default contains functions which take the location as a named argument. This is the strongly recommended workflow and lets you control locations in a fine-grained way.

    If you have a concrete reason to specify the location once and for all, and always use this specific one later in AST constructions, you can use the Ast_builder.Make functor or the Ast_builder.make function (outputing a first order module). Notice that this is quite a rare use case.

    Compatibility

    In order to stay as compatible as possible when a new option appears in the AST, Ast_builder always integrates the new option in a retro-compatible way (this is the case since the AST bump from 4.13 to 4.14). So, the signature of each function won't change, and Ast_builder will choose a retrocompatible way of generating an updated type’s AST node.

    However, sometimes you might want to use a feature that was introduced recently in OCaml and is not integrated in Ast_builder. For instance, OCaml 4.14 introduced the possibility to explicitly introduce type variables in a constructor declaration. This modified the AST type, and for backwards compatibility, Ast_builder did not modify the signature of the function. It is thus impossible to generate code using this new feature via the `Ast_module` directly.

    In the case you need to access a new feature, you can use the Latest submodule (e.g., Ast_builder.Default.Latest when specifying the locations). This module includes new functions, letting you control all features introduced, at the cost of potentially breaking changes when a new feature modifies the function in use.

    If a feature that was introduced in some recent version of OCaml is essential for your PPX to work, it might imply that you need to restrict the OCaml version on your opam dependencies. Remember that ppxlib will rewrite using the latest Parsetree version, but it will then migrate the Parsetree back to the OCaml version of the switch, possibly losing the information given by the new feature.

    Metaquot Metaprogramming

    General Presentation

    As you have seen, defining code with Ast_builder does not feel perfectly natural. Some knowledge of the Parsetree types is needed. Yet, every part of a program we write corresponds to a specific AST node, so there is no need for AST generation to be more difficult than that.

    Metaquot is a very useful PPX that allows users to define values of a Parsetree type by writing natural code, using the quotations and antiquotations mechanism of metaprogramming.

    Simplifying a bit, Metaquot rewrites an expression extension point directly with its payload. Since the payload was parsed by the OCaml parser to a Parsetree type's value, this rewriting turns naturally written code into AST values.

    Usage

    First, in order to use Metaquot, add it in your preprocess Dune stanza:

    (preprocess (pps ppxlib.metaquot))

    Using Metaquot to generate code is simple: any Metaquot extension node in an expression context will be rewritten into the Parsetree value that lies in its payload. Notice that you'll need the Ppxlib opened, and a loc value of type Location.t in scope when using metaquot. That location will be attached to the Parsetree nodes your metaquot invokation produces. Getting the location right is extremely important for error messages.

    However, the Parsetree.payload of an extension node can only take few forms: a structure, a signature, a core type, or a pattern. We might want to generate other kind of nodes, such as expressions or structure items, for instance. Ppxlib_metaquot provides different extension nodes for this:

    • The expr extension node to generate expressions:

      let e = [%expr 1 + 1]
    • The pat extension node to generate patterns:

      let p = [%pat? ("", _)]
    • The type extension node to generate core types:

      let t = [%type: int -> string]
    • The stri extension node to generate structure_item, with its sigi counterpart for signature_item::

      let stri = [%stri let a = 1]
      -let sigi = [%sigi: val i : int]
    • The str and sig extension nodes to respectively generate structure and signature.

      let str =
      +  val type_declaration
      +    :  loc      : Location.t
      +    -> name     : string Located.t
      +    -> params   : (core_type * variance) list
      +    -> cstrs    : (core_type * core_type * Location.t) list
      +    -> kind     : type_kind
      +    -> private  : private_flag
      +    -> manifest : core_type option
      +    -> type_declaration

      Attributes are always set to the empty list. If you want to set them, you have to override the field with the { e with pexp_attributes = ... } notation.

      High-Level Builders

      Those functions are just wrappers on the low-level functions for simplifying the most common use. For instance, to simply create a 1 integer constant with the low-level building block, it would look like:

        Ast_builder.Default.pexp_constant ~loc (Parsetree.Pconst_integer ("1", None))

      This seems a lot for such a simple node. So, in addition to the low-level building blocks, Ast_builder provides higher level-building blocks, such as Ast_builder.Default.eint, to create integer constants:

        Ast_builder.Default.eint ~loc 1

      Those functions also follow a pattern in their name to make them easier to use. Functions that generate an expression start with an e, followed by what they build, such as eint, echar, estring, eapply, elist, etc. Similarly, names that start with a p define a pattern, such as pstring, pconstruct, punit, etc.

      Dealing With Locations

      As explained in the dedicated section, it is crucial to correctly deal with locations. For this, Ast_builder can be used in several ways, depending on the context:

      Ast_builder.Default contains functions which take the location as a named argument. This is the strongly recommended workflow and lets you control locations in a fine-grained way.

      If you have a concrete reason to specify the location once and for all, and always use this specific one later in AST constructions, you can use the Ast_builder.Make functor or the Ast_builder.make function (outputing a first order module). Notice that this is quite a rare use case.

      Compatibility

      In order to stay as compatible as possible when a new option appears in the AST, Ast_builder always integrates the new option in a retro-compatible way (this is the case since the AST bump from 4.13 to 4.14). So, the signature of each function won't change, and Ast_builder will choose a retrocompatible way of generating an updated type’s AST node.

      However, sometimes you might want to use a feature that was introduced recently in OCaml and is not integrated in Ast_builder. For instance, OCaml 4.14 introduced the possibility to explicitly introduce type variables in a constructor declaration. This modified the AST type, and for backwards compatibility, Ast_builder did not modify the signature of the function. It is thus impossible to generate code using this new feature via the `Ast_module` directly.

      In the case you need to access a new feature, you can use the Latest submodule (e.g., Ast_builder.Default.Latest when specifying the locations). This module includes new functions, letting you control all features introduced, at the cost of potentially breaking changes when a new feature modifies the function in use.

      If a feature that was introduced in some recent version of OCaml is essential for your PPX to work, it might imply that you need to restrict the OCaml version on your opam dependencies. Remember that ppxlib will rewrite using the latest Parsetree version, but it will then migrate the Parsetree back to the OCaml version of the switch, possibly losing the information given by the new feature.

      Metaquot Metaprogramming

      General Presentation

      As you have seen, defining code with Ast_builder does not feel perfectly natural. Some knowledge of the Parsetree types is needed. Yet, every part of a program we write corresponds to a specific AST node, so there is no need for AST generation to be more difficult than that.

      Metaquot is a very useful PPX that allows users to define values of a Parsetree type by writing natural code, using the quotations and antiquotations mechanism of metaprogramming.

      Simplifying a bit, Metaquot rewrites an expression extension point directly with its payload. Since the payload was parsed by the OCaml parser to a Parsetree type's value, this rewriting turns naturally written code into AST values.

      Usage

      First, in order to use Metaquot, add it in your preprocess Dune stanza:

        (preprocess (pps ppxlib.metaquot))

      Using Metaquot to generate code is simple: any Metaquot extension node in an expression context will be rewritten into the Parsetree value that lies in its payload. Notice that you'll need the Ppxlib opened, and a loc value of type Location.t in scope when using metaquot. That location will be attached to the Parsetree nodes your metaquot invokation produces. Getting the location right is extremely important for error messages.

      However, the Parsetree.payload of an extension node can only take few forms: a structure, a signature, a core type, or a pattern. We might want to generate other kind of nodes, such as expressions or structure items, for instance. Ppxlib_metaquot provides different extension nodes for this:

      • The expr extension node to generate expressions:

        let e = [%expr 1 + 1]
      • The pat extension node to generate patterns:

        let p = [%pat? ("", _)]
      • The type extension node to generate core types:

        let t = [%type: int -> string]
      • The stri extension node to generate structure_item, with its sigi counterpart for signature_item::

          let stri = [%stri let a = 1]
        +  let sigi = [%sigi: val i : int]
      • The str and sig extension nodes to respectively generate structure and signature.

        let str =
           [%str
             let x = 5
             let y = 6.3]
        @@ -39,32 +39,32 @@ let sigi = [%sigi: val i : int]
      • The str and let sig_ = [%sig: val x : int - val y : float]

    Note the replacement work when the extension node is an "expression" extension node: Indeed, the payload is a value (of Parsetree type) that would not fit elsewhere in the AST. So, let x : [%str "incoherent"] would not be rewritten by metaquot. (Actually, it also rewrites "pattern" extension nodes, as you'll see in the chapter on matching AST nodes.)

    Also note the : and ? in the sigi, type, and pat cases: they are needed for the payload to be parsed as the right kind of node.

    Consider now the extension node [%expr 1 + 1] in an expression context. Metaquot will actually expand it into the following code:

    {
    -  pexp_desc =
    -    (Pexp_apply
    -       ({
    -          pexp_desc = (Pexp_ident { txt = (Lident "+"); loc });
    -          pexp_loc = loc;
    -          pexp_attributes = []
    -        },
    -         [(Nolabel,
    -            {
    -              pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    -              pexp_loc = loc;
    -              pexp_attributes = []
    -            });
    -         (Nolabel,
    -           {
    -             pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    -             pexp_loc = loc;
    -             pexp_attributes = []
    -           })]));
    -  pexp_loc = loc;
    -  pexp_attributes = []
    -}

    Looking at the example, you might notice two things:

    • The AST types are used without a full path to the module.
    • There is a free variable named loc and of type Location.t in the code.

    So for this to compile, you need both to open ppxlib and to have a loc : Location.t variable in scope. The produced AST node value, and every other node within it, will be located in this loc. You should therefore make sure that loc is the location you want for your generated code when using metaquot.

    Anti-Quotations

    Using these extensions alone, you can only produce constant/static AST nodes. metaquot has a solution for that: anti-quotation. You can use anti-quotation to insert any expression representing an AST node. That way, you can include dynamically generated nodes inside a metaquot expression extension point.

    Consider the following example:

    let with_suffix_expr ~loc s =
    -  let dynamic_node = Ast_builder.Default.estring ~loc s in
    -  [%expr [%e dynamic_node] ^ "some_fixed_suffix"]

    The with_suffix_expr function will create an expression which represents the concatenation of the s argument and the fixed suffix, i.e., with_suffix_expr "some_dynamic_stem" is equivalent to [%expr "some_dynamic_stem" ^ "some_fixed_suffix"].

    The syntax for anti-quotation depends on the type of the node you wish to insert (which must also correspond to the context of the anti-quotation extension node):

    • e is the extension point used to anti-quote values of type expression:

      let f some_expr_node = [%expr 1 + [%e some_expr_node]]
    • p is the extension point used to anti-quote values of type pattern:

      let f some_pat_node = [%pat? (1, [%p some_pat_node])]
    • t is the extension point used to anti-quote values of type core_type:

      let f some_core_type_node [%type: int -> [%t some_core_type_node]]
    • m is the extension point used to anti-quote values of type module_expr or module_type:

      let f some_module_expr_node = [%expr let module M = [%m some_module_expr_node] in M.x]
      -let f some_module_type_node = [%sigi: module M : [%m some_module_type_node]]
    • i is the extension point used to anti-quote values of type structure_item or signature_item. Note that the syntax for structure/signature item extension nodes uses two %%:

      let f some_structure_item_node =
      +    val y : float]

    Note the replacement work when the extension node is an "expression" extension node: Indeed, the payload is a value (of Parsetree type) that would not fit elsewhere in the AST. So, let x : [%str "incoherent"] would not be rewritten by metaquot. (Actually, it also rewrites "pattern" extension nodes, as you'll see in the chapter on matching AST nodes.)

    Also note the : and ? in the sigi, type, and pat cases: they are needed for the payload to be parsed as the right kind of node.

    Consider now the extension node [%expr 1 + 1] in an expression context. Metaquot will actually expand it into the following code:

              {
    +            pexp_desc =
    +              (Pexp_apply
    +                 ({
    +                    pexp_desc = (Pexp_ident { txt = (Lident "+"); loc });
    +                    pexp_loc = loc;
    +                    pexp_attributes = []
    +                  },
    +                   [(Nolabel,
    +                      {
    +                        pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    +                        pexp_loc = loc;
    +                        pexp_attributes = []
    +                      });
    +                   (Nolabel,
    +                     {
    +                       pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    +                       pexp_loc = loc;
    +                       pexp_attributes = []
    +                     })]));
    +            pexp_loc = loc;
    +            pexp_attributes = []
    +          }

    Looking at the example, you might notice two things:

    • The AST types are used without a full path to the module.
    • There is a free variable named loc and of type Location.t in the code.

    So for this to compile, you need both to open ppxlib and to have a loc : Location.t variable in scope. The produced AST node value, and every other node within it, will be located in this loc. You should therefore make sure that loc is the location you want for your generated code when using metaquot.

    Anti-Quotations

    Using these extensions alone, you can only produce constant/static AST nodes. metaquot has a solution for that: anti-quotation. You can use anti-quotation to insert any expression representing an AST node. That way, you can include dynamically generated nodes inside a metaquot expression extension point.

    Consider the following example:

              let with_suffix_expr ~loc s =
    +            let dynamic_node = Ast_builder.Default.estring ~loc s in
    +            [%expr [%e dynamic_node] ^ "some_fixed_suffix"]

    The with_suffix_expr function will create an expression which represents the concatenation of the s argument and the fixed suffix, i.e., with_suffix_expr "some_dynamic_stem" is equivalent to [%expr "some_dynamic_stem" ^ "some_fixed_suffix"].

    The syntax for anti-quotation depends on the type of the node you wish to insert (which must also correspond to the context of the anti-quotation extension node):

    • e is the extension point used to anti-quote values of type expression:

      let f some_expr_node = [%expr 1 + [%e some_expr_node]]
    • p is the extension point used to anti-quote values of type pattern:

      let f some_pat_node = [%pat? (1, [%p some_pat_node])]
    • t is the extension point used to anti-quote values of type core_type:

      let f some_core_type_node [%type: int -> [%t some_core_type_node]]
    • m is the extension point used to anti-quote values of type module_expr or module_type:

      let f some_module_expr_node = [%expr let module M = [%m some_module_expr_node] in M.x]
      +let f some_module_type_node = [%sigi: module M : [%m some_module_type_node]]
    • i is the extension point used to anti-quote values of type structure_item or signature_item. Note that the syntax for structure/signature item extension nodes uses two %%:

      let f some_structure_item_node =
         [%str
           let a = 1
       
      @@ -74,5 +74,5 @@ let f some_signature_item_node =
         [%sig:
           val a : int
       
      -    [%%i some_signature_item_node]]

    If an anti-quote extension node is in the wrong context, it won't be rewritten by Metaquot. For instance, in [%expr match [] with [%e some_value] -> 1] the anti-quote extension node for expressions is put in a pattern context, and it won't be rewritten.

    On the contrary, you should use anti-quotes whose kind ([%e ...], [%p ...]) match the context. For example, you should write:

    let let_generator pat type_ expr =
    -  [%stri let [%p pat] : [%t type_] = [%e expr]] ;;

    Finally, remember that we are inserting values, so we never use patterns in the payloads of anti-quotations. Those will be used for matching.

    \ No newline at end of file + [%%i some_signature_item_node]]

    If an anti-quote extension node is in the wrong context, it won't be rewritten by Metaquot. For instance, in [%expr match [] with [%e some_value] -> 1] the anti-quote extension node for expressions is put in a pattern context, and it won't be rewritten.

    On the contrary, you should use anti-quotes whose kind ([%e ...], [%p ...]) match the context. For example, you should write:

      let let_generator pat type_ expr =
    +    [%stri let [%p pat] : [%t type_] = [%e expr]] ;;

    Finally, remember that we are inserting values, so we never use patterns in the payloads of anti-quotations. Those will be used for matching.

    diff --git a/ppxlib/good-practices.html b/ppxlib/good-practices.html index 05a3407..b232a81 100644 --- a/ppxlib/good-practices.html +++ b/ppxlib/good-practices.html @@ -1,72 +1,71 @@ -good-practices (ppxlib.good-practices)

    Good Practices

    Respecting Locations

    Correctly dealing with location is essential to correctly generate OCaml code. They are necessary for error reporting by the compiler, but more generally for Merlin's features to work, such as displaying occurrences and jumping to definition. When called, the driver is called with the -check and -check-locations flags, ppxlib makes it is a requirement that locations follow some rules in order to accept the rewriting, as it will check that some invariants are respected.

    The Invariants

    The invariants are as follows:

    • AST nodes are requested to be well-nested WRT locations
    • the locations of "sibling" AST nodes should not overlap

    This is required for Merlin to behave properly.

    Indeed, for almost any query directed at Merlin, it will need to inspect the context around the user's cursor to give an answer that makes sense. And the only input it has to do that is the cursor’s position in the buffer. The handling of most queries starts by traversing the AST, using the locations of nodes to select the right branch. (1) is necessary to avoid discarding subtrees too early, (2) is used to avoid Merlin making arbitrary choices (if you ask for the type under the cursor, and there seems to be two things under the cursor, Merlin will need to pick one).

    Guidelines for Writing Well-Behaved PPXs

    It's obviously not always (indeed rarely) possible to mint new locations when manipulating the AST.

    The intended way to deal with locations is this:

    • AST nodes that exist in the source should keep their original location
    • new nodes should be given a "ghost" location (i.e., { some_loc with loc_ghost = true }) to indicate that the node doesn't exist in the sources.

    In particular, Location.none is never meant to be used by PPX authors, where some location is always available (for instance, derivers and extenders at least know the locations of their relevant node).

    Both the new check and Merlin will happily traverse the ghost nodes as if they didn't exist. Note: this comes into play when deciding which nodes are "siblings," for instance, if your AST is:

      A (B1(C, D),
    -     B2(X, Y))

    but B2 has a ghost location, then B1, X and Y are considered siblings.

    Additionally, there is an attribute [@merlin.hide] that you can add on nodes to tell Merlin (and the check) to ignore this node and all of its children. Some helpers for this are provided in Merlin_helpers.

    Handling Errors

    In order to give a nice user experience when using a PPX, it is necessary that the resulting parsetree is as complete as possible. Most IDE tools, such as Merlin, rely on the AST for their features, such as displaying type, jumping to definition, or showing the list of errors.

    In order to achieve this, errors that happen during rewriting should be handled in a way that do not prevent a meaningful AST to be passed to Merlin.

    There are mainly two ways to report errors when writing a PPX.

    • By embedding special extensions nodes, called "error nodes", inside the generated code.
    • By raising a sepcific exception, letting the ppxlib driver handle the error.

    Let us emphasize that, while exceptions can be practical to quickly fail with an error, the embedding mechanism has many advantages. For instance, embedding allows to report multiple errors, and to output the part of the code that could be generated successfully.

    Embedding the Errors in the AST

    It is better to always return a valid AST, as complete as possible, but with "error extension nodes" at every place where successful code generation was impossible. Error extension nodes are special extension nodes [%ocaml.error "error_message"] that can be embedded into a valid AST and are interpreted later as errors, e.g., by the compiler or Merlin. As all extension nodes, they can be put at many places in the AST to replace structure items, expressions, or patterns, for example.

    So whenever you're in doubt whether to throw an exception or if to embed the error as an error extension node when writing a PPX rewriter, embed the error is the way to go! And whenever you're in doubt about where exactly to embed the error inside the AST, a good ground rule is: as deep in the AST as possible.

    For instance, suppose a rewriter is supposed to define a new record type, but there is an error in one field’s type generation. In order to have the most complete AST as output, the rewriter can still define the type and all of its fields, putting an extension node in place of the type of the faulty field:

    type long_record = {
    -  field_1: int;
    -  field_2: [%ocaml.error "field_2 could not be implemented due to foo"];
    -}

    ppxlib provides a function in its API to create error extension nodes: error_extensionf. This function creates an extension node, which then must be transformed in the right kind of node using functions such as pexp_extension.

    A Documented Example

    Let us give an example. We will define a deriver on types records, which constructs a default value from a given type. For instance, the derivation on the type type t = { x:int; y: float; z: string} would yield let default_t = -{x= 0; y= 0.; z= ""}. This deriver has two limitations:

    1. It does not work on other types than records,
    2. It only works for records containing fields of type string, int, or float.

    The rewriter should warn the user about these limitations with a good error reporting. Let’s first look at the second point. Here is the function mapping the fields from the type definition to a default expression.

    let create_record ~loc fields =
    -  let declaration_to_instantiation (ld : label_declaration) =
    -    let loc = ld.pld_loc in
    -    let { pld_type; pld_name; _ } = ld in
    -    let e =
    -      match pld_type with
    -      | { ptyp_desc = Ptyp_constr ({ txt = Lident "string"; _ }, []); _ } ->
    -          pexp_constant ~loc (Pconst_string ("", loc, None))
    -      | { ptyp_desc = Ptyp_constr ({ txt = Lident "int"; _ }, []); _ } ->
    -          pexp_constant ~loc (Pconst_integer ("0", None))
    -      | { ptyp_desc = Ptyp_constr ({ txt = Lident "float"; _ }, []); _ } ->
    -          pexp_constant ~loc (Pconst_float ("0.", None))
    -      | _ ->
    -          pexp_extension ~loc
    -          @@ Location.error_extensionf ~loc
    -               "Default value can only be derived for int, float, and string."
    -    in
    -    ({ txt = Lident pld_name.txt; loc }, e)
    -  in
    -  let l = List.map fields ~f:declaration_to_instantiation in
    -  pexp_record ~loc l None

    When the record definition contains several fields with types other than int, float, or string, several error nodes are added in the AST. Moreover, the location of the error nodes corresponds to the field record's definition. This allows tools such as Merlin to report all errors at once, at the right location, resulting in a better workflow than having to recompile every time an error is corrected to see the next one.

    The first limitation is that the deriver cannot work on non-record types. However, we decided here to derive a default value, even in the case of non-record types, so that it does not appear as undefined in the remaining of the file. This impossible value consists of an error extension node.

    let generate_impl ~ctxt (_rec_flag, type_declarations) =
    -  let loc = Expansion_context.Deriver.derived_item_loc ctxt in
    -  List.map type_declarations ~f:(fun (td : type_declaration) ->
    -      let e, name =
    -        match td with
    -        | { ptype_kind = Ptype_record fields; ptype_name; ptype_loc; _ } ->
    -            (create_record ~loc:ptype_loc fields, ptype_name)
    -        | { ptype_name; ptype_loc; _ } ->
    -            ( pexp_extension ~loc
    -              @@ Location.error_extensionf ~loc:ptype_loc
    -                   "Cannot derive accessors for non record type %s"
    -                   ptype_name.txt,
    -              ptype_name )
    -      in
    -      [
    -        pstr_value ~loc Nonrecursive
    -          [
    -            {
    -              pvb_pat = ppat_var ~loc { txt = "default_" ^ name.txt; loc };
    -              pvb_expr = e;
    -              pvb_attributes = [];
    -              pvb_loc = loc;
    -            };
    -          ];
    -      ])
    -  |> List.concat

    Quoting

    Quoting is part of producing hygienic code. But before talking about the solution, let's introduce the problem.

    Say you are writing an extension rewriter, which takes an expression as payload, and would replace all identifiers id in the expression with a similar expression, but with a printing debug:

    let x = 0 in
    -let y = 2 in
    -[%debug x + 1, y + 2 ]

    would generate the following code:

    let x = 0 in
    -let y = 2 in
    -let debug = Printf.printf "%s = %d; " in
    -(debug "x" x ; x) + 1,
    -(debug "y" y ; y) + 2

    When executed, the code would print x = 0; y = 2; . So far, so good. However, suppose now that instead of x, the variable is named debug. The following seemingly equivalent code:

    let debug = 0 in
    -let y = 2 in
    -[%debug debug + 1, y + 2 ]

    would generate:

    let debug = 0 in
    -let y = 2 in
    -let debug = Printf.printf "%s = %d; " in
    -(debug "debug" debug ; debug) + 1,
    -(debug "y" y ; y) + 2

    which does not even type-check! The problem is that the payload is expected to be evaluated in some environment where debug has some value and type, but the rewriting modifies this environment and shadows the debug name.

    "Quoting" is a mechanism to prevent this problem from happenning. In ppxlib, it is done through the Expansion_helpers.Quoter module in several steps:

    • First, create a quoter using the create function:
    # open Expansion_helper ;;
    -#s let quoter = Quoter.create () ;;
    -val quoter : Quoter.t = <abstr>
    • Then, use Expansion_helpers.Quoter.quote to quote all the expressions that are given from the user, might rely on a context, and that you want "intact."
    # let quoted_part = Quoter.quote quoter part_to_quote ;;
    -val quoted_payload : expression =
    # let result = Expansion_helpers.Quoter.sanitize ~quoter rewritten_expression ;;
    -val result : expression =
    -...

    If the debug rewriter had been written using this method, the quoting would have ensured that the payload is evaluated in the same context as the extension node!

    Here is an example on how to write a debug rewriter (with the limitation that the payload should not contain variable binding, but the code was left simple to illustrate quoting):

    # let rewrite expr =
    +good-practices (ppxlib.good-practices)

    Good Practices

    Respecting Locations

    Correctly dealing with location is essential to correctly generate OCaml code. They are necessary for error reporting by the compiler, but more generally for Merlin's features to work, such as displaying occurrences and jumping to definition. When called, the driver is called with the -check and -check-locations flags, ppxlib makes it is a requirement that locations follow some rules in order to accept the rewriting, as it will check that some invariants are respected.

    The Invariants

    The invariants are as follows:

    • AST nodes are requested to be well-nested WRT locations
    • the locations of "sibling" AST nodes should not overlap

    This is required for Merlin to behave properly.

    Indeed, for almost any query directed at Merlin, it will need to inspect the context around the user's cursor to give an answer that makes sense. And the only input it has to do that is the cursor’s position in the buffer. The handling of most queries starts by traversing the AST, using the locations of nodes to select the right branch. (1) is necessary to avoid discarding subtrees too early, (2) is used to avoid Merlin making arbitrary choices (if you ask for the type under the cursor, and there seems to be two things under the cursor, Merlin will need to pick one).

    Guidelines for Writing Well-Behaved PPXs

    It's obviously not always (indeed rarely) possible to mint new locations when manipulating the AST.

    The intended way to deal with locations is this:

    • AST nodes that exist in the source should keep their original location
    • new nodes should be given a "ghost" location (i.e., { some_loc with loc_ghost = true }) to indicate that the node doesn't exist in the sources.

    In particular, Location.none is never meant to be used by PPX authors, where some location is always available (for instance, derivers and extenders at least know the locations of their relevant node).

    Both the new check and Merlin will happily traverse the ghost nodes as if they didn't exist. Note: this comes into play when deciding which nodes are "siblings," for instance, if your AST is:

      A (B1(C, D),
    +     B2(X, Y))

    but B2 has a ghost location, then B1, X and Y are considered siblings.

    Additionally, there is an attribute [@merlin.hide] that you can add on nodes to tell Merlin (and the check) to ignore this node and all of its children. Some helpers for this are provided in Merlin_helpers.

    Handling Errors

    In order to give a nice user experience when using a PPX, it is necessary that the resulting parsetree is as complete as possible. Most IDE tools, such as Merlin, rely on the AST for their features, such as displaying type, jumping to definition, or showing the list of errors.

    In order to achieve this, errors that happen during rewriting should be handled in a way that do not prevent a meaningful AST to be passed to Merlin.

    There are mainly two ways to report errors when writing a PPX.

    • By embedding special extensions nodes, called "error nodes", inside the generated code.
    • By raising a sepcific exception, letting the ppxlib driver handle the error.

    Let us emphasize that, while exceptions can be practical to quickly fail with an error, the embedding mechanism has many advantages. For instance, embedding allows to report multiple errors, and to output the part of the code that could be generated successfully.

    Embedding the Errors in the AST

    It is better to always return a valid AST, as complete as possible, but with "error extension nodes" at every place where successful code generation was impossible. Error extension nodes are special extension nodes [%ocaml.error "error_message"] that can be embedded into a valid AST and are interpreted later as errors, e.g., by the compiler or Merlin. As all extension nodes, they can be put at many places in the AST to replace structure items, expressions, or patterns, for example.

    So whenever you're in doubt whether to throw an exception or if to embed the error as an error extension node when writing a PPX rewriter, embed the error is the way to go! And whenever you're in doubt about where exactly to embed the error inside the AST, a good ground rule is: as deep in the AST as possible.

    For instance, suppose a rewriter is supposed to define a new record type, but there is an error in one field’s type generation. In order to have the most complete AST as output, the rewriter can still define the type and all of its fields, putting an extension node in place of the type of the faulty field:

       type long_record = {
    +     field_1: int;
    +     field_2: [%ocaml.error "field_2 could not be implemented due to foo"];
    +   }

    ppxlib provides a function in its API to create error extension nodes: error_extensionf. This function creates an extension node, which then must be transformed in the right kind of node using functions such as pexp_extension.

    A Documented Example

    Let us give an example. We will define a deriver on types records, which constructs a default value from a given type. For instance, the derivation on the type type t = { x:int; y: float; z: string} would yield let default_t = {x= 0; y= 0.; z= ""}. This deriver has two limitations:

    1. It does not work on other types than records,
    2. It only works for records containing fields of type string, int, or float.

    The rewriter should warn the user about these limitations with a good error reporting. Let’s first look at the second point. Here is the function mapping the fields from the type definition to a default expression.

              let create_record ~loc fields =
    +            let declaration_to_instantiation (ld : label_declaration) =
    +              let loc = ld.pld_loc in
    +              let { pld_type; pld_name; _ } = ld in
    +              let e =
    +                match pld_type with
    +                | { ptyp_desc = Ptyp_constr ({ txt = Lident "string"; _ }, []); _ } ->
    +                    pexp_constant ~loc (Pconst_string ("", loc, None))
    +                | { ptyp_desc = Ptyp_constr ({ txt = Lident "int"; _ }, []); _ } ->
    +                    pexp_constant ~loc (Pconst_integer ("0", None))
    +                | { ptyp_desc = Ptyp_constr ({ txt = Lident "float"; _ }, []); _ } ->
    +                    pexp_constant ~loc (Pconst_float ("0.", None))
    +                | _ ->
    +                    pexp_extension ~loc
    +                    @@ Location.error_extensionf ~loc
    +                         "Default value can only be derived for int, float, and string."
    +              in
    +              ({ txt = Lident pld_name.txt; loc }, e)
    +            in
    +            let l = List.map fields ~f:declaration_to_instantiation in
    +            pexp_record ~loc l None

    When the record definition contains several fields with types other than int, float, or string, several error nodes are added in the AST. Moreover, the location of the error nodes corresponds to the field record's definition. This allows tools such as Merlin to report all errors at once, at the right location, resulting in a better workflow than having to recompile every time an error is corrected to see the next one.

    The first limitation is that the deriver cannot work on non-record types. However, we decided here to derive a default value, even in the case of non-record types, so that it does not appear as undefined in the remaining of the file. This impossible value consists of an error extension node.

              let generate_impl ~ctxt (_rec_flag, type_declarations) =
    +            let loc = Expansion_context.Deriver.derived_item_loc ctxt in
    +            List.map type_declarations ~f:(fun (td : type_declaration) ->
    +                let e, name =
    +                  match td with
    +                  | { ptype_kind = Ptype_record fields; ptype_name; ptype_loc; _ } ->
    +                      (create_record ~loc:ptype_loc fields, ptype_name)
    +                  | { ptype_name; ptype_loc; _ } ->
    +                      ( pexp_extension ~loc
    +                        @@ Location.error_extensionf ~loc:ptype_loc
    +                             "Cannot derive accessors for non record type %s"
    +                             ptype_name.txt,
    +                        ptype_name )
    +                in
    +                [
    +                  pstr_value ~loc Nonrecursive
    +                    [
    +                      {
    +                        pvb_pat = ppat_var ~loc { txt = "default_" ^ name.txt; loc };
    +                        pvb_expr = e;
    +                        pvb_attributes = [];
    +                        pvb_loc = loc;
    +                      };
    +                    ];
    +                ])
    +            |> List.concat

    Quoting

    Quoting is part of producing hygienic code. But before talking about the solution, let's introduce the problem.

    Say you are writing an extension rewriter, which takes an expression as payload, and would replace all identifiers id in the expression with a similar expression, but with a printing debug:

      let x = 0 in
    +  let y = 2 in
    +  [%debug x + 1, y + 2 ]

    would generate the following code:

      let x = 0 in
    +  let y = 2 in
    +  let debug = Printf.printf "%s = %d; " in
    +  (debug "x" x ; x) + 1,
    +  (debug "y" y ; y) + 2

    When executed, the code would print x = 0; y = 2; . So far, so good. However, suppose now that instead of x, the variable is named debug. The following seemingly equivalent code:

      let debug = 0 in
    +  let y = 2 in
    +  [%debug debug + 1, y + 2 ]

    would generate:

      let debug = 0 in
    +  let y = 2 in
    +  let debug = Printf.printf "%s = %d; " in
    +  (debug "debug" debug ; debug) + 1,
    +  (debug "y" y ; y) + 2

    which does not even type-check! The problem is that the payload is expected to be evaluated in some environment where debug has some value and type, but the rewriting modifies this environment and shadows the debug name.

    "Quoting" is a mechanism to prevent this problem from happenning. In ppxlib, it is done through the Expansion_helpers.Quoter module in several steps:

    • First, create a quoter using the create function:
      # open Expansion_helper ;;
    +  #s let quoter = Quoter.create () ;;
    +  val quoter : Quoter.t = <abstr>
    • Then, use Expansion_helpers.Quoter.quote to quote all the expressions that are given from the user, might rely on a context, and that you want "intact."
      # let quoted_part = Quoter.quote quoter part_to_quote ;;
    +  val quoted_payload : expression =
      # let result = Expansion_helpers.Quoter.sanitize ~quoter rewritten_expression ;;
    +  val result : expression =
    +  ...

    If the debug rewriter had been written using this method, the quoting would have ensured that the payload is evaluated in the same context as the extension node!

    Here is an example on how to write a debug rewriter (with the limitation that the payload should not contain variable binding, but the code was left simple to illustrate quoting):

    # let rewrite expr =
         (* Create a quoter *)
         let quoter = Quoter.create () in
         (* An AST mapper to log and replace variables with quoted ones *)
    @@ -99,9 +98,9 @@ val result : expression =
           [%expr
             let debug = Printf.printf "%s = %d; " in
             [%e quoted_rewrite]] ;;
    -  val rewrite : expression -> expression = <fun>

    With Ppxlib's current quoting mechanism, the code given in that example would look like:

    # Format.printf "%a\n" Pprintast.expression @@ rewrite [%expr debug + 1, y + 2] ;;
    -let rec __1 = y
    -and __0 = debug in
    -let debug = Printf.printf "%s = %d; " in
    -(((debug "debug" __0; __0) + 1), ((debug "y" __1; __1) + 2))
    -- : unit = ()

    Testing Your PPX

    This section is not yet written. You can refer to this blog post (notice that that blog post was written before `dune` introduced its cram test feature), or contribute to the ppxlib documentation by opening a pull request in the repository.

    Migrate From Other Preprocessing Systems

    This section is not yet written. You can contribute to the ppxlib documentation by opening a pull request in the repository.

    Other good practices

    There are many good practices or other way to use ppxlib that are not mentioned in this manual. For instance, (in very short), you should always try to fully qualify variable names that are generated into the code via a PPX.

    if you want to add a section to this "good practices" manual, you can contribute to the ppxlib documentation by opening a pull request in the repository.

    \ No newline at end of file + val rewrite : expression -> expression = <fun>

    With Ppxlib's current quoting mechanism, the code given in that example would look like:

      # Format.printf "%a\n" Pprintast.expression @@ rewrite [%expr debug + 1, y + 2] ;;
    +  let rec __1 = y
    +  and __0 = debug in
    +  let debug = Printf.printf "%s = %d; " in
    +  (((debug "debug" __0; __0) + 1), ((debug "y" __1; __1) + 2))
    +  - : unit = ()

    Testing Your PPX

    This section is not yet written. You can refer to this blog post (notice that that blog post was written before `dune` introduced its cram test feature), or contribute to the ppxlib documentation by opening a pull request in the repository.

    Migrate From Other Preprocessing Systems

    This section is not yet written. You can contribute to the ppxlib documentation by opening a pull request in the repository.

    Other good practices

    There are many good practices or other way to use ppxlib that are not mentioned in this manual. For instance, (in very short), you should always try to fully qualify variable names that are generated into the code via a PPX.

    if you want to add a section to this "good practices" manual, you can contribute to the ppxlib documentation by opening a pull request in the repository.

    diff --git a/ppxlib/index.html b/ppxlib/index.html index 7d2467a..970f1ac 100644 --- a/ppxlib/index.html +++ b/ppxlib/index.html @@ -1,2 +1,2 @@ -index (ppxlib.index)

    Package ppxlib

    Overview

    This is the user manual and API for ppxlib, the core of the PPX meta-programming system for OCaml and its derivatives, such as Reason. For a good introduction on PPXs, what they are, and how to use them, see the OCaml official guide on PPXs. This manual is mostly aimed at authors of PPX rewriters and contains everything one should know in order to write PPX rewriters.

    Manual

    The manual consists of several sections. It can be read linearly, but you can also jump directly to your section of interest:

    1. An introduction to ppxlib
    2. How ppxlib works internally
    3. Registering a transformation
    4. Generating AST nodes
    5. Destructing AST nodes
    6. Traversing the AST
    7. Good practices
    8. Examples

    API

    The API exposes the following modules:

    Package info

    changes-files
    license-files
    readme-files
    \ No newline at end of file +index (ppxlib.index)

    Package ppxlib

    Overview

    This is the user manual and API for ppxlib, the core of the PPX meta-programming system for OCaml and its derivatives, such as Reason. For a good introduction on PPXs, what they are, and how to use them, see the OCaml official guide on PPXs. This manual is mostly aimed at authors of PPX rewriters and contains everything one should know in order to write PPX rewriters.

    Manual

    The manual consists of several sections. It can be read linearly, but you can also jump directly to your section of interest:

    1. An introduction to ppxlib
    2. How ppxlib works internally
    3. Registering a transformation
    4. Generating AST nodes
    5. Destructing AST nodes
    6. Traversing the AST
    7. Good practices
    8. Examples

    API

    The API exposes the following modules:

    Package info

    changes-files
    license-files
    readme-files
    diff --git a/ppxlib/matching-code.html b/ppxlib/matching-code.html index 86b2a9d..199f8fa 100644 --- a/ppxlib/matching-code.html +++ b/ppxlib/matching-code.html @@ -1,115 +1,115 @@ -matching-code (ppxlib.matching-code)

    Destructing AST Nodes

    In the previous chapter, we have seen how to generate code. However, the transformation function should depend on its input (the payload and maybe the derived item), which we have to be able to inspect.

    Once again, directly inspecting the Parsetree value that we get as input is not a good option because it is very big to manipulate and can break at every new OCaml release. For instance, let's consider the case of ppx_inline_test. We want to recognize and extract the name and expression only from the form patterns:

    [%%test let "name" = expr]

    If we wrote a function accepting the payload of [%%test], and extracting the name and expression from it, using normal pattern matching we would have:

    # let match_payload ~loc payload =
    -    match payload with
    -    | PStr
    -        [
    -          {
    -            pstr_desc =
    -              Pstr_value
    -                ( Nonrecursive,
    -                  [
    -                    {
    -                      pvb_pat =
    -                        {
    -                          ppat_desc =
    -                            Ppat_constant (Pconst_string (name, _, None));
    -                          _;
    -                        };
    -                      pvb_expr = expr;
    -                      _;
    -                    };
    -                  ] );
    -            _;
    -          };
    -        ] ->
    -        Ok (name, expr)
    -    | _ -> Error (Location.Error.createf ~loc "Wrong pattern") ;;
    - val match_payload :
    -   loc:location -> payload -> (string * expression, Location.Error.t) result =

    ppxlib's solution to the verbosity and stability problem is to provide helpers to match the AST, in a very similar way to what it does for generating AST nodes.

    The Different Options

    In this chapter, we will often mention the similarities between matching code and generating code (from the previous chapter). Indeed, the options provided by ppxlib to match AST nodes mirror the ones for generating nodes:

    Ast_pattern is used in Extension.V3.declare, so you will need it to write extenders. Ppxlib_metaquot is, as for generating nodes, more natural to use but also restricted to some cases.

    The Ast_pattern Module

    A match is a "structural destruction" of a value into multiple subvalues to continue the computation. For instance, in the example above from the single variable payload, we structurally extract two variables: name and expr.

    Destruction is very similar to construction, but in reverse. Instead of using several values to build a bigger one, we use one big value to define smaller ones. As an illustration, note how in OCaml the following construction and destruction are close:

    let big = { x ; y }      (** Construction from [x] and [y]      *)
    -let { x ; y } = big      (** Destruction recovering [x] and [y] *)

    For the same reason, building AST nodes using Ast_builder and destructing AST nodes using Ast_pattern look very similar. The difference is that in the construction "leaf," Ast_builder uses actual values, while Ast_pattern has "wildcards" at the leafs.

    Consider the example in the introduction matching [%%test let "name" = expr]. Building such an expression with Ast_builder could look like:

    # let build_payload_test ~loc name expr =
    -    let (module B) = Ast_builder.make loc in
    -    let open B in
    -    Parsetree.PStr
    -      (pstr_value Nonrecursive
    -        (value_binding ~pat:(pstring name) ~expr :: [])
    -      :: []) ;;
    -val build_payload_test :
    -  loc:location -> string -> expression -> payload =
    -  <abstr>

    Constructing a first-class pattern is almost as simple as replacing Ast_builder with Ast_pattern, as well as replacing the base values name and expr with a capturing wildcard:

    # let destruct_payload_test () =
    -    let open Ast_pattern in
    -    pstr
    -      (pstr_value nonrecursive
    -         (value_binding ~pat:(pstring __) ~expr:__ ^:: nil)
    -      ^:: nil) ;;
    -val destruct_payload_test :
    -  unit -> (payload, string -> expression -> 'a, 'a) Ast_pattern.t =
    -  <abstr>

    Note that to facilitate viewing the similarity, we wrote [v] as v :: [], and we added a unit argument to avoid value restriction to mess with the type (that we explained right in the next section).

    The Type for Patterns

    The Ast_pattern.t type reflects the fact that a pattern-match or destruction is taking a value, extracting other values from it, and using them to finally output something. So, a value v of type (matched, cont, res) Ast_pattern.t means that:

    • The type of values matched by v is matched. For instance, matched could be payload.
    • The continuation (what to do with the extracted values) has type cont. The values extracted from the destruction are passed as an argument to the continuation, therefore cont includes information about them. For instance, for a pattern that captures an int and a string, cont could be int -> string -> structure. The continuation is not part of v; it will be given with the value to match.
    • The result of the computation has type res. Note that this is additional information than what we have in cont: Ast_pattern.map_result allows mapping the continuation result through a function! This allows users to add a "construction" post-processing to the continuation. A value of type (pattern, int -> int, expression) Ast_pattern.t would contain how to extract an integer from a pattern and how to map a modified int into an expression.

    In the case of the example above, destruct_payload_test has type:

    # destruct_payload_test ;;
    -val destruct_payload_test :
    -  (payload, string -> expression -> 'a, 'a) Ast_pattern.t =
    -  <abstr>

    as it destructs values of type pattern extracts two values, respectively, of type string and expression, so the continuation has type string -> expression -> 'a. Then the result type is 'a since no mapping on the result is made. Now that the type of Ast_pattern.t is explained, the type of Ast_pattern.parse_res, the function for applying patterns, should make sense:

    # Ast_pattern.parse_res ;;
    -val parse_res :
    -  ( 'matched, 'cont, 'res ) t ->
    -  Location.t ->
    -  ?on_error:( unit -> 'res) ->
    -  'matched ->
    -  'cont ->
    -  ( 'res, Location.Error.t Stdppx.NonEmptyList.t ) result =
    -  <fun>

    This function takes a pattern expecting values of type 'matched, continuations of type 'cont and output values of type ('res, _) result (where the error case is when the 'matched value does not have the expected structure). The types of the function's other arguments correspond to this understanding: the argument of type 'matched is the value to match, the one of type 'cont is the continuation, and the result of applying the pattern to those two values is of type 'res!

    Composing construction and destruction yield the identity:

    # let f name expr = 
    -    Ast_pattern.parse_res
    -      (destruct_payload_test ()) Location.none
    -      (build_payload_test ~loc name expr)
    -      (fun name expr -> (name, expr)) ;;
    -val f :
    -  string ->
    -  expression ->
    -  (string * expression, _) result = <fun>
    -# f "name" [%expr ()] ;;
    -Ok
    - ("name",
    -  {pexp_desc =
    -    Pexp_construct
    -     ({txt = Lident "()";
    -  ...}...)...}...)

    While the Ast_pattern.parse_res function is useful to match an AST node, you will also need the Ast_pattern.t value in other contexts. For instance, it is used when declaring extenders with Extension.declare to tell how to extract arguments from the payload to give them to the extender, or when parsing with deriving arguments.

    Building Patterns

    Now that we know what these patterns represent and how to use them, and have seen an example in the introduction on Ast_pattern, the combinators in the API should be much more easily understandable. So, for a comprehensive list of the different values in the module, the reader should directly refer to the API. In this guide; however, we explain in more detail a few important values with examples.

    The wildcard pattern | x -> . The simplest way to extract a value from something is just to return it! In Ast_pattern, it corresponds to the value __ (of type ('a, 'a -> 'b, 'b)), which extract the value it's given: matching a value v with this pattern and a continuation k would simply call k v.

    This pattern is useful in combination with other combinators.

    The wildcard-dropping pattern | _ -> . Despite their name ressemblance, __ is very different from the OCaml pattern-match wildcard _, which accepts everything but ignores its input. In Ast_pattern, the wildcard-dropping pattern is drop. Again, it is useful in conjunction with other combinators, where one needs to accept all input in some places, but the value is not relevant.

    The | p as name -> combinator. The combinator as__ allows passing a node to the continuation while still extracting values from this node. For instance, as__ (some __) corresponds to the OCaml pattern-match Some n2 as n1, where the continuation is called with k n1 n2.

    The | (p1 | p2) -> combinator. The combinator alt combines two patterns with the same type for extracted values into one pattern by first trying to apply the first, and if it fails, by applying the second one. For instance, alt (pair (some __) drop) (pair drop (some __)) corresponds to the OCaml pattern (Some a, _) | (_, Some b).

    The constant patterns | "constant" -> . Using Ast_pattern.cst it is possible to create patterns matching only fixed values, such as the "constant" string. No values are extracted from this matching. The functions for creating such values are Ast_pattern.int, Ast_pattern.string, Ast_pattern.bool, ...

    The common deconstructors. Many usual common constructors have "deconstructors" in Ast_pattern. For instance:

    • some __ corresponds to Some a,
    • __ ^:: drop ^:: nil correspnds to a :: _ :: [],
    • pair __ __ (or equivalently __ ** __) corresponds to (a,b), etc.

    The Parsetree deconstructors. All constructors from Ast_builder have a "deconstructor" in Ast_pattern with the same name. For instance, since Ast_builder has a constructor pstr_value to build a structure item from a rec_flag and a value_binding list. Ast_pattern has an equally named pstr_value which, given ways to destruct rec flags and value_binding lists, creates a destructor for structure items.

    The continuation modifiers. Many Ast_pattern values allow modifying the continuation. It can be it a map on the continuation itself, the argument to the continuation, or the result of the continuation. So, Ast_pattern.map transforms the continuation itself, e.g., map ~f:Fun.flip will switch the arguments of the function. map<i> modifies the arguments to a continuation of arity i: map2 ~f:combine is equivalent to map ~f:(fun k -> (fun x y -> k (combine x y))). Finally, Ast_pattern.map_result modifies the continuation's result, and map_result ~f:ignore would ignore the continuation's result.

    Common patterns Some patterns are sufficiently common that, although they can be built from smaller bricks, they are already defined in Ast_pattern. For instance, matching a single expression in a payload is given as Ast_pattern.single_expr_payload.

    Useful patterns and examples

    Below, is a list of patterns that are commonly needed when using Ast_pattern:

    open Ast_pattern
    • A pattern to extract an expression from an extension point payload:
    # let extractor () = single_expr_payload __ ;
    -val extractor : unit -> (payload, expression -> 'a, 'a) t = <fun>
    • A pattern to extract a string from an extension point payload:
    # let extractor () = single_expr_payload (estring __) ;
    -val extractor : unit -> (payload, string -> 'a, 'a) t = <fun>
    • A pattern to extract a pair int * float from an extension point payload:
    # let extractor () = single_expr_payload (pexp_tuple (eint __ ^:: efloat __ ^:: nil)) ;;
    -val extractor : unit -> (payload, int -> string -> 'a, 'a) t = <fun>
    • A pattern to extract a list of integers from an extension point payload, given as a tuple (of unfixed length):
    # let extractor () = single_expr_payload (pexp_tuple (many (eint __))) ;;
    -val extractor : unit -> (payload, int -> string -> 'a, 'a) t = <fun>
    • A pattern to extract a list of integers from an extension point payload, given as a list:
    # let extractor () = single_expr_payload (elist (eint __)) ;;
    -val extractor : unit -> (payload, int list -> 'a, 'a) t = <fun>
    • A pattern to extract the pattern and the expression in a let-binding, from a structure item:
    # let extractor_in_let () = pstr_value drop ((value_binding ~pat:__ ~expr:__) ^:: nil);;
    -val extractor_in_let : unit -> (structure_item, pattern -> expression -> 'a, 'a) t =
    -  <fun>
    • A pattern to extract the pattern and the expression in a let-binding, from an extension point payload:
    # let extractor () = pstr @@ extractor_in_let ^:: nil;;
    -val extractor : unit -> (payload, pattern -> expression -> 'a, 'a) t = <fun>
    • A pattern to extract a core type, from an extension point payload (with a comma in the extension node, such as [%ext_name: core_type]):
    # let extractor () = ptyp __
    -val extractor : unit -> (payload, core_type -> 'a, 'a) t = <fun>
    • A pattern to extract a string from an expression, either from an identifier or from a string. That is, it will extract the string "foo" from both the AST nodes foo and "foo".
    # let extractor () = alt (pexp_ident (lident __)) (estring __) ;;
    -val extractor : unit -> (expression, string -> 'a, 'a) t = <fun>
    • A pattern to extract a sequence of two idents, as strings (will extract "foo", "bar" from [%ext_name foo bar]):
    let extractor () =
    -  single_expr_payload @@
    -    pexp_apply
    -      (pexp_ident (lident __))
    -      ((no_label (pexp_ident (lident __))) ^:: nil) ;;
    -val extractor : unit -> (payload, string -> string -> 'a, 'a) t = <fun>

    Metaquot

    Metaquot for Patterns

    Recall that ppxlib provides a rewriter to generate code explained in the corresponding chapter. The same PPX can also generate patterns when the extension nodes are used patterns: for instance, in what follows, the extension node will be replaced by a value of expression type:

    let f = [%expr 1 + 1]

    While in the following, it would be replaced by a pattern matching on values of expression type:

    let f x = match x with
    -  | [%expr 1 + 1] -> ...
    -  | _ -> ...

    The produced pattern matches regardless of location and attributes. For the previous example, it will produce the following pattern:

    {
    -  pexp_desc =
    -    (Pexp_apply
    -       ({
    -          pexp_desc = (Pexp_ident { txt = (Lident "+"); loc = _ });
    -          pexp_loc = _;
    -          pexp_attributes = _
    -        },
    -         [(Nolabel,
    -            {
    -              pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    +matching-code (ppxlib.matching-code)

    Destructing AST Nodes

    In the previous chapter, we have seen how to generate code. However, the transformation function should depend on its input (the payload and maybe the derived item), which we have to be able to inspect.

    Once again, directly inspecting the Parsetree value that we get as input is not a good option because it is very big to manipulate and can break at every new OCaml release. For instance, let's consider the case of ppx_inline_test. We want to recognize and extract the name and expression only from the form patterns:

      [%%test let "name" = expr]

    If we wrote a function accepting the payload of [%%test], and extracting the name and expression from it, using normal pattern matching we would have:

     # let match_payload ~loc payload =
    +     match payload with
    +     | PStr
    +         [
    +           {
    +             pstr_desc =
    +               Pstr_value
    +                 ( Nonrecursive,
    +                   [
    +                     {
    +                       pvb_pat =
    +                         {
    +                           ppat_desc =
    +                             Ppat_constant (Pconst_string (name, _, None));
    +                           _;
    +                         };
    +                       pvb_expr = expr;
    +                       _;
    +                     };
    +                   ] );
    +             _;
    +           };
    +         ] ->
    +         Ok (name, expr)
    +     | _ -> Error (Location.Error.createf ~loc "Wrong pattern") ;;
    +  val match_payload :
    +    loc:location -> payload -> (string * expression, Location.Error.t) result =

    ppxlib's solution to the verbosity and stability problem is to provide helpers to match the AST, in a very similar way to what it does for generating AST nodes.

    The Different Options

    In this chapter, we will often mention the similarities between matching code and generating code (from the previous chapter). Indeed, the options provided by ppxlib to match AST nodes mirror the ones for generating nodes:

    Ast_pattern is used in Extension.V3.declare, so you will need it to write extenders. Ppxlib_metaquot is, as for generating nodes, more natural to use but also restricted to some cases.

    The Ast_pattern Module

    A match is a "structural destruction" of a value into multiple subvalues to continue the computation. For instance, in the example above from the single variable payload, we structurally extract two variables: name and expr.

    Destruction is very similar to construction, but in reverse. Instead of using several values to build a bigger one, we use one big value to define smaller ones. As an illustration, note how in OCaml the following construction and destruction are close:

      let big = { x ; y }      (** Construction from [x] and [y]      *)
    +  let { x ; y } = big      (** Destruction recovering [x] and [y] *)

    For the same reason, building AST nodes using Ast_builder and destructing AST nodes using Ast_pattern look very similar. The difference is that in the construction "leaf," Ast_builder uses actual values, while Ast_pattern has "wildcards" at the leafs.

    Consider the example in the introduction matching [%%test let "name" = expr]. Building such an expression with Ast_builder could look like:

      # let build_payload_test ~loc name expr =
    +      let (module B) = Ast_builder.make loc in
    +      let open B in
    +      Parsetree.PStr
    +        (pstr_value Nonrecursive
    +          (value_binding ~pat:(pstring name) ~expr :: [])
    +        :: []) ;;
    +  val build_payload_test :
    +    loc:location -> string -> expression -> payload =
    +    <abstr>

    Constructing a first-class pattern is almost as simple as replacing Ast_builder with Ast_pattern, as well as replacing the base values name and expr with a capturing wildcard:

      # let destruct_payload_test () =
    +      let open Ast_pattern in
    +      pstr
    +        (pstr_value nonrecursive
    +           (value_binding ~pat:(pstring __) ~expr:__ ^:: nil)
    +        ^:: nil) ;;
    +  val destruct_payload_test :
    +    unit -> (payload, string -> expression -> 'a, 'a) Ast_pattern.t =
    +    <abstr>

    Note that to facilitate viewing the similarity, we wrote [v] as v :: [], and we added a unit argument to avoid value restriction to mess with the type (that we explained right in the next section).

    The Type for Patterns

    The Ast_pattern.t type reflects the fact that a pattern-match or destruction is taking a value, extracting other values from it, and using them to finally output something. So, a value v of type (matched, cont, res) Ast_pattern.t means that:

    • The type of values matched by v is matched. For instance, matched could be payload.
    • The continuation (what to do with the extracted values) has type cont. The values extracted from the destruction are passed as an argument to the continuation, therefore cont includes information about them. For instance, for a pattern that captures an int and a string, cont could be int -> string -> structure. The continuation is not part of v; it will be given with the value to match.
    • The result of the computation has type res. Note that this is additional information than what we have in cont: Ast_pattern.map_result allows mapping the continuation result through a function! This allows users to add a "construction" post-processing to the continuation. A value of type (pattern, int -> int, expression) Ast_pattern.t would contain how to extract an integer from a pattern and how to map a modified int into an expression.

    In the case of the example above, destruct_payload_test has type:

      # destruct_payload_test ;;
    +  val destruct_payload_test :
    +    (payload, string -> expression -> 'a, 'a) Ast_pattern.t =
    +    <abstr>

    as it destructs values of type pattern extracts two values, respectively, of type string and expression, so the continuation has type string -> expression -> 'a. Then the result type is 'a since no mapping on the result is made. Now that the type of Ast_pattern.t is explained, the type of Ast_pattern.parse_res, the function for applying patterns, should make sense:

      # Ast_pattern.parse_res ;;
    +  val parse_res :
    +    ( 'matched, 'cont, 'res ) t ->
    +    Location.t ->
    +    ?on_error:( unit -> 'res) ->
    +    'matched ->
    +    'cont ->
    +    ( 'res, Location.Error.t Stdppx.NonEmptyList.t ) result =
    +    <fun>

    This function takes a pattern expecting values of type 'matched, continuations of type 'cont and output values of type ('res, _) result (where the error case is when the 'matched value does not have the expected structure). The types of the function's other arguments correspond to this understanding: the argument of type 'matched is the value to match, the one of type 'cont is the continuation, and the result of applying the pattern to those two values is of type 'res!

    Composing construction and destruction yield the identity:

      # let f name expr = 
    +      Ast_pattern.parse_res
    +        (destruct_payload_test ()) Location.none
    +        (build_payload_test ~loc name expr)
    +        (fun name expr -> (name, expr)) ;;
    +  val f :
    +    string ->
    +    expression ->
    +    (string * expression, _) result = <fun>
    +  # f "name" [%expr ()] ;;
    +  Ok
    +   ("name",
    +    {pexp_desc =
    +      Pexp_construct
    +       ({txt = Lident "()";
    +    ...}...)...}...)

    While the Ast_pattern.parse_res function is useful to match an AST node, you will also need the Ast_pattern.t value in other contexts. For instance, it is used when declaring extenders with Extension.declare to tell how to extract arguments from the payload to give them to the extender, or when parsing with deriving arguments.

    Building Patterns

    Now that we know what these patterns represent and how to use them, and have seen an example in the introduction on Ast_pattern, the combinators in the API should be much more easily understandable. So, for a comprehensive list of the different values in the module, the reader should directly refer to the API. In this guide; however, we explain in more detail a few important values with examples.

    The wildcard pattern | x -> . The simplest way to extract a value from something is just to return it! In Ast_pattern, it corresponds to the value __ (of type ('a, 'a -> 'b, 'b)), which extract the value it's given: matching a value v with this pattern and a continuation k would simply call k v.

    This pattern is useful in combination with other combinators.

    The wildcard-dropping pattern | _ -> . Despite their name ressemblance, __ is very different from the OCaml pattern-match wildcard _, which accepts everything but ignores its input. In Ast_pattern, the wildcard-dropping pattern is drop. Again, it is useful in conjunction with other combinators, where one needs to accept all input in some places, but the value is not relevant.

    The | p as name -> combinator. The combinator as__ allows passing a node to the continuation while still extracting values from this node. For instance, as__ (some __) corresponds to the OCaml pattern-match Some n2 as n1, where the continuation is called with k n1 n2.

    The | (p1 | p2) -> combinator. The combinator alt combines two patterns with the same type for extracted values into one pattern by first trying to apply the first, and if it fails, by applying the second one. For instance, alt (pair (some __) drop) (pair drop (some __)) corresponds to the OCaml pattern (Some a, _) | (_, Some b).

    The constant patterns | "constant" -> . Using Ast_pattern.cst it is possible to create patterns matching only fixed values, such as the "constant" string. No values are extracted from this matching. The functions for creating such values are Ast_pattern.int, Ast_pattern.string, Ast_pattern.bool, ...

    The common deconstructors. Many usual common constructors have "deconstructors" in Ast_pattern. For instance:

    • some __ corresponds to Some a,
    • __ ^:: drop ^:: nil correspnds to a :: _ :: [],
    • pair __ __ (or equivalently __ ** __) corresponds to (a,b), etc.

    The Parsetree deconstructors. All constructors from Ast_builder have a "deconstructor" in Ast_pattern with the same name. For instance, since Ast_builder has a constructor pstr_value to build a structure item from a rec_flag and a value_binding list. Ast_pattern has an equally named pstr_value which, given ways to destruct rec flags and value_binding lists, creates a destructor for structure items.

    The continuation modifiers. Many Ast_pattern values allow modifying the continuation. It can be it a map on the continuation itself, the argument to the continuation, or the result of the continuation. So, Ast_pattern.map transforms the continuation itself, e.g., map ~f:Fun.flip will switch the arguments of the function. map<i> modifies the arguments to a continuation of arity i: map2 ~f:combine is equivalent to map ~f:(fun k -> (fun x y -> k (combine x y))). Finally, Ast_pattern.map_result modifies the continuation's result, and map_result ~f:ignore would ignore the continuation's result.

    Common patterns Some patterns are sufficiently common that, although they can be built from smaller bricks, they are already defined in Ast_pattern. For instance, matching a single expression in a payload is given as Ast_pattern.single_expr_payload.

    Useful patterns and examples

    Below, is a list of patterns that are commonly needed when using Ast_pattern:

      open Ast_pattern
    • A pattern to extract an expression from an extension point payload:
      # let extractor () = single_expr_payload __ ;
    +  val extractor : unit -> (payload, expression -> 'a, 'a) t = <fun>
    • A pattern to extract a string from an extension point payload:
      # let extractor () = single_expr_payload (estring __) ;
    +  val extractor : unit -> (payload, string -> 'a, 'a) t = <fun>
    • A pattern to extract a pair int * float from an extension point payload:
      # let extractor () = single_expr_payload (pexp_tuple (eint __ ^:: efloat __ ^:: nil)) ;;
    +  val extractor : unit -> (payload, int -> string -> 'a, 'a) t = <fun>
    • A pattern to extract a list of integers from an extension point payload, given as a tuple (of unfixed length):
      # let extractor () = single_expr_payload (pexp_tuple (many (eint __))) ;;
    +  val extractor : unit -> (payload, int -> string -> 'a, 'a) t = <fun>
    • A pattern to extract a list of integers from an extension point payload, given as a list:
      # let extractor () = single_expr_payload (elist (eint __)) ;;
    +  val extractor : unit -> (payload, int list -> 'a, 'a) t = <fun>
    • A pattern to extract the pattern and the expression in a let-binding, from a structure item:
      # let extractor_in_let () = pstr_value drop ((value_binding ~pat:__ ~expr:__) ^:: nil);;
    +  val extractor_in_let : unit -> (structure_item, pattern -> expression -> 'a, 'a) t =
    +    <fun>
    • A pattern to extract the pattern and the expression in a let-binding, from an extension point payload:
      # let extractor () = pstr @@ extractor_in_let ^:: nil;;
    +  val extractor : unit -> (payload, pattern -> expression -> 'a, 'a) t = <fun>
    • A pattern to extract a core type, from an extension point payload (with a comma in the extension node, such as [%ext_name: core_type]):
      # let extractor () = ptyp __
    +  val extractor : unit -> (payload, core_type -> 'a, 'a) t = <fun>
    • A pattern to extract a string from an expression, either from an identifier or from a string. That is, it will extract the string "foo" from both the AST nodes foo and "foo".
      # let extractor () = alt (pexp_ident (lident __)) (estring __) ;;
    +  val extractor : unit -> (expression, string -> 'a, 'a) t = <fun>
    • A pattern to extract a sequence of two idents, as strings (will extract "foo", "bar" from [%ext_name foo bar]):
      let extractor () =
    +    single_expr_payload @@
    +      pexp_apply
    +        (pexp_ident (lident __))
    +        ((no_label (pexp_ident (lident __))) ^:: nil) ;;
    +  val extractor : unit -> (payload, string -> string -> 'a, 'a) t = <fun>

    Metaquot

    Metaquot for Patterns

    Recall that ppxlib provides a rewriter to generate code explained in the corresponding chapter. The same PPX can also generate patterns when the extension nodes are used patterns: for instance, in what follows, the extension node will be replaced by a value of expression type:

      let f = [%expr 1 + 1]

    While in the following, it would be replaced by a pattern matching on values of expression type:

      let f x = match x with
    +    | [%expr 1 + 1] -> ...
    +    | _ -> ...

    The produced pattern matches regardless of location and attributes. For the previous example, it will produce the following pattern:

        {
    +      pexp_desc =
    +        (Pexp_apply
    +           ({
    +              pexp_desc = (Pexp_ident { txt = (Lident "+"); loc = _ });
                   pexp_loc = _;
                   pexp_attributes = _
    -            });
    -         (Nolabel,
    -           {
    -             pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
    -             pexp_loc = _;
    -             pexp_attributes = _
    -           })]));
    -  pexp_loc = _;
    -  pexp_attributes = _
    -}

    While being less general than Ast_pattern, this allows users to write patterns in a more natural way. Due to the OCaml AST, payloads can only take the form of a structure, a signature, a core type, or a pattern. We might want to generate pattern matching for other kinds of nodes, such as expressions or structure item. The same extension nodes that Metaquot provides for building can be used for matching:

    • The expr extension node to match on expressions:

      match expr with [%expr 1 + 1] -> ...
    • The pat extension node to match on patterns:

      match pattern with [%pat? ("", _)] -> ...
    • The type extension node to match on for core types:

      match typ with [%type: int -> string] -> ...
    • The stri and sigi extension nodes to match on structure_item and signature_item:

      match stri with [%stri let a = 1] -> ...
      -match sigi with [%sigi: val a : int] -> ...
    • The str and sig extension nodes to match on structure and signature.

      let _ =
      +            },
      +             [(Nolabel,
      +                {
      +                  pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
      +                  pexp_loc = _;
      +                  pexp_attributes = _
      +                });
      +             (Nolabel,
      +               {
      +                 pexp_desc = (Pexp_constant (Pconst_integer ("1", None)));
      +                 pexp_loc = _;
      +                 pexp_attributes = _
      +               })]));
      +      pexp_loc = _;
      +      pexp_attributes = _
      +    }

      While being less general than Ast_pattern, this allows users to write patterns in a more natural way. Due to the OCaml AST, payloads can only take the form of a structure, a signature, a core type, or a pattern. We might want to generate pattern matching for other kinds of nodes, such as expressions or structure item. The same extension nodes that Metaquot provides for building can be used for matching:

      • The expr extension node to match on expressions:

        match expr with [%expr 1 + 1] -> ...
      • The pat extension node to match on patterns:

        match pattern with [%pat? ("", _)] -> ...
      • The type extension node to match on for core types:

        match typ with [%type: int -> string] -> ...
      • The stri and sigi extension nodes to match on structure_item and signature_item:

        match stri with [%stri let a = 1] -> ...
        +match sigi with [%sigi: val a : int] -> ...
      • The str and sig extension nodes to match on structure and signature.

        let _ =
           match str with
           | [%str
               let a = 1
        @@ -121,15 +121,16 @@ let _ =
           | [%sigi:
               val a : int
               val b : float] ->
        -      ()

      Anti-Quotations

      Similarly to the expression context, these extension nodes have a limitation: when using these extensions alone, you can't bind variables. Metaquot also solves this problem using anti-quotation. In the pattern context, anti-quotation is not used to insert values but to insert patterns. That way you can include a wildcard or variable-binding pattern.

      Consider the following example, which matches expression nodes corresponding to the sum of three expressions: starting with the constant 1, followed by anything, followed by anything bound to the third variable, which has type expression:

      match some_expr_node with
      -| [%expr 1 + [%e? _] + [%e? third]] -> do_something_with third

      The syntax for anti-quotation depends on the type of the node you wish to insert (which must also correspond to the context of the anti-quotation extension node):

      • The extension point e is used to anti-quote values of type expression:

        match e with [%expr 1 + [%e? some_expr_pattern]] -> ...
      • The extension point p is used to anti-quote values of type pattern:

        match pat with [%stri let [%p? x] = [%e? y]] -> do_something_with x y
      • The extension point t is used to anti-quote values of type core_type:

        match t with [%type: int -> [%t? _]] -> ...
      • The extension point m is used to anti-quote values of type module_expr or module_type:

        let [%expr
        +      ()
        +

      Anti-Quotations

      Similarly to the expression context, these extension nodes have a limitation: when using these extensions alone, you can't bind variables. Metaquot also solves this problem using anti-quotation. In the pattern context, anti-quotation is not used to insert values but to insert patterns. That way you can include a wildcard or variable-binding pattern.

      Consider the following example, which matches expression nodes corresponding to the sum of three expressions: starting with the constant 1, followed by anything, followed by anything bound to the third variable, which has type expression:

                match some_expr_node with
      +          | [%expr 1 + [%e? _] + [%e? third]] -> do_something_with third

      The syntax for anti-quotation depends on the type of the node you wish to insert (which must also correspond to the context of the anti-quotation extension node):

      • The extension point e is used to anti-quote values of type expression:

        match e with [%expr 1 + [%e? some_expr_pattern]] -> ...
      • The extension point p is used to anti-quote values of type pattern:

        match pat with [%stri let [%p? x] = [%e? y]] -> do_something_with x y
      • The extension point t is used to anti-quote values of type core_type:

        match t with [%type: int -> [%t? _]] -> ...
      • The extension point m is used to anti-quote values of type module_expr or module_type:

        let [%expr
               let module M = [%m? extracted_m] in
               M.x] =
           some_expr
         in
         do_something_with extracted_m
         
        -let _ = fun [%sigi: module M : [%m? input]] -> do_something_with input
      • The extension point i is used to anti-quote values of type structure_item or signature_item:

        let [%str
        +let _ = fun [%sigi: module M : [%m? input]] -> do_something_with input
      • The extension point i is used to anti-quote values of type structure_item or signature_item:

        let [%str
               let a = 1
         
               [%%i? stri2]] =
        @@ -145,4 +146,4 @@ let [%sig:
           s
         in
         do_something_with sigi2

      Remember, since we are inserting patterns (and not expressions), we always use patterns as payload, as in [%e? x].

      If an anti-quote extension node is in the wrong context, it won't be rewritten by Metaquot. For instance, in fun [%expr 1 + [%p? x]] -> x the anti-quote extension node for the expression is put in a pattern context, and it won't be rewritten. On the contrary, you should use anti-quotes whose kind ([%e ...], [%p ...]) match the context. For example, you should write:

      fun [%stri let ([%p pat] : [%t type_]) = [%e expr]] ->
      -  do_something_with pat type_ expr

    \ No newline at end of file + do_something_with pat type_ expr

    diff --git a/ppxlib/quick_intro.html b/ppxlib/quick_intro.html index ec4b0da..1d01ae3 100644 --- a/ppxlib/quick_intro.html +++ b/ppxlib/quick_intro.html @@ -1,2 +1,2 @@ -quick_intro (ppxlib.quick_intro)

    Introduction

    This guide is intended at authors or future authors of PPX rewriters. If you don't know what a PPX is, or if you are looking for a guide intended at PPX users, read the OCaml official guide on meta-programming first, although the beginning of this guide may be of interest to everyone.

    Preprocessing in OCaml

    OCaml doesn't have a macro system, that is, there is no official part of the OCaml language that will be executed at compile time in order to generate or alter the source code. However, OCaml does have an official part of its syntax dedicated to this: extension nodes and attributes; both of them introduced in OCaml 4.02. The preprocessing itself, though, is left to external programs, written by the community and specialised for their own tasks. However, without a unification framework, the following issues arise:

    • Ambiguity when using several preprocessors due to lacking clear composition semantics
    • Duplication of code and efforts on the different preprocessors
    • Performance loss with many phases (parsing, pretty-printing, etc.) being executed multiple times
    • Lack of cross-compiler compatibility
    • Incompatibility among the different preprocessor rather than one homogeneous preprocessor ecosystem

    ppxlib

    The goal of ppxlib is to solve these problems, by providing a unifying framework for writing preprocessors. It sits in between the OCaml compiler and toolchain, and the PPX authors provide an API for them. One could sum up the ppxlib features as:

    • It deals with all boilerplate, such as parsing the input, outputting the rewritten output, generating an executable, etc.
    • It generates a single executable for multiple transformations and defines clear composition semantics for local transformations
    • It integrates well with Dune and Merlin
    • It provides a more stable API than the compiler for manipulating the AST
    • A single PPX codebase usually works on several OCaml versions of the AST
    • It defines restricted rewriters whose semantic ensure better confidence for the user and better compositional semantics
    • It provides many helpers to pattern-match and generate AST nodes, as well as traverse the AST.

    This Guide

    This guide is separated into several parts.

    First, we focus on the driver that performs the AST transformations: how it is generated, executed, and more importantly, what it does exactly, from migrating the AST to the different rewriting phases it goes through.

    After that, we explain the different kinds of transformations that ppxlib supports, and how to register them to the driver. This section only describes the transformations and their properties, not how to actually manipulate the AST.

    The part where we discuss how to manipulate the AST is split in three pages: generating AST nodes to generate OCaml code, destructing AST nodes to extract information and act differently depending on what is extracted, and traversing the AST to use fold, iter, and map on the AST. This code-manipulation part explains using the modules Ast_builder, Ast_pattern, and the ppxlib's PPX Metaquot.

    We finally discuss several good practices, such as how to properly report errors, how to test your PPX, or how to migrate from other PPX libraries, such as OMP and ppx_deriving.

    We end by including some examples, which you can also find in the examples folder of ppxlib's repository.

    PPXs and ppxlib History

    The preprocessing history of OCaml started long before ppxlib. However, this section is not yet written. You can find more information in these resources: 1 2 3 5. You can also contribute to the ppxlib documentation by opening a pull request in the repository.

    \ No newline at end of file +quick_intro (ppxlib.quick_intro)

    Introduction

    This guide is intended at authors or future authors of PPX rewriters. If you don't know what a PPX is, or if you are looking for a guide intended at PPX users, read the OCaml official guide on meta-programming first, although the beginning of this guide may be of interest to everyone.

    Preprocessing in OCaml

    OCaml doesn't have a macro system, that is, there is no official part of the OCaml language that will be executed at compile time in order to generate or alter the source code. However, OCaml does have an official part of its syntax dedicated to this: extension nodes and attributes; both of them introduced in OCaml 4.02. The preprocessing itself, though, is left to external programs, written by the community and specialised for their own tasks. However, without a unification framework, the following issues arise:

    • Ambiguity when using several preprocessors due to lacking clear composition semantics
    • Duplication of code and efforts on the different preprocessors
    • Performance loss with many phases (parsing, pretty-printing, etc.) being executed multiple times
    • Lack of cross-compiler compatibility
    • Incompatibility among the different preprocessor rather than one homogeneous preprocessor ecosystem

    ppxlib

    The goal of ppxlib is to solve these problems, by providing a unifying framework for writing preprocessors. It sits in between the OCaml compiler and toolchain, and the PPX authors provide an API for them. One could sum up the ppxlib features as:

    • It deals with all boilerplate, such as parsing the input, outputting the rewritten output, generating an executable, etc.
    • It generates a single executable for multiple transformations and defines clear composition semantics for local transformations
    • It integrates well with Dune and Merlin
    • It provides a more stable API than the compiler for manipulating the AST
    • A single PPX codebase usually works on several OCaml versions of the AST
    • It defines restricted rewriters whose semantic ensure better confidence for the user and better compositional semantics
    • It provides many helpers to pattern-match and generate AST nodes, as well as traverse the AST.

    This Guide

    This guide is separated into several parts.

    First, we focus on the driver that performs the AST transformations: how it is generated, executed, and more importantly, what it does exactly, from migrating the AST to the different rewriting phases it goes through.

    After that, we explain the different kinds of transformations that ppxlib supports, and how to register them to the driver. This section only describes the transformations and their properties, not how to actually manipulate the AST.

    The part where we discuss how to manipulate the AST is split in three pages: generating AST nodes to generate OCaml code, destructing AST nodes to extract information and act differently depending on what is extracted, and traversing the AST to use fold, iter, and map on the AST. This code-manipulation part explains using the modules Ast_builder, Ast_pattern, and the ppxlib's PPX Metaquot.

    We finally discuss several good practices, such as how to properly report errors, how to test your PPX, or how to migrate from other PPX libraries, such as OMP and ppx_deriving.

    We end by including some examples, which you can also find in the examples folder of ppxlib's repository.

    PPXs and ppxlib History

    The preprocessing history of OCaml started long before ppxlib. However, this section is not yet written. You can find more information in these resources: 1 2 3 5. You can also contribute to the ppxlib documentation by opening a pull request in the repository.

    diff --git a/ppxlib/writing-ppxs.html b/ppxlib/writing-ppxs.html index 6960ccf..1f0199c 100644 --- a/ppxlib/writing-ppxs.html +++ b/ppxlib/writing-ppxs.html @@ -1,66 +1,66 @@ -writing-ppxs (ppxlib.writing-ppxs)

    Writing a Transformation

    This chapter covers the ppxlib procedure basics to define and register a transformation, be it a global or a context-free transformation.

    For the actual manipulation and generation of code, ppxlib provides many helpers that are listed in Defining AST Transformations.

    Defining a Transformation

    For ppxlib, a transformation is a description of a way to modify a given AST into another one. A transformation can be:

    • A context-free transformation, which only acts on a portion of the AST. In the ppxlib framework, those transformations are represented by values of type Context_free.Rule.t and are executed in the context-free phase. This is the strongly recommended kind of transformation due to its important advantages, such as good performance, well-defined composition semantics, and the safety and trustability that comes with well-isolated and strictly local modifications.
    • A global transformation, which takes the simple form of a function of type structure -> structure or signature -> signature, that can sometimes take extra information as additional arguments. Such a transformation is applied in the global transformation phase, unless it has a good reason to have been registered in another phase. While global transformations are a flexible and powerful tool in the OCaml ecosystem, they come with many drawbacks and should only be used when really necessary.

    In order to register a transformation to the ppxlib driver, one should use the Driver.V2.register_transformation. This function is used to register all rewriter types in every different phase, except derivers, which are abstracted away in Deriving.

    Context-Free Transformation

    In ppxlib, the type for context-free transformation is Context_free.Rule.t. Rules will be applied during the AST's top-down traverse of the context-free pass. A rule contains the information about when it should be applied in the traversal, as well as the transformation to apply.

    Currently, rules can only be defined to apply in four different contexts:

    • on extensions points, such as [%ext_point payload]
    • on some structure or signature items with an attribute, such as type t = Nil [@@deriving show],
    • on litterals with modifiers, such as 41g or 43.2x,
    • on function application or identifiers, such as meta_function "99" and meta_constant.

    In order to define rules on extensions points, we will use the Extension module. In order to define rules on attributed items, we will use the Deriving module. For the two other rules, we will directly use the Context_free.Rule module.

    Extenders

    An extender is characterised by several things:

    • The situation that triggers the rewriting, which consists of two things:

      • The extension points' name on which it is triggered. For instance, an extender triggered on [%name] would not be triggered on [%other_name]
      • The AST context on which it applies. Indeed, extension points can be used in many different places: expression, pattern, core type, etc., and the extender should be restricted to one context, as it produces code of a single type. So, an extender triggered on expressions could be triggered on let x = [%name] but not on let [%name] = expr.
    • The actual rewriting of the extension node:

      • A function, called "expander", taking arguments and outputting the generated AST
      • How to extract from the payload the arguments to pass to the expander

    The Extender Context

    The context is a value of type Extension.Context.t. For instance, to define an extender for expression-extension points, the correct context is Extension.Context.expression. Consult the Extension.Context module's API for the list of all contexts!

    # let context = Extension.Context.expression;;
    -val context : expression Extension.Context.t =
    -  Ppxlib.Extension.Context.Expression

    The Extender Name

    The extension point name on which it applies is simply a string.

    # let extender_name = "add_suffix" ;;
    -val extender_name : string = "add_suffix"

    See below for examples on when the above name and context will trigger rewriting:

    (* will trigger rewriting: *)
    -let _ = [%add_suffix "payload"]
    +writing-ppxs (ppxlib.writing-ppxs)

    Writing a Transformation

    This chapter covers the ppxlib procedure basics to define and register a transformation, be it a global or a context-free transformation.

    For the actual manipulation and generation of code, ppxlib provides many helpers that are listed in Defining AST Transformations.

    Defining a Transformation

    For ppxlib, a transformation is a description of a way to modify a given AST into another one. A transformation can be:

    • A context-free transformation, which only acts on a portion of the AST. In the ppxlib framework, those transformations are represented by values of type Context_free.Rule.t and are executed in the context-free phase. This is the strongly recommended kind of transformation due to its important advantages, such as good performance, well-defined composition semantics, and the safety and trustability that comes with well-isolated and strictly local modifications.
    • A global transformation, which takes the simple form of a function of type structure -> structure or signature -> signature, that can sometimes take extra information as additional arguments. Such a transformation is applied in the global transformation phase, unless it has a good reason to have been registered in another phase. While global transformations are a flexible and powerful tool in the OCaml ecosystem, they come with many drawbacks and should only be used when really necessary.

    In order to register a transformation to the ppxlib driver, one should use the Driver.V2.register_transformation. This function is used to register all rewriter types in every different phase, except derivers, which are abstracted away in Deriving.

    Context-Free Transformation

    In ppxlib, the type for context-free transformation is Context_free.Rule.t. Rules will be applied during the AST's top-down traverse of the context-free pass. A rule contains the information about when it should be applied in the traversal, as well as the transformation to apply.

    Currently, rules can only be defined to apply in four different contexts:

    • on extensions points, such as [%ext_point payload]
    • on some structure or signature items with an attribute, such as type t = Nil [@@deriving show],
    • on litterals with modifiers, such as 41g or 43.2x,
    • on function application or identifiers, such as meta_function "99" and meta_constant.

    In order to define rules on extensions points, we will use the Extension module. In order to define rules on attributed items, we will use the Deriving module. For the two other rules, we will directly use the Context_free.Rule module.

    Extenders

    An extender is characterised by several things:

    • The situation that triggers the rewriting, which consists of two things:

      • The extension points' name on which it is triggered. For instance, an extender triggered on [%name] would not be triggered on [%other_name]
      • The AST context on which it applies. Indeed, extension points can be used in many different places: expression, pattern, core type, etc., and the extender should be restricted to one context, as it produces code of a single type. So, an extender triggered on expressions could be triggered on let x = [%name] but not on let [%name] = expr.
    • The actual rewriting of the extension node:

      • A function, called "expander", taking arguments and outputting the generated AST
      • How to extract from the payload the arguments to pass to the expander

    The Extender Context

    The context is a value of type Extension.Context.t. For instance, to define an extender for expression-extension points, the correct context is Extension.Context.expression. Consult the Extension.Context module's API for the list of all contexts!

      # let context = Extension.Context.expression;;
    +  val context : expression Extension.Context.t =
    +    Ppxlib.Extension.Context.Expression

    The Extender Name

    The extension point name on which it applies is simply a string.

      # let extender_name = "add_suffix" ;;
    +  val extender_name : string = "add_suffix"

    See below for examples on when the above name and context will trigger rewriting:

      (* will trigger rewriting: *)
    +  let _ = [%add_suffix "payload"]
     
    -(* won't trigger rewriting: *)
    -let _ = [%other_name "payload"] (* wrong name *)
    -let _ = match () with [%add_suffix "payload"] -> () (* wrong context *)

    The Payload Extraction

    An extension node contains a payload, which will be passed to the transformation function. However, while this payload contains all information, it is not always structured the best way for the transformation function. For instance, in [%add_suffix "payload"], the string "payload" is encoded as a structure item consisting of an expression’s evaluation, a constant that is a string.

    ppxlib allows separating the transformation function from the extraction of the payload’s relevant information. As explained in depth in the Destructing AST nodes chapter, this extraction is done by destructing the payload’s structure (which is therefore restricted: [%add_suffix 12] would be refused by the rewriter of the example below). The extraction is defined by a value of type Ast_pattern.t. The Ast_pattern module provides some kind of pattern-matching on AST nodes: a way to structurally extract values from an AST node in order to generate a value of another kind.

    For instance, a value of type (payload, int -> float -> expression, expression) Ast_pattern.t means that it defines a way to extract an int and a float from a payload, which should be then combined to define a value of type expression.

    In our case, the matched value will always be a payload, as that's the type for extension points' payloads. The type of the produced node will have to match the type of extension node we rewrite, expression in our example.

    # let extracter () = Ast_pattern.(single_expr_payload (estring __)) ;;
    -val extracter : unit -> (payload, string -> 'a, 'a) Ast_pattern.t = <fun>

    The above pattern extracts a string inside an extension node pattern. It will extract "string" in the the extension node [%ext_name "string"] and will refuse [%ext_name 1+1]. For other ready-to-use examples of patterns, refer to the example section. For more in-depth explanation on the types and functions used above, see the Destructing AST nodes chapter and the Ast_pattern API .

    The unit argument in extractor is not important. It is added so that value restriction does not add noise to the type variables.

    The Expand Function

    The expander is the function that takes the values extracted from the payload and produces the value that replaces the extension node.

    Building and inspecting AST nodes can be painful due to how large the AST type is. ppxlib provides several helper modules to ease this generation, such as Ast_builder, Ppxlib_metaquot, Ast_pattern, and Ast_traverse, which are explained in their own chapters: Generating AST nodes, Destructing AST nodes and Traversing AST nodes.

    In the example below, you can ignore the body of the function until reading those chapters.

    # let expander ~ctxt s =
    -    let loc = Expansion_context.Extension.extension_point_loc ctxt in
    -    Ast_builder.Default.(estring ~loc (s ^ "_suffixed")) ;;
    -val expander : ctxt:Expansion_context.Extension.t -> string -> expression =
    -<fun>

    The expander takes ctxt as a named argument that is ignored here. This argument corresponds to additional information, such as the location of the extension node. More precisely, it is of type Expansion_context.Extension.t and includes:

    Declaring an Extender

    When we have defined the four prerequisites, we are able to combine all of them to define an extender using the Extension.V3.declare function.

    # V3.declare ;;
    -  string ->
    -  'context Context.t ->
    -  (payload, 'a, 'context) Ast_pattern.t ->
    -  (ctxt:Expansion_context.Extension.t -> 'a) ->
    -  t

    Note that the type is consistent: the context on which the expander is applied and the value produced by the expander need to be equal (indeed, 'a must be of the form 'extacted_1 -> 'extracted_2 -> ... -> 'context with the constraints given by Ast_pattern).

    We are thus able to create the extender given by the previous examples:

    # let my_extender = Extension.V3.declare extender_name context (extracter()) expander ;;
    -val my_extender : Extension.t = <abstr>

    Note that we use the V3 version of the declare function, which passes the expansion context to the expander. Previous versions were kept for retro-compatibility.

    We can finally turn the extender into a rule (using Context_free.Rule.extension) and register it to the driver:

    # let extender_rule = Context_free.Rule.extension my_extender ;;
    -val extender_rule : Context_free.Rule.t = <abstr>
    -# Driver.register_transformation ~rules:[extender_rule] "name_only_for_debug_purpose" ;;
    -- : unit = ()

    Now, the following:

    let () = print_endline [%add_suffix "helloworld"]

    would be rewritten by the PPX in:

    let () = print_endline "helloworld_suffixed"

    Derivers

    A deriver is characterised by several things:

    • The way to parse arguments passed through the attribute payload
    • The set of other derivers that need to run before it is applied
    • The actual generator function

    Contrary to extenders, the registration of the deriver as a Context_free.Rule.t is not made by the user via Driver.register_transformation, but rather by Deriving.add.

    Derivers Arguments

    In ppxlib, a deriver is applied by adding an attribute containing the derivers' names to apply:

    type tree = Leaf | Node of tree * tree  [@@deriving show, yojson]

    However, it is also possible to pass arguments to the derivers, either through a record or through labelled arguments:

    type tree = Leaf | Node of tree * tree  [@@deriving my_deriver ~flag ~option1:52]

    or

    type tree = Leaf | Node of tree * tree  [@@deriving my_deriver { flag; option1=52 }]

    The flag argument is a flag, and it can only be present or absent but not take a value. The option1 argument is a regular argument, so it is also optional but can take a value.

    In ppxlib, arguments have the type Deriving.Args.t. Similarly to the Ast_pattern.t type, a value of type (int -> string -> structure, structure) Args.t means that it provides a way to extract an integer from the argument and a string from the options, later combined to create a structure.

    The way to define a Deriving.Args.t value is to start with the value describing an empty set of arguments, Deriving.Args.empty. Then add the arguments one by one, using the combinator Deriving.Args.(+>). Each argument is created using either Deriving.Args.arg for optional arguments (with value extracted using Ast_pattern) or Deriving.Args.flag for optional arguments without values.

    # let args () = Deriving.Args.(empty +> arg "option1" (eint __) +> flag "flag") ;;
    -val args : (int option -> bool -> 'a, 'a) Deriving.Args.t = <abstr>
    Derivers Dependency

    ppxlib allows declaring that a deriver depends on the previous application of another deriver. This is expressed simply as a list of derivers. For instance, the csv deriver depends on the fields deriver to run first.

    # let deps = [] ;;
    -val deps : 'a list = []

    In this example, we do not include any dependency.

    Generator Function

    Similarly to an extender's expand function, the function generating new code in derivers also takes a context and the arguments extracted from the attribute payload. Here again, the body of the example function can be safely ignored ,as it relies on later chapters.

    # let generate_impl ~ctxt _ast option1 flag =
    -    let return s =  (* See "Generating code" chapter *)
    -      let loc = Expansion_context.Deriver.derived_item_loc ctxt in
    -      [ Ast_builder.Default.(pstr_eval ~loc (estring ~loc s) []) ]
    -    in
    -    if flag then return "flag is on"
    -    else
    -      match option1 with
    -      | Some i -> return (Printf.sprintf "option is %d" i)
    -      | None -> return "flag and option are not set" ;;
    -val generate_impl :
    -ctxt:Expansion_context.Deriver.t ->
    -'a -> int option -> bool -> structure_item list = <fun>

    Similarly to extenders, there is an additional (ignored in the example) argument to the function: the context. This time, the context is of type Expansion_context.Deriver.t and includes:

    Registering a Deriver

    Once the generator function is defined, we can combine the argument extraction and the generator function to create a Deriving.Generator.t:

    # let generator () = Deriving.Generator.V2.make (args()) generate_impl ;;
    -val generator : unit -> (structure_item list, 'a) Deriving.Generator.t = <abstr>

    This generator can then be registered as a deriver through the Deriving.add function. Note that, Deriving.add will call Driver.register_transformation itself, so you won't need to do it manually. Adding a deriver is done in a way that no two derivers with the same name can be registered. This includes derivers registered through the ppx_deriving library.

    # let my_deriver = Deriving.add "my_deriver" ~str_type_decl:(generator()) ;;
    -val my_deriver : Deriving.t = <abstr>

    The different, optional named argument allows registering generators to be applied in different contexts and in one function call. Remember that you can only add one deriver with a given name, even if applied on different contexts. As the API shows, derivers are restricted to being applied in the following contexts:

    • Type declarations (type t = Foo of int)
    • Type extensions (type t += Foo of int)
    • Exceptions (exception E of int)
    • Module type declarations (module type T = sig end)

    in both structures and signatures.

    Constant Rewriting

    OCaml integrates a syntax to define special constants. Any g..z or G..Z suffix appended after a float or int is accepted by the parser (but refused later by the compiler). This means a PPX must rewrite them.

    ppxlib provides the Context_free.Rule.constant function to rewrite those litteral constants. The character (between g and z or G and Z) has to be provided, as well as the constant kind (float or int), and both the location and the litteral as a string will be passed to a rewriting function:

    # let kind = Context_free.Rule.Constant_kind.Integer ;;
    -val kind : Context_free.Rule.Constant_kind.t =
    -  Ppxlib.Context_free.Rule.Constant_kind.Integer
    -# let rewriter loc s = Ast_builder.Default.eint ~loc (int_of_string s * 100) ;;
    -val rewriter : location -> string -> expression = <fun>
    -# let rule = Context_free.Rule.constant kind 'g' rewriter ;;
    -val rule : Context_free.Rule.t = <abstr>
    -# Driver.register_transformation ~rules:[ rule ] "constant" ;;
    -- : unit = ()

    As an example with the above transformation, let x = 2g + 3g will be rewritten to let x = 200 + 300.

    Special Functions

    ppxlib supports registering functions to be applied at compile time. A registered identifier f_macro will trigger rewriting in two situations:

    1. When it plays the role of the function in a function application
    2. Anywhere it appears in an expression

    For instance, in

    let _ = (f_macro arg1 arg2, f_macro)

    the rewriting will be triggered once for the left-hand side f_macro arg1 arg2 and once for the right hand side f_macro. It is the expansion function that is responsible for distinguishing between the two cases: using pattern-matching to distinguish between a function application in one case and a single identifier in the other.

    In order to register a special function, one needs to use Context_free.Rule.special_function, indicating the name of the special function and the rewriter. The rewriter will take the expression (without expansion context) and should output an expression option, where:

    • None signifies that no rewriting should be done: the top-down pass can continue (potentially inside the expression).
    • Some exp signifies the original expression should be replaced by expr. The top-down pass continues with expr.

    The difference between fun expr -> None and fun expr -> Some expr is that the former will continue the top-down pass inside expr, while the latter will continue the top-down pass from expr (included), therefore starting an infinite loop.

    # let expand e =
    -    let return n = Some (Ast_builder.Default.eint ~loc:e.pexp_loc n) in
    -    match e.pexp_desc with
    -    | Pexp_apply (_, arg_list) -> return (List.length arg_list)
    -    | _ -> return 0
    -  ;;
    -val expand : expression -> expression option = <fun>
    -# let rule = Context_free.Rule.special_function "n_args" expand ;;
    -val rule : Context_free.Rule.t = <abstr>
    -# Driver.register_transformation ~rules:[ rule ] "special_function_demo" ;;
    - - : unit = ()

    With such a rewriter registered:

    # Printf.printf "n_args is applied with %d arguments\n" (n_args ignored "arguments");;
    -n_args is applied with 2 arguments
    -- : unit = ()

    Global transformation

    Global transformations are the most general kind of transformation. As such, they allow doing virtually any modifications, but this comes with several drawbacks. There are very few PPXs that really need this powerful but dangerous feature. In fact, even if, at first sight, it seems like your transformation isn't context-free, it's likely that you can find a more suitable abstraction with which it becomes context-free. Whenever that's the case, go for context-free! The mentioned drawbacks are:

    • It is harder for the user to know exactly what parts of the AST will be changed. Your transformation becomes a scary black box.
    • It is harder for ppxlib to combine several global transformations, as there is no guarantee that the effect of one will work well with the effect of another.
    • The job done by two global transformations (e.g., an AST traverse) cannot be factorised, resulting in slower compilation time.
    • If you don't make sure that you really follow all good practices, you might end up messing up the global developer experience.

    For all these reasons, a global transformation should be avoided whenever a context-free transformation could do the job, which by experience seems to be most of the time. The API for defining a global transformation is easy. A global transformation consists simply of the function and can be directly be registered with Driver.register_transformation.

    # let f str = List.filter (fun _ -> Random.bool ()) str;; (* Randomly omit structure items *)
    -val f : 'a list -> 'a list = <fun>
    -# Driver.register_transformation ~impl:f "absent_minded_transformation"
    -- : unit = ()

    Inlining Transformations

    When using a PPX, the transformation happens at compile time, and the produced code could be directly inlined into the original code. This allows dropping the dependency on ppxlib and the PPX used to generate the code.

    This mechanism is implemented for derivers implemented in ppxlib and is convenient to use, especially in conjunction with Dune. When applying a deriver, using [@@deriving_inline deriver_name] will apply the inline mode of deriver_name instead of the normal mode.

    Inline derivers will generate a .corrected version of the file that Dune can use to promote your file. For more information on how to use this feature to remove a dependency on ppxlib and a specific PPX from your project, refer to this guide.

    Integration with Dune

    If your PPX is written as a Dune project, you'll need to specify the kind field in your dune file with one of the following two values:

    • ppx_rewriter, or
    • ppx_deriver.

    If your transformation is anything but a deriver (e.g. an extension node rewriter), use ppx_rewriter. If your transformation is a deriver, then the TLDR workflow is: use ppx_deriver and furthermore add ppx_deriving to your dependencies, i.e. to the libraries field of your dune file. In fact, the situation is quite a bit more complex, though: apart from applying the registered transformations, the Ppxlib driver also does several checks. One of those consists in checking the following: whenever the source code contains [@@deriving foo (...)], then the Ppxlib driver expects a driver named foo to be registered. That's helpful to catch typos and missing dependencies on derivers and is certainly more hygienic than silently ignoring the annotation. However, for that check to work, the registered derivers must be grouped together into one process, i.e. a driver. UTop cannot use a static driver such as the Ppxlib one because dependencies are added dynamically to a UTop session. So the solution is the following: if you use ppx_deriver in your kind field, dune will add the right data to your PPXs META file to ensure that UTop will use the ppx_deriving driver, which links the derivers dynamically. As a result, ppx_derivng appears as a dependency in the META file. Therefore, whenever a user uses ocamlfind (e.g. by using UTop), they will hit an "ppx_derivng not found" error, unless you define ppx_deriving in your dependencies. So, long story short: if you strongly care about avoiding ppx_deriving as a dependency, use ppx_rewriter in your kind field and be aware of the fact that users won't be able to try your deriver in UTop; otherwise do the TLDR workflow.

    Here is a minimal Dune stanza for a rewriter:

    (library
    -  (public_name my_ppx_rewriter)
    -  (kind ppx_rewriter)
    -  (libraries ppxlib))

    The public name you chose is the name your users will refer to your PPX in the preprocess field. For example, to use this PPX rewriter, one would add the (preprocess (pps my_ppx_rewriter)) to their library or executable stanza.

    Defining AST Transformations

    In this chapter, we only focused on the ppxlib ceremony to declare all kinds of transformations. However, we did not cover how to write the actual generative function, the backbone of the transformation. ppxlib provides several modules to help with code generation and matching, which are covered in more depth in the next chapters of this documentation:

    • Ast_traverse, which helps in defining AST traversals, such as maps, folds, iter, etc.
    • Ast_helper and Ast_builder, for generating AST nodes in a simpler way than directly dealing with the Parsetree types, providing a more stable API.
    • Ast_pattern, the sibling of Ast_builder for matching on AST nodes, extracting values for them.
    • Ppxlib_metaquot, a PPX to manipulate code more simply by quoting and unquoting code.

    This documentation also includes some guidelines on how to generate nice code. We encourage you to read and follow it to produce high quality PPXs:

    \ No newline at end of file + (* won't trigger rewriting: *) + let _ = [%other_name "payload"] (* wrong name *) + let _ = match () with [%add_suffix "payload"] -> () (* wrong context *)

    The Payload Extraction

    An extension node contains a payload, which will be passed to the transformation function. However, while this payload contains all information, it is not always structured the best way for the transformation function. For instance, in [%add_suffix "payload"], the string "payload" is encoded as a structure item consisting of an expression’s evaluation, a constant that is a string.

    ppxlib allows separating the transformation function from the extraction of the payload’s relevant information. As explained in depth in the Destructing AST nodes chapter, this extraction is done by destructing the payload’s structure (which is therefore restricted: [%add_suffix 12] would be refused by the rewriter of the example below). The extraction is defined by a value of type Ast_pattern.t. The Ast_pattern module provides some kind of pattern-matching on AST nodes: a way to structurally extract values from an AST node in order to generate a value of another kind.

    For instance, a value of type (payload, int -> float -> expression, expression) Ast_pattern.t means that it defines a way to extract an int and a float from a payload, which should be then combined to define a value of type expression.

    In our case, the matched value will always be a payload, as that's the type for extension points' payloads. The type of the produced node will have to match the type of extension node we rewrite, expression in our example.

      # let extracter () = Ast_pattern.(single_expr_payload (estring __)) ;;
    +  val extracter : unit -> (payload, string -> 'a, 'a) Ast_pattern.t = <fun>

    The above pattern extracts a string inside an extension node pattern. It will extract "string" in the the extension node [%ext_name "string"] and will refuse [%ext_name 1+1]. For other ready-to-use examples of patterns, refer to the example section. For more in-depth explanation on the types and functions used above, see the Destructing AST nodes chapter and the Ast_pattern API .

    The unit argument in extractor is not important. It is added so that value restriction does not add noise to the type variables.

    The Expand Function

    The expander is the function that takes the values extracted from the payload and produces the value that replaces the extension node.

    Building and inspecting AST nodes can be painful due to how large the AST type is. ppxlib provides several helper modules to ease this generation, such as Ast_builder, Ppxlib_metaquot, Ast_pattern, and Ast_traverse, which are explained in their own chapters: Generating AST nodes, Destructing AST nodes and Traversing AST nodes.

    In the example below, you can ignore the body of the function until reading those chapters.

      # let expander ~ctxt s =
    +      let loc = Expansion_context.Extension.extension_point_loc ctxt in
    +      Ast_builder.Default.(estring ~loc (s ^ "_suffixed")) ;;
    +  val expander : ctxt:Expansion_context.Extension.t -> string -> expression =
    +  <fun>

    The expander takes ctxt as a named argument that is ignored here. This argument corresponds to additional information, such as the location of the extension node. More precisely, it is of type Expansion_context.Extension.t and includes:

    Declaring an Extender

    When we have defined the four prerequisites, we are able to combine all of them to define an extender using the Extension.V3.declare function.

      # V3.declare ;;
    +    string ->
    +    'context Context.t ->
    +    (payload, 'a, 'context) Ast_pattern.t ->
    +    (ctxt:Expansion_context.Extension.t -> 'a) ->
    +    t

    Note that the type is consistent: the context on which the expander is applied and the value produced by the expander need to be equal (indeed, 'a must be of the form 'extacted_1 -> 'extracted_2 -> ... -> 'context with the constraints given by Ast_pattern).

    We are thus able to create the extender given by the previous examples:

      # let my_extender = Extension.V3.declare extender_name context (extracter()) expander ;;
    +  val my_extender : Extension.t = <abstr>

    Note that we use the V3 version of the declare function, which passes the expansion context to the expander. Previous versions were kept for retro-compatibility.

    We can finally turn the extender into a rule (using Context_free.Rule.extension) and register it to the driver:

      # let extender_rule = Context_free.Rule.extension my_extender ;;
    +  val extender_rule : Context_free.Rule.t = <abstr>
    +  # Driver.register_transformation ~rules:[extender_rule] "name_only_for_debug_purpose" ;;
    +  - : unit = ()

    Now, the following:

      let () = print_endline [%add_suffix "helloworld"]

    would be rewritten by the PPX in:

      let () = print_endline "helloworld_suffixed"

    Derivers

    A deriver is characterised by several things:

    • The way to parse arguments passed through the attribute payload
    • The set of other derivers that need to run before it is applied
    • The actual generator function

    Contrary to extenders, the registration of the deriver as a Context_free.Rule.t is not made by the user via Driver.register_transformation, but rather by Deriving.add.

    Derivers Arguments

    In ppxlib, a deriver is applied by adding an attribute containing the derivers' names to apply:

      type tree = Leaf | Node of tree * tree  [@@deriving show, yojson]

    However, it is also possible to pass arguments to the derivers, either through a record or through labelled arguments:

      type tree = Leaf | Node of tree * tree  [@@deriving my_deriver ~flag ~option1:52]

    or

      type tree = Leaf | Node of tree * tree  [@@deriving my_deriver { flag; option1=52 }]

    The flag argument is a flag, and it can only be present or absent but not take a value. The option1 argument is a regular argument, so it is also optional but can take a value.

    In ppxlib, arguments have the type Deriving.Args.t. Similarly to the Ast_pattern.t type, a value of type (int -> string -> structure, structure) Args.t means that it provides a way to extract an integer from the argument and a string from the options, later combined to create a structure.

    The way to define a Deriving.Args.t value is to start with the value describing an empty set of arguments, Deriving.Args.empty. Then add the arguments one by one, using the combinator Deriving.Args.(+>). Each argument is created using either Deriving.Args.arg for optional arguments (with value extracted using Ast_pattern) or Deriving.Args.flag for optional arguments without values.

      # let args () = Deriving.Args.(empty +> arg "option1" (eint __) +> flag "flag") ;;
    +  val args : (int option -> bool -> 'a, 'a) Deriving.Args.t = <abstr>
    Derivers Dependency

    ppxlib allows declaring that a deriver depends on the previous application of another deriver. This is expressed simply as a list of derivers. For instance, the csv deriver depends on the fields deriver to run first.

      # let deps = [] ;;
    +  val deps : 'a list = []

    In this example, we do not include any dependency.

    Generator Function

    Similarly to an extender's expand function, the function generating new code in derivers also takes a context and the arguments extracted from the attribute payload. Here again, the body of the example function can be safely ignored ,as it relies on later chapters.

      # let generate_impl ~ctxt _ast option1 flag =
    +      let return s =  (* See "Generating code" chapter *)
    +        let loc = Expansion_context.Deriver.derived_item_loc ctxt in
    +        [ Ast_builder.Default.(pstr_eval ~loc (estring ~loc s) []) ]
    +      in
    +      if flag then return "flag is on"
    +      else
    +        match option1 with
    +        | Some i -> return (Printf.sprintf "option is %d" i)
    +        | None -> return "flag and option are not set" ;;
    +  val generate_impl :
    +  ctxt:Expansion_context.Deriver.t ->
    +  'a -> int option -> bool -> structure_item list = <fun>

    Similarly to extenders, there is an additional (ignored in the example) argument to the function: the context. This time, the context is of type Expansion_context.Deriver.t and includes:

    Registering a Deriver

    Once the generator function is defined, we can combine the argument extraction and the generator function to create a Deriving.Generator.t:

      # let generator () = Deriving.Generator.V2.make (args()) generate_impl ;;
    +  val generator : unit -> (structure_item list, 'a) Deriving.Generator.t = <abstr>

    This generator can then be registered as a deriver through the Deriving.add function. Note that, Deriving.add will call Driver.register_transformation itself, so you won't need to do it manually. Adding a deriver is done in a way that no two derivers with the same name can be registered. This includes derivers registered through the ppx_deriving library.

      # let my_deriver = Deriving.add "my_deriver" ~str_type_decl:(generator()) ;;
    +  val my_deriver : Deriving.t = <abstr>

    The different, optional named argument allows registering generators to be applied in different contexts and in one function call. Remember that you can only add one deriver with a given name, even if applied on different contexts. As the API shows, derivers are restricted to being applied in the following contexts:

    • Type declarations (type t = Foo of int)
    • Type extensions (type t += Foo of int)
    • Exceptions (exception E of int)
    • Module type declarations (module type T = sig end)

    in both structures and signatures.

    Constant Rewriting

    OCaml integrates a syntax to define special constants. Any g..z or G..Z suffix appended after a float or int is accepted by the parser (but refused later by the compiler). This means a PPX must rewrite them.

    ppxlib provides the Context_free.Rule.constant function to rewrite those litteral constants. The character (between g and z or G and Z) has to be provided, as well as the constant kind (float or int), and both the location and the litteral as a string will be passed to a rewriting function:

      # let kind = Context_free.Rule.Constant_kind.Integer ;;
    +  val kind : Context_free.Rule.Constant_kind.t =
    +    Ppxlib.Context_free.Rule.Constant_kind.Integer
    +  # let rewriter loc s = Ast_builder.Default.eint ~loc (int_of_string s * 100) ;;
    +  val rewriter : location -> string -> expression = <fun>
    +  # let rule = Context_free.Rule.constant kind 'g' rewriter ;;
    +  val rule : Context_free.Rule.t = <abstr>
    +  # Driver.register_transformation ~rules:[ rule ] "constant" ;;
    +  - : unit = ()

    As an example with the above transformation, let x = 2g + 3g will be rewritten to let x = 200 + 300.

    Special Functions

    ppxlib supports registering functions to be applied at compile time. A registered identifier f_macro will trigger rewriting in two situations:

    1. When it plays the role of the function in a function application
    2. Anywhere it appears in an expression

    For instance, in

      let _ = (f_macro arg1 arg2, f_macro)

    the rewriting will be triggered once for the left-hand side f_macro arg1 arg2 and once for the right hand side f_macro. It is the expansion function that is responsible for distinguishing between the two cases: using pattern-matching to distinguish between a function application in one case and a single identifier in the other.

    In order to register a special function, one needs to use Context_free.Rule.special_function, indicating the name of the special function and the rewriter. The rewriter will take the expression (without expansion context) and should output an expression option, where:

    • None signifies that no rewriting should be done: the top-down pass can continue (potentially inside the expression).
    • Some exp signifies the original expression should be replaced by expr. The top-down pass continues with expr.

    The difference between fun expr -> None and fun expr -> Some expr is that the former will continue the top-down pass inside expr, while the latter will continue the top-down pass from expr (included), therefore starting an infinite loop.

      # let expand e =
    +      let return n = Some (Ast_builder.Default.eint ~loc:e.pexp_loc n) in
    +      match e.pexp_desc with
    +      | Pexp_apply (_, arg_list) -> return (List.length arg_list)
    +      | _ -> return 0
    +    ;;
    +  val expand : expression -> expression option = <fun>
    +  # let rule = Context_free.Rule.special_function "n_args" expand ;;
    +  val rule : Context_free.Rule.t = <abstr>
    +  # Driver.register_transformation ~rules:[ rule ] "special_function_demo" ;;
    +   - : unit = ()

    With such a rewriter registered:

      # Printf.printf "n_args is applied with %d arguments\n" (n_args ignored "arguments");;
    +  n_args is applied with 2 arguments
    +  - : unit = ()

    Global transformation

    Global transformations are the most general kind of transformation. As such, they allow doing virtually any modifications, but this comes with several drawbacks. There are very few PPXs that really need this powerful but dangerous feature. In fact, even if, at first sight, it seems like your transformation isn't context-free, it's likely that you can find a more suitable abstraction with which it becomes context-free. Whenever that's the case, go for context-free! The mentioned drawbacks are:

    • It is harder for the user to know exactly what parts of the AST will be changed. Your transformation becomes a scary black box.
    • It is harder for ppxlib to combine several global transformations, as there is no guarantee that the effect of one will work well with the effect of another.
    • The job done by two global transformations (e.g., an AST traverse) cannot be factorised, resulting in slower compilation time.
    • If you don't make sure that you really follow all good practices, you might end up messing up the global developer experience.

    For all these reasons, a global transformation should be avoided whenever a context-free transformation could do the job, which by experience seems to be most of the time. The API for defining a global transformation is easy. A global transformation consists simply of the function and can be directly be registered with Driver.register_transformation.

      # let f str = List.filter (fun _ -> Random.bool ()) str;; (* Randomly omit structure items *)
    +  val f : 'a list -> 'a list = <fun>
    +  # Driver.register_transformation ~impl:f "absent_minded_transformation"
    +  - : unit = ()

    Inlining Transformations

    When using a PPX, the transformation happens at compile time, and the produced code could be directly inlined into the original code. This allows dropping the dependency on ppxlib and the PPX used to generate the code.

    This mechanism is implemented for derivers implemented in ppxlib and is convenient to use, especially in conjunction with Dune. When applying a deriver, using [@@deriving_inline deriver_name] will apply the inline mode of deriver_name instead of the normal mode.

    Inline derivers will generate a .corrected version of the file that Dune can use to promote your file. For more information on how to use this feature to remove a dependency on ppxlib and a specific PPX from your project, refer to this guide.

    Integration with Dune

    If your PPX is written as a Dune project, you'll need to specify the kind field in your dune file with one of the following two values:

    • ppx_rewriter, or
    • ppx_deriver.

    If your transformation is anything but a deriver (e.g. an extension node rewriter), use ppx_rewriter. If your transformation is a deriver, then the TLDR workflow is: use ppx_deriver and furthermore add ppx_deriving to your dependencies, i.e. to the libraries field of your dune file. In fact, the situation is quite a bit more complex, though: apart from applying the registered transformations, the Ppxlib driver also does several checks. One of those consists in checking the following: whenever the source code contains [@@deriving foo (...)], then the Ppxlib driver expects a driver named foo to be registered. That's helpful to catch typos and missing dependencies on derivers and is certainly more hygienic than silently ignoring the annotation. However, for that check to work, the registered derivers must be grouped together into one process, i.e. a driver. UTop cannot use a static driver such as the Ppxlib one because dependencies are added dynamically to a UTop session. So the solution is the following: if you use ppx_deriver in your kind field, dune will add the right data to your PPXs META file to ensure that UTop will use the ppx_deriving driver, which links the derivers dynamically. As a result, ppx_derivng appears as a dependency in the META file. Therefore, whenever a user uses ocamlfind (e.g. by using UTop), they will hit an "ppx_derivng not found" error, unless you define ppx_deriving in your dependencies. So, long story short: if you strongly care about avoiding ppx_deriving as a dependency, use ppx_rewriter in your kind field and be aware of the fact that users won't be able to try your deriver in UTop; otherwise do the TLDR workflow.

    Here is a minimal Dune stanza for a rewriter:

      (library
    +    (public_name my_ppx_rewriter)
    +    (kind ppx_rewriter)
    +    (libraries ppxlib))

    The public name you chose is the name your users will refer to your PPX in the preprocess field. For example, to use this PPX rewriter, one would add the (preprocess (pps my_ppx_rewriter)) to their library or executable stanza.

    Defining AST Transformations

    In this chapter, we only focused on the ppxlib ceremony to declare all kinds of transformations. However, we did not cover how to write the actual generative function, the backbone of the transformation. ppxlib provides several modules to help with code generation and matching, which are covered in more depth in the next chapters of this documentation:

    • Ast_traverse, which helps in defining AST traversals, such as maps, folds, iter, etc.
    • Ast_helper and Ast_builder, for generating AST nodes in a simpler way than directly dealing with the Parsetree types, providing a more stable API.
    • Ast_pattern, the sibling of Ast_builder for matching on AST nodes, extracting values for them.
    • Ppxlib_metaquot, a PPX to manipulate code more simply by quoting and unquoting code.

    This documentation also includes some guidelines on how to generate nice code. We encourage you to read and follow it to produce high quality PPXs:

    diff --git a/sexplib0/Sexplib0/Sexp/Private/index.html b/sexplib0/Sexplib0/Sexp/Private/index.html index cc75232..991df01 100644 --- a/sexplib0/Sexplib0/Sexp/Private/index.html +++ b/sexplib0/Sexplib0/Sexp/Private/index.html @@ -1,7 +1,7 @@ -Private (sexplib0.Sexplib0.Sexp.Private)

    Module Sexp.Private

    val size : t -> int * int
    val buffer : unit -> Stdlib.Buffer.t
    val to_buffer : buf:Stdlib.Buffer.t -> t -> unit
    val to_buffer_hum : buf:Stdlib.Buffer.t -> ?indent:int -> t -> unit
    val to_buffer_mach : buf:Stdlib.Buffer.t -> t -> unit
    val to_buffer_gen : - buf:'buffer -> - add_char:('buffer -> char -> unit) -> - add_string:('buffer -> string -> unit) -> +Private (sexplib0.Sexplib0.Sexp.Private)

    Module Sexp.Private

    val size : t -> int * int
    val buffer : unit -> Stdlib.Buffer.t
    val to_buffer : buf:Stdlib.Buffer.t -> t -> unit
    val to_buffer_hum : buf:Stdlib.Buffer.t -> ?indent:int -> t -> unit
    val to_buffer_mach : buf:Stdlib.Buffer.t -> t -> unit
    val to_buffer_gen : + buf:'buffer -> + add_char:('buffer -> char -> unit) -> + add_string:('buffer -> string -> unit) -> t -> - unit
    val mach_maybe_esc_str : string -> string
    val must_escape : string -> bool
    val esc_str : string -> string
    \ No newline at end of file + unit
    val mach_maybe_esc_str : string -> string
    val must_escape : string -> bool
    val esc_str : string -> string
    diff --git a/sexplib0/Sexplib0/Sexp/index.html b/sexplib0/Sexplib0/Sexp/index.html index 12ee8d2..4a3fb7d 100644 --- a/sexplib0/Sexplib0/Sexp/index.html +++ b/sexplib0/Sexplib0/Sexp/index.html @@ -1,5 +1,5 @@ -Sexp (sexplib0.Sexplib0.Sexp)

    Module Sexplib0.Sexp

    Type of S-expressions

    type t =
    1. | Atom of string
    2. | List of t list
    val t_of_sexp : t -> t
    val sexp_of_t : t -> t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    exception Not_found_s of t

    Not_found_s is used by functions that historically raised Not_found, to allow them to raise an exception that contains an informative error message (as a sexp), while still having an exception that can be distinguished from other exceptions.

    exception Of_sexp_error of exn * t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    Helpers

    val message : string -> (string * t) list -> t

    Helper to build nice s-expressions for error messages. It imitates the behavior of [%message ...] from the ppx_sexp_message rewriter.

    message name key_values produces a s-expression list starting with atom name and followed by list of size 2 of the form (key value). When the key is the empty string, value is used directly instead as for [%message].

    For instance the following code:

    Sexp.message "error"
    -  [ "x", sexp_of_int 42
    -  ; "" , sexp_of_exn Exit
    -  ]

    produces the s-expression:

    (error (x 42) Exit)

    Defaults

    val default_indent : int ref

    default_indent reference to default indentation level for human-readable conversions.

    Initialisation value: 2.

    Pretty printing of S-expressions

    val pp_hum : Stdlib.Format.formatter -> t -> unit

    pp_hum ppf sexp outputs S-expression sexp to formatter ppf in human readable form.

    val pp_hum_indent : int -> Stdlib.Format.formatter -> t -> unit

    pp_hum_indent n ppf sexp outputs S-expression sexp to formatter ppf in human readable form and indentation level n.

    val pp_mach : Stdlib.Format.formatter -> t -> unit

    pp_mach ppf sexp outputs S-expression sexp to formatter ppf in machine readable (i.e. most compact) form.

    val pp : Stdlib.Format.formatter -> t -> unit

    Same as pp_mach.

    Conversion to strings

    val to_string_hum : ?indent:int -> t -> string

    to_string_hum ?indent sexp converts S-expression sexp to a string in human readable form with indentation level indent.

    • parameter indent

      default = !default_indent

    val to_string_mach : t -> string

    to_string_mach sexp converts S-expression sexp to a string in machine readable (i.e. most compact) form.

    val to_string : t -> string

    Same as to_string_mach.

    Styles

    val of_float_style : [ `Underscores | `No_underscores ] ref
    val of_int_style : [ `Underscores | `No_underscores ] ref
    module Private : sig ... end
    \ No newline at end of file +Sexp (sexplib0.Sexplib0.Sexp)

    Module Sexplib0.Sexp

    Type of S-expressions

    type t =
    1. | Atom of string
    2. | List of t list
    val t_of_sexp : t -> t
    val sexp_of_t : t -> t
    val equal : t -> t -> bool
    val compare : t -> t -> int
    exception Not_found_s of t

    Not_found_s is used by functions that historically raised Not_found, to allow them to raise an exception that contains an informative error message (as a sexp), while still having an exception that can be distinguished from other exceptions.

    exception Of_sexp_error of exn * t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    Helpers

    val message : string -> (string * t) list -> t

    Helper to build nice s-expressions for error messages. It imitates the behavior of [%message ...] from the ppx_sexp_message rewriter.

    message name key_values produces a s-expression list starting with atom name and followed by list of size 2 of the form (key value). When the key is the empty string, value is used directly instead as for [%message].

    For instance the following code:

      Sexp.message "error"
    +    [ "x", sexp_of_int 42
    +    ; "" , sexp_of_exn Exit
    +    ]

    produces the s-expression:

      (error (x 42) Exit)

    Defaults

    val default_indent : int ref

    default_indent reference to default indentation level for human-readable conversions.

    Initialisation value: 2.

    Pretty printing of S-expressions

    val pp_hum : Stdlib.Format.formatter -> t -> unit

    pp_hum ppf sexp outputs S-expression sexp to formatter ppf in human readable form.

    val pp_hum_indent : int -> Stdlib.Format.formatter -> t -> unit

    pp_hum_indent n ppf sexp outputs S-expression sexp to formatter ppf in human readable form and indentation level n.

    val pp_mach : Stdlib.Format.formatter -> t -> unit

    pp_mach ppf sexp outputs S-expression sexp to formatter ppf in machine readable (i.e. most compact) form.

    val pp : Stdlib.Format.formatter -> t -> unit

    Same as pp_mach.

    Conversion to strings

    val to_string_hum : ?indent:int -> t -> string

    to_string_hum ?indent sexp converts S-expression sexp to a string in human readable form with indentation level indent.

    • parameter indent

      default = !default_indent

    val to_string_mach : t -> string

    to_string_mach sexp converts S-expression sexp to a string in machine readable (i.e. most compact) form.

    val to_string : t -> string

    Same as to_string_mach.

    Styles

    val of_float_style : [ `Underscores | `No_underscores ] ref
    val of_int_style : [ `Underscores | `No_underscores ] ref
    module Private : sig ... end
    diff --git a/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html b/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html index dfc5118..be99a10 100644 --- a/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html +++ b/sexplib0/Sexplib0/Sexp_conv/Exn_converter/For_unit_tests_only/index.html @@ -1,2 +1,2 @@ -For_unit_tests_only (sexplib0.Sexplib0.Sexp_conv.Exn_converter.For_unit_tests_only)

    Module Exn_converter.For_unit_tests_only

    val size : unit -> int
    \ No newline at end of file +For_unit_tests_only (sexplib0.Sexplib0.Sexp_conv.Exn_converter.For_unit_tests_only)

    Module Exn_converter.For_unit_tests_only

    val size : unit -> int
    diff --git a/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html b/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html index ea2cd36..892517e 100644 --- a/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html +++ b/sexplib0/Sexplib0/Sexp_conv/Exn_converter/index.html @@ -1,7 +1,7 @@ -Exn_converter (sexplib0.Sexplib0.Sexp_conv.Exn_converter)

    Module Sexp_conv.Exn_converter

    val add : - ?printexc:bool -> - ?finalise:bool -> +Exn_converter (sexplib0.Sexplib0.Sexp_conv.Exn_converter)

    Module Sexp_conv.Exn_converter

    val add : + ?printexc:bool -> + ?finalise:bool -> extension_constructor -> (exn -> Sexp.t) -> - unit

    add constructor sexp_of_exn registers exception S-expression converter sexp_of_exn for exceptions with the given constructor.

    NOTE: finalise is ignored, and provided only for backward compatibility.

    module For_unit_tests_only : sig ... end
    \ No newline at end of file + unit

    add constructor sexp_of_exn registers exception S-expression converter sexp_of_exn for exceptions with the given constructor.

    NOTE: finalise is ignored, and provided only for backward compatibility.

    module For_unit_tests_only : sig ... end
    diff --git a/sexplib0/Sexplib0/Sexp_conv/index.html b/sexplib0/Sexplib0/Sexp_conv/index.html index 0cbaaf1..79295c5 100644 --- a/sexplib0/Sexplib0/Sexp_conv/index.html +++ b/sexplib0/Sexplib0/Sexp_conv/index.html @@ -1,17 +1,14 @@ -Sexp_conv (sexplib0.Sexplib0.Sexp_conv)

    Module Sexplib0.Sexp_conv

    Utility Module for S-expression Conversions

    Conversion of OCaml-values to S-expressions
    val default_string_of_float : (float -> string) ref

    default_string_of_float reference to the default function used to convert floats to strings.

    Initially set to fun n -> sprintf "%.20G" n.

    val write_old_option_format : bool ref

    write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

    Initially set to true.

    val read_old_option_format : bool ref

    read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

    Initially set to true.

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

    val sexp_of_unit : unit -> Sexp.t

    sexp_of_unit () converts a value of type unit to an S-expression.

    val sexp_of_bool : bool -> Sexp.t

    sexp_of_bool b converts the value x of type bool to an S-expression.

    val sexp_of_string : string -> Sexp.t

    sexp_of_string str converts the value str of type string to an S-expression.

    val sexp_of_bytes : bytes -> Sexp.t

    sexp_of_bytes str converts the value str of type bytes to an S-expression.

    val sexp_of_char : char -> Sexp.t

    sexp_of_char c converts the value c of type char to an S-expression.

    val sexp_of_int : int -> Sexp.t

    sexp_of_int n converts the value n of type int to an S-expression.

    val sexp_of_float : float -> Sexp.t

    sexp_of_float n converts the value n of type float to an S-expression.

    val sexp_of_int32 : int32 -> Sexp.t

    sexp_of_int32 n converts the value n of type int32 to an S-expression.

    val sexp_of_int64 : int64 -> Sexp.t

    sexp_of_int64 n converts the value n of type int64 to an S-expression.

    val sexp_of_nativeint : nativeint -> Sexp.t

    sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

    val sexp_of_ref : ('a -> Sexp.t) -> 'a ref -> Sexp.t

    sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_lazy_t : ('a -> Sexp.t) -> 'a lazy_t -> Sexp.t

    sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_option : ('a -> Sexp.t) -> 'a option -> Sexp.t

    sexp_of_option conv opt converts the value opt of type 'a - option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_pair : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a * 'b) -> Sexp.t

    sexp_of_pair conv1 conv2 pair converts a pair to an S-expression. It uses its first argument to convert the first element of the pair, and its second argument to convert the second element of the pair.

    val sexp_of_triple : +Sexp_conv (sexplib0.Sexplib0.Sexp_conv)

    Module Sexplib0.Sexp_conv

    Utility Module for S-expression Conversions

    Conversion of OCaml-values to S-expressions
    val default_string_of_float : (float -> string) ref

    default_string_of_float reference to the default function used to convert floats to strings.

    Initially set to fun n -> sprintf "%.20G" n.

    val write_old_option_format : bool ref

    write_old_option_format reference for the default option format used to write option values. If set to true, the old-style option format will be used, the new-style one otherwise.

    Initially set to true.

    val read_old_option_format : bool ref

    read_old_option_format reference for the default option format used to read option values. Of_sexp_error will be raised with old-style option values if this reference is set to false. Reading new-style option values is always supported. Using a global reference instead of changing the converter calling conventions is the only way to avoid breaking old code with the standard macros.

    Initially set to true.

    val list_map : ('a -> 'b) -> 'a list -> 'b list

    We re-export a tail recursive map function, because some modules override the standard library functions (e.g. StdLabels) which wrecks havoc with the camlp4 extension.

    val sexp_of_unit : unit -> Sexp.t

    sexp_of_unit () converts a value of type unit to an S-expression.

    val sexp_of_bool : bool -> Sexp.t

    sexp_of_bool b converts the value x of type bool to an S-expression.

    val sexp_of_string : string -> Sexp.t

    sexp_of_string str converts the value str of type string to an S-expression.

    val sexp_of_bytes : bytes -> Sexp.t

    sexp_of_bytes str converts the value str of type bytes to an S-expression.

    val sexp_of_char : char -> Sexp.t

    sexp_of_char c converts the value c of type char to an S-expression.

    val sexp_of_int : int -> Sexp.t

    sexp_of_int n converts the value n of type int to an S-expression.

    val sexp_of_float : float -> Sexp.t

    sexp_of_float n converts the value n of type float to an S-expression.

    val sexp_of_int32 : int32 -> Sexp.t

    sexp_of_int32 n converts the value n of type int32 to an S-expression.

    val sexp_of_int64 : int64 -> Sexp.t

    sexp_of_int64 n converts the value n of type int64 to an S-expression.

    val sexp_of_nativeint : nativeint -> Sexp.t

    sexp_of_nativeint n converts the value n of type nativeint to an S-expression.

    val sexp_of_ref : ('a -> Sexp.t) -> 'a ref -> Sexp.t

    sexp_of_ref conv r converts the value r of type 'a ref to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_lazy_t : ('a -> Sexp.t) -> 'a lazy_t -> Sexp.t

    sexp_of_lazy_t conv l converts the value l of type 'a lazy_t to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_option : ('a -> Sexp.t) -> 'a option -> Sexp.t

    sexp_of_option conv opt converts the value opt of type 'a option to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_pair : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a * 'b) -> Sexp.t

    sexp_of_pair conv1 conv2 pair converts a pair to an S-expression. It uses its first argument to convert the first element of the pair, and its second argument to convert the second element of the pair.

    val sexp_of_triple : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('c -> Sexp.t) -> ('a * 'b * 'c) -> - Sexp.t

    sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

    val sexp_of_list : ('a -> Sexp.t) -> 'a list -> Sexp.t

    sexp_of_list conv lst converts the value lst of type 'a - list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_array : ('a -> Sexp.t) -> 'a array -> Sexp.t

    sexp_of_array conv ar converts the value ar of type 'a - array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_hashtbl : + Sexp.t

    sexp_of_triple conv1 conv2 conv3 triple converts a triple to an S-expression using conv1, conv2, and conv3 to convert its elements.

    val sexp_of_list : ('a -> Sexp.t) -> 'a list -> Sexp.t

    sexp_of_list conv lst converts the value lst of type 'a list to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_array : ('a -> Sexp.t) -> 'a array -> Sexp.t

    sexp_of_array conv ar converts the value ar of type 'a array to an S-expression. Uses conv to convert values of type 'a to an S-expression.

    val sexp_of_hashtbl : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a, 'b) Stdlib.Hashtbl.t -> - Sexp.t

    sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

    val sexp_of_opaque : 'a -> Sexp.t

    sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

    val sexp_of_fun : ('a -> 'b) -> Sexp.t

    sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

    Conversion of S-expressions to OCaml-values
    exception Of_sexp_error of exn * Sexp.t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    val record_check_extra_fields : bool ref

    record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

    val of_sexp_error : string -> Sexp.t -> 'a

    of_sexp_error reason sexp

    • raises Of_sexp_error

      (Failure reason, sexp).

    val of_sexp_error_exn : exn -> Sexp.t -> 'a

    of_sexp_error exc sexp

    • raises Of_sexp_error

      (exc, sexp).

    val unit_of_sexp : Sexp.t -> unit

    unit_of_sexp sexp converts S-expression sexp to a value of type unit.

    val bool_of_sexp : Sexp.t -> bool

    bool_of_sexp sexp converts S-expression sexp to a value of type bool.

    val string_of_sexp : Sexp.t -> string

    string_of_sexp sexp converts S-expression sexp to a value of type string.

    val bytes_of_sexp : Sexp.t -> bytes

    bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

    val char_of_sexp : Sexp.t -> char

    char_of_sexp sexp converts S-expression sexp to a value of type char.

    val int_of_sexp : Sexp.t -> int

    int_of_sexp sexp converts S-expression sexp to a value of type int.

    val float_of_sexp : Sexp.t -> float

    float_of_sexp sexp converts S-expression sexp to a value of type float.

    val int32_of_sexp : Sexp.t -> int32

    int32_of_sexp sexp converts S-expression sexp to a value of type int32.

    val int64_of_sexp : Sexp.t -> int64

    int64_of_sexp sexp converts S-expression sexp to a value of type int64.

    val nativeint_of_sexp : Sexp.t -> nativeint

    nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

    val ref_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a ref

    ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

    val lazy_t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a lazy_t

    lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

    val option_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a option

    option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

    val pair_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> 'a * 'b

    pair_of_sexp conv1 conv2 sexp converts S-expression sexp to a pair of type 'a * 'b using conversion functions conv1 and conv2, which convert S-expressions to values of type 'a and 'b respectively.

    val triple_of_sexp : + Sexp.t

    sexp_of_hashtbl conv_key conv_value htbl converts the value htbl of type ('a, 'b) Hashtbl.t to an S-expression. Uses conv_key to convert the hashtable keys of type 'a, and conv_value to convert hashtable values of type 'b to S-expressions.

    val sexp_of_opaque : 'a -> Sexp.t

    sexp_of_opaque x converts the value x of opaque type to an S-expression. This means the user need not provide converters, but the result cannot be interpreted.

    val sexp_of_fun : ('a -> 'b) -> Sexp.t

    sexp_of_fun f converts the value f of function type to a dummy S-expression. Functions cannot be serialized as S-expressions, but at least a placeholder can be generated for pretty-printing.

    Conversion of S-expressions to OCaml-values
    exception Of_sexp_error of exn * Sexp.t

    Of_sexp_error (exn, sexp) the exception raised when an S-expression could not be successfully converted to an OCaml-value.

    val record_check_extra_fields : bool ref

    record_check_extra_fields checks for extra (= unknown) fields in record S-expressions.

    val of_sexp_error : string -> Sexp.t -> 'a

    of_sexp_error reason sexp

    val of_sexp_error_exn : exn -> Sexp.t -> 'a

    of_sexp_error exc sexp

    val unit_of_sexp : Sexp.t -> unit

    unit_of_sexp sexp converts S-expression sexp to a value of type unit.

    val bool_of_sexp : Sexp.t -> bool

    bool_of_sexp sexp converts S-expression sexp to a value of type bool.

    val string_of_sexp : Sexp.t -> string

    string_of_sexp sexp converts S-expression sexp to a value of type string.

    val bytes_of_sexp : Sexp.t -> bytes

    bytes_of_sexp sexp converts S-expression sexp to a value of type bytes.

    val char_of_sexp : Sexp.t -> char

    char_of_sexp sexp converts S-expression sexp to a value of type char.

    val int_of_sexp : Sexp.t -> int

    int_of_sexp sexp converts S-expression sexp to a value of type int.

    val float_of_sexp : Sexp.t -> float

    float_of_sexp sexp converts S-expression sexp to a value of type float.

    val int32_of_sexp : Sexp.t -> int32

    int32_of_sexp sexp converts S-expression sexp to a value of type int32.

    val int64_of_sexp : Sexp.t -> int64

    int64_of_sexp sexp converts S-expression sexp to a value of type int64.

    val nativeint_of_sexp : Sexp.t -> nativeint

    nativeint_of_sexp sexp converts S-expression sexp to a value of type nativeint.

    val ref_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a ref

    ref_of_sexp conv sexp converts S-expression sexp to a value of type 'a ref using conversion function conv, which converts an S-expression to a value of type 'a.

    val lazy_t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a lazy_t

    lazy_t_of_sexp conv sexp converts S-expression sexp to a value of type 'a lazy_t using conversion function conv, which converts an S-expression to a value of type 'a.

    val option_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a option

    option_of_sexp conv sexp converts S-expression sexp to a value of type 'a option using conversion function conv, which converts an S-expression to a value of type 'a.

    val pair_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> 'a * 'b

    pair_of_sexp conv1 conv2 sexp converts S-expression sexp to a pair of type 'a * 'b using conversion functions conv1 and conv2, which convert S-expressions to values of type 'a and 'b respectively.

    val triple_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> (Sexp.t -> 'c) -> @@ -20,10 +17,10 @@ (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> - ('a, 'b) Stdlib.Hashtbl.t

    hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

    val opaque_of_sexp : Sexp.t -> 'a

    opaque_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to an opaque value.

    val fun_of_sexp : Sexp.t -> 'a

    fun_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to a function.

    Sexp Grammars

    val sexp_grammar_with_tags : + ('a, 'b) Stdlib.Hashtbl.t

    hashtbl_of_sexp conv_key conv_value sexp converts S-expression sexp to a value of type ('a, 'b) Hashtbl.t using conversion function conv_key, which converts an S-expression to hashtable key of type 'a, and function conv_value, which converts an S-expression to hashtable value of type 'b.

    val opaque_of_sexp : Sexp.t -> 'a

    opaque_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to an opaque value.

    val fun_of_sexp : Sexp.t -> 'a

    fun_of_sexp sexp

    • raises Of_sexp_error

      when attempting to convert an S-expression to a function.

    Sexp Grammars

    val sexp_grammar_with_tags : Sexp_grammar.grammar -> - tags:(string * Sexp.t) list -> + tags:(string * Sexp.t) list -> Sexp_grammar.grammar
    val sexp_grammar_with_tag_list : 'a Sexp_grammar.with_tag_list -> - tags:(string * Sexp.t) list -> - 'a Sexp_grammar.with_tag_list

    Sexp grammar definitions.

    val unit_sexp_grammar : unit Sexp_grammar.t
    val bool_sexp_grammar : bool Sexp_grammar.t
    val string_sexp_grammar : string Sexp_grammar.t
    val bytes_sexp_grammar : bytes Sexp_grammar.t
    val char_sexp_grammar : char Sexp_grammar.t
    val int_sexp_grammar : int Sexp_grammar.t
    val float_sexp_grammar : float Sexp_grammar.t
    val int32_sexp_grammar : int32 Sexp_grammar.t
    val int64_sexp_grammar : int64 Sexp_grammar.t
    val nativeint_sexp_grammar : nativeint Sexp_grammar.t
    val sexp_t_sexp_grammar : Sexp.t Sexp_grammar.t
    val ref_sexp_grammar : 'a Sexp_grammar.t -> 'a ref Sexp_grammar.t
    val lazy_t_sexp_grammar : 'a Sexp_grammar.t -> 'a lazy_t Sexp_grammar.t
    val option_sexp_grammar : 'a Sexp_grammar.t -> 'a option Sexp_grammar.t
    val list_sexp_grammar : 'a Sexp_grammar.t -> 'a list Sexp_grammar.t
    val array_sexp_grammar : 'a Sexp_grammar.t -> 'a array Sexp_grammar.t
    val opaque_sexp_grammar : 'a Sexp_grammar.t
    val fun_sexp_grammar : 'a Sexp_grammar.t

    Exception converters

    val sexp_of_exn : exn -> Sexp.t

    sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

    val printexc_prefer_sexp : exn -> string

    Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

    This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

    val sexp_of_exn_opt : exn -> Sexp.t option

    sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

    module Exn_converter : sig ... end
    \ No newline at end of file + tags:(string * Sexp.t) list -> + 'a Sexp_grammar.with_tag_list

    Sexp grammar definitions.

    val unit_sexp_grammar : unit Sexp_grammar.t
    val bool_sexp_grammar : bool Sexp_grammar.t
    val string_sexp_grammar : string Sexp_grammar.t
    val bytes_sexp_grammar : bytes Sexp_grammar.t
    val char_sexp_grammar : char Sexp_grammar.t
    val int_sexp_grammar : int Sexp_grammar.t
    val float_sexp_grammar : float Sexp_grammar.t
    val int32_sexp_grammar : int32 Sexp_grammar.t
    val int64_sexp_grammar : int64 Sexp_grammar.t
    val nativeint_sexp_grammar : nativeint Sexp_grammar.t
    val sexp_t_sexp_grammar : Sexp.t Sexp_grammar.t
    val ref_sexp_grammar : 'a Sexp_grammar.t -> 'a ref Sexp_grammar.t
    val lazy_t_sexp_grammar : 'a Sexp_grammar.t -> 'a lazy_t Sexp_grammar.t
    val option_sexp_grammar : 'a Sexp_grammar.t -> 'a option Sexp_grammar.t
    val list_sexp_grammar : 'a Sexp_grammar.t -> 'a list Sexp_grammar.t
    val array_sexp_grammar : 'a Sexp_grammar.t -> 'a array Sexp_grammar.t
    val opaque_sexp_grammar : 'a Sexp_grammar.t
    val fun_sexp_grammar : 'a Sexp_grammar.t

    Exception converters

    val sexp_of_exn : exn -> Sexp.t

    sexp_of_exn exc converts exception exc to an S-expression. If no suitable converter is found, the standard converter in Printexc will be used to generate an atomic S-expression.

    val printexc_prefer_sexp : exn -> string

    Converts an exception to a string via sexp, falling back to Printexc.to_string if no sexp conversion is registered for this exception.

    This is different from Printexc.to_string in that it additionally uses the sexp converters registered with ~printexc:false. Another difference is that the behavior of Printexc can be overridden with Printexc.register, but here we always try sexp conversion first.

    val sexp_of_exn_opt : exn -> Sexp.t option

    sexp_of_exn_opt exc converts exception exc to Some sexp. If no suitable converter is found, None is returned instead.

    module Exn_converter : sig ... end
    diff --git a/sexplib0/Sexplib0/Sexp_conv_error/index.html b/sexplib0/Sexplib0/Sexp_conv_error/index.html index 38bfa32..56e0ecd 100644 --- a/sexplib0/Sexplib0/Sexp_conv_error/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_error/index.html @@ -1,7 +1,7 @@ -Sexp_conv_error (sexplib0.Sexplib0.Sexp_conv_error)

    Module Sexplib0.Sexp_conv_error

    exception Of_sexp_error of exn * Sexp.t
    val error : loc:string -> sexp:Sexp.t -> string -> 'a
    val simple_error : string -> string -> Sexp.t -> 'a
    val tuple_of_size_n_expected : string -> int -> Sexp.t -> 'a
    val tuple_pair_expected : string -> string -> Sexp.t -> 'a
    val tuple_incorrect_label : string -> string -> int -> Sexp.t -> 'a
    val stag_no_args : string -> Sexp.t -> 'a
    val stag_incorrect_n_args : string -> string -> Sexp.t -> 'a
    val stag_takes_args : string -> Sexp.t -> 'a
    val nested_list_invalid_sum : string -> Sexp.t -> 'a
    val empty_list_invalid_sum : string -> Sexp.t -> 'a
    val unexpected_stag : string -> Sexp.t -> 'a
    val record_sexp_bool_with_payload : string -> Sexp.t -> 'a
    val record_only_pairs_expected : string -> Sexp.t -> 'a
    val record_invalid_fields : - what:string -> - loc:string -> +Sexp_conv_error (sexplib0.Sexplib0.Sexp_conv_error)

    Module Sexplib0.Sexp_conv_error

    exception Of_sexp_error of exn * Sexp.t
    val error : loc:string -> sexp:Sexp.t -> string -> 'a
    val simple_error : string -> string -> Sexp.t -> 'a
    val tuple_of_size_n_expected : string -> int -> Sexp.t -> 'a
    val tuple_pair_expected : string -> string -> Sexp.t -> 'a
    val tuple_incorrect_label : string -> string -> int -> Sexp.t -> 'a
    val stag_no_args : string -> Sexp.t -> 'a
    val stag_incorrect_n_args : string -> string -> Sexp.t -> 'a
    val stag_takes_args : string -> Sexp.t -> 'a
    val nested_list_invalid_sum : string -> Sexp.t -> 'a
    val empty_list_invalid_sum : string -> Sexp.t -> 'a
    val unexpected_stag : string -> Sexp.t -> 'a
    val record_sexp_bool_with_payload : string -> Sexp.t -> 'a
    val record_only_pairs_expected : string -> Sexp.t -> 'a
    val record_invalid_fields : + what:string -> + loc:string -> string list -> Sexp.t -> - 'a
    val record_duplicate_fields : string -> string list -> Sexp.t -> 'a
    val record_extra_fields : string -> string list -> Sexp.t -> 'a
    val record_get_undefined_loop : string list -> (bool * string) list -> string
    val record_undefined_elements : string -> Sexp.t -> (bool * string) list -> 'a
    val record_list_instead_atom : string -> Sexp.t -> 'a
    val record_poly_field_value : string -> Sexp.t -> 'a
    exception No_variant_match
    val no_variant_match : unit -> 'a
    val no_matching_variant_found : string -> Sexp.t -> 'a
    val ptag_no_args : string -> Sexp.t -> 'a
    val ptag_incorrect_n_args : string -> string -> Sexp.t -> 'a
    val ptag_takes_args : string -> Sexp.t -> 'a
    val nested_list_invalid_poly_var : string -> Sexp.t -> 'a
    val empty_list_invalid_poly_var : string -> Sexp.t -> 'a
    val empty_type : string -> Sexp.t -> 'a
    \ No newline at end of file + 'a
    val record_duplicate_fields : string -> string list -> Sexp.t -> 'a
    val record_extra_fields : string -> string list -> Sexp.t -> 'a
    val record_get_undefined_loop : string list -> (bool * string) list -> string
    val record_undefined_elements : string -> Sexp.t -> (bool * string) list -> 'a
    val record_list_instead_atom : string -> Sexp.t -> 'a
    val record_poly_field_value : string -> Sexp.t -> 'a
    exception No_variant_match
    val no_variant_match : unit -> 'a
    val no_matching_variant_found : string -> Sexp.t -> 'a
    val ptag_no_args : string -> Sexp.t -> 'a
    val ptag_incorrect_n_args : string -> string -> Sexp.t -> 'a
    val ptag_takes_args : string -> Sexp.t -> 'a
    val nested_list_invalid_poly_var : string -> Sexp.t -> 'a
    val empty_list_invalid_poly_var : string -> Sexp.t -> 'a
    val empty_type : string -> Sexp.t -> 'a
    diff --git a/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html b/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html index 613243e..f73c9cd 100644 --- a/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/Fields/index.html @@ -1,2 +1,2 @@ -Fields (sexplib0.Sexplib0.Sexp_conv_labeled_tuple.Fields)

    Module Sexp_conv_labeled_tuple.Fields

    type _ t =
    1. | Field : {
      1. name : string;
      2. conv : Sexp.t -> 'a;
      3. rest : 'b t;
      } -> ('a * 'b) t
    2. | Empty : unit t
    \ No newline at end of file +Fields (sexplib0.Sexplib0.Sexp_conv_labeled_tuple.Fields)

    Module Sexp_conv_labeled_tuple.Fields

    type _ t =
    1. | Field : {
      1. name : string;
      2. conv : Sexp.t -> 'a;
      3. rest : 'b t;
      } -> ('a * 'b) t
    2. | Empty : unit t
    diff --git a/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html b/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html index 5a6f093..2f52a09 100644 --- a/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_labeled_tuple/index.html @@ -1,7 +1,7 @@ -Sexp_conv_labeled_tuple (sexplib0.Sexplib0.Sexp_conv_labeled_tuple)

    Module Sexplib0.Sexp_conv_labeled_tuple

    module Fields : sig ... end
    val labeled_tuple_of_sexp : - caller:string -> - fields:'a Fields.t -> - create:('a -> 'b) -> +Sexp_conv_labeled_tuple (sexplib0.Sexplib0.Sexp_conv_labeled_tuple)

    Module Sexplib0.Sexp_conv_labeled_tuple

    module Fields : sig ... end
    val labeled_tuple_of_sexp : + caller:string -> + fields:'a Fields.t -> + create:('a -> 'b) -> Sexp.t -> - 'b
    \ No newline at end of file + 'b
    diff --git a/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html b/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html index 68cb959..d082a1d 100644 --- a/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_record/Fields/index.html @@ -1,2 +1,2 @@ -Fields (sexplib0.Sexplib0.Sexp_conv_record.Fields)

    Module Sexp_conv_record.Fields

    type _ t =
    1. | Empty : unit t
    2. | Field : {
      1. name : string;
      2. kind : ('a, 'conv) Kind.t;
      3. conv : 'conv;
      4. rest : 'b t;
      } -> ('a * 'b) t

    A GADT specifying record fields.

    \ No newline at end of file +Fields (sexplib0.Sexplib0.Sexp_conv_record.Fields)

    Module Sexp_conv_record.Fields

    type _ t =
    1. | Empty : unit t
    2. | Field : {
      1. name : string;
      2. kind : ('a, 'conv) Kind.t;
      3. conv : 'conv;
      4. rest : 'b t;
      } -> ('a * 'b) t

    A GADT specifying record fields.

    diff --git a/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html b/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html index f270968..317069e 100644 --- a/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_record/Kind/index.html @@ -1,2 +1,2 @@ -Kind (sexplib0.Sexplib0.Sexp_conv_record.Kind)

    Module Sexp_conv_record.Kind

    type (_, _) t =
    1. | Default : (unit -> 'a) -> ('a, Sexp.t -> 'a) t
    2. | Omit_nil : ('a, Sexp.t -> 'a) t
    3. | Required : ('a, Sexp.t -> 'a) t
    4. | Sexp_array : ('a array, Sexp.t -> 'a) t
    5. | Sexp_bool : (bool, unit) t
    6. | Sexp_list : ('a list, Sexp.t -> 'a) t
    7. | Sexp_option : ('a option, Sexp.t -> 'a) t

    A GADT specifying how to parse a record field. See documentation for ppx_sexp_conv.

    \ No newline at end of file +Kind (sexplib0.Sexplib0.Sexp_conv_record.Kind)

    Module Sexp_conv_record.Kind

    type (_, _) t =
    1. | Default : (unit -> 'a) -> ('a, Sexp.t -> 'a) t
    2. | Omit_nil : ('a, Sexp.t -> 'a) t
    3. | Required : ('a, Sexp.t -> 'a) t
    4. | Sexp_array : ('a array, Sexp.t -> 'a) t
    5. | Sexp_bool : (bool, unit) t
    6. | Sexp_list : ('a list, Sexp.t -> 'a) t
    7. | Sexp_option : ('a option, Sexp.t -> 'a) t

    A GADT specifying how to parse a record field. See documentation for ppx_sexp_conv.

    diff --git a/sexplib0/Sexplib0/Sexp_conv_record/index.html b/sexplib0/Sexplib0/Sexp_conv_record/index.html index df27334..e2e1725 100644 --- a/sexplib0/Sexplib0/Sexp_conv_record/index.html +++ b/sexplib0/Sexplib0/Sexp_conv_record/index.html @@ -1,17 +1,17 @@ -Sexp_conv_record (sexplib0.Sexplib0.Sexp_conv_record)

    Module Sexplib0.Sexp_conv_record

    module Kind : sig ... end
    module Fields : sig ... end
    val record_of_sexp : - caller:string -> - fields:'a Fields.t -> - index_of_field:(string -> int) -> - allow_extra_fields:bool -> - create:('a -> 'b) -> +Sexp_conv_record (sexplib0.Sexplib0.Sexp_conv_record)

    Module Sexplib0.Sexp_conv_record

    module Kind : sig ... end
    module Fields : sig ... end
    val record_of_sexp : + caller:string -> + fields:'a Fields.t -> + index_of_field:(string -> int) -> + allow_extra_fields:bool -> + create:('a -> 'b) -> Sexp.t -> 'b

    Parses a record from a sexp that must be a list of fields.

    Uses caller as the source for error messages. Parses using the given fields. Uses index_of_field to look up field names found in sexps. If allow_extra_fields is true, extra fields are allowed and discarded without error. create is used to construct the final returned value.

    val record_of_sexps : - caller:string -> - context:Sexp.t -> - fields:'a Fields.t -> - index_of_field:(string -> int) -> - allow_extra_fields:bool -> - create:('a -> 'b) -> + caller:string -> + context:Sexp.t -> + fields:'a Fields.t -> + index_of_field:(string -> int) -> + allow_extra_fields:bool -> + create:('a -> 'b) -> Sexp.t list -> - 'b

    Like record_of_sexp, but for a list of sexps with no List wrapper. Used, for example, to parse arguments to a variant constructor with an inlined record argument. Reports context for parse errors when no more specific sexp is applicable.

    \ No newline at end of file + 'b

    Like record_of_sexp, but for a list of sexps with no List wrapper. Used, for example, to parse arguments to a variant constructor with an inlined record argument. Reports context for parse errors when no more specific sexp is applicable.

    diff --git a/sexplib0/Sexplib0/Sexp_grammar/index.html b/sexplib0/Sexplib0/Sexp_grammar/index.html index 3491208..3adb2a9 100644 --- a/sexplib0/Sexplib0/Sexp_grammar/index.html +++ b/sexplib0/Sexplib0/Sexp_grammar/index.html @@ -1,39 +1,39 @@ -Sexp_grammar (sexplib0.Sexplib0.Sexp_grammar)

    Module Sexplib0.Sexp_grammar

    Representation of S-expression grammars

    This module defines a representation for s-expression grammars. Using ppx_sexp_conv and [@@deriving sexp_grammar] produces a grammar that is compatible with the derived of_sexp for a given type.

    As with other derived definitions, polymorphic types derive a function that takes a grammar for each type argument and produces a grammar for the monomorphized type.

    Monomorphic types derive a grammar directly. To avoid top-level side effects, [@@deriving sexp_grammar] wraps grammars in the Lazy constructor as needed.

    This type may change over time as our needs for expressive grammars change. We will attempt to make changes backward-compatible, or at least provide a reasonable upgrade path.

    type grammar =
    1. | Any of string
      (*

      accepts any sexp; string is a type name for human readability

      *)
    2. | Bool
      (*

      accepts the atoms "true" or "false", modulo capitalization

      *)
    3. | Char
      (*

      accepts any single-character atom

      *)
    4. | Integer
      (*

      accepts any atom matching ocaml integer syntax, regardless of bit width

      *)
    5. | Float
      (*

      accepts any atom matching ocaml float syntax

      *)
    6. | String
      (*

      accepts any atom

      *)
    7. | Option of grammar
      (*

      accepts an option, both None vs Some _ and () vs (_).

      *)
    8. | List of list_grammar
      (*

      accepts a list

      *)
    9. | Variant of variant
      (*

      accepts clauses keyed by a leading or sole atom

      *)
    10. | Union of grammar list
      (*

      accepts a sexp if any of the listed grammars accepts it

      *)
    11. | Tagged of grammar with_tag
      (*

      annotates a grammar with a client-specific key/value pair

      *)
    12. | Tyvar of string
      (*

      Name of a type variable, e.g. Tyvar "a" for 'a. Only meaningful when the body of the innermost enclosing defn defines a corresponding type variable.

      *)
    13. | Tycon of string * grammar list * defn list
      (*

      Type constructor applied to arguments, and its definition.

      For example, writing Tycon ("tree", [ Integer ], defns) represents int tree, for whatever tree is defined as in defns. The following defines tree as a binary tree with the parameter type stored at the leaves.

      let defns =
      -  [ { tycon = "tree"
      -    ; tyvars = ["a"]
      -    ; grammar =
      -        Variant
      -          { name_kind = Capitalized
      -          ; clauses =
      -              [ { name = "Node"
      -                ; args = Cons (Recursive ("node", [Tyvar "a"]), Empty)
      -                }
      -              ; { name = "Leaf"
      -                ; args = Cons (Recursive ("leaf", [Tyvar "a"]), Empty)
      -                }
      -              ]
      +Sexp_grammar (sexplib0.Sexplib0.Sexp_grammar)

      Module Sexplib0.Sexp_grammar

      Representation of S-expression grammars

      This module defines a representation for s-expression grammars. Using ppx_sexp_conv and [@@deriving sexp_grammar] produces a grammar that is compatible with the derived of_sexp for a given type.

      As with other derived definitions, polymorphic types derive a function that takes a grammar for each type argument and produces a grammar for the monomorphized type.

      Monomorphic types derive a grammar directly. To avoid top-level side effects, [@@deriving sexp_grammar] wraps grammars in the Lazy constructor as needed.

      This type may change over time as our needs for expressive grammars change. We will attempt to make changes backward-compatible, or at least provide a reasonable upgrade path.

      type grammar =
      1. | Any of string
        (*

        accepts any sexp; string is a type name for human readability

        *)
      2. | Bool
        (*

        accepts the atoms "true" or "false", modulo capitalization

        *)
      3. | Char
        (*

        accepts any single-character atom

        *)
      4. | Integer
        (*

        accepts any atom matching ocaml integer syntax, regardless of bit width

        *)
      5. | Float
        (*

        accepts any atom matching ocaml float syntax

        *)
      6. | String
        (*

        accepts any atom

        *)
      7. | Option of grammar
        (*

        accepts an option, both None vs Some _ and () vs (_).

        *)
      8. | List of list_grammar
        (*

        accepts a list

        *)
      9. | Variant of variant
        (*

        accepts clauses keyed by a leading or sole atom

        *)
      10. | Union of grammar list
        (*

        accepts a sexp if any of the listed grammars accepts it

        *)
      11. | Tagged of grammar with_tag
        (*

        annotates a grammar with a client-specific key/value pair

        *)
      12. | Tyvar of string
        (*

        Name of a type variable, e.g. Tyvar "a" for 'a. Only meaningful when the body of the innermost enclosing defn defines a corresponding type variable.

        *)
      13. | Tycon of string * grammar list * defn list
        (*

        Type constructor applied to arguments, and its definition.

        For example, writing Tycon ("tree", [ Integer ], defns) represents int tree, for whatever tree is defined as in defns. The following defines tree as a binary tree with the parameter type stored at the leaves.

          let defns =
        +    [ { tycon = "tree"
        +      ; tyvars = ["a"]
        +      ; grammar =
        +          Variant
        +            { name_kind = Capitalized
        +            ; clauses =
        +                [ { name = "Node"
        +                  ; args = Cons (Recursive ("node", [Tyvar "a"]), Empty)
        +                  }
        +                ; { name = "Leaf"
        +                  ; args = Cons (Recursive ("leaf", [Tyvar "a"]), Empty)
        +                  }
        +                ]
        +            }
        +      }
        +    ; { tycon = "node"
        +      ; tyvars = ["a"]
        +      ; grammar = List (Many (Recursive "tree", [Tyvar "a"]))
        +      }
        +    ; { tycon = "leaf"
        +      ; tyvars = ["a"]
        +      ; grammar = [Tyvar "a"]
        +      }
        +    ]
        +  ;;

        To illustrate the meaning of Tycon with respect to defns, and to demonstrate one way to access them, it is equivalent to expand the definition of "tree" one level and move the defns to enclosed recursive references:

          Tycon ("tree", [ Integer ], defns)
        +  -->
        +  Variant
        +    { name_kind = Capitalized
        +    ; clauses =
        +        [ { name = "Node"
        +          ; args = Cons (Tycon ("node", [Tyvar "a"], defns), Empty)
                   }
        -    }
        -  ; { tycon = "node"
        -    ; tyvars = ["a"]
        -    ; grammar = List (Many (Recursive "tree", [Tyvar "a"]))
        -    }
        -  ; { tycon = "leaf"
        -    ; tyvars = ["a"]
        -    ; grammar = [Tyvar "a"]
        -    }
        -  ]
        -;;

        To illustrate the meaning of Tycon with respect to defns, and to demonstrate one way to access them, it is equivalent to expand the definition of "tree" one level and move the defns to enclosed recursive references:

        Tycon ("tree", [ Integer ], defns)
        --->
        -Variant
        -  { name_kind = Capitalized
        -  ; clauses =
        -      [ { name = "Node"
        -        ; args = Cons (Tycon ("node", [Tyvar "a"], defns), Empty)
        -        }
        -      ; { name = "Leaf"
        -        ; args = Cons (Tycon ("leaf", [Tyvar "a"], defns), Empty)
        -        }
        -      ]
        -  }

        This transformation exposes the structure of a grammar with recursive references, while preserving the meaning of recursively-defined elements.

        *)
      14. | Recursive of string * grammar list
        (*

        Type constructor applied to arguments. Used to denote recursive type references. Only meaningful when used inside the defns of a Tycon grammar, to refer to a type constructor in the nearest enclosing defn list.

        *)
      15. | Lazy of grammar lazy_t
        (*

        Lazily computed grammar. Use Lazy to avoid top-level side effects. To define recursive grammars, use Recursive instead.

        *)

      Grammar of a sexp.

      and list_grammar =
      1. | Empty
        (*

        accepts an empty list of sexps

        *)
      2. | Cons of grammar * list_grammar
        (*

        accepts a non-empty list with head and tail matching the given grammars

        *)
      3. | Many of grammar
        (*

        accepts zero or more sexps, each matching the given grammar

        *)
      4. | Fields of record
        (*

        accepts sexps representing fields of a record

        *)

      Grammar of a list of sexps.

      and case_sensitivity =
      1. | Case_insensitive
        (*

        Comparison is case insensitive. Used for custom parsers.

        *)
      2. | Case_sensitive
        (*

        Comparison is case sensitive. Used for polymorphic variants.

        *)
      3. | Case_sensitive_except_first_character
        (*

        Comparison is case insensitive for the first character and case sensitive afterward. Used for regular variants.

        *)

      Case sensitivity options for names of variant constructors.

      and variant = {
      1. case_sensitivity : case_sensitivity;
      2. clauses : clause with_tag_list list;
      }

      Grammar of variants. Accepts any sexp matching one of the clauses.

      and clause = {
      1. name : string;
      2. clause_kind : clause_kind;
      }

      Grammar of a single variant clause. Accepts sexps based on the clause_kind.

      and clause_kind =
      1. | Atom_clause
      2. | List_clause of {
        1. args : list_grammar;
        }

      Grammar of a single variant clause's contents. Atom_clause accepts an atom matching the clause's name. List_clause accepts a list whose head is an atom matching the clause's name and whose tail matches args. The clause's name is matched modulo the variant's name_kind.

      and record = {
      1. allow_extra_fields : bool;
      2. fields : field with_tag_list list;
      }

      Grammar of a record. Accepts any list of sexps specifying each of the fields, regardless of order. If allow_extra_fields is specified, ignores sexps with names not found in fields.

      and field = {
      1. name : string;
      2. required : bool;
      3. args : list_grammar;
      }

      Grammar of a record field. A field must show up exactly once in a record if required, or at most once otherwise. Accepts a list headed by name as an atom, followed by sexps matching args.

      and 'a with_tag = {
      1. key : string;
      2. value : Sexp.t;
      3. grammar : 'a;
      }

      Grammar tagged with client-specific key/value pair.

      and 'a with_tag_list =
      1. | Tag of 'a with_tag_list with_tag
      2. | No_tag of 'a
      and defn = {
      1. tycon : string;
      2. tyvars : string list;
      3. grammar : grammar;
      }

      Grammar of a recursive type definition. Names the tycon being defined, and the tyvars it takes as parameters. Specifies the grammar of the tycon. The grammar may refer to any of the tyvars, and to any of the tycons from the same set of Recursive definitions.

      type _ t = {
      1. untyped : grammar;
      }

      Top-level grammar type. Has a phantom type parameter to associate each grammar with the type its sexps represent. This makes it harder to apply grammars to the wrong type, while grammars can still be easily coerced to a new type if needed.

      val coerce : 'a t -> 'b t
      val tag : 'a t -> key:string -> value:Sexp.t -> 'a0 t
      val doc_comment_tag : string

      This reserved key is used for all tags generated from doc comments.

      val type_name_tag : string

      This reserved key can be used to associate a type name with a grammar.

      val assoc_tag : string

      This reserved key indicates that a sexp represents a key/value association. The tag's value is ignored.

      val assoc_key_tag : string

      This reserved key indicates that a sexp is a key in a key/value association. The tag's value is ignored.

      val assoc_value_tag : string

      This reserved key indicates that a sexp is a value in a key/value association. The tag's value is ignored.

      val completion_suggested : string

      When the key is set to Atom "false" for a variant clause, that clause should not be suggested in auto-completion based on the sexp grammar.

      \ No newline at end of file + ; { name = "Leaf" + ; args = Cons (Tycon ("leaf", [Tyvar "a"], defns), Empty) + } + ] + }

      This transformation exposes the structure of a grammar with recursive references, while preserving the meaning of recursively-defined elements.

      *)
    14. | Recursive of string * grammar list
      (*

      Type constructor applied to arguments. Used to denote recursive type references. Only meaningful when used inside the defns of a Tycon grammar, to refer to a type constructor in the nearest enclosing defn list.

      *)
    15. | Lazy of grammar lazy_t
      (*

      Lazily computed grammar. Use Lazy to avoid top-level side effects. To define recursive grammars, use Recursive instead.

      *)

    Grammar of a sexp.

    and list_grammar =
    1. | Empty
      (*

      accepts an empty list of sexps

      *)
    2. | Cons of grammar * list_grammar
      (*

      accepts a non-empty list with head and tail matching the given grammars

      *)
    3. | Many of grammar
      (*

      accepts zero or more sexps, each matching the given grammar

      *)
    4. | Fields of record
      (*

      accepts sexps representing fields of a record

      *)

    Grammar of a list of sexps.

    and case_sensitivity =
    1. | Case_insensitive
      (*

      Comparison is case insensitive. Used for custom parsers.

      *)
    2. | Case_sensitive
      (*

      Comparison is case sensitive. Used for polymorphic variants.

      *)
    3. | Case_sensitive_except_first_character
      (*

      Comparison is case insensitive for the first character and case sensitive afterward. Used for regular variants.

      *)

    Case sensitivity options for names of variant constructors.

    and variant = {
    1. case_sensitivity : case_sensitivity;
    2. clauses : clause with_tag_list list;
    }

    Grammar of variants. Accepts any sexp matching one of the clauses.

    and clause = {
    1. name : string;
    2. clause_kind : clause_kind;
    }

    Grammar of a single variant clause. Accepts sexps based on the clause_kind.

    and clause_kind =
    1. | Atom_clause
    2. | List_clause of {
      1. args : list_grammar;
      }

    Grammar of a single variant clause's contents. Atom_clause accepts an atom matching the clause's name. List_clause accepts a list whose head is an atom matching the clause's name and whose tail matches args. The clause's name is matched modulo the variant's name_kind.

    and record = {
    1. allow_extra_fields : bool;
    2. fields : field with_tag_list list;
    }

    Grammar of a record. Accepts any list of sexps specifying each of the fields, regardless of order. If allow_extra_fields is specified, ignores sexps with names not found in fields.

    and field = {
    1. name : string;
    2. required : bool;
    3. args : list_grammar;
    }

    Grammar of a record field. A field must show up exactly once in a record if required, or at most once otherwise. Accepts a list headed by name as an atom, followed by sexps matching args.

    and 'a with_tag = {
    1. key : string;
    2. value : Sexp.t;
    3. grammar : 'a;
    }

    Grammar tagged with client-specific key/value pair.

    and 'a with_tag_list =
    1. | Tag of 'a with_tag_list with_tag
    2. | No_tag of 'a
    and defn = {
    1. tycon : string;
    2. tyvars : string list;
    3. grammar : grammar;
    }

    Grammar of a recursive type definition. Names the tycon being defined, and the tyvars it takes as parameters. Specifies the grammar of the tycon. The grammar may refer to any of the tyvars, and to any of the tycons from the same set of Recursive definitions.

    type _ t = {
    1. untyped : grammar;
    }

    Top-level grammar type. Has a phantom type parameter to associate each grammar with the type its sexps represent. This makes it harder to apply grammars to the wrong type, while grammars can still be easily coerced to a new type if needed.

    val coerce : 'a t -> 'b t
    val tag : 'a t -> key:string -> value:Sexp.t -> 'a t
    val doc_comment_tag : string

    This reserved key is used for all tags generated from doc comments.

    val type_name_tag : string

    This reserved key can be used to associate a type name with a grammar.

    val assoc_tag : string

    This reserved key indicates that a sexp represents a key/value association. The tag's value is ignored.

    val assoc_key_tag : string

    This reserved key indicates that a sexp is a key in a key/value association. The tag's value is ignored.

    val assoc_value_tag : string

    This reserved key indicates that a sexp is a value in a key/value association. The tag's value is ignored.

    val completion_suggested : string

    When the key is set to Atom "false" for a variant clause, that clause should not be suggested in auto-completion based on the sexp grammar.

    diff --git a/sexplib0/Sexplib0/Sexpable/index.html b/sexplib0/Sexplib0/Sexpable/index.html index 21d0e03..a082951 100644 --- a/sexplib0/Sexplib0/Sexpable/index.html +++ b/sexplib0/Sexplib0/Sexpable/index.html @@ -1,2 +1,2 @@ -Sexpable (sexplib0.Sexplib0.Sexpable)

    Module Sexplib0.Sexpable

    module type S = sig ... end
    module type S1 = sig ... end
    module type S2 = sig ... end
    module type S3 = sig ... end
    \ No newline at end of file +Sexpable (sexplib0.Sexplib0.Sexpable)

    Module Sexplib0.Sexpable

    module type S = sig ... end
    module type S1 = sig ... end
    module type S2 = sig ... end
    module type S3 = sig ... end
    diff --git a/sexplib0/Sexplib0/Sexpable/module-type-S/index.html b/sexplib0/Sexplib0/Sexpable/module-type-S/index.html index 9744f97..f51e54d 100644 --- a/sexplib0/Sexplib0/Sexpable/module-type-S/index.html +++ b/sexplib0/Sexplib0/Sexpable/module-type-S/index.html @@ -1,2 +1,2 @@ -S (sexplib0.Sexplib0.Sexpable.S)

    Module type Sexpable.S

    type t
    val t_of_sexp : Sexp.t -> t
    val sexp_of_t : t -> Sexp.t
    \ No newline at end of file +S (sexplib0.Sexplib0.Sexpable.S)

    Module type Sexpable.S

    type t
    val t_of_sexp : Sexp.t -> t
    val sexp_of_t : t -> Sexp.t
    diff --git a/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html b/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html index 1211c80..f066f4a 100644 --- a/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html +++ b/sexplib0/Sexplib0/Sexpable/module-type-S1/index.html @@ -1,2 +1,2 @@ -S1 (sexplib0.Sexplib0.Sexpable.S1)

    Module type Sexpable.S1

    type 'a t
    val t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a t
    val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
    \ No newline at end of file +S1 (sexplib0.Sexplib0.Sexpable.S1)

    Module type Sexpable.S1

    type 'a t
    val t_of_sexp : (Sexp.t -> 'a) -> Sexp.t -> 'a t
    val sexp_of_t : ('a -> Sexp.t) -> 'a t -> Sexp.t
    diff --git a/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html b/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html index 890e9f3..3c1d753 100644 --- a/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html +++ b/sexplib0/Sexplib0/Sexpable/module-type-S2/index.html @@ -1,2 +1,2 @@ -S2 (sexplib0.Sexplib0.Sexpable.S2)

    Module type Sexpable.S2

    type ('a, 'b) t
    val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> ('a, 'b) t
    val sexp_of_t : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a, 'b) t -> Sexp.t
    \ No newline at end of file +S2 (sexplib0.Sexplib0.Sexpable.S2)

    Module type Sexpable.S2

    type ('a, 'b) t
    val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> Sexp.t -> ('a, 'b) t
    val sexp_of_t : ('a -> Sexp.t) -> ('b -> Sexp.t) -> ('a, 'b) t -> Sexp.t
    diff --git a/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html b/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html index 58a6638..db34944 100644 --- a/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html +++ b/sexplib0/Sexplib0/Sexpable/module-type-S3/index.html @@ -1,5 +1,5 @@ -S3 (sexplib0.Sexplib0.Sexpable.S3)

    Module type Sexpable.S3

    type ('a, 'b, 'c) t
    val t_of_sexp : +S3 (sexplib0.Sexplib0.Sexpable.S3)

    Module type Sexpable.S3

    type ('a, 'b, 'c) t
    val t_of_sexp : (Sexp.t -> 'a) -> (Sexp.t -> 'b) -> (Sexp.t -> 'c) -> @@ -9,4 +9,4 @@ ('b -> Sexp.t) -> ('c -> Sexp.t) -> ('a, 'b, 'c) t -> - Sexp.t
    \ No newline at end of file + Sexp.t
    diff --git a/sexplib0/Sexplib0/index.html b/sexplib0/Sexplib0/index.html index c1f31d2..7e1709d 100644 --- a/sexplib0/Sexplib0/index.html +++ b/sexplib0/Sexplib0/index.html @@ -1,2 +1,2 @@ -Sexplib0 (sexplib0.Sexplib0)

    Module Sexplib0

    module Sexp : sig ... end

    Type of S-expressions

    module Sexp_conv : sig ... end

    Utility Module for S-expression Conversions

    module Sexp_conv_error : sig ... end
    module Sexp_conv_record : sig ... end
    module Sexp_conv_labeled_tuple : sig ... end
    module Sexp_grammar : sig ... end

    Representation of S-expression grammars

    module Sexpable : sig ... end
    \ No newline at end of file +Sexplib0 (sexplib0.Sexplib0)

    Module Sexplib0

    module Sexp : sig ... end

    Type of S-expressions

    module Sexp_conv : sig ... end

    Utility Module for S-expression Conversions

    module Sexp_conv_error : sig ... end
    module Sexp_conv_record : sig ... end
    module Sexp_conv_labeled_tuple : sig ... end
    module Sexp_grammar : sig ... end

    Representation of S-expression grammars

    module Sexpable : sig ... end
    diff --git a/sexplib0/Sexplib0__/index.html b/sexplib0/Sexplib0__/index.html index 87dfefd..f1ea318 100644 --- a/sexplib0/Sexplib0__/index.html +++ b/sexplib0/Sexplib0__/index.html @@ -1,2 +1,2 @@ -Sexplib0__ (sexplib0.Sexplib0__)

    Module Sexplib0__

    \ No newline at end of file +Sexplib0__ (sexplib0.Sexplib0__)

    Module Sexplib0__

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp/index.html b/sexplib0/Sexplib0__Sexp/index.html index 1de3979..bb9ca4b 100644 --- a/sexplib0/Sexplib0__Sexp/index.html +++ b/sexplib0/Sexplib0__Sexp/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp (sexplib0.Sexplib0__Sexp)

    Module Sexplib0__Sexp

    \ No newline at end of file +Sexplib0__Sexp (sexplib0.Sexplib0__Sexp)

    Module Sexplib0__Sexp

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_conv/index.html b/sexplib0/Sexplib0__Sexp_conv/index.html index 6702c51..3ed2864 100644 --- a/sexplib0/Sexplib0__Sexp_conv/index.html +++ b/sexplib0/Sexplib0__Sexp_conv/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_conv (sexplib0.Sexplib0__Sexp_conv)

    Module Sexplib0__Sexp_conv

    \ No newline at end of file +Sexplib0__Sexp_conv (sexplib0.Sexplib0__Sexp_conv)

    Module Sexplib0__Sexp_conv

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_conv_error/index.html b/sexplib0/Sexplib0__Sexp_conv_error/index.html index 1379df4..0003157 100644 --- a/sexplib0/Sexplib0__Sexp_conv_error/index.html +++ b/sexplib0/Sexplib0__Sexp_conv_error/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_conv_error (sexplib0.Sexplib0__Sexp_conv_error)

    Module Sexplib0__Sexp_conv_error

    \ No newline at end of file +Sexplib0__Sexp_conv_error (sexplib0.Sexplib0__Sexp_conv_error)

    Module Sexplib0__Sexp_conv_error

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_conv_grammar/index.html b/sexplib0/Sexplib0__Sexp_conv_grammar/index.html index 4739a00..8b89fdc 100644 --- a/sexplib0/Sexplib0__Sexp_conv_grammar/index.html +++ b/sexplib0/Sexplib0__Sexp_conv_grammar/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_conv_grammar (sexplib0.Sexplib0__Sexp_conv_grammar)

    Module Sexplib0__Sexp_conv_grammar

    \ No newline at end of file +Sexplib0__Sexp_conv_grammar (sexplib0.Sexplib0__Sexp_conv_grammar)

    Module Sexplib0__Sexp_conv_grammar

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_conv_labeled_tuple/index.html b/sexplib0/Sexplib0__Sexp_conv_labeled_tuple/index.html index 0b77cfc..6d53b64 100644 --- a/sexplib0/Sexplib0__Sexp_conv_labeled_tuple/index.html +++ b/sexplib0/Sexplib0__Sexp_conv_labeled_tuple/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_conv_labeled_tuple (sexplib0.Sexplib0__Sexp_conv_labeled_tuple)

    Module Sexplib0__Sexp_conv_labeled_tuple

    \ No newline at end of file +Sexplib0__Sexp_conv_labeled_tuple (sexplib0.Sexplib0__Sexp_conv_labeled_tuple)

    Module Sexplib0__Sexp_conv_labeled_tuple

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_conv_record/index.html b/sexplib0/Sexplib0__Sexp_conv_record/index.html index f437240..0ff5885 100644 --- a/sexplib0/Sexplib0__Sexp_conv_record/index.html +++ b/sexplib0/Sexplib0__Sexp_conv_record/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_conv_record (sexplib0.Sexplib0__Sexp_conv_record)

    Module Sexplib0__Sexp_conv_record

    \ No newline at end of file +Sexplib0__Sexp_conv_record (sexplib0.Sexplib0__Sexp_conv_record)

    Module Sexplib0__Sexp_conv_record

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexp_grammar/index.html b/sexplib0/Sexplib0__Sexp_grammar/index.html index ff4b6eb..3d1bd5e 100644 --- a/sexplib0/Sexplib0__Sexp_grammar/index.html +++ b/sexplib0/Sexplib0__Sexp_grammar/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexp_grammar (sexplib0.Sexplib0__Sexp_grammar)

    Module Sexplib0__Sexp_grammar

    \ No newline at end of file +Sexplib0__Sexp_grammar (sexplib0.Sexplib0__Sexp_grammar)

    Module Sexplib0__Sexp_grammar

    This module is hidden.

    diff --git a/sexplib0/Sexplib0__Sexpable/index.html b/sexplib0/Sexplib0__Sexpable/index.html index 21bc18c..0b1d297 100644 --- a/sexplib0/Sexplib0__Sexpable/index.html +++ b/sexplib0/Sexplib0__Sexpable/index.html @@ -1,2 +1,2 @@ -Sexplib0__Sexpable (sexplib0.Sexplib0__Sexpable)

    Module Sexplib0__Sexpable

    \ No newline at end of file +Sexplib0__Sexpable (sexplib0.Sexplib0__Sexpable)

    Module Sexplib0__Sexpable

    This module is hidden.

    diff --git a/sexplib0/index.html b/sexplib0/index.html index 1fae96d..d558290 100644 --- a/sexplib0/index.html +++ b/sexplib0/index.html @@ -1,2 +1,2 @@ -index (sexplib0.index)

    Package sexplib0

    Package info

    changes-files
    license-files
    readme-files
    \ No newline at end of file +index (sexplib0.index)

    Package sexplib0

    Package info

    changes-files
    license-files
    readme-files
    diff --git a/trace-fuchsia/Trace_fuchsia/Buf/index.html b/trace-fuchsia/Trace_fuchsia/Buf/index.html index 54968f4..d4ccedb 100644 --- a/trace-fuchsia/Trace_fuchsia/Buf/index.html +++ b/trace-fuchsia/Trace_fuchsia/Buf/index.html @@ -1,2 +1,2 @@ -Buf (trace-fuchsia.Trace_fuchsia.Buf)

    Module Trace_fuchsia.Buf

    type t = {
    1. buf : bytes;
    2. mutable offset : int;
    }
    val empty : t
    val create : int -> t
    val clear : t -> unit
    val available : t -> int
    val size : t -> int
    val is_empty : t -> bool
    val add_i64 : t -> int64 -> unit
    val add_string : t -> string -> unit
    val to_string : t -> string
    \ No newline at end of file +Buf (trace-fuchsia.Trace_fuchsia.Buf)

    Module Trace_fuchsia.Buf

    type t = {
    1. buf : bytes;
    2. mutable offset : int;
    }
    val empty : t
    val create : int -> t
    val clear : t -> unit
    val available : t -> int
    val size : t -> int
    val is_empty : t -> bool
    val add_i64 : t -> int64 -> unit
    val add_string : t -> string -> unit
    val to_string : t -> string
    diff --git a/trace-fuchsia/Trace_fuchsia/Buf_chain/index.html b/trace-fuchsia/Trace_fuchsia/Buf_chain/index.html index 862dd62..51cad69 100644 --- a/trace-fuchsia/Trace_fuchsia/Buf_chain/index.html +++ b/trace-fuchsia/Trace_fuchsia/Buf_chain/index.html @@ -1,2 +1,2 @@ -Buf_chain (trace-fuchsia.Trace_fuchsia.Buf_chain)

    Module Trace_fuchsia.Buf_chain

    A set of buffers in use, and a set of ready buffers

    type buffers =
    1. | B_one of {
      1. mutable buf : Buf.t;
      }

    Buffers in use

    type t = {
    1. bufs : buffers;
    2. has_ready : bool Trace_fuchsia__.Common_.A.t;
    3. ready : Buf.t Stdlib.Queue.t Trace_fuchsia__.Lock.t;
      (*

      Buffers that are full (enough) and must be written

      *)
    4. buf_pool : Buf_pool.t;
    }

    A set of buffers, some of which are ready to be written

    val create : sharded:bool -> buf_pool:Buf_pool.t -> unit -> t
    val ready_all_non_empty : t -> unit

    Move all non-empty buffers to ready

    val has_ready : t -> bool
    val pop_ready : t -> f:(Buf.t Stdlib.Queue.t -> 'a) -> 'a0

    Get access to ready buffers, then clean them up automatically

    val max_size_word : t -> int

    Maximum size available, in words, for a single message

    val with_buf : t -> available_word:int -> (Buf.t -> 'a) -> 'a0

    Obtain a buffer with at least available_word 64-bit words

    val dispose : t -> unit

    Dispose of resources (here, recycle buffers)

    \ No newline at end of file +Buf_chain (trace-fuchsia.Trace_fuchsia.Buf_chain)

    Module Trace_fuchsia.Buf_chain

    A set of buffers in use, and a set of ready buffers

    type buffers =
    1. | B_one of {
      1. mutable buf : Buf.t;
      }
    2. | B_many of Buf.t Trace_fuchsia__.Lock.t array
      (*

      mask(thread id) -> buffer. This reduces contention

      *)

    Buffers in use

    type t = {
    1. bufs : buffers;
    2. has_ready : bool Stdlib.Atomic.t;
    3. ready : Buf.t Stdlib.Queue.t Trace_fuchsia__.Lock.t;
      (*

      Buffers that are full (enough) and must be written

      *)
    4. buf_pool : Buf_pool.t;
    }

    A set of buffers, some of which are ready to be written

    val create : sharded:bool -> buf_pool:Buf_pool.t -> unit -> t
    val ready_all_non_empty : t -> unit

    Move all non-empty buffers to ready

    val has_ready : t -> bool
    val pop_ready : t -> f:(Buf.t Stdlib.Queue.t -> 'a) -> 'a

    Get access to ready buffers, then clean them up automatically

    val max_size_word : t -> int

    Maximum size available, in words, for a single message

    val with_buf : t -> available_word:int -> (Buf.t -> 'a) -> 'a

    Obtain a buffer with at least available_word 64-bit words

    val dispose : t -> unit

    Dispose of resources (here, recycle buffers)

    diff --git a/trace-fuchsia/Trace_fuchsia/Buf_pool/index.html b/trace-fuchsia/Trace_fuchsia/Buf_pool/index.html index 4e0c1b7..25738f5 100644 --- a/trace-fuchsia/Trace_fuchsia/Buf_pool/index.html +++ b/trace-fuchsia/Trace_fuchsia/Buf_pool/index.html @@ -1,2 +1,2 @@ -Buf_pool (trace-fuchsia.Trace_fuchsia.Buf_pool)

    Module Trace_fuchsia.Buf_pool

    val create : ?max_size:int -> unit -> t
    val alloc : 'a Trace_private_util.Rpool.t -> 'a
    val recycle : Buf.t Trace_private_util.Rpool.t -> Buf.t -> unit
    val with_ : t -> (Buf.t -> 'a) -> 'b
    \ No newline at end of file +Buf_pool (trace-fuchsia.Trace_fuchsia.Buf_pool)

    Module Trace_fuchsia.Buf_pool

    val create : ?max_size:int -> unit -> t
    val alloc : 'a Trace_private_util.Rpool.t -> 'a
    val recycle : Buf.t Trace_private_util.Rpool.t -> Buf.t -> unit
    val with_ : t -> (Buf.t -> 'a) -> 'a
    diff --git a/trace-fuchsia/Trace_fuchsia/Exporter/index.html b/trace-fuchsia/Trace_fuchsia/Exporter/index.html index 4724941..da66fcf 100644 --- a/trace-fuchsia/Trace_fuchsia/Exporter/index.html +++ b/trace-fuchsia/Trace_fuchsia/Exporter/index.html @@ -1,2 +1,2 @@ -Exporter (trace-fuchsia.Trace_fuchsia.Exporter)

    Module Trace_fuchsia.Exporter

    An exporter, takes buffers with fuchsia events, and writes them somewhere

    type t = {
    1. write_bufs : Buf.t Stdlib.Queue.t -> unit;
      (*

      Takes buffers and writes them somewhere. The buffers are only valid during this call and must not be stored. The queue must not be modified.

      *)
    2. flush : unit -> unit;
      (*

      Force write

      *)
    3. close : unit -> unit;
      (*

      Close underlying resources

      *)
    }

    An exporter, takes buffers and writes them somewhere. This should be thread-safe if used in a threaded environment.

    val of_out_channel : close_channel:bool -> out_channel -> t

    Export to the channel

    • parameter close_channel

      if true, closing the exporter will close the channel

    val of_buffer : Stdlib.Buffer.t -> t
    \ No newline at end of file +Exporter (trace-fuchsia.Trace_fuchsia.Exporter)

    Module Trace_fuchsia.Exporter

    An exporter, takes buffers with fuchsia events, and writes them somewhere

    type t = {
    1. write_bufs : Buf.t Stdlib.Queue.t -> unit;
      (*

      Takes buffers and writes them somewhere. The buffers are only valid during this call and must not be stored. The queue must not be modified.

      *)
    2. flush : unit -> unit;
      (*

      Force write

      *)
    3. close : unit -> unit;
      (*

      Close underlying resources

      *)
    }

    An exporter, takes buffers and writes them somewhere. This should be thread-safe if used in a threaded environment.

    val of_out_channel : close_channel:bool -> out_channel -> t

    Export to the channel

    • parameter close_channel

      if true, closing the exporter will close the channel

    val of_buffer : Stdlib.Buffer.t -> t
    diff --git a/trace-fuchsia/Trace_fuchsia/Subscriber/Callbacks/index.html b/trace-fuchsia/Trace_fuchsia/Subscriber/Callbacks/index.html index 53ca886..86f827a 100644 --- a/trace-fuchsia/Trace_fuchsia/Subscriber/Callbacks/index.html +++ b/trace-fuchsia/Trace_fuchsia/Subscriber/Callbacks/index.html @@ -1,57 +1,57 @@ -Callbacks (trace-fuchsia.Trace_fuchsia.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = t

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : +Callbacks (trace-fuchsia.Trace_fuchsia.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = t

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> Trace_core.span -> - unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : + unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : st -> - data:(string * Trace_subscriber__.Types.user_data) list -> + data:(string * Trace_subscriber__.Types.user_data) list -> Trace_core.span -> unit

    Add data to a regular span (which must be active)

    val on_message : st -> - time_ns:int64 -> - tid:int -> - span:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> + time_ns:int64 -> + tid:int -> + span:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> string -> unit

    Emit a log message

    val on_counter : st -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> float -> unit

    Emit the current value of a counter

    val on_enter_manual_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - parent:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + parent:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Enter a manual (possibly async) span

    val on_exit_manual_span : st -> - time_ns:int64 -> - tid:int -> - name:string -> - data:(string * Trace_subscriber__.Types.user_data) list -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + time_ns:int64 -> + tid:int -> + name:string -> + data:(string * Trace_subscriber__.Types.user_data) list -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Exit a manual span

    val on_extension_event : st -> - time_ns:int64 -> - tid:int -> + time_ns:int64 -> + tid:int -> Trace_core.extension_event -> - unit

    Extension event

    • since 0.8
    \ No newline at end of file + unit

    Extension event

    • since 0.8
    diff --git a/trace-fuchsia/Trace_fuchsia/Subscriber/index.html b/trace-fuchsia/Trace_fuchsia/Subscriber/index.html index 8293759..63042d0 100644 --- a/trace-fuchsia/Trace_fuchsia/Subscriber/index.html +++ b/trace-fuchsia/Trace_fuchsia/Subscriber/index.html @@ -1,7 +1,7 @@ -Subscriber (trace-fuchsia.Trace_fuchsia.Subscriber)

    Module Trace_fuchsia.Subscriber

    type t

    Main subscriber state.

    val create : - ?buf_pool:Buf_pool.t -> - pid:int -> - exporter:Exporter.t -> +Subscriber (trace-fuchsia.Trace_fuchsia.Subscriber)

    Module Trace_fuchsia.Subscriber

    type t

    Main subscriber state.

    val create : + ?buf_pool:Buf_pool.t -> + pid:int -> + exporter:Exporter.t -> unit -> - t

    Create a subscriber state.

    val flush : t -> unit
    val close : t -> unit
    val active : t -> bool
    val subscriber : t -> Trace_subscriber.t

    Subscriber that writes json into this writer

    \ No newline at end of file + t

    Create a subscriber state.

    val flush : t -> unit
    val close : t -> unit
    val active : t -> bool
    val subscriber : t -> Trace_subscriber.t

    Subscriber that writes json into this writer

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Argument/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Argument/index.html index 6379c5a..e178766 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Argument/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Argument/index.html @@ -1,2 +1,2 @@ -Argument (trace-fuchsia.Trace_fuchsia.Writer.Argument)

    Module Writer.Argument

    type t = string * arg
    val check_valid_ : t -> unit
    val is_i32_ : int -> bool
    val size_word : t -> int
    val encode : Buf.t -> t -> unit
    \ No newline at end of file +Argument (trace-fuchsia.Trace_fuchsia.Writer.Argument)

    Module Writer.Argument

    type t = string * arg
    val check_valid_ : t -> unit
    val is_i32_ : int -> bool
    val size_word : t -> int
    val encode : Buf.t -> t -> unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Arguments/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Arguments/index.html index e873416..3f00be1 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Arguments/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Arguments/index.html @@ -1,2 +1,2 @@ -Arguments (trace-fuchsia.Trace_fuchsia.Writer.Arguments)

    Module Writer.Arguments

    type t = Argument.t list
    val len : t -> int
    val check_valid : t -> unit
    val size_word : t -> int
    val encode : Buf.t -> t -> unit
    \ No newline at end of file +Arguments (trace-fuchsia.Trace_fuchsia.Writer.Arguments)

    Module Writer.Arguments

    type t = Argument.t list
    val len : t -> int
    val check_valid : t -> unit
    val size_word : t -> int
    val encode : Buf.t -> t -> unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_begin/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_begin/index.html index 2781bc8..352886b 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_begin/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_begin/index.html @@ -1,15 +1,15 @@ -Async_begin (trace-fuchsia.Trace_fuchsia.Writer.Event.Async_begin)

    Module Event.Async_begin

    type=5

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Async_begin (trace-fuchsia.Trace_fuchsia.Writer.Event.Async_begin)

    Module Event.Async_begin

    type=5

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - async_id:Trace_core.trace_id -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + async_id:Trace_core.trace_id -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_end/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_end/index.html index b23d254..4d4bef1 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_end/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Async_end/index.html @@ -1,15 +1,15 @@ -Async_end (trace-fuchsia.Trace_fuchsia.Writer.Event.Async_end)

    Module Event.Async_end

    type=7

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Async_end (trace-fuchsia.Trace_fuchsia.Writer.Event.Async_end)

    Module Event.Async_end

    type=7

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - async_id:Trace_core.trace_id -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + async_id:Trace_core.trace_id -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Counter/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Counter/index.html index b3746e3..fbcd953 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Counter/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Counter/index.html @@ -1,14 +1,14 @@ -Counter (trace-fuchsia.Trace_fuchsia.Writer.Event.Counter)

    Module Event.Counter

    type=1

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Counter (trace-fuchsia.Trace_fuchsia.Writer.Event.Counter)

    Module Event.Counter

    type=1

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_begin/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_begin/index.html index 061a0aa..ccd4805 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_begin/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_begin/index.html @@ -1,14 +1,14 @@ -Duration_begin (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_begin)

    Module Event.Duration_begin

    type=2

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Duration_begin (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_begin)

    Module Event.Duration_begin

    type=2

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_complete/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_complete/index.html index 14689e0..0421957 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_complete/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_complete/index.html @@ -1,15 +1,15 @@ -Duration_complete (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_complete)

    Module Event.Duration_complete

    type=4

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Duration_complete (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_complete)

    Module Event.Duration_complete

    type=4

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - end_time_ns:int64 -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + end_time_ns:int64 -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_end/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_end/index.html index 3f556f4..285f44b 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_end/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Duration_end/index.html @@ -1,14 +1,14 @@ -Duration_end (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_end)

    Module Event.Duration_end

    type=3

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Duration_end (trace-fuchsia.Trace_fuchsia.Writer.Event.Duration_end)

    Module Event.Duration_end

    type=3

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/Instant/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/Instant/index.html index 7b90a01..57646e6 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/Instant/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/Instant/index.html @@ -1,14 +1,14 @@ -Instant (trace-fuchsia.Trace_fuchsia.Writer.Event.Instant)

    Module Event.Instant

    type=0

    val size_word : - name:string -> - t_ref:Thread_ref.t -> - args:Arguments.t -> +Instant (trace-fuchsia.Trace_fuchsia.Writer.Event.Instant)

    Module Event.Instant

    type=0

    val size_word : + name:string -> + t_ref:Thread_ref.t -> + args:Arguments.t -> unit -> int
    val encode : Buf_chain.t -> - name:string -> - t_ref:Thread_ref.t -> - time_ns:int64 -> - args:Arguments.t -> + name:string -> + t_ref:Thread_ref.t -> + time_ns:int64 -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Event/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Event/index.html index 9869913..21f0a55 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Event/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Event/index.html @@ -1,2 +1,2 @@ -Event (trace-fuchsia.Trace_fuchsia.Writer.Event)

    Module Writer.Event

    record type = 4

    module Instant : sig ... end

    type=0

    module Counter : sig ... end

    type=1

    module Duration_begin : sig ... end

    type=2

    module Duration_end : sig ... end

    type=3

    module Duration_complete : sig ... end

    type=4

    module Async_begin : sig ... end

    type=5

    module Async_end : sig ... end

    type=7

    \ No newline at end of file +Event (trace-fuchsia.Trace_fuchsia.Writer.Event)

    Module Writer.Event

    record type = 4

    module Instant : sig ... end

    type=0

    module Counter : sig ... end

    type=1

    module Duration_begin : sig ... end

    type=2

    module Duration_end : sig ... end

    type=3

    module Duration_complete : sig ... end

    type=4

    module Async_begin : sig ... end

    type=5

    module Async_end : sig ... end

    type=7

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/I64/index.html b/trace-fuchsia/Trace_fuchsia/Writer/I64/index.html index 91a4b7b..357dd53 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/I64/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/I64/index.html @@ -1,2 +1,2 @@ -I64 (trace-fuchsia.Trace_fuchsia.Writer.I64)

    Module Writer.I64

    include module type of struct include Stdlib.Int64 end
    val zero : int64

    The 64-bit integer 0.

    val one : int64

    The 64-bit integer 1.

    val minus_one : int64

    The 64-bit integer -1.

    val neg : int64 -> int64

    Unary negation.

    val add : int64 -> int64 -> int64

    Addition.

    val sub : int64 -> int64 -> int64

    Subtraction.

    val mul : int64 -> int64 -> int64

    Multiplication.

    val div : int64 -> int64 -> int64

    Integer division.

    • raises Division_by_zero

      if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : int64 -> int64 -> int64

    Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val rem : int64 -> int64 -> int64

    Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

    val unsigned_rem : int64 -> int64 -> int64

    Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val succ : int64 -> int64

    Successor. Int64.succ x is Int64.add x Int64.one.

    val pred : int64 -> int64

    Predecessor. Int64.pred x is Int64.sub x Int64.one.

    val abs : int64 -> int64

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int64

    The greatest representable 64-bit integer, 263 - 1.

    val min_int : int64

    The smallest representable 64-bit integer, -263.

    val logand : int64 -> int64 -> int64

    Bitwise logical and.

    val logor : int64 -> int64 -> int64

    Bitwise logical or.

    val logxor : int64 -> int64 -> int64

    Bitwise logical exclusive or.

    val lognot : int64 -> int64

    Bitwise logical negation.

    val shift_left : int64 -> int -> int64

    Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right : int64 -> int -> int64

    Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right_logical : int64 -> int -> int64

    Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

    val of_int : int -> int64

    Convert the given integer (type int) to a 64-bit integer (type int64).

    val to_int : int64 -> int

    Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

    val unsigned_to_int : int64 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int64

    Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int64 -> float

    Convert the given 64-bit integer to a floating-point number.

    val of_int32 : int32 -> int64

    Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

    val to_int32 : int64 -> int32

    Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

    val of_nativeint : nativeint -> int64

    Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

    val to_nativeint : int64 -> nativeint

    Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

    val of_string : string -> int64

    Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

    val of_string_opt : string -> int64 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int64 -> string

    Return the string representation of its argument, in decimal.

    val bits_of_float : float -> int64

    Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

    val float_of_bits : int64 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

    type t = int64

    An alias for the type of 64-bit integers.

    val compare : t -> t -> int

    The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    val (+) : int64 -> int64 -> int64
    val (-) : int64 -> int64 -> int64
    val (=) : t -> t -> bool
    val (land) : int64 -> int64 -> int64
    val (lor) : int64 -> int64 -> int64
    val lnot : int64 -> int64
    val (lsl) : int64 -> int -> int64
    val (lsr) : int64 -> int -> int64
    val (asr) : int64 -> int -> int64
    \ No newline at end of file +I64 (trace-fuchsia.Trace_fuchsia.Writer.I64)

    Module Writer.I64

    include module type of struct include Stdlib.Int64 end
    val zero : int64

    The 64-bit integer 0.

    val one : int64

    The 64-bit integer 1.

    val minus_one : int64

    The 64-bit integer -1.

    val neg : int64 -> int64

    Unary negation.

    val add : int64 -> int64 -> int64

    Addition.

    val sub : int64 -> int64 -> int64

    Subtraction.

    val mul : int64 -> int64 -> int64

    Multiplication.

    val div : int64 -> int64 -> int64

    Integer division.

    • raises Division_by_zero

      if the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for Stdlib.(/).

    val unsigned_div : int64 -> int64 -> int64

    Same as div, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val rem : int64 -> int64 -> int64

    Integer remainder. If y is not zero, the result of Int64.rem x y satisfies the following property: x = Int64.add (Int64.mul (Int64.div x y) y) (Int64.rem x y). If y = 0, Int64.rem x y raises Division_by_zero.

    val unsigned_rem : int64 -> int64 -> int64

    Same as rem, except that arguments and result are interpreted as unsigned 64-bit integers.

    • since 4.08
    val succ : int64 -> int64

    Successor. Int64.succ x is Int64.add x Int64.one.

    val pred : int64 -> int64

    Predecessor. Int64.pred x is Int64.sub x Int64.one.

    val abs : int64 -> int64

    abs x is the absolute value of x. On min_int this is min_int itself and thus remains negative.

    val max_int : int64

    The greatest representable 64-bit integer, 263 - 1.

    val min_int : int64

    The smallest representable 64-bit integer, -263.

    val logand : int64 -> int64 -> int64

    Bitwise logical and.

    val logor : int64 -> int64 -> int64

    Bitwise logical or.

    val logxor : int64 -> int64 -> int64

    Bitwise logical exclusive or.

    val lognot : int64 -> int64

    Bitwise logical negation.

    val shift_left : int64 -> int -> int64

    Int64.shift_left x y shifts x to the left by y bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right : int64 -> int -> int64

    Int64.shift_right x y shifts x to the right by y bits. This is an arithmetic shift: the sign bit of x is replicated and inserted in the vacated bits. The result is unspecified if y < 0 or y >= 64.

    val shift_right_logical : int64 -> int -> int64

    Int64.shift_right_logical x y shifts x to the right by y bits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign of x. The result is unspecified if y < 0 or y >= 64.

    val of_int : int -> int64

    Convert the given integer (type int) to a 64-bit integer (type int64).

    val to_int : int64 -> int

    Convert the given 64-bit integer (type int64) to an integer (type int). On 64-bit platforms, the 64-bit integer is taken modulo 263, i.e. the high-order bit is lost during the conversion. On 32-bit platforms, the 64-bit integer is taken modulo 231, i.e. the top 33 bits are lost during the conversion.

    val unsigned_to_int : int64 -> int option

    Same as to_int, but interprets the argument as an unsigned integer. Returns None if the unsigned value of the argument cannot fit into an int.

    • since 4.08
    val of_float : float -> int64

    Convert the given floating-point number to a 64-bit integer, discarding the fractional part (truncate towards 0). If the truncated floating-point number is outside the range [Int64.min_int, Int64.max_int], no exception is raised, and an unspecified, platform-dependent integer is returned.

    val to_float : int64 -> float

    Convert the given 64-bit integer to a floating-point number.

    val of_int32 : int32 -> int64

    Convert the given 32-bit integer (type int32) to a 64-bit integer (type int64).

    val to_int32 : int64 -> int32

    Convert the given 64-bit integer (type int64) to a 32-bit integer (type int32). The 64-bit integer is taken modulo 232, i.e. the top 32 bits are lost during the conversion.

    val of_nativeint : nativeint -> int64

    Convert the given native integer (type nativeint) to a 64-bit integer (type int64).

    val to_nativeint : int64 -> nativeint

    Convert the given 64-bit integer (type int64) to a native integer. On 32-bit platforms, the 64-bit integer is taken modulo 232. On 64-bit platforms, the conversion is exact.

    val of_string : string -> int64

    Convert the given string to a 64-bit integer. The string is read in decimal (by default, or if the string begins with 0u) or in hexadecimal, octal or binary if the string begins with 0x, 0o or 0b respectively.

    The 0u prefix reads the input as an unsigned integer in the range [0, 2*Int64.max_int+1]. If the input exceeds Int64.max_int it is converted to the signed integer Int64.min_int + input - Int64.max_int - 1.

    The _ (underscore) character can appear anywhere in the string and is ignored.

    • raises Failure

      if the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in type int64.

    val of_string_opt : string -> int64 option

    Same as of_string, but return None instead of raising.

    • since 4.05
    val to_string : int64 -> string

    Return the string representation of its argument, in decimal.

    val bits_of_float : float -> int64

    Return the internal representation of the given float according to the IEEE 754 floating-point 'double format' bit layout. Bit 63 of the result represents the sign of the float; bits 62 to 52 represent the (biased) exponent; bits 51 to 0 represent the mantissa.

    val float_of_bits : int64 -> float

    Return the floating-point number whose internal representation, according to the IEEE 754 floating-point 'double format' bit layout, is the given int64.

    type t = int64

    An alias for the type of 64-bit integers.

    val compare : t -> t -> int

    The comparison function for 64-bit integers, with the same specification as Stdlib.compare. Along with the type t, this function compare allows the module Int64 to be passed as argument to the functors Set.Make and Map.Make.

    val unsigned_compare : t -> t -> int

    Same as compare, except that arguments are interpreted as unsigned 64-bit integers.

    • since 4.08
    val equal : t -> t -> bool

    The equal function for int64s.

    • since 4.03
    val min : t -> t -> t

    Return the smaller of the two arguments.

    • since 4.13
    val max : t -> t -> t

    Return the greater of the two arguments.

    • since 4.13
    val seeded_hash : int -> t -> int

    A seeded hash function for 64-bit ints, with the same output value as Hashtbl.seeded_hash. This function allows this module to be passed as argument to the functor Hashtbl.MakeSeeded.

    • since 5.1
    val hash : t -> int

    An unseeded hash function for 64-bit ints, with the same output value as Hashtbl.hash. This function allows this module to be passed as argument to the functor Hashtbl.Make.

    • since 5.1
    val (+) : int64 -> int64 -> int64
    val (-) : int64 -> int64 -> int64
    val (=) : t -> t -> bool
    val (land) : int64 -> int64 -> int64
    val (lor) : int64 -> int64 -> int64
    val lnot : int64 -> int64
    val (lsl) : int64 -> int -> int64
    val (lsr) : int64 -> int -> int64
    val (asr) : int64 -> int -> int64
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Kernel_object/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Kernel_object/index.html index 3492ed7..69cf0c1 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Kernel_object/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Kernel_object/index.html @@ -1,9 +1,9 @@ -Kernel_object (trace-fuchsia.Trace_fuchsia.Writer.Kernel_object)

    Module Writer.Kernel_object

    record type = 7

    val size_word : name:string -> args:Arguments.t -> unit -> int
    type ty = int
    val ty_process : ty
    val ty_thread : ty
    val encode : +Kernel_object (trace-fuchsia.Trace_fuchsia.Writer.Kernel_object)

    Module Writer.Kernel_object

    record type = 7

    val size_word : name:string -> args:Arguments.t -> unit -> int
    type ty = int
    val ty_process : ty
    val ty_thread : ty
    val encode : Buf_chain.t -> - name:string -> - ty:ty -> - kid:int -> - args:Arguments.t -> + name:string -> + ty:ty -> + kid:int -> + args:Arguments.t -> unit -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Initialization_record/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Initialization_record/index.html index b2356be..99f17a1 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Initialization_record/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Initialization_record/index.html @@ -1,2 +1,2 @@ -Initialization_record (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Initialization_record)

    Module Metadata.Initialization_record

    val size_word : int
    val default_ticks_per_sec : int64

    Default: 1 tick = 1 ns

    val encode : Buf_chain.t -> ticks_per_secs:int64 -> unit -> unit
    \ No newline at end of file +Initialization_record (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Initialization_record)

    Module Metadata.Initialization_record

    val size_word : int
    val default_ticks_per_sec : int64

    Default: 1 tick = 1 ns

    val encode : Buf_chain.t -> ticks_per_secs:int64 -> unit -> unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Magic_record/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Magic_record/index.html index 6f7dd09..eb87506 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Magic_record/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Magic_record/index.html @@ -1,2 +1,2 @@ -Magic_record (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Magic_record)

    Module Metadata.Magic_record

    First record in the trace

    val value : int64
    val size_word : int
    val encode : Buf_chain.t -> unit
    \ No newline at end of file +Magic_record (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Magic_record)

    Module Metadata.Magic_record

    First record in the trace

    val value : int64
    val size_word : int
    val encode : Buf_chain.t -> unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_info/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_info/index.html index fa85a82..a230dcf 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_info/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_info/index.html @@ -1,2 +1,2 @@ -Provider_info (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Provider_info)

    Module Metadata.Provider_info

    val size_word : name:string -> unit -> int
    val encode : Buf_chain.t -> id:int -> name:string -> unit -> unit
    \ No newline at end of file +Provider_info (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Provider_info)

    Module Metadata.Provider_info

    val size_word : name:string -> unit -> int
    val encode : Buf_chain.t -> id:int -> name:string -> unit -> unit
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_section/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_section/index.html index d1821d8..29a0621 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_section/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Provider_section/index.html @@ -1,2 +1,2 @@ -Provider_section (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Provider_section)

    Module Metadata.Provider_section

    \ No newline at end of file +Provider_section (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Provider_section)

    Module Metadata.Provider_section

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Trace_info/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Trace_info/index.html index a3803e6..cae5ee9 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Trace_info/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/Trace_info/index.html @@ -1,2 +1,2 @@ -Trace_info (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Trace_info)

    Module Metadata.Trace_info

    \ No newline at end of file +Trace_info (trace-fuchsia.Trace_fuchsia.Writer.Metadata.Trace_info)

    Module Metadata.Trace_info

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/index.html index e144f2d..538cf89 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Metadata/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Metadata/index.html @@ -1,2 +1,2 @@ -Metadata (trace-fuchsia.Trace_fuchsia.Writer.Metadata)

    Module Writer.Metadata

    record type = 0

    module Magic_record : sig ... end

    First record in the trace

    module Initialization_record : sig ... end
    module Provider_info : sig ... end
    module Provider_section : sig ... end
    module Trace_info : sig ... end
    \ No newline at end of file +Metadata (trace-fuchsia.Trace_fuchsia.Writer.Metadata)

    Module Writer.Metadata

    record type = 0

    module Magic_record : sig ... end

    First record in the trace

    module Initialization_record : sig ... end
    module Provider_info : sig ... end
    module Provider_section : sig ... end
    module Trace_info : sig ... end
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Str_ref/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Str_ref/index.html index 15e0dfd..f432ac4 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Str_ref/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Str_ref/index.html @@ -1,2 +1,2 @@ -Str_ref (trace-fuchsia.Trace_fuchsia.Writer.Str_ref)

    Module Writer.Str_ref

    type t = int

    16 bits

    val inline_fail_ : unit -> 'a
    val inline : int -> t
    \ No newline at end of file +Str_ref (trace-fuchsia.Trace_fuchsia.Writer.Str_ref)

    Module Writer.Str_ref

    type t = int

    16 bits

    val inline_fail_ : unit -> 'a
    val inline : int -> t
    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Thread_record/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Thread_record/index.html index aee99fd..6fa5c67 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Thread_record/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Thread_record/index.html @@ -1,2 +1,2 @@ -Thread_record (trace-fuchsia.Trace_fuchsia.Writer.Thread_record)

    Module Writer.Thread_record

    record type = 3

    val size_word : int
    val encode : Buf_chain.t -> as_ref:int -> pid:int -> tid:int -> unit -> unit

    Record that Thread_ref.ref as_ref represents the pair pid, tid

    \ No newline at end of file +Thread_record (trace-fuchsia.Trace_fuchsia.Writer.Thread_record)

    Module Writer.Thread_record

    record type = 3

    val size_word : int
    val encode : Buf_chain.t -> as_ref:int -> pid:int -> tid:int -> unit -> unit

    Record that Thread_ref.ref as_ref represents the pair pid, tid

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Thread_ref/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Thread_ref/index.html index c5aabdc..9c5d290 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Thread_ref/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Thread_ref/index.html @@ -1,2 +1,2 @@ -Thread_ref (trace-fuchsia.Trace_fuchsia.Writer.Thread_ref)

    Module Writer.Thread_ref

    type t =
    1. | Ref of int
    2. | Inline of {
      1. pid : int;
      2. tid : int;
      }
    val inline : pid:int -> tid:int -> t
    val ref : int -> t
    val size_word : t -> int
    val as_i8 : t -> int

    8-bit int for the reference

    \ No newline at end of file +Thread_ref (trace-fuchsia.Trace_fuchsia.Writer.Thread_ref)

    Module Writer.Thread_ref

    type t =
    1. | Ref of int
    2. | Inline of {
      1. pid : int;
      2. tid : int;
      }
    val inline : pid:int -> tid:int -> t
    val ref : int -> t
    val size_word : t -> int
    val as_i8 : t -> int

    8-bit int for the reference

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/Util/index.html b/trace-fuchsia/Trace_fuchsia/Writer/Util/index.html index 065b047..8687141 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/Util/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/Util/index.html @@ -1,2 +1,2 @@ -Util (trace-fuchsia.Trace_fuchsia.Writer.Util)

    Module Writer.Util

    val missing_to_round : int -> int

    How many bytes are missing for n to be a multiple of 8

    val round_to_word : int -> int

    Round up to a multiple of 8

    \ No newline at end of file +Util (trace-fuchsia.Trace_fuchsia.Writer.Util)

    Module Writer.Util

    val missing_to_round : int -> int

    How many bytes are missing for n to be a multiple of 8

    val round_to_word : int -> int

    Round up to a multiple of 8

    diff --git a/trace-fuchsia/Trace_fuchsia/Writer/index.html b/trace-fuchsia/Trace_fuchsia/Writer/index.html index c6dd6ca..17d0c85 100644 --- a/trace-fuchsia/Trace_fuchsia/Writer/index.html +++ b/trace-fuchsia/Trace_fuchsia/Writer/index.html @@ -1,2 +1,2 @@ -Writer (trace-fuchsia.Trace_fuchsia.Writer)

    Module Trace_fuchsia.Writer

    Write fuchsia events into buffers.

    Reference: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format

    module Util : sig ... end
    type user_data = Trace_subscriber.user_data =
    1. | U_bool of bool
    2. | U_float of float
    3. | U_int of int
    4. | U_none
    5. | U_string of string
    type arg =
    1. | A_bool of bool
    2. | A_float of float
    3. | A_int of int
    4. | A_none
    5. | A_string of string
    6. | A_kid of int64
    val arg_of_user_data : user_data -> arg
    val args_of_user_data : (string * user_data) list -> (string * arg) list
    module I64 : sig ... end
    module Str_ref : sig ... end
    val truncate_string : string -> string

    truncate_string s truncates s to the maximum length allowed for strings. If s is already short enough, no allocation is done.

    module Thread_ref : sig ... end
    module Metadata : sig ... end

    record type = 0

    module Argument : sig ... end
    module Arguments : sig ... end
    module Thread_record : sig ... end

    record type = 3

    module Event : sig ... end

    record type = 4

    module Kernel_object : sig ... end

    record type = 7

    \ No newline at end of file +Writer (trace-fuchsia.Trace_fuchsia.Writer)

    Module Trace_fuchsia.Writer

    Write fuchsia events into buffers.

    Reference: https://fuchsia.dev/fuchsia-src/reference/tracing/trace-format

    module Util : sig ... end
    type user_data = Trace_subscriber.user_data =
    1. | U_bool of bool
    2. | U_float of float
    3. | U_int of int
    4. | U_none
    5. | U_string of string
    type arg =
    1. | A_bool of bool
    2. | A_float of float
    3. | A_int of int
    4. | A_none
    5. | A_string of string
    6. | A_kid of int64
    val arg_of_user_data : user_data -> arg
    val args_of_user_data : (string * user_data) list -> (string * arg) list
    module I64 : sig ... end
    module Str_ref : sig ... end
    val truncate_string : string -> string

    truncate_string s truncates s to the maximum length allowed for strings. If s is already short enough, no allocation is done.

    module Thread_ref : sig ... end
    module Metadata : sig ... end

    record type = 0

    module Argument : sig ... end
    module Arguments : sig ... end
    module Thread_record : sig ... end

    record type = 3

    module Event : sig ... end

    record type = 4

    module Kernel_object : sig ... end

    record type = 7

    diff --git a/trace-fuchsia/Trace_fuchsia/index.html b/trace-fuchsia/Trace_fuchsia/index.html index 82ac09f..844ffb9 100644 --- a/trace-fuchsia/Trace_fuchsia/index.html +++ b/trace-fuchsia/Trace_fuchsia/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia (trace-fuchsia.Trace_fuchsia)

    Module Trace_fuchsia

    Fuchsia trace collector.

    This provides a collector for traces that emits data into a file using the compact binary Fuchsia trace format. This reduces the tracing overhead compared to trace-tef, at the expense of simplicity.

    module Buf : sig ... end
    module Buf_chain : sig ... end

    A set of buffers in use, and a set of ready buffers

    module Buf_pool : sig ... end
    module Exporter : sig ... end

    An exporter, takes buffers with fuchsia events, and writes them somewhere

    module Subscriber : sig ... end
    module Writer : sig ... end

    Write fuchsia events into buffers.

    type output = [
    1. | `File of string
    2. | `Exporter of Exporter.t
    ]
    val subscriber : out:[< output ] -> unit -> Trace_subscriber.t
    val collector : out:[< output ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
      • If it's set to "1", then the file is "trace.fxt".
      • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[< output | `Env Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting.

    \ No newline at end of file +Trace_fuchsia (trace-fuchsia.Trace_fuchsia)

    Module Trace_fuchsia

    Fuchsia trace collector.

    This provides a collector for traces that emits data into a file using the compact binary Fuchsia trace format. This reduces the tracing overhead compared to trace-tef, at the expense of simplicity.

    module Buf : sig ... end
    module Buf_chain : sig ... end

    A set of buffers in use, and a set of ready buffers

    module Buf_pool : sig ... end
    module Exporter : sig ... end

    An exporter, takes buffers with fuchsia events, and writes them somewhere

    module Subscriber : sig ... end
    module Writer : sig ... end

    Write fuchsia events into buffers.

    type output = [
    1. | `File of string
    2. | `Exporter of Exporter.t
    ]
    val subscriber : out:[< output ] -> unit -> Trace_subscriber.t
    val collector : out:[< output ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
    • If it's set to "1", then the file is "trace.fxt".
    • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[< output | `Env Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting.

    diff --git a/trace-fuchsia/Trace_fuchsia__/index.html b/trace-fuchsia/Trace_fuchsia__/index.html index a81df98..d5181c4 100644 --- a/trace-fuchsia/Trace_fuchsia__/index.html +++ b/trace-fuchsia/Trace_fuchsia__/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__ (trace-fuchsia.Trace_fuchsia__)

    Module Trace_fuchsia__

    \ No newline at end of file +Trace_fuchsia__ (trace-fuchsia.Trace_fuchsia__)

    Module Trace_fuchsia__

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Buf/index.html b/trace-fuchsia/Trace_fuchsia__Buf/index.html index bf50415..8f6a7cb 100644 --- a/trace-fuchsia/Trace_fuchsia__Buf/index.html +++ b/trace-fuchsia/Trace_fuchsia__Buf/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Buf (trace-fuchsia.Trace_fuchsia__Buf)

    Module Trace_fuchsia__Buf

    \ No newline at end of file +Trace_fuchsia__Buf (trace-fuchsia.Trace_fuchsia__Buf)

    Module Trace_fuchsia__Buf

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Buf_chain/index.html b/trace-fuchsia/Trace_fuchsia__Buf_chain/index.html index f82a35f..6a19c70 100644 --- a/trace-fuchsia/Trace_fuchsia__Buf_chain/index.html +++ b/trace-fuchsia/Trace_fuchsia__Buf_chain/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Buf_chain (trace-fuchsia.Trace_fuchsia__Buf_chain)

    Module Trace_fuchsia__Buf_chain

    \ No newline at end of file +Trace_fuchsia__Buf_chain (trace-fuchsia.Trace_fuchsia__Buf_chain)

    Module Trace_fuchsia__Buf_chain

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Buf_pool/index.html b/trace-fuchsia/Trace_fuchsia__Buf_pool/index.html index f18f8ca..c8a6fea 100644 --- a/trace-fuchsia/Trace_fuchsia__Buf_pool/index.html +++ b/trace-fuchsia/Trace_fuchsia__Buf_pool/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Buf_pool (trace-fuchsia.Trace_fuchsia__Buf_pool)

    Module Trace_fuchsia__Buf_pool

    \ No newline at end of file +Trace_fuchsia__Buf_pool (trace-fuchsia.Trace_fuchsia__Buf_pool)

    Module Trace_fuchsia__Buf_pool

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Common_/index.html b/trace-fuchsia/Trace_fuchsia__Common_/index.html index bd072bc..a697e11 100644 --- a/trace-fuchsia/Trace_fuchsia__Common_/index.html +++ b/trace-fuchsia/Trace_fuchsia__Common_/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Common_ (trace-fuchsia.Trace_fuchsia__Common_)

    Module Trace_fuchsia__Common_

    \ No newline at end of file +Trace_fuchsia__Common_ (trace-fuchsia.Trace_fuchsia__Common_)

    Module Trace_fuchsia__Common_

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Exporter/index.html b/trace-fuchsia/Trace_fuchsia__Exporter/index.html index b67d400..23011e2 100644 --- a/trace-fuchsia/Trace_fuchsia__Exporter/index.html +++ b/trace-fuchsia/Trace_fuchsia__Exporter/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Exporter (trace-fuchsia.Trace_fuchsia__Exporter)

    Module Trace_fuchsia__Exporter

    \ No newline at end of file +Trace_fuchsia__Exporter (trace-fuchsia.Trace_fuchsia__Exporter)

    Module Trace_fuchsia__Exporter

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Lock/index.html b/trace-fuchsia/Trace_fuchsia__Lock/index.html index 2e0fc9b..93267ca 100644 --- a/trace-fuchsia/Trace_fuchsia__Lock/index.html +++ b/trace-fuchsia/Trace_fuchsia__Lock/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Lock (trace-fuchsia.Trace_fuchsia__Lock)

    Module Trace_fuchsia__Lock

    \ No newline at end of file +Trace_fuchsia__Lock (trace-fuchsia.Trace_fuchsia__Lock)

    Module Trace_fuchsia__Lock

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Subscriber/index.html b/trace-fuchsia/Trace_fuchsia__Subscriber/index.html index b492a9e..8817abb 100644 --- a/trace-fuchsia/Trace_fuchsia__Subscriber/index.html +++ b/trace-fuchsia/Trace_fuchsia__Subscriber/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Subscriber (trace-fuchsia.Trace_fuchsia__Subscriber)

    Module Trace_fuchsia__Subscriber

    \ No newline at end of file +Trace_fuchsia__Subscriber (trace-fuchsia.Trace_fuchsia__Subscriber)

    Module Trace_fuchsia__Subscriber

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Time/index.html b/trace-fuchsia/Trace_fuchsia__Time/index.html index 58d9425..a1eebe2 100644 --- a/trace-fuchsia/Trace_fuchsia__Time/index.html +++ b/trace-fuchsia/Trace_fuchsia__Time/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Time (trace-fuchsia.Trace_fuchsia__Time)

    Module Trace_fuchsia__Time

    \ No newline at end of file +Trace_fuchsia__Time (trace-fuchsia.Trace_fuchsia__Time)

    Module Trace_fuchsia__Time

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Util/index.html b/trace-fuchsia/Trace_fuchsia__Util/index.html index 665f6b6..23bb388 100644 --- a/trace-fuchsia/Trace_fuchsia__Util/index.html +++ b/trace-fuchsia/Trace_fuchsia__Util/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Util (trace-fuchsia.Trace_fuchsia__Util)

    Module Trace_fuchsia__Util

    \ No newline at end of file +Trace_fuchsia__Util (trace-fuchsia.Trace_fuchsia__Util)

    Module Trace_fuchsia__Util

    This module is hidden.

    diff --git a/trace-fuchsia/Trace_fuchsia__Writer/index.html b/trace-fuchsia/Trace_fuchsia__Writer/index.html index b6096fe..2b6ed9c 100644 --- a/trace-fuchsia/Trace_fuchsia__Writer/index.html +++ b/trace-fuchsia/Trace_fuchsia__Writer/index.html @@ -1,2 +1,2 @@ -Trace_fuchsia__Writer (trace-fuchsia.Trace_fuchsia__Writer)

    Module Trace_fuchsia__Writer

    \ No newline at end of file +Trace_fuchsia__Writer (trace-fuchsia.Trace_fuchsia__Writer)

    Module Trace_fuchsia__Writer

    This module is hidden.

    diff --git a/trace-fuchsia/index.html b/trace-fuchsia/index.html index e736484..f8c7ca4 100644 --- a/trace-fuchsia/index.html +++ b/trace-fuchsia/index.html @@ -1,2 +1,2 @@ -index (trace-fuchsia.index)

    Package trace-fuchsia

    Package info

    changes-files
    readme-files
    \ No newline at end of file +index (trace-fuchsia.index)

    Package trace-fuchsia

    Package info

    changes-files
    readme-files
    diff --git a/trace-tef/Trace_tef/Exporter/index.html b/trace-tef/Trace_tef/Exporter/index.html index bdfa643..8b14eab 100644 --- a/trace-tef/Trace_tef/Exporter/index.html +++ b/trace-tef/Trace_tef/Exporter/index.html @@ -1,2 +1,2 @@ -Exporter (trace-tef.Trace_tef.Exporter)

    Module Trace_tef.Exporter

    An exporter, takes JSON objects and writes them somewhere

    type t = {
    1. on_json : Stdlib.Buffer.t -> unit;
      (*

      Takes a buffer and writes it somewhere. The buffer is only valid during this call and must not be stored.

      *)
    2. flush : unit -> unit;
      (*

      Force write

      *)
    3. close : unit -> unit;
      (*

      Close underlying resources

      *)
    }

    An exporter, takes JSON objects and writes them somewhere.

    This should be thread-safe if used in a threaded environment.

    val of_out_channel : close_channel:bool -> jsonl:bool -> out_channel -> t

    Export to the channel

    • parameter jsonl

      if true, export as a JSON object per line, otherwise export as a single big JSON array.

    • parameter close_channel

      if true, closing the exporter will close the channel

    val of_buffer : jsonl:bool -> Stdlib.Buffer.t -> t
    \ No newline at end of file +Exporter (trace-tef.Trace_tef.Exporter)

    Module Trace_tef.Exporter

    An exporter, takes JSON objects and writes them somewhere

    type t = {
    1. on_json : Stdlib.Buffer.t -> unit;
      (*

      Takes a buffer and writes it somewhere. The buffer is only valid during this call and must not be stored.

      *)
    2. flush : unit -> unit;
      (*

      Force write

      *)
    3. close : unit -> unit;
      (*

      Close underlying resources

      *)
    }

    An exporter, takes JSON objects and writes them somewhere.

    This should be thread-safe if used in a threaded environment.

    val of_out_channel : close_channel:bool -> jsonl:bool -> out_channel -> t

    Export to the channel

    • parameter jsonl

      if true, export as a JSON object per line, otherwise export as a single big JSON array.

    • parameter close_channel

      if true, closing the exporter will close the channel

    val of_buffer : jsonl:bool -> Stdlib.Buffer.t -> t
    diff --git a/trace-tef/Trace_tef/Subscriber/Buf_pool/index.html b/trace-tef/Trace_tef/Subscriber/Buf_pool/index.html index edff542..d5de86b 100644 --- a/trace-tef/Trace_tef/Subscriber/Buf_pool/index.html +++ b/trace-tef/Trace_tef/Subscriber/Buf_pool/index.html @@ -1,2 +1,2 @@ -Buf_pool (trace-tef.Trace_tef.Subscriber.Buf_pool)

    Module Subscriber.Buf_pool

    type t
    val create : ?max_size:int -> ?buf_size:int -> unit -> t
    \ No newline at end of file +Buf_pool (trace-tef.Trace_tef.Subscriber.Buf_pool)

    Module Subscriber.Buf_pool

    type t
    val create : ?max_size:int -> ?buf_size:int -> unit -> t
    diff --git a/trace-tef/Trace_tef/Subscriber/Callbacks/index.html b/trace-tef/Trace_tef/Subscriber/Callbacks/index.html index 123df6d..674ecdb 100644 --- a/trace-tef/Trace_tef/Subscriber/Callbacks/index.html +++ b/trace-tef/Trace_tef/Subscriber/Callbacks/index.html @@ -1,57 +1,57 @@ -Callbacks (trace-tef.Trace_tef.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = t

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : +Callbacks (trace-tef.Trace_tef.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = t

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> Trace_core.span -> - unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : + unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : st -> - data:(string * Trace_subscriber__.Types.user_data) list -> + data:(string * Trace_subscriber__.Types.user_data) list -> Trace_core.span -> unit

    Add data to a regular span (which must be active)

    val on_message : st -> - time_ns:int64 -> - tid:int -> - span:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> + time_ns:int64 -> + tid:int -> + span:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> string -> unit

    Emit a log message

    val on_counter : st -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> float -> unit

    Emit the current value of a counter

    val on_enter_manual_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - parent:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + parent:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Enter a manual (possibly async) span

    val on_exit_manual_span : st -> - time_ns:int64 -> - tid:int -> - name:string -> - data:(string * Trace_subscriber__.Types.user_data) list -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + time_ns:int64 -> + tid:int -> + name:string -> + data:(string * Trace_subscriber__.Types.user_data) list -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Exit a manual span

    val on_extension_event : st -> - time_ns:int64 -> - tid:int -> + time_ns:int64 -> + tid:int -> Trace_core.extension_event -> - unit

    Extension event

    • since 0.8
    \ No newline at end of file + unit

    Extension event

    • since 0.8
    diff --git a/trace-tef/Trace_tef/Subscriber/index.html b/trace-tef/Trace_tef/Subscriber/index.html index fdaa884..b95bfbf 100644 --- a/trace-tef/Trace_tef/Subscriber/index.html +++ b/trace-tef/Trace_tef/Subscriber/index.html @@ -1,7 +1,7 @@ -Subscriber (trace-tef.Trace_tef.Subscriber)

    Module Trace_tef.Subscriber

    module Buf_pool : sig ... end
    type t

    Main subscriber state.

    val create : - ?buf_pool:Buf_pool.t -> - pid:int -> - exporter:Exporter.t -> +Subscriber (trace-tef.Trace_tef.Subscriber)

    Module Trace_tef.Subscriber

    module Buf_pool : sig ... end
    type t

    Main subscriber state.

    val create : + ?buf_pool:Buf_pool.t -> + pid:int -> + exporter:Exporter.t -> unit -> - t

    Create a subscriber state.

    val flush : t -> unit
    val close : t -> unit
    val active : t -> bool
    val subscriber : t -> Trace_subscriber.t

    Subscriber that writes json into this writer

    \ No newline at end of file + t

    Create a subscriber state.

    val flush : t -> unit
    val close : t -> unit
    val active : t -> bool
    val subscriber : t -> Trace_subscriber.t

    Subscriber that writes json into this writer

    diff --git a/trace-tef/Trace_tef/Writer/index.html b/trace-tef/Trace_tef/Writer/index.html index 497201f..d0d06ee 100644 --- a/trace-tef/Trace_tef/Writer/index.html +++ b/trace-tef/Trace_tef/Writer/index.html @@ -1,47 +1,47 @@ -Writer (trace-tef.Trace_tef.Writer)

    Module Trace_tef.Writer

    Write JSON events to a buffer.

    This is the part of the code that knows how to emit TEF-compliant JSON from raw event data.

    val emit_duration_event : - pid:int -> - tid:int -> - name:string -> - start:float -> - end_:float -> - args:(string * Trace_subscriber.user_data) list -> +Writer (trace-tef.Trace_tef.Writer)

    Module Trace_tef.Writer

    Write JSON events to a buffer.

    This is the part of the code that knows how to emit TEF-compliant JSON from raw event data.

    val emit_duration_event : + pid:int -> + tid:int -> + name:string -> + start:float -> + end_:float -> + args:(string * Trace_subscriber.user_data) list -> Stdlib.Buffer.t -> unit
    val emit_manual_begin : - pid:int -> - tid:int -> - name:string -> - id:Trace_core.span -> - ts:float -> - args:(string * Trace_subscriber.user_data) list -> - flavor:Trace_subscriber.flavor option -> + pid:int -> + tid:int -> + name:string -> + id:Trace_core.span -> + ts:float -> + args:(string * Trace_subscriber.user_data) list -> + flavor:Trace_subscriber.flavor option -> Stdlib.Buffer.t -> unit
    val emit_manual_end : - pid:int -> - tid:int -> - name:string -> - id:Trace_core.span -> - ts:float -> - flavor:Trace_subscriber.flavor option -> - args:(string * Trace_subscriber.user_data) list -> + pid:int -> + tid:int -> + name:string -> + id:Trace_core.span -> + ts:float -> + flavor:Trace_subscriber.flavor option -> + args:(string * Trace_subscriber.user_data) list -> Stdlib.Buffer.t -> unit
    val emit_instant_event : - pid:int -> - tid:int -> - name:string -> - ts:float -> - args:(string * Trace_subscriber.user_data) list -> + pid:int -> + tid:int -> + name:string -> + ts:float -> + args:(string * Trace_subscriber.user_data) list -> Stdlib.Buffer.t -> unit
    val emit_name_thread : - pid:int -> - tid:int -> - name:string -> + pid:int -> + tid:int -> + name:string -> Stdlib.Buffer.t -> - unit
    val emit_name_process : pid:int -> name:string -> Stdlib.Buffer.t -> unit
    val emit_counter : - pid:int -> - tid:int -> - name:string -> - ts:float -> + unit
    val emit_name_process : pid:int -> name:string -> Stdlib.Buffer.t -> unit
    val emit_counter : + pid:int -> + tid:int -> + name:string -> + ts:float -> Stdlib.Buffer.t -> float -> - unit
    \ No newline at end of file + unit
    diff --git a/trace-tef/Trace_tef/index.html b/trace-tef/Trace_tef/index.html index f682cc4..897a171 100644 --- a/trace-tef/Trace_tef/index.html +++ b/trace-tef/Trace_tef/index.html @@ -1,2 +1,2 @@ -Trace_tef (trace-tef.Trace_tef)

    Module Trace_tef

    module Subscriber : sig ... end
    module Exporter : sig ... end

    An exporter, takes JSON objects and writes them somewhere

    module Writer : sig ... end

    Write JSON events to a buffer.

    type output = [
    1. | `Stdout
    2. | `Stderr
    3. | `File of string
    ]

    Output for tracing.

    • `Stdout will enable tracing and print events on stdout
    • `Stderr will enable tracing and print events on stderr
    • `File "foo" will enable tracing and print events into file named "foo"
    val subscriber : out:[< output ] -> unit -> Trace_subscriber.t

    A subscriber emitting TEF traces into out.

    • since 0.8
    val collector : out:[< output ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
      • If it's set to "1", then the file is "trace.json".
      • If it's set to "stdout", then logging happens on stdout (since 0.2)
      • If it's set to "stderr", then logging happens on stdout (since 0.2)
      • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[ output | `Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting. since 0.2 a () argument was added.

    \ No newline at end of file +Trace_tef (trace-tef.Trace_tef)

    Module Trace_tef

    module Subscriber : sig ... end
    module Exporter : sig ... end

    An exporter, takes JSON objects and writes them somewhere

    module Writer : sig ... end

    Write JSON events to a buffer.

    type output = [
    1. | `Stdout
    2. | `Stderr
    3. | `File of string
    ]

    Output for tracing.

    • `Stdout will enable tracing and print events on stdout
    • `Stderr will enable tracing and print events on stderr
    • `File "foo" will enable tracing and print events into file named "foo"
    val subscriber : out:[< output ] -> unit -> Trace_subscriber.t

    A subscriber emitting TEF traces into out.

    • since 0.8
    val collector : out:[< output ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
    • If it's set to "1", then the file is "trace.json".
    • If it's set to "stdout", then logging happens on stdout (since 0.2)
    • If it's set to "stderr", then logging happens on stdout (since 0.2)
    • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[ output | `Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting. since 0.2 a () argument was added.

    diff --git a/trace-tef/Trace_tef__/index.html b/trace-tef/Trace_tef__/index.html index 92c7a3e..7392f73 100644 --- a/trace-tef/Trace_tef__/index.html +++ b/trace-tef/Trace_tef__/index.html @@ -1,2 +1,2 @@ -Trace_tef__ (trace-tef.Trace_tef__)

    Module Trace_tef__

    \ No newline at end of file +Trace_tef__ (trace-tef.Trace_tef__)

    Module Trace_tef__

    This module is hidden.

    diff --git a/trace-tef/Trace_tef__Common_/index.html b/trace-tef/Trace_tef__Common_/index.html index db60db2..75be175 100644 --- a/trace-tef/Trace_tef__Common_/index.html +++ b/trace-tef/Trace_tef__Common_/index.html @@ -1,2 +1,2 @@ -Trace_tef__Common_ (trace-tef.Trace_tef__Common_)

    Module Trace_tef__Common_

    \ No newline at end of file +Trace_tef__Common_ (trace-tef.Trace_tef__Common_)

    Module Trace_tef__Common_

    This module is hidden.

    diff --git a/trace-tef/Trace_tef__Emit_tef/index.html b/trace-tef/Trace_tef__Emit_tef/index.html index da496a2..bc112a9 100644 --- a/trace-tef/Trace_tef__Emit_tef/index.html +++ b/trace-tef/Trace_tef__Emit_tef/index.html @@ -1,2 +1,2 @@ -Trace_tef__Emit_tef (trace-tef.Trace_tef__Emit_tef)

    Module Trace_tef__Emit_tef

    \ No newline at end of file +Trace_tef__Emit_tef (trace-tef.Trace_tef__Emit_tef)

    Module Trace_tef__Emit_tef

    This module is hidden.

    diff --git a/trace-tef/Trace_tef__Exporter/index.html b/trace-tef/Trace_tef__Exporter/index.html index fb99e95..62497fc 100644 --- a/trace-tef/Trace_tef__Exporter/index.html +++ b/trace-tef/Trace_tef__Exporter/index.html @@ -1,2 +1,2 @@ -Trace_tef__Exporter (trace-tef.Trace_tef__Exporter)

    Module Trace_tef__Exporter

    \ No newline at end of file +Trace_tef__Exporter (trace-tef.Trace_tef__Exporter)

    Module Trace_tef__Exporter

    This module is hidden.

    diff --git a/trace-tef/Trace_tef__Subscriber/index.html b/trace-tef/Trace_tef__Subscriber/index.html index de07b40..a47f51a 100644 --- a/trace-tef/Trace_tef__Subscriber/index.html +++ b/trace-tef/Trace_tef__Subscriber/index.html @@ -1,2 +1,2 @@ -Trace_tef__Subscriber (trace-tef.Trace_tef__Subscriber)

    Module Trace_tef__Subscriber

    \ No newline at end of file +Trace_tef__Subscriber (trace-tef.Trace_tef__Subscriber)

    Module Trace_tef__Subscriber

    This module is hidden.

    diff --git a/trace-tef/Trace_tef__Writer/index.html b/trace-tef/Trace_tef__Writer/index.html index cab6c53..0233796 100644 --- a/trace-tef/Trace_tef__Writer/index.html +++ b/trace-tef/Trace_tef__Writer/index.html @@ -1,2 +1,2 @@ -Trace_tef__Writer (trace-tef.Trace_tef__Writer)

    Module Trace_tef__Writer

    \ No newline at end of file +Trace_tef__Writer (trace-tef.Trace_tef__Writer)

    Module Trace_tef__Writer

    This module is hidden.

    diff --git a/trace-tef/Trace_tef_tldrs/index.html b/trace-tef/Trace_tef_tldrs/index.html index e9a32b6..8e749f8 100644 --- a/trace-tef/Trace_tef_tldrs/index.html +++ b/trace-tef/Trace_tef_tldrs/index.html @@ -1,2 +1,2 @@ -Trace_tef_tldrs (trace-tef.Trace_tef_tldrs)

    Module Trace_tef_tldrs

    Emit traces by talking to the tldrs daemon

    val collector : out:[ `File of string ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val subscriber : out:[ `File of string ] -> unit -> Trace_subscriber.t

    Make a subscriber that writes into the given output.

    • since 0.8
    type output = [
    1. | `File of string
    ]

    Output for tracing.

    • `File "foo" will enable tracing and print events into file named "foo". The file is only written at exit.
    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
      • If it's set to "1", then the file is "trace.json".
      • If it's set to "stdout", then logging happens on stdout (since 0.2)
      • If it's set to "stderr", then logging happens on stdout (since 0.2)
      • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[ output | `Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting.

    \ No newline at end of file +Trace_tef_tldrs (trace-tef.Trace_tef_tldrs)

    Module Trace_tef_tldrs

    Emit traces by talking to the tldrs daemon

    val collector : out:[ `File of string ] -> unit -> Trace_core.collector

    Make a collector that writes into the given output. See setup for more details.

    val subscriber : out:[ `File of string ] -> unit -> Trace_subscriber.t

    Make a subscriber that writes into the given output.

    • since 0.8
    type output = [
    1. | `File of string
    ]

    Output for tracing.

    • `File "foo" will enable tracing and print events into file named "foo". The file is only written at exit.
    val setup : ?out:[ output | `Env ] -> unit -> unit

    setup () installs the collector depending on out.

    • parameter out

      can take different values:

      • regular output value to specify where events go
      • `Env will enable tracing if the environment variable "TRACE" is set.
    • If it's set to "1", then the file is "trace.json".
    • If it's set to "stdout", then logging happens on stdout (since 0.2)
    • If it's set to "stderr", then logging happens on stdout (since 0.2)
    • Otherwise, if it's set to a non empty string, the value is taken to be the file path into which to write.
    val with_setup : ?out:[ output | `Env ] -> unit -> (unit -> 'a) -> 'a

    with_setup () f (optionally) sets a collector up, calls f(), and makes sure to shutdown before exiting.

    diff --git a/trace-tef/index.html b/trace-tef/index.html index 3ab035a..30390d8 100644 --- a/trace-tef/index.html +++ b/trace-tef/index.html @@ -1,2 +1,2 @@ -index (trace-tef.index)

    Package trace-tef

    Package info

    changes-files
    readme-files
    \ No newline at end of file +index (trace-tef.index)

    Package trace-tef

    Package info

    changes-files
    readme-files
    diff --git a/trace/Trace/index.html b/trace/Trace/index.html index 6b2a40e..567f107 100644 --- a/trace/Trace/index.html +++ b/trace/Trace/index.html @@ -1,66 +1,66 @@ -Trace (trace.Trace)

    Module Trace

    include module type of struct include Trace_core end
    type span = int64

    A span identifier.

    The meaning of the identifier depends on the collector.

    type trace_id = string

    A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.

    • since 0.10
    type user_data = [
    1. | `Int of int
    2. | `String of string
    3. | `Bool of bool
    4. | `Float of float
    5. | `None
    ]

    User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

    type explicit_span_ctx = Trace_core.explicit_span_ctx = {
    1. span : span;
      (*

      The current span

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    }

    A context, passed around for async traces.

    • since 0.10
    type explicit_span = Trace_core.explicit_span = {
    1. span : span;
      (*

      Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    3. mutable meta : Trace_core.Meta_map.t;
      (*

      Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.

      *)
    }

    Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.

    module Collector = Trace_core.Collector
    module Meta_map = Trace_core.Meta_map
    module Level = Trace_core.Level

    Tracing

    val enabled : unit -> bool

    Is there a collector?

    This is fast, so that the traced program can check it before creating any span or message.

    val get_default_level : unit -> Level.t

    Current default level for spans.

    • since 0.7
    val set_default_level : Level.t -> unit

    Set level used for spans that do not specify it. The default default value is Level.Trace.

    • since 0.7
    val ctx_of_span : explicit_span -> explicit_span_ctx

    Turn a span into a span context.

    • since 0.10
    val with_span : - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> +Trace (trace.Trace)

    Module Trace

    include module type of struct include Trace_core end
    type span = int64

    A span identifier.

    The meaning of the identifier depends on the collector.

    type trace_id = string

    A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.

    • since 0.10
    type user_data = [
    1. | `Int of int
    2. | `String of string
    3. | `Bool of bool
    4. | `Float of float
    5. | `None
    ]

    User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

    type explicit_span_ctx = Trace_core.explicit_span_ctx = {
    1. span : span;
      (*

      The current span

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    }

    A context, passed around for async traces.

    • since 0.10
    type explicit_span = Trace_core.explicit_span = {
    1. span : span;
      (*

      Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    3. mutable meta : Trace_core.Meta_map.t;
      (*

      Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.

      *)
    }

    Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.

    module Collector = Trace_core.Collector
    module Meta_map = Trace_core.Meta_map
    module Level = Trace_core.Level

    Tracing

    val enabled : unit -> bool

    Is there a collector?

    This is fast, so that the traced program can check it before creating any span or message.

    val get_default_level : unit -> Level.t

    Current default level for spans.

    • since 0.7
    val set_default_level : Level.t -> unit

    Set level used for spans that do not specify it. The default default value is Level.Trace.

    • since 0.7
    val ctx_of_span : explicit_span -> explicit_span_ctx

    Turn a span into a span context.

    • since 0.10
    val with_span : + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> (span -> 'a) -> - 'a

    with_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.

    This is the recommended way to instrument most code.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

      NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.

    val enter_span : - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + 'a

    with_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.

    This is the recommended way to instrument most code.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.

    val enter_span : + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> span

    Enter a span manually.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    val exit_span : span -> unit

    Exit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.

    val add_data_to_span : span -> (string * user_data) list -> unit

    Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

    • since 0.4
    val enter_manual_span : - parent:explicit_span_ctx option -> - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + parent:explicit_span_ctx option -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span

    Like with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.

    NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).

    • parameter flavor

      a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • since 0.10
    val enter_manual_sub_span : - parent:explicit_span -> - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + parent:explicit_span -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span
    val enter_manual_toplevel_span : - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span
    val exit_manual_span : explicit_span -> unit

    Exit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.

    • since 0.3
    val add_data_to_manual_span : explicit_span -> (string * user_data) list -> unit

    add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

    • since 0.4
    val message : - ?level:Level.t -> - ?span:span -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?span:span -> + ?data:(unit -> (string * user_data) list) -> string -> unit

    message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter span

      the surrounding span, if any. This might be ignored by the collector.

    val messagef : - ?level:Level.t -> - ?span:span -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?span:span -> + ?data:(unit -> (string * user_data) list) -> ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) -> unit

    messagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    val set_thread_name : string -> unit

    Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

    val set_process_name : string -> unit

    Give a name to the current process. This might be used by the collector to display traces in a more informative way.

    val counter_int : - ?level:Level.t -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?data:(unit -> (string * user_data) list) -> string -> int -> unit

    Emit a counter of type int. Counters represent the evolution of some quantity over time.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    val counter_float : - ?level:Level.t -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?data:(unit -> (string * user_data) list) -> string -> float -> - unit

    Emit a counter of type float. See counter_int for more details.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    Collector

    type collector = (module Collector.S)

    An event collector.

    See Collector for more details.

    val setup_collector : collector -> unit

    setup_collector c installs c as the current collector.

    • raises Invalid_argument

      if there already is an established collector.

    val get_current_level : unit -> Level.t

    Get current level. This is only meaningful if a collector was set up with setup_collector.

    • since 0.7
    val set_current_level : Level.t -> unit

    Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

    • since 0.7
    val shutdown : unit -> unit

    shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

    Extensions

    type extension_event = ..

    Extension event

    • since 0.8
    val extension_event : extension_event -> unit

    Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.

    • since 0.8
    \ No newline at end of file + unit

    Emit a counter of type float. See counter_int for more details.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    Collector

    type collector = (module Collector.S)

    An event collector.

    See Collector for more details.

    val setup_collector : collector -> unit

    setup_collector c installs c as the current collector.

    • raises Invalid_argument

      if there already is an established collector.

    val get_current_level : unit -> Level.t

    Get current level. This is only meaningful if a collector was set up with setup_collector.

    • since 0.7
    val set_current_level : Level.t -> unit

    Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

    • since 0.7
    val shutdown : unit -> unit

    shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

    Extensions

    type extension_event = ..

    Extension event

    • since 0.8
    val extension_event : extension_event -> unit

    Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.

    • since 0.8
    diff --git a/trace/Trace_core/Collector/index.html b/trace/Trace_core/Collector/index.html index c041530..f60f411 100644 --- a/trace/Trace_core/Collector/index.html +++ b/trace/Trace_core/Collector/index.html @@ -1,2 +1,2 @@ -Collector (trace.Trace_core.Collector)

    Module Trace_core.Collector

    A global collector.

    The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.

    val dummy_span : int64
    val dummy_trace_id : string
    val dummy_explicit_span : Trace_core__.Types.explicit_span
    val dummy_explicit_span_ctx : Trace_core__.Types.explicit_span_ctx
    module type S = sig ... end

    Signature for a collector.

    \ No newline at end of file +Collector (trace.Trace_core.Collector)

    Module Trace_core.Collector

    A global collector.

    The collector, if present, is responsible for collecting messages and spans, and storing them, recording them, forward them, or offering them to other services and processes.

    val dummy_span : int64
    val dummy_trace_id : string
    val dummy_explicit_span : Trace_core__.Types.explicit_span
    val dummy_explicit_span_ctx : Trace_core__.Types.explicit_span_ctx
    module type S = sig ... end

    Signature for a collector.

    diff --git a/trace/Trace_core/Collector/module-type-S/index.html b/trace/Trace_core/Collector/module-type-S/index.html index 544cfdc..a0c527d 100644 --- a/trace/Trace_core/Collector/module-type-S/index.html +++ b/trace/Trace_core/Collector/module-type-S/index.html @@ -1,9 +1,9 @@ -S (trace.Trace_core.Collector.S)

    Module type Collector.S

    Signature for a collector.

    This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the Trace module.

    val with_span : - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - data: +S (trace.Trace_core.Collector.S)

    Module type Collector.S

    Signature for a collector.

    This is only relevant to implementors of tracing backends; to instrument your code you only need to look at the Trace module.

    val with_span : + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + data: (string * [ `Int of int | `String of string @@ -14,10 +14,10 @@ string -> (int64 -> 'a) -> 'a

    Run the function in a new span.

    • since 0.3
    val enter_span : - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - data: + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + data: (string * [ `Int of int | `String of string @@ -27,12 +27,12 @@ list -> string -> int64

    Enter a new implicit span. For many uses cases, with_span will be easier to use.

    • since 0.6
    val exit_span : int64 -> unit

    Exit span. This should be called on the same thread as the corresponding enter_span, and nest properly with other calls to enter/exit_span and with_span.

    • since 0.6
    val enter_manual_span : - parent:Trace_core__.Types.explicit_span_ctx option -> - flavor:[ `Sync | `Async ] option -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - data: + parent:Trace_core__.Types.explicit_span_ctx option -> + flavor:[ `Sync | `Async ] option -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + data: (string * [ `Int of int | `String of string @@ -60,8 +60,8 @@ | `None ]) list -> unit

    Adds data to the given span.

    • since 0.4
    val message : - ?span:int64 -> - data: + ?span:int64 -> + data: (string * [ `Int of int | `String of string @@ -71,7 +71,7 @@ list -> string -> unit

    Emit a message with associated metadata.

    val name_thread : string -> unit

    Give a name to the current thread.

    val name_process : string -> unit

    Give a name to the current process.

    val counter_int : - data: + data: (string * [ `Int of int | `String of string @@ -82,7 +82,7 @@ string -> int -> unit

    Integer counter.

    val counter_float : - data: + data: (string * [ `Int of int | `String of string @@ -92,4 +92,4 @@ list -> string -> float -> - unit

    Float counter.

    val extension_event : Trace_core__.Types.extension_event -> unit

    Handle an extension event. A collector MUST simple ignore events it doesn't know, and return () silently.

    • since 0.8
    val shutdown : unit -> unit

    Shutdown collector, possibly waiting for it to finish sending data.

    \ No newline at end of file + unit

    Float counter.

    val extension_event : Trace_core__.Types.extension_event -> unit

    Handle an extension event. A collector MUST simple ignore events it doesn't know, and return () silently.

    • since 0.8
    val shutdown : unit -> unit

    Shutdown collector, possibly waiting for it to finish sending data.

    diff --git a/trace/Trace_core/Level/index.html b/trace/Trace_core/Level/index.html index cdcb3d0..3656505 100644 --- a/trace/Trace_core/Level/index.html +++ b/trace/Trace_core/Level/index.html @@ -1,2 +1,2 @@ -Level (trace.Trace_core.Level)

    Module Trace_core.Level

    Tracing levels.

    This is similar to log levels in, say, Logs. In a thoroughly instrumented program, there will be a lot of spans, and enabling them all in production might slow down the application or overwhelm the tracing system; yet they might be useful in debug situations.

    • since 0.7
    type t =
    1. | Error
      (*

      Only errors

      *)
    2. | Warning
      (*

      Warnings

      *)
    3. | Info
    4. | Debug1
      (*

      Least verbose debugging level

      *)
    5. | Debug2
      (*

      Intermediate verbosity debugging level

      *)
    6. | Debug3
      (*

      Maximum verbosity debugging level

      *)
    7. | Trace
      (*

      Enable everything (default level)

      *)

    Level of tracing. These levels are in increasing order, i.e if level Debug1 is enabled, everything below it (Error, Warning, Info, etc.) are also enabled.

    • since 0.7
    val to_string : t -> string
    • since 0.7
    val leq : t -> t -> bool
    \ No newline at end of file +Level (trace.Trace_core.Level)

    Module Trace_core.Level

    Tracing levels.

    This is similar to log levels in, say, Logs. In a thoroughly instrumented program, there will be a lot of spans, and enabling them all in production might slow down the application or overwhelm the tracing system; yet they might be useful in debug situations.

    • since 0.7
    type t =
    1. | Error
      (*

      Only errors

      *)
    2. | Warning
      (*

      Warnings

      *)
    3. | Info
    4. | Debug1
      (*

      Least verbose debugging level

      *)
    5. | Debug2
      (*

      Intermediate verbosity debugging level

      *)
    6. | Debug3
      (*

      Maximum verbosity debugging level

      *)
    7. | Trace
      (*

      Enable everything (default level)

      *)

    Level of tracing. These levels are in increasing order, i.e if level Debug1 is enabled, everything below it (Error, Warning, Info, etc.) are also enabled.

    • since 0.7
    val to_string : t -> string
    • since 0.7
    val leq : t -> t -> bool
    diff --git a/trace/Trace_core/Meta_map/Key/index.html b/trace/Trace_core/Meta_map/Key/index.html index b5957e8..07b4b85 100644 --- a/trace/Trace_core/Meta_map/Key/index.html +++ b/trace/Trace_core/Meta_map/Key/index.html @@ -1,2 +1,2 @@ -Key (trace.Trace_core.Meta_map.Key)

    Module Meta_map.Key

    type 'a t = (module KEY_IMPL with type t = 'a)
    val _n : int ref
    val create : unit -> (module KEY_IMPL with type t = 'k)
    val id : (module KEY_IMPL with type t = 'k) -> int
    val equal : 'a 'b. 'a t -> 'b t -> bool
    \ No newline at end of file +Key (trace.Trace_core.Meta_map.Key)

    Module Meta_map.Key

    type 'a t = (module KEY_IMPL with type t = 'a)
    val _n : int ref
    val create : unit -> (module KEY_IMPL with type t = 'k)
    val id : (module KEY_IMPL with type t = 'k) -> int
    val equal : 'a 'b. 'a t -> 'b t -> bool
    diff --git a/trace/Trace_core/Meta_map/M/index.html b/trace/Trace_core/Meta_map/M/index.html index 7aaa299..261f354 100644 --- a/trace/Trace_core/Meta_map/M/index.html +++ b/trace/Trace_core/Meta_map/M/index.html @@ -1,6 +1,6 @@ -M (trace.Trace_core.Meta_map.M)

    Module Meta_map.M

    type key = int
    type !+'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : +M (trace.Trace_core.Meta_map.M)

    Module Meta_map.M

    type key = int
    type !+'a t
    val empty : 'a t
    val add : key -> 'a -> 'a t -> 'a t
    val add_to_list : key -> 'a -> 'a list t -> 'a list t
    val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
    val singleton : key -> 'a -> 'a t
    val remove : key -> 'a t -> 'a t
    val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> - 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_opt : key -> 'a t -> 'a option
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    \ No newline at end of file + 'c t
    val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
    val cardinal : 'a t -> int
    val bindings : 'a t -> (key * 'a) list
    val min_binding : 'a t -> key * 'a
    val min_binding_opt : 'a t -> (key * 'a) option
    val max_binding : 'a t -> key * 'a
    val max_binding_opt : 'a t -> (key * 'a) option
    val choose : 'a t -> key * 'a
    val choose_opt : 'a t -> (key * 'a) option
    val find : key -> 'a t -> 'a
    val find_opt : key -> 'a t -> 'a option
    val find_first : (key -> bool) -> 'a t -> key * 'a
    val find_first_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val find_last : (key -> bool) -> 'a t -> key * 'a
    val find_last_opt : (key -> bool) -> 'a t -> (key * 'a) option
    val iter : (key -> 'a -> unit) -> 'a t -> unit
    val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc
    val map : ('a -> 'b) -> 'a t -> 'b t
    val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
    val filter : (key -> 'a -> bool) -> 'a t -> 'a t
    val filter_map : (key -> 'a -> 'b option) -> 'a t -> 'b t
    val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
    val split : key -> 'a t -> 'a t * 'a option * 'a t
    val is_empty : 'a t -> bool
    val mem : key -> 'a t -> bool
    val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
    val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
    val for_all : (key -> 'a -> bool) -> 'a t -> bool
    val exists : (key -> 'a -> bool) -> 'a t -> bool
    val to_list : 'a t -> (key * 'a) list
    val of_list : (key * 'a) list -> 'a t
    val to_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_rev_seq : 'a t -> (key * 'a) Stdlib.Seq.t
    val to_seq_from : key -> 'a t -> (key * 'a) Stdlib.Seq.t
    val add_seq : (key * 'a) Stdlib.Seq.t -> 'a t -> 'a t
    val of_seq : (key * 'a) Stdlib.Seq.t -> 'a t
    diff --git a/trace/Trace_core/Meta_map/index.html b/trace/Trace_core/Meta_map/index.html index fe2530e..50926fa 100644 --- a/trace/Trace_core/Meta_map/index.html +++ b/trace/Trace_core/Meta_map/index.html @@ -1,2 +1,2 @@ -Meta_map (trace.Trace_core.Meta_map)

    Module Trace_core.Meta_map

    module type KEY_IMPL = sig ... end
    module Key : sig ... end
    type 'a key = 'a Key.t
    type binding =
    1. | B : 'a Key.t * 'a -> binding
    module M : sig ... end
    type t = {
    1. m : {exn_pair}1 M.t;
    }
    val empty : t
    val mem : (module KEY_IMPL with type t = 'a) -> t -> bool
    val find_exn : 'a Key.t -> t -> 'a0
    val find : 'a Key.t -> t -> 'b option
    val add : 'a Key.t -> 'a0 -> t -> t
    val remove : 'a Key.t -> t -> t
    val cardinal : t -> int
    val length : t -> int
    val iter : (binding -> unit) -> t -> unit
    val to_list : t -> binding list
    val add_list : t -> binding list -> t
    \ No newline at end of file +Meta_map (trace.Trace_core.Meta_map)

    Module Trace_core.Meta_map

    module type KEY_IMPL = sig ... end
    module Key : sig ... end
    type 'a key = 'a Key.t
    type binding =
    1. | B : 'a Key.t * 'a -> binding
    module M : sig ... end
    type t = {
    1. m : exn_pair M.t;
    }
    val empty : t
    val mem : (module KEY_IMPL with type t = 'a) -> t -> bool
    val find_exn : 'a Key.t -> t -> 'a
    val find : 'a Key.t -> t -> 'a option
    val add : 'a Key.t -> 'a -> t -> t
    val remove : 'a Key.t -> t -> t
    val cardinal : t -> int
    val length : t -> int
    val iter : (binding -> unit) -> t -> unit
    val to_list : t -> binding list
    val add_list : t -> binding list -> t
    diff --git a/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html b/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html index 439d250..2a58dfe 100644 --- a/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html +++ b/trace/Trace_core/Meta_map/module-type-KEY_IMPL/index.html @@ -1,2 +1,2 @@ -KEY_IMPL (trace.Trace_core.Meta_map.KEY_IMPL)

    Module type Meta_map.KEY_IMPL

    type t
    exception Store of t
    val id : int
    \ No newline at end of file +KEY_IMPL (trace.Trace_core.Meta_map.KEY_IMPL)

    Module type Meta_map.KEY_IMPL

    type t
    exception Store of t
    val id : int
    diff --git a/trace/Trace_core/index.html b/trace/Trace_core/index.html index 5d12fb2..6247929 100644 --- a/trace/Trace_core/index.html +++ b/trace/Trace_core/index.html @@ -1,66 +1,66 @@ -Trace_core (trace.Trace_core)

    Module Trace_core

    Trace.

    type span = int64

    A span identifier.

    The meaning of the identifier depends on the collector.

    type trace_id = string

    A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.

    • since 0.10
    type user_data = [
    1. | `Int of int
    2. | `String of string
    3. | `Bool of bool
    4. | `Float of float
    5. | `None
    ]

    User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

    type explicit_span_ctx = {
    1. span : span;
      (*

      The current span

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    }

    A context, passed around for async traces.

    • since 0.10
    type explicit_span = {
    1. span : span;
      (*

      Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    3. mutable meta : Meta_map.t;
      (*

      Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.

      *)
    }

    Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.

    module Collector : sig ... end

    A global collector.

    module Meta_map : sig ... end
    module Level : sig ... end

    Tracing levels.

    Tracing

    val enabled : unit -> bool

    Is there a collector?

    This is fast, so that the traced program can check it before creating any span or message.

    val get_default_level : unit -> Level.t

    Current default level for spans.

    • since 0.7
    val set_default_level : Level.t -> unit

    Set level used for spans that do not specify it. The default default value is Level.Trace.

    • since 0.7
    val ctx_of_span : explicit_span -> explicit_span_ctx

    Turn a span into a span context.

    • since 0.10
    val with_span : - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> +Trace_core (trace.Trace_core)

    Module Trace_core

    Trace.

    type span = int64

    A span identifier.

    The meaning of the identifier depends on the collector.

    type trace_id = string

    A bytestring representing a (possibly distributed) trace made of async spans. With opentelemetry this is 16 bytes.

    • since 0.10
    type user_data = [
    1. | `Int of int
    2. | `String of string
    3. | `Bool of bool
    4. | `Float of float
    5. | `None
    ]

    User defined data, generally passed as key/value pairs to whatever collector is installed (if any).

    type explicit_span_ctx = {
    1. span : span;
      (*

      The current span

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    }

    A context, passed around for async traces.

    • since 0.10
    type explicit_span = {
    1. span : span;
      (*

      Identifier for this span. Several explicit spans might share the same identifier since we can differentiate between them via meta.

      *)
    2. trace_id : trace_id;
      (*

      The trace this belongs to

      *)
    3. mutable meta : Meta_map.t;
      (*

      Metadata for this span (and its context). This can be used by collectors to carry collector-specific information from the beginning of the span, to the end of the span.

      *)
    }

    Explicit span, with collector-specific metadata. This is richer than explicit_span_ctx but not intended to be passed around (or sent across the wire), unlike explicit_span_ctx.

    module Collector : sig ... end

    A global collector.

    module Meta_map : sig ... end
    module Level : sig ... end

    Tracing levels.

    Tracing

    val enabled : unit -> bool

    Is there a collector?

    This is fast, so that the traced program can check it before creating any span or message.

    val get_default_level : unit -> Level.t

    Current default level for spans.

    • since 0.7
    val set_default_level : Level.t -> unit

    Set level used for spans that do not specify it. The default default value is Level.Trace.

    • since 0.7
    val ctx_of_span : explicit_span -> explicit_span_ctx

    Turn a span into a span context.

    • since 0.10
    val with_span : + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> (span -> 'a) -> - 'a

    with_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.

    This is the recommended way to instrument most code.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

      NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.

    val enter_span : - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + 'a

    with_span ~__FILE__ ~__LINE__ name f enters a new span sp, and calls f sp. sp might be a dummy span if no collector is installed. When f sp returns or raises, the span sp is exited.

    This is the recommended way to instrument most code.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    NOTE an important restriction is that this is only supposed to work for synchronous, direct style code. Monadic concurrency, Effect-based fibers, etc. might not play well with this style of spans on some or all backends. If you use cooperative concurrency, see enter_manual_span.

    val enter_span : + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> span

    Enter a span manually.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    val exit_span : span -> unit

    Exit a span manually. This must run on the same thread as the corresponding enter_span, and spans must nest correctly.

    val add_data_to_span : span -> (string * user_data) list -> unit

    Add structured data to the given active span (see with_span). Behavior is not specified if the span has been exited.

    • since 0.4
    val enter_manual_span : - parent:explicit_span_ctx option -> - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + parent:explicit_span_ctx option -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span

    Like with_span but the caller is responsible for obtaining the parent span from their own caller, and carry the resulting explicit_span to the matching exit_manual_span.

    NOTE this replaces enter_manual_sub_span and enter_manual_toplevel_span by just making parent an explicit option. It is breaking anyway because we now pass an explicit_span_ctx instead of a full explicit_span (the reason being that we might receive this explicit_span_ctx from another process or machine).

    • parameter flavor

      a description of the span that can be used by the Collector.S to decide how to represent the span. Typically, `Sync spans start and stop on one thread, and are nested purely by their timestamp; and `Async spans can overlap, migrate between threads, etc. (as happens in Lwt, Eio, Async, etc.) which impacts how the collector might represent them.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • since 0.10
    val enter_manual_sub_span : - parent:explicit_span -> - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + parent:explicit_span -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span
    val enter_manual_toplevel_span : - ?flavor:[ `Sync | `Async ] -> - ?level:Level.t -> - ?__FUNCTION__:string -> - __FILE__:string -> - __LINE__:int -> - ?data:(unit -> (string * user_data) list) -> + ?flavor:[ `Sync | `Async ] -> + ?level:Level.t -> + ?__FUNCTION__:string -> + __FILE__:string -> + __LINE__:int -> + ?data:(unit -> (string * user_data) list) -> string -> explicit_span
    val exit_manual_span : explicit_span -> unit

    Exit an explicit span. This can be on another thread, in a fiber or lightweight thread, etc. and will be supported by backends nonetheless. The span can be obtained via enter_manual_sub_span or enter_manual_toplevel_span.

    • since 0.3
    val add_data_to_manual_span : explicit_span -> (string * user_data) list -> unit

    add_data_explicit esp data adds data to the span esp. The behavior is not specified is the span has been exited already.

    • since 0.4
    val message : - ?level:Level.t -> - ?span:span -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?span:span -> + ?data:(unit -> (string * user_data) list) -> string -> unit

    message msg logs a message msg (if a collector is installed). Additional metadata can be provided.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter span

      the surrounding span, if any. This might be ignored by the collector.

    val messagef : - ?level:Level.t -> - ?span:span -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?span:span -> + ?data:(unit -> (string * user_data) list) -> ((('a, Stdlib.Format.formatter, unit, unit) format4 -> 'a) -> unit) -> unit

    messagef (fun k->k"hello %s %d!" "world" 42) is like message "hello world 42!" but only computes the string formatting if a collector is installed.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    val set_thread_name : string -> unit

    Give a name to the current thread. This might be used by the collector to display traces in a more informative way.

    val set_process_name : string -> unit

    Give a name to the current process. This might be used by the collector to display traces in a more informative way.

    val counter_int : - ?level:Level.t -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?data:(unit -> (string * user_data) list) -> string -> int -> unit

    Emit a counter of type int. Counters represent the evolution of some quantity over time.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    val counter_float : - ?level:Level.t -> - ?data:(unit -> (string * user_data) list) -> + ?level:Level.t -> + ?data:(unit -> (string * user_data) list) -> string -> float -> - unit

    Emit a counter of type float. See counter_int for more details.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    Collector

    type collector = (module Collector.S)

    An event collector.

    See Collector for more details.

    val setup_collector : collector -> unit

    setup_collector c installs c as the current collector.

    • raises Invalid_argument

      if there already is an established collector.

    val get_current_level : unit -> Level.t

    Get current level. This is only meaningful if a collector was set up with setup_collector.

    • since 0.7
    val set_current_level : Level.t -> unit

    Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

    • since 0.7
    val shutdown : unit -> unit

    shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

    Extensions

    type extension_event = ..

    Extension event

    • since 0.8
    val extension_event : extension_event -> unit

    Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.

    • since 0.8
    \ No newline at end of file + unit

    Emit a counter of type float. See counter_int for more details.

    • parameter level

      optional level for this span. since 0.7. Default is set via set_default_level.

    • parameter data

      metadata for this metric (since 0.4)

    Collector

    type collector = (module Collector.S)

    An event collector.

    See Collector for more details.

    val setup_collector : collector -> unit

    setup_collector c installs c as the current collector.

    • raises Invalid_argument

      if there already is an established collector.

    val get_current_level : unit -> Level.t

    Get current level. This is only meaningful if a collector was set up with setup_collector.

    • since 0.7
    val set_current_level : Level.t -> unit

    Set the current level of tracing. This only has a visible effect if a collector was installed with setup_collector.

    • since 0.7
    val shutdown : unit -> unit

    shutdown () shutdowns the current collector, if one was installed, and waits for it to terminate before returning.

    Extensions

    type extension_event = ..

    Extension event

    • since 0.8
    val extension_event : extension_event -> unit

    Trigger an extension event, whose meaning depends on the library that defines it. Some collectors will simply ignore it. This does nothing if no collector is setup.

    • since 0.8
    diff --git a/trace/Trace_core__/index.html b/trace/Trace_core__/index.html index 73b6998..817f0e8 100644 --- a/trace/Trace_core__/index.html +++ b/trace/Trace_core__/index.html @@ -1,2 +1,2 @@ -Trace_core__ (trace.Trace_core__)

    Module Trace_core__

    \ No newline at end of file +Trace_core__ (trace.Trace_core__)

    Module Trace_core__

    This module is hidden.

    diff --git a/trace/Trace_core__Atomic_/index.html b/trace/Trace_core__Atomic_/index.html index 38c4997..7a55458 100644 --- a/trace/Trace_core__Atomic_/index.html +++ b/trace/Trace_core__Atomic_/index.html @@ -1,2 +1,2 @@ -Trace_core__Atomic_ (trace.Trace_core__Atomic_)

    Module Trace_core__Atomic_

    \ No newline at end of file +Trace_core__Atomic_ (trace.Trace_core__Atomic_)

    Module Trace_core__Atomic_

    This module is hidden.

    diff --git a/trace/Trace_core__Collector/index.html b/trace/Trace_core__Collector/index.html index ed8c83e..90d4b3e 100644 --- a/trace/Trace_core__Collector/index.html +++ b/trace/Trace_core__Collector/index.html @@ -1,2 +1,2 @@ -Trace_core__Collector (trace.Trace_core__Collector)

    Module Trace_core__Collector

    \ No newline at end of file +Trace_core__Collector (trace.Trace_core__Collector)

    Module Trace_core__Collector

    This module is hidden.

    diff --git a/trace/Trace_core__Level/index.html b/trace/Trace_core__Level/index.html index 6529cb6..56a380f 100644 --- a/trace/Trace_core__Level/index.html +++ b/trace/Trace_core__Level/index.html @@ -1,2 +1,2 @@ -Trace_core__Level (trace.Trace_core__Level)

    Module Trace_core__Level

    \ No newline at end of file +Trace_core__Level (trace.Trace_core__Level)

    Module Trace_core__Level

    This module is hidden.

    diff --git a/trace/Trace_core__Meta_map/index.html b/trace/Trace_core__Meta_map/index.html index 8f9cb0b..437902f 100644 --- a/trace/Trace_core__Meta_map/index.html +++ b/trace/Trace_core__Meta_map/index.html @@ -1,2 +1,2 @@ -Trace_core__Meta_map (trace.Trace_core__Meta_map)

    Module Trace_core__Meta_map

    \ No newline at end of file +Trace_core__Meta_map (trace.Trace_core__Meta_map)

    Module Trace_core__Meta_map

    This module is hidden.

    diff --git a/trace/Trace_core__Types/index.html b/trace/Trace_core__Types/index.html index 100346b..5d84848 100644 --- a/trace/Trace_core__Types/index.html +++ b/trace/Trace_core__Types/index.html @@ -1,2 +1,2 @@ -Trace_core__Types (trace.Trace_core__Types)

    Module Trace_core__Types

    \ No newline at end of file +Trace_core__Types (trace.Trace_core__Types)

    Module Trace_core__Types

    This module is hidden.

    diff --git a/trace/Trace_event/Event/index.html b/trace/Trace_event/Event/index.html index 8092489..b76aba2 100644 --- a/trace/Trace_event/Event/index.html +++ b/trace/Trace_event/Event/index.html @@ -1,2 +1,2 @@ -Event (trace.Trace_event.Event)

    Module Trace_event.Event

    Events.

    Each callback in a subscriber corresponds to an event, which can be for example queued somewhere or batched for further processing.

    module Sub = Trace_subscriber
    type t =
    1. | E_tick
    2. | E_init of {
      1. time_ns : int64;
      }
    3. | E_shutdown of {
      1. time_ns : int64;
      }
    4. | E_message of {
      1. tid : int;
      2. msg : string;
      3. time_ns : int64;
      4. data : (string * Sub.user_data) list;
      }
    5. | E_define_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. id : Trace_core.span;
      5. fun_name : string option;
      6. data : (string * Sub.user_data) list;
      }
    6. | E_exit_span of {
      1. id : Trace_core.span;
      2. time_ns : int64;
      }
    7. | E_add_data of {
      1. id : Trace_core.span;
      2. data : (string * Sub.user_data) list;
      }
    8. | E_enter_manual_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. id : Trace_core.trace_id;
      5. flavor : Sub.flavor option;
      6. fun_name : string option;
      7. data : (string * Sub.user_data) list;
      }
    9. | E_exit_manual_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. flavor : Sub.flavor option;
      5. data : (string * Sub.user_data) list;
      6. id : Trace_core.trace_id;
      }
    10. | E_counter of {
      1. name : string;
      2. tid : int;
      3. time_ns : int64;
      4. n : float;
      }
    11. | E_name_process of {
      1. name : string;
      }
    12. | E_name_thread of {
      1. tid : int;
      2. name : string;
      }
    13. | E_extension_event of {
      1. tid : int;
      2. time_ns : int64;
      3. ext : Trace_core.extension_event;
      }

    An event with TEF/fuchsia semantics

    \ No newline at end of file +Event (trace.Trace_event.Event)

    Module Trace_event.Event

    Events.

    Each callback in a subscriber corresponds to an event, which can be for example queued somewhere or batched for further processing.

    module Sub = Trace_subscriber
    type t =
    1. | E_tick
    2. | E_init of {
      1. time_ns : int64;
      }
    3. | E_shutdown of {
      1. time_ns : int64;
      }
    4. | E_message of {
      1. tid : int;
      2. msg : string;
      3. time_ns : int64;
      4. data : (string * Sub.user_data) list;
      }
    5. | E_define_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. id : Trace_core.span;
      5. fun_name : string option;
      6. data : (string * Sub.user_data) list;
      }
    6. | E_exit_span of {
      1. id : Trace_core.span;
      2. time_ns : int64;
      }
    7. | E_add_data of {
      1. id : Trace_core.span;
      2. data : (string * Sub.user_data) list;
      }
    8. | E_enter_manual_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. id : Trace_core.trace_id;
      5. flavor : Sub.flavor option;
      6. fun_name : string option;
      7. data : (string * Sub.user_data) list;
      }
    9. | E_exit_manual_span of {
      1. tid : int;
      2. name : string;
      3. time_ns : int64;
      4. flavor : Sub.flavor option;
      5. data : (string * Sub.user_data) list;
      6. id : Trace_core.trace_id;
      }
    10. | E_counter of {
      1. name : string;
      2. tid : int;
      3. time_ns : int64;
      4. n : float;
      }
    11. | E_name_process of {
      1. name : string;
      }
    12. | E_name_thread of {
      1. tid : int;
      2. name : string;
      }
    13. | E_extension_event of {
      1. tid : int;
      2. time_ns : int64;
      3. ext : Trace_core.extension_event;
      }

    An event with TEF/fuchsia semantics

    diff --git a/trace/Trace_event/Subscriber/Callbacks/index.html b/trace/Trace_event/Subscriber/Callbacks/index.html index 8bc4ee5..12dc9ec 100644 --- a/trace/Trace_event/Subscriber/Callbacks/index.html +++ b/trace/Trace_event/Subscriber/Callbacks/index.html @@ -1,57 +1,57 @@ -Callbacks (trace.Trace_event.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = event_consumer

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : +Callbacks (trace.Trace_event.Subscriber.Callbacks)

    Module Subscriber.Callbacks

    type st = event_consumer

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> Trace_core.span -> - unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : + unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : st -> - data:(string * Trace_subscriber__.Types.user_data) list -> + data:(string * Trace_subscriber__.Types.user_data) list -> Trace_core.span -> unit

    Add data to a regular span (which must be active)

    val on_message : st -> - time_ns:int64 -> - tid:int -> - span:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> + time_ns:int64 -> + tid:int -> + span:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> string -> unit

    Emit a log message

    val on_counter : st -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> float -> unit

    Emit the current value of a counter

    val on_enter_manual_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - parent:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + parent:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Enter a manual (possibly async) span

    val on_exit_manual_span : st -> - time_ns:int64 -> - tid:int -> - name:string -> - data:(string * Trace_subscriber__.Types.user_data) list -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + time_ns:int64 -> + tid:int -> + name:string -> + data:(string * Trace_subscriber__.Types.user_data) list -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Exit a manual span

    val on_extension_event : st -> - time_ns:int64 -> - tid:int -> + time_ns:int64 -> + tid:int -> Trace_core.extension_event -> - unit

    Extension event

    • since 0.8
    \ No newline at end of file + unit

    Extension event

    • since 0.8
    diff --git a/trace/Trace_event/Subscriber/index.html b/trace/Trace_event/Subscriber/index.html index ef568d1..0f422b6 100644 --- a/trace/Trace_event/Subscriber/index.html +++ b/trace/Trace_event/Subscriber/index.html @@ -1,3 +1,3 @@ -Subscriber (trace.Trace_event.Subscriber)

    Module Trace_event.Subscriber

    Subscriber that emits events

    type event_consumer = {
    1. on_event : Event.t -> unit;
    }

    Callback for events.

    A subscriber that turns calls into events that are passed to the event_consumer

    \ No newline at end of file +Subscriber (trace.Trace_event.Subscriber)

    Module Trace_event.Subscriber

    Subscriber that emits events

    type event_consumer = {
    1. on_event : Event.t -> unit;
    }

    Callback for events.

    A subscriber that turns calls into events that are passed to the event_consumer

    diff --git a/trace/Trace_event/index.html b/trace/Trace_event/index.html index ef6072a..cd2213c 100644 --- a/trace/Trace_event/index.html +++ b/trace/Trace_event/index.html @@ -1,2 +1,2 @@ -Trace_event (trace.Trace_event)

    Module Trace_event

    module Event : sig ... end

    Events.

    module Subscriber : sig ... end

    Subscriber that emits events

    \ No newline at end of file +Trace_event (trace.Trace_event)

    Module Trace_event

    module Event : sig ... end

    Events.

    module Subscriber : sig ... end

    Subscriber that emits events

    diff --git a/trace/Trace_event__Event/index.html b/trace/Trace_event__Event/index.html index d932995..6c10a83 100644 --- a/trace/Trace_event__Event/index.html +++ b/trace/Trace_event__Event/index.html @@ -1,2 +1,2 @@ -Trace_event__Event (trace.Trace_event__Event)

    Module Trace_event__Event

    \ No newline at end of file +Trace_event__Event (trace.Trace_event__Event)

    Module Trace_event__Event

    This module is hidden.

    diff --git a/trace/Trace_event__Subscriber/index.html b/trace/Trace_event__Subscriber/index.html index 549964e..1460f57 100644 --- a/trace/Trace_event__Subscriber/index.html +++ b/trace/Trace_event__Subscriber/index.html @@ -1,2 +1,2 @@ -Trace_event__Subscriber (trace.Trace_event__Subscriber)

    Module Trace_event__Subscriber

    \ No newline at end of file +Trace_event__Subscriber (trace.Trace_event__Subscriber)

    Module Trace_event__Subscriber

    This module is hidden.

    diff --git a/trace/Trace_private_util/Domain_util/index.html b/trace/Trace_private_util/Domain_util/index.html index 3dfdb54..c3df095 100644 --- a/trace/Trace_private_util/Domain_util/index.html +++ b/trace/Trace_private_util/Domain_util/index.html @@ -1,2 +1,2 @@ -Domain_util (trace.Trace_private_util.Domain_util)

    Module Trace_private_util.Domain_util

    val cpu_relax : unit -> unit
    val n_domains : unit -> int
    \ No newline at end of file +Domain_util (trace.Trace_private_util.Domain_util)

    Module Trace_private_util.Domain_util

    val cpu_relax : unit -> unit
    val n_domains : unit -> int
    diff --git a/trace/Trace_private_util/Rpool/index.html b/trace/Trace_private_util/Rpool/index.html index 452e861..f2322d7 100644 --- a/trace/Trace_private_util/Rpool/index.html +++ b/trace/Trace_private_util/Rpool/index.html @@ -1,7 +1,7 @@ -Rpool (trace.Trace_private_util.Rpool)

    Module Trace_private_util.Rpool

    A resource pool (for buffers)

    type 'a t
    val create : - max_size:int -> - create:(unit -> 'a) -> - clear:('a -> unit) -> +Rpool (trace.Trace_private_util.Rpool)

    Module Trace_private_util.Rpool

    A resource pool (for buffers)

    type 'a t
    val create : + max_size:int -> + create:(unit -> 'a) -> + clear:('a -> unit) -> unit -> - 'a t
    val alloc : 'a t -> 'a
    val recycle : 'a t -> 'a -> unit
    val with_ : 'a t -> ('a -> 'b) -> 'b
    \ No newline at end of file + 'a t
    val alloc : 'a t -> 'a
    val recycle : 'a t -> 'a -> unit
    val with_ : 'a t -> ('a -> 'b) -> 'b
    diff --git a/trace/Trace_private_util/index.html b/trace/Trace_private_util/index.html index 7ce8501..0ff145a 100644 --- a/trace/Trace_private_util/index.html +++ b/trace/Trace_private_util/index.html @@ -1,2 +1,2 @@ -Trace_private_util (trace.Trace_private_util)

    Module Trace_private_util

    module Domain_util : sig ... end
    module Rpool : sig ... end

    A resource pool (for buffers)

    \ No newline at end of file +Trace_private_util (trace.Trace_private_util)

    Module Trace_private_util

    module Domain_util : sig ... end
    module Rpool : sig ... end

    A resource pool (for buffers)

    diff --git a/trace/Trace_private_util__Domain_util/index.html b/trace/Trace_private_util__Domain_util/index.html index 601b495..f463e07 100644 --- a/trace/Trace_private_util__Domain_util/index.html +++ b/trace/Trace_private_util__Domain_util/index.html @@ -1,2 +1,2 @@ -Trace_private_util__Domain_util (trace.Trace_private_util__Domain_util)

    Module Trace_private_util__Domain_util

    \ No newline at end of file +Trace_private_util__Domain_util (trace.Trace_private_util__Domain_util)

    Module Trace_private_util__Domain_util

    This module is hidden.

    diff --git a/trace/Trace_private_util__Rpool/index.html b/trace/Trace_private_util__Rpool/index.html index a49aaf1..37dbce9 100644 --- a/trace/Trace_private_util__Rpool/index.html +++ b/trace/Trace_private_util__Rpool/index.html @@ -1,2 +1,2 @@ -Trace_private_util__Rpool (trace.Trace_private_util__Rpool)

    Module Trace_private_util__Rpool

    \ No newline at end of file +Trace_private_util__Rpool (trace.Trace_private_util__Rpool)

    Module Trace_private_util__Rpool

    This module is hidden.

    diff --git a/trace/Trace_subscriber/Callbacks/Dummy/index.html b/trace/Trace_subscriber/Callbacks/Dummy/index.html index 0c54ea0..4cafd24 100644 --- a/trace/Trace_subscriber/Callbacks/Dummy/index.html +++ b/trace/Trace_subscriber/Callbacks/Dummy/index.html @@ -1,38 +1,38 @@ -Dummy (trace.Trace_subscriber.Callbacks.Dummy)

    Module Callbacks.Dummy

    Dummy callbacks. It can be useful to reuse some of these functions in a real subscriber that doesn't want to handle all events, but only some of them.

    To write a subscriber that only supports some callbacks, this can be handy:

    module My_callbacks = struct
    -type st = my_own_state
    -include Callbacks.Dummy
    -let on_counter (st:st) ~time_ns ~tid ~data ~name v : unit = ...
    -end
    val on_init : 'a -> time_ns:'b -> unit
    val on_shutdown : 'a -> time_ns:'b -> unit
    val on_name_thread : 'a -> time_ns:'b -> tid:'c -> name:'d -> unit
    val on_name_process : 'a -> time_ns:'b -> tid:'c -> name:'d -> unit
    val on_message : 'a -> time_ns:'b -> tid:'c -> span:'d -> data:'e -> 'f -> unit
    val on_counter : 'a -> time_ns:'b -> tid:'c -> data:'d -> name:'e -> 'f -> unit
    val on_enter_span : +Dummy (trace.Trace_subscriber.Callbacks.Dummy)

    Module Callbacks.Dummy

    Dummy callbacks. It can be useful to reuse some of these functions in a real subscriber that doesn't want to handle all events, but only some of them.

    To write a subscriber that only supports some callbacks, this can be handy:

      module My_callbacks = struct
    +  type st = my_own_state
    +  include Callbacks.Dummy
    +  let on_counter (st:st) ~time_ns ~tid ~data ~name v : unit = ...
    +  end
    val on_init : 'a -> time_ns:'b -> unit
    val on_shutdown : 'a -> time_ns:'b -> unit
    val on_name_thread : 'a -> time_ns:'b -> tid:'c -> name:'d -> unit
    val on_name_process : 'a -> time_ns:'b -> tid:'c -> name:'d -> unit
    val on_message : 'a -> time_ns:'b -> tid:'c -> span:'d -> data:'e -> 'f -> unit
    val on_counter : 'a -> time_ns:'b -> tid:'c -> data:'d -> name:'e -> 'f -> unit
    val on_enter_span : 'a -> - __FUNCTION__:'b -> - __FILE__:'c -> - __LINE__:'d -> - time_ns:'e -> - tid:'f -> - data:'g -> - name:'h -> + __FUNCTION__:'b -> + __FILE__:'c -> + __LINE__:'d -> + time_ns:'e -> + tid:'f -> + data:'g -> + name:'h -> 'i -> - unit
    val on_exit_span : 'a -> time_ns:'b -> tid:'c -> 'd -> unit
    val on_add_data : 'a -> data:'b -> 'c -> unit
    val on_enter_manual_span : + unit
    val on_exit_span : 'a -> time_ns:'b -> tid:'c -> 'd -> unit
    val on_add_data : 'a -> data:'b -> 'c -> unit
    val on_enter_manual_span : 'a -> - __FUNCTION__:'b -> - __FILE__:'c -> - __LINE__:'d -> - time_ns:'e -> - tid:'f -> - parent:'g -> - data:'h -> - name:'i -> - flavor:'j -> - trace_id:'k -> + __FUNCTION__:'b -> + __FILE__:'c -> + __LINE__:'d -> + time_ns:'e -> + tid:'f -> + parent:'g -> + data:'h -> + name:'i -> + flavor:'j -> + trace_id:'k -> 'l -> unit
    val on_exit_manual_span : 'a -> - time_ns:'b -> - tid:'c -> - name:'d -> - data:'e -> - flavor:'f -> - trace_id:'g -> + time_ns:'b -> + tid:'c -> + name:'d -> + data:'e -> + flavor:'f -> + trace_id:'g -> 'h -> - unit
    val on_extension_event : 'a -> time_ns:'b -> tid:'c -> 'd -> unit
    \ No newline at end of file + unit
    val on_extension_event : 'a -> time_ns:'b -> tid:'c -> 'd -> unit
    diff --git a/trace/Trace_subscriber/Callbacks/index.html b/trace/Trace_subscriber/Callbacks/index.html index c531778..afa38e1 100644 --- a/trace/Trace_subscriber/Callbacks/index.html +++ b/trace/Trace_subscriber/Callbacks/index.html @@ -1,10 +1,10 @@ -Callbacks (trace.Trace_subscriber.Callbacks)

    Module Trace_subscriber.Callbacks

    Callbacks used for subscribers.

    Each subscriber defines a set of callbacks, for each possible tracing event. These callbacks take a custom state that is paired with the callbacks in Subscriber.t.

    To use a default implementation for some callbacks, use:

    module My_callbacks = struct
    -  type st = …
    +Callbacks (trace.Trace_subscriber.Callbacks)

    Module Trace_subscriber.Callbacks

    Callbacks used for subscribers.

    Each subscriber defines a set of callbacks, for each possible tracing event. These callbacks take a custom state that is paired with the callbacks in Subscriber.t.

    To use a default implementation for some callbacks, use:

      module My_callbacks = struct
    +    type st = …
     
    -  include Trace_subscriber.Callbacks.Dummy
    +    include Trace_subscriber.Callbacks.Dummy
     
    -  let on_init (state:st) ~time_ns : unit = …
    +    let on_init (state:st) ~time_ns : unit = …
     
    -  (* … other custom callbacks … *)
    -end

    NOTE: the trace_id passed alongside manual spans is guaranteed to be at least 64 bits.

    module type S = sig ... end

    First class module signature for callbacks

    type 'st t = (module S with type st = 'st)

    Callbacks for a subscriber. There is one callback per event in Trace. The type 'st is the state that is passed to every single callback.

    module Dummy : sig ... end

    Dummy callbacks. It can be useful to reuse some of these functions in a real subscriber that doesn't want to handle all events, but only some of them.

    val dummy : unit -> 'st t

    Dummy callbacks, ignores all events.

    \ No newline at end of file + (* … other custom callbacks … *) + end

    NOTE: the trace_id passed alongside manual spans is guaranteed to be at least 64 bits.

    module type S = sig ... end

    First class module signature for callbacks

    type 'st t = (module S with type st = 'st)

    Callbacks for a subscriber. There is one callback per event in Trace. The type 'st is the state that is passed to every single callback.

    module Dummy : sig ... end

    Dummy callbacks. It can be useful to reuse some of these functions in a real subscriber that doesn't want to handle all events, but only some of them.

    val dummy : unit -> 'st t

    Dummy callbacks, ignores all events.

    diff --git a/trace/Trace_subscriber/Callbacks/module-type-S/index.html b/trace/Trace_subscriber/Callbacks/module-type-S/index.html index 5d02727..1834248 100644 --- a/trace/Trace_subscriber/Callbacks/module-type-S/index.html +++ b/trace/Trace_subscriber/Callbacks/module-type-S/index.html @@ -1,57 +1,57 @@ -S (trace.Trace_subscriber.Callbacks.S)

    Module type Callbacks.S

    First class module signature for callbacks

    type st

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : +S (trace.Trace_subscriber.Callbacks.S)

    Module type Callbacks.S

    First class module signature for callbacks

    type st

    Type of the state passed to every callback.

    val on_init : st -> time_ns:int64 -> unit

    Called when the subscriber is initialized in a collector

    val on_shutdown : st -> time_ns:int64 -> unit

    Called when the collector is shutdown

    val on_name_thread : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current thread is being named

    val on_name_process : st -> time_ns:int64 -> tid:int -> name:string -> unit

    Current process is being named

    val on_enter_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> Trace_core.span -> - unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : + unit

    Enter a regular (sync) span

    val on_exit_span : st -> time_ns:int64 -> tid:int -> Trace_core.span -> unit

    Exit a span. This and on_enter_span must follow strict stack discipline

    val on_add_data : st -> - data:(string * Trace_subscriber__.Types.user_data) list -> + data:(string * Trace_subscriber__.Types.user_data) list -> Trace_core.span -> unit

    Add data to a regular span (which must be active)

    val on_message : st -> - time_ns:int64 -> - tid:int -> - span:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> + time_ns:int64 -> + tid:int -> + span:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> string -> unit

    Emit a log message

    val on_counter : st -> - time_ns:int64 -> - tid:int -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> + time_ns:int64 -> + tid:int -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> float -> unit

    Emit the current value of a counter

    val on_enter_manual_span : st -> - __FUNCTION__:string option -> - __FILE__:string -> - __LINE__:int -> - time_ns:int64 -> - tid:int -> - parent:Trace_core.span option -> - data:(string * Trace_subscriber__.Types.user_data) list -> - name:string -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + __FUNCTION__:string option -> + __FILE__:string -> + __LINE__:int -> + time_ns:int64 -> + tid:int -> + parent:Trace_core.span option -> + data:(string * Trace_subscriber__.Types.user_data) list -> + name:string -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Enter a manual (possibly async) span

    val on_exit_manual_span : st -> - time_ns:int64 -> - tid:int -> - name:string -> - data:(string * Trace_subscriber__.Types.user_data) list -> - flavor:Trace_subscriber__.Types.flavor option -> - trace_id:Trace_core.trace_id -> + time_ns:int64 -> + tid:int -> + name:string -> + data:(string * Trace_subscriber__.Types.user_data) list -> + flavor:Trace_subscriber__.Types.flavor option -> + trace_id:Trace_core.trace_id -> Trace_core.span -> unit

    Exit a manual span

    val on_extension_event : st -> - time_ns:int64 -> - tid:int -> + time_ns:int64 -> + tid:int -> Trace_core.extension_event -> - unit

    Extension event

    • since 0.8
    \ No newline at end of file + unit

    Extension event

    • since 0.8
    diff --git a/trace/Trace_subscriber/Span_tbl/index.html b/trace/Trace_subscriber/Span_tbl/index.html index 58b3306..fe71411 100644 --- a/trace/Trace_subscriber/Span_tbl/index.html +++ b/trace/Trace_subscriber/Span_tbl/index.html @@ -1,2 +1,2 @@ -Span_tbl (trace.Trace_subscriber.Span_tbl)

    Module Trace_subscriber.Span_tbl

    A table that can be used to remember information about spans.

    This is convenient when we want to rememner information from a span begin, when dealing with the corresponding span end.

    NOTE: this is thread safe when threads are enabled.

    type 'v t
    val create : unit -> 'v t
    val add : 'v t -> Trace_core.span -> 'v -> unit
    val find_exn : 'v t -> Trace_core.span -> 'v
    • raises Not_found

      if information isn't found

    val remove : _ t -> Trace_core.span -> unit

    Remove the span if present

    val to_list : 'v t -> (Trace_core.span * 'v) list
    \ No newline at end of file +Span_tbl (trace.Trace_subscriber.Span_tbl)

    Module Trace_subscriber.Span_tbl

    A table that can be used to remember information about spans.

    This is convenient when we want to rememner information from a span begin, when dealing with the corresponding span end.

    NOTE: this is thread safe when threads are enabled.

    type 'v t
    val create : unit -> 'v t
    val add : 'v t -> Trace_core.span -> 'v -> unit
    val find_exn : 'v t -> Trace_core.span -> 'v
    • raises Not_found

      if information isn't found

    val remove : _ t -> Trace_core.span -> unit

    Remove the span if present

    val to_list : 'v t -> (Trace_core.span * 'v) list
    diff --git a/trace/Trace_subscriber/Subscriber/index.html b/trace/Trace_subscriber/Subscriber/index.html index 1f17c52..b576fc0 100644 --- a/trace/Trace_subscriber/Subscriber/index.html +++ b/trace/Trace_subscriber/Subscriber/index.html @@ -1,2 +1,2 @@ -Subscriber (trace.Trace_subscriber.Subscriber)

    Module Trace_subscriber.Subscriber

    Trace subscribers

    type t =
    1. | Sub : {
      1. st : 'st;
      2. callbacks : 'st Callbacks.t;
      } -> t

    A trace subscriber. It pairs a set of callbacks with the state they need (which can contain a file handle, a socket to write events to, config, etc.).

    The design goal for this is that it should be possible to avoid allocations whenever the trace collector invokes the callbacks.

    val dummy : t

    Dummy subscriber that ignores every call.

    val tee_l : t list -> t

    Tee multiple subscribers, ie return a subscriber that forwards to all the subscribers in subs.

    val tee : t -> t -> t

    tee s1 s2 is a subscriber that forwards every call to s1 and s2 both.

    \ No newline at end of file +Subscriber (trace.Trace_subscriber.Subscriber)

    Module Trace_subscriber.Subscriber

    Trace subscribers

    type t =
    1. | Sub : {
      1. st : 'st;
      2. callbacks : 'st Callbacks.t;
      } -> t

    A trace subscriber. It pairs a set of callbacks with the state they need (which can contain a file handle, a socket to write events to, config, etc.).

    The design goal for this is that it should be possible to avoid allocations whenever the trace collector invokes the callbacks.

    val dummy : t

    Dummy subscriber that ignores every call.

    val tee_l : t list -> t

    Tee multiple subscribers, ie return a subscriber that forwards to all the subscribers in subs.

    val tee : t -> t -> t

    tee s1 s2 is a subscriber that forwards every call to s1 and s2 both.

    diff --git a/trace/Trace_subscriber/index.html b/trace/Trace_subscriber/index.html index 2dd1588..d1c807d 100644 --- a/trace/Trace_subscriber/index.html +++ b/trace/Trace_subscriber/index.html @@ -1,2 +1,2 @@ -Trace_subscriber (trace.Trace_subscriber)

    Module Trace_subscriber

    Generic subscribers.

    This defines the notion of a subscriber, a set of callbacks for every trace event. It also defines a collector that needs to be installed for the subscriber(s) to be called.

    Thanks to Subscriber.tee_l it's possible to combine multiple subscribers into a single collector.

    • since 0.8
    module Callbacks : sig ... end

    Callbacks used for subscribers.

    module Subscriber : sig ... end

    Trace subscribers

    module Span_tbl : sig ... end

    A table that can be used to remember information about spans.

    type user_data =
    1. | U_bool of bool
    2. | U_float of float
    3. | U_int of int
    4. | U_none
    5. | U_string of string
      (*

      A non polymorphic-variant version of Trace_core.user_data

      *)
    type flavor =
    1. | Sync
    2. | Async
      (*

      A non polymorphic-variant version of Trace_core.flavor

      *)

    Main API

    type t = Subscriber.t

    A trace subscriber. It pairs a set of callbacks with the state they need (which can contain a file handle, a socket to write events to, config, etc.).

    The design goal for this is that it should be possible to avoid allocations whenever the trace collector invokes the callbacks.

    val collector : t -> Trace_core.collector

    A collector that calls the subscriber's callbacks.

    It uses mtime (if available) to obtain timestamps.

    \ No newline at end of file +Trace_subscriber (trace.Trace_subscriber)

    Module Trace_subscriber

    Generic subscribers.

    This defines the notion of a subscriber, a set of callbacks for every trace event. It also defines a collector that needs to be installed for the subscriber(s) to be called.

    Thanks to Subscriber.tee_l it's possible to combine multiple subscribers into a single collector.

    • since 0.8
    module Callbacks : sig ... end

    Callbacks used for subscribers.

    module Subscriber : sig ... end

    Trace subscribers

    module Span_tbl : sig ... end

    A table that can be used to remember information about spans.

    type user_data =
    1. | U_bool of bool
    2. | U_float of float
    3. | U_int of int
    4. | U_none
    5. | U_string of string
      (*

      A non polymorphic-variant version of Trace_core.user_data

      *)
    type flavor =
    1. | Sync
    2. | Async
      (*

      A non polymorphic-variant version of Trace_core.flavor

      *)

    Main API

    type t = Subscriber.t

    A trace subscriber. It pairs a set of callbacks with the state they need (which can contain a file handle, a socket to write events to, config, etc.).

    The design goal for this is that it should be possible to avoid allocations whenever the trace collector invokes the callbacks.

    val collector : t -> Trace_core.collector

    A collector that calls the subscriber's callbacks.

    It uses mtime (if available) to obtain timestamps.

    diff --git a/trace/Trace_subscriber__/index.html b/trace/Trace_subscriber__/index.html index 3652883..912524f 100644 --- a/trace/Trace_subscriber__/index.html +++ b/trace/Trace_subscriber__/index.html @@ -1,2 +1,2 @@ -Trace_subscriber__ (trace.Trace_subscriber__)

    Module Trace_subscriber__

    \ No newline at end of file +Trace_subscriber__ (trace.Trace_subscriber__)

    Module Trace_subscriber__

    This module is hidden.

    diff --git a/trace/Trace_subscriber__Callbacks/index.html b/trace/Trace_subscriber__Callbacks/index.html index 7a6e782..92b5df7 100644 --- a/trace/Trace_subscriber__Callbacks/index.html +++ b/trace/Trace_subscriber__Callbacks/index.html @@ -1,2 +1,2 @@ -Trace_subscriber__Callbacks (trace.Trace_subscriber__Callbacks)

    Module Trace_subscriber__Callbacks

    \ No newline at end of file +Trace_subscriber__Callbacks (trace.Trace_subscriber__Callbacks)

    Module Trace_subscriber__Callbacks

    This module is hidden.

    diff --git a/trace/Trace_subscriber__Span_tbl/index.html b/trace/Trace_subscriber__Span_tbl/index.html index 4720653..a7e9f10 100644 --- a/trace/Trace_subscriber__Span_tbl/index.html +++ b/trace/Trace_subscriber__Span_tbl/index.html @@ -1,2 +1,2 @@ -Trace_subscriber__Span_tbl (trace.Trace_subscriber__Span_tbl)

    Module Trace_subscriber__Span_tbl

    \ No newline at end of file +Trace_subscriber__Span_tbl (trace.Trace_subscriber__Span_tbl)

    Module Trace_subscriber__Span_tbl

    This module is hidden.

    diff --git a/trace/Trace_subscriber__Subscriber/index.html b/trace/Trace_subscriber__Subscriber/index.html index bd90fe4..fe3242a 100644 --- a/trace/Trace_subscriber__Subscriber/index.html +++ b/trace/Trace_subscriber__Subscriber/index.html @@ -1,2 +1,2 @@ -Trace_subscriber__Subscriber (trace.Trace_subscriber__Subscriber)

    Module Trace_subscriber__Subscriber

    \ No newline at end of file +Trace_subscriber__Subscriber (trace.Trace_subscriber__Subscriber)

    Module Trace_subscriber__Subscriber

    This module is hidden.

    diff --git a/trace/Trace_subscriber__Types/index.html b/trace/Trace_subscriber__Types/index.html index b4d5459..3fb6e90 100644 --- a/trace/Trace_subscriber__Types/index.html +++ b/trace/Trace_subscriber__Types/index.html @@ -1,2 +1,2 @@ -Trace_subscriber__Types (trace.Trace_subscriber__Types)

    Module Trace_subscriber__Types

    \ No newline at end of file +Trace_subscriber__Types (trace.Trace_subscriber__Types)

    Module Trace_subscriber__Types

    This module is hidden.

    diff --git a/trace/index.html b/trace/index.html index e2548a7..ba7a77c 100644 --- a/trace/index.html +++ b/trace/index.html @@ -1,2 +1,2 @@ -index (trace.index)

    Package trace

    Package info

    changes-files
    readme-files
    \ No newline at end of file +index (trace.index)

    Package trace

    Package info

    changes-files
    readme-files

    aNwB2jZ-4n)90Y*Z}3&c9z6gi%=8fLLhXtD3v}-uoY5RHSqm|jLu6>y#645Gc<5ryOS06MIVird z-m1E1_HPJWjEapSP^4IaB6M*!5)S1FPtUV3r*{VUx%GO=zDNxu2dsi+v$v=qw!w&v zDv1pR!9MCM+IWdr!?-9;|M^cn?W@!a`>F%{K3%Uf0>g}C2$TR&G)`)pXLki3SbkA} zKd6zCPI~Ubc>V!q>CV7#s+zx!nbs`(FN3yB>D<{4;1ebJ3>Pq> zEr5S;GBH4x_pc9cSKptDx-Oxs8XBmlXZ*0UX=<*>THo6#tpFSVML`brdMK%;O&Z@AmQ=bg zWTCF4qD)xLC>u5e=)ob`zIz01P&z8=6t%i)oCL-mOR z=OCAh#a-O;PfWf60jLPV^R-sm|GMWdaNk@=#vP~;E+Avf897+BvmIiRsdYN#cLS)d zeAtmNv8-cM_~&EUH{EkKrMFAeNYoc@$WG#?$(NM6#u1|Ymgq)NII{70q(nG_HO#;1 zviAR(WhKG-J#-OYWF3V=EE-_pLJC!g?dbnM`ZIq9G@3!I0<49EIl(5O0k1ZlHA3Ja zI0Y_6oU?#^YaSSL|}l1pzBFGRv|GD}NuK)j9S=`v2XrgZJ5-nK?C8QBe^Q5m7a_zjt8;&K0N!0t8ua zZ~t4CvoSgIc}*xKEdhc|zGrGq-GJS81TK37kLRq&DZG&YrU0~tLV!ICNEqNA)2)db z&^$qho78oaO}TlhX^bJxRps_bd>{x2b*r7|aw=3P!TLh_aI)fNc3 z(Oy0Rly`%*mB2>=ls^oP%0`-tpZtRDkFcJw*OrlAG7KDZ!Phg{bjgUr?XFo)J*rP*B>Tl^+*u+@H` zboYsJ_EtJZn_RF~8*#KYyWVCwTb?^wp7|R1AUrL=PJRS)o9t1EQspXC_Py`{^wm$T z0R|eR&R|2;8)l?YM#BWnmI(`(#T3Rdmfm!wJuRj2keb#Y%x-(2#B?tfPF|<|JS2`d z7#NTh69-fd?Y;w4rk5WGDLnMl-w-g+^e)i!ItbR-1Bqj#Y3u9)Yf7x2uxLxGu#wd) zrG+^!YnYSfxY;+Wr)3VFrQ5jtX`JaZaYj%5Mj$>YM@y$@I#1qYk||`shVcV*^MO~R zo{W3r#<(=jjAQ)-(Su|6*g5_iTbHgME63tBO`JxiQO}rBRb%)lo1#%Xaxt&T8;038 zQb+uB9+4wtXouH^9CrlgJ8noM&S0eL@c#Do%XG$=zUzxV>YZNOxWFlnu%FJ6+xt&9 zcWsw%NaV$GA!56JUe$@2ozgm@mP&@cd{7IU)66C}w&B&)Z$pg?VhvwDVP6(bLlndB zn>|MTu5=3ssenUrzWr8<@j zPHFOEO!`J5(db_u7@sI3jVR9Hg^5u%fwAa^-F^UhQf_v4LHGyfqMi7i+-w>7pLMSn zG-6~ksth#s50pk1M3Z3UXuZf{L`y91O!H=wZ+7!>lXtq+Ub(*fLS>#CZu3^LOEkBE zk>*)GJ+8@`tSeb^MQbdUC(k1R`lt5Kom5Z0t+C(3IzVoCWgb4#G=x|u;guD1Mf1wY z7wxQd~y9Xk%C~hL^S>1B_d(BL;G5acNVw3BM%uB)9pP*e%#uS4c#UjXxBUF4howg*~g^p(Z=nk82( zTJz4j;?+!c703j6JMndk5(Y~Ym4JwVARXva)x2l;!YdKwrbG{6{ZZB?wp`7_Jy}0e zGSWAsAE5uP3fO6q%IEfn+z@_M;y>fmWC(orSPnbxx;zW73qu|ij|?MQj0PNfo1Yw!Nom5h%+Te*%{V{ zNc9WgxWc&}o<5eoe)Ff!XK49MbiF>6jBvI_hnA7z@)>`kuWfjG1*dZIjK{} z*#r|gnq(3elT9%Uo7M~-j+rAfYaBEV+w5VPGk)fdo%y+$2LW4vc8prbFmw)PcQ~$t z9NdsY7_P3f5{Dh(>*(N)jns+pbS4`UQh?prFxP3k-59Z(N;s2pbP7lG;`Z=U! zS-R$-`kG}KOJoZ1b}qe9yd|sH-s;a|bwH!Ma>T0X82Y^+$-}Co35zb#I+hN-T4>#U zN{7>LfPCj2$@Y{7Ej|JuT84BQlR|FJc64V07+q5^GCqV8J3SDu(!5?a|C?mxMENmWW>JvpnL42gPbb>FC z%MrO8#k6snM+l`VW-HvyXG{0EPi9`G9Ook+^ng-7Ht8X%RFSRn45swlRGy#G3ln>( zT2Ztp4M#~bnvoUxq(mphS+!9MJ}J3+ZT#&U-uBTZ(xdA0KH&@ETgS%?fB#8@;rn<6 zL=UFy4eI-Ulw@gzc^S*;i-!MamrWb_+LscaOUo|6Z{13F!UuoBmaMPsZb499x4q%n zu4J~ix2TebG0S(_$NlEQpY!Cbke`542}-a?ht!Lqbbc|;E!QBNK?gA3xhPIJP-#l* zwB7G%2Y1gtr*#RCAo1a>W<+MXU-(Vm^*!G=+p;!(W3rDBZeaaV!E@Ol$BAB zuSKO+EHZUUZda}$Ed7I5&Hc-N@PL5lBd~XiBp>JEIv?aWc`s!BI6aE z@SXZ}@KLYNdQbeAvAJzqRiNH$F*9=})Kqykg{OL>&`%xslUf${!ZVzL@TaH*P9-AN5p_ zT6#9D{uZ{DNmZ%(OPDi#<6t{Zagw@I7gqh*^zG`z#S5}G`HkD{%bb#)4zd>Z00Kz; ze}%WM!6?zrPc6#``=Z^PG=reB38&c*7gEEH)M!6T}&>I(7``?T^1FZfn+sw5KL% z_{hYlwI|HOQ&V})-S*VpAspxVm3kl9Xj{>^8?=KXbtIM?Ft%*o`bcqK*XD9(yD^T3 zVz_{3O^TJtfXHQ3eT-6Ez0Ik8 zTW1v^oXfQ8yZp$90rYI+hMS06L!AtB$8dL!cGn1Z7dXI8x*sFVM|$7E2hInm<3qIV z&G5-c0>Ki0h0c(U*o)HQdCU>$@kvaRK(Jga`*+FX@h{V`cbfs0K;n+?ZjjXF>~L~A4ruTG-#)dSn9 zGoPhbf6(U0QAe&=*vf#jz0oFB>64kSmr;@$`xHUrO~zoIFloBBzWzpV{$LrUD@=8r zp0q0sHz&NURGF379(<$>GGdUf(~&uw9|da-D$DzEeFYLhiM?Ftk~wwPV(HkmYa5zo zbDK0qP*t+Wmix-PWj<)QrNeEX;bh(=Seu(~171R!jX7Egu@NGq-OQOpimbOr@vjn2 zd4ZU~%0N})$~e-Vvg%X=2y&{__@NgFUaGS8ka8BuDmlbxzZ?7 zS`SZmDiSUvoUxt)38xN>L8^WP*4n<-S(|baNj_Z5JBb1~{fAGs4N1l+vTf;+|Jvmx zJdV)foy`YtN7v;Gb6z?ppUFaL!jaSh$mEd&GH~JmTzMg0w#;T-iN6{L?IwhEV~-Qq z0n{T_GubX)re2ydWC$J*w6M3FP9vnVinaMRK~jQo4>biq{)C*mD_FCH%*!AEPPR$W zSOfzB;eOeG$5S&QR~u5aA2r<7`7B~6M71zIjq^1U4Ma#HDl9zI3Hn00feGt<$I(Pb zKX2Yl1!w-Nxzy0{a)^3i%$WkoITsEGAY6gurUcDLo?d7P`bCPN1L>kZaL%v1k+>_E z^puMjwdBR20}TNU%}`N_*WUd_C*s%XQ-yO4WMGL^kvF<`MZ3i}ig9rVrSo&^`8h>R zZn8Bkg^URIlIpP~?z*Q(MqHsx!wrn{)vnZCOuN`*hL~(GqCwpmMak-0Tku^7wO;uz znyXizR~WTK?JooV5Lp7r@J_Wr`7;0x4`c+R9k6WW&Jy!^Hu;ULl|`4^gz z5Flm6jT+`o9AVN5N8i*`E+$YbI0;*wT9Fca6ySCWNV?QeU>r2sDjC7_l=r$(>}Pg? z>Ur3^I*PkAuJ5+r(!2pov^n|rlDZgR@r+bO+t%_Ur3Jqu!xK&+yWFpL!`c{(=~a3y zo&kd7L-E3a<*=fJk^uPFiw7L&-KmFcP(s8P zy?tf&?zZ<#53fEjb>w&%x#X0gCHJ&V2fv&%Vx_S_-=W-kh_bE=>CRR$j)#(zkmV#; z=>yKgq+y0Hb4GvxKm$zSE^twp+7sLFP9jU?#J1gj+gwgTq%ykkpo6U79t)mS15Q&6``dewY3Qy9cuaZnVvpvV89p}5ym#y z?zEUKcAbeE*>)UYyyVOSeNZenO?0!l*N8;pK(7h+PbBThQ`LyeSkIom)o zb^$$<@YeOS(6CZ^sEEALH`3OEBQMG&Z#%J7;H;(Las{pGzypKHRzrA)dhxPu3l=nG59SflTaiqnx%&| zdBLDMe~KD`CRPY5^cerB%Kz^T$W<{^OrV zh48s6S>FH~*kmCrNp<_JTp zOtDR(rP+h$Ut|JzKgOg&1xj&X><8I|lqobdQQ*O3Us+A)pL+mPIn{Oj(9gp`T;yK@ zk=Ah%Djyas1*B|Bwr}ssdJGjt;c-KbU7&SEv64R``d~WZM15^)ED@52^M`#E@QM~| z&Lk6a!5kYZEtDH^wI8`Q1cyAR@F|heid2v3<4eCPC~-ECY%-M@LJ%%&6sd7=%~uz%lqTU2!I0sz$0jYJZ(ED=rQ}XQ1w!bSWh*z5!J3xQ6>=F_bFFCuj{zSY`CUzTh-IS}&I5YF z3}C1|fZ*GYB-H>q;gFK%lmOO+@-ABJ}oL zcsYK`3E30TAtmC+_x1ysd_TwVT2l8Tkt=<4&|sW(?a}mudi#AD@xGWLOfo4ksKKtqaLbOXXGdkG@I&2&JX>HQEo8`Ujs=C zcB9R{oI=389r`^sOdyXm8&dGPi03;B}jx61DVtG z6g(nIfx;!rF(^$>#wDZ>AWV`0OlfKo4gonWy+lT(>FgD7Y_2@{OOUMu32e<67Czap zhVRv&7@sO)%Y_GDak3PpZ?-{e&ZK=87up%vN;R7uwm%Vpu~8qxXbf zys@7b1n2dbSYlI6L(8Z@|C!6Ju+l24t+CcR>uvaP zW$orec$aU+;2~ED{7!Xg_!%4;O>L-TKwyD9NvsncO{7V)77Hx2$YM(@wajrZz4F={Z@mjb7{U<=kr4$^5e?B1 z1KA+Hu0KUH^YKKn`@{=2{^gn;{Vxh2&`WJqps-a!06(O`3^UErXtp`#nrFTPo_Ok+ z_2G#)^NkJAgkMu};{hk3{d%${%YbKmWQLdCu?d81fD14d^y=2KTYD)oK?>iE;I=$> zqkl~#+hMy1h5mEnsc)0ze*VSBJ`$6O%~iHZ@BiqN&x?`fv69Wy+FyLt4MVED`ngLO z*tksJ%dGBq?O_<~G$vEp#T;=T4@a5+2h^U?OJW^F+*H0)=0iKPDe8duFmFh^qGEZ% zjQ|~-hqCzUHz_5^XC)gcgY1S3@?vrUOZgPB0l$O+*@}XbVMI6B5)5U+xkqE8p^I(3 zs=s!}fjS$~3D7-&?2tA<|JVv#Hg|?!-u+3r956>DGK?*6!6x~Ge9g}OoXDNrE5g@E z!s)nV1p%H0&xJ$aP&g8fg$v*ccqe=TfkaForjR+vJZ?+>zomdS2tGorkFSR8^H~@0 z3a71of^a4Ta}2&WmVbbCfFc2?_w*0xAKWjhVW7_6yN?aP$6o*+A5ZU#Jqmpk{P2s( z9@ag0wr(Xp0Rgjs^`3#a??y^6Zf51`ZJsn$+UKwXo&``lII^5z`}liYb2NEqSbB}kGYQx=14 z`3e;&QOeAs(nwXR)fi{IIulHCGLD?`+e7<3@xoK@<0MzTJf^y?-?i8osRO_KuQk5> zK^!_0!hfc@VW%D1bfF?4qobfn$BuvtK38lK3LZSE$bF*}L@PibJujm~ix4SR zlo)XmWk{7KU7i7Q43un;p~?(4+z@?+8LQT4W7MlKk=ls(7^6TbS6p_-UAGbb@-Dqt zaRY(JLp-C`S8iz`kzA53{xWcU6I0uO>;M#*CV6Ci4k1La>ZHFJwJ3)8b^9d1Q>pO9 z+??7nkEWtWPnS`kuq67r-y1ly@P2xlMw=k+@x21O{}8yl6mOqA_wTv-9u`RVcv6f1 zRT!X}%EVYp%!w<~4Ip4}6$#kS7ZoWm1ApX@r%%Ib^w>{(ip*Ow)05BMiZ$te@Z{(^ zbWx4rju#xiE3%;_&bUgVAb7Ybo2tQ&Qm{b!bi4;f4o%i?GgEPg;7|)%V}`_4NQkyH zKd{Z8H#Nq!0{qPj|?~js_R zg-<;bWQ6*;6sl!N3dhhDR0lPe-3Iy@Bs&3_9V{DABfpNOPowYf)yk~zSv4|%dIj%N zm5yWj@OE<8D<3OPnSoByk&rk)kQleub&92onrEJ&I`p*aXp}N{2qeYtc)1KS++2Df zC%uuMD(>%S#S9r~Q8CvX0R=}v$uUrI9JDwO)SLhfCqbK2pu_2TYY^-+De~PjFQ_g1 z4ie$XzAoS>X8cv&a4gUGKSFo0#5S(u;PmLyM;IUs5k?4Oge8P!gcXEUOHY45DC!0Jo1= zv@kV`d73EDq~oz_PBozJP9tw3=?M5h;>f&s?0?ed)y}Anv|6Z3rt=k%Mh!wT3VA@r zBnt_R%pIdphMABt&TbNYEgQ>1GRxWQbVUKklZ@h;5h{*IE#QH6HGnZGW$ChDiLhr; zatcPslU9n2#A$(~%dFufeW^cS0K3`j&d6L zjabv9>%D-U9Rk7{{kCU#V!d|POCow7L5G{|*p9j9C^v+CGw4@I&5l^9bOX@b(!$VS$TB}vfgG{LobI4-b|uQ!C}pcO7^ zLxIB^Y98eJfOwX!^ql+Gn%qp@Dl^DMfCo{!?URpQgW2j(^nx0rG%C>2-%_I4i*Blv z-6VB`&={q4z@jrs-yjS|KSo2dQ=0vZ6f9Q1A_be(??}O6J$EAG%zM#a!UjrD!Hqn4 zPJBiv{rBM->f}?}UnvPzyA48}86AZBF_giN&Dj;>iYpnfNa_@o6JDx%>H|F!13i-h zJ(CN_6h$&sQ8^9OFs27#Gz4MH2*Q|IKxQeDMnzZ6R=3ef*hj2=+3jjt`4?PzqxVDc zCnp1f%D<+7m`|b zWx2^T){wugVJScljENE=FQiD| zy*4f>duE)TiOzNc+g6m)6eGqsHQru}EV1Q6s+5ol)n7>|_Ql`EwyskwVu9ApmNtIi zOviD{g~+1FR!X;wRlY8)uh&&7eWy)FuSu7ILBtH<*+WTERED22umI= zv%n$N=B`r$9e&q|4+cs_6>_(fLBUSjZ7vTxlht8a`T-Yms+5)Bkzu@FIt&k7-N8wz}GneuGc?>xJ@Zd7y#+h};_9c*eW+C6h@_^vaZd80g zsXb2?ak}!k3!bExWAaz(YZB_^?h%geWbo+prM`HIf%-Vwu0Sp$xx7q|Ije!IPg1D3 zQe)?pfOjinlEYGlT%lEbL|LdiR z)k1GUNaA6$O~^K{U8AltNJA>GboIe=+4Tix#c6b^>rNv`nypM$7sR*8B9|?;+39u2 zHMz{_&)v7go<6pO`7f$2$I>SmG6I=1C2xrOW;GWK=Kjhr~G44i5yK1{ zkJ)|oCC2tr@HpK_HGVg6X*r%s)^mDCIFA=#;ij_l2+Xiu2F>gd;+8KQN{W(lE z)_adS+U{ZJ7rpQFNS!?Ng<;9>rvNLfCOdd`^w|i9m!ce+Ut;qcoK9Na8ef0%HV=I& zjvzE_?txNw?4|iL9}>Ejzppfo_+Dw){4&nloW^B5 zj7Pgx=*e5OB=p9GVjZEZ-{!49$K97F{|iZ&UVG1>?>ZA%SOwfoLQ3#EvU8-8W!u8iTuZjU{Uh-WeN9NAGHD0+v_#|3QPC8- zbgzep6N8=4*JCj41mxn&Q&3Gk*)EMoy@d+imlJ8`8BGa=uIu9~< z$aWbDbGx5YaHPaF5#BX1lt5|Q)=&%gv;686UVnrf4$_rn>WYPMEdl{cNiy!+R|`h&^w^m};65AK8&I@1wI$~$VMy`4Bn-5G ze@l={SmfY=t&@jH^{MHF#!m!@urRq>KGzWjYejfVsg6o(zK>AyE+e12333tajYh;P zUez>ae+8Ku(=Ay}p$}Ik#<>PsJ!vmzdDlRJRLQzWg7g00m5nzhDU~G%{EHeZq-8lOB{1q7Mt%# zF{78L-}QrOk$emFCkn7ka$~bxP$OsTP5*qM1O8~6${mXE@Ck(4IWml*cF2$tGwop^ zph!o5ujb}|?7AeVmx!-{O!Q&z0bn3#eBJ&=SuEhZUdd)xw2{popbTvsF?}@HLJy2m zA%+NZKBw&Q;kZE`RA`_i_4UgDZgy^8eZcam&_u@^O|RT5 z(`$*6F;VmTII5QF^&So}&R!bY*0bA5-i-9|w?^TTVJY1DD0XP@DP4+X+$2LAm9Ue| z1|D(o>gIRWQa6uf+I`DGKO#Q%Q`l^;_ATe)6H4^&(cHS&uv(~3>3Q%3p0TNHUH4!f zg}0{rOb@%Sdt}tN4EA{F_k3(4#Ym|3M%R9nS;&Q6pt|Zo#Qoa`4v?XdecP~_oq`j_ z#K)%B%KEQY!0}AU{NIWf{8Ydld-*!M{U$EBvy5;5J8tTWCfCqCNPDQ4bNyU3yb&hi~K6#Z%DZVy(e<`Ky<$+{ZMA45xNKG!Vr? z4O8NO-zeI#RDn7tGrl1=2KqI@(MJ$L%gw8pcDa#pNzb z7rj6Xt1Nl=8G???JxEKd=+4~o;=YuFN{YL5lHJKSCeFR_>YmA07Uwac2U1Tswl&0P zv|$9K=T2{nV{{pD^X=x%ZCZS8!ZmS2D*7UsVfuGz9{TiRc6eryYF!-5F#UYxdgvCM zaCoU6|BXs(0E&o~+W5#OOP^hG_hfxW@HbnFd}w;lnGK$-Y=L3rX0fKh&9Y)sUZ1y%7jLt|I8? zI&+Ky??Cs}72^~4#EVNkvt#?GIk{%g{B77%68mu5=Q()_?~Bb8=Q_K3uB}xwH|%uM zhmx5lc)50U_vz57)%6M^cdo@cpqX8Xuh3csH!K`XPBt}nOttr0zaLq=q^wj6H2vGv z|EOtm(uwBQ?y1g)p!Z^rv}u$PwMZ}12vus3nuQ`%!1h`jceQhU-cg%oe}9yUelFSL zcv6p}5xXT@Uj8O#<8vK(Ba4@FE-K|-b@55k&ifrU3BVEaWDJd(SiKY_+y!(dT``e1 zkAnnXJy;8iRQk)ytGd`$^8n+bT;JwIviM3i9ooIGx(N}iGVz7ZMyi69p3E3}Qa7r5 zsR5z+LM4cGifsey*EL@oxu6xPC4fk+y)atLO0GgR{|H$M7Fae+*B_rjZ z%QB*uYZbTA4b&Skk{aSTyZ-jG7A(W;_i9}OzD^mG`7KLeEiQG1FclY1e>x{d15x%s z0PDrb8K3`x)~6U`QXc9So~`k!qVihmUx+}N$WrkR9z(uvIh0Y(w-=YVFIb?JrWI;y z>U*{h4x*QDicpz~6#cdT-l^U2EO=$9KdiYi-@gQ_n;fw*hALD5QH6T4tL;ua13IO{ zl2=^jd#Y;KHoBOozMD>kjyqwtQZvtRC>z>yDj>G-OTPG#XVHnO4J|TZzr!I+w5ar~ zEuah#c4l|041nvlwIuARtbd9~Qg7dBTO}Jc5b43XnPDq)s9Fse#?zAz&_X{%@4=V? zUm(PEFv71mEw7E+1;fo6y*w%?Z#7EkEdgn{z2|>S+nXQTuoC%WZIRoOAuCqt6~dR( zlZ8I-GGLFke$vDE{>&ft73iYrV>_eqCul=>Dw|igx*|7Whqwb zuQLCdctXaDXZYJrB~G~lE`h!};8n?>Xy+kPu<$2DB!vRdSqyVES&DwPvJeAU1uhI# zL9~o{5`lUQQO)ZpF}JX^i%95Il0~oQlS)=B{YKI-`CMm+0@#;FN?wOefV^l0B+4(0 znrhDi%Ad0QOdI>ox~JYuPQS z3ZcD%BBOlwhk?up9D$h}hU%LTnhj~b+5vmDb@(S{an`;Ec)PeL`b;UrQT+1F#1o#L zg{_-jXBQ5&D2-j~r`H?jV5`*L%dF&i_$|2ISlwkT z$!{2U42A5&6?^af@90xR)Xp6>p<>u1!q*Q;6xO%3H%|5!E-Kcbjms=K&H{VD-WAUr z=}-4J=i&~QmgZ1?Y5{34nTQ;+%I3?sbWIA>&dTr~m{JpE_LWWtO)!)Se%V7_37hq|0y|Y;XH^7!K6c z1fDoZ6G;@Zj8EvKY#hHW!yi88wk6O90~OpKy3=F%*TGr04-hi5QK%6(W zis0G|NVgEm1^{V4;s5@~L?p5!bLouO`56ZO)T+lHQNwG~?_(ZtbjGFPkQ z*-|K;1Bh6HB@sK*ho(PGBUF-cfBg-pe9m5F`kz^M4eo+^&b}POA0FS8Zf$v)GV)w}d5lrb*PJ-u`_0~o`3_wYmgkgpbH$!k zre4>?5W2aYadr)-o-MG{l!?S)oWRJbYUa&;M<(L`kzwmrVhB(Q=ZW{o6o;bluBFUJ z`-Q_ATIk!-yU}{|`MS+;h;Kb|yg9v!qx7;|EP7a`6h|7lQht!4SQhbd@flpXL}n!N zHZS#^IextFh0abYbo@l$=}t~Hqx;E;&B^6T6Lfjnx-HiQOS-I3LR+V$x6Ov3nnE|jE%0BLfvq`(29ZPX=JF)eCMIz>fQEN^Gl2sA$=y=l?5vfnxMF#5b* z;gj%1{^HbWuYZA;-y7!{sAe{wZwnJemHib?2HP;O^Jg%P1fQC!OTm*+WOm_)6qZYs z_fi*DMq_@J1o=#0IQJZyY-L)dfeMq64bCjmGMs2Bm`br z3e%&}Y4Sp7aZ$l<#iXg+|GVVPhja{I)iUn^`9P)}+VHJAGh_)fRDnYtD3Ytv0P=v% zdW*YRH0HMC1RCoJk?>1R>o=*9>Hee<5KKL+#b$~k1k+wPZp!E zEK|24RE{~tfqE}&T6$7nro8wJ8aZx+vzU5#4^nAE0_bvvvs@-~@ELp+reXYiVcz_U zw<@5yc`riXBvN6~y;$98I>Z2HAK{kw*XaBb|Up^y}vh*-1^UzRpQRY+}v~%yESV;U13esTM>%h** zINzp4tfc^vswLrH==gclAQst!BVX?PIsc1d#5tUrE42Zx$cE)!uN4)2;kZ{s(1O%= z;3(6CK$~J{R4<-lyA<)70O-;~^M zE{YBVFPN650j6WqqRV7R1Le9{o4&X1VI3Cs9o2xkE?B&OZ;^i;6`%x69t2v>Jx_WQ z+kibwI?qGP-EcGGKPZ(Oo&m4?EUp3fCg6rW2-Ax21|Iyyd-oRwr`13W@Unko)pXzK z4nJDJXERv~kHXzwUu5E8pO#7S!(OilI^%pD)dg!&sUYCJ>p)j73!(F6fGgnhIVS|p zgHq|dv!&Vw*<0JT%Fc%ZRu16P4bc}`T10?gGePse>*Dmot*s=`1c2AV(KN`;Xf5*eNA@CIe5I|sy6y_d{=suF z@We%6OoN~O84G&>esI6bhMeQxpD1<5;C>9uJLG^eZ7MwF|MDc%RzIT;!E|U!o;Gy; z-w041gHd|jL!+J|mzYh4%LYS^T)I+kdT2CJ0R_cq{8Vp1Ddzg(LP4C(ZV?DL0K4(8 zj;eZB)@*1x{vVrFuG7e?xpF48w06+k2&<^jX=|!&tEWO!`6etJ&}68K%P8a6qUt@Z zA!yL=X8*dwppYqagh;zKhuE^EKd-};t(IEs*%}q3d8)rQ;^0v%dDn3qgFIXLdyeM5 zPa*aIfX=ti0uOOMsLjP}YVv-g)djLk6BQW*VWu9et)gBmPRGrq;_rmp?mG zJ2TrnJ6$_Hi{lhVCL++TA2gb-&aPgKrn9fN&$>Ih`tIgyLD|`MR$`$iahOmo*&rDQ z{lg+u0^`62LUrPB4=9`P=*ttt%^6O2e^a4&trf8A2Z*~f9e?{pfo8`lMDO(e*)&rY z!PH!|v97#iW!3LCmXXXX7RhWZqtOfr7z$&}E6WHeI89ZR=97%ROzbH{9kp1Y1+r_( zz-Lz0<;x||aGabbHZaNbl^D^)Vp9(6gg#{whCEN~T6Sw(j4%C$^`; z_Dre9liz$F^rE&yFQ_Z1mljwPuI=bjIu^|+39n6N zq<08I!d^3jzNsqZ%yJP-zTA{;ac3_%k;S8&)V+jIL_!HsNS`27{(E;z(o@ zj;dns8F_kG=xKqyT+Yjy$`kw6v!bI#yab2K}=xhL#pAWvyH+ zy@WtqM58VqKkF}{a9Jy~*9OqQ=Uz~XgvAVh;Y9%;TRUjupmozAXxI$_$(>3Clc7@b z_$noXsZ#LsWxI=tb`|9BDk|EY&y9%vGyQ|;wKIeJ=zOeO_-?u5`_$8N2D|2u7`KQU zGQDuIqyR-6>awvNj+NvJ-ql${bw|~*|Hg0)j0N|iyaU-3|8KK>?6AgP*Dcrgb@a(P z#%v#HLN#0R`D!N-b=yE84k**-)0K`yl*L)5_nHQziVyH5(~3|L;n8vzKk8(7_!J zRH5`ZAf(Ffl-rvM52f0})mY2%<$xUC$>D<>cGVeZb;hhS7bU4*~IS}6(droekCvLoI6Yq@)e zloY!w3E!l^w@c(Pj9bXhAygVE*7&`I#uuFh{AkfUox69fmIkL!^Ye(1;hadqo)p-- zMP8gtw>905apI#je6ohqonU>gqFc~qHrx=+U^$2mnzgjo^}2x-%+{5<%B=p!akmK= zWP4fwm6eqP4PCwRE&gDXl`92TbTQ`+;qInByy>^U zC4{&1*$3`{!)DmQJScTrWPw9qo_6=!JMob&`pJI2+|xmg#B?aVV!_Lyhbs%kt>n1_ zum5Yjq9^>oOb1d=57=J5r5cb{APyFyKo!%6#j zUK9P8%=sRf>SrClak-unxP?iNU>_~@B$gyPbThQ)?uPrVhG?n)BWkKbP=%mc3zPUw zj&yw-x9n0Dz3+(ApWf@)OaS_StvZkiq8ORB?eyeFzyZhpe*(%+AeYukx@A~%ORr9C zA`8U#0=i{gGvM^QqP`yX=X>hwJ_}*2X>WDE(>4xrWt&jV&uQFp(l*^PteIRB31w0% zC*7jW7g|?8kh4f6NBmVSR6dN`(gBWxia$A2zK)A`)dTN_5Gsf^xOUwEF{|=*6U6Lt zHQ3Yh#FOI5z1EWx=Vw>uD`_D9_o_#jb9GhuFmCo7kFvX!XO*wxw$5S&>vyChzBCk6 zkpsv=M#HloF&MSWL%(#Rf1)Jv3=N`#@*YJ39a0it46;6zSW3)B`RfR zqy+4R%7kb;+0ynweTojm^CXcrJ;TDdWSWwfaUwG=K6Wy>YI4i3WUlgqK;8oE%+?fDHBI5;QU2%>3%o}nHWdXS5hI~;^U9Xh;5c{>9@ zYDNonaTOzOT{{{cR()OJhKIZpn6ZY~&K5+V26zy^OoRQTO`Ez5E`tlxE2r-({EUH3 zOvIF;RRFBvm|e_3R0Hb?od7kov{JKXH~xzjg}u<>^cN>)iZQ7X!Kly>Lp=l#Y*B6v zVi$al)xgzyUYAF^nT=BC@OfaB6KMhZz&-I-6v%h|;21nCqeN!0YcW|X%qH7ha^`2y z-vIye>LyE*IAY*1+^5PLYsL-;WYqFzfL9A5q7XA_=MA3#b^@J3i@J1f#sG!6%n*AJ zZjCdfOEpU5EO2_(UtthN!-Ui!3VMY=w86LrBM4jo|71&TXar?S%W4K7j*df$l6mGH zm62eS2-IZ&7;JxHm`TDgVFB;}eha-VT|1dhR-U^xGcY`b2f#}Jfs|{)3~c)NEb7QoY72CYKCD{%?$(7U8u&u91ecOlhB@! zH)yoyrpj7aQq?b!nC!SaLz zZGduLEowH}^BjYRc_#^g1UjgZSXg+xI_ESFIOl9!CMGOAWH8}-lw)ZFHXi6!Spqra zX0e1_d%#l{N<%uqg?;()Q8&MPMps$fAPiJI!QA&v5YvVcuz!0b%xI!aF_LwE(jgWki+mHKX$ zKYYNYPF+UVN=vEMIpM;8_b5*Owz+I^rt2u;P1FXjJ4Q@OiBUD*=RBnO8^GXgHeld` zwWi)=iip%mQrgY@QqDIRTx|x7Zh@}RT24Kk|J-5~J2Hn#eVY$eJl zU}MZJXAF?kEG9f+h`3(lJ5N@(+eiy4B{ghZ&$sRuFmP1kA=tS_njf4|Xx0(OVWzn& z0-_`FeiXBnuJ1jbyB<3v|4K!250-8AmeT1Qq`@iGS8AY;vUPHbEiGe zwo)$yHtll6=$TPGPYy)MW>v^W6pFE#OkW4|;Otd7vK1hUL1zelA=9^d0Y73>XV znHy~0wU(A@OxpM-o_wrh^SF-x_WsQyJ5rIcV0yk6XK3F%eyvT_n5TWR1!$sWyM^P^E+ zkW@%Re9JB*k%mYdB!!*03E0kar~!}Y);KeL`LkdLf}6opU6n-|GYURNGq;X^Y^v;V zBVpCJ;_|k8b7lw!)w&NATiG9npF`RMf{r^$>=8ULwgrI<>mUFpbhMu zfGbpDbIVLkJ(#^@TBHUgqF}seh4E5`!-{-_HK5tnXJl!W=7r90d_WV{6^5LwPsl+g}VyF=Z;uVmD6 zuCPs8UXe151r*;?1d@}42SQmQR1u8V;tS!DvJTpCS7n4m2!11hBUY2cHVS<_ zzX2g8`&`aEIfxFyF*f1I7OQTjEy1CT`AEN+XS*r0SzX^8fL=d0Hw{#9VUMbpagaeF z?e145iN-eRDCak0jAVFpJNeOTo{12laRlSQ&@dcn~ zge>dXN0dxVAm|4N$6<2yT352V3@{tMYW|#=lxuAMSH7dM8VJCMK38_yvF0|bYrxui zFvNV-eG6@9Mk&4RWURHU1B$rN%K-)rs%Ibl*6K^8Md{_xMWi~Fmap|D#h z-76tq1d(ZYPVDE@tsKx&xom5wpp@FM#wFMk#A19ff3c9z60$acoWE~H@XeY(I*Iex zq{}d|A{rpY$sOT_Fwqd)=g`vAe| zCG5N0uQUgjCtVqeVz?SEg(>u?=UUVz1@ozj1W@!zR~3*$wi{)6=&PabdIN|027@Tt zfHS@)s7{9%nH}vF1|+PCKoF}{9!g6n_{3!;ybS|R`0=&{0k`lT7S^}YB^bZpmD&=U zil`efF7c7SImn04wz5?U#kdHbK?&WtmS$|TB?>sg=Ihg7Cwvv>+GqBahZw+&$HBF11? zr5upfJP;F4ARd8oluw|~Nc{MQ%=7?s!m8P$)n34j8X1TJrUq|lh=yW^FH*P1e28VH zRP+~O`G-eQ1A|Okg+ik{`e&R#QOM*>YlF2_YRHhnsJF_)JHa!Olk5Oei%YBjB=FVI zhWmI>7XRlsI>Le+o|7*CJcQqT0`SWGQ%UMLk6K9|zvddaLWtpe zG=~Mq$eHISxYLj$!$`F{xpuPl)F*?2c$RR>V&DP*pe(Rfx`37CT$^O)NkXP?NMWjP z?dfPb8Iv+$x%`@hi!r&bRh=2fV9?HjAwbuDsVuimi*49!#=VZ=<=~f0JuhQ(+f-F* zQ)^R~#ig;ioLw~J=V%Ufiv@j%}x#Itm{Gc(1vDP zekAUV#!4Y#3>NDbZ?7j=(rXzKlHzp$kIpGqDY%yJ@)|;H=`n@a3Zmf9)_*z z`}~L82h1Eq=RW{TJkClI_ioUDyV|Gp$W>bc2ys49hJoKSHH?7u8*L_RaLIlTRcMKQ zf#icK&t@+zhZD%r{rz^N-Zf5 zrCg;yq-aT}D6q4X+oJ(SBJLfeW=2hrpzX;8;;TPjN8Bt!>H-&0_X@f zt<)yt=h+WATGC~dIS8d5JLcd_Uonpc(+ucZ%Q3I~0n~WUW7JAk3S^~gdMr@zc82+O zRax2stNma)0SYK0PQOs)>X!nDP8wQY4%dQ>)cDY`cZl+rIZ?$o1u6p>OVhfXWjQfEL&tfEQze&2%0$171}2jRs#Qdrkr5Lo>_H47wAmTGRyV zUXfv2I$vv5L_sZl0(sg)6DRpQK3MdKYq653Fq)(3+5fk1^ryQFnVE6VafFR!A%i5b zS!<9BABk;}t=5XVC5IRvMa)rskdQt+$3Pz@esh0EyZr}Ye1SZvqWA&^JfSzlkU2%} zH7i9?qIods9+n>fCx@nqqG`N*ceuU2H2Y>}R8&V*kxkF0r(3^{`=7hdeb*$%yq0H3 zD6X*}TUWFFD@H@_-g$1tb13mV>fsfP!c_Dq&y6AHi`h~#yQE4kTAyA_>cl*_0UX$y z*UukdANHhCRX2XLXRAGt*Nrch%R5s5c2C{dZJ`HUMgrdv zIZw-f#RUZZ3V=1W_}aoa{2JuVIF8siq9`hZP^_4O|_#u7)}%X-J{4a z3!MH6>hT;`uq@!_w%(B8k-bMFDN+vubPWp)pjh=gLIC~y?(TBhZH*!=X|e=DOztl& z9#TzQpe$^di|%3J_Pv2nrg|*OB9}c5;YD;-^Hj2^67$~qxF0ubOw4{S^1FULR}Q_} zBl8{rYVa9nk$9L5V|n4IB>xG*WfaYK{bJ?FQmdnWPu#2Tav}*S7CsW35axdf^o#n6 zvxMH&SBuliXI%wvdq9wd-f&JZ3*2XRLm_u^e%#I}+zGg3eCM15`qoJrJKp4B~-NQUE1g zU}xM)n2#Qa18QL1LETNc!#*zS2?FWpNqUl)MpPIE(i#`thm60|iKyTl%_tfIilt?a zu8@1MGxv~=g`80&(y68oEFZv(?)BdvU}>|5;WZUXmaiGz1ToDoyI-yiLz5#ok8RQ**C(FIM47z^6TJuZGZJ-$t%=^m5#?J5@B(R(y`?_5=yuzP zfg7L%`nzW(mR>JF&Ux^@Q#nof~hhDW8pY3 za_JaQ?*}MRy6!E(!|)3{0-gp7Lj(R8Wr!tj{la@hiOx_BH%7N2lwb)A9c)7z!T?Bz z=jG~0Am$l_onllNog{OCOB);^K|phZ;ZTDP;I<3(x(K0lT@1_mb#Yo2JBijM<1?&F zA)=L8M?2W6mSp<)=tita^*&>#=NVhfXMzMmLYCET%w2?A@Cx??hd zs7Y-y#jMLLkI#q+hbn|5*;mzRwmJt=BN!d9Tuxh3>TZK#$pprC&fL)|vz3b^F{aEI zLyPF(W1V5lVq0FKXc7}WS?R#fPa@_45>D#0lLq;pS*sQvWXgDYO|IN2XPl*=q@s4t zc^6!y;l(@HMSS1E{9FnSmkn{%0^4lo@4X82v4ZGabKOukw5?a`y%l!zjy!_JaFr^o z7k9bc1aBm2S^vC7Ns=r@s+($!F*YO^EiGh7mk|nN$_f?6F&G~jOi-`R1{3X&?E|9$ za?CbRu1ThtYO*}}3KV*0uOeLzTVrkLV8>pW8>-eS_=9wf$xebOXQ+0=Pjl2sXIQ;fYeQU$-8;Y(+R~79qBOk!(W2=9p)?60bxhOM}@O9bk?F%{9+_3oNwAVoNO5 zOS5tGVO8+xfiJ?B+tvK8e%R9-o4fzHV0( zZ5{gexh|VL5@p4h9nLvaPOOZ5TnYcsV<8b}k+Rt?Yk%qmwZDMeTXpLWbmdW*m+jJM z8TTfmmUC?t^=v4OI_w=9O(*jx6-8N++ZlF6yg@`zOiYT1w}`+cVlZKo2`3XVK;+T| z0UHDYzy#11Kp=n%5CEPM0KP>XabvAtC=V%JSu|9}GTP`oU5kjVkvg(~#-&tlS5lT= zPC-E_^c2@z@79OJP<|$?I_wXJS;Yz1rT1{&(V)z*(G`bRadZ#pG-AwF)n1uKc`&&c z?h|LYNR~9@^BS&fJsS!(+1A_H;E*H+xX}yZQRrF5KmVZ2!XA^5ACw25iDzgA2_TlKrV%mk; zYq*}%nzFIpv|wlEN)?EkutwO$`3hoY(W#jem9Rvljyu|fCr3E=?Ay^YMiGcN()_q= zn8jk6$*!WjpeY!5U)}cc%<>9F<*_nK%9~A_ik6h)zNMSQ!$~X%iDA~?h>cgI_1gmc zP6krGz^TKzI}mERa~x^uPW^BPQ0JVbFZvW67~>06N=j*Z&P-bMws@Po)$J*#Xi#Z) zP0>QB-wfRtH&N5K(xlVLnsbis_KTp)sf*Xeirn9|*98?lLx-I~(v1}NiXDSK&CK#l8w*^$E#d#awNNKPZIc3Zkl-G=O`Co!l@<0X7081Bx63AO(aJ2aa_N zfmIvE;V013wII*kHh`x2JiGe3UZA?AJU$X3Y#czq&Qrzz|DT#P;?Ue7 z$vqFO)vntHCbFGWLp2A%R1vd_4YgE}4%OXRwSqQGlG-ZMqMbMjb>d3C3QLrosX3EU zuBjjKN!)&+!VV8uM`PYoJ}|S35c;lIA{beW7kYy?yay>9`FHZUM-oSy!Nj5ME!nF> zi3mnTM&=s~;mqbC8shjIHpBSIh~G?26S=4R2!H?K;0Py!q2!886bKJ}zCL%n1AA2d zxl>N*J=HU?ZRAgK@)AMg;D7cWME_(aA!MRTQB36hJZuyC2a; zh?FE6;Ws)o(?;qLifE)nGNX&Py9a2SEuEw|8&HrGTA~C6j%o?XFedh}=gj3VDt~(x z^)WxP_L2LFeGol=44U14k)#EfAW>XR7SS37R(c38{p)H90o?z8Q_Xwtd++}l00hXa zoHqq%Z37O#jsmygVKoSXz!44{Qk6DQcJ2z5sw&XCLv7hdzn`CogF0n${@wK+zR+%@DC5wrm6$ zrV%sSI?0fxY&Qi?On*k9n}0@t(#vQYAV2_Y0sQ;$bN+iShNzr!iYcX($B<8y0V^O6 zr1qSekYD);JHP*@vqv2gp9YhTJ=d8_Ny|IJkEo{FV*4(Qu_``Mo{^1d$A_ufKd{_n zTN0>YgDN1&r6t!2NyaNB$IEPDxc7kcKW@nIDa>n&lRqtD$p>d99Wer zQ>)y}Zej^=P5{fhd)#TP%RN@P1UQK8c3f>?*th77c^8aqA)RzSV)}{wd(>3)VdYMhKO3G_|(d50TfgTJz%E@ zVLB<#2fXzFxgI`rN(+!PU?xxiIuSq(|NmS~XS(OL(oAJLV1VoLja&8)m_UHpdb|u% zOf+BC>h*;sqB375LWD@S<{n^r0EBc}$ zB1Vic#uy`_&fojlPqP}#%?$`n*pI1R+V4In0j2}AgkpmU3@9*Q2#jdOg5W8GRJg8w zpxfx_V~mA74VO*jK|HqF$$+E$fU6#Uk&-`>5YSwqV+adhiq=5n=@xw@$j|o_Re?tn*Zgn?85f&xX&Jt%DGES+)8kUh59XtjO|%{J8pV{~e!SE*R83>vY* z1yS;XV%t8DzYSgk1@O}#FV|{N96JRR_pShWYxgtDe6rUo+5fH|g6=PAFeYU^ITqzh z5Bln>eN3%6QXMnx<3d*_&+1O$nNWczjLcrOq@rBb5)@avY+s3J9 zg1|A@X*F9=zft8WKDj63Xin@2KS5YadAyG3xE_bYUClLl4Y zIB}vUbOJ^`(h&@Q?0{Ct5lp=iji?y{{;z-b=YH2`7<$lKy%MOe=XwHo2>0O*+>C2C zTHeK-+v%Nj;a!|MZW-I%*49_o;ibTQ%)*q5#5c0)s_Iio-D~GOpe33h!=mUx4Es|o znj_ntZ}~Cbto>Q;s~ za+48FVvjQ6z#vqj*G8ha#v$C8haEabQWOA;L%;mhyIqT7Yl1?-SRh*fwS{u>pschX z84k2e$;Dw>3=5Szx@Ix)l3DYIXiwvxxOt_$6Q_ZuagVKGc&1b@%~MKLp8BX@w)X5Y zL2yiiSysgCvMEY#4LVKUE%!#O3x)(Qp6LcQwH|xqWbsq;<5sS>gKK!?dQO~Kr!I3z zJ$Ghv>&we}q8ONW*FO=XQ@qfGs!LN>^D7)uYj({^k3w}iUx6Ah0KlVJY;#Kfdg7Kf ztF?{N*<{;u4z;zpNa~WT$*s-E3{G4H)-b5)@q9BOlK18I4rl@L!MW^P7mk@@cVe|U zO+bb`Fg23bmM$@LS}->y|MNEsSl_KmRoa4p$AF)1gY2F0B|)*r3n>g#;)7@eA?=_#XHU@(6MV zat(3;atd;U|F>MDS`q$!oI58xmP{}puo{Y`FmLBaMjsRWC*huY?GG2Y8Mqd>9JmZP z3mk_OLb8Faz;0tremMwFN|^9r0rUs*>6c=k`wH=^$+)SetFh4*^)9E-jBc9+kU1?j*F3}`h~+J| z)egvBh(j%L+zH63J!E*HIi2!hp#|+YEMGu;H5>cYf4KimCMrr5@OYE#ZMH=}<8pX! z5F#J|cG9Me|6khMc${w-z#RWc5MF;v!t2*UJdo~UBe8#9FmYv*8sh@Z@cXy^6Odl_ z5n%YOJq}g%6T5e#iMY9|HYZ=AZE@oG0s(5a^TYBgZpz-noOhoFsbp{AXo^F=_>)hQa4-5;dOb|=9Xzyhe+)5h^_to_87ij+UYsbdiV_r5P2 zC@dA&-yir3H@i@4hM8uWZI0wJ-$E8!@--{0wAxx*ZL{4DJMFUD9(x^<-v6Uh&IhOg z>Lo_Q>2!k05-TZ*H8g~JCSr4Qu|%S7X-Qg1P3+jA*tKhF&z^>T2ULd+X^tF;9lMmc za;53UQ;BDuu{`%&;sYP*_}u4~zVx-kcfOMtm1@^sRxML{jXX7JVy0O$b1hm} zXw}Y4hYprHbzQag^9GaK~|U0=}~vs1#*-sAFyrLO0>Lh0twy?zG5V4~RVkd5Xw$ zth|8kl`j1htEk|P{Usap&-|_|Yy`21X%Im;K|Eqs11HEX!BF>8L_UugEc{EeNr? z32HhfRN4M4FU*c9$Hf!mMY4XUVa(HK8GCY39|o*}XsP0J7wHv3H)kncOdFCY6EpD> zG2e?oi(dG~<6`w1FdX?7qhba2JKLgIAk+%~fm@zW`pCXFaq0TkvM&0|G<&RzHZe@`|?DTEWB1fm)9js5K z^zKlp=>1ssN)&e2Ylyf#D@PX%^yHE42`+AAx^CqzR?2wQ4G3~ZmVGk;yw;zh~9z7>WC;ER5-Tbq_ZdltYWDFa0;H3D++vrZUwQv6{%u4f^b zZYH=cf{n>-Vl|!nIN|LRt)fUu&CS?EY=Vlvdzr1eJA--_1c`O}@@(@huuz}hyr=7R z`6C(V8-xuqD+J4zbGeG>BbLjhh$@~6jNziNM?&jgVRs!Ho6f*;`!O)B!txX3{<=Yy6Tyv(hOA|Kx&nbeaQS5iQ# z!uK8LcvjC^0Y*YplBn80vEN_eq|?qg>yiba{%>wkFp*5(FpMmiUq?_CH2rAWH58oK zWSPplaoSNr8y&d`k7RR>DMka|NUCjNG-enKHbjh-MQ#QMinMcWuQ3}zva;IU>@cm` zvSA*A{H6qYlqixF>|2J4lyh-CoF1x?@*>8+TNhoZ%w_f?rSU_|DI|DoL#L zkqFh0*f9vl?;`g7%j%20@B7}e;&F{9uIyNth0uyXknpP@@{5fwI4sVR#97@ zGgQ|XX2$d)EXerj)8LD2879g~6k%H~4jpY;_*skLY{F20!8srW7I+bNXQ-u&bA$^`kt5bhywBV$RS^*{^r96` z4-PZO_CNT*!99~aVd2+cQ4dAhzI*`~0x(;N`lu_@skKJGWgL5{hc zD^aRUg-RW|Ofra1?z-nbKaEL*qndp;fSKGhystU*w+_qzDpGQkZ zRW>7@+U}ftru))7csU-3>)4T4DQ5N|1rjakBIOC8CsLr}$YTd1HP+#L@HADT#Y)%U zY*bC=_`?Qdf;j<~toLyxPT#$pHDEs(k(?^_&E0hnY;@0x`&g#{+FyOc-obt`D3Dkk z@0y8~7Aq8UM@PxQuiq5reH#K*=JRP~1+ZFpJF~!z%mwa&tpkK5DjY!c*TU5zvk`?4 z-fZFnob1cciUm_PrSk-}y&Bzn!Mq8@RGzq%;~Lp{EpgSt5l~apt+)On;a_}otWBmIAlJV}w zN%HB9MTi+UiwTnU+#q8!*Hcq%r!$}sSP--pyiFdAG-qP#^BQ=oww@XsuvXiXdMITT zXUqf4jM2BzVm6urOQ@n5MvY6DFjjV4mxvupJRr*xF1N17v9hsAUaL=S#!Q&xrWe$M zSJ|+&W9D+3qr8NCDI|B4S^t&=MVF zBt;}_FTt_9lnR9Wp-jDhIDHuL&?$}es=0s`k#0)CxOco_Uo2^JgG^?Nm-T>tmKPf^ z-xPYFqA;u=tDYnYls#ZFg% z++Hnyw&{`J(SowdQ4eW>sGo+87UyWLd&Mv1T-`mjs8Hgn(1q*7|cdPU}ErNR*LJ{3&3uP^wm*g%KMwRqWK~h!Yj9iz*ZNFzqVL zo>t580qz9$2|_Rv4gq>j{h@URVn<+NzTg7{Yoq!N)c~Xol!{}BkOxbUpx+YpqT%J5 zTtkz1pDo1ZeIH6}_>?Cmj;tMq(2+ySRAPnD+FGIH-OO6DAHTJ z7G(VNIp8Vlv9+a&VrON!lhDzMg`c$)Du==3W6%N|0|Q>b-7!Tv06+uifYbbz6Ebs) zE$b_UMjylma&o*C=g4g_IpKswSFfS^c^*$08+pDnijuJs)uM+0V+i6l3Oa!tGPnx7 zNCB?2mQYq9RfXVn1R*t0HQR!gHce-?t}7z-#EhzCUD9-Qbv3bupR47A#MYUli5EXX z3Mr_Fz1Xl)$7nbghjONcf+!oQFi$*HQ7_nT}IhJU~JN;d?6A=Lq>C~92=4Nq|Hz! zx|T;tqkZCT5ChsnPg|c`z?6b6*>X~vnoy!7wurWRSp?bGIAn1MHsdKc2Csm~D)~7@ z;m&uI@`lw4Oy101^hvT@_1UH}o-Q#T`V>4_MM-rUyVi7gj%rwak=$(*U|fVP6t>YE z8Xe;>rpjAHQ|l*6NOd){p`^i8WG7sBVqW4$2e9fWmyoX`RHk^0kb19Bgmbz|JSYeR z#~?Ho2rx-SR!>G%qunS5+urc}Bh8cf0#6e#8afgkIRCsj{N(gq%2EdMZI?f7y_r)f+SJUqUf9y*=;<7E;nZpW+(VNxQmIN9W*eHR z)(l3iNvcW=<2u+n0f7$nOx{;{bjetGoRIWRqd`olQ7K{M{7A_Jw`t7H$AXUY}E(rEo2Bz0~~2dHyv!}!p<=gMKESu(xzB= zUB=0=zlmzHWHviUjHf6@BzGY29y7wif+vtLwh;!Q5ZHL_b4mO1H5Etz)5~5X;mq|@ zVV%quqmJNmSjs5=SA!iKKoV)l1hQIOg2f6nWl-IK^*LalVh!KC=taLl8z9T@8-Idvv<&!ZuGx=LbT4oS zH`71Q2T+b;TPx-+eKt;Vcpjlt%cKB@_sD*0VK?vRJ79Tp+|Q=BYR~E^>-B-Qjv8PK zG)co|_}LqrhUdsney~kIK&aZdGBTv+->i+rhv0=fm(m)w`;Zk5?U_bXFyN}|cb{sA zg#yR&BT$!&EfX=|Lrp}t)|*F&{aL|tWa_ z$7V9xK4*#&xkI`Ak_LkRGnJ<%GPQN=#C3aadC5`H5nDQR z<;lyF+`M2bYa3fQaOv^OGZ*}cXRVfznSB=?g*&$}rlO{yJ?AnUu7A9gp`c-4*O~j* zFrf?P;?CT0>Mn5LSF^rQPwK?2=jP$*yvlkk_WXfbP*sD4ek6TES6zh#%>AEDc{|0t zKGMF`T9Su}F3%QJVy-X_xXiK9kyhZ8qF?V^rAJ@x-wU4B0o={I2c-*^47RH>gT{S7eCAcH};a1KpV*$(Cf9Niq^ft2+}(UMjxN-!i6|Zibm= znQe}_=9%xL*WP&Ro%cRu2_hmAA|nc-A{sJ4bYzGa$XYHKvhk*ZM~C96und24K_Drj zA|}F0K$fyD{$R%I(QATY3-#PA0?fBolaXZaR!#%4?g0A)01B@LH)& z^V$b?2#5i!>MScv$WCQ@NkpCn*{UcZu);=6Y_ReGLLxhDy6E!B^*d1I@g`3j&xkTq z`p^95%0f5Lp&UJkLO4ed!VnG^Lh0eRoks&Fpna=!JAcpwhDH?3!`w45M?ENbXXtR9 zMi~vk#p^Z_F4-XlI8|gL0$If7T3ALaErZy-R%*+Tx+ePRirSERJ|jnkk*Wl358_Ue z5Q@kzP*847+Wy8ZKbs&~#sKn8NacYZ z1t{$@2uf8kz}vMJ*RmtTNMW!G32?wSpr(WzET zuSv5OtvZ~F1*iRT*g;Rd^vtVRYNEHMjB&$nJHpXdbAFm=OQifs3A-a>ld*2vZkrtr z>q!bu&`2tsrNHA0)K%4l9FdW}f!NT0#!~B8Cnclcp+*pY0n`Eo3lT0(v>36{B}B+hni zBiizLc{lbGgeDRlg1*oJktuDDfytVW5;83t-%@`O2 za_Jp?uUGPF(?>r_QxLCR%L6 z2pDWZ0=A1`K??N2_doLVsvbq1tzL^VJ0UZF{Mw0%N$~ln#O)*J{nb6_=C=8JvVgqy@bhAw`byG?qjR$|`42eruiHS zLM^3QBjQPlf*dL;=x0$`xQXnDkwKojREpF`_97!Lk;-lTXVi1j?~|t^7YOgDPB@q0V+J!VDBFf)u5Wwr@_Ms zO?@F1wK5HC*(K=#(29E`qI0E)Yd1%3K})5m{Oho&*$5-6D7{xajg?Dgwn($2lQDLZ zU~d*tb^<1;SM}PMbh8tq;+MovvXE&f^DAp#K^w^c(k8ceqF!CK-bQTr0xjiZ*a7Ia z%q0Bdp-xdb{VWEg&kTDEw3>^ZQN1v@C%MZpLKdnnjP!2t>mQE-G(m;%+_3bV0+UV(-- zMWaIvlFjLWjn82*JQ*+bXUhUW2Ys2>xT3(k}qOvKZ6%`dW_WW}($kF!-iRk{$5o?L*(S9M4fPTOCZ>XG-wa)m5*9_t zqKd^#%@S4>uLbr7b520RzoPrm;OHeqf~(c)K>dM3m1ML*$|ijnJtWXNX>p#6SFS{* zVsw4^N}%Y7gfwl@*86zYg=P0{t-nki;L)Rd+6UUk3?B%Tta-STpt39(sDg9H?8N8$^tFsw^0#^c6S-4km?AvT)c;a0nYorkdZkRM+4gU7nTQ{CXX zZt$W3t{%e8Lw-m7;-hZyS-1GATYPJPkB9K}@R;Ax$Z9CJV@1(d#NpN4d*eT% zj0Fg)|MMsyO90B9Kn4Tt9|H6^v;Z1i3pDr;7;zH_0Hr>RA#f-lcDfw7On6qI(9y?p z64l25m8HI?^QI3`63X{bE|7{P9NQ3;&uQtiM=rqCliKmscl4#DqANs!e0WZ~vigq| z!T0z4ioxgEiD9J&rFG#tBZyYv3|p2qVy?BR4WRWXgs#tBC2fp!c7Z5h$un}@+MzUQU3V0SCm~21`Rm1yA|#pNztz z!#G$!#>cG*qbx`rUwk=o9VPTgmgB3>N4-0c*aM-XqfbXk2SAfIpyC3vB3#HU7)wqq zMbenlDTJK6>KRbw_Lno9kL%&`cGwIdP#qV-$Os$FR&oDe1@lKHW5h#AL(L+ibY^b{ zsrBbWOr%C%miL?@bQ7-axgM|WpEpq_Z<;st_^6kVzRu-)y&8*?n5eoxO`7;js-zf| z2-{2*j!hF^0)fS@K@6NHkU$8}5%)j$>(mT&D1gB%>lY-A;W&AMQ!);q1^*T;a8pVx zoUOS*p-|c&!U^Z(lJNLy72Qkjz+1mYo-|IEi36Q3IpK zb5l|_C(#vCcE3-aS$=v7%-_O>ogcTza09Ap?G}PTg&IT9U_&sRQ$cQY4=Y2^V2DA4 z{Vf~v4%`L0lw&H$g^yX-(s&n)Eb<1rCg4PFi@ybiOEB}W;mU^#9IPRUkJLI|%}k39 z4eJ=3T}~cRzlie+G=gl%YZG0yZkAVM-TohpE+{OFJb^*!n@(5sU6igar0{oYH|wV$ zV)@DpT}7&Cqy+&ez4GoprSEG*TJZ2_iaN>1>0%X1?ApxmB9iWi=#L7)0DrdrW`&xl zai|}cwPn%}jKnVE!ixxR)U-vcS`aAE0Sb=$Z#QXa;K*a2`h99dE;stFnj%S})7@4b zgN8LPU5RO$pflaK7lNN`*+w;r;KafSj^d|X(zs+K%iX^N-6yHYbwZGp9@>O$XBKKA)!&!)0Q5|P1nAzbPe-4(uvEo0UA+_l^)=8R;Q4kTO?G| z>@plXnbkm+0zJ{EQ;?eVmaJBCVnQ&q(LL0fjFZ%*+q(jSOncb0t;_NKomT^HtvG83 z1Dxb8@i*Jz0pdu0IP=SQa+_T`kKm{J!a2TeBH#r$(a9x3tB?qjrd66Vk#lA3Y;A71 ztX{u{>dXf9iu^C&N=e8|HA~vad(p}x6Y*Q%$i3TVZ@9SN$R#Idq1e&%0hQ8et#YZ0e$?JBrr2*QHt%XEXZd zCD3I3e087BUEtXsu5;SJ293sE4=&ur$;EGxYBRy(CX|n!L1B3ZNy_^7T9{Jw4B%`BA1HBfxACFiDI;A#w&dx*i&9Xb~w`JCAUFab?rVMZqyB zTNzRXC5nA&pq?P2Z$4z0as_pY>HTM%)@vA#7Lj03jk<};`YJ9&qHtPxOks*EZX^LI zYlMdw7W&9z<2JOg&l-}U%MdWv&Enea$6zh^y=o8AKIyuj5tNIt$66?4Bnxy9b9!Tv z+2?0?R0Z0v*F>~LEK;eHRmjo$C(deG$*eeb42Zys_Vf<(axXszYPdi%Y_AVPA)8v^^a zFA#tK>#>kmww2_Br8#bblOs}617A@I4TAU)Pm$tDh{{zzFgFbws)-mihpN*F6G7OW z^W2p!SDA~9LVk~dY}=9M&7f%`>Y$C-mE^2w%Z4jR7GN$WcfjsD`o7di5|T_sJvhT9 zV$D3|lCmQ{MlM1|{C!c?W9}CtLV^COP<4Rc>|xx4#MNEp?p{;?TU&kW&N65=y~oM5 zJ9tnJ=mf4R&r*o`tw_H%&nir@|GsGB_mS=`lG%yGNJjrT7m4V5(HF>(Ynkd)t3tmZBhg*N@RFV>M`-Y+*fshKI9!ZnUo)i zgOL<(EO&sw^t>Ev%5P*(G{Ow1#R6}F$hwscth6mQ22OP$ioC?8vujJzh+Z9K8n1}B z)+D3PCy&=&?v`qd;*ohKW5sNaI!ST8kVWZ}?H-oklQp!;;%*gOLWn~ z>q|qf{aC4|fK1+C_X+1X$&Sm^krWN!t}WOpxEcB;?l!X6KgeSKcK$8+cWJjWD9H_l zau${$Xd70+d{&PU!)JBLu`6r4BuI$TL?jhGM4FVhL=9BZ^#{Y~BdT~jDU)T~CI`aO z_f-GMzRe*tFu*n|Ga+!~Ef7vKQd3D}c3xdbUO?-aQ!_7vZg;Om<7wp+XX{WxzF2;J zLm(%%cHp%34R5_mHN7LJdg%+VQYuD(gb^;q5kZa>EL*&-{{`^WFQp2CX#znZ`eN{m z9zuCC_zf5qT<^e6i&DU z%T1o|KPY}sP5GOK6M{B%L;p<{j{q|bJo*=v9|Cr6$R&4+vpL;uN)N{}vEbJe z!E(-;)rGWpx+nAZJjvWTJ>0Rsak#Ca)oAcXkeeTNIW2GgzEszTgeG$bpsrk$%YpPG zIECMRN&ywe%gZ-{zbS;=1%vF$$Mn_9=$x94i_i~Ih|RSm0})ZJgd-}j(0Vv*d&$Ai znhwtK^M`u!EsHPKS?KJTy#_J=J2d)9@iU*oVtVkwAIt~WXYxOo?!R7UX!s&(R04_3 zD^I=@$v@FOZnUZ0E(QG5XH_??OKYA&ZV?Z@15@FU0W0frH(#CsQy)fWlJ{%F5oI2U07;il?UR` zp3TFgCzIoNk*0_9C%d<;G~GVaH}_yf`SI7sRNpl^(^2a7=CDg?raz5!AsXKZcA4r( zCy~~x?-(-VWA{N^_f@~zD6Pn&qW4g@--AZqLp=+F#WqFqELa{H{Tcn@tI+6cWXxnF zPeISyn~h53QxsdWgK^C5R2YELwks1ed<{i5*ymH2}!j4!e$zQjkE;S)#46AtG z%d~{00B!EphTluu$R%0n2pTg?-PdK&CJMIN2W+x3%n{dIVzR{9aVeaGrtXHQ$8oG5>B zQvN)#gj>v0X!T%S(^HeE_B=Jew=+Mdlzl3z6|BDWLH%wwV)PONxo@nZ$}<^ZV3tndcxE!nU`dU&!uDGF*W*a2y$9yjzh5%w=x8o(II zs#k*)k;FkfNJ`!C?uSEr>+yv+89LF21<%J<+p3KZ>dx)UPB|{iQkcn7yWM^G0yh5OLTC$t(_ZMK9zWG3`Q&l z8tvwA?@J`~D2cDOV)~^kOpQk||1}vCFQe_6ZNY|Lnbo+(ET=;pNM;8zriMM^nFuek z%(^rgDvqoOo8XRaFX=KdUVlbtRz zw-%#csyu~`z7~~k2z1FWP9y`;Ae$GI1H8$0m&v(QO|r)|GBa7P46Uv8G$UFarsq^m z7L97Uu&Y9=Y3Mf#u235OVchWVEn2)HPEeGK+14=7+LrB0+a!Bdr4thV+uY|paS6BV zBDP5rhv;eboBK3~=}MBV=?A)UEdALSjC64X48H{h z^Ot*9v-rD&Whhr{9EJhCifK|w%TfH18GL@rYEorl#cCS&v(yZQ_1f-=B>{bVnE81G z;o`G=PhsRL83NB69ERfO%$2D$vsC6U`%!aO#`MUqMODQwG;`UFzttkzJ)TaaItS7gVSUFlNm)eUsOlAFy+VZz*)8bv(SLZqE+oa7T%qLU0%-Br zupVioSMbHd&jry9V~%(y-TLgD>n**-+g)5o3?h23H9b%MNd-VI9n>z5s>Na#})Rfu7X~lP&uau;-Be4bi%YIx7pPm zcZv>;w#7LAkL^)7lYYCVxpwjq5_*&zeHPPf+eCP1ye+{yjDBexUN|}LYDdA0*gDON zG@D?1ZOUr~>OYMNP)4*LNgktV_tfqt)EoO;GAVYCilOiHolCO~-sS-IymUAfvI(u6h|1Q7=_;OkcziiHtN8<#8tu+B`%O}MJh*jVY3YUIPifCnSxjG8tOmxI z&X(%~^9dcG(5en#w!A?CQJ z&z!Eki@1TCc z8rj;>Rk%1{f>`)qh95D-y?*KXB=#``#9wRsy(&KQA^$!sPIPf^V&pTIm0cc_UUqqP zLipz0Ngen8pBH`B=VzPB)pWaA$b4PXhYv$M?lnrccmtDmLSFB6>q7ctJe#!pS~SgB zh`R$^bPGBh(mGb1a^>8W1ddzgAr<>pb9e*XQlt*_|2a{f%A*={P&Ks@`fYDXA?z%4 z*ECqE;L4)*UKXZ$X=NVER+W`lY-qbtFKGgmm26rHh8%btYr@?;1GYPze-$c-^_OcX zl()n1*$zhC zJ0$W?d>v4l24&%^Y^XRx_9Tc5>BnCI7NS7@mIz1Wdf5Y+#(eZ zk2pfANWIje9DlK{Ue2yDP{N+7)9VBE;fbyzkFCH#^Bj_ z!fJ#x}RXSiv4_8MYm=Dykv~-0ts$V{BHZ?T@ z?c)l!Cd)?H(@MjRJfA zcX{2NeY=R4J1Z~KJ#a(VBLChl00d|oHQ+&>c|N#+lU{=kE~vavCo%fME~RLE+?CLr zdBzv=$ayop{+8CvSnsg;z3sE<=6yor5JwTtmA0w%9>kz2++XVztu${cF!=pRCWPP)0U zCq$H!iMvU-%FEAS>i#=ExQ=0^(UeTy`T4e7@}YUeA{N3wUAr@jj5f$!OaqhR5-9{D zeRhxKE~dw+YRIbC8we_~j)^|2Znhd}qaH&OkWA+3X|raUy@Iv=*Pn@|te~=vNRC8k z%D4!p-0!MgepcOBPi5(i3WMl@Qd1R37xJ4NEp??+<&}w4ms0Czl%7?KXw(Fx7eb~o z6?Q^>y%yJbkyMYrhOfF)ODqM-YrD}UlNHQ6R{?<&@E!&0Sx|2X;=Ng@JP5bc%zouY z#jLQH)f6}a^)wQh=XhL}#Yq#oxr&$GV3F_8*i7_)8q6o4v5Lx@0v^L=W7O-^cD;!| zkuU?o^=q;?Qri>T_^9`Y3Th>i6e!;D;X!|w&D`lK;S%&!I7S~v)0t&Ke96PsHXhL;|tq``12XlZo=*NNi(cA_g?MWe!vJr`oy2syw$1 zKl=TwZuo`u@SNr0>>~eHrYD`Y+k}fVADlBkXsf=d6Fl1p_2}z%w!Vqs=S`$gkCy-J zK#P{Rz6~%8txaUV;swtRuN<*({no8oJs)nCbBM~+Rb1AHq%J%NVOv&GXW2A$ad*FT0d;<#@mqv%>A&`SFjX`@wis>dQC2AgNC3+^tvpkBX4VagJEcG zBK@5qetr0&L!qyk2b9&X3@)tkYAB_s`u77%!BvYXh5k@WqoNFnd;$wY9>W!7NCF?~ z$(1yv4`XR~$nULY!M9W1%Y()H(x3IgV&4`5=jzHH5TOBB!ij+MtluDZ=eDmvD zh<3f+9)`tlgS5Ay!E8Y@7Ztk(3Hv+g8fZWX)+*o`h^HqV%1MI`A!-Lk7C7_?kOt{y zz}9Jyb{a7}ju_68+#d~f=^0=qfw_!ne>!g8j1P`^{d#A1r~_8ECsw+<3!<^=wI7?Y zT$x!Y#$!JBp`Bh8gVyYo$d{Gvj+X5%Fq4Zln(tLe3RlixU>krkE;~Zsb`Pcd4rF}? zseRnhpjMF70$zY2Fx{XTw;NIc(j8V+7{JMo?4~3fpMO{xWfhXbVr%BMU zhwc$9r2uJ_MSW0LPbMPwvFl?l0 zWxKY*5&;q+?cQ4@??^M?i7lnO$b!m`UUM}Yf0loaHT#o;Hcc!yn`_cdDgO%4u8HOf zii?MM@pDB3Th3yVj%mtN!Sg&^!Z}Hq7DVD_iv|jci9c+Kpxfa{SrtH0cLu7X5&CdZ zmH!VVw>b-eFg=C_&n^z@K`E#|Jk3WSNpk)_^wS>|<H_WnAiL5+w$OnUv`0nC&ES>=mRLgdT}z+-y??Y6);(%bj@GX=SVd*d(u_4vyC#enZ{(#$!~(cUchyG0lY>Fgn!o_k+kB;Yd8Ntk8u zDoQ0?;y~sahVGkOv;N|wX+F`Som*>;24lFgKo_}l^r2+>YX8a=KYnxgA`t)X-P-S3 zYYa^r0hQxs@p2G5SmOyN{YqHnJ1peUL`433qfRK?vKA6`?( zpj(3V>N?klWaRj|aUr25iXHUf9TQO*+Bn_B^H$e!%(GhFJgTJP*o*42|G1tw_ln5S?+j)v zVxI1#ntd3B-1Io_lXcsg%d0p)Tz_GTP+s+N2W#1H+Z?W~p`dGPuHy6UaJaVygYIq1 z#e5oNw_M(DG|KzBnsizbZ|YOxP5qre12x*l;Et*~;xjVoX;NjVsYRi;29g0O-D763 zCvUBL}~ zuThe&$S5l8tK9bys_RJv4my4*Uuo%~NuqSgO0ebQHGz^F4I8Hiime>jB8a)>ichm< zjJUXM@l@f7fo79ZQ15cGc*5vAvZVGCh&PSuUUl`U_K9^{XU8(ubDNSuSHi6xc)t4- zc(Kj`*w#LJh_KlQaeM1qhGG6JXw0On!D3YxE&(#0Ju0+&(L$LeQ`gj?<8w`qy+UCp zNyTNa|DY>ZG;pbW?b}-fB8fFgX=*i!csiGf#mALaU45AU;rmExWgyNEJ5s1h$fEi} z+zba<`)n%+ac9{eQc(+F_ueTH|sCnf0S6;NdprYsM?osQ? z(NvEIx$vm#eHLCS$CG*QvvKn&HHy!x$}}Zte3iRPgq@Rj88Z^l@)OHG+n^MY%I`w2 z{|Q1|`CU%9py1=1Dz{-EJ}h?TcC4=giN`+7cuT zR}UI^pGt9m_PxC>q+RkudPUV0pZIJk8;+gW~Y7! zd%@`c4SAhe^m3;85j^QgK8)*Prp#spi$O+{)pk-eu5~@htK@7;t}ut zJyyW_`_c)~-XCKHRIq~s4dUTp!1lYXz~|P@kJjBGD|CNe_N#ywD!8IsTaUWqfI=@j*DIb%zg0^v4tcA$&$F#G zrzrTYrW>RQEZ`JY6)p>z8qo6kLLLd!A}vlV`E%^71O^yP51@fXH3wW;(th=ESj^=x zNeZ#2_#5!W@#PH^N)$)^8jl)!%)Wq3rO*Y=F_kW=7IDj?@s_{hw#{=}ekdMt^C1{W zZ>wasV`(td0P}1+Kru)h9yXDUs&+QtTm+wi!7gR^v6HsGh z{#4xW=y$L|T;vZJYvBN}mJbr4NV866z1~^AgU(v?y1iJ%f`R~~Nnksj8F#&{ekXNm z)#zYUz|oCb9KS{$9r`Rc=dYTwvqcrZvg9>Y05t6KTPYYs|5gcorRxu1(5C(jsBZwJ zcLyM^$PR3uw)!DoHU@QlxMjO`0P>1hZ%F-#95Dg^F}e9Mx#zLjm-;4y2tc`hP&_VM zrkLSb5mvE&E2{XInQ6}oO{;WR4$4Kgz#xv9vPyMhW%<4MGBtyo%n1M|um4i;|EAEX z5~LAi;;U3-^9$yXDae&YBv@P6-rsxqGHq-Sd_UAj>$S!6`&vI91aP>NQh^g>{SL*15ZUv>orUGRba}X_b=FS&qsFo@kNUCX?PV z9xjuLzPF|WEE`w!tIu@>xNea_XxtZ1H#;+_Yk?YiJ0UrNkagPdhkB2WXEz*py@TDg&u0q!m>F=diZcj6J{VUzMcn!IZW?Y*Q&Zq}l|dLO={PAV4hO zZc~`O;@UTTqK8S&iQA5=X>+D~A>m?v0{e2 zXc_>6ZCPOq29_9YFtgX>^ZYPt84XYqmgTs0qqqaSEKW`wqyQALzM}wef}0!yf&1rW zUw)8pfB3>sTpMg|G*%$3=HiafiH_qeNuu#WW=WrdSaFV!+ha49MqbY7SDMPNa2i=@ zN{RX6-Qs6<^4{n7k+&wrNNN*iRVk$y>#;EMkT?Y^!Zv)jcGC#aY@0#UqT11Q_vPL9 z==a4n>Z_swq^Uwm&vDk{Q{gm5IF3mhk4+%*33D?_$xMWvE)-Kltb~T{`j{+B>KITA zXfKKaZJK{|!D7}j+c3`J$oJKr;{?HA;u2=6g&dh$zU<5l=%JW$X>)c2Qg zE)iihbnhD7Y!F-LLIv!9D1ZDj&o+Q%*^psg)_UF4WNV0cFi4joc1@T6Dz(A<=SX(pL9B}wVIX& zy}UrN-8i}hz#5ZgOVi<@YrAGrd@co~A_3nH7 z`{Fix%D_ECE8b=Kc19Lwn$e9aw0XLYIVYW@8$%2 zhtX*xR-AkEk~2CvP``}sdA}IYfedBIfq2a}i)T+yC*X^hPw$`IpPrl^76E8p!H0X9MoGh^tUg6KuNw$@jiL2iunAl+~Kf#2on zuc7!G`Af>XunuU^Uk)=uOV+>s@8xEvKbxzw>gK0ZEHtrfjIi*h4s4;p{)>fStBV&O*1*uh40F-DECI1 zrdw(GZ2khoMFv$FgqiU>cTCkVS;QjqjBf1>z9b}=`jyfeP5X^Y&jRsg$R*(nefN$&_R00 zT9pTKF)?qMr)Qz81t{qhx59wn^hgPt7=SUH>)Z}E{h)1YbhCxy6o#{;Y=iP(;~D7? z<1F663(o8nZB?pYEMAkaHYlUbAV#m4+8y!<9Dt_rp4z#XgOR{j z#h`D_TU@$5bk}Y@-VB+0WlkHrZLLRc!kB%}L@>2q=Ms>reFBWh6f0Wvg8o9GivgHm z%}-=5)BWeYtqa+EQW`l;0YUOHMWV4F<5;u+=5b!kQf(5;%(>v8H-DnU7cOL87w-m7%mn7F|UUa6z4h1M?^2Cg#bjYyHZ8h?R&(@ zj2%W&g~&{Z)Ubqup85Exr*HnDEuq<&i)TLf_=UqB?PpQ!*CIiA*H?&VJyy#p=x|){ z5Ej#la9Er6o2!%t5uCrf>!GJeEsFPGHWAsYsu-@&g0PlQaIHr@pg_#ZCgun~oTRHU z0hQQbvJ{Ych(k1ubU@JL5|J5OR4iE}M@_s|aGyy5`gk9kYly51P(LoID~ddExGoh? zEE9fp&$MEEm3?1+_0A0dJm8H+6too9Ad@ry890AQp($>4P_C2wcM%0 zL2KZ_xomzq>b>6e7A+cW&0-HlxU5lw0xmSu*n-mh=c2|(trGFydXblRs^x%a4NcKg zA$J>*yy9nMnYLL6&*EsZCU7&}dsb=oGsp9627NCZb@One1V>BCAK+aMaw;ii2Sr0wWVv2AZ(gVrwP3$zA8;y&a_gxv1gh0z8f7k zkq15BjB-yqJ|R+KjWpBdOqw@!7lUbx-QUgae96af^V1YE5j30(dZ>%;R_ib)9+>Q9 z&lg?GmYA{_e~LR7_B99(dIKQUNNJW8zbrDwH1Y8XV8XJOeosVlMBOmfwr=mg3pvjw z(jH}2ZQWV0*N@`Z`baYkIMWGR6(F3});5{nCcUE+OL}g0PyIcmw1Nc-Lcnw znJ>y%&sTNouu$T~TS(av%?j z&5IjmUCxqW@-X{6_^=%)=<~vUI?rbeseaI^kM_MC@HVE;!d68gzpfw1!zbUv*1n4m zQ@7Da4?e^MVH*&c024H|gs%~xg3WFuU0oDMPTfPfH+h{TH46m}nl!~lg z$UEIC;PbHdCBIY0O2~sS>*`&%UU#?M&DyTb9_SYPrGQ{C0l1_@rg-1jyzfQ>)GRSC zolT>oC7|fg0sZhbdh9MGv|T)}dPB zi{FR^Z=OFrmHDr=&kDqHWzf+w2z7`#Atk8i}n&*cb5$O;7@YOJ)I7kwCJ>V}ur zTBF-|8?Ntl%PMJ4#NA6Ya#IFSimd8s=Ru_f&^b=g{T6MTW$m#&WKC8N_K){wh7zu7 z>L%h}QpZ*^PB;WE1c(d=Gp*0}2k2XF{XejrGG@-2`YpwLC2$TIOHsq=z@2_ELWc^< z$bgq0m$e)@c<%(@Z&Y#~yXG|#@b&i}t<7}`j3Cn@HHptRWYn|GpN<_frc;u*0;t$_ zn7DCs{$QdynXz8%J&;Ze&i_l`yW+xPqg59FEw$AtbMML@059-V{sQpFufHVOYd?wv zNE~BBTLU}<&_?SR$HS7`FSSDJn)9UC+9W?f;QpUfPXxB-e|c(WMf8_MesVqHq1V z{8;Ln-RFehwXnnqHN#(+;BoFen|ilHtGWO;iv|v(TLVfwu1=Fwj2BG!@2Sn(yzof;)~q1UbB zL*(@uk@3hQ&z3Qep;qB?%86x0G1hFQfLCRvsBi~3Yr0dR6$gwYdc3#h8V+52IXWlw zs@or|iP)EF=kwR$N=90{5NH(yqpSe|9-BpG*|%SAx*7TgiIR8XS1 zY-!SNx26btS-4*i)uQb{Qx%HsDcdq>uAbI;p~#jlGO~)&h_fUI9rTDq`@Jm+RO1RN z%`%p-c)uI=q!Q(DGXpY{krRnxM#`E}S$cL6STT|>PmA)Dg0<((T>@YqSrW5nb2-}u z>Cy8!I(2Ev;m?62v6p5g7VB29$d3gt2%{5exC}7V~y`*$jm2H_Wd?y_GN z6BtadCkP;Zjmczw!x5bDDr#UE@cFJ&ArPmcFNenpQ(gX@@?Lj<(Ts!4bR?^WT8L*^ z)D_ut3UG0n(B8{*fjTU$w-Y7SmV-_XiDCIR5_@}}+^3W*^%Gk0fW|{I!z&1dso3D# zdAc`v_*J%ubz!#f4iPSNo0d{{p8=mfJiCAM3QzGwceW@=EDwV=d30;V!bOVG)a_WE zQ(5~g-BRu~=V)fjx(43A)cbme3MG$j6U}5IIYJzARR6V21UnU(jh&|b-JOFW(kB;N zgq>(zg0|VwD#@`krqS8#{&_Qh*zik3DnDG%_D9UHD*s|HX_?mOWO!t65J-wt#XYFH zjw0a7)B4Hvyx&?KRZ%H2gy`N%Gch*M7hg-dU?uUeaQj+^P^KDWltnHZ6bLV3X{4wY z2DvvrSdC-2!O(Zs4CKj<`jbY23PU&+AVZbfPulUW)M<=|7y6iIFHTalo_~mA@d~!| zGS@F{_!u&YtQz6ppaRe-<(p4P+wj1~4BnMQR+ZV^rLUoqIVm?PDF{ngR&P5T60IxX zf>9b0lDCP~%-=`)sXTQ=`t079K_%LTvSH8{4_33+`v*YZ>;jA95KhMkz#lo`xae?rRBTjbwWL$0A7yFKHi=$m6&pQW zc^1N0jmeT}v3mxKX!eP`cD9e1iU~=*PRsg+^Ho!AMqJBRrNx3_*xs#woJxW^m@LV^ zz!KegB)ePS*5-t$5nQC4Qi=heFol3mxFW#i6#!ni;L$`fkxec>C+pU)nP7;OOJ65J zJ`{ghEDpUuzh58#{DU+N|Lfa(OV~*HZ{cG61;B^9a4VJ3cl_L^_V*N)nCier8qJ*ASdAB}scNL9k4#ox=gLW2V-$ z=`JG?4-D{-qzl(rVK~<>Gf1>?k^%6ph9_4IKv;_Mph;o%s9q!-ZA& z|5s{o&oI0S;nW=Ofx-O<=-w@Sn4uwhVj^0Eg42T;%Fz^Q7TG`!%8-Kg=!dzeM3L;l zG-jdzBd`R6(0jJj)VbTGTU_OZ5e2fCLS|6+bh$5`qD$}4!gnD@@l_`*-h@NY9H60!)!Dz?yO^l~n z^A_{wy7!Mt6oP4}1yP78vMek-S687DW$Hz%lkM~5XDX+n#oNG1iBCg>YuOe3K9?hB+U{) zfpc)uarrhVu+dbGoD_2Q5?_%MPC3nmD>v@WIP0AAJO~JbfrwZ!i3=_&aoIGRZ06}L zDH$)`d|Yu=scU@6DJZ?>7aY{eRH#%=r^-?xLRAa%O1K(&b!tV36eZeq^%^yW01aY7 zgjjJQLA->Jp;@99ZQ8Y3ro$FV-qA>wqF1Ukow|+GC0&M0S>D(~8w#Srkm1mf0W7jO zbTDS}FY(#GlNVN_WylyI=Gat(@mz4`TUlu72(7f1tBt%7KlIw`a9l(&mw8sezL79| z$vgZVHl8&j>kteeVX@PXh=z+TC_=L3QVC#yJ~oR7=E18AwGrDzfLJ=nyH;)!xK7Ii~Az=|wF>wh=DQOw4+O+q%54~+8z-}LSCpZmYYq7Lhy)~{YHXvCh(2XE=r%!joBTlx*RVR}rK9E+m ze3IkGgOXFh!+J^b-56%YC`;m9W)>-6B$d=~Dkf5rkqRVbj-)J(RKOG?9s!sI076m% zCIJ8>696G=fRHFX;$7^GV}t4NmB33Q?FjMOp8&0q>X)DIVZn+Dn~|G0HPAu~<)JTN z_i$xQdvUM>FWy|=+^o)%Lb5$o!04D$j(rbp&Ql0PC!ioGS8F@g2rf@co4KQe^O3-h zo3R+<6WwDQ&z9qz966f5!%2cT0X0F%0QLacAaLjMe26R_-yaImuZ@hHz91^JTCi3n z>W(@)d7VbvoO3p@b*3GAE$~TXuug z=G<_;g(m;*^vuD$Bi=**tzl( zVx83n#@YFUm8FrYN={cPZ=0S>6MRgFEGClZ@4tP?MPUck7hHvY4uGg%aN=;w7KHj< zzli?HHFN75TYxopH_x0A`fK(z^6GQvdbmTTytu_C)_y6yXfAF8L#Dg_g#J%|wPf^_@cfU@lZQ_0Fc+4DdA8)-=~%43IAo<6f*Q=d{EbUJ3TJaH-t8zDBbML`Z|a-)6Q;uTB0q8P!kq2jwVX~Fq*Urq&UPKqod2`CmrEQ7 z9zt@7qY2_^z-vJHkQ#mPFira*6*Wq!h!INrsJKxP2cl}o>X`+JvJ?`dDTGT|$*eps z8^b51zPO)XD}8^EcNTzV36GeP^q`2!vyUnnQzI*H0OnR;OhH{yF&2?9*TITytf|;W zj%XE?Fd8u6%H|kW{2h7`ZQcK0hr;Gq1CL|~A^Bb4vG&X4ps0{DS+RM>Wxg-M?v-V$ zT?70+U9U3&!;JK8Pkv z)at4yhyBm#fBHzWigjJ&+JE)?rS2}kseptAXLw-gh=--~Oi&2f9OY&+uj6(rCRj~U z5#40Jf3%{G*eMh|2|VFk-qhwTw7 zfB@?=)vv0$duA4vgy_GqhDyNiAwwm2IJeq`pw)_xXIzYgyz^P0P;qeaKdbi3@8h`% zb-h}#L6AUT<6t!-I=%Z-p;1MA}v+~ z7ZQvG1QLM(BnWF~cCi>NAbuttkrEv;^m7CRMM8o4F~*{CNJa15sr2uB+`0Qr>l7*% zW#!7pMQ0xVxp(?+V*#b#8uZ*c(FW>t{9|K*ML0#iH7E?zh~oKwmN}c9OWmb?y5+=y zLb#zzj6}xIroW`Cp;U=nVG_5((LF*U@q1QAdV~X>@2?;4tgRiu1$=J%?RTl{)*nCg z{f_4WCfY0(NRvv)QDGA`Q3xqyefz21*}Dm$@iC^>d<<<+l}G}B%ZqhUHI8+iDLfxn z(`H^Ds9P|=z+Q*JiMv~kpJvC2mt|DcgxUnycu<>!Wt59hIKHy@5+u}jquzW8{qEkD zL4pJc60FGda^3UZ6aV?Y-PrE;y&W@i)Ko=9MMOkI)gDX9fICwU4d7_^uYIjUHggA| zPTvPj@IXvqGOW#p!|OmXl0%q;w0_UbTy{%AmF)`vJieWg6?m!yxC_8hC{ivkP%y|O zR@xCLR8)?O7;z4bG-}t;#z0!*Wu`}tL>9S*l+lEA@vRPs;g2N*99HBw>V6MMwLq7H z!8KJ7eR5x13BH$mHY-R_fN9qVHoo}1F&giCBP`r^4_G(^FMWQE6|w<0(yfEcKxOrM zx{Lt|g%wv|$qXSv7eH{JbaEex8v%*4jyq_tMq917(qeUHnPQv~ z2B}e{M4oIG={iYZ5)QfDw~$R!2x;z1$mU6eJQ+FU{wSACrSd2^r7N~g3tbYrJ9fEQ z7CQ_!O-sMjkiLh8a9tO2b&Ki=!Fx$4)|RBM^dU^Wm6ap|3?$*9!zE?Y)%V)9QYTu` zi9V7+GhdK4X_rpvl5XjdUJ;~U24ql1q)+-M1VGP=NyByI9QLEL-~42?$*N0}>irEG&%+=^bID-e20(#LMgaq(DF7Dd|nM}O)!D?aOoeY>yrc_$s#qRIBh z8+&yx?fRax$D=7SZI5aWC-kTu(zdpuOo4wM_vno7(n)RZ$PRA*)-DVQm#L_baR??_ zB2$0rTYack`A@bfb-!-bt0?)sz}%?~SNIRnz`e zRV9^I*=6ZbmA-V6!1Or0jOAPEl9fk^OMvN>KrZ@~FL?)fS?7rNfrLfmS-2>YSOhy4 zYNrI0{$yaW27-njg+yQbO4f27gvVQs)SzG730AK_e$v%XU~IExpmD=je)SBE^H|Oq zp{{{a*V`DGmX>Bg-O*T?Ra{E}EroSgN^<4EBtEp8;?w+Y7a*n`TKMo|rkR-`Uz^@l z&e$XhV*@2YVJmZBWB*BS;wV_3DRQnz;i-c20AZRb3_&Pj+aE+>A!n)_52)XQkZ=kt z18D*R3e&887Dih>`wjPh&d2MBQ)}%yN~w&r6@c5LzdOS z#Ik9^h>3wA0fDE<8!;!>XY!oOktau1I3NxKshMv=MUG$z$Gtp(R|K;EIQV=MPea+o z_b~c~eCc=f>-taqfY%to`apl%MUm$v%qFxL5-vm-D5^6X^LY^xmC$(1M6`OY9gagL zK^u>1I1B^yixt50fM*PQiA4 zSZeNdX>slO&cDOU;_0C#`^WVGa>J2NM~)u8nogt;3><{@LIJ-t4HqTtJ>P`!XTh}2 z^VuxY-~JD(*e614MCW-J$G8N10A$j+*c8(d^|oQ#VHdeG&Qp5t3oXjm1W2=q?XefJ zAL59KU2+w23*x>>eDw|TqmBI4)}093+qBKHkY`Y)LQGG_>aD=G(l#fg#*y_Sd!Tyg zsOR0Mz0Y55V9wsf|Hb~21L_9}=_8R6UJ?^dnGo`AHkw@>n6SIeXY3Xu+(Lc_Y2iHt zLeyJb9BZS!y+z4c7hdGPN}lHjX)>rYa*M6ape|4QVB~3Hw^|~UN zWImrP6x_ukrBqAR>$FBA-E4YVZAPcV>JE8FW~|v+(cD~aeIu~9S2(z^uCJ}zTkZbd zc=(|7_-H;o*`J>sFCUp7f9(9^)15)fUnR=d#J<7yEwb;Bd{6NQ^q(ZSKiCzm{0^Bv z;LM;+V9i1X3$kC41K{MKsdC6+L5@HiMeR5`r-i?VNZ7`s*fqo8I&wEKxQW~?6S?i4 zAooF9F?xcRrwF_i{U#$}a}&HRF{yYo4j^zv9J~f(5!VQaa}EEvEIkQ4eorTXx z8aRwU=T8B^Mg*LIftKt;lxE|^6d!%FIRcE}$VKn%bpzjK9p&(RKR*L&0S^+4XV=f# ziCisQgEBtAvA(bVsb}66wnU5+ISMrUsmkhyiu#$#R7RQ9^J(|}pHfb#O((+f*c>FE zK$}WoHJ(Vbw}-CPJhN&GBG>GYdk@~LdCk&Wu#33cVFxnmj|pObgPFX%U_4J zv4>q;b|M@nM7;4`3jJo0kSW}mr0D{4`(FltL8}=kHKT~q{R6d z-A+kBrev4W9RL9;A|V0af>s(ItQ*d7xRAm(u%PbLpvswon5lYJ`{h&>|gLo;e8b6-J6`Q#+TfOZ&rGxw}k?>Z9lt zZe|E|=aq;hv3%VpKy?XQ7NgGpO(h`#&??Z`3RiigorYWKqsUH$O294$Qv-+$M!tA` z-9^!0jX1Xa z_Sxinjvz6MWo}AEfWRo5Iw~6a{Z^WsjoaY?7~J-G?292<*8puaQ!-r&~Oqj#P8~IRLMw88b+KC68MlF|eU- zTu~<%^1x2VA>@%-w|VVUH9EHL#Ds~)I7b5NDWzCjVNS<^au&K7*02ZFnkCL`_um*_ ztERM441rJ7a+E=T!q?cCK1#>v^YZ+qC-l$c`2e7y$*FhisNxAxr>3eE8bh-NXOa}4 z!*X`_0)h_RlT_S^b{NK_eI~s|Ru&o_P(PcF@WHCT+Q`%x8Oz8L(4+olFkdj z|JiU!O|y6(lD2YGShc7f4wvNBmSrnYowiEH9U~=&i*MNNiMvB-R)vMUTC~E+ZhAAJ zA1tQJP(yt-Wb@$&5>iqpmj|dq4a>&WB|`u)fB-*w4yUHV;VEzl zMv`I5NDzOWRym~;2&*YLXQ){GpArV+9vMZ(#xS$9xVbsP{5)%6fwH(LSz4j3u2R<4 zXq%hr);42jpLKoBxw+xp-U{ySNcZ=mhYuu=kFuvH<@s5C`AGK3Cz4M;#nyQ9CPlTW z9q$MBb!m0Eq3m<2A1V9>ep^@SBt|+G8*3+U7ltERfX&b)RJ;t2+s_I%Z21gG93TL; zX1<(XCG6(N0)q?cNx}5Q4jNLbgQbXDhkV~Pr5{QU7T@)%g6$B6`vN0#008A!udpXV zi0_0zdD+SciZ+K>yqo0N!s3CNYG5P-Osn65=uy_3;n~Y(U{-BlthvHDvgz6vv4g5} zl0LO>pSj0l0rgtEay*o#EV*S^UilPaQph)QZrishc;l^Br%wwwKv%q+$CuJnvkvhYS;1rp%)@Z@kGHUo6hWh%-;aO*)lR7HpjF zC~~wJU=eMG1DoRFG(6fm@@~;HsCt$3%y3ngbaI#SVxr4Ti$#`^kONi>#p|5r}z2gr)3a|Z}lU~x$ zkFHv>T9J?v>7<(qeB{I;aKae-02N_8!Wb;)qjp+araSBe3;|XIUNgE?S=TB<4j+S? z6rHfUETt8aotmU|KtNQ?fe*BWkWkDWCAVnK{A6EB57E&$$;KMh62dwrOIIITm2zog zirlm9>1(x0yDN}dnsWH?nM!JH$%s9c)DywqAltNI`MX`%=x9H3ZAD>`a1 zB|N)Yb!EEN+fFVr1I|)iMBSimN``_l&5)jUkt%X7Tze03UvSow-`S`pBUuMF2Bb7w z0eon4=-Y{muh5$kZV2#^C2kU#Blm9MBXBp$O;wQ=a5J)d<5DixW_z;~up+FRtfDp2 zf#l)36_-#bnv9GK>zyyXE4kcw#+Xd2<&w30&gI}COyn7yQZwQ|uDUXIy4QzV0|a^i zeq!oqh=wCVDioij7pvYF3XY6%0MH;^HaRM})X<1$7FakGJacj64=P>vD)uXO5G*)z zgtJz7F>FowBp^ei@QQp@jYLu$b_VQrLGj>}8Ix&4T?|vhc3wd{>mhs*@2z|*?(OHZ z+eE&!?Xdk0fKzSr?vJyOkSUPd)eV@vww|f1Gd$8}3QHExLO*X?rc$(N^}Ux*6GL#K zxZ;@!V%gLbWAg?%}!p~+MaNayk~qZu&oaI{Q3UO2oTT!N8IAAlu@2VF|(WCDv1_0ddpQZPR5 z0mlmpDn2Y>q$WER17|Y`W-rO^pk_jp<^hTqhR-zo0ah@X6ADuzX}&*-%Yq<>l80v@ zDj+Eajg)F?hb?Wlp-+<7HZcjm7TtlEK|9BWhkJ{e7()FBkiKm8Psj`JEM@uswjrR9fI|WpZghG14jDlJMZP?(D{tTKDf*gE1HP5 zP7^3{qzGrF(&=nA3#ASbGsK7d%#opjv8dQS^7#K6Hfgm%adW} zA|j_GFNX~KFVXD#b}bNh5%R0mlB@IZ;)Q>KdYY8(g=Q0zbF^H$+?~ail+Ip&fekz~ zf?0(!D8{C>pUgIRp$W}R6rnDz+#*Zp7WpIDcw$Z^T6UA`M)BbAo@3G;C4mZ7J$VUU z*d^Tc-J3xmLqb<+%jc?fRh}Rf?wGKtAo)+a9a@VC(Zieb{EP2K%>bmpEE8h`jVSp> z+RZL@6uL$Qi*%%LDv`EYxVj7{L;R%zW3SF6(^V;RI7L`#s$iQkRu-%n&???}Objpv zO9?%?+CKY8OvnJNaQS5{Pi=k!xafKu$V<@^4^M{Q;CP)&u`F+ z1L;OF{%C?4gt42KvD`y_v|-V%z-M?(wz@4mj`-lh_UXuB*y^TIP0}l7gof28A^J8# zN!f?)#>{ghk9p_{N(_49-A6Nol@w>pI&fHQ22!Yj9za5JbGR`}cMTR|?t*XgFU z2u_#s7g|5J7%EFLv8DL@)9QBz=jpeq4+}Ot1N+xsitTp%V83CiYnZzEVk+vdU+mr~ zx{{Q;61PHcAC*aLwOMApJx?cb_ruKk$w85=*r(d8&B;S=aCpt)*~9tPz|6)8=5x$Y zuGv4mejMhrY{6`!Z))u*%x4&ZOuct<^)Sq*>Hc)BXJX|b%%^C+RJA+4ydUP1RBy7< z8C%*5vk8hPQErbe?uL^wa58tiG_tTmfH;YfxME)%{`LGe{uL29qlKZlt?<7MAaF#i z!P(8JAY}*nRW^M2_<{?o`{C0|_<7d8)%fVq|L@6j#(S6a%j!z=apPi3VHMtLy_FWL zGs~2vJnj|k)irp;#;cw$j0d54-7~Ja2M7@%4g?SwjfKK?$JD{@A1eSN<=XYZ+p)!w z6Ss|r*Vg`^L!R0mOGH}xd^feVF&_MkfWWkByyvTq1~cS`DE5xsKFwO zEwR)x%dPkUmR}m2kVtI&9SM;m)XcJEE40!otF5utI_qt)(WW22l?h7pkG-_bG4BVD zEiQw(;6W(4u%^6%SsRnfK?5oM;BN>~+f^gA_b&t45V5>FMxu`|__3-Z5}YWs(b&Z* z6GLQ1ztvUai!H4gh(4;4>r z8hw-tb$xamMxVjZr(yD@5D{mvuwW&!m;QY!RRT1YHVT$wr2ia(WLO2f_9T#*VWwGT zn`5qd=Bu;7G0(m5(krjM2|^eVL?ITU5gTz37x54uN#X_L7-u^8CdGkP&+y-Yss5^M zL;!&c*R7PU*mB+;o|buX z3=4qoIELrBH~2w_4^AF!>9p!<>jp}+2T4#+>AK?3N}Fh6+nt9H8eX#AUB%<(E69Je z%k$0PaA#$k((Ly>_*g;Jh3=MYpBn$kXJ24c>;9j)h&P;&z)!zu{sS&B-rbYt)4T!f zuzLeh)iJmeNSBvz%pmfzl!$%_WE0bz49KFVRPExJ6ARrtjiLl4cr44X9+NConX3g0 z)JLip@X&0LJVS8IppI||3%X2$7m|^lEBD<`N`U2ryTRA(D$rjGmw`S9s54~;E^|H} zG;kJ)ul-cj1NRY!1rsueGD15FN>;Vh@w#1i8xe|diK=}r<1=R&2_s{ajFyRJk^;8C zW~Wrlc5}U0>Dt!*8pkk|{GR*wx?N?;G&@FYx>4y>pEZV;)95`1GK7Fy#J|f8S|^fO`Q?^91Dc`5;#+pUmV( z4@IWM%6|^o=ScvafWs$>HZHu!75g34?1yy> zu~cs~Tb+OW@$aHP4|az~#wKRx<`>pCw{~_9F0XHH?;jqYo?j40I1x7|{q;bLR?j^4 zHtunXDPp5t)8=ZN6Bk#1Y_T;#+L5ECMB8kP>vq~_fHR*mZ(tbhjIhi^f$mT)rRv|8DkP7 zjoM|G+;+z;WPSM|{j!Y&cZh7I%*V`C%!~PPVH;cRpw56%s(O#l`%()^Ze{p?0Y#3P ze2-=RZ+U?B!?$sBh16(Wx`Ho*i6^t5Z;z&c}pD3LBjI}B=c2ZWS-8vQ;n3?lEBmyn;OkL%HTWVe891d zal6B56K&O=wnQn%`m;o}ru8Js>yTc#{3ZsA8n5==%MgWIAyT2+-APDiGXlmhLWODU zG7v&fA_A;y?lE5)4?&%2ysUPV zNX142e~)fzDUrf}4k4cmqStNa;}|s2c`9m8zYM4_W)%Jra!?L^c~vHq-LTY0Y%YbT z??To0Sv)&g{b4`CDu4Rx@bv99;WVlGni>`4f%oB>?n3FFb;Nb`8TYlg(Q*`J(?Hx$ zQCS$L3h8o-$=j>iwAm1GM8xQXJqAY>xnv2t<{_|R#JFe$bemCdnU%vl$a|V9b?45}%4JznOOB)rPiK$@3uHeL>5X7mF z#HCQgtf z!nM7h@A001y}&-Q9j^VfJkDT5x%Ww()mpv8w%h3-V(vf4odP1mPJ*Ql77=g|2M z5;l(B$K`fur7t6_oPQl{etfC8arCkoT8Cg#frR=8hCMgaY_{d00ez`=*3)Q4H)5Ow z59C@cc3sEl-t+L&98aqp?JLug=-p{QlPKXnaa-*B)wD{HTpC7?d9X|yBc6G)hfQTU zMkIIU+4CA@14tBG6v)qY9pd-OZrj*p3q_D%@~e% zw8;$%T8b>tX8m4ARm&km6kY&K4Kj?j3D}wpK96QGbm&bT&##Aoq#zQ`xhaohJc_WO zavSmzrs2`f8IqgWPRmOJs+UZEdX6DHeiw+-A1LfL~(cUpC zptl4oHatFP)haS^Nnp+m9Tw%#`IVeRk+q)73t!GmF#-&FOe>O^0us!s%3K{_2=j_$ zp@0O7s%Mw@2>^W#%MQs(5eZhE%31>eVcj9wC?dh8)Be`X7|`vgkevb&?5fIM9bg#y zisYbx1c$12L>>Cwaa7s~M1WJLb_NmP+#$Pw2yp522O{BDmPyRmR?8UB_!w);_=zrkN>9i@^u{}D!sJbuy~!5&90P00vJtWq zy@PBAoW27t-@$HCff3DNwuM_p79+&a2X8}R;uM>dW4^STh zxeA>61~~68!1f-{zXtcZ0}9VhI-?Ms6%W`LB?I0Gm&i0&aM>g!^J~vq0wWUU0#+aj zv;r#V;6PaPC5n21Gl}Gltqx62 zk-5^D3dsahaHue~?J1$jma2SbGal^L6)ss+ZkB4PMn%qQUAg4)rA!y+ih_EZjUW=8 zGN)=UNzW|0uNNffg|F&@l@m*P-*C!n;D%7%E*gZ8eKb@yHyqJvAFT!gQfqhHfd zlh7y+&v5brLr^?wc}oJtKx3TTmZ3}$^0|IiPiT0iqK%M&ik1-Y_wpcH5+qd$N}1N7 zesNohREmODRq53@l#mTJ@XcK_Z^X1uQ^RQ!@cndgaZ;O#cEKhsBV9sv`CCyCS9?mfqeMNs}Aq1N?6Z(Wuf`&D;g2h8^1$^2jHAfeiQ{ zoptN=PVFHY;o;H3<5f?WoyC+ylqReUwV{hpA8k%mTcASuY17%`)nxjMja0 zr#hvh^mjw211THnqW>3B6W0|+UEyv*?Aj%Rwz!*@@fC;R{fa?+x3U_nuOhy2Rwg;% zO7{r7_o>6t6G&V2tJ{$>*nf2w*|tXy_D7s;SKSNaxa8}~7hyb(Y4KyFZ$&?|q1!Z~ zQBPh_QSaE`KIP}lazQ$}yRtFgUjPO=vdF2o}?9;a)Z*D-BbP}dzD9kMR z-4;UI&xTD03_|RdekF3uR+%MlMrydgo`GF7hWf!zjBxIJL_0X$$oNEOvtM2W(Cv@vHrD#9R zk;>Q-GS!457}ZNk?Q0-E0N0UU@u7uVf(^_y&M$9!+Lin*-PdogXJ5atjV)Dcgn?k5Sb8tm-U>$kY8##W zcF^hK|5Sxh6wrmuwIL*JsnBST-x6_JIZ1TYlWqc96fMT3-q}+-2#%6N#1ddi_`N7c zHZWW0k*kKz3!7#MZ!q2p+B<8!ar|(O@{1K#;bV}=k4Net13#Sl3yFtvO-6Z$O7j2Ne z3Fdynz0ABv&9_n7i?5?If{~KvL*FQj3k34`iuQB90tBQ3OjX2kFXRMUA+IkYt-aST zb>xP(Wj#h~1&zp_rG0f(@oHq~LDL+D^k{&$J%r6Wv1N&_k!FQQ9M5!smmle#d#nRx zTrW{tKJHn12O)#1a3aRJqM0&uk|98LQ+ck`gb7i$yyh`ugC>I-CrE&ich?by^k4YB>8&1P_HlV!P&dX2?(v~F)Y3Q zG10u;Q?akIZWb5RX_seD|5gto55in?_;aLVU3C(hyDKWxVogh*!Vq#FIjoFL?2p4J z0`wH}@ouc|QDLqB|Ez>$B@5LJoOPXE_a&zfB#^a_3Kl>fLom0P6CnG9*)H4e9F;v~ z^Z0oi>lo2{Z9P3^ipbe1N|z|eFQc6R43dn&7LckiIjV#e#z%m_KG^eawELBYWi#|m z>Lw3@N2}+8cFKgz7PL`1d5i(!#P^0HL$jDBt#Nxqi9QsbqpQpwwBt#2G*)O@dN*`( zSa4zC_#;z8X8^^KlHk}^hU>i zltg<hfmn4X--)!4X9;Po&4*Jq@<(CW1+tv_{NWgJ<9T9tB=BQe0XTBP;J zwcpV!xz+3e$klfBvG~3Xy7}a1@7`!dXVapW+?6==!Uy*Tqo!tz`tG*a<=N9~IjUaP z?Kv`+h;+#_^!j7yH&Zw@nBhyF=wSICAZ1c}+a=$=jrMEq375RzuJ0MZRs$6taI?E* z-H1@yyiodN|KnkeAp@s>i8DF{c zY?Hl}%W7|sE9TJLB3i>FQe=t0ya4J%apa}=Z1G*3@Y)MzR*XRg((IBeC(sXIpyI^i zI+y!J=lKrDfukt-IL5iQvH!RZ;cHghI2iaR8vK7a>1?9A&GBVZy~DX7P5C3b1B;EI z)%D3*%*n@jGFPjYFQfM<1v~o$shfPeuci(`n&r3}#AaV(rSN|3{HL+){O%UMi)>g$ z<>XRE6ZIv2r7b1>ckVXZ)7|FyQXBqLehTYNtN&|J&E%%APDa#zMP;&|&n9p9ikJQs z-SJp+yu`~`g;=W%0f9q7AeJMD>9FZ6a_y(eEw-hC}Ouwl2FZd0^B z>}bu~`!0R&c~BAvwgKVmeu{rY$vwiNwf+)x==3df?x|0gpWS`P>JzH9-j`lKF08c? zVnY4%QVcuLrM_0yFtZXtuNb_KE+UlX_MUEYn;P?xKwVkgOqT^F%8d(cQSPIx~mRlDVUomST?i{Wf3AGX6FE z!t%n#*95f2ct5%P=y3k6Ef+Kd%A{Gu`1z~!QuhzUBc>6V@^Yy#AX+~aG)<3)LFTIqP zwXHjMPuW*13)jy?weve2!Qc+N_C&muAv+#ZWv4tgIH-s#)$-WTkRqzGs9H7ivHL~m z#gLsnFzle5pg9riHBWvF)s-m04ScI#-f7w~auKpo^(-CRZrkW3dU|v9HLjA{as3#} zJ!)6aFKXlkKjx_5+`0^I%V)|q1pkX)`QJ@Rd~iS-7mFqFfuDxksZS*jL|fbUcJ%2U zEi8W~aNZF$B?R|`o~P6Y;?b_X-71Mal?#n!0{?ST{vDy<|H2@Zlh$&1fnF2CHZ;08I2Gs04P z(@Ko^mCmK)TZmA2j<-8n2M>ol5=p3sW48~pzp}ccHaLTM8kcYNP-BQdm9b3Zj?&cb z{3NJv6L*2T)Gsf8pek$W7P&^p$D*$;JSSs_xjcqg_S{0LDtRmU(%s~l5mpb2$FeTR zlW*I>Zt!c-gI z0BwLK_&3>0T4sQT@AWXQWDeNx^=!Z})vMoNF}pRIDm_}~fTx?2Lya-=HNZwy4YW3c z9ILDJy>f~Fh7Ze8;7V2%)i7`Uh}8h3$JiwouwtiI6I0ex^F{7ni{GPl4tshz*_09b zC`#?0*jkuUku;>N74y68M@R_=?!`6o?PKrX^iSrm!G)pl#h(}bJNP`ZYVQ^+W5B19 z5S7TO*v^Nu;QUrCnpAT82|rOqU>iPubTTjLMmk{uS!EWJ%{Dk~Yz4F6{1@_|adX7d zE*JIMY@(rdwb8wAot0gZY~Nc&a-j87O{CLu$9sEf%zN-~XCK$-4_6-;wXg?5DzP52 z7ByG*08^DmVp{B#Bn@HmuG4;Vq+B@GrZ=mjrQ%kjjNR%Jmzs>9P?S^EA@cTrF34+4 znVVLo&jX(-o^&eh@Oa%n_a1?{uxjGd&&jM}u zQJoutTy4hoGmo?w8d*$y^oJhD7^WaFnJ45#pZ;faj97Zx$gdqm;JFWR7DY~Y1zFfx z^xB*FS8;I`Ilgy`eRF@C!rZ<6=fzOtRI}YlG0|zKtt?-CDCl+IT;xWJx-$mHbcgu8 z_U2>WV9|EP;rPTqhQ|YAVIr8V=a}umy&-d6jocK)pTARLky={1$M_1=%73-1DG&O+noS8EaH(sx zmEB)UV(IVWox1^h9+_!&{98PkfOq5`dEMzPJZmRnUJ&<4Un*E<~S{hYeqtQA|eRFl#$$W+|I@bVzu7zGb z2|ZnTICz-%2-*a_t{hX0U2TOPPlG@$kckx&sUVVZ?VKGNK-l1Ya!KK7m2Vxp9K2d{sROi z7m7d|V8<~TSN;pD=y!n7c}|sfGV7VQ3OylSx*@RuE7mD_vKmEb(|nyMN6m!FGMBzT zIOO2f%4D>qCKQc_BR|H#tJVrkYmmy*GyJkK@pxkQR`Bq!k*wQXv@1tJqIvfLzg^lW zWaQj{)z4Lia>_Nw7KfKlogBW{+iT({PcfI#3vcUzR=M5K>K+6lfpL!q|GT>zVd?*3ed3lU}BGC&zy6u>Ih4J&`Q#Q}Zq=)4yabs7hY1~=mv~a|F)`TGH&vZ97G|e5K zzT;%kBT7YSYqLZ<+;`?+OnGY5=XOd-{L1I4e1#w2JZA+|`zkk!+Hss`Q|o;y7+tsL z8-7(!Qoq;;87RB2k+=lh&F)UN#ni?Uy13CkPKaO4DYev-DI|3< zzB0o_DND)08yLiNp7{|t5mBptAE_D~jD)45DhrH(A_=Li;(!gfBxg17q*JyKq2=02dwXZ8N%&H&~pd`$(`+kip zey~ElQcvNT=@N}q3YyQ^Un&W7b1nKF_M+V)kyzMb4z0FR3TdR#CP>&`GEQ3jmDv{X z?2Kox>qyyscz1E#%@@aLCnowpC%2t)zb*T7Kbs%vWYMcsT1it^nN=O-%n9T2%Z_JWJ8|6M zlqlXu@A@ZMnI4$R`W}Ysl)YmWRR{%T-Zr+`5Mz~k_#HjmprDp7u+@^KRsDWPu$F)9 z;UNNc$M?(McB!yOFw{R0c=Gu@{}-cdH?|0rnbpM`Q>MWtE7H~5V+jbDkq1Dma&#hIEE8+)+D5% zzW8v}JeB9sl~?nmVj*fMuP`^SU_C;!(IhEc$;wRTQLJagrIr2dPdO;IR@+Tu*T#@4 z{Fx@h=k~jGwiCL|aGpvdQ3lJc0lr*PnoEU&;qVvp^ZHHyEjULkP->(EtWrl{xf~6? z=Eh;4@H9dGY7ufbJ$#fI;sJd-SQ%R9b2@I{fhjz|v;tnV9Skb2d*`5YCa5IT$7u{bDj> zc@Ues!My>x(AL?%0{%wFV-Z0zuRWP@t+nW)GWVvSP7R$L*<|EvGq0|t4Lm%8GE%hh zKF47=f`{IpnP1Ygh$CDHk?1-K{`vU2L^dLC8b&P?k3M+wdUk;UF7ieU?)s^<@IJ=u zhqip7UPyBlW{elt3!`i6vf;(kDC#SbpYNT{DG7quBEqD4cR_&%Sh42{hW^B2)=-p(oXjN)QiEtPx=FX zMU+=55Qwh8(}`AB5QSFqm&o&&A@-xs;$g>!v7#O^Po%Ij`-bpd)m`DD3behT1V}jcn1#sVIOAH=_H@PJ_V(UUIB|K zm9QASq6+Zl)h2Bq+&>m~I83;|ofD9jmN7R+StWX5+cwaeIU+J~g<+U+uC*03(3mp; zi~s6}t{TS0?yk79x;wFT>jbGD3dsDO_#shD$tQ$ZDY}`@i2?E8%Y(1XdHtgZV2pU} zKinpzt6d!hTHdz2feb}5%>{V8LOwu@Y0(CI}Yp;6zC*6Y?t;@0R>70Q|hp-3Xs z8>qHzQ*+w#|Aw)iX2@f)^Qbi&yYuTEkh$2wk#t+8*{PEH=slP`ngH0O^!jzWnuu+~ z-q_v{NE)ZMOSmS&_pof8%N&6P{0{b}8I_<^ts!*p)CaTCR?#JyU06LONfKX~|EajB=~IqOv(wEf3M80cF_} zg<6m6vh}jE{-@2qu0aQaO-{)1*vvq>Ez{`IO1<=6d_JQT*r@P^jK)ZH`NmzbT^I`v zp|KI=`8dKoc&?rojKKT>H#_~PL|CfO5V}ujA;i|H{_M_e%poa^?H{b+yNVL-8@#z2 z!TcK}`x3e~4kldk=5fM9C>M#W5v`MlX_8|jUM$A=h~ewj>*jhz@`^2J9aE2yHQQ#} zMy;djD+ye+Jvolwf{%;l&&xtMm2=OG^Rg%Vb9-}V|1dheF0Z57;cxp$%{Uxo8U-rdV=Exyh54!5rfbf;e4-Iq)1;hgc;v5;9l!_aFWK ze68Qz&5^ulXxqbZk#=50CH+v#vlJMlE<0KV}yn+;m8wqMgi6*>iF;tB=1 z9IvL3soDTpQBVaf${+t11A=*{NZXEE#rQ?KDC_v)hNH=$aR}O*F%EgqwyN9aui75% z)!aNjjiz!`VXUmx$YyxOXc=Zp7Ubt_lRifyE!CQ6&+b7|Sn2>y!VVX8vs_}NOhXa@ay5ju5Uv>QO_hF0cU?AW+&j3qHzk(h$5i+YDBJwXclqGEte~ zoxk)dm3>B|vZq%;H6K^?KwQj>yIPfR8*}Y~7ZXt>f-<$TS63EciQ?@04>N@A8**S zbD!jQ{_jUPr&}#}rjf~H=&d+1*@A1jm@I|?j)h$8b)!(4l9CD(%3Z<(hY5SK1*>u` zds=oQ{hYL{ANAMD4maGXzBAkWql4uSJqQIiMXQ%@)D1tCeCn8AH$7^yNvdf)8>jkY z>*-B@I#`B*g=z3MbI6aB)~5Js*Sq7`NCl$d`BQtax^7opyNS*4%Fs$1Jqy5DX2{mb z$}l(B%lk0e4tJ#0!DYKw^af_;`mBG=*?MW2(MYx7ZoCG{pZUh`Dqm54@xS)<8Hup3 z;qb2!h*Kc_3=^gKKmlJ=JhQN@>9V414l@M}( zWjEKQfnWa=BbSN@Wkr+pW_roSqNyQEu~G3wvh zz6UtalXqGT*a5&e%VxLskOW$~_E9g^^sNK1cF#3Id(&lpFu?zbC!QD#>>T8ZN6Vpr z`OjC=F?IR3B`fuw(A~-1IB%~$#HAR@L4;hIL8ERBPyE+^pRc>;({kYO5 zot&w!(o$-G038B)10b1*R~v`Zj7P7SgkCR@@hTimK(|dqKNyF8E8x-f)T5fR@SrI? zh=&KfoV+dvQj740e{QBqM-cMrQ@olig3l&mmT_2MJo>jl#!Ny?K;M>#bKr{^TA_^) zUZ*k470l=I>>@LHWobTImLpcAxuDF;w5u@(qATB`D}SRa7qCpd!@n928%R6n%hVmh=s zUB^SdczJp!2cRD0RKZf59*AN?g438r$zCI<7v2 z${U|SKF^0WHa#4gox;qXy0G93_VsKyu^Sc58xh(~sd+OzcfWq$IlXqTUKMssGl6~B z@^(A z0MHg=c2A9b2#(;L|33ip8PwCdg=n9*q{v6LI`O&uDFyB0B>>&Mg#29XK5~?wvv@r4 z@Pg{%ziUA~vFj+-`CerZ(Vdr|9s4%K&N(9G$hj6MvX zCuj38>9w^9Go13)#Q8O$5;URT<-@R0|2jw-3f0yD?iieU`4d~zB|iT3j5=1<2a1HH z@6gi?SkE;|3FXBDl~o*pG+i)oBdu2+4sww{mQg#59r%u8LK zubqg??%YZ&x%72@VS-Fi*iu|vzmO&1Th((<#n5^ z)`WK=-X|?BKfj{l_(wlyVcU7PJ#}p_QMHW_b?c$oorLxyPJgDZ>sXa=qmSiH1~aMG zUpWd5t^a1!V_0t^_d4u*jU$Jq5Ky*uH{4D zHyGDdml0I;^; zk*OZ?6N*S4UAN63vFx%fcqhcdz29qe@N>u0WFvF;7+LqGz{D6uFq(27Ke zJ%dOpprRLdq7?=CRq6d<$@qykpw0!cSWg}%q`1QEq@Tmj@+|&bAJe8`7fM6Vk5(Um=}G)5C{!4~_UoyO z^(+a#wzthXH6+Xy(@DyYnGt@Nvqq5w2&U%+tQ%Fw>eU{=R#?I&y#{zYC^gK(q1<18j`n*TyNT=d%E{?hz@lXQIYpgW+Le5K0>H!3U>9QB{a8 zmG3f?g3cBoefHj2l(5nVEegH6hpJW%!tA@L(s{_$kt_x|Z38A4pGK0&{hYu%jU)JO z-C?FW(r81OlLL{rIp~;V-=W=C?gkT7{L!Gff#J-al5z}C?e05a&?VD4qC+h9iLN;u zi&rR23Or!WK{AItupeGC?2PGtTM`M0w8cme+?aWBxL}#34Z`r|DR zyds+=VFy4jqCJ@maR*IS!jYUu@^T2`c{*>~upRC3BQDFtCjbQS@RWBu_VW~+pMjQ7 zh(7jdr{_`eIfj3#gP2qjW8wSi#mry?eL9y!DyyFR5aB8Mv7i^E+`Kn? z({ptcPv`vg?&sGpZ{GwPoOfx9Z`?60Kgq1ZbX=!p72&ohN&3;ZR?=XrP>x$^KotV+ zj-WEO>2HWY7ZI21%Y$=>!-=h%uOw~sLqCRh1eh&}lk970Mgh>Dk;(ZJ(;Z0@UUnTb zKV}5F4!%8w-eJ&DV~0(1Nq1#N9tUSGWJIv`5UEmtsy0kB z9&_rC!A)V~v%ZlgQBh2_L|)EIm-O6RMdAWN%pKA__@4txk?p~=H!#vHN(rVkA{rtd z1kRmMD}c>_bZv4}Mn-j@)MK{yBUkJi+7)ohlJCq}6d!_p#s{2}bibgB%kONkaPe9e zHeTo#$W=zQ#ZwBk_Lc&wu-DYShMX^_9+zrTS`U!dIh{3q&jGAF+f#DYkMtlBk}Gv} zSBT_IUg*!)FZ10Gj)qTD@^z)Lib)#~)S?PyOY9*C?T4rRQXN6W^&>+061LEifLb%! z&QaH%>E^SkZ++?fKyvxdH*KoA{0 zfKL)cJ$~D}cbJ<@vFz%DDH*4TvQP+p`lxCTOkRxs`r2s835F7*1LOSzWs_a9!TXM* zXHJI2Leam#m%H@TgqMMJw^rvnr&`spFqf?{-D!4?D*@&0miQnUSZ2!hK$%H0qE~Vs z=t!WHp88bQ6;EMeJCy9D9|MTN@A6*kO>=Q_%A?RmJQTvvZ0l=~ts%RN)bWA3&hRorz(w0|wOco`1~7fKqFU$!_K*cu;M^%ddWe z^O2T`tQwUEUNq`|N0SKyH3BU~JlKMT(wmxi*Vqy~_C+6-k zYS2PdjrM~!qqN2AG_cmPSj*uw7U92L0I@rq1&sH?{}-}R`&Yk0d+?jnhHh@&Xp&7f zW|o}AxXS;oiV6;!Q94l-NrL&TIUb%rhr`IZ*q!*zWdlR6KvrIKT_ZOMa>oB)Q0EDq zO@jNLwkJ&Vw%usDz9$_jWtp>%a6*WDl9P?+$e^vg*5(oDK<@jTvP%7GV@b#n^Yj zQqZXNJa|tGDzhg}yRW-&9sl`fw4gY)b-RO7w#d5HR9WQ-99cN3xj56h(|$b2AW&0C zUH~si`$0xl;kuwj%beKyXqr^oo;kp!>E2UhM^M7-n>8pn>Ab=5lX zFqM`#PRjbqHQo-uyZ6qg;W*6R!iM$z;IiG}MvDao4B$c^>n+rge`ejIb||#`H~MIG zdNgYfY9e)1-AG+}#*=Sl17?esDQ51*p=97kV80; zV4?|ecGbMmr^}C+DWb=wd8KOJWM|c{bNbq$PR7@MZRDHeY&e#>9;_Fqz zU#c^2s#=#=i&eZG9l#-(TT#b**Y+{vM>Vanv-!>R6EfDYZi9s&pV_1!DCD67U(@W)uKg3d3NTNfFPfEz2?C;=Vq&4ai@J>~8%pD#8f@}Fkxva{2 zmWctJBsRmvLU$%xw59LRHR^R`ku+j{$qxcQJYp4%2UYo32;|7>i(Z{N4`^*-MVdaT zD^zH6c$~UOi%!jer*?%$xpAog$9rMe|9 zKXy=c1%iXqT)bQ6aPLm<+S(+wwo($uOtDLeppAM_fEo~RdI@Ch-a2;OU1Se*!ncsV z1obhom1Y;#D8|4_LcER{v1)VE?4qj{c<$QHZiFTNZhab(ogwx56f~+z!|5K4x-U2D zooK5R9fL>PVhIp_g~0wH9U>$9$T#VKw@O~C%0s8}wSG!vsn)J=D(4Q)nh-E5NImO* zt={yVQbS=n;58sl>CY2_Z?5P%0H2&HFgKz!O3r$JB7 z$9V{tnO+L+V}J&(vO@u0WV@V~!sZbTJ`1N~V1gULl{W`^Ae#|@-HsN0G^*vA<^_rM`z zmUl}dSE=W8&~nH?TOb%^b^|`_&eJONa85EymUM*9PMl|ua5(Ig5EWeyTXh+1$UwyD zIj6>6w-?}76W7FE64UmW`SB702>#%lcXk|X7-x+p#=?LKdZX?Wuo+t3CNNz@+fRWy+03BRZ4I2ROtWkZ5GuP4wAUB;5q4#H%G`R zTXn#6OpO;9B5%0it=5><+^YV3qNpnIVhIuStX={bQJ+~?J*%Lc0DG# zxA6+jgEqVuOf@|*drm=Q$`aSdC6)erTL*c0$2yVr4J9@PXWDeU(9W3RpHYfHPm)h& zFhJ7(!Pga!ga2QEa)#q{KK=P)o_z8X0A*mow^N=5t0IFKFryXvv$=iE$j(zY)xcDQ zg)9))Mv*>WGtt0x@Ff>Z(8@SZS{V2bygCX4WTE#YM&uN^Pp#TCA?;o%?NG9=id|*i zxZ9B2(+W$Zqe_1ev=5fHWo%vVy(}Nzy=kxQB{vzj)lmkTAIpe;7i2QN;ROLO4>b5f$0rwIv85sq+^n1fL zKOSpmlPv8_KJep*`H~(bB+p8t-#7J7oyJ}^$^vo&%hU7K7aoC4qo!&I87n= zPy~@4Px<_PP{ms1RGFq@!L+ClEd+)IKbmwa%{;^l0L6|@w*&C;?~W1h8gR!vM^gUcPG7J|aYQx8xsic3x=Y~FzkGOYC$Vq2oQ|_N z%x|cIw*Dt|LLZK4ef^#1YK;}shg(@7 zE)MA}NCJNaNJz6a3fkWBf1jrb29<`J!W2r@&@-K|h{oZn!}Jaf#_1<&SF)|`s#EJ> zIjlPdhY!LiLDt8x&rZGA_upIO0&3KJt#xi|=hx~%J=wdUM^F12D^_YV`@A3^^1v@? zqj*aYBBQB`?^($YqLSfs`~dLRPO6;I)w@w_Pe2d_C+xN>x%!Bi>dYF-^6g-zZPGs& zm!rAIIlK!J8fFb4*1!zafQ>ZRo$0~vjO5s5>r`d;G z@Dlx@L@qLUk%*{dq#-ITNr(!Qf+&v!4c}2FR4_r2(P;HHPx%c_6VSi1O(E--xkdL) z!{3^HvOoa1!h75Q*Ka;P)bC*WFNcs9fM0Jjnf#a^x2pbp+EJd)UHuvd5q7p$o5_!(*@f2;48W1`- zSIOC(;B=U;HFy|7NR0S`EMT~kcTpr}GPD=K+6g$TZNe=nZutnxMbGE%HW-;ae=2i+ z;wOtCu9_qc|l~CpP^~`jop=9DU1uf-T&dMy{zea7; z{r`1S8ahZWv$gikf5(BMS3V!Q#-ydD@LfmKg-p85o4%|$_ZwFB~@;ruZy6IyJg-N_+?kX1G`CDWhP z*z8s2%TQapSe0TW)M^(xY!4JK4winPu?zNEpZfuYP&?&>0$UW?Y8DNxB04YW6+7v) zGko~+WbO6*)GJ}-_CvK;vz)4>Y6gw8U6H|yw;)r z7OqsKf>pKUl3P5`(JP%8{JeerUuRu(mFfnY0S1PG{?fvNblpNjhW~{PgJc>U4h%KS z5GxF~LzZ_ey6a)Go_ZN!l+i}&En6S|cw?^|2OYA+(s03<3m+lm@*}1Hmq!GQ8=Z8t zq_ee{TioLj&q(4GX}plvZNlkrBsV zf?Rpb;`nwgY{Vz9%TA67;_kF%zXOg*QHva9>vokv zo&Wc_ic<@ISgH|q+zz!RGH&l(kN+YyFdb5M*FPX0ec!P0Sim;@6B-wkk~z7$B}9?A z?A3ue*75;XCZ-pjnQ6S>IW1%(#fQS%htzk_28rs|u zwt-@KX2U{-HTW01Hr(`?8YXG@^U;M`G2jcr)i2447#k)4^Pyz(xPn-{Q0y>7V(E3* z%5jdex`Ls?pDVPC%uEL9WQYNRtP|V15b2H<#~ciK(4RMk^gS-qUsk}-;C6#Fk>I2Z z2ZjfK$4MP#bxEc9EM}8EW!05^YwSUiPfbrXT*`|A$cSMVUy^-nja=a)%3^_7NhgM| zZY{ylWa7MtsbWn@HH2c}^u%L^japVPhpm1N+oeez`gMe*C^bfBbyk&iiZ6l7 literal 0 HcmV?d00001 diff --git a/fonts/fira-sans-v17-latin-700italic.woff2 b/fonts/fira-sans-v17-latin-700italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..bdf8f5f9844d5d875b915e68ff4b4965df337049 GIT binary patch literal 26072 zcmV(|K+(T!Pt24Db%EC_-y37QrW2nvFh2!Zz$3xyB>0X7081Bx63AO(a32aa_N zfmIvN_9qlKOouA+>&@zQ!|)gXh%%XO?i7?a_RVfzMWIyDfgCmt2K=__lK=ldFR8>~ zP0rG`cVMv1zlpiKg)qa>OA(fknQ49GP|bbOvUtf>jdTkWY&*P#-hNOuh^nFZ$*y}n zFkrl%^N_8hAbFkpOya|~9?V5G<5%F_v~-p)@!)R1f(cv0A}CChg<|*(!)B9!ota zn;*yY;f^wAl@VXNTMxdpUOYu_y~r{!b{Uk2HddT?c|P91o^S1{bG!S?0~0A2P6{fb zUj01H?Y)1uHDin#W3ppKkK7DuqzE>sfTSZOonTN#C3a&Zm>3mc6k;^^|8J^!?|tw6 z|Azr2s1yRUwgCsy*Z?&+<1`vjFf`<$L#o*jcJ2z5TNkc(2Vk4JLNO4*NTMVqDkNG& z2?Y_OP>eaN7Oq@;x^S7e%KO}2nH1H2yghpX6e_~8F_BR~nz($7LXfdQ!jTpK!8RDe zy1%TnsbnBHgXUzoZ7T14QKbq$PM;J4_~G2+zotn;mkSh<=J5d7NFdg%*q9kT)__KB z?jv03D*x@QTdIr9kc4)SQP1@3j_!1Mjug)Cin}+V) zhA!hRLxCq!kyT{XJ=Brw_X7$jdXdlh1{q{K%JmB19~v=+Kj)Y*5oscNeWfHR1wXWX zv!Vn~^M=7!5Ib2c`vv^YGidUys441n)yv`m@c+*}dc*jUgD->yCI{pz%;waD?C~=W zh1t(k?J>5K2uTRKO6Q^CcC~Ty4a@(-vZXrkg!^e;-~(S$=Ih4Bt-^`H)2l20jK;D| zOAs%fy%1&vIu}jcg}UmxHZMQg)hF#syY`%b%%=TqV=j4vBS#+!tZU2Vpa|;4S_4$A zv1_}XlnTKZLH+u2)2$anbQ*k^Uw!VC7J>!Qzb{p5H~-(C5CO_|5#|I=7AMN9oxq*L zMUmRg+>mqk`>*lw`*#CGgRl?;3nXPKP!a=_0vZjHO^^<0M;d!Vmc2>iO^FmGImmJh z8&f)^a5>HF$#YA`J?(8T#~hBgJseIEKKiAz`!=Pi9~B!RZz4>!;w~zk+8q~nID|tg zbg6$(NQ7hHAO2V6bk)sTodmuEA(1UypSB7r*#c>L{;~(bzTUUF5B868Jf%d~1rS`A5cgn&AS82Ey~Fm|VUsnM zTWGea#;Y-cS&c$DG9*jTQ;cvy3@{$O2!=~NhhbBd&==}BjG=2`I&~fNjXDP7&<@ZK z$^?BU|6$avfYG!8db1+nT)m2o^A_2HEA8(mZ_drU={5z3 z;6RHLH}&SUNjJ$RWU*O5|7Y=D@bag`6PJA%mu5S=j7zWrmJVD|B9GfG@#51o)z-hdwLf(8+C1wA zeaq&iuXH1vsNq1_$ z_H1o43mGdo!iwLi@AV zm>`#BDP6#bsKRm~MV8blboDe9RG;q;1L6-rm*XhU3tQtf z%fia&Nx13H?yd-0)fcxGm*3jimmACdjch7S*zY*^eB+w$BGJG+ld}@N%8(?m!0Pb> zp!oI&1u!1({HZ4PADx#}m{;E57}KUkD^_ly+AxWqY(Y<_rEworao{YI)m~EW=lpD! z>N#PjwS@;@i>9S3t*BZ;E^2=D#uuuff@q%oCMF>MwiInX(3sNf_}Z)ZTC>IC_2S*4d2xBCpz)EWr8(a@W~Z<`uksbjt5@BX zk9Xx*rN^|xZ87pdeKGTP(9^Cao(3CkXM{?_rA`0-xlkx2z~fabGRn6KBK9RP zLcp-^?F|0~eFN|Z;P=oA=n-@Wy0*jq2Aw`ZeCLjkn_~VA#gi68#)b$2CO)W1Fk2JU zry}zI2c^k-|3C!140r+XEZ`}?>V*8{ErXZhQknUu&j)m*7# zI3RP3m$e~!s5Eqr`W4ZMc0DD2d9s~B^7JJxxatR7N2uL%Oqu}LHH0_QOGt5R=W)F^i z_EWg#CZ#r{Kub>G5K(lbJ#o}Al!hqfY0_=lG0k>aGyKDb-Ip$c74KV|VqQvK) zNXmqlNhDmG%!jr|Io(}HcTjLmQu3z?)IQ_%~LnElba+cNAllDd=W>;`E4g z(n^Zaykc(`Wc)3MsdDmGo-(%fk`y1>B-y%KbUCsxIc0o5nau$z#arbprduY3D0xs6 z5*<2KAn9}~(!7-$8TBQ>_vw~(``!vUhEDnjsqlhGqZ9B8sWa~OX;2<=OB3hig zMZqXbuc~Hs!)jYj*E#(~bm`Lk${lp~uH@c5^!&x@-Mi?+NA%?j`u5HE{(bf1ho!RF zF#d)c&fW+kNR2d-g9=sbRjVdbqlU;RqxcwYoSsO4$R8>3e3}0ta&e3S(>T(M-O6%27h?9UiL%ru(DZUX?2 z58DyYtpQ8(TMu83tk48ou~FlSa_aVNO~+Q3w|LQ*gEb3iBv?n|Xex{Xu|YThkk#oF zIvt`kLP<=;=_HLrZOLxmkM`_q9jKL(liso8QBXGSq>8e#C6^e{m62Q>(X|m=AKs0! z#OMh_hEUT|N<;$QkF$21uceLn$InC}FY5=M-PmQ9bEa)iFJs7qlFfAU; zGv&^GHmq9J@YH?w&~nS1bkUqqC@Nb>NZueGkG$1bGI|^LSd3XQ28w$Y&MsDr)rC-E zx8Vzmmu89+s<1VQV?myw-k+Xdtk?Dhfcb2dP-s;8$!D)#zftE8mggT;`ByUaWyB_4 zRUrD4z1~p$(&+U%r7?#auV{h&Uk13?ncWSt(e`O?!p@>xD1^ry?ODwA)? z6Mm$oOi7*ozi=bWc19xN4o^W0d>9`{d9FcXF^RT^&p26B^bKm#KSG1wdyL;%d&(M6 zM1*|egz~raGK*h+`~8o94FIbD`b+hTf^?W9NsQ1-iE@}q;&GmM=BcxiCQp}V-sr9r zDUbs&8lWY4;<(~}7~9xJ-C1EzHtrYSr+)i``u7<#EUQU5S}yzUpHfePSKBT;j<*q; zZUTQ5a-2|E=wjZ~aM3CiqT=$wTQjM6A>GclC7;wR#BO%HWE)<>R0@(0lN+v`B`$BCddzgjHNhLzO;>@^|!2^t$T^k?ky7Ht%5P zHNKS53e(tEuzoUcTFJYFyr>P~MRn}qG}Tv|Mdu6bZJQIc=4CB)Zcy^Xs1LMJw2L&q}m9j!&3??R=Yk~$jWpyC&HR@W%cvhIQ@!WXZ zPYlk8nGg}=Uf-5Ls3zlz!uWk!*G(>O@McBqMrSOQkQG>5SO~a?c#!YR6gR%(NGef4 zE?rJ+9gy>|eBcIQ>b8H~u(Wdr(wPV(8RcNGE&#}(rnI;%hxHZ!USqA9L@Y_zQr29l((t4kgx^pbxgbzXsDy=5v>_)G*;tmutVj~K;Y9tY zVQI|Z89OYEi`SB8EEV=r#=UjFYR8i7b}VUtA;8VyOsFI^WUBmYxGJR~WR1)%S6oC~ z^Ws4|;>CQ{hHrPPABu=Ej<2$(AEm zo_qxgRU2ixJv2`4iKlOY=xcqM+Sb@zuRkyRBd;gV5{GnjIosNFL`z4jgoH|HZduXM zot1QNbtL0RPL@+h*RkbCbSULPz-O~I%ZIz!Sqz0yU}CzrxOf>nq5}GU^r=E#-M>^$ z5pmx5Wz`Q%?;5e$99;B!{oLG!&M0Dfh8Y|ro|HUO_7YPW^{hIIsbuPzu2Zm@biQ@y zG%_$`uRdD50PESf80ssreJx%Kt>>Ak6Pr_3$Y+%_o>%3rvKxs5YdkX|OQDuDy4 zGE>r(TYY#F-1_q)=UX98elDMYRRvX5Ev8k#6?qGo2TUE7P*sBi4wXP~Q%b9b^*yj= zJ=(u1d|G6|d^Q=;DOJ=3YG*u!JP0Brk>il!s68OEKfn%9y@^+^_UB2JqK71=Lu$u` zdVQUj;?8zf5&_KqLNdL8Sj1DnYx43d^2 z*4qUp;1_5~=nHZB$|~jbQc^XmwxJJ1J|H!3w#lQ8rg9MzEUTd^9JQJnJ6x4`TfN}R zDW)x_Xlp#K$l+M`q?o>^?d>;-;>@&8 z-nf?(7S?dc?<%YaxC_=aHm1ueSEta^iIFS4LU_qhRq^&)VL?NSyJ|+?zwA*~vAZ+a z2(j9=%4&usp?ra0sHW-c+L8AMfhVJ{3J%1I$&pgBE_rwqM_Zx11>K9<|J8)WTllVm zBLTRE2~Lp`MyS!P*hism9oXl%5~EKCBkdT^GW?|Ol}U8xq>u_q*v~* z9|Gygn6nMco{0;!np0K`|BR*s;Jp?ukN;apu3D<>TE~%~{C?nX|D@oIbP=a$JS?>9 z%G5D~M;x-U2%@=Ca{;x@aQzxyan87`PJ{W z9cJh9qgF)&M%3k#qyl<_lrVs=K8k+tNmZzHkS2k*?8&jhJho@taXze@YGMSYclv-*=~+4Ik~Xw;ZInYXZAoHQy;(@md)q83%6Y+EwcZtK zKL-W|KY1E$u$3)y%W?H4I}?_6=)is^21_9j>8z6g^iV^Z6h)h^7Ud|PJe%B6ra};| zMcoWB($SPm{YHG?u5!Py;Msu*K(BFo;OY1{=NR??4Y%+l+6V$6Dw333;(%%ro}(gr z^ndqI21D9t!kA8Jvl(kXHy2CJYQUCzyD;j9K{R^0F2!(T+9;>I2fj=>HXmD0BbZt75gTEVz)!)B72wFyNY}M zvuQwgw$t!{KK9^hBpe^qT=!UaX)6IW8`v#IH^w1P0)pv@iE*z!G7lF{gL)aJwqUK* z)O*LS!DPB;f?RD*INfNpD>Cx7cr1s25sA*m#EG6jV^qxfstb@nUljhzKP4q!95tppr?cGIt^?rahlVHvGL1oOQNi$5RKZQc}F61)IZ8kF9R0|L|PATFYe|P z=361v19#|c7J2fHt`VTo$EPAJ%H)Q^l7#c{cv-(B%#%*Rf$`>4pgzUGRJhTzq8u%LbU!)iiYhx<%z8XXgq=c4BP~tIQg}(og&5^N2CZmdv;!*I3K8g;kRaagghaKmzaeDlXz%chXIN_#8 zsYbxPh*j;`V-#9~F@`+)+M^c2Jeo1bAOt8rOlh(H9st7DhPPLvD38IQxa`}=``PBn z>pk8x#s&U3J4B84uvMb=(?RGXj#TNE*YQ@kH)-a8pA(=v|zWgLdUX+wmL4CJar;PlinUm25}Wlp~T3 z%f0Hxw+~JwN{kNy*abhICGPo5&Dt#degfAydsoX+IZt-{gt~{MWit& zW~igJn{=1&{DtBZ(-gy%6SbFa|Ao+rDYC)x6gC%c{e=QWKJc7varEm8H^VI}5JcAe zP@TU)g3BK*PGHXV<+fJqcV0VNRNrcHiSs6nao6l19ZbF>5zfhY6UZePn13#oS+3R!E3LBH8f&fldDkDx z1SL2j35_xGD58X%P}D-iOJ=g(1{-a%*%n)Ev)zuLfn8TX^f9DkI;C^EB(O|KH9*+l zmp+h&ICKax?FofcY@p=MY80uRVTd|sEE}^R$*DtrAC!O(;RInlgOP2b!U|h z+_bR^Ag&jdOh*5vv^gMwCIl5yh^>2z-+?kJsDyU_Vq*i*97RP3#^p0`GO#{>2kT>) z45nS##voFSP6M&^dRO_I#vF6aGv5LWEwb1WOP%-L2OoX%Sqsw0LN;=ci#+6`0EK9Q zBJ2<+1ji(^!IMMPBr5~0@E5EEML9}|lFLWE4!Q5iB$G`s)il%1Fw-ov)oar1wXnlj z82yIwu6~b($^Y-nQUuE!OMx%=?0oOFfFLxAzzUipZwRLKtt3c11}67hN7vgyliUkC zirDbxC3~(OFdx9+xe_n7H%r2B;Xk+y+7aTZ+K(Kd4~`NdK?(>u^T1bK#m6Qp^dl&$ z`$iiCpC&YuW*khM@hsmh5u(%>YaB%BZL~3HF?9l()JQD|ib!#(WM@HHP>1GVY8C)h z9&A*qsKGoxjjUJ+!fYzK&vndPOBpMcn>s_?E`65KzZ)sej;QMjr~y?Th4w z=Oe>mHH)L6HXhZWKN=nb-wUYIst!0GYz6z`>8STNeYzF{H(rM_8Y5-oOYF=?^R&A*jp|#%QR#mf|E2%uyrTq1thPM+KETia0Q~&b_JcqB zAmrJur@uZOe82j==T9DC69ldY+{-JF_hpT(CGU{VTfQ}h%j76r1C2?;QSL^CZn0|NHqfXD^<+ za0yL}Ub^d{rzHLKH$bdGa%IVuFUNPtGt5wB%2g^<#lzs3i4Ht2ZoB2NCmz}4dwxi1 z@9+Q}dMA3!-g8y4nyXytqztH1R;Ph+j#+zlKC2GIuO2U&-X_+S-4uTw9|}hKI^_Of z_cniX?7$bB3lKCT2_tE9bI!Fb(f93UixdOjM(Kg@D2xqw`w!W9OaJyM@Wr0T_qalS z6sVg12iHL{*O?O`JR=u$G=PE8H^jhYx@w363-Fgsi=T$8Cmhem^hppBY6qW#sJQ$T zyt}t&&zdW=azpuUC>T9y!K*QQbd82AgiL-7!3z2JloMV?(OQmM{F9cGyeryKa>Ojj zDnX7f!?XM=%M$ir0)X?Kvgf>;UDRW++=s>F(SW>%UwjLQ}OmF6e~w|b*#D4A8}1w zy&v8lo>NYk8T0EXps2_3VKS1Ec@E8QM^M$5@H_ZD6f{>qmjZ;4x+qJo7*%^@x=0 z_jtOFMtJ%BvrJk?{#Na;SVI#9jH;oP8k22Y0}~pW)X0>^rZq96saeg;U7nz(e~~_Y zdlVEcvF{*Br-u$iZBhQ~cWdYJ|D&E`jg_g$f;mfs6~Y=}gRn)|A?y(j2uH+neIC%c zD)EO$j#KpdO7-@PORygJ>ra{h^o{1eL|SI?7DsM!z;g8p1o~{mmt_wA!T}T z*y)+ETINRq=yKV&n5r8sy%b5&Q0tlXHgRl!c0c^o^Jedo^>MQ_pG*f>B5yFVI*Gn6 zW73KV4NJ!iIO9S|FfHb|K1)|xF_~4xyFp0-l2IpV%PCn-sA@T*3yf$i1yY+WxjBEJ}O=Ff%M*q8;ZFnMU58hoMEM z;zV)Y52Wmn@+wStUEtAzzOHR9mKFRv(f#HNVBV})2UL|iX5+3Nh1D8Tk5@io*mDOK z&{e$7}P<#RPln|0{ek ziA#zO-r1u3!|27junqOZ?(P*+-vvb=OnmJ=_@h>1xqodIQK3VB)3myBp@DkCJP zS8OZDLw5(_d3vT*PoLvly}ec!z+UVy!|8S1ta#RqkH8))T1;}28Ef}u?Z#yR5gj( zsR_WKwWw!NwS zqf-1@b%;i8A+mdjBqd2Z;0d%4d-E@B|?VdO;@l)|vO06{zWcd_S+-Upyi0uOg4wbA!ibiN|jU;?BD zpRiZZ^!}+q_)0u{c(FZL)d7BT!hkhB1X2dIcW9A?*vQnct4l`C$~+M5>*YI4)f`0W zN|a)_MoMEqO@IQest^#9lu3g`(ICpjB60&#wXjBN2WgeZnQG-Y>qvES%OXaEB*YY< zMRzsQabV+8aJBH5#E-T5N|2Rwsbw zFqBhE0WoHQjwn9yxhbVQWZ5zyoEwz%h;oiMd@_RNOJ;GhY{@(V1<>T-ZumiL}m1MReX*!+}BW11+ek^bS7F- zaL@uEyhs49&){#%pGpGTVbW;^K zk+DjVlJqsBLpM?bqsFT(%ql5%d-UZ@lMMTOC5h;K4+>lFN9XKJ}jDwIxngdFi`iu(>lV9|l7(zN%OzU9+BM2b*_XIt#QPydPtW-RidMrq7}9f3vddVA8Z!=Z8uI!xxkMDjT=WyCEDRy6-Ml z=sJOHNcj#GEJFn948K0&ExLTLLx0F;VR}|HV7rzLsl?NiPKRuuzng&uLTB6{Zn99`XhddU#RF7n^1MHj=!7HWt z%Ew=aX`^%;!l4!B&+e4gYrX#dUAD?r$7@1wYCvc)PZNN`h8C1uP8F%A+CM`8>~)i- zY}7H`b2F{A9D7O1z2*%4r4^f$<#uQ=9m}TnO}&kZZtD7gXKo-&bfPXI8&ylb>FU^$$Fr9?I19j;QjlBK5qYNc z6#>c98?1#wMsk66fY+6{Pj9G%K%3zryfeQ^Tiyunt0T$%XfI*|=pk{bNxBCAp0FH- z#RUtOevV{dN63<#e6^GvE0b2gl~seI4%K?Nktkl7+n3ZuzI`GyVb5lpi(=lJxkZb z2Q#aqpi#*ITF1oWG&ZXj8$!V5{Si@rK(;D-aP1&*xm38Z9^uwHq@*5Dw^v4f*~Cuc z;5a+c(%RSIC&tsV3*{{4M&8VCoL`E`^Q<6w68Nu}K`w;)V?u4LmHY3Rw~8SfqH`%H?<{N0OI^4a~hAwXB6Ie)w?-vY48`zKkprXc8DGD;||2W@SrvGuEC)vrF-JKL& zmdKoiE>1v>xgs{2t}E=;#r6WW1I>^4$T8C7abna{WgIMc%Db3Vw-P(d5hRKUyA|D# z`$3RAit)8%9`DD&yem$WlH&>5hhhZ>PY^z!;-hbKV%A}vF+XFa40J(e+)i&;&D0+J ziPAOr2zf>ue&r;WLi`Y#EtN-1GI+h6_bw3*c6GJ%iY{QrQ-ms(5o+mCr~~Poqtr{* z@+P0`d|2Q^bZL`0w-@>8?;b+xXj&dO`~cI)2QkJyLQ z($|cSey_1pd(~fxkl8QG`&xLvtR}IPI+eR)K`lVcmt=Jub9&o39hn$OrvYx;RL=1j zeAb=kSkyPNn9SNA$GSXarD zWv5|xI6mmj#&;ZtV7gqe_RwwV708EZYm(@nYGw1mUkb=6QCD`c-4QoYZ?bwn{xy~-cm1^XP3lpQ;Me`}OWiuj>sm8ENHUM#_he2tX@SZtfuP@07If z3W0qX5A-F;o_2#5chV`wlG+z>QnEbDD<=Vdoa<%(doX>3xH04po0k_0cuXzIS%xtXZ` znf(*idT+0Yq+1_<4+l%>is2~Eku>L#dFPU{im3TDVNmCme%Psu5&WDrKatoHo4a-O zhpW#A6E}(7(kI!i)z=3cT9MNB{P59;RB3vq6py;el^nlrv-3_(WYkO)Tw^!G63DI} z@{YVDioKM7enn>dP%u#iNg%pDEx7WOW!F4MY9mGkMp zWRYzqY!4V zecChyF?MekLNM}Eto!zgoY!kmcW;(vt!lQnBNq%>>fKwVS2A*Za#Jugi7SN}I;Oepcpsiak|EiKum46LGHNoT;voD{J^N zIvMrlt2GE$m6|K8?G<~x<^*csxP`N5;atcXP^muwY7MPJ5_i0(C6J4iJzNZZ8Vf0# zr|?Ab6ou@G#lXGyf@f$*d=R>& z>x?yHSH{_&N=8*@WFJqzjMn3AO%2R8iN2_X&;F`}P1R%mc^Vd~Mwg>w z@B49Fi3dxT6C$^&c7dQW66*6P*H@$IPzT5-&-qLFb*IpBrLnS$r58`S*{AVEFZ|38+eP8Vp0$le@t%ojoj025 zSZzrZn}tnaXICZcBvDe|aYrqm)_=Ml%CDIjOuMta&cZp^(d;t5gkHT_#WUtLGudw! z!$XgXmOoe~fc?eijKc{&aL?cEXYjao(XQ}t0_#3ucr$sr&@ z`-@oOiZpq>bVRP!^ut@47>%iRd1H-KTY&3$La0npG21Pm7E3VI(oyTP%SjyHYU=3w zsyeRxK6L%~xcM!b#Xn*C*jcbn6KW1 z^}dLfD#f`)?BRKu9}2K<1#_i?c=UYzrwf*(z~?=Dru!d=9x|_oa6&Cl36(&V{Jr_G zH-!3n3H#}h!Br)vE2DVqydE;O(!IjL zrc+;T{nyPZn|?_pz1agsvxeTZ(Opi&2FV}+-Tcx~jq(Xt{r7)I6+yn2GOa3H*i{6( z2|xBS)|Gy_McmcXXy@-4uWN|Ld+LijHa}k9VCm#;OLDO+ST%3EizUU`e}9+Y6WI9+ z?O8KytezGme_$QKFTyp%FsJwHyKwL+z0_FHK&8B~-Xo0|#m0hY8TpABZCWAc#j=~# zyE0e%Dp8+%c)l7D(3@P zHXNnR2I26d$Q+eP%w#&6=w@{%m1DMjZpH7-gRGwWepH@JE1)usb!8fFsOj>}O{yO< z8Ybgyl|hS?=n&1V%Z6^8d$Ru-5}oP`3k~QWHuCEiiU^cq*qd+uor&>S^WpgT;+&&- zW>A~_-Bi26A^%S8c;lQEz+MdnZN%dvKbfFty~(7{#-e`FgIcVJ_yhZt?E z)e;Dby>^~f16?CkL8u%@nSEXlnOtes2mEbl$TyJdKFBf5p1D188UwlnxeA)>pS*^F zEUa8uzpyJ~p?ATM4%zkhsN55>`(5|XT#8o0eKr{6dt`l+) zb^5^RgR&POpkg4Y3D&b4)Rs!R1n$;Hcvf(D{;D3+sq8NrQ=5wZpH*{TD8#hqOt3?Z zY|^4ygPcY+Mc7dFPx&Z62MiiYaXl5@5&VPE;%9Xq9Iq}e?lLV zcG7HT5BU!5)+Nn*SRFslID;4b6q=REBG*oB7z=}woJX9`=-4qjFpI>H*{+uDDT&6!}N!1J4^RZ=I*cfobe-c)2I4!Pq0!V8W?qj4H34) zZw2WkN|(fC%3Zs$k>32+;?fhzLAQiE(N|sF(LB`E>v&~hOoQjF(yOEKoIa>qDXhOrbt*&o zJKq-Qb{Uu=rxG#yZk@VhjkorjKVdK#IW|u-Gq&)n_hr#Y5*_v`zQ1 zZX1Vh4j^6Mso^B5o=kM`F1dl_1JPcm1<|Q zXmuO6PBs-MIgfZUqhsgL*7aNu3EP9k%261%CDOLtHLx7O({&W7rN)xG(^M`K%A3bk zf$|tf;V;i{3XCd&wO)Z}E)xpm1o+3L28~qXX{?&=%u2S5tD&~}R#lLZ_t&$-K5uNQ zz@MDVJ6T}@8zTXu@&D2#NkHl{8rLnokQDUF zIa7T;UrWnye8Be3-ib|~Sw$s}&U1yKKB}e!k7+OKRuDdfbJ@vZ2)=^DoWyA>g3~NM z9C2l@x|kLYhZpHr26YiC+c%5U;cruG(JC^X6>O6_sykdpzR;yaj())*DzU-skKUu; zPz2;}fual@{qV+HjRuE%x3v1wa_QRo8xQR>yd*8dC7Wvzo@Xp&dMd%qSMY|`I;tf< zqiQuGdPwGw3%+r|&+1(^6J?!Ouh12(M#@0d|309)OUE?0;%owLOpPmnTKIg6;dMXePXIH&SF*wpyWt6qb}hJo0jc`A*Jt1I_A^3Upc6v9N&b|Qhq zP`J>nFioZ6t?_Ychv(cc!RK4@ONjYM66HQs$M<&BoJe<3(&AfE9k)_V3+Ywpp%1hO zzbD<_V|E?@8vJPLX%35Ftt1P4bhU>2DjBs8N5mJtXMul_e-2)BgTtcPonGVZq1mdzX05lFiKhke0(jV{cw^IO1P5@xRW=V?+nK+v;pg2jitSAI*-@iBU&|U z6Jd5#Ld?2E1MD5y00Yb$0a)L-rN-|epdO(K>xr;G-cu-8B!X6rC$cSJ|LSWrcmf~dW%O6_+?4o>YrvK)f9}Wec@J_L219uVe7GHWLxYH*Wi}xvZ9}3*?U$;W0HE!e z%)!Vh+o1SSEa7da*673G+|Py5odiRZ2oQ3A;MjxE9KTPC$7xF2^_|YEt}uWRKX7z8 zJdw|@EyXGEvBTB@fWWN3S$&^?`(U5xt6imkPeB3LeuYPpZ2nQka}oD>^NuhCI7V7{ zR~UNz9gl3`xj~Nr@rOH^yw8d~vo_hjWi3XIJ0-oQ*T~OI1?hTter9aoxJ{V9Zb~kZ z)C^N{_MDEK$23q=hf6`7scSTXvv;;Zw;Iw^ub0=~`U`Y*tU;wVl^dl}vB{`b8_QSA zWvh*aF1MP*QrQDcDz)Ly`O~chY*qo4R={Ex(CUv4IDJ}c(?D}(&a#f2-JfMLe)Txy zaxd!#BI0;wCBp8NS)1Ey(z55a=gj%D6-$Lm6TC&&{UuC z$?X*@fZ0nr?3Y&{L!ov!cACpnn3B)rxy(LCxj0+-3&Q?UismJ_?fMGMI=<3M0##fz zfJv=uhXCCb2%9)X`RgUc_U-HIXf*PLzL!VT8>7qZv4?*(}{-sQF$y2X)W^=ly zr#U<>i2SlXjee zu0L=Z(`W2Q4+CD6;^O83?4T^xaT>ZFkmdUM#W899paP++C$-eB;vu#Tb8BXS4EVW} zYgh6_UrlJC(>c4*;I-I==UuP4#e{2qt=pldll+wuxyo%{!^FU?P%!)$6;a5fpw)O0 zi+9asN7BJj0qSF-X~e9Z|C`|Urd3>FS6#}Ro|W9*()}3EH}k>hAE!I=(}eL$7ZtdY ztivyT?EAn?Ljx>wXd4a7 zRM5qXPp_MtIx(obQR`BTOlX7T2y`~T71f=?9le(mz0%#=@zZyQc5}U-BEQsTOW5lx zH1tb{mj~jgDl*?t;b3+S`U+I*2(*CI7>tZa73H`lj7(WeVOf|eb*+ougisO46kCX8 z!i4M5dA!PRw>cI3Q`lPdBnoqdC_X;DyXnOQ=i|}IS;^K~AK>Hc=`7`^bt|Ja4wJrh zg749uUQ)@@S3^Lg=fp9tcnQhO`d73C&CFK8>Q}U zm5rI(|FZq7n6d1lwCB(&XavIF?<9;at_FzDH}$LaHhaOJK@P%iC!e6DMZyx8BAKeJKe{1$y)OWB<{qun3zi^v`el^HtqTa`vLU^Z*| z*Qw2>0kyUtz71*z1~exA`yK|ZS}dXYJWK)K!({lyVn(%x!EgWm^Ap{=?EJdih_=wF zloKgikuVYlK`9PhO%!>XiS!te-jU}0Wn)v;A;YoLEva5202FD)!u?V8#;wJF`u=<@ zWwG6DQS(?89x7Yqwy4|vslo1NRV`GVDa>q6=Ob<6W&+m%VR5e$Z_dF9nk=CeX zYbI`N!Ax7yYuspaXNDsJY&HmrzAfs%aYHHLI76J8$`ZcZ-a=6HXgQ*)mwqa(lw?wm zXKHd~LMDl;duqF0Aa*v9RQv!;AaRHEq}#<1z}n|rzMfF$3LKwM;P~7>SGiJzW4d8D zIu6+b!-muEN4hV4IgSzSeg{oDM#jF4CLJf^Qco$Ln(#2bUkyn5nbi0%ev}n}EuhO5 zrUO0G5?NPO;fk9fxtxW=$O33|=eEfGFcwMp%pU_H575TFiP!R>O{Z36Nw*X!8EkyYTpSMJ`1+zlctO+4k z7h8If`ghl#B=8|O>u();%{0s!t=s?d{Vs_J9J=&mCBgW<4Uh!gPwW20fiwZKS{bs1 z;Xv=ONY>+kB<=lBqBl9U?vGx<%C#BoGtW1r=a?;{WEXK~_BVN-su8a$8CC|_KZ z;Q?0DdjEQ+L9u#yxh@_kQ9#Elw*b>wmv5at3Ojq|QfKd6Xz|H!ChqK&Go5v5>guIroOW( zA37`Yqs2LmETJ~zS)T0*Aa zAEvW&E;*Wca?DDsA!KGBLuQPQ8SK1MA!VDK3Tk{Zb0zXgfO}X*n^mT(sW`MYw61MA zufjsLp%vQ7!&2G+T+rSo;&Q7U4Jd?GE_oAaFwoOFpOUHU)UN=MUX$W= zi1-`1?HZSCwd=+}J*aPakcE24gdVcz(dRDHi>^(a_9XA7H25|PqWK^|*;_ZzUR?EBqTED#Ha&_&`?n`WF<#$6&^y;+vvfD8iAx>ry8}3(GLcf8wv(cjA z9g{Iv!e2-Hl%w#=j$Oky%}MMe zIRLQE`a{D9pa1tn-)z)BAmF5F1Q-H)Ya@a^Z@WS-ZCGV!MG3)7ZN4q#D1{)HVUIbL=1 z^n3Ak?^tbCIgOMIjco74qVkK3L;4)jB_F?6E4zbea$UmXA@>v(} zjxXkHL!a}7807C&JngIPP}X`CNLPhLmu`Osbge6cWfEy<{}YYaGVxEQh?d*$Y3su9 z2GwF+Y#1(n;VXI4h*3u<^t+21)G?%(&YO{BsR-u&$BD9<$jN#jaaz;f%IVx6O~jI> zIgi>PZAR173Te}x##ZV#n=_~W%NSoeJ0x+|=GB%eoUb#k_iGrsAwTDN*C|~|_|L9Y zG~Zd5ufE)_mrA*~gv+K8=*wNQj*m3K*jw)M>YZq` z1sY^Q4pJGnWUV5InK7QzCOw{-Y7a7DNKdQxFu%=iv_8`{dGTLQ~@H5Bp2Dx z^aE^ny?;?|dR#GnFV1Rd>3(Wso4TZD_qq>oms1)t2-}c|O(AXOFFFIT)-c=a5UCbv zUte`B3IZTSZDmHydA0Sg zpK0I!;}J*WsKjbtfaDZAr?n)w)E3crB3cI^2iY(z0NLY9HcdG-z$#YH#oL@Azi_dD zHwo@D?YdVTTbyhu8$cZ_t4+0rd`;873ROQG9&lO%**Zjn#@rKk5>0El+Yr}bp?zY> z4mnQ9u!dYopMVeG0-J^l53^_#0mUb0*US#H%UX(xN4daKbB&=XQhXp3-}E7hrV8gs zCzghTny}DbfYTAaQHCWtJ~4p7`YtE*$%yUg>s}C;-P`dW;BWm?iQ?(5A(RrrnYEB# zGH$J<_jzJEIG2qJ`r0g3fLC7S#H<2@xl8-7zNmI?QfN9OVL`HRiJktUIZt5g?3GrjjPOfgS1HE(IcPvqbwHv?gNhp>Z^5z;# ztAyEjF~``+OJSQ`t3k48VD5_DK!rH7B2CVK)i9RLcoqCO9)#0KLni=Ce5>z>=jx?|aDK97;y_lC8!CbbO*i(GcAJYT{m$qe&mNakd2QG?n z&e?lK=@Z9*nVQ65Vjk@F6xZ$`Y1P5IUayZ3bei7;S>A!Q0@$5s~W|jl<13biirL*?3BX=yduZlo9 zy5J`7FwknW!x$(1t3P=!B52c#lHUAS3k-yFL4-BLqHK%f5lce2MTe7H5Ln?Y&lV%2 z({bQjCNV70oo1rnaQGG0kkm_t6aa-4}eYc1=7Ll zr~<6uuISR4wr`s>T@miuY~=g?D$m;GjDubhg6T%eRy3CCgB>3eR~oNONa^pO*P@tZ ztV?IX&5p|ULdU;|4$IoBTf^Fxh(knGb~?Q{#YGj@$fV;UvXhb<-#Wk`&;4uaQtROb zWh+)#7^^)D=~({Zt9dI#Y?7I#5E&UikEl>>$%z6J7%xIwE!p5Z-W=Uw2iG*$h!Y3h z)g_uSeXxE}eOHS6n1Q=e@tDQ88nT>Dn2d2fzT|B81nxFqYb^BA6}ckN=9z$lE`n6+ z*mk1ufj8)@$hnysnwpB|wJ(tCHXNSp$QS?>te6CyPIsz#^W}0ueDVIv->+XTuP&d^ zLmr#}V1YCoXA~ujThJ;3pN9q9G3>|@Lu}Tp@U;xl!+ ze=IxRkXMm3{!a*Y%c3?<5UVECOBJ!8-Ng{r7K_-=Ub@@$Yrl9m`F&1mh;s>E$jvhF zn1}g4tO6#}3eJ?NfHGH4UIS{iHY4x5((w^*sBiY*q0CO>F&R{ADTLoc7tOsqkk!3Ee9I#q%K2LpW$>r4qBM7@n#RlcE6)Y&==2^p- zywX}PyCxsWZkoKX^!I$k&tz)DLqc?QB>H~M>Q0F`+m^0x(VEo>eAhfln7qY_h;KxP z4NW)<9BABNg?bi*)jDl~lguYx$6SUtD{{U_zR+A#r4ZMJh>A-Y=WFwU0ER8PU9l^p zrn|&$TEpeaLzAq@422M9frvAPL5F&}*Z^H2zywBX_51zL?tmQyx?#k%-CzWyG+ekJ zTOf$TkSB|ncRMT93pQ9KrE~yZ%=1P^GD9HM1QFBFgvJes4Q0)@I3GcJ;dPXA`ocdv zmxSTb+QiFjJr4#ZO9Dk-@n6GyoSl=o&t4fNadKI%iw7bOA3NlP-t9#5=wTD zlNtakhB#=?T~o-9-Cd>@*o3sJzCglbyMZ>Uq^X0h=y{GaR9gT+EJ}Lt&mGtOu7Og$ zl~j295|vO04N$q2JInR%x9i%bDwGQqIa%T+V5LpyDU=ve^+5(VDNG8S6-KA*ojTLK zM`D?8bl^ew(3kqTpImp|f)RnOHf@9G@U&J$7*YKME<*}L!oh{v9;6V!nKlnAB+vcP zj2r-75|lHgw@gpAsL2p=mb-4QTw=|8W1XhA*QM*0_shHUv768G#rY9jY%CCcLY$GZ zb;?_ZXj`LVgiFsmy+&uk&f$DX&ewGg@cQBigV?nmLYULK1ed&ia9tJ4r^8@Y^sRnm zI%1xwAQq&;w^RuxffkUM4|tmyh-(sKj_7ZAl^Zl-C?XNssQ$Q`9Grw13piH#v@7Y4 z&Cd3ps~-nu!r&P5K_XESv=cT_DBEFK_oYmU;gj3yiMdlF&IdmC8dGZ5Z`uY0H7x*W zP50M*{)i3q`Uy=ma_YS$oD^uRTrwOQ3+)NAW793Pi$EH`6J4IswA;jwhsG0Y@)-r| zZk!z9bElhK$?x~r*X6Y1*+4<4x~TgtMdobG?cnWY9vaugE>kcqMjM!RYfD^vfFAx7 zaX=~nUbr@Uz%UA)%-n6rKtkMM!UBfnK04{MKYU+?Bn(7 ztmcgfQ#hs5cLcq3PVG`HeQ0n_HuJD;a?ggSH>`GWLb zgC!?rl6n_)VL7c!LFJFd>rVZA@BSi6(ai&a5$x=TeI{}rl(2!vh$pO|I1X=(&DeX2 zY%%vcO1)O)f>EBnL4BZ*BwTG^Lr}d+;FUF2>a}S?*K3W0=yFo!vYf2*t*w7q3Okji zpp^fWYST;ejD{gUY7Y%myk_G5Qu4Hno`4+Qx#qzM0CE5E>CNQ~M>s4KYPhMvL$WC} zO-Nr3xX`7h8u2dwb=mfcCJ^zzI9J&=6FKC7rM!d}7#&uBgij0CI| z4}mrl7Y70Hko(M#B6tmVxV8iM<5tgEk?%C(+RXeYg-iqupH`~d$pgSZ00q1)7(Nsj zA3qIx==DcD1aJas>D-`2k1}h0%Llj99_H#^9`p_%N&(X!UduP>D7H=j6Bd-7&4r8$ z;hB=vMcQQQY$nlxAN%%Z+VfMpiFAT8i>zy1V~g$V4;JaPmQJp5l_O4{a%gL`WYPFp zhE^v51(8bvm&RIzPC$12`!RZM^Q251dsZDdJI;A3is}9IuJ8pMVYP2u62`F)-PTt0 zD=_y4F4|080Gtwj_>CT#iruf`b1ppWfRVRDQ#Xg4sNn$9hqJf3jYmqg!Sk^=*wLJ; zS$w)*m2kH6X%%i9F7x2j(=0X9mR_TY_LqLMaoAy_=9`?}l@3m~?&yK$V=Gb24`xC@YEx1g`A2faHW!}=s!d1<^{|6R`Xl`zAw{-hRZto3BN8?wR~JYRC6_*{Eb)VCxP0qu~5Ju zu$LNK@XF_#GP$?685;FyQd`v=y@vIMfPw~9wdv9fD&Z2HR7y9dUGY9wZs-lYLW6EB z+^b)!+SqSCkn1$f0PaXBwK^@~596w+J~?+nP}`E;TwhPtpR$Nef&}VO(r`i3rDxM< z-0k4esp8yHdD2F8anqrrPHpZ$7}QYsh@n@7-{NCqRql z5`cevnEN{~l*dExf}Z6YoV+LI)~tFPpye7M`Qr*Eq0>~QNFq2+%7t=6H^*%(D?HGi zjBJi%%P>6llY);mWZn8oRsLfOYHfN1XTBEtNUKH@vq} zl6J4Ogwq&UA0RC1{3w-E|pdH)C=w z*1Q=dD=V{(76PiKs#R4L!2l`+x%3@atsIrCsSG_gOn?U5XJmy>X)?p_hQ7I=HKH*CH<7Z5J5Pmd)DU*Fq(cn2zA7i1p_WMTdLB*K*n7hsY z0#!|Jbv=V{l#a|x9nYDAPyeR`jv;Q;|HUH zBr1fjX@C3knWixTc%Z{!bW37!FXx#}IEZAQTVtG54`im#C(uO8u7CW!0}-eJq9qW( z@ev-MBxi3*8@YF2oRf|hMAAwoKhz2GwBKOu69Pgpc3St3>AwwxYtD-m69?i zOG;k36#H&BrUYpmq0Ym{6IJt@>eIc>)Z&IO>uRlxR_uXFUJ@= znRB|%ZO921?Lg-$lkf``+P?^eoFX^7F zTxG2G%;oSQv&+aekfOxpxo*iXJF*xZxcwCet^J^G?o3{PmRMQsO7aO_r>4q!Ojg?j z%1ei~uBb=A$dey!nhP4pi1rgGRe*3XQ{R1110#~6zs_OUS6#uC9zdb0Oj&g;vZ zQBBeg3<1cM4uA3uF;G;hs%9p4Z7XZoaj~e5$|U%j8-El!LpEC8bc7p+9W@B0g}wA=?d{n( z;I%)rY?07PnTVxy6WdEZV%~%Z7&D`Ga6fNBD)j&GX=pF< zeLD`mD5rj3F++?mxeKb6h829cy!ghUnd_-4Z;`)sE7IV~>Z0 z+hHEI*0R2~RwY-v6@-^q6n51@1%T4?XKyd=kjp%IaNAI`#eZE0@{^`|jxF(JU}T zNx2K8AS_`KG>VL5>PPG}snrRibly0q4~* z!(kzM++gIePxj;I<66p|<8iEZT4zH|{NzWUYR<@nxYRsJgoNBD_ISoWhAa!GV;kUa z6FJ-zPqP|TZ#=ZUUltpx!4EgkcrMrp*!BpE2dS$a#)HNqoRcKGuK`ph=)7vU2{1zq zU=0TQdfvFNr4;4-!(-mo!Tr;mRW*fN`^PgkfzgK+#)Ox|9u8IG4)K_Ag?K!;LF~^3 z;<0Ic$33K7I<^%qthm92bO$D0JIokm08=mL?TNVEy-R?=y5c_v=qI|RTZ;b9rKmT6 zZ=X~)#+!fRBh|mp|JClEyf&b45P*O+XHwhG2c+4!JogNrhsjNA3#FIf=WSFsp3PY^ zj%PZ@(Q^rMY`whGh=&D^NcEJq3fh@HnG)+d&L2y#|KN!hr~R)pIlhTDa|y4J51L*a z${#RM)BgNz3?*wa zY4_)oeTQ%a`|+a=*V#{sdC9Y1b8Ua8C6qTz^OD)?uZtb3LCDzdhML*;9F=#Vu05?r zE}i9jcgKIOZC>huSEBY-J!rZ>I)N-p%V&JJhz1ZUJZXf`!4mB%#k6&7A`7acB0{?7 ze;OeqUXf`h4iWw|f$FJiNJaf+4+`QT<0me=H13YRoM@y~`cb%5@ zrTvL_+McPJgVI&xo}li|)9sL;3Hh~V+t}mI#nwvcf=gsZDonG1Y}jRjP1L_B z&$3#>lUD{vYSXDRxjtY9b86!xjnh0%j?K%6?rniSi^~RT>Ek>hQ0DH2_^=wsF-9RJ z8LKxx$<9IK;b|kdlvp0E50eW%{io2zGu5HaS=-uaH(U_+i^TFC?Jo5Z+9a-h%}vHs z+KcvranVQ_8%}geyHH=+k*cX~UBnvK4?5=d7OkJS%~t`752;hkdbt}o1LD@Op8Zd6 zZ2~dlXc*Qyn(-lB?X$qqaxnSSO7c3oNlGL)OMa*{#`#n$X~>SqxKKxWM5>WTq5p4a z8gC8AEHUwPwp&v7rDcj-gMMFoW^_(sc7-*xu&p$QBAT8Ln-1HdA#jj`f{O>>U6K4zNTTIYgq;VEq6As-D4M&nN3qBxKZ;E&K#I;f z@GxcGR;ml{;X|32<#)1dM|FnE!u%Ci!Yr4!UZQmuEuUGYc$ta~glc`WX zlm4=qRdz2?j1fS$;H`K~GStXSU>+)EKU@TgkRVdHKo9<^e)cl5mAR5-QK*nD(ovaj z?HMK|N{xg{nx`07(lD3-jD!KrmOZXiMekIh3XLw7E7py5L}jud%w;Pyl~V$j z=r5-e7HtH~uV+;UKcD|5%}s$qQ9JLPLAEp5VKxn|EH2)1m95bQ7rAlg!P6y|U2&Bc z9q$PE@Rh^QHP_|3X^x$C@%K>xJ%f%qx#hMzcXZZ8pdjxBM?s`~1quyTtjH=+qLt|C zofxIeh8m)qSaG_$tIRONTMgxUv<7XiQ*Ofl=XwMdpMp$WO0l< z9pV&4n8n6csiOY>mr1vWqR!EUzrN@#ggRxC4lHd&TZ_$#(i$v$P9(ykN|Pakk$`Xo zwb}jcwTHL>n{8Q$@vTU#BioCPo{Ml zao1VN8;+~lzJn-243e%F-w52^AiKR1LiRaJTEiM5z>YdQG zVOH8k)5qm3KsNK|bzZkQI9^ha>6?^!DJSxb%PTA*Ch+B@xBsn*<OZWxQJ%h@NZ&E-aaJgD8nW=T(b z)0J?e0Ga7dJaNwf`FK*xQYk`ABvV65pB!NGt<)9SGI8P0RAQr`HT9&r#3I$b-*?!g+<*1{Pb8vH;SQOw{zU8vFk}JT9)(Co(N+^OX`i%7Ymx z`+cN*W(mT$F%xHmrM*v=q#%+uMYP$SYl?ul-_Us0vm0^d-OuC4{2c$$Zs6SDdc5t= zZ5j~a3moooCl*iSnh*Yi;lSIwZ%&KDO*+nOcGWJrbME9Dz120kfub8+pNIVXs6N(* zdNdw;cVCZ#=c(;^l8iQDdI}=HsB!Y`J-dw4i2}*ew1+#)9SxW9WhQ50Hr^A`?GaDr jmK}lz<3X_Z+?d4?x_=JaCwy+q_;_s|`HhveONu-VDS4(Y literal 0 HcmV?d00001 diff --git a/fonts/fira-sans-v17-latin-italic.woff2 b/fonts/fira-sans-v17-latin-italic.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b9619dd5d7e7d0fd16d0cd692437b3a76057ad80 GIT binary patch literal 24936 zcmV)2K+L~)Pew8T0RR910AXkV5dZ)H0QUF*0AU3H0RR9100000000000000000000 z0000QbQ^)90vwP=24Db%EC_-y37QrW2nvDlXo1i?3xyB>0X7081Bx63AO(Y92aa_N zfmIt3;}_UA?S^5!Syc((yZwZsLK(M{=uS{=`_z+n0XN2J&>ft_6#LcW|Npa+6B%PX zVc#{=>{bx7P1BBo)l-5~CbFD@qfjsmEB3L{(zdP{Iv?Xn_Uz0uv#18&@luJ5-3ncz zhp@$}>cR=Nz4;ZlPhrHFhCU}MW)y#-U>qUC+LA4bXRBKV%O$$?MlR!;Y(h&D`ToLp zKI|q}5UYnAv*2L*x7iPYvs+n)IZ z1R-EZ5g0^S=~>xL06jY}PmU_k!>zs+9nP6SjeKm~~kK`I~F2H4H=y#1AP zYj4rtMX|{9B3GBSyr}x$sR_X`T*MCW8g)a_8>mm6TU{BtvHtUxGNk&xok($hhWt{f zYPsRquNsyRf=W?h1V*|(oO}GVy*8KYC22}Y9?*bLO(-BXhK-rgW6j1+^8XA0&RMQ0 zAP+J}#(aen@A7}_0e32*TjkVNeO3VfKB&vDCt0RJ6OV04wg)gUlaETWhfA35sB7+b z6;Qhn;?yp&G6C}TL)$kiO7Jvq7<>h>lf|-M!0&v5Cf|yhqE1)6EWW5K zJz~-~LJzR$f(LxzR~i>AHwsWM=_D zioAsGtBPQyO(g@t88j!uZBu#Yiz-$4ar#7ob!{nL$x;OIZ;Co0 z*r-gTjup9oo0WHG>aQLx@R<03Bfkrh<;Xyx`Q?t)RrOW+zq(sH(#W$KEzvBH%uD(W znpV#-M+S}vFi0p#03#=flhDrYvb)sTW%vL4)3UwyJ!>u5vnT%JfF|rkPuNB0@iJ7Y zQv&P1|D+F3Ulv#!f$jNYEy&i8B+nRkW5MLe_ACGg00aZ%00EaN)7C&06=j(!70|ISqCnqb^T!fsNQ-%KH&@_{shv`Hi`=)8-r#G=S-awjV zLJ6TI;Q@Ov!H1KnAUMU>cI;op_CeHq#u+yOr^jiH9((Sv>)_3CqST*8Kr zwZ;rGSYxcnvY7Ldc2A_f9UI)ScV=d4s-mJIq9USd$A0Sfl#JPF48rA@3K&w;w?5z2 zv_1T}`o)E!LAn7wH1a$qpyZ7EofU5$Wgd*nx0|f(HF|R!?kYARA&~*y55B1+?`N-dH{0O8=wd(=-jfKD>E9v1O&q+q=92gv1Ly6S!lkM>Y0A= zp7}4ncmB3y&F@BeOfhR~)O0qbKa&1J^2Qo1bYpV?L;yj#)WdUPju}6eL=nUq8y9?V zaO>cvT%T)lWiHFPIV-2$tWFWfQmCI7gtuS@IfI=&9B-D@lS%dk6ybGMu8hwaJw zYKO_K*iY8l_4X544a<3h1@je66`|PZx-QDwcn4*ae zh*YP^L)3Ix7eFo~p6&8N2<_m$dgb@jle%9w3BBCib-qs4;q&*_ z_8Mvb+E~BUPuYIcW%U`X=Uw{k%1u%|ym)8LskUmUs_kZ#l%qA3Q&TFr;w!2wn`}oz zQQM14k9tbgo68JKOER&1OktThkbz!gEO%4g9}0;@fcyj`<|fzD^IME;3lvvIBWqS@ ztU#$tT`MSVuwtz(9-I}`UY^df*`gDb>S`aTuK!C~^}p9kUz%KujIB5)0g zzIs8Wpk`d>Lw@d_#eo``#OP0{Gn60moU zrjmE<2^g#pnr}bGLXEn#Gw;2KBAE$)wHwx}dxMOD#!deN-pqyg5c=01W-&^!f__8SrNSR7omq z8&r4Oo4r$nS6rZG?0a7=FC1owAR9e@73L6!ri;0C^>6t~qgrZvIK}PUfFov(!R*II z=+8bhSw_tR0u7-t6{-H65=QFA1@8(JAk||zxrJ44+d@HoI1KGA1lkXL;gQ0ALHq{; z|5KV?189st4clO&zdA1e8ey|7U$etbyX|$hO*r1n)zzNdX1XEFS*<)l|K0E zZn#-72`^4=-u(0`t&T(4v8bp}qG(7o@L!44mPo-qAwiKB8s-s`r_CuC&mU8en(3hD zDzfYN0K|;VCv(?)O;sN>Tpb1)Jcwn9hm1Uh?dmbDr-gQ@UvRzA}Sb4DZee?hfzXsNEmVg9bfD zgoZTKD21qt#Im0h?W9}_GxeWH3!ce~`rAp>ougJ|N@Hy*x(L_hCqoG4{s75E(Jq`3 zY6`|hBg#XvwFAhiP%U+>rtdp9v#8{NG5FoSP%nc*f3QZ>3^K8T)KTw26Nsc^YRCLY5NR+ncY z8P%)Cr}->Gy{~r7S!{K)h~$+@q~Gz&Y4n+Ru}1FA zD7+ogyC~qaE@!6o-bUu*0G}%Zq~M|2^d;s?o?n#@=RFh!PuzYs?tf%YgtX1d>NYDk zLerU;NC&!vZjdJUq0=<=$dPFe|FdLK7qQKxe^`S*aGc+nJ!b|K389oUR{pkJzkpx< z@Tb50ZvaUBm#@$-^1?a@0$<868Boa;0!MQ2aNOBhljF|$PLSGQZ}T!~-Ys#Vbnl8-?829- zQ)Qs5w9(0FnSuBp-LJNmPpT`C#X&;NA$&U0b=j`MErRYobKnBwZ+LJcC(1z{_&r0T zp?+zzLk@=dzjxeBWo9;ZB%VoOAp+Zl2~)Lx^BG!?Xob0hEM|Z;hh_ydC=GCeaH=M##RjPX1;+2iN#2k+(Aqzk%g0d}J_k z$Ou&(RF{kMb~HSd1I=WF4vjX*ClhLtr-JH!Q;fkBHz$9`?PO%1<{C3|5|}h9&~0u5 zPa_sgcB}j>M#eB-9@Che0CzuiRiCJq_{x8)CM9Pyc@5P%Ruihlw6a*jsEzd#1R|uXU z?%c46?ag&jtgS2p`*RUULM#ECnb87QM7fwVa43M1>K^QLXZ>wZe29+V z*$3A!O8~_o8@7mAVb@D_4nQpR13guqKcbM`26L*th6MFqjgGt={QvHsK-?rs<&dvj zg-TVb)u>gk!9rbnZMDrg=Up%g%R=B#;o|bMyN*B4{*mj+uOv3>Xj9nQv`kCOtN4tH zZ*Do!(w-&5TcJF8@#dKHL%n$Rqn_iwJ=G-*dxO+0^*4f zspX`nWllQf{ZFd7v+*{Fp7Z#p3@~aojzczOCnSK1BN2NvqM6yX3m#e>nyhmL4nj~O zCmu5A61a1UuHo%MRiiRirhv{@i=keB(_S1r$oi3Vk2U8(`Lk=-{kxJt{>b0R0#!4M zIf8K1bsV_$*9V+$L7dWDK8BTmsixJXEEhAnaKqZlMG@x$K`tUQZI8_MIUS#AD&2OJYdD} ze|)fC6(>AG78b%w{^%A5@%REsZyg07Gvf2(2D}X~!B&YBrv3Wgv1pJJ%c4TU zBZa$QC#iK^Hn>GAJsnS7=_x2nk!^}QZiST$EgdrXAI>>v6DO%)6U0Pu1>vHasDEL{ zkdAcTh90GYpe=V(NKE-6(!JzZj|?D*M0G^?FhPIo*S&~8NzMh%9>6_BxFk+MyWpOs z9SSKG1snyN?bEY^B-GW-^8h7+t;BMsd3XI(q|62K#C}ws#rNThp^FVHPGp^4=%#=2 z4FLF_U7jpo?zz%xtWbxvq5eID^0#OFv1GJCoa~J0NEHDBxsylQ&x;JHfDKaTLxD@L z+Xp(ZG;(@15eWuT6#NlgLozY|fn<>VzS54j29W8*Z1t^ZO57$Uxa|OOb5+(z#>Ogu z!mNfkf9*DK+vP}J%av1nz!UG$_$&3o@nb?sw8N*rUwdWHe}Yy7ZM*Z&lU(o{dWjG4 ztBuBg?HOB?j*utwK0^DsFNGB8fE+7DO-!{DHAplVlvbWW@>OH#3qTIwzqyHAOMpaZ zKWF4O)V*k6VLo;wgor1P|8qTotOk-U)!7vPf+Y$3M9yBa9xqMuA;WroImG;i1L&Cp z=o-(~i)IoPTB1cUMD>icn3%ZaeHb^8oWhl;S_2}`ZCNS0cE5@A`dW-QYZzTilAtmNWPYJ^+om8b&s`-uo=`A!vYW# z%YRzkg)CtxFRrv15Uu?Sr;3Ozg}hf@61^F)2WAF}-F*4W*7a;=XxTX1H3G52@0W9+ z3ccar)I*uJQK7z{%_=xgt_h4>b5xn+MYnIfB$V>ilc;kh2eLzRO`V95nGExr3vmX{ z>&W)%?p}!z6((3~ggY2c*}Oz}S%m9LR1B(Iqt;}SN9S9Afz^#mnlk|h#v8eyh6)Qw z=O+JJd$2L%P=GMo5{`R?(_;8(=@$VdiYBvFBs_r$f|-?ob;R@)Dz|`$F0KO*ME(i~ z9!J&Vzvw{pR}SO96ZORPx71qMGlvWfj3V(jRct$nPG2^EY(^SVZ{^+tEG)5f?c^qM z6A`Nn)_tjlmlzAR@c%BA2;N7fpx&E!v>8NIRDBJ}uK@@2s(=6dclIMJKr6w2^AX`x z8S=|qNjHkAJ;5n@qJM%R_>V)Wo2nHqel=W*S=1&Id?3rnG0x$5aDm}|?Xc$VM(YibL;ukMJ11Zj` zpp2M5y-gZ0sr%yp_K$ZsNy*a{V593_thG`6JJQYi*oI_`H zInvrQzUaWYusP>liE~8TZl=$Ij=Kz(*0buv9|2}UiRQ$UFO3jZNisq`WaiAwCgwpY zh)J|WQP0fuscH;jmWlzPH>)MBRRF`7?mVM<7SWQ(_Mx|6j`II7XQ;J?Za%N*28q*(r zoTTV3$m4g^>wE)KK!ub;5d}(6Oxcv8EJ{)u#iDP$2!Ri|W<5Td9ZuX1dd~GSN7)k# z#83L|uIZePsq+_LNrHy{%EYT-iJQ&u}^&JGoSn7)4RSa z6P4O-7)B|bKY3_-;zn?t!TedTN4_||v6_k$n(^l4xZ&YX}~5}L4tCnAw$GN}~i zf?K*?RKsLWXvHP3J$DsC@xuZcealtMOthLK6x7~5qJ@-Q*7NQUv(TIb% zh==${fP}~=G8o%3{op-^;>uV_J@k^(KoMS}M0k&nseDpDG0QBs!b+?3>a*IL`i;2a zs%wLty)F#L_;?r3UmK>s-j$^=mNnJ_UsP?bTkhk9L_%=N&GhaF>R+&tY{YX=@0_so zrJpdJzve9=6f;W6IiWdo8!FvV;^}4(tr%tS-|Dyt1bkE#S{>~6!D>PXBLXloaq4Rh z;MPXsdr~TF`yv+@cb#A!qZpk z39*4n3zM*{vZHlnPeL|#&QC?=MAfVj>tV@8)}-`ffqH4>&0}eH8bd{lj|QMlu!u`2 zWl9eM?&T}=dUx&du!!Jzh_8=Vpg$B21HB7Sr^184xe@o^dQOkX{FR@q_krt*#exaw zgzGec49Tv)YkQrpvyBLn;1Iq&>D)Z#^o%DXW0Z_P6T#T=9rzy7$jg^0G zHR77rk=WL4_-F0E9k@>F604g$ffc zLX^FR?aRx~!dN9rk|IrpOj)uy6ev`zM7es6nlx+GX0|!znrETidD!EHOa61k4OiXF zGcE~@s~#u4bRxHeN9ws>3}*H!&NdX{XG@&&yWjj_3pNr92ZhEZ;KGT7GjAR|c@gmy z$d5m@0AnVxFfj`eDOihmF=E-pu}P3@s&tc0F~c;urb|_(T7^orsytR>mUbOxny$Cy! ztBnKj_8(@!TN-bljMsY(?{S6vtC4E@Z@CVNxz3yj@kBi8XaE7DZ%Dv8T{Wb@0{qh_ zi=T$Uk2s!>X(T4pG#q?3QE~YX@P|DUs^Gv&ZQ32;M(|D~kfaS6R8+7i zdhQ`)UVEJvtP-J_x&_ppvJfG1d`RD}TRAi(S=_g{=h8ti4HB-XIy7sz_HiF%IbH`% zRs(3Xz|c&z6og48(tM@#!bPY*UCadBO&@dqkGXtJzG5l{2*pvkHVcEGl_3IE4j&~OH)0b&!rQ6V>x-~)?s@F$#F4d>{D6P984$6S$lwtHnpP>a%_R@sx3`C@fD=dk)*cGx=CL-fGD$Mex#evJsroWm<8(O5 zNDVV}zH_|0-T<&Hq>XE1_Y40>5e)qL2kdghEU- zNC<Hu>t`fngc9&$DF@ zU|P5*`!sFoRk3)K;UWMB_p&xwasMp3Uyki=Xr(wtr#P9!33%kQe#Jc=5<_tkbD*GT zgNS|sz~z~4m6H!!csIEQI!v985Rc}asNoIT3thuoc|XZi{xbZGLfz^bS{)U5)Xt zfn&JZx1aR9S-WZ=Zf3y`rYVcaoZ#1qKTgKiq!9-+{-vV=Wn3sVriIsNsk`2YgIQkM zLzNUDi#kbLPHAyMszR}Jyb;V$&~<9WL_~E>Ij>}lEOtt$BX*5^xSU{53%BoCEObo5 zdW48}TkrMHL$om31ejsggT5DHrA6*2kHjz5qEm6CXLSltPeZ^^V$$m`@H~M9&uw>a z86m%YFYlEeaBq$HbwJ*Bds6Iwh0bUr>B{SNXnXD;7`o7woewI;ys!6p;P$3h^rA_( z^L@>W86Evl^UiX8?sDt|=8Jq98C&iIJcbbECyo3pwiF$Vxutojuj*no)Ssk?R=*R| z++`hM!_=*Iy5%HG!V>(1zx3i##X|op;X1;iGk0gymgC>N;YA)C@OswH%`Oy5||nYXOgj% z#W!X6E0nSUfZF}Y0RZasBNqUu+s}~)3a*+&d2%MG*s+&V?K|*TD6R2%jfnHURrAmNxc%h1k_k2mEF-heyNtH24RSjON;`J(KzC;=L+w_3=|;L*lPk8+!lNbmd0~)vd?B6#s{E06{Zh1CSd5>XjfD1gHH6 zaJI{Nuss*_cfiH}0|`*`a10?JrEn7ogy8THLHq$Nix@vDl(uteno0zM6iY6iH325s zgR1!`eL?jBZXguFG%B^W{QQAks?Ql>K-!=}T-ND6X7GNHMh`C8wdVp?qKIIo2S#-e zWkmYSev{R-T`3k^mFx6@aDQA8bH=R7tis_2Dvf2DGL%ph&KeF%jSVZKdZX0}?4)Kz z-mD{C>A23BN!h9C$avsEy(*a4^K0d()Ksz4>6NLL?H`73U>};r#=**k0z)u0M#fck z8cIuZuSb>2xWWY7sxk(GB&8WS z9r4N)3qM^eDl@Q@z5qjpn57()(Rx=oXR;eAp+z&G5o;r{lpLwemQn8R1#^UkJ6OH+ z7y#*tUoiYeqhQ`hfUZULvp1)`VffL>$6||_Brsw)_G0+0b8d;24WP%+*gMliO=%Fg zSl5Jk&k#tEg~9impUEl}8Au2=Mh8tyQkqJFDqgSFk3g8o`;%4|F_a`A&s*&djxkjH zswyY))7YEaA^@zN+UXiU*hGRLau?PcsWCDmin)HWFjBpXqc#lIz^L*1jM>&H$2~F* zG*g;(J*L3+s$FU5Bf~?ePJ8yWLa*;Ms5KDKbwsp@FnZ)|b=67B8w8s;V6oHMG8;=dDp@bIN?>3zsk+*5D@)w>^2jM-U zs&(-O%0V8w6p7%>OC_nOECLlF=}JPJx=xk~H$@i@?-5vF1AiKXYw6XfW`TyryWw6t z)MK6PTUJ;gyLEUf2YCff9&_4j@kD>j0J{d8)ZR>)ysf5zuj5tQqXTOLt0&ZmLtXS@ zCT#dGieK|t(#W{*!hXt96c-LIsP;|iHL2a^jY`!P38L80BBn>1fx1d((15c4#%9%N zW%r(1?&-UI+4H2;K|#G)Eah`lIi72cI_~9J!0p%*3A((RI%OqlJCpnn$4it08pEXv zPOiB>T~oONjx=aRVs^!9Y^9E?CU>$dTo`>AYjGL!*6_ZOxIm5{60)ASCn>gdLC z7AzRyP6c`{OdKs8DX>|2un?iH1^emfL*n1Y1mqv8QDOUd8hD>?oD@6Br#DH^8~xpG zG?UW#3fcu?Y-(=L9eyP%)u{OVQy2@BJ~5RuJUM9h}D*?{4BG-=JcjyNf~hv&0qG8nKJ z%q^N?MF97@S-b$&yQ&EMB|vZ38X|wZW>*bxdD$u;N{jp}*_s(^-i&^-p)bRm9h z-w)CmZOqWWoyYV?aj9Lp23N|MYc~$fc6pNC^-Jf5BG-I~^hGy4riQeHOjPwQ^SR*( z$Wq;#gW<8wNCu;ZD~sGos#Y^mS8Le2S0YZmz!6UtNn9DYLvBuBA#?m0^SBN^j+Uz4 zm9o83scMFl*#dg$(d2Z1c8G=tTu_`DIGbp+n9|mGr^ZS{G}89F zs}n=}Xw1vt-Yf=3INg=h(Ce;oP906%o-EzS<>>PFjlZONN17l9rpsG9x%N5R zX~s7aq-wjJA=`Ngn(j?0UTYwgPZDmm*OaE|-?D?Je+BWbY$QtfSDGB7)~I|@ki;gj zWnGy4Jd46>%PpXbrYW$GLK1Yc#E#}DHpoj;N0*}7!HKcWqLl=_JTs265x|1C2}s++ zeY9x1&nGBgzNGILfYCqMkN*H!7}wU(7fT0C%3ds6?^6%!@r|}Yc~h-2_26)KC!0m6>)JqP#nD08suURgo_)m zM7m^SsA`_}N73F?#j8&`rsqnwtU4%;l3sy)$dPUpWgl;0Xm@Am8AdUv*WAGOUMNv- zbw6SeQ7m$uAW!^e`vi{ktZ!Q%jmn}oW?aql`;)?SztUhXd%zM=`ku0gkgvA)axHc2 z>qx^wfP`)-jG)Y5CJt^@Lbrilp93%a-K!u!ixH%#>^WBs93L6h_4@_zeWG6X?DZ2_ z!_UeU(W}h_OVj!|@SW_Em5e(kE1lxdRRyXlEQfdZ*7t4m$7u+xCoRF7;>OCX!1a;w z?~TAr45iWco!zj$#~q?d`hsdc9Kb00$^Sx%eWTel__5>-Z#Uy()}-$mbLB`gKK;GA zsdx0+GTH{4^*cgZ7a6PRJjYc)c&$6cVSpH?qpUW9if5DmW3d2RJD`4h{fB;s9jAU1 zZlZ0UFUU_kiubwcn^DCr<9q+j(;Xg3%wiqG?1NS3o zaZSi!YF#-<{4HAl>_U{J4}A7KDbU%={eLL!O_(_*?9`r!eQ@C64J$I{t6Qe~#dWm1ZRhK5ZFd#eVyX&JBJX}Z^Myz9wL&449sR5nu^Z95>4lF2l_XU08h^kFQ0GB z&C~(*8Xz^&CfpNuh}=Guoc#pRTgp~Nz@{jJJws}_eypw7ySu=q-Gm>3`qCU6fZ*}xG)d*jAV-5$|7q6^?oPuWF%PX_~^L+Y(h8=q} zH|G5D=8uoiF;mZ_^1hLtWXYqAx$N@|Mo{Y#@o*IT;KIWjRjI6eDF+IV$t z)^v1R(xLQj#(MwsgyHj507X=9OaX~p;*moLHlA-51n-Q|GWMASod5@ z#1U0X3~YOpHNDWp7@z;o3M`ddDW*5rtAnVd*CSVC#x=2Zp7_Nd-9(8qVb`#mE!9bU z&}HVyqMdbit{{i-JP~L}1sa|y@(}p%!P;lC{jELiQ3P4{YD)VG1+F-(-h$k(y`DnH zbBbKcWUe`E``1R044(cfH^I`rq8(-AVpYj^ldb&Z)g(=t`%JZSux)^MgV&MYJELoB ze&F;2)Nroq5EF4pO8vlvtw5lu!N=4Ce|nF^a9(6}aAS9r(IRDLBOAA7vq7{mn&tbu`IZvfnidYD~Z zMYVnC^U5?P8^_MkRI`bo3zt#B?q*-z&c*FbY=7y-%*{BIQlYWom|ClrR>_pF9IaJ( z0+c1XB?+~Mho4X{?;@n(Zih6IYVB`z$hMEQ$HnYHVTLVwLU=lWS7;VBdFZ z$gvk172J?u#Q!=X29^_iax0&m`|HU`U6Uf^Gw(GUu5EgYiS zLq6lOpvKKpe!)8%-B9LraZ9&Pw5GWH)Os^JT&JzBqB^`oP(KTQ;DQBW zT2g5qQ67a@xgonmi>@(le6W=Fup}YoB-9QzB;5}3z)x(eAii9_uUXc6<>OPGX1MSx;G|6&HGebdMiG|@Zy!Semrw?i8i^JU z$3=YzFzH1UKjhUgmGQQFaR^6a>&>uk!ECU&4OU}bzwx2c5z`Ox-MSbW>^80A2%|+I-Ro9QRo2+9h<2IP9Fw^R*6S9A69u7$Oq01<} zSzSgF4Y1y-kaVk-8}PD-Kl!w_MwL>>!uKCmmA=?2@=LiR#Ht!W&9b-Zt>f~}qV}Oy zyL4`%qp_*2v)d$PI~#R2X9zc`T+yx3h#%a;{`eL>sUfI|Iw+mAB9u!f=_yTZwiPB) zibeTX=uO5rZ=D>zUzWeIrMHnScWPKrWRmRTo5U@sLehR++p;DWGL?b4K2ygs18I3H zJEG9sWo}O&Bz*NILr;`)In0%>>vR%XK(M>nTeoXbd!qo4c{Nsqg}afDW?6$$kD>fs zY3my<{HgYhL@{`1!8xgwT6>q|R-H(S`kP#{Y;Fv#@6oJxGTH73R#Xs#E9sfbu_8X4 zNep7d10EX^Wl zWW|UR5NoAA%`gG2`Rs83sntsH~~kTx^}hg zB$LAlMrB&^YuzQkZA2(#1|~h=Wpjyiwer{BaM%+>nZW`vng7(&=c(uT>Pk>eYjp*) z^G>r`rBf>qD3&4)F*o2REQRIEvX$mR!RjKTQB_V5kHkd-gi_*57>>gb=7lEm8wJ$Z z;**LU`LMr)Jsq&L<*{cUBfJB90=5YK*v`i$c(7RQ%kwX{;a}eKGVN>Fvwy9vXieYR zd#me1RQ9J9|1+zep_V*Ek1gwHgFa}9=m~FTi5XaZ2KigFGGrMTD>>CH-$(yrZcKKT#YV`s?*irM0ByATNhql%w@It3&-Wf@42LW z@o6@kJXF#ehqiqb7mt*KboxMjv!E-^PqMz4pIR$l6;0FdQrlXYR<6Yzr=0Ul zsJZH2L5{JV$(;$eU_OPl-Ck1HIp3TBWU`Kp+h!)|`3T4VAohKm*KHI=_*^`jX&{9* z|Ip5>ceKqXqsDqi#9lsZv8bf-_5q_;)yVz&^Z_lFVG72r{P{XD+>F=T>~+i%Hr9k?&%E)mXps?V}t4m^l{wp#8Cr9ukH=&(DiiLx1I zmVU#mv)17QjP7*pjhj}kr?qF*#b_d^5-;u!dYWPreIw@ARxNLEtXi{HYVBAFAG8Nk zs7bvJonWEhfWI?TL^a^R7w?(<%rkZWTzyi$#5xWn$mcIgsoj7_K&JM@DVQ2`@9R}`O`Xp_E^ z-P{~YWXIcNYCU?ZcQN@&Jj}6kwZ0`Udx-lRiyg47h1g~xw!`Ls4<>NN+eZ3ADc+{ zCq1Yq*_k3+Xdfn^2GsaCr!`ai{@*}eRoREI6xY70R68OGpGLB1%%3#ucsdaeYJ?AW zMSbb!Z2!3B{h5``_A8H0$?U!B;S(u8gI_kSGgUY7r2n$He(~SrD!eS}+mNb7aj8Cf5o)L_hN!PnYvH-pTO^4Aj2r{`4L3t04d;wMS^fK0cht|7eji{snC~mmaan`_Xz zt#q*E)N{I{RP(pWycsepaVHu0qb!6_V+aTsGx?Hzq%z*u$Fe`zh5c2h%^r>ub9 zQO~E{$TY~MLA6>2NIAsir`?C$Lm7Ujnh^>b8d@7Y{Us^x}T&#*XcQ zzR|-pkm=lY5yC>2=OX8uEWQ%A7Ic-rlMotoh?Ua~(^}E!@J2kzy+T>AD@ob8LB%Zn z$q%$C>nsBeEdnLJC!z7jaJ8xOV>s-+=i6Bli$%n4J3iA^5e|}FEJ9bDc`v-xpgp9+ z;f~`l=1-(ITI@HHKg6Dr-IMk_M96OOQ!Un~JVj49>fSa$j1Ja*SAsckT3U$F_Ts9N zCL4X53trZS^VkldujHE1g@~tKNYMqZ>UZA2mb1JiiUgEhFWzD}{vwX> zG@a%klc$r7le5<%Pbp>od3F+9eSPoiP&joISNDjI_TFM&k|>F~4sui8t5 za=}*v)Imr3NyD@41&1^2&D_Xorj4J$FLNzcywGzj-UBK*kZ-g&d#;Yc!)eZ@&ts6} zjxnk~)?}!OUuILxlnzV3_k17?(uOZu8Un$UL!B=t18d`RsAymFwd?_8%YoP0UwdTz zJH4Q_$PMrIUVF#1|FyQ)Km%XEsw*Zx4XsgWA8o**hcI)#<2F`Y?z|+Bk@wQXB0^3UJEkW9!olFJ%9K7TpYdE{c2to z@3hhNh@nF7fVG0v)|Y)?B$_oBMFTxHYX6prWX3MfBG1rP?49>9-hW>SCJFy+fpx#M z=B2Xn=3fj-1hB8r=IGJHN(Xdnbfp7DzMga_W8V3tzJF$Aadc&NWyN%=VtQ3}b#Zj{ z%)qQZGe*5h?ZQ{lJf(iwVET%gw z`xNo02l41HRtljNWMgGTQsUdwA^J@&$9?p~6gjdxq2 z(cmHresbGXMmfFDE(F&1hq90+(JDsD#^0HGw|w~lrn+OT%cpcxy7EOga&J1OXwLl> zdPug0niebGQK$_d_?GohU_E?uAX&3eV0ILzX(=~V%VXDmQvJX2wy95BCRa~(O=E4@ z$88E!UOrCsA1whjArm(nNS`H=ZRjRZurltS4-KwUv~Wu#^Oi}tc?|gEQ$Rhf9F>mHQJwI1lI8RxYbqhNy%@1BQoC5SblaMB8!xZ)-e`>j>u3Gxh77U7 zx;$N>9=p`idTwa6{hN>XoK*Hc{wndiuSqdrV{@A$dU&DHqv5diMt=9Ud7&F^_hR@h zN>{4QB=RL;JzPV5l*4riboz8eY@=A{Ts9D7D|rSJ2Y2x$9r2uouq6~n?pO^5w zl;LBK8&~EE-LIV*Z_smD9PMAr>}#XR_U zw#5J7SL-~!b+MRl-8y$DH0$2ID zdQB;_rdRXdOPf8Kj@7e*HWnv6|IM&bKVmlPhldRo(~tpV9-@&Uqp9xYm{^!pDut<- zL?Mq#K<1l#Uot9|cYi6pW*aorcT{)Q!CjMqbquVOiP(>+O`piQ$2n#P$Gmv<`U*Sz zEpeiIDOz8TL__`LSFGk0ZGy7NvM%tktlOp)a{XSOP;;;Yljy3l-WP$rhylhiu7w-!2j?scZ{R!EE5Vd&t56!vT z1QaI^wjcmMH1i=6EksxC?O%3Z303R9uf~jG(Ep`;jtbdCxG?b43qep`q`){n2x>u~ z3CHIC`qBP{em^STZ(PCPTMS|@{TcUuK_lA{m_ihC3?XZtEyY~=9a3@iH;p)`MLxl~ z{yU`X`QI8=J&M(!wwHp9rTDR@GSfA+WZWyrc@bAbqyKqf!pI-B<^2)2XoqEwu>KVE zpi-P9TeZx!>C82Mk?G{s`Gu+JEicv!aHf4wH~r|(m*S6e;x75l`|Bu4e{>1-zvF-s z0d#`%Gw@h#PTQcIx0(!DU4BgHGm6*-XUJ-E&IaXTLX+QJ8jGK#WJpSmqyz@!NjX4F zem;JUGNCV}t7P}@YO5^|6I4Da9Q_}V6$;`)5b}Y9fFuMeA-7!-yFX6}Q{Fz*=fwPH z$&&KFvAF!NEg}E9CFd_VC36Qf#{}?}0Nxb9X#!Jx-WNJ61VI4+1y0*zvjk0XzVu|9 zV!nTmdt>H&sx%js=AP2rRoWk?tPr1QkaHU3wg$PSL9X~De3d85<_u})7-Lu2^%sx^ z>-guC@lzDrKDT|*vR-iUwhwI|k&k8YtCsWmwUu{y`*3K0fbHY${zh!dC4CcfEqvGP z=fKfJD23O*4d^$oh52_Bgvq((pnzP-A$cH9^P5k*CC+$kXXr)gq9MFcGJlqaEgBMV zQv-JO2%!AROKq}(PM6!&vtW1xTu?htSscpww|7FoBQ+OsuZGM-c?j}7Cy)>MmAA5Q}#Gjp0y1HlN0vmgAAy8hP2ihU&SzVfr zfr~nmBJLNnr~PJkj|e~0u=`>%AdSPuZ!nf~a)1^wS{I`PI`uKDL7gOeK?izH z(+kO51-iNAOx?qJsZ)0^9nem{~N411RwhKJCy4WnzjUhJS>L;H%Oaz6BNE>+V)sF>Mo#^RE`pIyH3iG8aGpU%|`7tEF3#qa!sH`ZD$pq%=%wy+s?WvzVLK4 z#}t3n&3mY4)LnGgBHOs{*3s^HC~82L;=WIB4bJUxIJrjldcVT$4G}PY<<1kh z^0azIQq)W8X1=HgaCrFK2$VOn${x);PgUI&$G4H1&1`G?bC?w53nk;V_lk{0P*yFv zgNJS;m4(33k~CGca{XN__MPSr>q)yJiyF;UWqc_=Tdu9$&tXa0VNM0e!q=>2&)wgY zOu83&ly0T^8cnTPt;uj5;+W2)wPKPH!3JV^GcTXCRN<`7r!@i11Z*QrpLJ=j(eBY} zNqpNmrawP61$FZ%GrCv81>)(vdeNrE&#>@GoQKKkRce<<7Il%5IiOxQN6k6$!GS3a*lyu?UP%Y0|;r9@yBYIgJy=bH7-uOo9O2 z1cLVnSE8|+W>o?Q_rN|Vxfu{m7VZ#9mag>EEaSu+p3lW%>x7A(<`}tQvT}zA0u@3j zxfvU=SWpPuNBRk=NF+U%ROaI)azB;Zg%m0}v0Z>$6Q^#B!0Bm$h*Y5OwGctn+ze1~ zFR(V4puV^32h4~DgYC#MWDFwM0kVyfnER)vF!t~ zmS)Z zO_MkZFvVIwkt2tVO;m{ijM^)AI0Y;Vpo{KGajmpF<*K|^+=F`#-BhAvDTC9SxY8&C zD-5EUAdM0{rQ_nT7<>^WcRdL;Do_Lz`)(0pYb3#na+3 z4k&qZpi;LG%&Ik{n3aw&Wk_t$#I$-gm769>nq@O2b+TAtY^c8em01&#z4ja+HKcT4 z7MDE^>L#REM=J^>sXapu1DqxL%@YlBa1MtFPlm1G zLUrdsR!)-(b|)l9$xvdvm>K>#RX4k~0IWs(W};w21|Q8%r*+8=WOdQq49Z~6cVU(e zxn+T3GhMa?z?vcRk*P@3wVAY){({1I#mBq_1tF^nFm=FrRvU_A;FO4YRUksRyZ8p| z>$l|(f2eFl8h1F6$0HU$m5jw=6Edps1f@5&@vw6+6!fC4EJdIhnF3Z{+XRr1qdEgY zZ7DlZ9%d-ZCJ$9q>2?cz^!#$(-fnNO!CE}T20k&18qX&%o`hCT``W4CY!i+HoG6?; z4lzd$b<&Omu-@u8u;KMOT3M$Ni@*yU9CvK#l5gDF{sX$2eIIKoRymI7Iwxta3Rik! z9o9ltVKn-3s$AuJWqyt;Sy4@sFsO3NL2|t_E|Ym=E+eVBD)KCe!@&1Om;uQ#TR~8* z3Ijvc^TwaU@I4wzlLjkDsKTsY&mj{pQgADIbmtxI=NX}@_Qa{ZO@H`9CF6dm-Wi2N ztpO~^6;uQ!aZY%&JJ}R`v%uJ#yZ*!UcS_jJgjRG&l?1(tU%IXF(s6SH_Cn-j;1|P+ z0yw`c1~UjbGAY3*Gz7N1{6sW^RBk7A!?}hCeHps_?RGBeJXp}MiBAlI!#C5h#OiAe zl=dLf~y$J1`Q=f9uvhc?rQC*5Ilum;&e(DApsuaQSHgOs~g@_rUR`Hgq zj%&<-MgyGKw{TBp8|dE}$f) zH}UAQ7}`X9Qi&hh@Qv`l)Qc)l10PeY4IOEfEEO~X7LNZgi9gyt#Du(ktF)D2Iq#}s z+oox|YL{t~)_2T>tV^Fx%_RdNyyjAgS(eNIQdViNp~}^8>U%D^;8L4e&0CFbJ<3(} zgi~Bl!63Bw8VJI3U{ueG`o-iG1;+)cbPMV@UQh9?D5e*vVa%}E14zEgwI2j-2gM;A z%td4zp2bOI@pX+2O3FMaYj?`nO14hLClMd}N==gqngt>OWm{F_0WS_U0a7diH3tl3 zOD-TAdmEf&ZJ^iB_=B;7@H;=qs07{QrUh4Z9h|TEnrAb#OF*jr2y%r(jHBdTZN^B6 zkLe}C+|i@oN3><$Gu{}xU@J<6Yb*556c0UVft+cB?}kEr9mA~i5`du6Wj0FZ!9BO( zd*p)dk@@i)$|g5b*`bRaVX-|Hsd564>{yuMWuNCJ8qIOEn7*jhmM>0u_^y32#ek7i z5t#{*S{D+K8QVp8q@lCHb0NvMJkz|U{R|3Kg)OM=*abXJx7B_CDsCni!n{rn0pG+% z*%5TWfpd>;x*RA{hvI#hO+@zUNDh{0K^T3z;2=ig?1Dora@PNMq+Hc7KqanwX3UaZ$` z3*6hq;C2J_)jEL&HJ4(%qZ>|Y)S!S1tr=d>8~@8eIDrW$m9F$cn(0g)`(>i6+z z#-3B1DXIFdhkRc!Qz8==UU1#^T=*$`;|u!nEc;uJ_VHkbw_*?|^ zi3S8gfe?OVjxgPz0)8I^Q+vzag3|UU^=|aJola7DPMRy!kYc{}5Dk}4V$x4y7 z?zQlinn`r}dWGBQMI+?;n5DhQXQWH`Q3}}+(6En&NA=L_=Wd{RfTykCMo)!~kc>{2 z_|ulZl?S~ANHr}kg|n2GylP0Ax|8>T+ntA#ETie z_H(>a$XtlaxdT%>G(W_X3X%jkEfY}{h!OGVd&>t&{FI4oQ1Q^E@oK@*%Ff%O28hpO zUm2XC?AMfx%Wj)-3g*uT*z>}+vl`q70QC*JE={{*cSvO_Rw6!|9=U8+JZtJ`0@@M4 zu!w|Yo?3MnMol#FZu=VzUx>fmiy~myMopO`M6fYp&5-TKbdqZky1}U9`xuNFmUxTs z$~qj3^m!9xUNm!?zN+>0V;D`)ZM5`a=rJ|+_J%j2=lr>fb|v8UTnt5s2~&a2yOF}ab3hj+H-z+vweoEE9A2jf>QuA=VQx<>6b+i_Kew-h4^>U4Gq;&7psX8D zWw|g=@=hKU^+E2`W#_125ly;ON6vOJs&li%eqA?lGCrxQ2--q*Rpk*mwjQY-vn1{@ zBdm?&NMiBTqMB|C{>VmB<>upY-vU>+?PloEpe`~a1Ep;BOp}J36PykSLMw6mTtqSXbz%X zDX z&83(XQnBpdbYBFoMhA?V&ljC;+i)Veh;UZsAI$b3uKU>!6&0Ao>_42 z+~gd~WmD8EegJqbZRu4a_hM3wE2!Pb4P0NY`a?lVOjC^oc=q3BVKTqdR`SLSn?J|1$c&Dg8-$Dov;?pD`KJNn-q;f)EpCo z?;n*2{*V1=YaIVyz)?zV(EZ`Ne^v1Pse%Qln#aJWWRYc%B$n4M1S}MSbj!Y2g$)S~ z2uj$h+ycb0C{jDCdn49R{OtUZnbb^DAS0_v377~jZMCnJZftR+>?wa*&HU>zIY(3C zaD6=h=B8#4j0s{8s|6 z1)G0^i-Mn*j4TvK(kk@8<6>1|JID*w25^ndKxWzzZbPl&vlwuz>^TKk4R8~`&{{#I z7f|$Zs3%Djsetxln5+<2nJzlK;GdqI>bH1KvE|J-mL23(lgGF~+;edey^se|yuV^Q}|n)G@6Srm8)kVU`33 zIllwi2=MIKY??J{EPOW=3^WElJSC8ZRR2QB%gRQ4{bXja>+=PXKK{va-ig-RvLJyg z)62Nzf(IUS(zT(%SlFJf7R z;C2-|$XopUwBN3mL*GfkFKzxZpF&GeLhIW)CFo(K?Jjejj`545sT?mR2eF8nWQlFk z4L0?1Hk02rFl-1tg@*IXBlU{Q;HCNx98QL0G~vH|?4v z=L%d|6dZY`*9MZiqvffM?K&cT|FbWrm1t}Fkk1TYJo;lPTCrpvTIoUW2e2CNDKg3+ zrE;f);)}V&HmCe6byO7=JqP8K%A6u+X7OIk&2T!V0DkY0?j~)PrE+zu_+boOhXJK_ z-tC|&$EN-u_ZKi~8&if+{jInT&5*_}t%I24K##N)~y! zGqLlXZXl#P(tXaHY$#In?8qibE}n-b56?rFgXeVqd(O{yWe`i4WgG*!1>X=~z{D%i zlxKDTeRj9G+~AqWF9Zl!m;2ZI8Wv)pl;q8LQ<$cbl?cPg9_pLZE}k4;o3nbl{RG^VjK3`->9Z!Bdtm7Uil2+v(9 zc_F~pns=Be1^XDb>~N`-A$;t;A(QPp70-+XYvwb?#_N0YoLI&d3UA+xSK4eyIp4lC z5udfIbhAT5qchr1%~SOMJdct>C4X95`)sNV%I#E>5$rCHmy=E+uL%^^_maB-<<2}V zA$W8TWPeM42pR?XP!KnI(U6Q38b7>{g%$STr(?jFqTx@39_vs3{fpSDSF``pV4#f~9k z(@YE@gC|auwy7vyMb0v(xuV{LSg9L~%Sx5R(ObV}@qrm!R-ee=gbS(gY>JR_&-&+f zvCN7j=VeBS^n(N}vA%m4J)aRwOiTpl!GKG`YLXoUB1DRZn^?Lhcf@s<@q40e%%!UC zS4g|W&y8(u)-s#gs+vYgOqH@IDjcI%PFZ`AO)g1f5l*@-T|MT*I`6XegmsSGy~;_m zMg;y#tz#CcSPiBR3kvE}hjYhG`dUUedWKi%EO7i&FrN`2#*XhuobfIARH5d}MDiz6 z#a8*9WM_Wk_`JiJZ?9?jb0nT5J@V>Sn4jX(Oi!k`0sI_R+TRI0eALOYm^ z%Qb5;R~t3TFfCme z^bD#P9dt;wBi8uYFHG(*3tzSFU7k+e7U?pB zL%ssHZB!VII51*UT*QM9eH0&@xy&CB|L%VEo=jp?gv4{esPmz^9X`k-p7Dxzd?JfH z%ybo#zES-PN}ZDq$F=^RI$};B#+K<}E)@A5>2nk(EB0wwxMU>a(nNKVi3#Dwm-Zx};C?k%OhC>A|a z#~m1Z5|WstBqt@QNlSVrXG*3fBbmucHeVdeEw#!@y%sBWU0gYtmfTEFUS`CR{1l`x zMJY~6N>i5dRHQOhsZLF5QBU$tbeNJF27PcEeo)}3`e4(}L5Xl5{3cAa zVm6yDU;x5z+`?@vU}y>k!A)1(^kXmxZI~_vKogpSTMu=> zs#Re{bjY#J*VBpi)xJY0LitAi!NmE{Nl}h9EB9H3EIBY>uXAs#R`|v_0QT>;yWQgb zX0Yo~7Y1i6Od${gPNOk|6o4EcUZ8HmDuq05uf{Z?#?8+0rV}j*H)cQza3fo;AL674 zA43@M4S`Am@)!Wpk6W-?ztJJ+6-|>6WRMg<#NP-)^mIB6>%xj^>MD+sNbLg{Nl%TW zDNIi1*wFRFB9(ChsVeN-f~&$91-mlIR^UB0J5&!@?r4&P=t(Dxa~RL{&f!wM?%BQt z#iQZ-AuQa50y`~^PG##J;*TTjyPhV9Y|@1w*eM3sjJ9w|Zx^e;7m8h2Ddnw?U^}-VXyvQ!=W&vxD_d&;of4>3uYOA7+sw zyra192-yeFhcnAft&ybABO<$3mnKOhHu<=A=bITI?F;O@oi~Wk>bvC7UljkwuLpsB z-D`8+dREtTn*rF=yl*XDO1JHc_Nn`@1NA0bY`Wt2VW z_^kJc`-o&j7<)8wFoKO^lGlf{xss{bjQAApT3Vc&}__N^VOe06H7iq_I(ul3xx^*0X7081Bws?AO(YH2aZn+ zfmIvA-WM3B1;el2K-$f0>96ivASWAMZW}6C?l0YV;ZZqr-jwF-{T|x)Dd!{Eh<|1Wll4jYV+@!3iTU_ z4WTbnbuOyQD#J$MGbf!l{Gd+E`)(|4ZzK|m8E0%TItr&(|HJzwhldX`-7!`*?5H3* z#cZ>J*qMIe{I?TMPCU^NGzu+d6hEVoSRsS2IgrQ_eI!X6;wB@Aji3wLU6+Be%b-NG zv69nXo`2rI{`)c4+NbI^;oGkvej}42Gx`x2I((LN^0Ugi*-pn81=hlnD4p6DsfWcr9{Z{WS z-diLaBL{;XFd_x32sPo{}EraPy@ghZM{8vG$1XI_j|&Cb+}I|;680qGzd@=-|18} zJuFkE>6f96SvlKN0H*f)(x{}L3$6SK|73(yAmPcAxscT1VYrAPvBTlni4(3 zwD?M|ht4ypstZ)Q>E-=ErkX0b)J9M)yk+u1*o{o-U$G}f*)r4VTdjS2kMlA-&>1E3 z{k!s~%o#>Z>5^VMH`x<(?u{2EBy*r@Er$0yR||F>yx zd+!^e^^?c}#G;YC5aiRR=r!-X(VLk!q8Z5`Szbq8@LCJ9Z{oD zc)K^H;s$8g93BAivINio6!`!BsjJh?*CQI)G5z)R0?z!`K&G38Mp^yb9wMPg3HojL zS)Ovq-QOjMNEl=gu_7WOgXI3(c29iz*WLF!XQrkqDykwXA|mR&_FBK7Nc!k;Boakm z`z_O2R)c{!CU;HQ2@yn;TaZJO?D5;$V{Ns&7g1s~FyJ6j`aLsq)-A9~cLAcuui%jb z=ShHz0d|EVTn|4dWZ4$Dbiox%`AShQnN?W*Ioc*!lpcFvRphUR>g#j!A9roI5 zyNy;`YQCA;jn~R<02_-Mm5dB>q_Im7B@}YJcOX+I39_b-AV&uvP7I$=XNo*Wq$#%- zPaBQffvJ49S0*BEGKcyu^>;aycPnk`Hlf2-w_SU3q=eRd+j7uxtIAejw#=)_B5sj_>^^0w+G#A^Li|Lq* zv2G*A;L&gKAB{^6YBhQe^C%xhBY$L#lo2;{BiNvXFC@u@!*%cmgG9pr^^gA4Z!GXx zKk7SutuNpdj$l7_VsmM0dwDPH**$f|TQTs7rbPVc;o8HxrJDgO>d+&3X&1J>Gdihb zI=r>5FvvkbU^@Ggb8s4t;WX?|eX9@ks=AQ)LEWk=-BRc3M0K#Ux3G5>bOf40%6?}4PYxJoDcimPcF*kW7Spup#18lBeB5uaau@ikZxzv-c=cbPmaKqfS&AiK5!3x5(fiL9+jT(j(Se9wf`pL`<4XeN@Ty>oA{@F#I@ z;GLZ7Z6M>Dc~yivfCGFpF3UUMi zXPl;+xXBx~X!mV+^etxL{|c_tbN@{sV<96TgCYGOjgX$e)4-#UB1k?Y3z7nfgXo|c zsx8p;S)>|t0LFV@+OY}2#l_t~#SHucXI|Phti;-)zTJfiNtp=$yi_2rt&%7}>w@*?&{Dc>r8QQ%b9ec86(U^r$!ii*V2GsLACmS6Lb*Q-_@?ZI>^=?>C37o+u-y(j?Xr8~(tQrlLpuI0 z9dp7-r(Jf%Ro7g1!%er`_P|%){O~tUFgb8^Bn%8>ENp&Ux$@)5lYoqZ9~Bip8X6w7 zv?zjv@fR)}RfGrubaaFwMWKlnjV?wqPpNXL>FKfM$)jXcf>5Q3hDk4KR#s|_8acAD zan_{2AOj5GYM_DKv}nOM$PljV?A#4COfXo%Miu25P36W=7h@^cILa}eYE7U{CULQN z5JIdF+d&m}P==ipvzy~(rN}`GIRxsUBT(wFBQ%au+%YP1g8DeanIeRT$Q=uF-KokA z>g6U?xkbI)4n*#_PvZeaI;mP0_3)IkyydydgWJL+D7zn3yQQ&X`!(01FPV2MlO!?gX2Pb{sRsRByLk+*}C4=Pg~|!?&af+WqtWiJ@Ymk#6^yAj!WFdse*Nm6x2DUU{&@lje2O|zyYiZ5-)!bH7@>Cq_`gq<*YcDjwbM%`x4F-HRLH(1hk!AXF20E zHW`yAm{C%TIJe^Ga18@#c+AyTItCe+nXOqW9#>tw>v%13kz)4l$K#x7b%YX+yX z4I}L&e&Zh^^^0T-XtYe`cZ;t&bC4qC7J7~hPfl|5c7g-uLh_-OUvI2Dx7K#*9q-3ozweIw$ znZcQrn;eIW7Ffv7k2SW~^HXF^Ey3`Xjnwkttr#V%sy$KElBgpqQBGz?nIT_1qKk*K zbhWhVT#xTn-+UM&JUePd4O%s0O(g*e2e0q5@6Ix)+==lD6Vu3PWhE1cRd@ZU7N(9-jje_gOv^~;TEi9ZncA7x2ZNQcO&prdEJW8 zY}OtdpT&4kXP)K0u{Jn6G#rH-_RC`mAR*kRU>htr@d*2Dr~+vNk+XP@np(=iCMYt^4Gb$Ua0a5lT@8)^TtS4Z-rmX{|ctuPRchsz5y?keUCHtpM~ruzfeu+I}Xoe#sl zW}IhEk~pn)($ex+$TGRF+j{Au;`y|@TgjGu4Mx;jLQ=8rGy5Ta`t6Uu5$zQ02RD`+ zBK*?xyqavs2#|tMBvyQz^ue|RDz^T9aS5%|?lQ6}GMwc8taxipPC2RWCriT``&s`@ ze*2382EsLByE@!AaO4{~K}%ECYbFr7hl@JwVRIzL!+?xJCfQQ*ylU@6cy7e3Mwsc( zioU%es|U4CpEV@b$RUp|NORjcNOjm5AE_@KZUE=ia2wyRbT(XHZ1??q{jD|CbggX8 zT*+smLZ?oSI{uXt5x_}%2TEnoxwWSh(b;aIp+hS~TfuPvEhnlA(>#6cs(e+rtDfQi z=5YUiee?I-h~MTXbL!B#J^hBE(ttl=YephDOoQurWlQNA`j|z1bXH$!_GI0!4ouE= zljwWMSj4Fi5)$2CClG1PrZL08Pl;H^W0*qo`m7SQ6IsAW5`K7*Lo- z+gj?-)3s)i25o-;53)1wI;0rKQfLsk*$<%uXPS>B?dCfJEIgim)7!8rol0x?Ta-Ngtn0rUU^^FV;J z51aCi?ooo&2etx|Z4ic?qvLjjsW6 z0qEVaIObAcilI~N$VxFc8|lsRr1Zna)Iv*Yt~Y3KqB?{ugByz6VpMq(UCqU-zn|*Gkf}_x$<*MT5RY*uWrc{rBPHh;ttD032EFbRq9H( zwT`7rzFcbI9y`6>T4TE{FZQI<*SnW2c6XLa*It*KL~8GNC5#oUBW7_AtQ(U>ycU;h zY_4_@tJ2l`WZfAqc1F8K|18mgxQmuxhPMane5-+-YvNgMyK~yi=4MrF+U#(4O8cR{0g^z;9bZ^aobkU2-0|IReX?nY+rkLJ42*@{vU34Tca|>YLd<#xmP`1gj;q z2M%Q*+>FY4%jICngQSb`_^YW3>t!N%@~rC3CE(4>zx4Z&BKC*lMrq%Hq)VYt@g%ez zD1Ih_38zfIipzI9wE~d-!)Ko-!x?F_xAAg{xRtAp{) zPWlwLDQ0?&o}aS@8Y^yDh0HT9SxzK35n<(rJc;Q14v(h^^HOHJ61a~0fFBZfnySr> zP{y^|vKlraRW;I==_s*@wdwKedfAs2odxW_0opk@E2D?TqsOpHRmLgm zFtq55o8P1h>k7d*R3L*j<&an3_JFukZq)ou0TK$N3)JXQP2h+JUj@&HyrKPZvK5 zoyetfG#J}Q`wz*!(>tqZf|N#Sc>E%@S427AY`vEL>s-oY;|>&C$zBMowI>0vh6AO- zGk2nkF#&U5X`N;=7?J2uL0v#xdR#1U&pD0O|m&krx#}m^Kh0Gl>WGBG0 z=PA#mufI*U_jDWf5}lfxpc9!a0T&g*@c_I4A{L`MN&pN1HUNitAi&CneK;Q7!x*U{ z@asaaq1oPBkfO%JmlF#I-&Vdd_QeJxyrN1`WWZVjnGSx9%cYdZ{T7Q@teJ?MIND6l z_uAZ0RHnK%G>xTg`yvxVq!__u<1s6eAH5 zo{swj#vMgcwVCqXO^MU)CdBxs;(X3NKSBHw>PE)s-3eTlb5+i5bo^pE#=Qj$2#)QR zQ)EMP9^bL(^5|tWCBNBeyA00Q7SN)EvgapEW8zE{7_h`A9`Bo~_%Ke48(&Z0s+)fSZ(?x)wIl5|b7KBI3Jtl5>5ab_t4d_COv^+ZhvEFl`0M@l>#>XURprQ2E2W3N2}c^JPQ3^OVY3i>b4z(dosSU&}R|h4yi(L z9{>K}J#KCnSh)fRwOx>oA4{<`x!E^oxlROyVwga5sWO6@@2*5>043iKBuD!uGqkTL z9D&>~nYqGxJG#$mzkBum zYuG!akz5Z3SN1V?GXspol9O~TU8_K`W%Dpu${>xr82)cx05RU>K)O1_Xc~_Rw6w+G z<-*%fSd71GRX=yBSm%doCOlU|2*Zqv;ik1!-uS%F>Kov6g02??&v*%J^w( zLvQTZ%J`YKDigMMW&Qm6+A3`Ov>}rP+Ze0WmYQ#-cH^Js))#j6wqf?yFaG_?*Z|Bg zf5NugfZ$-GK>!XzK}JGN2jp7)Q~~Bgda~|rCl?+Et_L1HjDv|Sx3+L_@Xo%_JKNeA z)>@?%l@n2VWj`g9&Uj1`FT;&MuR#g_D`%Tyu6gELV4+18Tk;gkCutL8#UB5W5HC2H z7zK<>mRe@H6;@hhwKdjS_w=ojCc0-|CS#6iPanH@5sWhigrpp1r{gDH7vrT21xVrD zZ#yDOS_+!nZ{KZ%IC`gI@c70bJWsVQ+C-r6OdhQA5jb4L1Ge;AxRU*jOqyVXuX-5Y2_9_ByYF|tqrA-v5UC1~YbS#2r zRod+Wueq3%03Fzy8LZlz2kKgcPCy?A)E?Lt;7GY8oJ;${&%gYnnhjhn4jG0`C4$}m zXi`x7>qOnDdyQ}sPRFI~cO;Y8mkjL>imbyJ5AL8VFf0_grSN1vVfUW@A1CE3fZeM$k zs}4G5x1)Z?+y5!#P&j~NV&UL%;mQr4ClN1V5;B2Q)HJk$go~gPDcWf}oC)8FM2nFk zRk}=idGZx7DpjUJB@+v)290c*3@}iOLF`V()hT~Hv|p!Zo_HI#I3y~LhP&>cYjH|k zT>P=Y#%TNx&(7$qH^L2DZLv)UDiSg}3K|ABXAT@W5ppNsflJDdHy;6fedjMsun?i5 zDD{ybR-7d95+zHMD@(Q<#kwifU4|a&nAPa1)(`diYt~mkgY`CqLa(Tk7-3|txa^L* zZmWzZ2-3?92Juj?nEAEs>S9=S)@s94AcMwAUF`udPoWt)F#jwM;TSia{&%Kb0vycy zdV#-jJVCR-hq<{+AMU|kN2|m+%oBW(oZD-}fsfx(?m+m)_Z4{i5B%3#8gHLGueaR1 zhaJ*4o>=35%e7p-mX)!V@FT*b^g2L}!Bs?HpX@4PU<3YZL=rxA8}G2c?$e0gQd6CL z_ExM(--Dlz>RlIJ)jT}+1Mc4ynIS)JxWNpJ?D3p}Cu;JqDD04ahi7OIHnGoEIPo}B8FjNL_pwz zNSy76>LSlU)QekT9%Ib}?QQRRyl#_rpg@md~xp!`-8of1Q^|p;M9x|>( z{@j^g(Z^~4@+jX7q1?ja)TLtZCA^_41^}5^V(^c+Jc)GHU^3DwYq^Vv8^ha~&!p(- z)v<=9{4luLXYAijn~<@q5Ty-~A>iBy)F?!$V_>ROAy${^0bUHzLO@NAU^ZY5N!?CA zU~KDQWwi5SmZ2e75$zPMq#V)%rLhL?S}RU0Hv{Y=Jt7ibbjbVTl^tO(1IL+XAP#-H z;^+v?#32x+zxj9{2JY$7k8{{q_^V=jMJvY05ET^@?Ir|4N-$(ZgPag3hz=z&pdu#J z#Da#{{TC41uSz3%JM)5?=zEdGm)0#oF!lY#F2Tw7|2^Gek7LsjJ8ZG1Z5RlKk!T%z)X{0~!ZmY%L$_6bJia4G07J}VS>lmo z#pbC@V*xm6zt=_!9v@lv^S-~UO3Jf!nj;y!1Rlw3TzOBxI8u?w1emewA|d?+fbC~; zlrMdv;CJL2XfPDIhw#X8-%sfV^@XP5EqR8hsg5+>A!E0=hB_4pVrdM$PCpE#3`h8t z$*zs!x?7LtXK#m*_aLNXkR|%XNSCM0Vw(;EH0i#tlZPB?ei;&zQWwA_5&(L^&OGf%djDBuetK?d>2 z2rUkX^*fvBgaObLU`W#pj_B1jiYH-#Bxog75LH>DbUAH0U9Z#=TNr5M^#FRLIeHI1 zb!gG(1E3?*8B9IvW(sLmZiKIWjYh07MY9Oh-H?G4Y`3Mr$JWRo(18I0FfqU_QpaCb3I9I)0W~-*#X@#`;pBRQN)r6+0FKpz< z*dWPUl@s3Shx@`7#=Ay*&s#y7HbQZH&q@}#-9bF-XIi1_$Hu%r^g)>cRkFN^`iDN_ z?mK+69;AIijX@Hrwd{{eKhE-_`-o4<4g-MgggFF3ZW{vB69jqf0M}wZK~T_!01X6< z>_*!L;3~pG1wr=+0xVJx6h9syXjBlCL=a%9g3PjM@fuQ2E2wBgfRzM6RXe~A>_HHi z+7O_bAXzONUai#79n?k;V4Z?wJ)i)4DhPT-5THdtdwbKifX<21ipg${S$qu`Yc?95 zRT!uDc}*fZu=$bFW6%|h!oj{M9O8>Y zyDtidY5<1$5e)YuV*~`FailLATYb?u$`_5JH2`D$2*&!+m~o12bP~2<)f2X{wCc~{ zvfBr&#dmukAZWfZ1!NmgZv{CP?Da3efgb>t*Mt5EIQ1VO*#*~~x4$7c1Sww(LmkFF zz=4AJfXfuE-MyNzhg{vm0U$j=%|t;JOur7UI|>?|_0cqqm7Y~>-zd1mxmMa5-PJ-7 z$}v`@sFPB0Y?s+^3)m~=DOtLj6I<(iZ!=uST&pHTW|dn{`Ve3OshZsaio$PXLM^p4 zrunvA9c{<+snb&862st(Ik{z3)U`c3b$okkMW#n>r?D?g%4m7uUgxD|_TWZ@62tFf zzs%9fO{+C6=E{37HeIJ|k-#Yw*OpM5)Rda#Hs}i1tUNz;DRpb!CQm72&3p>V)G-st zjonkkBmn{DOAe{YXgJgmPC&ZOvKR|PlBsF>F>Ouv)7Ty)C(HbV$Q*5&nL(&qw8q`@ zZk?Vw{)sbIq(aZKQbrtQHtrRtS$T{{X+>h1kmk%rJ|S-^i6^~yz?<|JOJITrVBTQ* zjyxhDwlaVj5^!8}8kG99TN zNT8u=BoVmKN`gRtmN&cq!?X%Uevet-_eK>{AvjX2(L*y1eCPvXM(j=Ve|u)FA&DDR zV}mm0;HgQ5L3D{bjZ7KOhq958P2*~a5&L=E`!TG~Tgde>!ICKSnIIh%J7*}#VjZ3x z-}WqY$?|P-LI+)Cs!VQaH!1|8@TtS zZ1?!Jb;Ca^TY*|gJ68Y~n!&#-TGRsdH#jG+^8W;1CZ)qxC8ON>Beb0POjg2jH-g>9 zfYHgPg>HR{zAq&y>GNk?Cu@!ly2$PzqLz@>{HeEb<5jFvEsPUy)OA8s!g7F>vI&RB z0}Jiy(lw0v++*5fhg53Dp6{BWAxbRC?>3Xd4*}$yofiSdM=!U~LZ(?}eIN0OroQPT zrGBO~*}jaHYtv5=_S7kL>aImsSxswE!d`eY*B)Hm`&wFaI)*aNG(F)83tR!c`VMLb zW!Q6)DUv;3n6}@_H$sY(sIKaB;)=Jb-;Pvqsyg_5jU-)qfhqm`L)vl{q1vP+F96+* zRy|gqF3~jy&&5(~X7Caa-NyXmVQ{pzgFsR1j z9q`HHXc0Y(SA%%{9@Z-BbF?FEx4-!f)4hZIC6r7f^1i*gcZosP$(`;gR3jG7Ngwf) zau)B1QVGVl>hkGpu7w~}%Hgfg!cKHFhQJ>JXJpaUF<&p9-t=ULodHN=250Qvd9He&JkeBt9yaF$~k#pYW*RZ8T|eYJxwmnun{Or7|qHubW9AiL4|J@G1iki_Ly zw&NL5svop8{qt7#H|Y={jK?Y>AVr`(_?>2b1Fw!wtpjNL$G8gbC|vIS%o}*_QG-6= z`N32}RfZlrmKu)Xzvb)|P8vlpCF!QmBYz4jwO?q?pWXaRM#(Ta(8{arGrTFnuNkw{ z3=w#tW?@2<-33}dM7}pU(8v$E7jXZc`E;=L@ZHCx_JYc6>=m0w#2$% z{H?&~T8n@M{5{T*tH`?g7CtN`g3O*TC(S@W=kSIflrq0nF$N;xPm2&fcC*Egcx+{o zs7KrC%=3G`rbT4k4LL+32xJA>Aqou!a+iYq9aa;df_oW-t4fhLR=DI;KBd z-{1d8a%uHWKOg?Tq$HNsa$`}i=u0ws zN1Q=z*dnCCi z!Fl zWKlf#N$ubHcy50#uAH6D7#>t~#W|5mzQ#Fx2^mEy4OG}hkf6Uz*uh1+WTAlFR?-kP zpW8X{SL^v1#-p3snU`>S9yRpG0bo+u7c+w5a)Wg1j_rtU`3t63yjOikl6~1H{-)Wb z>fzr)o>SP{k6mS);yq&1DY&+NxIt~to&GADUko<zB$Zx37sN*Jj_CTA=UxDM4R=;&EnhRL5uDsQmH`So11ynT6qr2 zgdOr$-9_CUihAy#ZpnL<>=WSt^vj_^E&2!eAUovV{`-gNPHU59uF=1LRh_5(G{-2z zf6;iySm#m(g&>6D;gbmCkymrfbc^&G8>}}P>6TwjJ;0&2w|UR-XrK6U@*$m z@S&&)&Lgu5i`3{&w}Y0rxV_ymJehre@a(P6pj-20nqDcPM8KZ4ftzKQ8c|=n6}#w3 zl#h|59Rn=mlW--&cfMn3?$a=iq3+Vo5OMp_!A-A-;+%I0gi07 zX#bams-uMV!-@ zc`HjVp2D~`wb2{q{QBG9^x~-LAkHSdRJ2Zfg}x58?0z-{Kg_(n`dv=RpY#QPqNk7t z?7GsLxxy)Ap0Ms2lgq!9L7)CCKK{*gr`k#`SXr3c&>l1WTzu+IT#S*Mn8Zs=3{Fbq zCeFOd-4_#o$|~+gdhSH#zx=A9mX=|90<(zwW&rytlOtE+O?=^_H~kGscF)luxn1rt zSwBoZJF#=_5?8UzXz|^A`AwY+7V~9Ry1hEPm<+2r%PV8aXW6)hUcg0BU z0yj;SYyA1w09ECjW7ltMYcp+|ZL{*;^xH{V#vj*lEFD*n^ZKW`4+=7Oq^GZ9#(Q8? zha1??NW5W+0WX+xG%`8%;kn683wKY9u}o;BqPufrv%I66prUPjJ)Xi3`sri+HR#3) zKH3a!{sWPH9f>zhfAjg2K2e^J%U6ww??)!e&%RY2EUxk8WNB}G zgJB`%DIIQKMoTg~I}<}O0M)velwsoSp$Tly6^H+YR1CwXlLn@lE|7Jx-A*DH>FvXbz%xW$-573kQkydI$7Qy|qv=UEjp zNl6PA9`zNA$6Yu+;84hLo1RS6V=KJ~PhhK}D;cjMan^Gc=3Z!>+qPivt93Gg} z@Ok+)D`YVkA+zmT1qL6v6A9jn1os*C845Tl6H6m~vw$I>dugP!rF33t&BD_5Qld6| zE8Mh&wT%_L-ZH6bS~7L%)F3uLa&K>3MeMz|>-ReMIt%Yc5NC=j-g*S~r17lG3%)Xs zWnSu0p1IEK^+3)ZZ^%Xzm5U?}OoqC$&{9aQ`d`K;QqqFS1Syhmx zK4hu86!-g`JfdMZ4(z(9uaVxoFwU9Q6mx%D4Xh28!YN$t9M?KxxsB$8RT4 zbxytwPg7BlL3^*O3P;un9r+!fiX9+{jPK+)G+GfA{ov476p+j3Is6RqO-FoHTT!bB z;0wfZ_ZSg(wr$*kwz^Dx{$|mBGWm_?@INkzBgma)^iv6mrHR=mu!cg9R&WQcu3TXj z{^d_O_56kZ$&$}5{O}dNa~VY|3kEKk>T>CMT=zEg|shjiw4{zC1&j+^cmC1v#jDl z7ZyhJzU&64Q7+GZ-QO`aWxS{LZE?&`tO9UxBVoofho)oT@Fqq*ie1zH}#xybZ3&cGlMOKl1y}eq9wM$ z2uWErg=kl9bG-maFQW7E^QZmlNq3vn<{q1;$E0ci zo0`wJoUg;Or{Xq8VAlAu9XNQUs&lyzt%3zhV@H@4klsxg@1tEd;7GC0VDVt*i!pE*86PS`X6m zojX$9QdJ&oEAiKaD$8rNdqBHvSs<`X&(g3b8_x?HIrg0;+v1x3&H`mrFDRrIe*9`_ zKcm4H|E)jlwOCo@P5u)4{5`Fax8H7^2!%w!QX?TiuNWE|Qw*yBJ5MeMwapHP>GAMV!~7+oVP?6IcZx&4ML0Jnz*gAu_7u|@2ty8< z_p4(Z4!uNJTFcYQYiRzeC@q$(gg}{E!&h=?$b$>lKcy@bt z=czBAgRw`}oqg-D^$2IDGv*_*$X(kSP>X|gBAvXPve@~CA}XM_7z`?v2z_d)-qz3@ zJnmq!%XN^bsX`*{Y}~iLS+=XqXNJF)Jrn62i>HOt$boqR5#lHEd49YY7I1{nre&`_;;^;@ zX)%|2Da^eBS&?4JFN%ELz9^Ha7YHGl!rio|c}eeL!=ANOv+-%#`S_99(TxFw%H}zE ztO}J@9H`()wT*mxREwknkSY;9CSxp>@ljqcH@eTw2L+&o3GWmP-Pz}^rQRyOE#-$ryZyY0Et z95PeUo8@7#w78zF)z&e^9&z71v5#XGNW|7s5}#j65St}jp>h8x>Y|YMEtuZ+!xB3G zvOq2|sQIMB0AZVl$TW&1dWC}5GZ|VwYt*=ZLttLKN*3eC=1psDM`#?ri_Z>d^pao| zU#9C7IHS5`)oQ8IiWsGOK0kFY(o$cKgkTs6>F5^Nhl5;h`CpAdD1_YZLXbd7-nJdF zSBlb>+6$)cHEMXc1cL~t*zsO?U`YHTR4FCDb=7oU&9QaO-vL>BvPKEaSQGz@x%I zBop$Kamf)Ib^7u7gC2c+9<|l)b!u0CWgHyQJ+~S#8?t7j2%0uLN%QdF$V2Va%5r z9g?=g9QcNo8=x~{zEpw6)U{^d8$eidG^cKCz~Fo1WpaIOW|Jq~6e>g}?y>#7X^c!S z;ZU!HQN_Z1vY%;{Ko1>N15@QJ+m$^CU~>JE0iHBzPupKhM~LJS2IXXXj7R?~N@{#J zA;$DoWB0i9R3eg`5FRwApr)TPk2ut` zIeD;2Rtr(`G#1h`y$8Orig6)x z>XmuuYV=yT#c&GQ9?9ay8=99L{v3Va$8qbpcY4jTa5%WiJ7bk)6%gzH2&pmS=R}>! z7(`4Kjhcg)K?LDxRCw58rm;k6bS$%r3D$sX7Ahc>N*tL~p$GJT7f2g^YA&yJ&Rl67 z>x;2je2}hMX_bo$mfjiP%5o_Ub64^n^OmN!lGJ-PeoywBIIEd=7> z-3D6Db!w+trVcp*L9ft55})b!;@NtB>rL6suBtnFUk(3tRn~iEY_P8FM_J5ds|&|h z+7wdUvd81K*m4gHRg_ucR#{i!k)r%e#E78?G+)=%JbeFm2c2tH2=1@2*kBE2s2d(i z8EDbHU{*!*LEO7jB+Gl8+E^jlL2D5w9Ln+sU9aCME->*%}!#`V*YjHoWZ={gnE%#)yPtYx@~KgG>Ni`(WH;KtvlC;dQtlP_wLHca}AY;8|MV}R*If4 zqJkoU)!$t`t9wBe#gIIInj!_)@Tk%>y3*X(va8B-AQW=GyR)plyrLir3|FNn7hG#; zzqV*j`>h*2^GPlFu748bb3ZUK5r!`?X(!NiRH@OaA{^XJw5EDoS-3FY8md$AD@qSE zGC*}TUE~xgbbc)r%P_IDWo{=)^ClD(FJQ>5&rfuoTe6bR2ul? z=s!sG6l@klns3MGReYU^^Q0}%wqMEiq-Nz^yg~a9=S_A0{PT#_KH~G)M@B4e_o&73 zl*N72>V~-ODpfZOt2#qS47Ui2wjnNzM$*3*^l^&S? zyhE$*1VMF2hX&GxHK0I^I>TC>__~kBDV0h&Wj?+{K`tmaP~d8H8vDDb+m1G!;W`0`ZY^BjYg4^Lf12@4>j$Homo`ps2tgMC~;#Q zjHnDkVo--#6c;uD#Ah_%-~kRD@#3!SIH<{55(L?@57a3%*4#o2OW*3sHUN^M5&X_M zc(B1@7rHQBa?PSfFX*e0tRZ2$!LO@wD{^SAG)XZNILF@AXAr{nag?AW9?kn^YT z-FJ1|UvWOxEjYSx1{Z_j_8Bz#Om^0_*R^o-=yTdnhUrP2pY#($h3WTc1=PP{xy@hpllyV9 z+zrXPW5MQEgYz|RumuD6eLY{0vxz47dCw05KJWfN0k8Rf?VTQAJFjx2*N|UW{syIYLNybkY>LKcAfJanEr-Due z-35wxo$S%^>H)JZap^zyaQl;LF_#6vk-s%=)1xQ`BhH*2`UrU7HUEDAtUz7RZAzTF zLG~;0NcvW0kU#1Wr)Jv$4`UZd^O